Skip to content
Merged
Changes from 1 commit
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
9 changes: 4 additions & 5 deletions src/webpubsub/azext_webpubsub/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
from ._validator import validate_network_rule

WEBPUBSUB_KEY_TYPE = ['primary', 'secondary', 'salt']
SKU_TYPE = ['Standard_S1', 'Free_F1']
PERMISSION_TYPE = ['joinLeaveGroup', 'sendToGroup']


Expand All @@ -33,12 +32,12 @@ def load_arguments(self, _):
c.argument('webpubsub_name', webpubsub_name_type, options_list=['--name', '-n'])

with self.argument_context('webpubsub create') as c:
c.argument('sku', arg_type=get_enum_type(SKU_TYPE), help='The sku name of the signalr service.')
c.argument('unit_count', help='The number of signalr service unit count', type=int)
c.argument('sku', help='The sku name of the webpubsub service. E.g. Standard_S1')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why diable the choice options of sku argument?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We have SKUs that are internal only. Curretly we don't hope customers outside Microsoft to see those SKUs as they are not allowed to create them. But we hope az cli is available for our internal customers. So we need to remove this restriction from client side and leave it to server side.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The sku parameter is required for az webpubsub create. Did you mean the customers outside Microsoft are not supposed to run the create command?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think we can put all sku available for public in help. But as it's a server-side parameter, I think it doesn't make sense to make restrictions in cli side. We can pass sku parameter to RP side for checking.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we can put all sku available for public in help. But as it's a server-side parameter, I think it doesn't make sense to make restrictions in cli side. We can pass sku parameter to RP side for checking.

I totally agree

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed

c.argument('unit_count', help='The number of webpubsub service unit count', type=int)

with self.argument_context('webpubsub update') as c:
c.argument('sku', arg_type=get_enum_type(SKU_TYPE), help='The sku name of the signalr service.')
c.argument('unit_count', help='The number of signalr service unit count', type=int)
c.argument('sku', help='The sku name of the webpubsub service. E.g. Standard_S1')
c.argument('unit_count', help='The number of webpubsub service unit count', type=int)

with self.argument_context('webpubsub key regenerate') as c:
c.argument('key_type', arg_type=get_enum_type(WEBPUBSUB_KEY_TYPE), help='The name of access key to regenerate')
Expand Down