Skip to content

Commit

Permalink
CodeGen from PR 13166 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge b353336f78b47a9a9d83765d68a6b9b87ea76f95 into 89f00c2
  • Loading branch information
SDKAuto committed Feb 26, 2021
1 parent 0d16cef commit 58c4349
Show file tree
Hide file tree
Showing 82 changed files with 7,607 additions and 158,563 deletions.

This file was deleted.

8,235 changes: 0 additions & 8,235 deletions src/desktopvirtualization/_az_debug/clicommon-000010-prename-pre.yaml

This file was deleted.

This file was deleted.

9,037 changes: 0 additions & 9,037 deletions src/desktopvirtualization/_az_debug/clicommon-000020-prename-post.yaml

This file was deleted.

This file was deleted.

9,037 changes: 0 additions & 9,037 deletions src/desktopvirtualization/_az_debug/clicommon-000030-complex-marker-pre.yaml

This file was deleted.

This file was deleted.

9,346 changes: 0 additions & 9,346 deletions src/desktopvirtualization/_az_debug/clicommon-000040-complex-marker-post.yaml

This file was deleted.

This file was deleted.

9,346 changes: 0 additions & 9,346 deletions src/desktopvirtualization/_az_debug/clicommon-000050-flatten-set-pre.yaml

This file was deleted.

This file was deleted.

9,368 changes: 0 additions & 9,368 deletions src/desktopvirtualization/_az_debug/clicommon-000060-flatten-set-post.yaml

This file was deleted.

This file was deleted.

10,094 changes: 0 additions & 10,094 deletions src/desktopvirtualization/_az_debug/clicommon-000070-modifier-pre.yaml

This file was deleted.

This file was deleted.

10,102 changes: 0 additions & 10,102 deletions src/desktopvirtualization/_az_debug/clicommon-000080-modifier-post.yaml

This file was deleted.

2,383 changes: 0 additions & 2,383 deletions src/desktopvirtualization/_az_debug/clicommon-000090-namer-post-simplified.yaml

This file was deleted.

11,138 changes: 0 additions & 11,138 deletions src/desktopvirtualization/_az_debug/clicommon-000090-namer-post.yaml

This file was deleted.

This file was deleted.

11,138 changes: 0 additions & 11,138 deletions src/desktopvirtualization/_az_debug/clicommon-000100-poly-as-resource-pre.yaml

This file was deleted.

This file was deleted.

11,138 changes: 0 additions & 11,138 deletions src/desktopvirtualization/_az_debug/clicommon-000110-poly-as-resource-post.yaml

This file was deleted.

This file was deleted.

11,138 changes: 0 additions & 11,138 deletions src/desktopvirtualization/_az_debug/clicommon-000120-complex-marker-pre.yaml

This file was deleted.

This file was deleted.

11,138 changes: 0 additions & 11,138 deletions src/desktopvirtualization/_az_debug/clicommon-000130-complex-marker-post.yaml

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@

from azure.cli.core import AzCommandsLoader
from azext_desktopvirtualization.generated._help import helps # pylint: disable=unused-import
try:
from azext_desktopvirtualization.manual._help import helps # pylint: disable=reimported
except ImportError:
pass


class DesktopVirtualizationAPIClientCommandsLoader(AzCommandsLoader):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"azext.isExperimental": true,
"azext.minCliCoreVersion": "2.3.1"
"azext.minCliCoreVersion": "2.15.0"
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,30 @@

def cf_desktopvirtualization_cl(cli_ctx, *_):
from azure.cli.core.commands.client_factory import get_mgmt_service_client
from ..vendored_sdks.desktopvirtualization import DesktopVirtualizationAPIClient
return get_mgmt_service_client(cli_ctx, DesktopVirtualizationAPIClient)
from azext_desktopvirtualization.vendored_sdks.desktopvirtualization import DesktopVirtualizationAPIClient
return get_mgmt_service_client(cli_ctx,
DesktopVirtualizationAPIClient)


def cf_workspace(cli_ctx, *_):
return cf_desktopvirtualization_cl(cli_ctx).workspace
return cf_desktopvirtualization_cl(cli_ctx).workspaces


def cf_scaling_plan(cli_ctx, *_):
return cf_desktopvirtualization_cl(cli_ctx).scaling_plans


def cf_application_group(cli_ctx, *_):
return cf_desktopvirtualization_cl(cli_ctx).application_group
return cf_desktopvirtualization_cl(cli_ctx).application_groups


def cf_host_pool(cli_ctx, *_):
return cf_desktopvirtualization_cl(cli_ctx).host_pool
return cf_desktopvirtualization_cl(cli_ctx).host_pools


def cf_msix_package(cli_ctx, *_):
return cf_desktopvirtualization_cl(cli_ctx).msix_packages


def cf_msix_image(cli_ctx, *_):
return cf_desktopvirtualization_cl(cli_ctx).msix_images
375 changes: 331 additions & 44 deletions src/desktopvirtualization/azext_desktopvirtualization/generated/_help.py

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,192 @@
# pylint: disable=protected-access

import argparse
from knack.util import CLIError
from collections import defaultdict
from knack.util import CLIError


class AddDesktopvirtualizationScalingPlanCreateSchedules(argparse._AppendAction):
def __call__(self, parser, namespace, values, option_string=None):
action = self.get_action(values, option_string)
super(AddDesktopvirtualizationScalingPlanCreateSchedules, self).__call__(parser, namespace, action, option_string)

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]
if kl == 'name':
d['name'] = v[0]
elif kl == 'days-of-week':
d['days_of_week'] = v
elif kl == 'ramp-up-start-time':
d['ramp_up_start_time'] = v[0]
elif kl == 'ramp-up-load-balancing-algorithm':
d['ramp_up_load_balancing_algorithm'] = v[0]
elif kl == 'ramp-up-minimum-hosts-pct':
d['ramp_up_minimum_hosts_pct'] = v[0]
elif kl == 'ramp-up-capacity-threshold-pct':
d['ramp_up_capacity_threshold_pct'] = v[0]
elif kl == 'peak-start-time':
d['peak_start_time'] = v[0]
elif kl == 'peak-load-balancing-algorithm':
d['peak_load_balancing_algorithm'] = v[0]
elif kl == 'ramp-down-start-time':
d['ramp_down_start_time'] = v[0]
elif kl == 'ramp-down-load-balancing-algorithm':
d['ramp_down_load_balancing_algorithm'] = v[0]
elif kl == 'ramp-down-minimum-hosts-pct':
d['ramp_down_minimum_hosts_pct'] = v[0]
elif kl == 'ramp-down-capacity-threshold-pct':
d['ramp_down_capacity_threshold_pct'] = v[0]
elif kl == 'ramp-down-force-logoff-users':
d['ramp_down_force_logoff_users'] = v[0]
elif kl == 'ramp-down-stop-hosts-when':
d['ramp_down_stop_hosts_when'] = v[0]
elif kl == 'ramp-down-wait-time-minutes':
d['ramp_down_wait_time_minutes'] = v[0]
elif kl == 'ramp-down-notification-message':
d['ramp_down_notification_message'] = v[0]
elif kl == 'off-peak-start-time':
d['off_peak_start_time'] = v[0]
elif kl == 'off-peak-load-balancing-algorithm':
d['off_peak_load_balancing_algorithm'] = v[0]
else:
raise CLIError('Unsupported Key {} is provided for parameter schedules. All possible keys are: name, '
'days-of-week, ramp-up-start-time, ramp-up-load-balancing-algorithm, '
'ramp-up-minimum-hosts-pct, ramp-up-capacity-threshold-pct, peak-start-time, '
'peak-load-balancing-algorithm, ramp-down-start-time, ramp-down-load-balancing-algorithm'
', ramp-down-minimum-hosts-pct, ramp-down-capacity-threshold-pct, '
'ramp-down-force-logoff-users, ramp-down-stop-hosts-when, ramp-down-wait-time-minutes, '
'ramp-down-notification-message, off-peak-start-time, off-peak-load-balancing-algorithm'
.format(k))
return d


class AddDesktopvirtualizationScalingPlanCreateHostPoolReferences(argparse._AppendAction):
def __call__(self, parser, namespace, values, option_string=None):
action = self.get_action(values, option_string)
super(AddDesktopvirtualizationScalingPlanCreateHostPoolReferences, self).__call__(parser, namespace, action, option_string)

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]
if kl == 'host-pool-arm-path':
d['host_pool_arm_path'] = v[0]
elif kl == 'scaling-plan-enabled':
d['scaling_plan_enabled'] = v[0]
else:
raise CLIError('Unsupported Key {} is provided for parameter host_pool_references. All possible keys '
'are: host-pool-arm-path, scaling-plan-enabled'.format(k))
return d


class AddDesktopvirtualizationScalingPlanUpdateSchedules(argparse._AppendAction):
def __call__(self, parser, namespace, values, option_string=None):
action = self.get_action(values, option_string)
super(AddDesktopvirtualizationScalingPlanUpdateSchedules, self).__call__(parser, namespace, action, option_string)

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]
if kl == 'name':
d['name'] = v[0]
elif kl == 'days-of-week':
d['days_of_week'] = v
elif kl == 'ramp-up-start-time':
d['ramp_up_start_time'] = v[0]
elif kl == 'ramp-up-load-balancing-algorithm':
d['ramp_up_load_balancing_algorithm'] = v[0]
elif kl == 'ramp-up-minimum-hosts-pct':
d['ramp_up_minimum_hosts_pct'] = v[0]
elif kl == 'ramp-up-capacity-threshold-pct':
d['ramp_up_capacity_threshold_pct'] = v[0]
elif kl == 'peak-start-time':
d['peak_start_time'] = v[0]
elif kl == 'peak-load-balancing-algorithm':
d['peak_load_balancing_algorithm'] = v[0]
elif kl == 'ramp-down-start-time':
d['ramp_down_start_time'] = v[0]
elif kl == 'ramp-down-load-balancing-algorithm':
d['ramp_down_load_balancing_algorithm'] = v[0]
elif kl == 'ramp-down-minimum-hosts-pct':
d['ramp_down_minimum_hosts_pct'] = v[0]
elif kl == 'ramp-down-capacity-threshold-pct':
d['ramp_down_capacity_threshold_pct'] = v[0]
elif kl == 'ramp-down-force-logoff-users':
d['ramp_down_force_logoff_users'] = v[0]
elif kl == 'ramp-down-stop-hosts-when':
d['ramp_down_stop_hosts_when'] = v[0]
elif kl == 'ramp-down-wait-time-minutes':
d['ramp_down_wait_time_minutes'] = v[0]
elif kl == 'ramp-down-notification-message':
d['ramp_down_notification_message'] = v[0]
elif kl == 'off-peak-start-time':
d['off_peak_start_time'] = v[0]
elif kl == 'off-peak-load-balancing-algorithm':
d['off_peak_load_balancing_algorithm'] = v[0]
else:
raise CLIError('Unsupported Key {} is provided for parameter schedules. All possible keys are: name, '
'days-of-week, ramp-up-start-time, ramp-up-load-balancing-algorithm, '
'ramp-up-minimum-hosts-pct, ramp-up-capacity-threshold-pct, peak-start-time, '
'peak-load-balancing-algorithm, ramp-down-start-time, ramp-down-load-balancing-algorithm'
', ramp-down-minimum-hosts-pct, ramp-down-capacity-threshold-pct, '
'ramp-down-force-logoff-users, ramp-down-stop-hosts-when, ramp-down-wait-time-minutes, '
'ramp-down-notification-message, off-peak-start-time, off-peak-load-balancing-algorithm'
.format(k))
return d


class AddDesktopvirtualizationScalingPlanUpdateHostPoolReferences(argparse._AppendAction):
def __call__(self, parser, namespace, values, option_string=None):
action = self.get_action(values, option_string)
super(AddDesktopvirtualizationScalingPlanUpdateHostPoolReferences, self).__call__(parser, namespace, action, option_string)

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]
if kl == 'host-pool-arm-path':
d['host_pool_arm_path'] = v[0]
elif kl == 'scaling-plan-enabled':
d['scaling_plan_enabled'] = v[0]
else:
raise CLIError('Unsupported Key {} is provided for parameter host_pool_references. All possible keys '
'are: host-pool-arm-path, scaling-plan-enabled'.format(k))
return d


class AddDesktopvirtualizationHostpoolCreateRegistrationInfo(argparse.Action):
Expand All @@ -37,6 +221,9 @@ def get_action(self, values, option_string): # pylint: disable=no-self-use
d['token'] = v[0]
elif kl == 'registration-token-operation':
d['registration_token_operation'] = v[0]
else:
raise CLIError('Unsupported Key {} is provided for parameter registration_info. All possible keys are: '
'expiration-time, token, registration-token-operation'.format(k))
return d


Expand All @@ -61,4 +248,74 @@ def get_action(self, values, option_string): # pylint: disable=no-self-use
d['expiration_time'] = v[0]
elif kl == 'registration-token-operation':
d['registration_token_operation'] = v[0]
else:
raise CLIError('Unsupported Key {} is provided for parameter registration_info. All possible keys are: '
'expiration-time, registration-token-operation'.format(k))
return d


class AddPackageDependencies(argparse._AppendAction):
def __call__(self, parser, namespace, values, option_string=None):
action = self.get_action(values, option_string)
super(AddPackageDependencies, self).__call__(parser, namespace, action, option_string)

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]
if kl == 'dependency-name':
d['dependency_name'] = v[0]
elif kl == 'publisher':
d['publisher'] = v[0]
elif kl == 'min-version':
d['min_version'] = v[0]
else:
raise CLIError('Unsupported Key {} is provided for parameter package_dependencies. All possible keys '
'are: dependency-name, publisher, min-version'.format(k))
return d


class AddPackageApplications(argparse._AppendAction):
def __call__(self, parser, namespace, values, option_string=None):
action = self.get_action(values, option_string)
super(AddPackageApplications, self).__call__(parser, namespace, action, option_string)

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]
if kl == 'app-id':
d['app_id'] = v[0]
elif kl == 'description':
d['description'] = v[0]
elif kl == 'app-user-model-id':
d['app_user_model_id'] = v[0]
elif kl == 'friendly-name':
d['friendly_name'] = v[0]
elif kl == 'icon-image-name':
d['icon_image_name'] = v[0]
elif kl == 'raw-icon':
d['raw_icon'] = v[0]
elif kl == 'raw-png':
d['raw_png'] = v[0]
else:
raise CLIError('Unsupported Key {} is provided for parameter package_applications. All possible keys '
'are: app-id, description, app-user-model-id, friendly-name, icon-image-name, raw-icon, '
'raw-png'.format(k))
return d
Loading

0 comments on commit 58c4349

Please sign in to comment.