-
Notifications
You must be signed in to change notification settings - Fork 3.2k
FunctionApp: basic operations #3146
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3146 +/- ##
=========================================
+ Coverage 70.57% 70.67% +0.1%
=========================================
Files 369 370 +1
Lines 23905 24058 +153
Branches 3657 3673 +16
=========================================
+ Hits 16870 17003 +133
- Misses 5959 5970 +11
- Partials 1076 1085 +9
Continue to review full report at Codecov.
|
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.
A couple help text and code style recommendations but otherwise LGTM.
-g MyResourceGroup | ||
-p MyPlan | ||
-n MyUniqueApp | ||
-s MyStorageAccount |
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.
Does this actually print on multiple lines? If so, why is this not a single line?
|
||
helps['functionapp config appsettings set'] = """ | ||
type: command | ||
short-summary: Create or update function app settings. |
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.
Recommend "modify" instead of "create or update"
@@ -185,3 +185,34 @@ def _polish_bad_errors(ex): | |||
custom_function_op='azure.cli.command_modules.appservice.custom#update_app_service_plan', | |||
setter_arg_name='app_service_plan', factory=cf_plans) | |||
cli_command(__name__, 'appservice list-locations', 'azure.mgmt.web.web_site_management_client#WebSiteManagementClient.list_geo_regions', cf_web_client, transform=transform_list_location_output) | |||
|
|||
cli_command(__name__, 'functionapp create', 'azure.cli.command_modules.appservice.custom#create_function') |
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.
Recommend abstracting the string into a variable for clarity:
custom_path = 'azure.cli.command_modules.appservice.custom#'
cli_command(__name__, 'functionapp create', custom_path + 'create_function')
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.
Added one thing to consider but LGTM
raise CLIError(error_message) | ||
|
||
keys = storage_client.storage_accounts.list_keys(resource_group_name, storage_account).keys | ||
conn_string = 'DefaultEndpointsProtocol=https;AccountName={};AccountKey={}'.format(storage_account, keys[0].value) # pylint: disable=line-too-long |
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.
This connection string doesn't include EndpointSuffix=core.windows.net;
where the suffix is cloud dependent.
Are you okay with this?
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.
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.
Please take a look our connection string generated command's implementation: https://github.com/Azure/azure-cli/blob/master/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/custom.py#L149
Integrate from functionapp branch
General Guidelines
Command Guidelines
(see Authoring Command Modules)