-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[netappfiles] az volume replication: Modified volume create to allow data protection volumes and added replication operations #12173
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
Changes from all commits
2c1da39
2302895
b9e59a1
e3cba85
9db5879
cbeb514
87d2428
5e5420e
300a257
c9e3d88
8b90720
0b20496
f18fe1b
dd9326d
be870b6
4ede7e1
6527678
cccc3bc
191d621
74f943b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -337,7 +337,15 @@ | |
| - name: --subnet | ||
| short-summary: The ARM Id or name of the subnet for the vnet. If omitted 'default' will be used | ||
| - name: --protocol-types | ||
| short-summary: Space seperated list of protocols that the volume can use | ||
| short-summary: Space seperated list of protocols that the volume can use, available protocols are "NFSv4.1", "NFSv3", "CIFS" | ||
| - name: --volume-type | ||
| short-summary: Whether the volume should be a data protection volume ("DataProtection"), empty if this is not a data protection volume | ||
| - name: --endpoint-type | ||
| short-summary: Whether the volume is source ("src") or destination ("dst") | ||
| - name: --remote-volume-resource-id | ||
| short-summary: The volume id of the remote volume of the replication (the destination for "src" volume endpoints and the source for "dst" endpoints) | ||
| - name: --replication-schedule | ||
| short-summary: The replication schedule, e.g. "_10minutely, hourly, daily, weekly, monthly" | ||
| - name: --tags | ||
| short-summary: Space-separated tags in `key[=value]` format | ||
| examples: | ||
|
|
@@ -362,6 +370,93 @@ | |
| az netappfiles volume delete -g mygroup --account-name myaccname --pool-name mypoolname --name myvolname | ||
| """ | ||
|
|
||
| helps['netappfiles volume replication'] = """ | ||
| type: group | ||
| short-summary: Manage Azure NetApp Files (ANF) Volume replication operations. | ||
| """ | ||
|
|
||
| helps['netappfiles volume replication approve'] = """ | ||
| type: command | ||
| short-summary: Authorize a volume as a replication destination for a specified source. | ||
| parameters: | ||
| - name: --account-name -a | ||
| short-summary: The name of the ANF account | ||
| - name: --pool-name -p | ||
| short-summary: The name of the ANF pool | ||
| - name: --name --volume-name -n -v | ||
| short-summary: The name of the replication source volume | ||
| - name: --remote-volume-resource-id -d | ||
| short-summary: The resource id of the destination replication volume | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we both support destination volume name and resource id here?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The remote-volume-resource-id parameter expects the resource id. |
||
| examples: | ||
| - name: Authorize the volume as the replication destination for the source | ||
| text: > | ||
| az netappfiles volume replication approve -g mygroup --account-name myaccname --pool-name mypoolname --name mysourcevolname --remote-volume-resource-id /subscriptions/69a75bda-882e-44d5-8431-63421204131c/resourceGroups/mygroup1/providers/Microsoft.NetApp/netAppAccounts/myaccount1/capacityPools/mypool1/volumes/mydestinationvolume | ||
| """ | ||
|
|
||
| helps['netappfiles volume replication suspend'] = """ | ||
| type: command | ||
| short-summary: Suspend/break a volume replication for the specified destination volume. The replication process is suspended until resumed or deleted. | ||
| parameters: | ||
| - name: --account-name -a | ||
| short-summary: The name of the ANF account | ||
| - name: --pool-name -p | ||
| short-summary: The name of the ANF pool | ||
| - name: --name --volume-name -n -v | ||
| short-summary: The name of the replication destination volume | ||
| examples: | ||
| - name: Suspend the replication process | ||
| text: > | ||
| az netappfiles volume replication suspend -g mygroup --account-name myaccname --pool-name mypoolname --name mydestinationvolname | ||
| """ | ||
|
|
||
| helps['netappfiles volume replication resume'] = """ | ||
| type: command | ||
| short-summary: Resync a volume replication for the specified destination volume. The replication process is resumed from source to destination. | ||
| parameters: | ||
| - name: --account-name -a | ||
| short-summary: The name of the ANF account | ||
| - name: --pool-name -p | ||
| short-summary: The name of the ANF pool | ||
| - name: --name --volume-name -n -v | ||
| short-summary: The name of the replication destination volume | ||
| examples: | ||
| - name: Resume the replication process | ||
| text: > | ||
| az netappfiles volume replication resume -g mygroup --account-name myaccname --pool-name mypoolname --name mydestinationvolname | ||
| """ | ||
|
|
||
| helps['netappfiles volume replication remove'] = """ | ||
| type: command | ||
| short-summary: Delete a volume replication for the specified destination volume. The data replication objects of source and destination volumes will be removed. | ||
| parameters: | ||
| - name: --account-name -a | ||
| short-summary: The name of the ANF account | ||
| - name: --pool-name -p | ||
| short-summary: The name of the ANF pool | ||
| - name: --name --volume-name -n -v | ||
| short-summary: The name of the replication destination volume | ||
| examples: | ||
| - name: Delete the replication objects of the paired volumes | ||
| text: > | ||
| az netappfiles volume replication remove -g mygroup --account-name myaccname --pool-name mypoolname --name mydestinationvolname | ||
| """ | ||
|
|
||
| helps['netappfiles volume replication status'] = """ | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What about changing to show command?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I suggest we do this change for next version/update that will come very soon. |
||
| type: command | ||
| short-summary: Get the replication status for the specified replication volume. | ||
| parameters: | ||
| - name: --account-name -a | ||
| short-summary: The name of the ANF account | ||
| - name: --pool-name -p | ||
| short-summary: The name of the ANF pool | ||
| - name: --name --volume-name -n -v | ||
| short-summary: The name of the replication destination volume | ||
| examples: | ||
| - name: Get the replication status for the volume. Returns whether the replication is healthy, the replication schedule and the mirror state (whether replication is suspened/broken or synced/mirrored) | ||
| text: > | ||
| az netappfiles volume replication status -g mygroup --account-name myaccname --pool-name mypoolname --name mydestinationvolname | ||
| """ | ||
|
|
||
| helps['netappfiles volume export-policy'] = """ | ||
| type: group | ||
| short-summary: Manage Azure NetApp Files (ANF) Volume export policies. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -126,6 +126,16 @@ def load_command_table(self, _): | |
| doc_string_source='azure.mgmt.netapp.models#VolumePatch', | ||
| exception_handler=netappfiles_exception_handler) | ||
|
|
||
| with self.command_group('netappfiles volume replication', netappfiles_volumes_sdk) as g: | ||
| g.custom_command('approve', 'authorize_replication', | ||
| client_factory=volumes_mgmt_client_factory, | ||
| doc_string_source='azure.mgmt.netapp.models#Volume', | ||
| exception_handler=netappfiles_exception_handler) | ||
| g.command('suspend', 'break_replication') | ||
| g.command('resume', 'resync_replication') | ||
| g.command('remove', 'delete_replication') | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what about changing to
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unless I am misunderstanding I am not sure show is appropriate here this is a custom command that performs an action on approves/authorize the replication connection on the source volume. |
||
| g.command('status', 'replication_status_method') | ||
|
|
||
| with self.command_group('netappfiles', netappfiles_mount_targets_sdk) as g: | ||
| g.command('list-mount-targets', 'list') | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use get_enum_type() for allowed values?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest we do this change for next version/update that will come very soon.