Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@
"signalr": [
{
"filename": "signalr-0.1.0-py2.py3-none-any.whl",
"sha256Digest": "0cd98580aa10b660602c1b4496c9beef24cf9c8e15df8113b2642c75457772ee",
"sha256Digest": "be38f9e49f1a92d194e7f141d978e10de852f77b63db2ef6c02f838fc3067f9f",
"downloadUrl": "https://azureclisignalr.blob.core.windows.net/cli-extensions/signalr-0.1.0-py2.py3-none-any.whl",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Publish with a higher version number.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is causing CI to fail for this PR #163

"metadata": {
"azext.minCliCoreVersion": "2.0.32.dev0",
Expand Down
3 changes: 2 additions & 1 deletion src/signalr/azext_signalr/_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# --------------------------------------------------------------------------------------------


SIGNALR_SKU = ['Basic_DS2']
SIGNALR_SKU = ['Basic_DS2', 'Free_DS2']
SIGNALR_RESOURCE_TYPE = 'Microsoft.SignalRService/SignalR'
SIGNALR_KEY_TYPE = ['primary', 'secondary']
UNIT_COUNT_MAXIMUM = 10
7 changes: 7 additions & 0 deletions src/signalr/azext_signalr/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,16 @@


from azext_signalr.signalr.models import (ResourceSku, SignalRCreateOrUpdateProperties, SignalRCreateParameters)
from ._constants import (
UNIT_COUNT_MAXIMUM
)


def signalr_create(client, signalr_name, resource_group_name, sku, unit_count=1, location=None, tags=None):
if unit_count < 1 or unit_count > UNIT_COUNT_MAXIMUM:
from azure.cli.core.util import CLIError
raise CLIError('Unit count should between 1 and {}'.format(UNIT_COUNT_MAXIMUM))

sku = ResourceSku(name=sku, capacity=unit_count)
properties = SignalRCreateOrUpdateProperties(host_name_prefix=signalr_name)

Expand Down