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

[Deployment Manager] Add az deploymentmanager rollout/service/service-topology/service-unit/step list commands #11757

Merged
merged 17 commits into from
Jan 30, 2020
Merged
Show file tree
Hide file tree
Changes from 7 commits
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
5 changes: 5 additions & 0 deletions src/azure-cli/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
Release History
===============

**Deployment Manager**

* Adds list operation for all resources.
deveshguha marked this conversation as resolved.
Show resolved Hide resolved
* Enhances step resource for new step type.

2.0.79
++++++

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,15 @@
az deploymentmanager artifact-source show -g rg1 -n contosoServiceArtifactSource
"""

helps['deploymentmanager artifact-source list'] = """
type: command
short-summary: List all artifact sources in a resource group.
examples:
- name: Lists artifact sources in the given resource group.
deveshguha marked this conversation as resolved.
Show resolved Hide resolved
text: >
az deploymentmanager artifact-source list -g rg1
"""

helps['deploymentmanager artifact-source update'] = """
type: command
short-summary: Updates an artifact source.
Expand Down Expand Up @@ -85,6 +94,15 @@
az deploymentmanager rollout show -g rg1 -n contosoServiceRollout --retry-attempt 1
"""

helps['deploymentmanager rollout list'] = """
type: command
short-summary: Lists all rollouts in a resource group
examples:
- name: Lists all rollouts in the resource group
deveshguha marked this conversation as resolved.
Show resolved Hide resolved
text: >
az deploymentmanager rollout list -g rg1
"""

helps['deploymentmanager rollout stop'] = """
type: command
short-summary: Stop the rollout.
Expand Down Expand Up @@ -126,6 +144,15 @@
az deploymentmanager service show -g rg1 --service-topology-name contosoServiceTopology -n contosoService1
"""

helps['deploymentmanager service list'] = """
type: command
short-summary: Lists all services in a service topology.
examples:
- name: Lists all the services under the given service topology.
text: >
az deploymentmanager service list -g rg1 --service-topology-name contosoServiceTopology
"""

helps['deploymentmanager service update'] = """
type: command
short-summary: Updates the service.
Expand Down Expand Up @@ -167,6 +194,15 @@
az deploymentmanager service-topology show -g rg1 -n contosoServiceTopology
"""

helps['deploymentmanager service-topology list'] = """
type: command
short-summary: Lists all service topologies in a resource group.
examples:
- name: Lists all the service topologies in the resource group.
text: >
az deploymentmanager service-topology list -g rg1
"""

helps['deploymentmanager service-topology update'] = """
type: command
short-summary: Updates the service topology.
Expand Down Expand Up @@ -217,6 +253,15 @@
az deploymentmanager service-unit show -g rg1 --service-topology-name contosoServiceTopology --service-name contosoService1 -n ContosoService1Storage
"""

helps['deploymentmanager service-unit list'] = """
type: command
short-summary: Lists all service units in a service.
examples:
- name: Lists the service units in the given service topology and service.
text: >
az deploymentmanager service-unit list -g rg1 --service-topology-name contosoServiceTopology --service-name contosoService1
"""

helps['deploymentmanager service-unit update'] = """
type: command
short-summary: Updates the service unit.
Expand All @@ -239,9 +284,12 @@
type: command
short-summary: Creates the step.
examples:
- name: Creates a step.
- name: Creates a wait step.
text: >
az deploymentmanager step create -g rg1 -l location -n contosoServiceWaitStep --duration PT30M
- name: Creates a health check step from a JSON file. The step information is read from the file.
text: >
az deploymentmanager step create -g rg1 --step healthcheck_step.json
"""

helps['deploymentmanager step show'] = """
Expand All @@ -253,6 +301,15 @@
az deploymentmanager step show -g rg1 -n contosoServiceWaitStep
"""

helps['deploymentmanager step list'] = """
type: command
short-summary: List all steps in a resource group.
examples:
- name: List available steps in the given resource group.
text: >
az deploymentmanager step list -g rg1
"""

helps['deploymentmanager step update'] = """
type: command
short-summary: Updates the step.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,24 +119,27 @@ def load_arguments(self, _):

duration_type = CLIArgumentType(options_list='--duration', help='The duration of the wait step in ISO 8601 format.')
step_name_type = CLIArgumentType(options_list=['--step-name', '--name', '-n'], help='The name of the step', completer=get_resource_name_completion_list('Microsoft.DeploymentManager/steps'))
step_type = CLIArgumentType(options_list='--step', help='The step object')
deveshguha marked this conversation as resolved.
Show resolved Hide resolved

with self.argument_context('deploymentmanager step') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('location', get_location_type(self.cli_ctx), required=True)
c.argument('location', get_location_type(self.cli_ctx))
c.argument('step_name', step_name_type)
c.argument('duration', duration_type)
c.argument('tags', tags_type)

with self.argument_context('deploymentmanager step create') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('location', get_location_type(self.cli_ctx), required=True)
c.argument('location', get_location_type(self.cli_ctx))
c.argument('step_name', step_name_type)
c.argument('step', step_type)
c.argument('duration', duration_type)
c.argument('tags', tags_type)

with self.argument_context('deploymentmanager step update') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('step_name', step_name_type)
c.argument('step', step_type)
c.argument('duration', duration_type)
c.argument('tags', tags_type)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def load_command_table(self, _):
g.custom_command('create', 'cli_artifact_source_create')
g.command('delete', 'delete', confirmation="There might be rollouts referencing the artifact source. Do you want to delete?")
g.command('show', 'get')
g.custom_command('list', 'cli_artifact_sources_list')
g.generic_update_command(
'update',
setter_arg_name='artifact_source_info',
Expand All @@ -51,6 +52,7 @@ def load_command_table(self, _):
g.custom_command('create', 'cli_service_topology_create')
g.command('delete', 'delete')
g.command('show', 'get')
g.custom_command('list', 'cli_service_topologies_list')
g.generic_update_command(
'update',
setter_arg_name='service_topology_info',
Expand All @@ -61,6 +63,7 @@ def load_command_table(self, _):
g.custom_command('create', 'cli_service_create')
g.command('delete', 'delete')
g.command('show', 'get')
g.custom_command('list', 'cli_services_list')
g.generic_update_command(
'update',
setter_arg_name='service_info',
Expand All @@ -71,6 +74,7 @@ def load_command_table(self, _):
g.custom_command('create', 'cli_service_unit_create')
g.command('delete', 'delete')
g.command('show', 'get')
g.custom_command('list', 'cli_service_units_list')
g.generic_update_command(
'update',
setter_arg_name='service_unit_info',
Expand All @@ -81,6 +85,7 @@ def load_command_table(self, _):
g.custom_command('create', 'cli_step_create')
g.command('delete', 'delete')
g.command('show', 'get')
g.custom_command('list', 'cli_steps_list')
g.generic_update_command(
'update',
setter_arg_name='step_info',
Expand All @@ -89,6 +94,7 @@ def load_command_table(self, _):

with self.command_group('deploymentmanager rollout', rollouts) as g:
g.command('show', 'get')
g.custom_command('list', 'cli_rollouts_list')
g.command('stop', 'cancel', confirmation="Do you want to cancel the rollout?")
g.custom_command(
'restart',
Expand Down
Loading