Skip to content

Commit 8d7edee

Browse files
committed
remove unused
1 parent b50471e commit 8d7edee

File tree

4 files changed

+1
-162
lines changed

4 files changed

+1
-162
lines changed

src/azure-cli/azure/cli/command_modules/vm/azure_stack/_client_factory.py

-4
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,6 @@ def cf_gallery_image_versions(cli_ctx, _):
9595
return _compute_client_factory(cli_ctx).gallery_image_versions
9696

9797

98-
def cf_gallery_application_version(cli_ctx, *_):
99-
return _compute_client_factory(cli_ctx).gallery_application_versions
100-
101-
10298
def cf_proximity_placement_groups(cli_ctx, _):
10399
return _compute_client_factory(cli_ctx).proximity_placement_groups
104100

src/azure-cli/azure/cli/command_modules/vm/azure_stack/_params.py

-54
Original file line numberDiff line numberDiff line change
@@ -1410,60 +1410,6 @@ def load_arguments(self, _):
14101410

14111411
# endregion
14121412

1413-
# region Gallery applications
1414-
with self.argument_context('sig gallery-application') as c:
1415-
c.argument('gallery_application_name', options_list=['--name', '-n', '--application-name'],
1416-
help='The name of the gallery Application')
1417-
1418-
with self.argument_context('sig gallery-application create') as c:
1419-
c.argument('location', arg_type=get_location_type(self.cli_ctx), required=False,
1420-
validator=get_default_location_from_resource_group)
1421-
c.argument('description', help='The description of this gallery Application Definition resource. '
1422-
'This property is updatable.')
1423-
c.argument('os_type', arg_type=get_enum_type(['Windows', 'Linux']), help='This property allows you '
1424-
'to specify the supported type of the OS that application is built for. <br><br> Possible values '
1425-
'are: <br><br> **Windows** <br><br> **Linux**')
1426-
1427-
with self.argument_context('sig gallery-application update') as c:
1428-
c.argument('location', arg_type=get_location_type(self.cli_ctx), required=False,
1429-
validator=get_default_location_from_resource_group)
1430-
c.argument('description', help='The description of this gallery Application Definition resource. '
1431-
'This property is updatable.')
1432-
1433-
with self.argument_context('sig gallery-application version') as c:
1434-
c.argument('gallery_application_name', options_list=['--application-name'],
1435-
help='The name of the gallery Application')
1436-
c.argument('gallery_application_version_name', options_list=['--name', '-n', '--version-name'],
1437-
help='The name of the gallery Application Version')
1438-
1439-
with self.argument_context('sig gallery-application version create') as c:
1440-
c.argument('package_file_name', help='The name to assign the downloaded package file on the VM. This is limited to 4096 characters.'
1441-
'If not specified, the package file will be named the same as the Gallery Application name.')
1442-
c.argument('config_file_name', help='The name to assign the downloaded config file on the VM. This is limited to 4096 characters. '
1443-
'If not specified, the config file will be named the Gallery Application name appended with "_config"')
1444-
1445-
for scope in ['create', 'update']:
1446-
with self.argument_context('sig gallery-application version {}'.format(scope)) as c:
1447-
c.argument('location', arg_type=get_location_type(self.cli_ctx), required=False,
1448-
validator=get_default_location_from_resource_group)
1449-
c.argument('tags', tags_type)
1450-
c.argument('package_file_link', help='The mediaLink of the artifact, must be a readable storage page blob.')
1451-
c.argument('install_command', help='The path and arguments to install the gallery application.')
1452-
c.argument('remove_command', help='The path and arguments to remove the gallery application.')
1453-
c.argument('update_command', help='The path and arguments to update the gallery application. If not present,'
1454-
' then update operation will invoke remove command on the previous version'
1455-
' and install command on the current version of the gallery application.')
1456-
c.argument('target_regions', type=validate_file_or_dict, help='The target regions where the Image Version is'
1457-
'going to be replicated to. This property is updatable. Expected value: '
1458-
'json-string/json-file/@json-file.')
1459-
c.argument('default_file_link', help='The default configuration link of the artifact, must be a readable storage page blob.')
1460-
c.argument('exclude_from', arg_type=get_three_state_flag(), help='If set to true, Virtual Machines '
1461-
'deployed from the latest version of the Image Definition won\'t use this Image Version.',
1462-
arg_group='Publishing Profile')
1463-
c.argument('end_of_life_date', help='The end of life date of the gallery image version. This property can be '
1464-
'used for decommissioning purposes. This property is updatable.', arg_group='Publishing Profile')
1465-
# endregion
1466-
14671413
# region Proximity Placement Group
14681414
with self.argument_context('ppg', min_api='2018-04-01') as c:
14691415
c.argument('proximity_placement_group_name', arg_type=name_arg_type, help="The name of the proximity placement group.")

src/azure-cli/azure/cli/command_modules/vm/azure_stack/commands.py

+1-10
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
cf_capacity_reservation_groups,
2020
cf_capacity_reservations,
2121
cf_vmss_run_commands,
22-
cf_gallery_application_version, cf_restore_point,
22+
cf_restore_point,
2323
cf_restore_point_collection,
2424
cf_community_gallery_image,
2525
cf_community_gallery_image_version)
@@ -149,11 +149,6 @@ def load_command_table(self, _):
149149
client_factory=cf_gallery_image_versions,
150150
)
151151

152-
compute_gallery_application_version_sdk = CliCommandType(
153-
operations_tmpl='azure.mgmt.compute.operations#GalleryApplicationVersionsOperations.{}',
154-
client_factory=cf_gallery_application_version,
155-
)
156-
157152
compute_proximity_placement_groups_sdk = CliCommandType(
158153
operations_tmpl='azure.mgmt.compute.operations#ProximityPlacementGroupsOperations.{}',
159154
)
@@ -492,10 +487,6 @@ def load_command_table(self, _):
492487
client_factory=cf_shared_gallery_image_version) as g:
493488
g.custom_command('list-shared', 'sig_shared_image_version_list')
494489

495-
with self.command_group('sig gallery-application version', compute_gallery_application_version_sdk, client_factory=cf_gallery_application_version, min_api='2021-07-01', operation_group='gallery_application_versions') as g:
496-
g.custom_command('create', 'gallery_application_version_create', supports_no_wait=True)
497-
g.custom_command('update', 'gallery_application_version_update', supports_no_wait=True)
498-
499490
with self.command_group('ppg', compute_proximity_placement_groups_sdk, min_api='2018-04-01', client_factory=cf_proximity_placement_groups) as g:
500491
g.custom_command('create', 'create_proximity_placement_group', validator=process_ppg_create_namespace)
501492
g.custom_command('list', 'list_proximity_placement_groups')

src/azure-cli/azure/cli/command_modules/vm/azure_stack/custom.py

-94
Original file line numberDiff line numberDiff line change
@@ -5392,100 +5392,6 @@ def sig_shared_image_version_list(client, location, gallery_unique_name, gallery
53925392
return get_page_result(generator, marker, show_next_marker)
53935393

53945394

5395-
def gallery_application_version_create(client,
5396-
resource_group_name,
5397-
gallery_name,
5398-
gallery_application_name,
5399-
gallery_application_version_name,
5400-
location,
5401-
package_file_link,
5402-
install_command,
5403-
remove_command,
5404-
tags=None,
5405-
update_command=None,
5406-
target_regions=None,
5407-
default_file_link=None,
5408-
end_of_life_date=None,
5409-
package_file_name=None,
5410-
config_file_name=None,
5411-
exclude_from=None,
5412-
no_wait=False):
5413-
gallery_application_version = {}
5414-
gallery_application_version['publishing_profile'] = {}
5415-
gallery_application_version['location'] = location
5416-
if tags is not None:
5417-
gallery_application_version['tags'] = tags
5418-
source = {}
5419-
source['media_link'] = package_file_link
5420-
if default_file_link is not None:
5421-
source['default_configuration_link'] = default_file_link
5422-
gallery_application_version['publishing_profile']['source'] = source
5423-
manage_actions = {}
5424-
manage_actions['install'] = install_command
5425-
manage_actions['remove'] = remove_command
5426-
if update_command is not None:
5427-
manage_actions['update'] = update_command
5428-
gallery_application_version['publishing_profile']['manage_actions'] = manage_actions
5429-
if target_regions is not None:
5430-
gallery_application_version['publishing_profile']['target_regions'] = target_regions
5431-
if exclude_from is not None:
5432-
gallery_application_version['publishing_profile']['exclude_from_latest'] = exclude_from
5433-
if end_of_life_date is not None:
5434-
gallery_application_version['publishing_profile']['end_of_life_date'] = end_of_life_date
5435-
settings = {}
5436-
if package_file_name is not None:
5437-
settings['package_file_name'] = package_file_name
5438-
if config_file_name is not None:
5439-
settings['config_file_name'] = config_file_name
5440-
if settings:
5441-
gallery_application_version['publishing_profile']['settings'] = settings
5442-
return sdk_no_wait(no_wait,
5443-
client.begin_create_or_update,
5444-
resource_group_name=resource_group_name,
5445-
gallery_name=gallery_name,
5446-
gallery_application_name=gallery_application_name,
5447-
gallery_application_version_name=gallery_application_version_name,
5448-
gallery_application_version=gallery_application_version)
5449-
5450-
5451-
def gallery_application_version_update(client,
5452-
resource_group_name,
5453-
gallery_name,
5454-
gallery_application_name,
5455-
gallery_application_version_name,
5456-
location,
5457-
package_file_link,
5458-
tags=None,
5459-
target_regions=None,
5460-
default_file_link=None,
5461-
end_of_life_date=None,
5462-
exclude_from=None,
5463-
no_wait=False):
5464-
gallery_application_version = {}
5465-
gallery_application_version['publishing_profile'] = {}
5466-
gallery_application_version['location'] = location
5467-
if tags is not None:
5468-
gallery_application_version['tags'] = tags
5469-
source = {}
5470-
source['media_link'] = package_file_link
5471-
if default_file_link is not None:
5472-
source['default_configuration_link'] = default_file_link
5473-
gallery_application_version['publishing_profile']['source'] = source
5474-
if target_regions is not None:
5475-
gallery_application_version['publishing_profile']['target_regions'] = [target_regions]
5476-
if exclude_from is not None:
5477-
gallery_application_version['publishing_profile']['exclude_from_latest'] = exclude_from
5478-
if end_of_life_date is not None:
5479-
gallery_application_version['publishing_profile']['end_of_life_date'] = end_of_life_date
5480-
return sdk_no_wait(no_wait,
5481-
client.begin_create_or_update,
5482-
resource_group_name=resource_group_name,
5483-
gallery_name=gallery_name,
5484-
gallery_application_name=gallery_application_name,
5485-
gallery_application_version_name=gallery_application_version_name,
5486-
gallery_application_version=gallery_application_version)
5487-
5488-
54895395
def create_capacity_reservation_group(cmd, client, resource_group_name, capacity_reservation_group_name, location=None,
54905396
tags=None, zones=None, sharing_profile=None):
54915397
CapacityReservationGroup = cmd.get_models('CapacityReservationGroup')

0 commit comments

Comments
 (0)