-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[IoT] az iot hub create : Change default sku to S1 from F1. #12512
Conversation
/azp run |
Commenter does not have sufficient privileges for PR 12512 in repo Azure/azure-cli |
add to S167 |
src/azure-cli/azure/cli/command_modules/iot/tests/latest/test_iot_commands.py
Show resolved
Hide resolved
Hi, @anusapan, Can we add you as code owner of IoT? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
help content LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Ok |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -111,8 +111,8 @@ def load_arguments(self, _): # pylint: disable=too-many-statements | |||
c.argument('hub_name', hub_name_type, options_list=['--name', '-n'], id_part='name') | |||
c.argument('etag', options_list=['--etag', '-e'], help='Entity Tag (etag) of the object.') | |||
c.argument('sku', arg_type=get_enum_type(IotHubSku), | |||
help='Pricing tier for Azure IoT Hub. Default value is F1, which is free. ' | |||
'Note that only one free IoT hub instance is allowed in each ' | |||
help='Pricing tier for Azure IoT Hub. ' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also show up the default value in help message?
Currently you add default value for sku in iot_hub_create
function. To add the default information in help, I will recommend to add default=IotHubSku.s1.value
in argument.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default value is dynamically determined already as part of Knack/cli-core from setting the arg value in the bound function. Before this change, the default value was in the argument description twice. @zhoxing-ms made the same comment earlier, which was resolved with a screenshot from @anusapan showing the default description is there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Knack automatically shows the default value according to
azure-cli/src/azure-cli/azure/cli/command_modules/iot/custom.py
Lines 368 to 369 in 511e5d6
def iot_hub_create(cmd, client, hub_name, resource_group_name, location=None, | |
sku=IotHubSku.s1.value, |
History Notes:
(Fill in the following template if multiple notes are needed, otherwise PR title will be used for history note.)
[Component Name 1] (BREAKING CHANGE:) (az command:) make some customer-facing change.
[Component Name 2] (BREAKING CHANGE:) (az command:) make some customer-facing change.
This checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.