-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[Compute] Add disk-encryption-set command group #11411
Changes from 5 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 |
---|---|---|
|
@@ -54,6 +54,7 @@ def load_arguments(self, _): | |
|
||
extension_instance_name_type = CLIArgumentType(help="Name of extension instance, which can be customized. Default: name of the extension.") | ||
image_template_name_type = CLIArgumentType(overrides=name_arg_type, id_part='name') | ||
disk_encryption_set_name = CLIArgumentType(overrides=name_arg_type, help='Name of disk encryption set.', id_part='name') | ||
|
||
# StorageAccountTypes renamed to DiskStorageAccountTypes in 2018_06_01 of azure-mgmt-compute | ||
DiskStorageAccountTypes = DiskStorageAccountTypes or StorageAccountTypes | ||
|
@@ -838,3 +839,12 @@ def load_arguments(self, _): | |
c.argument('analytics_query', options_list=['--analytics-query', '-q'], help="Query to execute over Log Analytics data.") | ||
c.argument('timespan', help="Timespan over which to query. Defaults to querying all available data.") | ||
# endregion | ||
|
||
# region disk encryption set | ||
with self.argument_context('disk-encryption-set') as c: | ||
c.argument('disk_encryption_set_name', disk_encryption_set_name) | ||
c.argument('key_url', help='URL pointing to a key or secret in KeyVault.') | ||
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. 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 commentThe reason will be displayed to describe this comment to others. Learn more.
Yes. 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. Maybe the name |
||
c.argument('source_vault', help='Resource ID of the KeyVault containing the key or secret.') | ||
qwordy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
c.argument('location', validator=get_default_location_from_resource_group) | ||
c.argument('tags', tags_type) | ||
# endregion |
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 | ||
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? 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.
@ramankumarlive, could you help give a summary of disk encryption set?