Skip to content
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

Merged
merged 3 commits into from
Mar 20, 2020

Conversation

anusapan
Copy link
Contributor

@anusapan anusapan commented Mar 9, 2020

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.

@anusapan
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 12512 in repo Azure/azure-cli

@yonzhan yonzhan requested review from zhoxing-ms and qianwens March 12, 2020 01:24
@yonzhan yonzhan assigned zhoxing-ms and unassigned Juliehzl Mar 12, 2020
@yonzhan yonzhan added this to the S167 milestone Mar 12, 2020
@yonzhan
Copy link
Collaborator

yonzhan commented Mar 12, 2020

add to S167

@anusapan anusapan changed the title [Iot] Set default Sku to S1 for hub create [IoT] az iot hub create : Change default sku to S1 from F1. Mar 12, 2020
@haroldrandom
Copy link
Contributor

Hi, @anusapan, Can we add you as code owner of IoT?

Copy link
Contributor

@haroldrandom haroldrandom left a comment

Choose a reason for hiding this comment

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

help content LGTM

@zhoxing-ms zhoxing-ms self-requested a review March 13, 2020 12:32
Copy link
Contributor

@zhoxing-ms zhoxing-ms left a comment

Choose a reason for hiding this comment

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

LGTM

@anusapan
Copy link
Contributor Author

Hi, @anusapan, Can we add you as code owner of IoT?

Ok

@haroldrandom
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link

@ericmitt ericmitt left a 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. '
Copy link
Contributor

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.

Copy link
Member

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.

Copy link
Member

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

def iot_hub_create(cmd, client, hub_name, resource_group_name, location=None,
sku=IotHubSku.s1.value,

@Juliehzl Juliehzl merged commit 8e1a9c1 into Azure:dev Mar 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants