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

[Stack-hci] Bump up Stack-hci API version to 2023-08-01 #7082

Merged
merged 1 commit into from
Dec 21, 2023
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
5 changes: 5 additions & 0 deletions src/stack-hci/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
Release History
===============

1.1.0
++++++
* Upgrade api-version to 2023-08-01
* `az stack-hci arc-setting create/update`: Add new properties `serviceConfigurations` for `--connectivity-properties` to support setting service configurations

1.0.0
++++++
* `az stack-hci extension create`: change `--settings/--protected-settings` as custom properties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class ConsentAndInstallDefaultExtension(AAZCommand):
"""

_aaz_info = {
"version": "2023-03-01",
"version": "2023-08-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azurestackhci/clusters/{}/arcsettings/{}/consentandinstalldefaultextensions", "2023-03-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azurestackhci/clusters/{}/arcsettings/{}/consentandinstalldefaultextensions", "2023-08-01"],
]
}

Expand Down Expand Up @@ -130,7 +130,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-03-01",
"api-version", "2023-08-01",
required=True,
),
}
Expand Down Expand Up @@ -218,6 +218,21 @@ def _build_schema_on_200(cls):

connectivity_properties = cls._schema_on_200.properties.connectivity_properties
connectivity_properties.enabled = AAZBoolType()
connectivity_properties.service_configurations = AAZListType(
serialized_name="serviceConfigurations",
)

service_configurations = cls._schema_on_200.properties.connectivity_properties.service_configurations
service_configurations.Element = AAZObjectType()

_element = cls._schema_on_200.properties.connectivity_properties.service_configurations.Element
_element.port = AAZIntType(
flags={"required": True},
)
_element.service_name = AAZStrType(
serialized_name="serviceName",
flags={"required": True},
)

default_extensions = cls._schema_on_200.properties.default_extensions
default_extensions.Element = AAZObjectType()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class Create(AAZCommand):
"""

_aaz_info = {
"version": "2023-03-01",
"version": "2023-08-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azurestackhci/clusters/{}/arcsettings/{}", "2023-03-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azurestackhci/clusters/{}/arcsettings/{}", "2023-08-01"],
]
}

Expand Down Expand Up @@ -97,6 +97,26 @@ def _build_arguments_schema(cls, *args, **kwargs):
options=["enabled"],
help="True indicates ARC connectivity is enabled",
)
connectivity_properties.service_configurations = AAZListArg(
options=["service-configurations"],
help="Service configurations associated with the connectivity resource. They are only processed by the server if 'enabled' property is set to 'true'.",
)

service_configurations = cls._args_schema.connectivity_properties.service_configurations
service_configurations.Element = AAZObjectArg()

_element = cls._args_schema.connectivity_properties.service_configurations.Element
_element.port = AAZIntArg(
options=["port"],
help="The port on which service is enabled.",
required=True,
)
_element.service_name = AAZStrArg(
options=["service-name"],
help="Name of the service.",
required=True,
enum={"WAC": "WAC"},
)
return cls._args_schema

def _execute_operations(self):
Expand Down Expand Up @@ -168,7 +188,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-03-01",
"api-version", "2023-08-01",
required=True,
),
}
Expand Down Expand Up @@ -207,6 +227,16 @@ def content(self):
connectivity_properties = _builder.get(".properties.connectivityProperties")
if connectivity_properties is not None:
connectivity_properties.set_prop("enabled", AAZBoolType, ".enabled")
connectivity_properties.set_prop("serviceConfigurations", AAZListType, ".service_configurations")

service_configurations = _builder.get(".properties.connectivityProperties.serviceConfigurations")
if service_configurations is not None:
service_configurations.set_elements(AAZObjectType, ".")

_elements = _builder.get(".properties.connectivityProperties.serviceConfigurations[]")
if _elements is not None:
_elements.set_prop("port", AAZIntType, ".port", typ_kwargs={"flags": {"required": True}})
_elements.set_prop("serviceName", AAZStrType, ".service_name", typ_kwargs={"flags": {"required": True}})

return self.serialize_content(_content_value)

Expand Down Expand Up @@ -283,6 +313,21 @@ def _build_schema_on_200(cls):

connectivity_properties = cls._schema_on_200.properties.connectivity_properties
connectivity_properties.enabled = AAZBoolType()
connectivity_properties.service_configurations = AAZListType(
serialized_name="serviceConfigurations",
)

service_configurations = cls._schema_on_200.properties.connectivity_properties.service_configurations
service_configurations.Element = AAZObjectType()

_element = cls._schema_on_200.properties.connectivity_properties.service_configurations.Element
_element.port = AAZIntType(
flags={"required": True},
)
_element.service_name = AAZStrType(
serialized_name="serviceName",
flags={"required": True},
)

default_extensions = cls._schema_on_200.properties.default_extensions
default_extensions.Element = AAZObjectType()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class CreateIdentity(AAZCommand):
"""

_aaz_info = {
"version": "2023-03-01",
"version": "2023-08-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azurestackhci/clusters/{}/arcsettings/{}/createarcidentity", "2023-03-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azurestackhci/clusters/{}/arcsettings/{}/createarcidentity", "2023-08-01"],
]
}

Expand Down Expand Up @@ -147,7 +147,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-03-01",
"api-version", "2023-08-01",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ class Delete(AAZCommand):
"""

_aaz_info = {
"version": "2023-03-01",
"version": "2023-08-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azurestackhci/clusters/{}/arcsettings/{}", "2023-03-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azurestackhci/clusters/{}/arcsettings/{}", "2023-08-01"],
]
}

Expand Down Expand Up @@ -153,7 +153,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-03-01",
"api-version", "2023-08-01",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class GeneratePassword(AAZCommand):
"""

_aaz_info = {
"version": "2023-03-01",
"version": "2023-08-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azurestackhci/clusters/{}/arcsettings/{}/generatepassword", "2023-03-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azurestackhci/clusters/{}/arcsettings/{}/generatepassword", "2023-08-01"],
]
}

Expand Down Expand Up @@ -130,7 +130,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-03-01",
"api-version", "2023-08-01",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class InitializeDisableProces(AAZCommand):
"""

_aaz_info = {
"version": "2023-03-01",
"version": "2023-08-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azurestackhci/clusters/{}/arcsettings/{}/initializedisableprocess", "2023-03-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azurestackhci/clusters/{}/arcsettings/{}/initializedisableprocess", "2023-08-01"],
]
}

Expand Down Expand Up @@ -143,7 +143,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-03-01",
"api-version", "2023-08-01",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@ class List(AAZCommand):
"""

_aaz_info = {
"version": "2023-03-01",
"version": "2023-08-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azurestackhci/clusters/{}/arcsettings", "2023-03-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azurestackhci/clusters/{}/arcsettings", "2023-08-01"],
]
}

AZ_SUPPORT_PAGINATION = True

def _handler(self, command_args):
super()._handler(command_args)
return self.build_paging(self._execute_operations, self._output)
Expand Down Expand Up @@ -119,7 +121,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-03-01",
"api-version", "2023-08-01",
required=True,
),
}
Expand Down Expand Up @@ -219,6 +221,21 @@ def _build_schema_on_200(cls):

connectivity_properties = cls._schema_on_200.value.Element.properties.connectivity_properties
connectivity_properties.enabled = AAZBoolType()
connectivity_properties.service_configurations = AAZListType(
serialized_name="serviceConfigurations",
)

service_configurations = cls._schema_on_200.value.Element.properties.connectivity_properties.service_configurations
service_configurations.Element = AAZObjectType()

_element = cls._schema_on_200.value.Element.properties.connectivity_properties.service_configurations.Element
_element.port = AAZIntType(
flags={"required": True},
)
_element.service_name = AAZStrType(
serialized_name="serviceName",
flags={"required": True},
)

default_extensions = cls._schema_on_200.value.Element.properties.default_extensions
default_extensions.Element = AAZObjectType()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class Show(AAZCommand):
"""

_aaz_info = {
"version": "2023-03-01",
"version": "2023-08-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azurestackhci/clusters/{}/arcsettings/{}", "2023-03-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.azurestackhci/clusters/{}/arcsettings/{}", "2023-08-01"],
]
}

Expand Down Expand Up @@ -130,7 +130,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-03-01",
"api-version", "2023-08-01",
required=True,
),
}
Expand Down Expand Up @@ -218,6 +218,21 @@ def _build_schema_on_200(cls):

connectivity_properties = cls._schema_on_200.properties.connectivity_properties
connectivity_properties.enabled = AAZBoolType()
connectivity_properties.service_configurations = AAZListType(
serialized_name="serviceConfigurations",
)

service_configurations = cls._schema_on_200.properties.connectivity_properties.service_configurations
service_configurations.Element = AAZObjectType()

_element = cls._schema_on_200.properties.connectivity_properties.service_configurations.Element
_element.port = AAZIntType(
flags={"required": True},
)
_element.service_name = AAZStrType(
serialized_name="serviceName",
flags={"required": True},
)

default_extensions = cls._schema_on_200.properties.default_extensions
default_extensions.Element = AAZObjectType()
Expand Down
Loading