Skip to content

Commit aa3b9bd

Browse files
author
Henry Dai
committed
Merge remote-tracking branch 'other-repo/henrydai/ImplementCRUDforChangeState' into henrydai/implementChangeStateCRUD0901
2 parents 6c8d92c + ee776c6 commit aa3b9bd

File tree

15 files changed

+4884
-11
lines changed

15 files changed

+4884
-11
lines changed

src/azure-changesafety/azext_changesafety/_help.py

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,23 @@
2727
Provide at least one target definition to describe which resources or operations the ChangeState
2828
will affect. Targets are expressed as comma or semicolon separated key=value pairs such as
2929
resourceId=RESOURCE_ID,operation=DELETE. The command is also available through the alias
30-
`az change-safety change-state`.
30+
`az change-safety change-state`. If you omit scheduling flags, the anticipated start time defaults
31+
to now and the anticipated end time defaults to eight hours later (UTC).
3132
parameters:
3233
- name: --targets
3334
short-summary: >
3435
One or more target definitions expressed as key=value pairs (for example
3536
resourceId=RESOURCE_ID,operation=CREATE,resourceType=Microsoft.Compute/virtualMachines).
37+
- name: --anticipated-start-time
38+
short-summary: Expected start time in ISO 8601 format. Defaults to current UTC time when omitted.
39+
- name: --anticipated-end-time
40+
short-summary: Expected completion time in ISO 8601 format. Defaults to eight hours after the anticipated start time when omitted.
3641
- name: --change-type
3742
short-summary: Classify the change such as AppDeployment, Config, ManualTouch, or PolicyDeployment.
3843
- name: --rollout-type
3944
short-summary: Specify the rollout urgency (Normal, Hotfix, or Emergency).
45+
- name: --stage-map-name --stagemap-name
46+
short-summary: StageMap name in the current subscription scope; the resource ID is built for you.
4047
- name: --stage-map
4148
short-summary: Reference an existing StageMap resource using resource-id=RESOURCE_ID and optional parameters key=value pairs.
4249
- name: --links
@@ -52,6 +59,9 @@
5259
- name: Create with staging rollout configuration
5360
text: |-
5461
az changesafety changestate create -g MyResourceGroup -n opsChange01 --rollout-type Hotfix --targets "resourceId=/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup/providers/Microsoft.Web/sites/myApp,operation=POST"
62+
- name: Reference a StageMap by name
63+
text: |-
64+
az changesafety changestate create -g MyResourceGroup -n changestate003 --change-type ManualTouch --rollout-type Normal --stagemap-name rolloutStageMap --targets "resourceId=/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup/providers/Microsoft.Compute/virtualMachines/myVm,operation=DELETE"
5565
"""
5666

5767
helps['changesafety changestate update'] = """
@@ -66,12 +76,16 @@
6676
short-summary: >
6777
Optional target definitions to replace the existing list. Provide key=value pairs such as
6878
resourceId=RESOURCE_ID,operation=DELETE.
79+
- name: --stage-map-name --stagemap-name
80+
short-summary: StageMap name in the current subscription scope; the resource ID is built for you.
81+
- name: --stage-map
82+
short-summary: Reference an existing StageMap resource using resource-id=RESOURCE_ID and optional parameters key=value pairs.
6983
- name: --comments
7084
short-summary: Provide notes about the latest update to the change state.
7185
- name: --anticipated-start-time
72-
short-summary: Update the expected start time in ISO 8601 format.
86+
short-summary: Update the expected start time in ISO 8601 format. If omitted, the current value is preserved.
7387
- name: --anticipated-end-time
74-
short-summary: Update the expected completion time in ISO 8601 format.
88+
short-summary: Update the expected completion time in ISO 8601 format. If omitted, the current value is preserved.
7589
examples:
7690
- name: Adjust rollout type and add a comment
7791
text: |-
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# --------------------------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
#
5+
# Code generated by aaz-dev-tools
6+
# --------------------------------------------------------------------------------------------
7+
8+
# pylint: skip-file
9+
# flake8: noqa
10+
11+
from azure.cli.core.aaz import *
12+
13+
14+
@register_command_group(
15+
"changesafety stagemap",
16+
)
17+
class __CMDGroup(AAZCommandGroup):
18+
"""Manage Stage Map
19+
"""
20+
pass
21+
22+
23+
__all__ = ["__CMDGroup"]
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# --------------------------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
#
5+
# Code generated by aaz-dev-tools
6+
# --------------------------------------------------------------------------------------------
7+
8+
# pylint: skip-file
9+
# flake8: noqa
10+
11+
from .__cmd_group import *
12+
from ._create import *
13+
from ._delete import *
14+
from ._show import *
15+
from ._update import *

0 commit comments

Comments
 (0)