-
Notifications
You must be signed in to change notification settings - Fork 3.5k
[Compute] Add disk-encryption-set command group #11411
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 3 commits
b3dd271
c31aa1e
a896a9c
e57acd7
3d60130
aa5609a
1ca3217
05ffe73
904867a
052760a
33bb4ab
cd37d4f
94e9803
bef85d0
a4812cc
9a2e1de
e6ade7b
09d1ed2
e18fa58
511125e
c8b3cfd
bd24968
328f8ae
11d7a25
a15aae3
850d7fb
906fa13
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 |
|---|---|---|
|
|
@@ -13,7 +13,8 @@ | |
| cf_gallery_images, cf_gallery_image_versions, | ||
| cf_proximity_placement_groups, | ||
| cf_dedicated_hosts, cf_dedicated_host_groups, | ||
| cf_log_analytics_data_plane) | ||
| cf_log_analytics_data_plane, | ||
| cf_disk_encryption_set) | ||
| from azure.cli.command_modules.vm._format import ( | ||
| transform_ip_addresses, transform_vm, transform_vm_create_output, transform_vm_usage_list, transform_vm_list, | ||
| transform_sku_for_table_output, transform_disk_show_table_output, transform_extension_show_table_output, | ||
|
|
@@ -172,6 +173,11 @@ def load_command_table(self, _): | |
| client_factory=cf_log_analytics_data_plane, | ||
| ) | ||
|
|
||
| compute_disk_encryption_set_sdk = CliCommandType( | ||
| operations_tmpl='azure.mgmt.compute.operations#DiskEncryptionSetsOperations.{}', | ||
| client_factory=cf_disk_encryption_set | ||
|
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. actually, I'm curious about the api-version of this command type. Sometimes you need to set operation_group for the commandType in VM, sometimes you don't. Is there any guideline for this?
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. operation_group - Only used by the azure-cli-vm module to specify which resource API to target. No |
||
| ) | ||
|
|
||
| with self.command_group('disk', compute_disk_sdk, operation_group='disks', min_api='2017-03-30') as g: | ||
| g.custom_command('create', 'create_managed_disk', supports_no_wait=True, table_transformer=transform_disk_show_table_output, validator=process_disk_or_snapshot_create_namespace) | ||
| g.command('delete', 'delete', supports_no_wait=True, confirmation=True) | ||
|
|
@@ -182,6 +188,13 @@ def load_command_table(self, _): | |
| g.generic_update_command('update', custom_func_name='update_managed_disk', setter_arg_name='disk', supports_no_wait=True) | ||
| g.wait_command('wait') | ||
|
|
||
| with self.command_group('disk-encryption-set', compute_disk_encryption_set_sdk, client_factory=cf_disk_encryption_set) as g: | ||
| g.custom_command('create', 'create_disk_encryption_set') | ||
| g.command('delete', 'delete') | ||
| g.command('update', 'update') | ||
| g.show_command('show', 'get') | ||
| g.command('list', 'list') | ||
|
|
||
| with self.command_group('image', compute_image_sdk, min_api='2016-04-30-preview') as g: | ||
| g.custom_command('create', 'create_image', validator=process_image_create_namespace) | ||
| g.custom_command('list', 'list_images') | ||
|
|
||
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.
is the key_url same with Swagger property name? it's confusing with help message.
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.
Yes.
e.g. https://vault4848.vault.azure.net/keys/key1/e3a5735dfa4d47b8879fa61cdd1cfb82
https://github.com/Azure/azure-rest-api-specs/blob/master/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/disk.json#L1432
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.
Maybe the name
--keyor--active-keyis better than--key-url.