Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/storagesync/azext_storagesync/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ def __init__(self, cli_ctx=None):
storagesync_custom = CliCommandType(
operations_tmpl='azext_storagesync.custom#{}',
client_factory=cf_storagesync)
super(MicrosoftStorageSyncCommandsLoader, self).__init__(cli_ctx=cli_ctx,
custom_command_type=storagesync_custom)
parent = super(MicrosoftStorageSyncCommandsLoader, self)
parent.__init__(cli_ctx=cli_ctx, custom_command_type=storagesync_custom)

def load_command_table(self, args):
from azext_storagesync.generated.commands import load_command_table
Expand Down
232 changes: 173 additions & 59 deletions src/storagesync/azext_storagesync/generated/_help.py

Large diffs are not rendered by default.

199 changes: 121 additions & 78 deletions src/storagesync/azext_storagesync/generated/_params.py

Large diffs are not rendered by default.

14 changes: 0 additions & 14 deletions src/storagesync/azext_storagesync/generated/_validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,3 @@
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------


def example_name_or_id_validator(cmd, namespace):
from azure.cli.core.commands.client_factory import get_subscription_id
from msrestazure.tools import is_valid_resource_id, resource_id
if namespace.storage_account:
if not is_valid_resource_id(namespace.RESOURCE):
namespace.storage_account = resource_id(
subscription=get_subscription_id(cmd.cli_ctx),
resource_group=namespace.resource_group_name,
namespace='Microsoft.Storage',
type='storageAccounts',
name=namespace.storage_account
)
28 changes: 2 additions & 26 deletions src/storagesync/azext_storagesync/generated/action.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,33 +14,11 @@
from collections import defaultdict


class AddPrivateEndpoint(argparse.Action):
def __call__(self, parser, namespace, values, option_string=None):
action = self.get_action(values, option_string)
namespace.private_endpoint = action


def get_action(self, values, option_string): # pylint: disable=no-self-use
try:
properties = defaultdict(list)
for (k, v) in (x.split('=', 1) for x in values):
properties[k].append(v)
properties = dict(properties)
except ValueError:
raise CLIError('usage error: {} [KEY=VALUE ...]'.format(option_string))
d = {}
for k in properties:
kl = k.lower()
v = properties[k]
return d


class AddPrivateLinkServiceConnectionState(argparse.Action):
def __call__(self, parser, namespace, values, option_string=None):
action = self.get_action(values, option_string)
namespace.private_link_service_connection_state = action


def get_action(self, values, option_string): # pylint: disable=no-self-use
try:
properties = defaultdict(list)
Expand All @@ -57,8 +35,8 @@ def get_action(self, values, option_string): # pylint: disable=no-self-use
d['status'] = v[0]
elif kl == 'description':
d['description'] = v[0]
elif kl == 'action-required':
d['action_required'] = v[0]
elif kl == 'actions-required':
d['actions_required'] = v[0]
return d


Expand All @@ -67,7 +45,6 @@ def __call__(self, parser, namespace, values, option_string=None):
action = self.get_action(values, option_string)
super(AddStoragesyncCloudEndpointPostRestoreRestoreFileSpec, self).__call__(parser, namespace, action, option_string)


def get_action(self, values, option_string): # pylint: disable=no-self-use
try:
properties = defaultdict(list)
Expand All @@ -92,7 +69,6 @@ def __call__(self, parser, namespace, values, option_string=None):
action = self.get_action(values, option_string)
super(AddStoragesyncCloudEndpointPreRestoreRestoreFileSpec, self).__call__(parser, namespace, action, option_string)


def get_action(self, values, option_string): # pylint: disable=no-self-use
try:
properties = defaultdict(list)
Expand Down
10 changes: 5 additions & 5 deletions src/storagesync/azext_storagesync/generated/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def load_command_table(self, _):
g.custom_command('create', 'storagesync_storage_sync_service_create', supports_no_wait=True)
g.custom_command('update', 'storagesync_storage_sync_service_update', supports_no_wait=True)
g.custom_command('delete', 'storagesync_storage_sync_service_delete', supports_no_wait=True)
g.wait_command('wait')
g.custom_wait_command('wait', 'storagesync_storage_sync_service_show')

from azext_storagesync.generated._client_factory import cf_private_link_resource
storagesync_private_link_resource = CliCommandType(
Expand All @@ -47,7 +47,7 @@ def load_command_table(self, _):
g.custom_show_command('show', 'storagesync_private_endpoint_connection_show')
g.custom_command('create', 'storagesync_private_endpoint_connection_create', supports_no_wait=True)
g.custom_command('delete', 'storagesync_private_endpoint_connection_delete', supports_no_wait=True)
g.wait_command('wait')
g.custom_wait_command('wait', 'storagesync_private_endpoint_connection_show')

from azext_storagesync.generated._client_factory import cf_sync_group
storagesync_sync_group = CliCommandType(
Expand Down Expand Up @@ -79,7 +79,7 @@ def load_command_table(self, _):
g.custom_command('restoreheartbeat', 'storagesync_cloud_endpoint_restoreheartbeat')
g.custom_command('trigger-change-detection', 'storagesync_cloud_endpoint_trigger_change_detection',
supports_no_wait=True)
g.wait_command('wait')
g.custom_wait_command('wait', 'storagesync_cloud_endpoint_show')

from azext_storagesync.generated._client_factory import cf_server_endpoint
storagesync_server_endpoint = CliCommandType(
Expand All @@ -94,7 +94,7 @@ def load_command_table(self, _):
g.custom_command('update', 'storagesync_server_endpoint_update', supports_no_wait=True)
g.custom_command('delete', 'storagesync_server_endpoint_delete', supports_no_wait=True)
g.custom_command('recall-action', 'storagesync_server_endpoint_recall_action', supports_no_wait=True)
g.wait_command('wait')
g.custom_wait_command('wait', 'storagesync_server_endpoint_show')

from azext_storagesync.generated._client_factory import cf_registered_server
storagesync_registered_server = CliCommandType(
Expand All @@ -108,7 +108,7 @@ def load_command_table(self, _):
g.custom_command('create', 'storagesync_registered_server_create', supports_no_wait=True)
g.custom_command('delete', 'storagesync_registered_server_delete', supports_no_wait=True)
g.custom_command('trigger-rollover', 'storagesync_registered_server_trigger_rollover', supports_no_wait=True)
g.wait_command('wait')
g.custom_wait_command('wait', 'storagesync_registered_server_show')

from azext_storagesync.generated._client_factory import cf_workflow
storagesync_workflow = CliCommandType(
Expand Down
Loading