Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added test case and addressed review comments
  • Loading branch information
Kotasudhakarreddy committed Feb 4, 2021
commit f1d87c33319e4265537d5f3e7f359836bed34df9
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ def load_arguments(self, _):
local_context_attribute=LocalContextAttribute(name='subnet_name', actions=[LocalContextAction.GET]))

with self.argument_context('webapp deploy') as c:
c.argument('name', options_list=['--name'], help='Name of the webapp to connect to')
c.argument('name', options_list=['--name', '-n'], help='Name of the webapp to connect to')
c.argument('src_path', options_list=['--src-path'], help='Path of the file to be deployed. Example: /mnt/apps/myapp.war')
c.argument('src_url', options_list=['--src-url'], help='url to download the package from. Example: http://mysite.com/files/myapp.war?key=123')
c.argument('target_path', options_list=['--target-path'], help='Target path relative to wwwroot to which the file will be deployed to.')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def load_command_table(self, _):
g.custom_show_command('identity show', 'show_identity', validator=validate_app_or_slot_exists_in_rg)
g.custom_command('identity remove', 'remove_identity', validator=validate_app_or_slot_exists_in_rg)
g.custom_command('create-remote-connection', 'create_tunnel', exception_handler=ex_handler_factory())
g.custom_command('deploy', 'perform_onedeploy', validator=validate_onedeploy_params)
g.custom_command('deploy', 'perform_onedeploy', validator=validate_onedeploy_params, is_preview=True)
g.generic_update_command('update', getter_name='get_webapp', setter_name='set_webapp', custom_func_name='update_webapp', command_type=appservice_custom)

with self.command_group('webapp traffic-routing') as g:
Expand Down Expand Up @@ -306,6 +306,7 @@ def load_command_table(self, _):
g.custom_command('identity assign', 'assign_identity')
g.custom_show_command('identity show', 'show_identity')
g.custom_command('identity remove', 'remove_identity')
g.custom_command('deploy', 'perform_onedeploy', validator=validate_onedeploy_params, is_preview=True)
g.generic_update_command('update', setter_name='set_functionapp', exception_handler=update_function_ex_handler_factory(),
custom_func_name='update_functionapp', setter_type=appservice_custom, command_type=webapp_sdk)

Expand Down
10 changes: 5 additions & 5 deletions src/azure-cli/azure/cli/command_modules/appservice/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -4154,10 +4154,10 @@ def _make_onedeploy_request(params):
response_body = _check_zip_deployment_status(params.cmd, params.resource_group_name, params.webapp_name,
deployment_status_url, headers, params.timeout)
logger.info('Async deployment complete. Server response: %s', response_body)
return
return response_body

if response.status_code == 200:
return
return response

# API not available yet!
if response.status_code == 404:
Expand All @@ -4182,9 +4182,9 @@ def _perform_onedeploy_internal(params):

# Now make the OneDeploy API call
logger.info("Initiating deployment")
_make_onedeploy_request(params)

return logger.info("Deployment has completed successfully")
response = _make_onedeploy_request(params)
logger.info("Deployment has completed successfully")
return response


def _wait_for_webapp(tunnel_server):
Expand Down
Loading