Skip to content

Commit

Permalink
[Storage] Set min_api for worm feature (Azure#7313)
Browse files Browse the repository at this point in the history
  • Loading branch information
williexu authored and troydai committed Sep 13, 2018
1 parent 54536a7 commit 411112e
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -209,14 +209,16 @@ def get_custom_sdk(custom_module, client_factory, resource_type=ResourceType.DAT
resource_type=ResourceType.MGMT_STORAGE
)

with self.command_group('storage container immutability-policy', command_type=blob_container_mgmt_sdk) as g:
with self.command_group('storage container immutability-policy', command_type=blob_container_mgmt_sdk,
min_api='2018-02-01') as g:
g.show_command('show', 'get_immutability_policy', transform=transform_immutability_policy)
g.command('create', 'create_or_update_immutability_policy')
g.command('delete', 'delete_immutability_policy', transform=lambda x: None)
g.command('lock', 'lock_immutability_policy')
g.command('extend', 'extend_immutability_policy')

with self.command_group('storage container legal-hold', command_type=blob_container_mgmt_sdk) as g:
with self.command_group('storage container legal-hold', command_type=blob_container_mgmt_sdk,
min_api='2018-02-01') as g:
g.command('set', 'set_legal_hold')
g.command('clear', 'clear_legal_hold')
g.show_command('show', 'get', transform=lambda x: getattr(x, 'legal_hold', x))
Expand Down

0 comments on commit 411112e

Please sign in to comment.