Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class ListCommunity(AAZCommand):
"""

_aaz_info = {
"version": "2026-03-03",
"version": "2023-07-03",
"resources": [
["mgmt-plane", "/subscriptions/{}/providers/microsoft.compute/locations/{}/communitygalleries/{}/images/{}/versions", "2026-03-03"],
["mgmt-plane", "/subscriptions/{}/providers/microsoft.compute/locations/{}/communitygalleries/{}/images/{}/versions", "2023-07-03"],
]
}

Expand All @@ -49,9 +49,6 @@ def _build_arguments_schema(cls, *args, **kwargs):
options=["-i", "--gallery-image-definition"],
help="The name of the community gallery image definition from which the image versions are to be listed.",
required=True,
fmt=AAZStrArgFormat(
pattern="",
),
)
_args_schema.location = AAZResourceLocationArg(
required=True,
Expand All @@ -60,9 +57,6 @@ def _build_arguments_schema(cls, *args, **kwargs):
options=["--public-gallery-name"],
help="The public name of the community gallery.",
required=True,
fmt=AAZStrArgFormat(
pattern="",
),
)
return cls._args_schema

Expand Down Expand Up @@ -136,7 +130,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2026-03-03",
"api-version", "2023-07-03",
required=True,
),
}
Expand Down Expand Up @@ -205,21 +199,13 @@ def _build_schema_on_200(cls):
properties.artifact_tags = AAZDictType(
serialized_name="artifactTags",
)
properties.consumption_end_time = AAZStrType(
serialized_name="consumptionEndTime",
flags={"read_only": True},
)
properties.disclaimer = AAZStrType()
properties.end_of_life_date = AAZStrType(
serialized_name="endOfLifeDate",
)
properties.exclude_from_latest = AAZBoolType(
serialized_name="excludeFromLatest",
)
properties.image_state = AAZStrType(
serialized_name="imageState",
flags={"read_only": True},
)
properties.published_date = AAZStrType(
serialized_name="publishedDate",
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ class ListShared(AAZCommand):
"""

_aaz_info = {
"version": "2026-03-03",
"version": "2023-07-03",
"resources": [
["mgmt-plane", "/subscriptions/{}/providers/microsoft.compute/locations/{}/sharedgalleries/{}/images/{}/versions", "2026-03-03"],
["mgmt-plane", "/subscriptions/{}/providers/microsoft.compute/locations/{}/sharedgalleries/{}/images/{}/versions", "2023-07-03"],
]
}

Expand All @@ -52,17 +52,11 @@ def _build_arguments_schema(cls, *args, **kwargs):
options=["-i", "--gallery-image-definition"],
help="The name of the Shared Gallery Image Definition from which the Image Versions are to be listed.",
required=True,
fmt=AAZStrArgFormat(
pattern="",
),
)
_args_schema.gallery_unique_name = AAZStrArg(
options=["--gallery-unique-name"],
help="The unique name of the Shared Gallery.",
required=True,
fmt=AAZStrArgFormat(
pattern="",
),
)
_args_schema.location = AAZResourceLocationArg(
required=True,
Expand Down Expand Up @@ -147,7 +141,7 @@ def query_parameters(self):
"sharedTo", self.ctx.args.shared_to,
),
**self.serialize_query_param(
"api-version", "2026-03-03",
"api-version", "2023-07-03",
required=True,
),
}
Expand Down Expand Up @@ -213,20 +207,12 @@ def _build_schema_on_200(cls):
properties.artifact_tags = AAZDictType(
serialized_name="artifactTags",
)
properties.consumption_end_time = AAZStrType(
serialized_name="consumptionEndTime",
flags={"read_only": True},
)
properties.end_of_life_date = AAZStrType(
serialized_name="endOfLifeDate",
)
properties.exclude_from_latest = AAZBoolType(
serialized_name="excludeFromLatest",
)
properties.image_state = AAZStrType(
serialized_name="imageState",
flags={"read_only": True},
)
properties.published_date = AAZStrType(
serialized_name="publishedDate",
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ class ShowCommunity(AAZCommand):
"""

_aaz_info = {
"version": "2026-03-03",
"version": "2022-01-03",
"resources": [
["mgmt-plane", "/subscriptions/{}/providers/microsoft.compute/locations/{}/communitygalleries/{}/images/{}/versions/{}", "2026-03-03"],
["mgmt-plane", "/subscriptions/{}/providers/microsoft.compute/locations/{}/communitygalleries/{}/images/{}/versions/{}", "2022-01-03"],
]
}

Expand Down Expand Up @@ -138,7 +138,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2026-03-03",
"api-version", "2022-01-03",
required=True,
),
}
Expand Down Expand Up @@ -193,34 +193,19 @@ def _build_schema_on_200(cls):
)

properties = cls._schema_on_200.properties
properties.artifact_tags = AAZDictType(
serialized_name="artifactTags",
)
properties.consumption_end_time = AAZStrType(
serialized_name="consumptionEndTime",
flags={"read_only": True},
)
properties.disclaimer = AAZStrType()
properties.end_of_life_date = AAZStrType(
serialized_name="endOfLifeDate",
)
properties.exclude_from_latest = AAZBoolType(
serialized_name="excludeFromLatest",
)
properties.image_state = AAZStrType(
serialized_name="imageState",
flags={"read_only": True},
)
properties.published_date = AAZStrType(
serialized_name="publishedDate",
)
properties.storage_profile = AAZObjectType(
serialized_name="storageProfile",
)

artifact_tags = cls._schema_on_200.properties.artifact_tags
artifact_tags.Element = AAZStrType()

storage_profile = cls._schema_on_200.properties.storage_profile
storage_profile.data_disk_images = AAZListType(
serialized_name="dataDiskImages",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class ShowShared(AAZCommand):
"""

_aaz_info = {
"version": "2026-03-03",
"version": "2022-01-03",
"resources": [
["mgmt-plane", "/subscriptions/{}/providers/microsoft.compute/locations/{}/sharedgalleries/{}/images/{}/versions/{}", "2026-03-03"],
["mgmt-plane", "/subscriptions/{}/providers/microsoft.compute/locations/{}/sharedgalleries/{}/images/{}/versions/{}", "2022-01-03"],
]
}

Expand All @@ -49,27 +49,18 @@ def _build_arguments_schema(cls, *args, **kwargs):
help="The name of the Shared Gallery Image Definition from which the Image Versions are to be listed.",
required=True,
id_part="child_name_2",
fmt=AAZStrArgFormat(
pattern="",
),
)
_args_schema.gallery_image_version_name = AAZStrArg(
options=["-e", "--gallery-image-version", "--gallery-image-version-name"],
help="The name of the gallery image version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: `<MajorVersion>.<MinorVersion>.<Patch>`",
required=True,
id_part="child_name_3",
fmt=AAZStrArgFormat(
pattern="",
),
)
_args_schema.gallery_unique_name = AAZStrArg(
options=["--gallery-unique-name"],
help="The unique name of the Shared Gallery.",
required=True,
id_part="child_name_1",
fmt=AAZStrArgFormat(
pattern="",
),
)
_args_schema.location = AAZResourceLocationArg(
required=True,
Expand Down Expand Up @@ -150,7 +141,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2026-03-03",
"api-version", "2022-01-03",
required=True,
),
}
Expand Down Expand Up @@ -202,33 +193,19 @@ def _build_schema_on_200(cls):
)

properties = cls._schema_on_200.properties
properties.artifact_tags = AAZDictType(
serialized_name="artifactTags",
)
properties.consumption_end_time = AAZStrType(
serialized_name="consumptionEndTime",
flags={"read_only": True},
)
properties.end_of_life_date = AAZStrType(
serialized_name="endOfLifeDate",
)
properties.exclude_from_latest = AAZBoolType(
serialized_name="excludeFromLatest",
)
properties.image_state = AAZStrType(
serialized_name="imageState",
flags={"read_only": True},
)
properties.published_date = AAZStrType(
serialized_name="publishedDate",
)
properties.storage_profile = AAZObjectType(
serialized_name="storageProfile",
)

artifact_tags = cls._schema_on_200.properties.artifact_tags
artifact_tags.Element = AAZStrType()

storage_profile = cls._schema_on_200.properties.storage_profile
storage_profile.data_disk_images = AAZListType(
serialized_name="dataDiskImages",
Expand Down
Loading
Loading