Skip to content

Commit

Permalink
Adding 2024-04-10 api version fior AzureLargeInstance (#7690)
Browse files Browse the repository at this point in the history
* Adding 2024-04-10 api version

* Added updates to history.rst and updated version in setup.py

* Updated tests since previous resource was deleted

* Updated recorded tests

* Fixed parameter name

* Fixing parameter names

* Update src/azurelargeinstance/azext_azurelargeinstance/aaz/latest/large_instance/_update.py

---------

Co-authored-by: Ashwin Jeyaseelan <[email protected]>
Co-authored-by: Ashwin Jeyaseelan <[email protected]>
Co-authored-by: kai ru <[email protected]>
  • Loading branch information
4 people committed Jul 2, 2024
1 parent c2164fd commit e269018
Show file tree
Hide file tree
Showing 18 changed files with 219 additions and 101 deletions.
3 changes: 3 additions & 0 deletions src/azurelargeinstance/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
Release History
===============
1.0.0b2
++++++
* Release the first public api version for AzureLargeInstance 2024-04-10, which is the public version of 2023-07-20-preview api.

1.0.0b1
++++++
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------

# pylint: skip-file
# flake8: noqa

Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ class List(AAZCommand):
"""

_aaz_info = {
"version": "2023-07-20-preview",
"version": "2024-04-10",
"resources": [
["mgmt-plane", "/subscriptions/{}/providers/microsoft.azurelargeinstance/azurelargeinstances", "2023-07-20-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azurelargeinstance/azurelargeinstances", "2023-07-20-preview"],
["mgmt-plane", "/subscriptions/{}/providers/microsoft.azurelargeinstance/azurelargeinstances", "2024-04-10"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azurelargeinstance/azurelargeinstances", "2024-04-10"],
]
}

Expand Down Expand Up @@ -119,7 +119,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-07-20-preview",
"api-version", "2024-04-10",
required=True,
),
}
Expand Down Expand Up @@ -155,7 +155,9 @@ def _build_schema_on_200(cls):
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
)
_schema_on_200.value = AAZListType()
_schema_on_200.value = AAZListType(
flags={"required": True},
)

value = cls._schema_on_200.value
value.Element = AAZObjectType()
Expand Down Expand Up @@ -200,9 +202,6 @@ def _build_schema_on_200(cls):
properties.os_profile = AAZObjectType(
serialized_name="osProfile",
)
properties.partner_node_id = AAZStrType(
serialized_name="partnerNodeId",
)
properties.power_state = AAZStrType(
serialized_name="powerState",
flags={"read_only": True},
Expand Down Expand Up @@ -347,7 +346,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-07-20-preview",
"api-version", "2024-04-10",
required=True,
),
}
Expand Down Expand Up @@ -383,7 +382,9 @@ def _build_schema_on_200(cls):
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
)
_schema_on_200.value = AAZListType()
_schema_on_200.value = AAZListType(
flags={"required": True},
)

value = cls._schema_on_200.value
value.Element = AAZObjectType()
Expand Down Expand Up @@ -428,9 +429,6 @@ def _build_schema_on_200(cls):
properties.os_profile = AAZObjectType(
serialized_name="osProfile",
)
properties.partner_node_id = AAZStrType(
serialized_name="partnerNodeId",
)
properties.power_state = AAZStrType(
serialized_name="powerState",
flags={"read_only": True},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class Restart(AAZCommand):
"""

_aaz_info = {
"version": "2023-07-20-preview",
"version": "2024-04-10",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azurelargeinstance/azurelargeinstances/{}/restart", "2023-07-20-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azurelargeinstance/azurelargeinstances/{}/restart", "2024-04-10"],
]
}

Expand Down Expand Up @@ -150,7 +150,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-07-20-preview",
"api-version", "2024-04-10",
required=True,
),
}
Expand Down Expand Up @@ -239,6 +239,9 @@ def _build_schema_error_detail_read(cls, _schema):
additional_info.Element = AAZObjectType()

_element = _schema_error_detail_read.additional_info.Element
_element.info = AAZObjectType(
flags={"read_only": True},
)
_element.type = AAZStrType(
flags={"read_only": True},
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,17 @@
"large-instance show",
)
class Show(AAZCommand):
"""Get an Azure Large Instance for the specified subscription, resource group, and instance name.
"""Get an Azure Large Instance for the specified subscription, resource group,
and instance name.
:example: To show details about an Azure Large Instance
az large-instance show --subscription $SUBSCRIPTION_ID --instance-name $INSTANCE_NAME --resource-group $RESOURCE_GROUP
"""

_aaz_info = {
"version": "2023-07-20-preview",
"version": "2024-04-10",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azurelargeinstance/azurelargeinstances/{}", "2023-07-20-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azurelargeinstance/azurelargeinstances/{}", "2024-04-10"],
]
}

Expand Down Expand Up @@ -123,7 +124,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-07-20-preview",
"api-version", "2024-04-10",
required=True,
),
}
Expand Down Expand Up @@ -195,9 +196,6 @@ def _build_schema_on_200(cls):
properties.os_profile = AAZObjectType(
serialized_name="osProfile",
)
properties.partner_node_id = AAZStrType(
serialized_name="partnerNodeId",
)
properties.power_state = AAZStrType(
serialized_name="powerState",
flags={"read_only": True},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class Shutdown(AAZCommand):
"""

_aaz_info = {
"version": "2023-07-20-preview",
"version": "2024-04-10",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azurelargeinstance/azurelargeinstances/{}/shutdown", "2023-07-20-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azurelargeinstance/azurelargeinstances/{}/shutdown", "2024-04-10"],
]
}

Expand Down Expand Up @@ -140,7 +140,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-07-20-preview",
"api-version", "2024-04-10",
required=True,
),
}
Expand Down Expand Up @@ -215,6 +215,9 @@ def _build_schema_error_detail_read(cls, _schema):
additional_info.Element = AAZObjectType()

_element = _schema_error_detail_read.additional_info.Element
_element.info = AAZObjectType(
flags={"read_only": True},
)
_element.type = AAZStrType(
flags={"read_only": True},
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class Start(AAZCommand):
"""

_aaz_info = {
"version": "2023-07-20-preview",
"version": "2024-04-10",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azurelargeinstance/azurelargeinstances/{}/start", "2023-07-20-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azurelargeinstance/azurelargeinstances/{}/start", "2024-04-10"],
]
}

Expand Down Expand Up @@ -140,7 +140,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-07-20-preview",
"api-version", "2024-04-10",
required=True,
),
}
Expand Down Expand Up @@ -215,6 +215,9 @@ def _build_schema_error_detail_read(cls, _schema):
additional_info.Element = AAZObjectType()

_element = _schema_error_detail_read.additional_info.Element
_element.info = AAZObjectType(
flags={"read_only": True},
)
_element.type = AAZStrType(
flags={"read_only": True},
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,17 @@
"large-instance update",
)
class Update(AAZCommand):
"""Update the Tags field of an Azure Large Instance for the specified subscription, resource group, and instance name.
"""Update the Tags field of an Azure Large Instance for the specified
subscription, resource group, and instance name.
:example: To add an Azure Large Instance tag
az large-instance update --subscription $SUBSCRIPTION_ID --instance-name=$INSTANCE_NAME --resource-group=$RESOURCE_GROUP --tags newKey=value
az large-instance update --instance-name=$INSTANCE_NAME --resource-group=$RESOURCE_GROUP --tags newKey=value
"""

_aaz_info = {
"version": "2023-07-20-preview",
"version": "2024-04-10",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azurelargeinstance/azurelargeinstances/{}", "2023-07-20-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azurelargeinstance/azurelargeinstances/{}", "2024-04-10"],
]
}

Expand Down Expand Up @@ -63,7 +64,7 @@ def _build_arguments_schema(cls, *args, **kwargs):
_args_schema.tags = AAZDictArg(
options=["--tags"],
arg_group="TagsParameter",
help="Tags field of the AzureLargeInstance instance.",
help="Resource tags.",
)

tags = cls._args_schema.tags
Expand Down Expand Up @@ -135,7 +136,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-07-20-preview",
"api-version", "2024-04-10",
required=True,
),
}
Expand Down Expand Up @@ -225,9 +226,6 @@ def _build_schema_on_200(cls):
properties.os_profile = AAZObjectType(
serialized_name="osProfile",
)
properties.partner_node_id = AAZStrType(
serialized_name="partnerNodeId",
)
properties.power_state = AAZStrType(
serialized_name="powerState",
flags={"read_only": True},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,17 @@
"large-storage-instance list",
)
class List(AAZCommand):
"""List a list of AzureLargeStorageInstances in the specified subscription. The operations returns various properties of each Azure LargeStorage instance.
:example: To list Azure Large Storage Instances in a subscription
az large-storage-instance list --subscription $SUBSCRIPTION_ID
"""List a list of Azure Large Storage Instances in the specified subscription. The operations returns various properties of each Azure Large Storage instance.
:example: To list Azure Large Storage Instances in a specific subscription and resource group
az azurelargestorageinstance list --subscription $SUBSCRIPTIONID --resource-group $RESOURCE_GROUP
az large-storage-instance list --subscription $SUBSCRIPTIONID --resource-group $RESOURCE_GROUP
"""

_aaz_info = {
"version": "2023-07-20-preview",
"version": "2024-04-10",
"resources": [
["mgmt-plane", "/subscriptions/{}/providers/microsoft.azurelargeinstance/azurelargestorageinstances", "2023-07-20-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azurelargeinstance/azurelargestorageinstances", "2023-07-20-preview"],
["mgmt-plane", "/subscriptions/{}/providers/microsoft.azurelargeinstance/azurelargestorageinstances", "2024-04-10"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azurelargeinstance/azurelargestorageinstances", "2024-04-10"],
]
}

Expand Down Expand Up @@ -119,7 +116,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-07-20-preview",
"api-version", "2024-04-10",
required=True,
),
}
Expand Down Expand Up @@ -155,7 +152,9 @@ def _build_schema_on_200(cls):
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
)
_schema_on_200.value = AAZListType()
_schema_on_200.value = AAZListType(
flags={"required": True},
)

value = cls._schema_on_200.value
value.Element = AAZObjectType()
Expand Down Expand Up @@ -200,6 +199,7 @@ def _build_schema_on_200(cls):
)
storage_properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
storage_properties.storage_billing_properties = AAZObjectType(
serialized_name="storageBillingProperties",
Expand Down Expand Up @@ -282,7 +282,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-07-20-preview",
"api-version", "2024-04-10",
required=True,
),
}
Expand Down Expand Up @@ -318,7 +318,9 @@ def _build_schema_on_200(cls):
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
)
_schema_on_200.value = AAZListType()
_schema_on_200.value = AAZListType(
flags={"required": True},
)

value = cls._schema_on_200.value
value.Element = AAZObjectType()
Expand Down Expand Up @@ -363,6 +365,7 @@ def _build_schema_on_200(cls):
)
storage_properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
storage_properties.storage_billing_properties = AAZObjectType(
serialized_name="storageBillingProperties",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,17 @@
"large-storage-instance show",
)
class Show(AAZCommand):
"""Get an Azure Large Storage instance for the specified subscription, resource group, and instance name.
"""Get an Azure Large Storage instance for the specified subscription, resource
group, and instance name.
:example: To show details about a specific Azure Large Storage Instance
az large-storage-instance show --subscription $SUBSCRIPTION_ID --instance-name $INSTANCE_NAME --resource-group $RESOURCE_GROUP
"""

_aaz_info = {
"version": "2023-07-20-preview",
"version": "2024-04-10",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azurelargeinstance/azurelargestorageinstances/{}", "2023-07-20-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azurelargeinstance/azurelargestorageinstances/{}", "2024-04-10"],
]
}

Expand Down Expand Up @@ -123,7 +124,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-07-20-preview",
"api-version", "2024-04-10",
required=True,
),
}
Expand Down Expand Up @@ -195,6 +196,7 @@ def _build_schema_on_200(cls):
)
storage_properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
storage_properties.storage_billing_properties = AAZObjectType(
serialized_name="storageBillingProperties",
Expand Down
Loading

0 comments on commit e269018

Please sign in to comment.