Skip to content

Conversation

yugangw-msft
Copy link
Contributor

Integrate from functionapp branch

General Guidelines

  • The PR has modified HISTORY.rst with an appropriate description of the change (see Modifying change log).

Command Guidelines

  • Each command and parameter has a meaningful description.
  • Each new command has a test.

(see Authoring Command Modules)

@yugangw-msft yugangw-msft changed the title FunctionApp: basic operations () FunctionApp: basic operations May 2, 2017
@codecov-io
Copy link

codecov-io commented May 3, 2017

Codecov Report

Merging #3146 into master will increase coverage by 0.1%.
The diff coverage is 92.61%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
...e/azure/cli/command_modules/appservice/commands.py 91.51% <100%> (+1.88%) ⬆️
...vice/azure/cli/command_modules/appservice/_help.py 100% <100%> (ø) ⬆️
...ce/azure/cli/command_modules/appservice/_params.py 97.16% <100%> (+0.26%) ⬆️
...ice/azure/cli/command_modules/appservice/custom.py 73.74% <73.01%> (-0.22%) ⬇️
...zure/cli/command_modules/appservice/_validators.py 75% <75%> (ø)
...ure-cli-vm/azure/cli/command_modules/vm/_params.py 96.19% <0%> (ø) ⬆️
.../azure/cli/command_modules/vm/_template_builder.py 77.08% <0%> (+0.24%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c4b065f...9948225. Read the comment docs.

@yugangw-msft yugangw-msft requested a review from derekbekoe May 3, 2017 01:30
Copy link
Member

@tjprescott tjprescott left a 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
Copy link
Member

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.
Copy link
Member

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')
Copy link
Member

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') 

Copy link
Member

@derekbekoe derekbekoe left a 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
Copy link
Member

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?

Copy link
Contributor Author

@yugangw-msft yugangw-msft May 3, 2017

Choose a reason for hiding this comment

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

@twitchax @aspaan. If functionapp is available in other cloud env, we must fix this. Please follow up in your PR to submit today

Copy link
Contributor

Choose a reason for hiding this comment

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

@yugangw-msft yugangw-msft merged commit eb1b219 into Azure:master May 3, 2017
@yugangw-msft yugangw-msft deleted the functionapp branch June 12, 2017 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants