Skip to content

Commit 2a185bd

Browse files
authored
[Compute] BREAKING CHANGE: az sig image-definition/image-version list-community/list-shared: Replace pagination parameters with new parameters --max-items and --next-token (#31317)
1 parent 60c6ef9 commit 2a185bd

File tree

16 files changed

+4212
-1401
lines changed

16 files changed

+4212
-1401
lines changed

src/azure-cli/azure/cli/command_modules/vm/_breaking_change.py

Lines changed: 0 additions & 16 deletions
This file was deleted.

src/azure-cli/azure/cli/command_modules/vm/_help.py

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -695,32 +695,6 @@
695695
--release-note-uri path_to_release_notes
696696
"""
697697

698-
helps['sig image-definition list-shared'] = """
699-
type: command
700-
short-summary: List VM Image definitions in a gallery shared directly to your subscription or tenant
701-
long-summary: List VM Image definitions in a gallery shared directly to your subscription or tenant
702-
examples:
703-
- name: List an image definition in a gallery shared directly to your subscription in the given location.
704-
text: |
705-
az sig image-definition list-shared --gallery-unique-name galleryUniqueName \\
706-
--location myLocation
707-
- name: List an image definition in a gallery shared directly to your tenant in the given location.
708-
text: |
709-
az sig image-definition list-shared --gallery-unique-name galleryUniqueName \\
710-
--location myLocation --shared-to tenant
711-
"""
712-
713-
helps['sig image-definition list-community'] = """
714-
type: command
715-
short-summary: List VM Image definitions in a gallery community
716-
long-summary: List VM Image definitions in a gallery community
717-
examples:
718-
- name: List an image definition in a gallery community.
719-
text: |
720-
az sig image-definition list-community --public-gallery-name publicGalleryName \\
721-
--location myLocation
722-
"""
723-
724698
helps['sig image-version create'] = """
725699
type: command
726700
short-summary: create a new image version
@@ -862,21 +836,6 @@
862836
--block-deletion-before-end-of-life true
863837
"""
864838

865-
helps['sig image-version list-shared'] = """
866-
type: command
867-
short-summary: List VM Image Versions in a gallery shared directly to your subscription or tenant
868-
long-summary: List VM Image Versions in a gallery shared directly to your subscription or tenant
869-
examples:
870-
- name: List image versions in a gallery shared directly to your subscription in the given location and image definition.
871-
text: |
872-
az sig image-version list-shared --gallery-unique-name galleryUniqueName \\
873-
--gallery-image-definition MyImage --location myLocation
874-
- name: List image versions in a gallery shared directly to your tenant in the given location and image definition.
875-
text: |
876-
az sig image-version list-shared --gallery-unique-name galleryUniqueName \\
877-
--gallery-image-definition MyImage --location myLocation --shared-to tenant
878-
"""
879-
880839
helps['sig image-version update'] = """
881840
type: command
882841
short-summary: update a share image version
@@ -941,17 +900,6 @@
941900
--gallery-image-version 1.1.1
942901
"""
943902

944-
helps['sig image-version list-community'] = """
945-
type: command
946-
short-summary: List VM Image Versions in a gallery community
947-
long-summary: List VM Image Versions in a gallery community
948-
examples:
949-
- name: List an image versions in a gallery community.
950-
text: |
951-
az sig image-version list-community --public-gallery-name publicGalleryName \\
952-
--gallery-image-definition MyImage --location myLocation
953-
"""
954-
955903
helps['sig image-version wait'] = """
956904
type: command
957905
short-summary: wait for image version related operation

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

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,6 @@ def load_arguments(self, _):
114114
min_api='2020-12-01'
115115
)
116116

117-
t_shared_to = self.get_models('SharedToValues', operation_group='shared_galleries')
118-
shared_to_type = CLIArgumentType(
119-
arg_type=get_enum_type(t_shared_to),
120-
help='The query parameter to decide what shared galleries to fetch when doing listing operations. '
121-
'If not specified, list by subscription id.'
122-
)
123-
124117
marker_type = CLIArgumentType(
125118
help='A string value that identifies the portion of the list of containers to be '
126119
'returned with the next listing operation. The operation returns the NextMarker value within '
@@ -1292,14 +1285,6 @@ def load_arguments(self, _):
12921285
c.argument('features', help='A list of gallery image features. E.g. "IsSecureBootSupported=true IsMeasuredBootSupported=false"')
12931286
c.argument('architecture', arg_type=get_enum_type(self.get_models('Architecture', operation_group='gallery_images')), min_api='2021-10-01', help='CPU architecture.')
12941287

1295-
with self.argument_context('sig image-definition list-shared') as c:
1296-
c.argument('location', arg_type=get_location_type(self.cli_ctx), id_part='name')
1297-
c.argument('gallery_unique_name', type=str, help='The unique name of the Shared Gallery.',
1298-
id_part='child_name_1')
1299-
c.argument('shared_to', shared_to_type)
1300-
c.argument('marker', arg_type=marker_type)
1301-
c.argument('show_next_marker', action='store_true', help='Show nextMarker in result when specified.')
1302-
13031288
with self.argument_context('sig image-definition create') as c:
13041289
c.argument('description', help='the description of the gallery image definition')
13051290
with self.argument_context('sig image-definition update') as c:
@@ -1342,17 +1327,6 @@ def load_arguments(self, _):
13421327
help='Space-separated list of customer managed keys for encrypting the OS and data disks in the gallery artifact for each region. '
13431328
'Format for each edge zone: `<edge zone>,<os_des>,<lun1>,<lun1_des>,<lun2>,<lun2_des>`.')
13441329

1345-
with self.argument_context('sig image-version list-shared') as c:
1346-
c.argument('location', arg_type=get_location_type(self.cli_ctx), id_part='name')
1347-
c.argument('gallery_unique_name', type=str, help='The unique name of the Shared Gallery.',
1348-
id_part='child_name_1')
1349-
c.argument('gallery_image_name', options_list=['--gallery-image-definition', '-i'], type=str, help='The name '
1350-
'of the Shared Gallery Image Definition from which the Image Versions are to be listed.',
1351-
id_part='child_name_2')
1352-
c.argument('shared_to', shared_to_type)
1353-
c.argument('marker', arg_type=marker_type)
1354-
c.argument('show_next_marker', action='store_true', help='Show nextMarker in result when specified.')
1355-
13561330
with self.argument_context('sig image-version show') as c:
13571331
c.argument('expand', help="The expand expression to apply on the operation, e.g. 'ReplicationStatus'")
13581332

@@ -1396,25 +1370,12 @@ def load_arguments(self, _):
13961370
c.argument('public_gallery_name', public_gallery_name_type)
13971371
c.argument('gallery_image_name', gallery_image_name_type)
13981372

1399-
with self.argument_context('sig image-definition list-community') as c:
1400-
c.argument('location', arg_type=get_location_type(self.cli_ctx), id_part='name')
1401-
c.argument('public_gallery_name', public_gallery_name_type)
1402-
c.argument('marker', arg_type=marker_type)
1403-
c.argument('show_next_marker', action='store_true', help='Show nextMarker in result when specified.')
1404-
14051373
with self.argument_context('sig image-version show-community') as c:
14061374
c.argument('location', arg_type=get_location_type(self.cli_ctx), id_part='name')
14071375
c.argument('public_gallery_name', public_gallery_name_type)
14081376
c.argument('gallery_image_name', gallery_image_name_type)
14091377
c.argument('gallery_image_version_name', gallery_image_name_version_type)
14101378

1411-
with self.argument_context('sig image-version list-community') as c:
1412-
c.argument('location', arg_type=get_location_type(self.cli_ctx), id_part='name')
1413-
c.argument('public_gallery_name', public_gallery_name_type)
1414-
c.argument('gallery_image_name', gallery_image_name_type)
1415-
c.argument('marker', arg_type=marker_type)
1416-
c.argument('show_next_marker', action='store_true', help='Show nextMarker in result when specified.')
1417-
14181379
# endregion
14191380

14201381
with self.argument_context('vm create', min_api='2018-04-01') as c:

src/azure-cli/azure/cli/command_modules/vm/aaz/latest/sig/image_definition/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
from ._create import *
1313
from ._delete import *
1414
from ._list import *
15+
from ._list_community import *
16+
from ._list_shared import *
1517
from ._show import *
1618
from ._show_community import *
1719
from ._show_shared import *

0 commit comments

Comments
 (0)