Skip to content

Commit 871d9b4

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

File tree

13 files changed

+53
-53
lines changed

13 files changed

+53
-53
lines changed

src/azure-changesafety/README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,20 @@ az extension add --name azure-changesafety
1010

1111
## Commands
1212
```bash
13-
az changesafety changestate create # Create a ChangeState definition for one or more targets.
14-
az changesafety changestate update # Update metadata, rollout configuration, or target definitions.
15-
az changesafety changestate delete # Delete a ChangeState resource.
16-
az changesafety changestate show # Display details for a ChangeState resource.
13+
az changesafety changerecord create # Create a ChangeState definition for one or more targets.
14+
az changesafety changerecord update # Update metadata, rollout configuration, or target definitions.
15+
az changesafety changerecord delete # Delete a ChangeState resource.
16+
az changesafety changerecord show # Display details for a ChangeState resource.
1717
```
1818

19-
Run `az changesafety changestate -h` to see full parameter details and examples.
19+
Run `az changesafety changerecord -h` to see full parameter details and examples.
2020

2121
## Examples
2222
Create a ChangeState describing a web app rollout:
2323
```bash
24-
az changesafety changestate create \
24+
az changesafety changerecord create \
2525
-g MyResourceGroup \
26-
-n webAppRollout01 \
26+
-n changerecord-webapp-rollout \
2727
--change-type AppDeployment \
2828
--rollout-type Normal \
2929
--targets "resourceId=/subscriptions/<subId>/resourceGroups/MyResourceGroup/providers/Microsoft.Web/sites/myApp,operation=create" \
@@ -32,18 +32,18 @@ az changesafety changestate create \
3232

3333
Update the rollout type and add a comment:
3434
```bash
35-
az changesafety changestate update \
35+
az changesafety changerecord update \
3636
-g MyResourceGroup \
37-
-n webAppRollout01 \
37+
-n changerecord-webapp-rollout \
3838
--rollout-type Emergency \
3939
--comments "Escalated due to customer impact"
4040
```
4141

4242
Delete a ChangeState:
4343
```bash
44-
az changesafety changestate delete -g MyResourceGroup -n webAppRollout01 --yes
44+
az changesafety changerecord delete -g MyResourceGroup -n changerecord-webapp-rollout --yes
4545
```
4646

4747
## Additional Information
48-
- View command documentation: `az changesafety changestate -h`
48+
- View command documentation: `az changesafety changerecord -h`
4949
- Remove the extension when no longer needed: `az extension remove --name azure-changesafety`

src/azure-changesafety/azext_changesafety/_help.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@
1515
short-summary: Manage Change Safety resources.
1616
"""
1717

18-
helps['changesafety changestate'] = """
18+
helps['changesafety changerecord'] = """
1919
type: group
2020
short-summary: Manage ChangeState resources that describe planned changes across targets.
2121
"""
2222

23-
helps['changesafety changestate create'] = """
23+
helps['changesafety changerecord create'] = """
2424
type: command
2525
short-summary: Create a ChangeState resource.
2626
long-summary: >
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`. If you omit scheduling flags, the anticipated start time defaults
30+
`az changesafety changerecord`. If you omit scheduling flags, the anticipated start time defaults
3131
to now and the anticipated end time defaults to eight hours later (UTC).
3232
parameters:
3333
- name: --targets
@@ -51,26 +51,26 @@
5151
examples:
5252
- name: Create with StageMap reference and status link
5353
text: |-
54-
az changesafety changestate create -g MyResourceGroup -n changestate002 --change-type ManualTouch --rollout-type Normal --stage-map "{resource-id:/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup/providers/Microsoft.ChangeSafety/stageMaps/rolloutStageMap}" --targets "resourceId=/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup/providers/Microsoft.Compute/virtualMachines/myVm,operation=PATCH" --links "[{name:status,uri:'https://contoso.com/change/rollout-002'}]"
55-
az changesafety changestate delete -g MyResourceGroup -n changestate002 --yes
54+
az changesafety changerecord create -g MyResourceGroup -n changerecord002 --change-type ManualTouch --rollout-type Normal --stage-map "{resource-id:/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup/providers/Microsoft.ChangeSafety/stageMaps/rolloutStageMap}" --targets "resourceId=/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup/providers/Microsoft.Compute/virtualMachines/myVm,operation=PATCH" --links "[{name:status,uri:'https://contoso.com/change/rollout-002'}]"
55+
az changesafety changerecord delete -g MyResourceGroup -n changerecord002 --yes
5656
- name: Create a change state for a VM rollout
5757
text: |-
58-
az changesafety changestate create -g MyResourceGroup -n changestate001 --change-type AppDeployment --rollout-type Normal --targets "resourceId=/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup/providers/Microsoft.Compute/virtualMachines/myVm,operation=PUT"
58+
az changesafety changerecord create -g MyResourceGroup -n changerecord001 --change-type AppDeployment --rollout-type Normal --targets "resourceId=/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup/providers/Microsoft.Compute/virtualMachines/myVm,operation=PUT"
5959
- name: Create with staging rollout configuration
6060
text: |-
61-
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"
61+
az changesafety changerecord create -g MyResourceGroup -n changerecord-ops01 --rollout-type Hotfix --targets "resourceId=/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup/providers/Microsoft.Web/sites/myApp,operation=POST"
6262
- name: Reference a StageMap by name
6363
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"
64+
az changesafety changerecord create -g MyResourceGroup -n changerecord003 --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"
6565
"""
6666

67-
helps['changesafety changestate update'] = """
67+
helps['changesafety changerecord update'] = """
6868
type: command
6969
short-summary: Update an existing ChangeState resource.
7070
long-summary: >
7171
Use this command to modify descriptive metadata, rollout settings, or replace targets for an
7272
existing ChangeState. When you pass --targets, the supplied definitions overwrite the previous set.
73-
This command is also available through the alias `az change-safety change-state`.
73+
This command is also available through the alias `az change-safety change-record`.
7474
parameters:
7575
- name: --targets
7676
short-summary: >
@@ -89,29 +89,29 @@
8989
examples:
9090
- name: Adjust rollout type and add a comment
9191
text: |-
92-
az changesafety changestate update -g MyResourceGroup -n changestate001 --rollout-type Emergency --comments "Escalated to emergency rollout"
92+
az changesafety changerecord update -g MyResourceGroup -n changerecord001 --rollout-type Emergency --comments "Escalated to emergency rollout"
9393
- name: Update scheduling window
9494
text: |-
95-
az changesafety changestate update -g MyResourceGroup -n changestate001 --anticipated-start-time "2024-09-01T08:00:00Z" --anticipated-end-time "2024-09-01T12:00:00Z"
95+
az changesafety changerecord update -g MyResourceGroup -n changerecord001 --anticipated-start-time "2024-09-01T08:00:00Z" --anticipated-end-time "2024-09-01T12:00:00Z"
9696
- name: Replace the target definition
9797
text: |-
98-
az changesafety changestate update -g MyResourceGroup -n changestate001 --targets "resourceId=/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup/providers/Microsoft.Sql/servers/myServer,operation=PATCH"
98+
az changesafety changerecord update -g MyResourceGroup -n changerecord001 --targets "resourceId=/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup/providers/Microsoft.Sql/servers/myServer,operation=PATCH"
9999
"""
100100

101-
helps['changesafety changestate delete'] = """
101+
helps['changesafety changerecord delete'] = """
102102
type: command
103103
short-summary: Delete a ChangeState resource.
104104
examples:
105105
- name: Delete a change state without confirmation
106106
text: |-
107-
az changesafety changestate delete -g MyResourceGroup -n changestate001 --yes
107+
az changesafety changerecord delete -g MyResourceGroup -n changerecord001 --yes
108108
"""
109109

110-
helps['changesafety changestate show'] = """
110+
helps['changesafety changerecord show'] = """
111111
type: command
112112
short-summary: Show details for a ChangeState resource.
113113
examples:
114114
- name: Show a change state
115115
text: |-
116-
az changesafety changestate show -g MyResourceGroup -n changestate001
116+
az changesafety changerecord show -g MyResourceGroup -n changerecord001
117117
"""

src/azure-changesafety/azext_changesafety/aaz/latest/change_safety/change_state/_create.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def _build_arguments_schema(cls, *args, **kwargs):
4343

4444
_args_schema = cls._args_schema
4545
_args_schema.change_state_name = AAZStrArg(
46-
options=["-n", "--name", "--change-state-name"],
46+
options=["-n", "--name", "--change-record-name"],
4747
help="The name of the ChangeState resource.",
4848
required=True,
4949
fmt=AAZStrArgFormat(

src/azure-changesafety/azext_changesafety/aaz/latest/change_safety/change_state/_delete.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def _build_arguments_schema(cls, *args, **kwargs):
4343

4444
_args_schema = cls._args_schema
4545
_args_schema.change_state_name = AAZStrArg(
46-
options=["-n", "--name", "--change-state-name"],
46+
options=["-n", "--name", "--change-record-name"],
4747
help="The name of the ChangeState resource.",
4848
required=True,
4949
id_part="name",

src/azure-changesafety/azext_changesafety/aaz/latest/change_safety/change_state/_show.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def _build_arguments_schema(cls, *args, **kwargs):
4343

4444
_args_schema = cls._args_schema
4545
_args_schema.change_state_name = AAZStrArg(
46-
options=["-n", "--name", "--change-state-name"],
46+
options=["-n", "--name", "--change-record-name"],
4747
help="The name of the ChangeState resource.",
4848
required=True,
4949
id_part="name",

src/azure-changesafety/azext_changesafety/aaz/latest/change_safety/change_state/_update.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def _build_arguments_schema(cls, *args, **kwargs):
4545

4646
_args_schema = cls._args_schema
4747
_args_schema.change_state_name = AAZStrArg(
48-
options=["-n", "--name", "--change-state-name"],
48+
options=["-n", "--name", "--change-record-name"],
4949
help="The name of the ChangeState resource.",
5050
required=True,
5151
id_part="name",

src/azure-changesafety/azext_changesafety/aaz/latest/change_safety/stage_progression/_create.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def _build_arguments_schema(cls, *args, **kwargs):
4343

4444
_args_schema = cls._args_schema
4545
_args_schema.change_state_name = AAZStrArg(
46-
options=["--change-state-name"],
46+
options=["--change-record-name"],
4747
help="The name of the ChangeState resource.",
4848
required=True,
4949
fmt=AAZStrArgFormat(

src/azure-changesafety/azext_changesafety/aaz/latest/change_safety/stage_progression/_delete.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def _build_arguments_schema(cls, *args, **kwargs):
4444

4545
_args_schema = cls._args_schema
4646
_args_schema.change_state_name = AAZStrArg(
47-
options=["--change-state-name"],
47+
options=["--change-record-name"],
4848
help="The name of the ChangeState resource.",
4949
required=True,
5050
id_part="name",

src/azure-changesafety/azext_changesafety/aaz/latest/change_safety/stage_progression/_show.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def _build_arguments_schema(cls, *args, **kwargs):
4343

4444
_args_schema = cls._args_schema
4545
_args_schema.change_state_name = AAZStrArg(
46-
options=["--change-state-name"],
46+
options=["--change-record-name"],
4747
help="The name of the ChangeState resource.",
4848
required=True,
4949
id_part="name",

src/azure-changesafety/azext_changesafety/aaz/latest/change_safety/stage_progression/_update.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def _build_arguments_schema(cls, *args, **kwargs):
4545

4646
_args_schema = cls._args_schema
4747
_args_schema.change_state_name = AAZStrArg(
48-
options=["--change-state-name"],
48+
options=["--change-record-name"],
4949
help="The name of the ChangeState resource.",
5050
required=True,
5151
id_part="name",

0 commit comments

Comments
 (0)