-
Notifications
You must be signed in to change notification settings - Fork 1.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
[Breadth Coverage] Support StorageSync in Azure CLI cmdlets #1389
Merged
Merged
Changes from 1 commit
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
08a93e0
draft storage sync cli commands
jsntcy d02a444
upload for vm test
jsntcy c67cdef
save to remote temp
jsntcy a648fab
[Breadth Coverage] support storage sync in CLI extensions
jsntcy fed323d
add code owner and default tags
jsntcy 37416bd
update code based on review comments
jsntcy 31bf83b
add experimental tag
jsntcy b44d532
remove useless dependencies
jsntcy 7d0cd78
Merge branch 'master' into bc-storagesync-final
jsntcy 9bd57d1
Merge branch 'master' into bc-storagesync-final
jsntcy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
save to remote temp
- Loading branch information
commit c67cdef351cea2fef677bcef8718f5926c973af0
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,29 +19,24 @@ | |
|
||
|
||
def load_arguments(self, _): | ||
storage_sync_service_name_type = CLIArgumentType(options_list=['--storage-sync-service-name', '-sss'], | ||
help='The name of storage sync service.') | ||
sync_group_name_type = CLIArgumentType(options_list=['--sync-group-name', '-sg'], help='The name of sync group.') | ||
cloud_endpoint_name_type = CLIArgumentType(options_list=['--cloud-endpoint-name', '-ce'], | ||
help='The name of cloud endpoint.') | ||
server_endpoint_name_type = CLIArgumentType(options_list=['--server-endpoint-name', '-se'], | ||
help='The name of server endpoint.') | ||
share_name_type = CLIArgumentType(options_list=['--share-name', '-s'], help='The name of Azure file share.') | ||
storage_sync_service_name_type = CLIArgumentType(help='The name of storage sync service.') | ||
sync_group_name_type = CLIArgumentType(help='The name of sync group.') | ||
cloud_endpoint_name_type = CLIArgumentType(help='The name of cloud endpoint.') | ||
server_endpoint_name_type = CLIArgumentType(help='The name of server endpoint.') | ||
azure_file_share_name_type = CLIArgumentType(help='The name of Azure file share.') | ||
storage_account_type = CLIArgumentType(options_list='--storage-account', | ||
help='The name or ID of the storage account.', | ||
validator=parse_storage_account, id_part='name') | ||
storage_account_tenant_id_type = CLIArgumentType(options_list='--tenant-id', | ||
help='The id of the tenant that the storage account is in.') | ||
server_resource_id_type = CLIArgumentType(options_list='--server-id', | ||
help='The resource id of the registered server.') | ||
storage_account_tenant_id_type = CLIArgumentType(help='The id of the tenant that the storage account is in.') | ||
server_resource_id_type = CLIArgumentType(help='The resource id of the registered server.') | ||
server_id_type = CLIArgumentType(help='GUID identifying the on-premises server.') | ||
|
||
with self.argument_context('storagesync storage-sync-service create') as c: | ||
c.argument('resource_group_name', resource_group_name_type) | ||
c.argument('storage_sync_service_name', storage_sync_service_name_type) | ||
c.argument('location', arg_type=get_location_type(self.cli_ctx), | ||
validator=get_default_location_from_resource_group) | ||
c.argument('tags', tags_type) | ||
c.argument('properties', help='The properties of the storage sync service.') | ||
|
||
with self.argument_context('storagesync storage-sync-service delete') as c: | ||
c.argument('resource_group_name', resource_group_name_type) | ||
|
@@ -79,7 +74,7 @@ def load_arguments(self, _): | |
c.argument('sync_group_name', sync_group_name_type) | ||
c.argument('cloud_endpoint_name', cloud_endpoint_name_type) | ||
c.argument('storage_account_resource_id', storage_account_type) | ||
c.argument('azure_file_share_name', share_name_type) | ||
c.argument('azure_file_share_name', azure_file_share_name_type) | ||
c.argument('storage_account_tenant_id', storage_account_tenant_id_type) | ||
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 get this tenant id by 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. |
||
|
||
with self.argument_context('storagesync cloud-endpoint delete') as c: | ||
|
@@ -145,26 +140,21 @@ def load_arguments(self, _): | |
with self.argument_context('storagesync registered-server create') as c: | ||
c.argument('resource_group_name', resource_group_name_type) | ||
c.argument('storage_sync_service_name', storage_sync_service_name_type) | ||
c.argument('server_id', help='Server Id') | ||
c.argument('server_certificate', help='Registered Server Certificate') | ||
c.argument('agent_version', help='Registered Server Agent Version') | ||
c.argument('server_osversion', help='Registered Server OS Version') | ||
c.argument('last_heart_beat', help='Registered Server last heart beat') | ||
c.argument('server_role', help='Registered Server serverRole') | ||
c.argument('cluster_id', help='Registered Server clusterId') | ||
c.argument('cluster_name', help='Registered Server clusterName') | ||
c.argument('friendly_name', help='Friendly Name') | ||
|
||
with self.argument_context('storagesync registered-server delete') as c: | ||
c.argument('resource_group_name', resource_group_name_type) | ||
c.argument('storage_sync_service_name', storage_sync_service_name_type) | ||
c.argument('server_id', help='Server Id') | ||
c.argument('server_id', server_id_type) | ||
|
||
with self.argument_context('storagesync registered-server show') as c: | ||
c.argument('resource_group_name', resource_group_name_type) | ||
c.argument('storage_sync_service_name', storage_sync_service_name_type) | ||
c.argument('server_id', help='Server Id') | ||
c.argument('server_id', server_id_type) | ||
|
||
with self.argument_context('storagesync registered-server list') as c: | ||
c.argument('resource_group_name', resource_group_name_type) | ||
c.argument('storage_sync_service_name', storage_sync_service_name_type) | ||
|
||
with self.argument_context('storagesync registered-server rollover-certificate') as c: | ||
c.argument('resource_group_name', resource_group_name_type) | ||
c.argument('storage_sync_service_name', storage_sync_service_name_type) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
The prefix of the subcommand name seems redundant. just use
storagesync service create
? #ResolvedThere 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.
After internal discussion, we decide to use 'storagesync create'
In reply to: 392831198 [](ancestors = 392831198)