Skip to content
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

[AutoPR desktopvirtualization] [Hub Generated] Review request for Microsoft.DesktopVirtualization to add version preview/2021-08-04-preview #2000

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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

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
@@ -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
438 changes: 394 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,155 @@
# pylint: disable=protected-access

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


class AddSku(argparse.Action):
def __call__(self, parser, namespace, values, option_string=None):
action = self.get_action(values, option_string)
namespace.sku = 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]
if kl == 'name':
d['name'] = v[0]
elif kl == 'tier':
d['tier'] = v[0]
elif kl == 'size':
d['size'] = v[0]
elif kl == 'family':
d['family'] = v[0]
elif kl == 'capacity':
d['capacity'] = v[0]
else:
raise CLIError('Unsupported Key {} is provided for parameter sku. All possible keys are: name, tier, '
'size, family, capacity'.format(k))
return d


class AddPlan(argparse.Action):
def __call__(self, parser, namespace, values, option_string=None):
action = self.get_action(values, option_string)
namespace.plan = 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]
if kl == 'name':
d['name'] = v[0]
elif kl == 'publisher':
d['publisher'] = v[0]
elif kl == 'product':
d['product'] = v[0]
elif kl == 'promotion-code':
d['promotion_code'] = v[0]
elif kl == 'version':
d['version'] = v[0]
else:
raise CLIError('Unsupported Key {} is provided for parameter plan. All possible keys are: name, '
'publisher, product, promotion-code, version'.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 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 AddMigrationRequest(argparse.Action):
def __call__(self, parser, namespace, values, option_string=None):
action = self.get_action(values, option_string)
namespace.migration_request = 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]
if kl == 'operation':
d['operation'] = v[0]
elif kl == 'migration-path':
d['migration_path'] = v[0]
else:
raise CLIError('Unsupported Key {} is provided for parameter migration_request. All possible keys are: '
'operation, migration-path'.format(k))
return d


class AddDesktopvirtualizationHostpoolCreateRegistrationInfo(argparse.Action):
Expand All @@ -37,6 +184,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 +211,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