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

appservice: support list publishing profiles #2504

Merged
merged 2 commits into from Mar 14, 2017

Conversation

yugangw-msft
Copy link
Contributor

Fix #2399
This command will convert xml to json so users can user jmespath query to retrieve all they want. For example, az appservice web deployment list-publishing-profiles --query "[?publishMethod=='FTP'].publishUrl" -otsv would return the ftp endpoint

@codecov-io
Copy link

codecov-io commented Mar 14, 2017

Codecov Report

Merging #2504 into master will increase coverage by 0.02%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #2504      +/-   ##
==========================================
+ Coverage   72.45%   72.47%   +0.02%     
==========================================
  Files         362      362              
  Lines       19550    19565      +15     
  Branches     2866     2869       +3     
==========================================
+ Hits        14165    14180      +15     
+ Misses       4474     4472       -2     
- Partials      911      913       +2
Impacted Files Coverage Δ
...ice/azure/cli/command_modules/appservice/custom.py 72.64% <100%> (+0.76%)
...vice/azure/cli/command_modules/appservice/_help.py 100% <100%> (ø)
...e/azure/cli/command_modules/appservice/commands.py 92.18% <100%> (ø)
...dback/azure/cli/command_modules/feedback/custom.py 34.69% <0%> (ø)
src/azure-cli-core/azure/cli/core/_util.py 66.66% <0%> (ø)

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 e4b4a53...74cc44d. Read the comment docs.

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.

The PR looks good. We just need to have a discussion on how we move forward deprecating commands.

cli_command(__name__, 'appservice web deployment list-site-credentials',
'azure.mgmt.web.operations.web_apps_operations#WebAppsOperations.list_publishing_credentials', factory)
cli_command(__name__, 'appservice web deployment list-publishing-profiles',
'azure.cli.command_modules.appservice.custom#list_publish_profiles')
Copy link
Member

Choose a reason for hiding this comment

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

Why are we removing a command (hence the breaking change)?

Copy link
Member

Choose a reason for hiding this comment

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

It seems like this new command returns more things in a better format. Do we need to change the name? We should have a discussion on how to deprecate commands within the CLI. cc/ @johanste

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@tjprescott. Appservice command module is not GA yet, hence no deprecate is reuqired
publish_profiles contains publishing credentials, so there are less reasons to expose both.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also publish_profiles is a very well known terminology, so I suggest we should keep the name

Copy link
Member

Choose a reason for hiding this comment

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

That makes sense. Does it show more information than the old command?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. it is a super set, and particularly, the FTP end points which users are asking about in #2399.

for f in content:
full_xml += f.decode()

profiles = xmltodict.parse(full_xml, xml_attribs=True)['publishData']['publishProfile']
Copy link
Member

Choose a reason for hiding this comment

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

Do you want to check for key errors here or publishData, publishProfile will always exist?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It should always be there. Since I worked on it from Visual Studio Tooling side several years ago, I have never seen the opposite :). So i suggest we keep the assumption. The worst case is we see a bad error and we should figure out why either way at that time.

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.

None yet

6 participants