diff --git a/src/managednetworkfabric/HISTORY.rst b/src/managednetworkfabric/HISTORY.rst index abbff5a61a7..5f15e212fca 100644 --- a/src/managednetworkfabric/HISTORY.rst +++ b/src/managednetworkfabric/HISTORY.rst @@ -3,6 +3,11 @@ Release History =============== +1.0.0b2 +++++++ +* Updated latest swagger specification. +* Removed commands which are not required. + 1.0.0b1 ++++++ * Initial release. \ No newline at end of file diff --git a/src/managednetworkfabric/README.md b/src/managednetworkfabric/README.md index 53009b777f4..d7a76b5b3c3 100644 --- a/src/managednetworkfabric/README.md +++ b/src/managednetworkfabric/README.md @@ -21,13 +21,10 @@ Below is a high-level overview of managednetworkfabric commands. | Commands | Description| | ------------- | ------------- | -| az networkfabric acl | Manage Access Control List Resource. | | az networkfabric controller | Manage Network Fabric Controller Resource. | | az networkfabric device | Manage Network Device Resource. | -| az networkfabric devicesku | Manage Network Device SKU Resource. | | az networkfabric externalnetwork | Manage External Network Resource. | | az networkfabric fabric | Manage Network Fabric Resource. | -| az networkfabric fabricsku | Manage Network Fabric SKU Resource. | | az networkfabric interface | Manage Network Interface Resource. | | az networkfabric internalnetwork | Manage Internal Network Resource. | | az networkfabric ipcommunity | Manage Ip Community Resource. | @@ -37,5 +34,4 @@ Below is a high-level overview of managednetworkfabric commands. | az networkfabric l3domain | Manage L3 Isolation Domain Resource. | | az networkfabric nni | Manage Network To Network Interconnect Resource. | | az networkfabric rack | Manage Network Rack Resource. | -| az networkfabric racksku | Manage Network Rack SKU Resource. | | az networkfabric routepolicy | Manage Route Policy Resource. | \ No newline at end of file diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/acl/__cmd_group.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/acl/__cmd_group.py deleted file mode 100644 index ec881b4c5a8..00000000000 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/acl/__cmd_group.py +++ /dev/null @@ -1,23 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command_group( - "networkfabric acl", -) -class __CMDGroup(AAZCommandGroup): - """Manage Access Control List Resource - """ - pass - - -__all__ = ["__CMDGroup"] diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/acl/__init__.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/acl/__init__.py deleted file mode 100644 index efc3964e3fb..00000000000 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/acl/__init__.py +++ /dev/null @@ -1,15 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from .__cmd_group import * -from ._create import * -from ._delete import * -from ._list import * -from ._show import * diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/acl/_create.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/acl/_create.py deleted file mode 100644 index 9fbbf0e57fb..00000000000 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/acl/_create.py +++ /dev/null @@ -1,384 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "networkfabric acl create", -) -class Create(AAZCommand): - """Create a Access Control List resource - - :example: Creates a Access Control List resource. - az networkfabric acl create --resource-group "example-rg" --location "westus3" --resource-name "example-accesscontrollist" --address-family "ipv4" --conditions "[{sequenceNumber:123,action:allow,destinationAddress:'1.1.10.10',destinationPort:1254,sourceAddress:'1.1.1.0/24',sourcePort:1276,protocol:255,annotation:asdf}]" - - :example: Help text for sub parameters under the specific parent can be viewed by using the shorthand syntax '??'. See https://github.com/Azure/azure-cli/tree/dev/doc/shorthand_syntax.md for more about shorthand syntax. - az networkfabric acl create --conditions ?? - """ - - _aaz_info = { - "version": "2023-02-01-preview", - "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/accesscontrollists/{}", "2023-02-01-preview"], - ] - } - - def _handler(self, command_args): - super()._handler(command_args) - self._execute_operations() - return self._output() - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.resource_name = AAZStrArg( - options=["--resource-name"], - help="Name of the Access Control List", - required=True, - ) - _args_schema.resource_group = AAZResourceGroupNameArg( - help="Name of the resource group", - required=True, - ) - - # define Arg Group "Body" - - _args_schema = cls._args_schema - _args_schema.location = AAZResourceLocationArg( - arg_group="Body", - help="Location of Azure region", - required=True, - fmt=AAZResourceLocationArgFormat( - resource_group_arg="resource_group", - ), - ) - _args_schema.tags = AAZDictArg( - options=["--tags"], - arg_group="Body", - help="Resource tags.", - ) - - tags = cls._args_schema.tags - tags.Element = AAZStrArg() - - # define Arg Group "Properties" - - _args_schema = cls._args_schema - _args_schema.address_family = AAZStrArg( - options=["--address-family"], - arg_group="Properties", - help="IP address family. Example: ipv4 | ipv6.", - required=True, - enum={"ipv4": "ipv4", "ipv6": "ipv6"}, - ) - _args_schema.annotation = AAZStrArg( - options=["--annotation"], - arg_group="Properties", - help="Switch configuration description.", - ) - _args_schema.conditions = AAZListArg( - options=["--conditions"], - arg_group="Properties", - help="Access Control List conditions.", - required=True, - ) - - conditions = cls._args_schema.conditions - conditions.Element = AAZObjectArg() - - _element = cls._args_schema.conditions.Element - _element.action = AAZStrArg( - options=["action"], - help="action. Example: allow | deny.", - required=True, - enum={"allow": "allow", "deny": "deny"}, - ) - _element.annotation = AAZStrArg( - options=["annotation"], - help="Switch configuration description.", - ) - _element.destination_address = AAZStrArg( - options=["destination-address"], - help="destinationAddress. Example: any | 1.1.1.0/24 | 1.1.10.10", - required=True, - ) - _element.destination_port = AAZStrArg( - options=["destination-port"], - help="destinationPort. Example: any | 1253", - required=True, - ) - _element.protocol = AAZIntArg( - options=["protocol"], - help="TCP/IP protocol as defined in the list of IP protocol numbers. Example: 255 (any) | 0 | 1.", - required=True, - ) - _element.sequence_number = AAZIntArg( - options=["sequence-number"], - help="sequenceNumber of the Access Control List.", - required=True, - ) - _element.source_address = AAZStrArg( - options=["source-address"], - help="sourceAddress. Example: any | 1.1.1.0/24 | 1.1.10.10", - required=True, - ) - _element.source_port = AAZStrArg( - options=["source-port"], - help="sourcePort. Example: any | 1253", - required=True, - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - self.AccessControlListsCreate(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - def _output(self, *args, **kwargs): - result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) - return result - - class AccessControlListsCreate(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [200]: - return self.on_200(session) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}", - **self.url_parameters - ) - - @property - def method(self): - return "PUT" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "accessControlListName", self.ctx.args.resource_name, - required=True, - ), - **self.serialize_url_param( - "resourceGroupName", self.ctx.args.resource_group, - required=True, - ), - **self.serialize_url_param( - "subscriptionId", self.ctx.subscription_id, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2023-02-01-preview", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Content-Type", "application/json", - ), - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - @property - def content(self): - _content_value, _builder = self.new_content_builder( - self.ctx.args, - typ=AAZObjectType, - typ_kwargs={"flags": {"required": True, "client_flatten": True}} - ) - _builder.set_prop("location", AAZStrType, ".location", typ_kwargs={"flags": {"required": True}}) - _builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={"flags": {"required": True, "client_flatten": True}}) - _builder.set_prop("tags", AAZDictType, ".tags") - - properties = _builder.get(".properties") - if properties is not None: - properties.set_prop("addressFamily", AAZStrType, ".address_family", typ_kwargs={"flags": {"required": True}}) - properties.set_prop("annotation", AAZStrType, ".annotation") - properties.set_prop("conditions", AAZListType, ".conditions", typ_kwargs={"flags": {"required": True}}) - - conditions = _builder.get(".properties.conditions") - if conditions is not None: - conditions.set_elements(AAZObjectType, ".") - - _elements = _builder.get(".properties.conditions[]") - if _elements is not None: - _elements.set_prop("action", AAZStrType, ".action", typ_kwargs={"flags": {"required": True}}) - _elements.set_prop("annotation", AAZStrType, ".annotation") - _elements.set_prop("destinationAddress", AAZStrType, ".destination_address", typ_kwargs={"flags": {"required": True}}) - _elements.set_prop("destinationPort", AAZStrType, ".destination_port", typ_kwargs={"flags": {"required": True}}) - _elements.set_prop("protocol", AAZIntType, ".protocol", typ_kwargs={"flags": {"required": True}}) - _elements.set_prop("sequenceNumber", AAZIntType, ".sequence_number", typ_kwargs={"flags": {"required": True}}) - _elements.set_prop("sourceAddress", AAZStrType, ".source_address", typ_kwargs={"flags": {"required": True}}) - _elements.set_prop("sourcePort", AAZStrType, ".source_port", typ_kwargs={"flags": {"required": True}}) - - tags = _builder.get(".tags") - if tags is not None: - tags.set_elements(AAZStrType, ".") - - return self.serialize_content(_content_value) - - def on_200(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200 - ) - - _schema_on_200 = None - - @classmethod - def _build_schema_on_200(cls): - if cls._schema_on_200 is not None: - return cls._schema_on_200 - - cls._schema_on_200 = AAZObjectType() - - _schema_on_200 = cls._schema_on_200 - _schema_on_200.id = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200.location = AAZStrType( - flags={"required": True}, - ) - _schema_on_200.name = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200.properties = AAZObjectType( - flags={"required": True, "client_flatten": True}, - ) - _schema_on_200.system_data = AAZObjectType( - serialized_name="systemData", - flags={"read_only": True}, - ) - _schema_on_200.tags = AAZDictType() - _schema_on_200.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = cls._schema_on_200.properties - properties.address_family = AAZStrType( - serialized_name="addressFamily", - flags={"required": True}, - ) - properties.annotation = AAZStrType() - properties.conditions = AAZListType( - flags={"required": True}, - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - - conditions = cls._schema_on_200.properties.conditions - conditions.Element = AAZObjectType() - - _element = cls._schema_on_200.properties.conditions.Element - _element.action = AAZStrType( - flags={"required": True}, - ) - _element.annotation = AAZStrType() - _element.destination_address = AAZStrType( - serialized_name="destinationAddress", - flags={"required": True}, - ) - _element.destination_port = AAZStrType( - serialized_name="destinationPort", - flags={"required": True}, - ) - _element.protocol = AAZIntType( - flags={"required": True}, - ) - _element.sequence_number = AAZIntType( - serialized_name="sequenceNumber", - flags={"required": True}, - ) - _element.source_address = AAZStrType( - serialized_name="sourceAddress", - flags={"required": True}, - ) - _element.source_port = AAZStrType( - serialized_name="sourcePort", - flags={"required": True}, - ) - - system_data = cls._schema_on_200.system_data - system_data.created_at = AAZStrType( - serialized_name="createdAt", - ) - system_data.created_by = AAZStrType( - serialized_name="createdBy", - ) - system_data.created_by_type = AAZStrType( - serialized_name="createdByType", - ) - system_data.last_modified_at = AAZStrType( - serialized_name="lastModifiedAt", - ) - system_data.last_modified_by = AAZStrType( - serialized_name="lastModifiedBy", - ) - system_data.last_modified_by_type = AAZStrType( - serialized_name="lastModifiedByType", - ) - - tags = cls._schema_on_200.tags - tags.Element = AAZStrType() - - return cls._schema_on_200 - - -class _CreateHelper: - """Helper class for Create""" - - -__all__ = ["Create"] diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/acl/_delete.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/acl/_delete.py deleted file mode 100644 index b53b431fe14..00000000000 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/acl/_delete.py +++ /dev/null @@ -1,139 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "networkfabric acl delete", -) -class Delete(AAZCommand): - """Delete the Access Control List resource - - :example: Delete a Access Control List resource - az networkfabric acl delete --resource-group "example-rg" --resource-name "example-acl" - """ - - _aaz_info = { - "version": "2023-02-01-preview", - "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/accesscontrollists/{}", "2023-02-01-preview"], - ] - } - - def _handler(self, command_args): - super()._handler(command_args) - self._execute_operations() - return None - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.resource_name = AAZStrArg( - options=["--resource-name"], - help="Name of the Access Control List", - required=True, - id_part="name", - ) - _args_schema.resource_group = AAZResourceGroupNameArg( - help="Name of the resource group", - required=True, - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - self.AccessControlListsDelete(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - class AccessControlListsDelete(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [200]: - return self.on_200(session) - if session.http_response.status_code in [204]: - return self.on_204(session) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}", - **self.url_parameters - ) - - @property - def method(self): - return "DELETE" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "accessControlListName", self.ctx.args.resource_name, - required=True, - ), - **self.serialize_url_param( - "resourceGroupName", self.ctx.args.resource_group, - required=True, - ), - **self.serialize_url_param( - "subscriptionId", self.ctx.subscription_id, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2023-02-01-preview", - required=True, - ), - } - return parameters - - def on_200(self, session): - pass - - def on_204(self, session): - pass - - -class _DeleteHelper: - """Helper class for Delete""" - - -__all__ = ["Delete"] diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/acl/_list.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/acl/_list.py deleted file mode 100644 index fe449f0e53e..00000000000 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/acl/_list.py +++ /dev/null @@ -1,432 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "networkfabric acl list", -) -class List(AAZCommand): - """List all Access Control Lists in the provided resource group or subscription - - :example: List all Access Control Lists - az networkfabric acl list --resource-group "example-rg" - """ - - _aaz_info = { - "version": "2023-02-01-preview", - "resources": [ - ["mgmt-plane", "/subscriptions/{}/providers/microsoft.managednetworkfabric/accesscontrollists", "2023-02-01-preview"], - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/accesscontrollists", "2023-02-01-preview"], - ] - } - - def _handler(self, command_args): - super()._handler(command_args) - return self.build_paging(self._execute_operations, self._output) - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.resource_group = AAZResourceGroupNameArg( - help="Name of the resource group", - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - condition_0 = has_value(self.ctx.args.resource_group) and has_value(self.ctx.subscription_id) - condition_1 = has_value(self.ctx.subscription_id) and has_value(self.ctx.args.resource_group) is not True - if condition_0: - self.AccessControlListsListByResourceGroup(ctx=self.ctx)() - if condition_1: - self.AccessControlListsListBySubscription(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - def _output(self, *args, **kwargs): - result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) - next_link = self.deserialize_output(self.ctx.vars.instance.next_link) - return result, next_link - - class AccessControlListsListByResourceGroup(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [200]: - return self.on_200(session) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists", - **self.url_parameters - ) - - @property - def method(self): - return "GET" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "resourceGroupName", self.ctx.args.resource_group, - required=True, - ), - **self.serialize_url_param( - "subscriptionId", self.ctx.subscription_id, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2023-02-01-preview", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - def on_200(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200 - ) - - _schema_on_200 = None - - @classmethod - def _build_schema_on_200(cls): - if cls._schema_on_200 is not None: - return cls._schema_on_200 - - cls._schema_on_200 = AAZObjectType() - - _schema_on_200 = cls._schema_on_200 - _schema_on_200.next_link = AAZStrType( - serialized_name="nextLink", - ) - _schema_on_200.value = AAZListType() - - value = cls._schema_on_200.value - value.Element = AAZObjectType() - - _element = cls._schema_on_200.value.Element - _element.id = AAZStrType( - flags={"read_only": True}, - ) - _element.location = AAZStrType( - flags={"required": True}, - ) - _element.name = AAZStrType( - flags={"read_only": True}, - ) - _element.properties = AAZObjectType( - flags={"required": True, "client_flatten": True}, - ) - _element.system_data = AAZObjectType( - serialized_name="systemData", - flags={"read_only": True}, - ) - _element.tags = AAZDictType() - _element.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = cls._schema_on_200.value.Element.properties - properties.address_family = AAZStrType( - serialized_name="addressFamily", - flags={"required": True}, - ) - properties.annotation = AAZStrType() - properties.conditions = AAZListType( - flags={"required": True}, - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - - conditions = cls._schema_on_200.value.Element.properties.conditions - conditions.Element = AAZObjectType() - - _element = cls._schema_on_200.value.Element.properties.conditions.Element - _element.action = AAZStrType( - flags={"required": True}, - ) - _element.annotation = AAZStrType() - _element.destination_address = AAZStrType( - serialized_name="destinationAddress", - flags={"required": True}, - ) - _element.destination_port = AAZStrType( - serialized_name="destinationPort", - flags={"required": True}, - ) - _element.protocol = AAZIntType( - flags={"required": True}, - ) - _element.sequence_number = AAZIntType( - serialized_name="sequenceNumber", - flags={"required": True}, - ) - _element.source_address = AAZStrType( - serialized_name="sourceAddress", - flags={"required": True}, - ) - _element.source_port = AAZStrType( - serialized_name="sourcePort", - flags={"required": True}, - ) - - system_data = cls._schema_on_200.value.Element.system_data - system_data.created_at = AAZStrType( - serialized_name="createdAt", - ) - system_data.created_by = AAZStrType( - serialized_name="createdBy", - ) - system_data.created_by_type = AAZStrType( - serialized_name="createdByType", - ) - system_data.last_modified_at = AAZStrType( - serialized_name="lastModifiedAt", - ) - system_data.last_modified_by = AAZStrType( - serialized_name="lastModifiedBy", - ) - system_data.last_modified_by_type = AAZStrType( - serialized_name="lastModifiedByType", - ) - - tags = cls._schema_on_200.value.Element.tags - tags.Element = AAZStrType() - - return cls._schema_on_200 - - class AccessControlListsListBySubscription(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [200]: - return self.on_200(session) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/accessControlLists", - **self.url_parameters - ) - - @property - def method(self): - return "GET" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "subscriptionId", self.ctx.subscription_id, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2023-02-01-preview", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - def on_200(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200 - ) - - _schema_on_200 = None - - @classmethod - def _build_schema_on_200(cls): - if cls._schema_on_200 is not None: - return cls._schema_on_200 - - cls._schema_on_200 = AAZObjectType() - - _schema_on_200 = cls._schema_on_200 - _schema_on_200.next_link = AAZStrType( - serialized_name="nextLink", - ) - _schema_on_200.value = AAZListType() - - value = cls._schema_on_200.value - value.Element = AAZObjectType() - - _element = cls._schema_on_200.value.Element - _element.id = AAZStrType( - flags={"read_only": True}, - ) - _element.location = AAZStrType( - flags={"required": True}, - ) - _element.name = AAZStrType( - flags={"read_only": True}, - ) - _element.properties = AAZObjectType( - flags={"required": True, "client_flatten": True}, - ) - _element.system_data = AAZObjectType( - serialized_name="systemData", - flags={"read_only": True}, - ) - _element.tags = AAZDictType() - _element.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = cls._schema_on_200.value.Element.properties - properties.address_family = AAZStrType( - serialized_name="addressFamily", - flags={"required": True}, - ) - properties.annotation = AAZStrType() - properties.conditions = AAZListType( - flags={"required": True}, - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - - conditions = cls._schema_on_200.value.Element.properties.conditions - conditions.Element = AAZObjectType() - - _element = cls._schema_on_200.value.Element.properties.conditions.Element - _element.action = AAZStrType( - flags={"required": True}, - ) - _element.annotation = AAZStrType() - _element.destination_address = AAZStrType( - serialized_name="destinationAddress", - flags={"required": True}, - ) - _element.destination_port = AAZStrType( - serialized_name="destinationPort", - flags={"required": True}, - ) - _element.protocol = AAZIntType( - flags={"required": True}, - ) - _element.sequence_number = AAZIntType( - serialized_name="sequenceNumber", - flags={"required": True}, - ) - _element.source_address = AAZStrType( - serialized_name="sourceAddress", - flags={"required": True}, - ) - _element.source_port = AAZStrType( - serialized_name="sourcePort", - flags={"required": True}, - ) - - system_data = cls._schema_on_200.value.Element.system_data - system_data.created_at = AAZStrType( - serialized_name="createdAt", - ) - system_data.created_by = AAZStrType( - serialized_name="createdBy", - ) - system_data.created_by_type = AAZStrType( - serialized_name="createdByType", - ) - system_data.last_modified_at = AAZStrType( - serialized_name="lastModifiedAt", - ) - system_data.last_modified_by = AAZStrType( - serialized_name="lastModifiedBy", - ) - system_data.last_modified_by_type = AAZStrType( - serialized_name="lastModifiedByType", - ) - - tags = cls._schema_on_200.value.Element.tags - tags.Element = AAZStrType() - - return cls._schema_on_200 - - -class _ListHelper: - """Helper class for List""" - - -__all__ = ["List"] diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/acl/_show.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/acl/_show.py deleted file mode 100644 index 3a8271f8235..00000000000 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/acl/_show.py +++ /dev/null @@ -1,254 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "networkfabric acl show", -) -class Show(AAZCommand): - """Show details of the provided Access Control List resource - - :example: Show the Access Control List resource - az networkfabric acl show --resource-group "example-rg" --resource-name "example-acl" - """ - - _aaz_info = { - "version": "2023-02-01-preview", - "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/accesscontrollists/{}", "2023-02-01-preview"], - ] - } - - def _handler(self, command_args): - super()._handler(command_args) - self._execute_operations() - return self._output() - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.resource_name = AAZStrArg( - options=["--resource-name"], - help="Name of the Access Control List", - required=True, - id_part="name", - ) - _args_schema.resource_group = AAZResourceGroupNameArg( - help="Name of the resource group", - required=True, - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - self.AccessControlListsGet(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - def _output(self, *args, **kwargs): - result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) - return result - - class AccessControlListsGet(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [200]: - return self.on_200(session) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}", - **self.url_parameters - ) - - @property - def method(self): - return "GET" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "accessControlListName", self.ctx.args.resource_name, - required=True, - ), - **self.serialize_url_param( - "resourceGroupName", self.ctx.args.resource_group, - required=True, - ), - **self.serialize_url_param( - "subscriptionId", self.ctx.subscription_id, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2023-02-01-preview", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - def on_200(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200 - ) - - _schema_on_200 = None - - @classmethod - def _build_schema_on_200(cls): - if cls._schema_on_200 is not None: - return cls._schema_on_200 - - cls._schema_on_200 = AAZObjectType() - - _schema_on_200 = cls._schema_on_200 - _schema_on_200.id = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200.location = AAZStrType( - flags={"required": True}, - ) - _schema_on_200.name = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200.properties = AAZObjectType( - flags={"required": True, "client_flatten": True}, - ) - _schema_on_200.system_data = AAZObjectType( - serialized_name="systemData", - flags={"read_only": True}, - ) - _schema_on_200.tags = AAZDictType() - _schema_on_200.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = cls._schema_on_200.properties - properties.address_family = AAZStrType( - serialized_name="addressFamily", - flags={"required": True}, - ) - properties.annotation = AAZStrType() - properties.conditions = AAZListType( - flags={"required": True}, - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - - conditions = cls._schema_on_200.properties.conditions - conditions.Element = AAZObjectType() - - _element = cls._schema_on_200.properties.conditions.Element - _element.action = AAZStrType( - flags={"required": True}, - ) - _element.annotation = AAZStrType() - _element.destination_address = AAZStrType( - serialized_name="destinationAddress", - flags={"required": True}, - ) - _element.destination_port = AAZStrType( - serialized_name="destinationPort", - flags={"required": True}, - ) - _element.protocol = AAZIntType( - flags={"required": True}, - ) - _element.sequence_number = AAZIntType( - serialized_name="sequenceNumber", - flags={"required": True}, - ) - _element.source_address = AAZStrType( - serialized_name="sourceAddress", - flags={"required": True}, - ) - _element.source_port = AAZStrType( - serialized_name="sourcePort", - flags={"required": True}, - ) - - system_data = cls._schema_on_200.system_data - system_data.created_at = AAZStrType( - serialized_name="createdAt", - ) - system_data.created_by = AAZStrType( - serialized_name="createdBy", - ) - system_data.created_by_type = AAZStrType( - serialized_name="createdByType", - ) - system_data.last_modified_at = AAZStrType( - serialized_name="lastModifiedAt", - ) - system_data.last_modified_by = AAZStrType( - serialized_name="lastModifiedBy", - ) - system_data.last_modified_by_type = AAZStrType( - serialized_name="lastModifiedByType", - ) - - tags = cls._schema_on_200.tags - tags.Element = AAZStrType() - - return cls._schema_on_200 - - -class _ShowHelper: - """Helper class for Show""" - - -__all__ = ["Show"] diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/device/__init__.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/device/__init__.py index f32b66e3eeb..8287c45a4be 100644 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/device/__init__.py +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/device/__init__.py @@ -9,7 +9,6 @@ # flake8: noqa from .__cmd_group import * -from ._delete import * from ._list import * from ._show import * from ._update import * diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/device/_delete.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/device/_delete.py deleted file mode 100644 index 4d242ac3d42..00000000000 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/device/_delete.py +++ /dev/null @@ -1,163 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "networkfabric device delete", -) -class Delete(AAZCommand): - """Delete the Network Device resource. - - :example: Delete the Network Device - az networkfabric device delete --resource-group "example-rg" --resource-name "example-device" - """ - - _aaz_info = { - "version": "2023-02-01-preview", - "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkdevices/{}", "2023-02-01-preview"], - ] - } - - AZ_SUPPORT_NO_WAIT = True - - def _handler(self, command_args): - super()._handler(command_args) - return self.build_lro_poller(self._execute_operations, None) - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.resource_name = AAZStrArg( - options=["--resource-name"], - help="Name of the Network Device", - required=True, - id_part="name", - ) - _args_schema.resource_group = AAZResourceGroupNameArg( - help="Name of the resource group", - required=True, - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - yield self.NetworkDevicesDelete(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - class NetworkDevicesDelete(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [202]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_200, - self.on_error, - lro_options={"final-state-via": "location"}, - path_format_arguments=self.url_parameters, - ) - if session.http_response.status_code in [200]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_200, - self.on_error, - lro_options={"final-state-via": "location"}, - path_format_arguments=self.url_parameters, - ) - if session.http_response.status_code in [204]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_204, - self.on_error, - lro_options={"final-state-via": "location"}, - path_format_arguments=self.url_parameters, - ) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}", - **self.url_parameters - ) - - @property - def method(self): - return "DELETE" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "networkDeviceName", self.ctx.args.resource_name, - required=True, - ), - **self.serialize_url_param( - "resourceGroupName", self.ctx.args.resource_group, - required=True, - ), - **self.serialize_url_param( - "subscriptionId", self.ctx.subscription_id, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2023-02-01-preview", - required=True, - ), - } - return parameters - - def on_200(self, session): - pass - - def on_204(self, session): - pass - - -class _DeleteHelper: - """Helper class for Delete""" - - -__all__ = ["Delete"] diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/devicesku/__cmd_group.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/devicesku/__cmd_group.py deleted file mode 100644 index 2fb4cb6bac5..00000000000 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/devicesku/__cmd_group.py +++ /dev/null @@ -1,23 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command_group( - "networkfabric devicesku", -) -class __CMDGroup(AAZCommandGroup): - """Manage Network Device SKU Resource - """ - pass - - -__all__ = ["__CMDGroup"] diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/devicesku/__init__.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/devicesku/__init__.py deleted file mode 100644 index 2df85698253..00000000000 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/devicesku/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from .__cmd_group import * -from ._list import * -from ._show import * diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/devicesku/_list.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/devicesku/_list.py deleted file mode 100644 index 65b43628773..00000000000 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/devicesku/_list.py +++ /dev/null @@ -1,272 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "networkfabric devicesku list", -) -class List(AAZCommand): - """List all Network Device SKUs in the provided subscription. - - :example: List the DeviceSKU for Subscription - az networkfabric devicesku list --subscription - """ - - _aaz_info = { - "version": "2023-02-01-preview", - "resources": [ - ["mgmt-plane", "/subscriptions/{}/providers/microsoft.managednetworkfabric/networkdeviceskus", "2023-02-01-preview"], - ] - } - - def _handler(self, command_args): - super()._handler(command_args) - return self.build_paging(self._execute_operations, self._output) - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - self.NetworkDeviceSkusListBySubscription(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - def _output(self, *args, **kwargs): - result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) - next_link = self.deserialize_output(self.ctx.vars.instance.next_link) - return result, next_link - - class NetworkDeviceSkusListBySubscription(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [200]: - return self.on_200(session) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkDeviceSkus", - **self.url_parameters - ) - - @property - def method(self): - return "GET" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "subscriptionId", self.ctx.subscription_id, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2023-02-01-preview", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - def on_200(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200 - ) - - _schema_on_200 = None - - @classmethod - def _build_schema_on_200(cls): - if cls._schema_on_200 is not None: - return cls._schema_on_200 - - cls._schema_on_200 = AAZObjectType() - - _schema_on_200 = cls._schema_on_200 - _schema_on_200.next_link = AAZStrType( - serialized_name="nextLink", - ) - _schema_on_200.value = AAZListType() - - value = cls._schema_on_200.value - value.Element = AAZObjectType() - - _element = cls._schema_on_200.value.Element - _element.id = AAZStrType( - flags={"read_only": True}, - ) - _element.name = AAZStrType( - flags={"read_only": True}, - ) - _element.properties = AAZObjectType( - flags={"required": True, "client_flatten": True}, - ) - _element.system_data = AAZObjectType( - serialized_name="systemData", - flags={"read_only": True}, - ) - _element.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = cls._schema_on_200.value.Element.properties - properties.interfaces = AAZListType() - properties.limits = AAZObjectType() - properties.manufacturer = AAZStrType() - properties.model = AAZStrType( - flags={"required": True}, - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.supported_role_types = AAZListType( - serialized_name="supportedRoleTypes", - ) - properties.supported_versions = AAZListType( - serialized_name="supportedVersions", - ) - - interfaces = cls._schema_on_200.value.Element.properties.interfaces - interfaces.Element = AAZObjectType() - - _element = cls._schema_on_200.value.Element.properties.interfaces.Element - _element.identifier = AAZStrType() - _element.interface_type = AAZStrType( - serialized_name="interfaceType", - ) - _element.supported_connector_types = AAZListType( - serialized_name="supportedConnectorTypes", - ) - - supported_connector_types = cls._schema_on_200.value.Element.properties.interfaces.Element.supported_connector_types - supported_connector_types.Element = AAZObjectType() - - _element = cls._schema_on_200.value.Element.properties.interfaces.Element.supported_connector_types.Element - _element.connector_type = AAZStrType( - serialized_name="connectorType", - ) - _element.max_speed_in_mbps = AAZIntType( - serialized_name="maxSpeedInMbps", - ) - - limits = cls._schema_on_200.value.Element.properties.limits - limits.max_bidirectional_forwarding_detection_peers = AAZIntType( - serialized_name="maxBidirectionalForwardingDetectionPeers", - ) - limits.max_border_gateway_protocol_peers = AAZIntType( - serialized_name="maxBorderGatewayProtocolPeers", - ) - limits.max_sub_interfaces = AAZIntType( - serialized_name="maxSubInterfaces", - ) - limits.max_tunnel_interfaces = AAZIntType( - serialized_name="maxTunnelInterfaces", - ) - limits.max_virtual_router_functions = AAZIntType( - serialized_name="maxVirtualRouterFunctions", - ) - limits.physical_interface_count = AAZIntType( - serialized_name="physicalInterfaceCount", - ) - - supported_role_types = cls._schema_on_200.value.Element.properties.supported_role_types - supported_role_types.Element = AAZStrType() - - supported_versions = cls._schema_on_200.value.Element.properties.supported_versions - supported_versions.Element = AAZObjectType() - - _element = cls._schema_on_200.value.Element.properties.supported_versions.Element - _element.is_current = AAZStrType( - serialized_name="isCurrent", - ) - _element.is_test = AAZStrType( - serialized_name="isTest", - ) - _element.vendor_firmware_version = AAZStrType( - serialized_name="vendorFirmwareVersion", - ) - _element.vendor_os_version = AAZStrType( - serialized_name="vendorOsVersion", - ) - _element.version = AAZStrType() - - system_data = cls._schema_on_200.value.Element.system_data - system_data.created_at = AAZStrType( - serialized_name="createdAt", - ) - system_data.created_by = AAZStrType( - serialized_name="createdBy", - ) - system_data.created_by_type = AAZStrType( - serialized_name="createdByType", - ) - system_data.last_modified_at = AAZStrType( - serialized_name="lastModifiedAt", - ) - system_data.last_modified_by = AAZStrType( - serialized_name="lastModifiedBy", - ) - system_data.last_modified_by_type = AAZStrType( - serialized_name="lastModifiedByType", - ) - - return cls._schema_on_200 - - -class _ListHelper: - """Helper class for List""" - - -__all__ = ["List"] diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/devicesku/_show.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/devicesku/_show.py deleted file mode 100644 index 5d15f86e1ea..00000000000 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/devicesku/_show.py +++ /dev/null @@ -1,272 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "networkfabric devicesku show", -) -class Show(AAZCommand): - """Show details of the provided Network Device SKU resource. - """ - - _aaz_info = { - "version": "2023-02-01-preview", - "resources": [ - ["mgmt-plane", "/subscriptions/{}/providers/microsoft.managednetworkfabric/networkdeviceskus/{}", "2023-02-01-preview"], - ] - } - - def _handler(self, command_args): - super()._handler(command_args) - self._execute_operations() - return self._output() - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.resource_name = AAZStrArg( - options=["--resource-name"], - help="Name of the Network Device Sku", - required=True, - id_part="name", - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - self.NetworkDeviceSkusGet(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - def _output(self, *args, **kwargs): - result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) - return result - - class NetworkDeviceSkusGet(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [200]: - return self.on_200(session) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkDeviceSkus/{networkDeviceSkuName}", - **self.url_parameters - ) - - @property - def method(self): - return "GET" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "networkDeviceSkuName", self.ctx.args.resource_name, - required=True, - ), - **self.serialize_url_param( - "subscriptionId", self.ctx.subscription_id, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2023-02-01-preview", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - def on_200(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200 - ) - - _schema_on_200 = None - - @classmethod - def _build_schema_on_200(cls): - if cls._schema_on_200 is not None: - return cls._schema_on_200 - - cls._schema_on_200 = AAZObjectType() - - _schema_on_200 = cls._schema_on_200 - _schema_on_200.id = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200.name = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200.properties = AAZObjectType( - flags={"required": True, "client_flatten": True}, - ) - _schema_on_200.system_data = AAZObjectType( - serialized_name="systemData", - flags={"read_only": True}, - ) - _schema_on_200.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = cls._schema_on_200.properties - properties.interfaces = AAZListType() - properties.limits = AAZObjectType() - properties.manufacturer = AAZStrType() - properties.model = AAZStrType( - flags={"required": True}, - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.supported_role_types = AAZListType( - serialized_name="supportedRoleTypes", - ) - properties.supported_versions = AAZListType( - serialized_name="supportedVersions", - ) - - interfaces = cls._schema_on_200.properties.interfaces - interfaces.Element = AAZObjectType() - - _element = cls._schema_on_200.properties.interfaces.Element - _element.identifier = AAZStrType() - _element.interface_type = AAZStrType( - serialized_name="interfaceType", - ) - _element.supported_connector_types = AAZListType( - serialized_name="supportedConnectorTypes", - ) - - supported_connector_types = cls._schema_on_200.properties.interfaces.Element.supported_connector_types - supported_connector_types.Element = AAZObjectType() - - _element = cls._schema_on_200.properties.interfaces.Element.supported_connector_types.Element - _element.connector_type = AAZStrType( - serialized_name="connectorType", - ) - _element.max_speed_in_mbps = AAZIntType( - serialized_name="maxSpeedInMbps", - ) - - limits = cls._schema_on_200.properties.limits - limits.max_bidirectional_forwarding_detection_peers = AAZIntType( - serialized_name="maxBidirectionalForwardingDetectionPeers", - ) - limits.max_border_gateway_protocol_peers = AAZIntType( - serialized_name="maxBorderGatewayProtocolPeers", - ) - limits.max_sub_interfaces = AAZIntType( - serialized_name="maxSubInterfaces", - ) - limits.max_tunnel_interfaces = AAZIntType( - serialized_name="maxTunnelInterfaces", - ) - limits.max_virtual_router_functions = AAZIntType( - serialized_name="maxVirtualRouterFunctions", - ) - limits.physical_interface_count = AAZIntType( - serialized_name="physicalInterfaceCount", - ) - - supported_role_types = cls._schema_on_200.properties.supported_role_types - supported_role_types.Element = AAZStrType() - - supported_versions = cls._schema_on_200.properties.supported_versions - supported_versions.Element = AAZObjectType() - - _element = cls._schema_on_200.properties.supported_versions.Element - _element.is_current = AAZStrType( - serialized_name="isCurrent", - ) - _element.is_test = AAZStrType( - serialized_name="isTest", - ) - _element.vendor_firmware_version = AAZStrType( - serialized_name="vendorFirmwareVersion", - ) - _element.vendor_os_version = AAZStrType( - serialized_name="vendorOsVersion", - ) - _element.version = AAZStrType() - - system_data = cls._schema_on_200.system_data - system_data.created_at = AAZStrType( - serialized_name="createdAt", - ) - system_data.created_by = AAZStrType( - serialized_name="createdBy", - ) - system_data.created_by_type = AAZStrType( - serialized_name="createdByType", - ) - system_data.last_modified_at = AAZStrType( - serialized_name="lastModifiedAt", - ) - system_data.last_modified_by = AAZStrType( - serialized_name="lastModifiedBy", - ) - system_data.last_modified_by_type = AAZStrType( - serialized_name="lastModifiedByType", - ) - - return cls._schema_on_200 - - -class _ShowHelper: - """Helper class for Show""" - - -__all__ = ["Show"] diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/externalnetwork/__init__.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/externalnetwork/__init__.py index 2b037f08f76..2d1a2078686 100644 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/externalnetwork/__init__.py +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/externalnetwork/__init__.py @@ -13,5 +13,4 @@ from ._delete import * from ._list import * from ._show import * -from ._update_admin_state import * from ._wait import * diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/externalnetwork/_update_admin_state.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/externalnetwork/_update_admin_state.py deleted file mode 100644 index 9d8b7a02b9b..00000000000 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/externalnetwork/_update_admin_state.py +++ /dev/null @@ -1,204 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "networkfabric externalnetwork update-admin-state", -) -class UpdateAdminState(AAZCommand): - """Update the admin state of the provided External Network resource. - - :example: Update admin state of External Network - az networkfabric externalnetwork update-admin-state --resource-group "example-rg" --l3domain "example-l3domain" --resource-name "example-externalNetwork" --state "Enable" - """ - - _aaz_info = { - "version": "2023-02-01-preview", - "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/l3isolationdomains/{}/externalnetworks/{}/updateadministrativestate", "2023-02-01-preview"], - ] - } - - AZ_SUPPORT_NO_WAIT = True - - def _handler(self, command_args): - super()._handler(command_args) - return self.build_lro_poller(self._execute_operations, None) - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.resource_name = AAZStrArg( - options=["--resource-name"], - help="Name of the ExternalNetwork.", - required=True, - id_part="child_name_1", - ) - _args_schema.l3_isolation_domain_name = AAZStrArg( - options=["--l3domain", "--l3-isolation-domain-name"], - help="Name of the L3IsolationDomain", - required=True, - id_part="name", - ) - _args_schema.resource_group = AAZResourceGroupNameArg( - help="Name of the resource group", - required=True, - ) - - # define Arg Group "Body" - - _args_schema = cls._args_schema - _args_schema.resource_ids = AAZListArg( - options=["--resource-ids"], - arg_group="Body", - help="Network Fabrics or Network Rack resource Id.", - ) - _args_schema.state = AAZStrArg( - options=["--state"], - arg_group="Body", - help="Administrative state.", - enum={"Disable": "Disable", "Enable": "Enable"}, - ) - - resource_ids = cls._args_schema.resource_ids - resource_ids.Element = AAZStrArg() - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - yield self.ExternalNetworksUpdateAdministrativeState(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - class ExternalNetworksUpdateAdministrativeState(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [202]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_200, - self.on_error, - lro_options={"final-state-via": "location"}, - path_format_arguments=self.url_parameters, - ) - if session.http_response.status_code in [200]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_200, - self.on_error, - lro_options={"final-state-via": "location"}, - path_format_arguments=self.url_parameters, - ) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}/updateAdministrativeState", - **self.url_parameters - ) - - @property - def method(self): - return "POST" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "externalNetworkName", self.ctx.args.resource_name, - required=True, - ), - **self.serialize_url_param( - "l3IsolationDomainName", self.ctx.args.l3_isolation_domain_name, - required=True, - ), - **self.serialize_url_param( - "resourceGroupName", self.ctx.args.resource_group, - required=True, - ), - **self.serialize_url_param( - "subscriptionId", self.ctx.subscription_id, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2023-02-01-preview", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Content-Type", "application/json", - ), - } - return parameters - - @property - def content(self): - _content_value, _builder = self.new_content_builder( - self.ctx.args, - typ=AAZObjectType, - typ_kwargs={"flags": {"required": True, "client_flatten": True}} - ) - _builder.set_prop("resourceIds", AAZListType, ".resource_ids") - _builder.set_prop("state", AAZStrType, ".state") - - resource_ids = _builder.get(".resourceIds") - if resource_ids is not None: - resource_ids.set_elements(AAZStrType, ".") - - return self.serialize_content(_content_value) - - def on_200(self, session): - pass - - -class _UpdateAdminStateHelper: - """Helper class for UpdateAdminState""" - - -__all__ = ["UpdateAdminState"] diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/fabric/_create.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/fabric/_create.py index 0e57224a62e..f06065a8145 100644 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/fabric/_create.py +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/fabric/_create.py @@ -166,12 +166,10 @@ def _build_arguments_schema(cls, *args, **kwargs): options=["option-a-properties"], help="Peering option A properties.", ) - cls._build_args_option_a_properties_create(infrastructure_vpn_configuration.option_a_properties) infrastructure_vpn_configuration.option_b_properties = AAZObjectArg( options=["option-b-properties"], help="Option B configuration to be used for management vpn.", ) - cls._build_args_option_b_properties_create(infrastructure_vpn_configuration.option_b_properties) infrastructure_vpn_configuration.peering_option = AAZStrArg( options=["peering-option"], help="Peering option list.", @@ -179,156 +177,176 @@ def _build_arguments_schema(cls, *args, **kwargs): enum={"OptionA": "OptionA", "OptionB": "OptionB"}, ) - workload_vpn_configuration = cls._args_schema.managed_network_config.workload_vpn_configuration - workload_vpn_configuration.option_a_properties = AAZObjectArg( - options=["option-a-properties"], - help="Peering option A properties.", - ) - cls._build_args_option_a_properties_create(workload_vpn_configuration.option_a_properties) - workload_vpn_configuration.option_b_properties = AAZObjectArg( - options=["option-b-properties"], - help="Option B configuration to be used for management vpn.", - ) - cls._build_args_option_b_properties_create(workload_vpn_configuration.option_b_properties) - workload_vpn_configuration.peering_option = AAZStrArg( - options=["peering-option"], - help="Peering option list.", - required=True, - enum={"OptionA": "OptionA", "OptionB": "OptionB"}, + option_a_properties = cls._args_schema.managed_network_config.infrastructure_vpn_configuration.option_a_properties + option_a_properties.mtu = AAZIntArg( + options=["mtu"], + help="MTU to use for option A peering.", + fmt=AAZIntArgFormat( + maximum=9000, + minimum=1500, + ), ) - - ts_config = cls._args_schema.ts_config - ts_config.password = AAZStrArg( - options=["password"], - help="Password of terminal server.", - required=True, + option_a_properties.peer_asn = AAZIntArg( + options=["peer-asn"], + help="Peer ASN number.Example : 28", + fmt=AAZIntArgFormat( + maximum=65535, + minimum=1, + ), ) - ts_config.primary_ipv4_prefix = AAZStrArg( + option_a_properties.primary_ipv4_prefix = AAZStrArg( options=["primary-ipv4-prefix"], - help="IPv4 Address Prefix of CE-PE interconnect links. Example : 172.31.0.0/31.", - required=True, + help="IPv4 Address Prefix of CE-PE interconnect links. Example: 172.31.0.0/31. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces.", ) - ts_config.primary_ipv6_prefix = AAZStrArg( + option_a_properties.primary_ipv6_prefix = AAZStrArg( options=["primary-ipv6-prefix"], - help="IPv6 Address Prefix of CE-PE interconnect links. Example : 3FFE:FFFF:0:CD30::a0/126.", + help="IPv6 Address Prefix of CE-PE interconnect links. Example: 3FFE:FFFF:0:CD30::a0/126. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces.", ) - ts_config.secondary_ipv4_prefix = AAZStrArg( + option_a_properties.secondary_ipv4_prefix = AAZStrArg( options=["secondary-ipv4-prefix"], - help="Secondary IPv4 Address Prefix of CE-PE interconnect links. Example : 172.31.0.20/31.", - required=True, + help="Secondary IPv4 Address Prefix of CE-PE interconnect links. Example: 172.31.0.20/31. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces.", ) - ts_config.secondary_ipv6_prefix = AAZStrArg( + option_a_properties.secondary_ipv6_prefix = AAZStrArg( options=["secondary-ipv6-prefix"], - help="Secondary IPv6 Address Prefix of CE-PE interconnect links. Example : 3FFE:FFFF:0:CD30::a4/126.", + help="Secondary IPv6 Address Prefix of CE-PE interconnect links. Example: 3FFE:FFFF:0:CD30::a4/126. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces.", ) - ts_config.serial_number = AAZStrArg( - options=["serial-number"], - help="Serial Number of Terminal server.", + option_a_properties.vlan_id = AAZIntArg( + options=["vlan-id"], + help="Vlan identifier. Example : 501", + fmt=AAZIntArgFormat( + maximum=4095, + minimum=501, + ), ) - ts_config.username = AAZStrArg( - options=["username"], - help="Username of terminal server.", + + option_b_properties = cls._args_schema.managed_network_config.infrastructure_vpn_configuration.option_b_properties + option_b_properties.export_route_targets = AAZListArg( + options=["export-route-targets"], + help="Route Targets to be applied for outgoing routes from CE.", + required=True, + ) + option_b_properties.import_route_targets = AAZListArg( + options=["import-route-targets"], + help="Route Targets to be applied for incoming routes into CE.", required=True, ) - return cls._args_schema - _args_option_a_properties_create = None + export_route_targets = cls._args_schema.managed_network_config.infrastructure_vpn_configuration.option_b_properties.export_route_targets + export_route_targets.Element = AAZStrArg() - @classmethod - def _build_args_option_a_properties_create(cls, _schema): - if cls._args_option_a_properties_create is not None: - _schema.mtu = cls._args_option_a_properties_create.mtu - _schema.peer_asn = cls._args_option_a_properties_create.peer_asn - _schema.primary_ipv4_prefix = cls._args_option_a_properties_create.primary_ipv4_prefix - _schema.primary_ipv6_prefix = cls._args_option_a_properties_create.primary_ipv6_prefix - _schema.secondary_ipv4_prefix = cls._args_option_a_properties_create.secondary_ipv4_prefix - _schema.secondary_ipv6_prefix = cls._args_option_a_properties_create.secondary_ipv6_prefix - _schema.vlan_id = cls._args_option_a_properties_create.vlan_id - return + import_route_targets = cls._args_schema.managed_network_config.infrastructure_vpn_configuration.option_b_properties.import_route_targets + import_route_targets.Element = AAZStrArg() - cls._args_option_a_properties_create = AAZObjectArg() + workload_vpn_configuration = cls._args_schema.managed_network_config.workload_vpn_configuration + workload_vpn_configuration.option_a_properties = AAZObjectArg( + options=["option-a-properties"], + help="Peering option A properties.", + ) + workload_vpn_configuration.option_b_properties = AAZObjectArg( + options=["option-b-properties"], + help="Option B configuration to be used for management vpn.", + ) + workload_vpn_configuration.peering_option = AAZStrArg( + options=["peering-option"], + help="Peering option list.", + required=True, + enum={"OptionA": "OptionA", "OptionB": "OptionB"}, + ) - option_a_properties_create = cls._args_option_a_properties_create - option_a_properties_create.mtu = AAZIntArg( + option_a_properties = cls._args_schema.managed_network_config.workload_vpn_configuration.option_a_properties + option_a_properties.mtu = AAZIntArg( options=["mtu"], - help="MTU to use for option A peering. The value should be between 1500 to 9000. Default value is 1500.", + help="MTU to use for option A peering.", fmt=AAZIntArgFormat( maximum=9000, minimum=1500, ), ) - option_a_properties_create.peer_asn = AAZIntArg( + option_a_properties.peer_asn = AAZIntArg( options=["peer-asn"], - help="Peer ASN number. The value should be between 1 to 65535. Example : 28.", + help="Peer ASN number.Example : 28", fmt=AAZIntArgFormat( maximum=65535, minimum=1, ), ) - option_a_properties_create.primary_ipv4_prefix = AAZStrArg( + option_a_properties.primary_ipv4_prefix = AAZStrArg( options=["primary-ipv4-prefix"], - help="IPv4 Address Prefix of CE-PE interconnect links. Example : 172.31.0.0/31.", + help="IPv4 Address Prefix of CE-PE interconnect links. Example: 172.31.0.0/31. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces.", ) - option_a_properties_create.primary_ipv6_prefix = AAZStrArg( + option_a_properties.primary_ipv6_prefix = AAZStrArg( options=["primary-ipv6-prefix"], - help="IPv6 Address Prefix of CE-PE interconnect links. Example : 3FFE:FFFF:0:CD30::a0/126.", + help="IPv6 Address Prefix of CE-PE interconnect links. Example: 3FFE:FFFF:0:CD30::a0/126. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces.", ) - option_a_properties_create.secondary_ipv4_prefix = AAZStrArg( + option_a_properties.secondary_ipv4_prefix = AAZStrArg( options=["secondary-ipv4-prefix"], - help="Secondary IPv4 Address Prefix of CE-PE interconnect links. Example : 172.31.0.20/31.", + help="Secondary IPv4 Address Prefix of CE-PE interconnect links. Example: 172.31.0.20/31. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces.", ) - option_a_properties_create.secondary_ipv6_prefix = AAZStrArg( + option_a_properties.secondary_ipv6_prefix = AAZStrArg( options=["secondary-ipv6-prefix"], - help="Secondary IPv6 Address Prefix of CE-PE interconnect links. Example : 3FFE:FFFF:0:CD30::a4/126.", + help="Secondary IPv6 Address Prefix of CE-PE interconnect links. Example: 3FFE:FFFF:0:CD30::a4/126. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces.", ) - option_a_properties_create.vlan_id = AAZIntArg( + option_a_properties.vlan_id = AAZIntArg( options=["vlan-id"], - help="Vlan Id. The value should be between 501 to 4095. Example : 501.", + help="Vlan identifier. Example : 501", fmt=AAZIntArgFormat( maximum=4095, minimum=501, ), ) - _schema.mtu = cls._args_option_a_properties_create.mtu - _schema.peer_asn = cls._args_option_a_properties_create.peer_asn - _schema.primary_ipv4_prefix = cls._args_option_a_properties_create.primary_ipv4_prefix - _schema.primary_ipv6_prefix = cls._args_option_a_properties_create.primary_ipv6_prefix - _schema.secondary_ipv4_prefix = cls._args_option_a_properties_create.secondary_ipv4_prefix - _schema.secondary_ipv6_prefix = cls._args_option_a_properties_create.secondary_ipv6_prefix - _schema.vlan_id = cls._args_option_a_properties_create.vlan_id - - _args_option_b_properties_create = None - - @classmethod - def _build_args_option_b_properties_create(cls, _schema): - if cls._args_option_b_properties_create is not None: - _schema.export_route_targets = cls._args_option_b_properties_create.export_route_targets - _schema.import_route_targets = cls._args_option_b_properties_create.import_route_targets - return - - cls._args_option_b_properties_create = AAZObjectArg() - - option_b_properties_create = cls._args_option_b_properties_create - option_b_properties_create.export_route_targets = AAZListArg( + option_b_properties = cls._args_schema.managed_network_config.workload_vpn_configuration.option_b_properties + option_b_properties.export_route_targets = AAZListArg( options=["export-route-targets"], - help="Route Targets to be applied for outgoing routes from CE. Example: 65541:2001.", + help="Route Targets to be applied for outgoing routes from CE.", required=True, ) - option_b_properties_create.import_route_targets = AAZListArg( + option_b_properties.import_route_targets = AAZListArg( options=["import-route-targets"], - help="Route Targets to be applied for incoming routes into CE. Example: 65311:2001, 65412:2001.", + help="Route Targets to be applied for incoming routes into CE.", required=True, ) - export_route_targets = cls._args_option_b_properties_create.export_route_targets + export_route_targets = cls._args_schema.managed_network_config.workload_vpn_configuration.option_b_properties.export_route_targets export_route_targets.Element = AAZStrArg() - import_route_targets = cls._args_option_b_properties_create.import_route_targets + import_route_targets = cls._args_schema.managed_network_config.workload_vpn_configuration.option_b_properties.import_route_targets import_route_targets.Element = AAZStrArg() - _schema.export_route_targets = cls._args_option_b_properties_create.export_route_targets - _schema.import_route_targets = cls._args_option_b_properties_create.import_route_targets + ts_config = cls._args_schema.ts_config + ts_config.password = AAZStrArg( + options=["password"], + help="Password of terminal server.", + required=True, + ) + ts_config.primary_ipv4_prefix = AAZStrArg( + options=["primary-ipv4-prefix"], + help="IPv4 Address Prefix of CE-PE interconnect links. Example : 172.31.0.0/31.", + required=True, + ) + ts_config.primary_ipv6_prefix = AAZStrArg( + options=["primary-ipv6-prefix"], + help="IPv6 Address Prefix of CE-PE interconnect links. Example : 3FFE:FFFF:0:CD30::a0/126.", + ) + ts_config.secondary_ipv4_prefix = AAZStrArg( + options=["secondary-ipv4-prefix"], + help="Secondary IPv4 Address Prefix of CE-PE interconnect links. Example : 172.31.0.20/31.", + required=True, + ) + ts_config.secondary_ipv6_prefix = AAZStrArg( + options=["secondary-ipv6-prefix"], + help="Secondary IPv6 Address Prefix of CE-PE interconnect links. Example : 3FFE:FFFF:0:CD30::a4/126.", + ) + ts_config.serial_number = AAZStrArg( + options=["serial-number"], + help="Serial Number of Terminal server.", + ) + ts_config.username = AAZStrArg( + options=["username"], + help="Username of terminal server.", + required=True, + ) + return cls._args_schema def _execute_operations(self): self.pre_operations() @@ -460,16 +478,62 @@ def content(self): infrastructure_vpn_configuration = _builder.get(".properties.managementNetworkConfiguration.infrastructureVpnConfiguration") if infrastructure_vpn_configuration is not None: - _CreateHelper._build_schema_option_a_properties_create(infrastructure_vpn_configuration.set_prop("optionAProperties", AAZObjectType, ".option_a_properties")) - _CreateHelper._build_schema_option_b_properties_create(infrastructure_vpn_configuration.set_prop("optionBProperties", AAZObjectType, ".option_b_properties")) + infrastructure_vpn_configuration.set_prop("optionAProperties", AAZObjectType, ".option_a_properties") + infrastructure_vpn_configuration.set_prop("optionBProperties", AAZObjectType, ".option_b_properties") infrastructure_vpn_configuration.set_prop("peeringOption", AAZStrType, ".peering_option", typ_kwargs={"flags": {"required": True}}) + option_a_properties = _builder.get(".properties.managementNetworkConfiguration.infrastructureVpnConfiguration.optionAProperties") + if option_a_properties is not None: + option_a_properties.set_prop("mtu", AAZIntType, ".mtu") + option_a_properties.set_prop("peerASN", AAZIntType, ".peer_asn") + option_a_properties.set_prop("primaryIpv4Prefix", AAZStrType, ".primary_ipv4_prefix") + option_a_properties.set_prop("primaryIpv6Prefix", AAZStrType, ".primary_ipv6_prefix") + option_a_properties.set_prop("secondaryIpv4Prefix", AAZStrType, ".secondary_ipv4_prefix") + option_a_properties.set_prop("secondaryIpv6Prefix", AAZStrType, ".secondary_ipv6_prefix") + option_a_properties.set_prop("vlanId", AAZIntType, ".vlan_id") + + option_b_properties = _builder.get(".properties.managementNetworkConfiguration.infrastructureVpnConfiguration.optionBProperties") + if option_b_properties is not None: + option_b_properties.set_prop("exportRouteTargets", AAZListType, ".export_route_targets", typ_kwargs={"flags": {"required": True}}) + option_b_properties.set_prop("importRouteTargets", AAZListType, ".import_route_targets", typ_kwargs={"flags": {"required": True}}) + + export_route_targets = _builder.get(".properties.managementNetworkConfiguration.infrastructureVpnConfiguration.optionBProperties.exportRouteTargets") + if export_route_targets is not None: + export_route_targets.set_elements(AAZStrType, ".") + + import_route_targets = _builder.get(".properties.managementNetworkConfiguration.infrastructureVpnConfiguration.optionBProperties.importRouteTargets") + if import_route_targets is not None: + import_route_targets.set_elements(AAZStrType, ".") + workload_vpn_configuration = _builder.get(".properties.managementNetworkConfiguration.workloadVpnConfiguration") if workload_vpn_configuration is not None: - _CreateHelper._build_schema_option_a_properties_create(workload_vpn_configuration.set_prop("optionAProperties", AAZObjectType, ".option_a_properties")) - _CreateHelper._build_schema_option_b_properties_create(workload_vpn_configuration.set_prop("optionBProperties", AAZObjectType, ".option_b_properties")) + workload_vpn_configuration.set_prop("optionAProperties", AAZObjectType, ".option_a_properties") + workload_vpn_configuration.set_prop("optionBProperties", AAZObjectType, ".option_b_properties") workload_vpn_configuration.set_prop("peeringOption", AAZStrType, ".peering_option", typ_kwargs={"flags": {"required": True}}) + option_a_properties = _builder.get(".properties.managementNetworkConfiguration.workloadVpnConfiguration.optionAProperties") + if option_a_properties is not None: + option_a_properties.set_prop("mtu", AAZIntType, ".mtu") + option_a_properties.set_prop("peerASN", AAZIntType, ".peer_asn") + option_a_properties.set_prop("primaryIpv4Prefix", AAZStrType, ".primary_ipv4_prefix") + option_a_properties.set_prop("primaryIpv6Prefix", AAZStrType, ".primary_ipv6_prefix") + option_a_properties.set_prop("secondaryIpv4Prefix", AAZStrType, ".secondary_ipv4_prefix") + option_a_properties.set_prop("secondaryIpv6Prefix", AAZStrType, ".secondary_ipv6_prefix") + option_a_properties.set_prop("vlanId", AAZIntType, ".vlan_id") + + option_b_properties = _builder.get(".properties.managementNetworkConfiguration.workloadVpnConfiguration.optionBProperties") + if option_b_properties is not None: + option_b_properties.set_prop("exportRouteTargets", AAZListType, ".export_route_targets", typ_kwargs={"flags": {"required": True}}) + option_b_properties.set_prop("importRouteTargets", AAZListType, ".import_route_targets", typ_kwargs={"flags": {"required": True}}) + + export_route_targets = _builder.get(".properties.managementNetworkConfiguration.workloadVpnConfiguration.optionBProperties.exportRouteTargets") + if export_route_targets is not None: + export_route_targets.set_elements(AAZStrType, ".") + + import_route_targets = _builder.get(".properties.managementNetworkConfiguration.workloadVpnConfiguration.optionBProperties.importRouteTargets") + if import_route_targets is not None: + import_route_targets.set_elements(AAZStrType, ".") + terminal_server_configuration = _builder.get(".properties.terminalServerConfiguration") if terminal_server_configuration is not None: terminal_server_configuration.set_prop("password", AAZStrType, ".password", typ_kwargs={"flags": {"required": True, "secret": True}}) @@ -596,54 +660,12 @@ def _build_schema_on_200_201(cls): serialized_name="infrastructureVpnConfiguration", flags={"required": True}, ) + _CreateHelper._build_schema_vpn_configuration_properties_read(management_network_configuration.infrastructure_vpn_configuration) management_network_configuration.workload_vpn_configuration = AAZObjectType( serialized_name="workloadVpnConfiguration", flags={"required": True}, ) - - infrastructure_vpn_configuration = cls._schema_on_200_201.properties.management_network_configuration.infrastructure_vpn_configuration - infrastructure_vpn_configuration.administrative_state = AAZStrType( - serialized_name="administrativeState", - flags={"read_only": True}, - ) - infrastructure_vpn_configuration.network_to_network_interconnect_id = AAZStrType( - serialized_name="networkToNetworkInterconnectId", - flags={"read_only": True}, - ) - infrastructure_vpn_configuration.option_a_properties = AAZObjectType( - serialized_name="optionAProperties", - ) - _CreateHelper._build_schema_option_a_properties_read(infrastructure_vpn_configuration.option_a_properties) - infrastructure_vpn_configuration.option_b_properties = AAZObjectType( - serialized_name="optionBProperties", - ) - _CreateHelper._build_schema_option_b_properties_read(infrastructure_vpn_configuration.option_b_properties) - infrastructure_vpn_configuration.peering_option = AAZStrType( - serialized_name="peeringOption", - flags={"required": True}, - ) - - workload_vpn_configuration = cls._schema_on_200_201.properties.management_network_configuration.workload_vpn_configuration - workload_vpn_configuration.administrative_state = AAZStrType( - serialized_name="administrativeState", - flags={"read_only": True}, - ) - workload_vpn_configuration.network_to_network_interconnect_id = AAZStrType( - serialized_name="networkToNetworkInterconnectId", - flags={"read_only": True}, - ) - workload_vpn_configuration.option_a_properties = AAZObjectType( - serialized_name="optionAProperties", - ) - _CreateHelper._build_schema_option_a_properties_read(workload_vpn_configuration.option_a_properties) - workload_vpn_configuration.option_b_properties = AAZObjectType( - serialized_name="optionBProperties", - ) - _CreateHelper._build_schema_option_b_properties_read(workload_vpn_configuration.option_b_properties) - workload_vpn_configuration.peering_option = AAZStrType( - serialized_name="peeringOption", - flags={"required": True}, - ) + _CreateHelper._build_schema_vpn_configuration_properties_read(management_network_configuration.workload_vpn_configuration) racks = cls._schema_on_200_201.properties.racks racks.Element = AAZStrType() @@ -706,75 +728,65 @@ def _build_schema_on_200_201(cls): class _CreateHelper: """Helper class for Create""" - @classmethod - def _build_schema_option_a_properties_create(cls, _builder): - if _builder is None: - return - _builder.set_prop("mtu", AAZIntType, ".mtu") - _builder.set_prop("peerASN", AAZIntType, ".peer_asn") - _builder.set_prop("primaryIpv4Prefix", AAZStrType, ".primary_ipv4_prefix") - _builder.set_prop("primaryIpv6Prefix", AAZStrType, ".primary_ipv6_prefix") - _builder.set_prop("secondaryIpv4Prefix", AAZStrType, ".secondary_ipv4_prefix") - _builder.set_prop("secondaryIpv6Prefix", AAZStrType, ".secondary_ipv6_prefix") - _builder.set_prop("vlanId", AAZIntType, ".vlan_id") + _schema_vpn_configuration_properties_read = None @classmethod - def _build_schema_option_b_properties_create(cls, _builder): - if _builder is None: + def _build_schema_vpn_configuration_properties_read(cls, _schema): + if cls._schema_vpn_configuration_properties_read is not None: + _schema.administrative_state = cls._schema_vpn_configuration_properties_read.administrative_state + _schema.network_to_network_interconnect_id = cls._schema_vpn_configuration_properties_read.network_to_network_interconnect_id + _schema.option_a_properties = cls._schema_vpn_configuration_properties_read.option_a_properties + _schema.option_b_properties = cls._schema_vpn_configuration_properties_read.option_b_properties + _schema.peering_option = cls._schema_vpn_configuration_properties_read.peering_option return - _builder.set_prop("exportRouteTargets", AAZListType, ".export_route_targets", typ_kwargs={"flags": {"required": True}}) - _builder.set_prop("importRouteTargets", AAZListType, ".import_route_targets", typ_kwargs={"flags": {"required": True}}) - - export_route_targets = _builder.get(".exportRouteTargets") - if export_route_targets is not None: - export_route_targets.set_elements(AAZStrType, ".") - - import_route_targets = _builder.get(".importRouteTargets") - if import_route_targets is not None: - import_route_targets.set_elements(AAZStrType, ".") - _schema_option_a_properties_read = None - - @classmethod - def _build_schema_option_a_properties_read(cls, _schema): - if cls._schema_option_a_properties_read is not None: - _schema.bfd_configuration = cls._schema_option_a_properties_read.bfd_configuration - _schema.mtu = cls._schema_option_a_properties_read.mtu - _schema.peer_asn = cls._schema_option_a_properties_read.peer_asn - _schema.primary_ipv4_prefix = cls._schema_option_a_properties_read.primary_ipv4_prefix - _schema.primary_ipv6_prefix = cls._schema_option_a_properties_read.primary_ipv6_prefix - _schema.secondary_ipv4_prefix = cls._schema_option_a_properties_read.secondary_ipv4_prefix - _schema.secondary_ipv6_prefix = cls._schema_option_a_properties_read.secondary_ipv6_prefix - _schema.vlan_id = cls._schema_option_a_properties_read.vlan_id - return + cls._schema_vpn_configuration_properties_read = _schema_vpn_configuration_properties_read = AAZObjectType() - cls._schema_option_a_properties_read = _schema_option_a_properties_read = AAZObjectType() + vpn_configuration_properties_read = _schema_vpn_configuration_properties_read + vpn_configuration_properties_read.administrative_state = AAZStrType( + serialized_name="administrativeState", + flags={"read_only": True}, + ) + vpn_configuration_properties_read.network_to_network_interconnect_id = AAZStrType( + serialized_name="networkToNetworkInterconnectId", + flags={"read_only": True}, + ) + vpn_configuration_properties_read.option_a_properties = AAZObjectType( + serialized_name="optionAProperties", + ) + vpn_configuration_properties_read.option_b_properties = AAZObjectType( + serialized_name="optionBProperties", + ) + vpn_configuration_properties_read.peering_option = AAZStrType( + serialized_name="peeringOption", + flags={"required": True}, + ) - option_a_properties_read = _schema_option_a_properties_read - option_a_properties_read.bfd_configuration = AAZObjectType( + option_a_properties = _schema_vpn_configuration_properties_read.option_a_properties + option_a_properties.bfd_configuration = AAZObjectType( serialized_name="bfdConfiguration", ) - option_a_properties_read.mtu = AAZIntType() - option_a_properties_read.peer_asn = AAZIntType( + option_a_properties.mtu = AAZIntType() + option_a_properties.peer_asn = AAZIntType( serialized_name="peerASN", ) - option_a_properties_read.primary_ipv4_prefix = AAZStrType( + option_a_properties.primary_ipv4_prefix = AAZStrType( serialized_name="primaryIpv4Prefix", ) - option_a_properties_read.primary_ipv6_prefix = AAZStrType( + option_a_properties.primary_ipv6_prefix = AAZStrType( serialized_name="primaryIpv6Prefix", ) - option_a_properties_read.secondary_ipv4_prefix = AAZStrType( + option_a_properties.secondary_ipv4_prefix = AAZStrType( serialized_name="secondaryIpv4Prefix", ) - option_a_properties_read.secondary_ipv6_prefix = AAZStrType( + option_a_properties.secondary_ipv6_prefix = AAZStrType( serialized_name="secondaryIpv6Prefix", ) - option_a_properties_read.vlan_id = AAZIntType( + option_a_properties.vlan_id = AAZIntType( serialized_name="vlanId", ) - bfd_configuration = _schema_option_a_properties_read.bfd_configuration + bfd_configuration = _schema_vpn_configuration_properties_read.option_a_properties.bfd_configuration bfd_configuration.interval = AAZIntType( flags={"read_only": True}, ) @@ -782,44 +794,27 @@ def _build_schema_option_a_properties_read(cls, _schema): flags={"read_only": True}, ) - _schema.bfd_configuration = cls._schema_option_a_properties_read.bfd_configuration - _schema.mtu = cls._schema_option_a_properties_read.mtu - _schema.peer_asn = cls._schema_option_a_properties_read.peer_asn - _schema.primary_ipv4_prefix = cls._schema_option_a_properties_read.primary_ipv4_prefix - _schema.primary_ipv6_prefix = cls._schema_option_a_properties_read.primary_ipv6_prefix - _schema.secondary_ipv4_prefix = cls._schema_option_a_properties_read.secondary_ipv4_prefix - _schema.secondary_ipv6_prefix = cls._schema_option_a_properties_read.secondary_ipv6_prefix - _schema.vlan_id = cls._schema_option_a_properties_read.vlan_id - - _schema_option_b_properties_read = None - - @classmethod - def _build_schema_option_b_properties_read(cls, _schema): - if cls._schema_option_b_properties_read is not None: - _schema.export_route_targets = cls._schema_option_b_properties_read.export_route_targets - _schema.import_route_targets = cls._schema_option_b_properties_read.import_route_targets - return - - cls._schema_option_b_properties_read = _schema_option_b_properties_read = AAZObjectType() - - option_b_properties_read = _schema_option_b_properties_read - option_b_properties_read.export_route_targets = AAZListType( + option_b_properties = _schema_vpn_configuration_properties_read.option_b_properties + option_b_properties.export_route_targets = AAZListType( serialized_name="exportRouteTargets", flags={"required": True}, ) - option_b_properties_read.import_route_targets = AAZListType( + option_b_properties.import_route_targets = AAZListType( serialized_name="importRouteTargets", flags={"required": True}, ) - export_route_targets = _schema_option_b_properties_read.export_route_targets + export_route_targets = _schema_vpn_configuration_properties_read.option_b_properties.export_route_targets export_route_targets.Element = AAZStrType() - import_route_targets = _schema_option_b_properties_read.import_route_targets + import_route_targets = _schema_vpn_configuration_properties_read.option_b_properties.import_route_targets import_route_targets.Element = AAZStrType() - _schema.export_route_targets = cls._schema_option_b_properties_read.export_route_targets - _schema.import_route_targets = cls._schema_option_b_properties_read.import_route_targets + _schema.administrative_state = cls._schema_vpn_configuration_properties_read.administrative_state + _schema.network_to_network_interconnect_id = cls._schema_vpn_configuration_properties_read.network_to_network_interconnect_id + _schema.option_a_properties = cls._schema_vpn_configuration_properties_read.option_a_properties + _schema.option_b_properties = cls._schema_vpn_configuration_properties_read.option_b_properties + _schema.peering_option = cls._schema_vpn_configuration_properties_read.peering_option __all__ = ["Create"] diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/fabric/_list.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/fabric/_list.py index 438a39db43f..ec82cbcfc31 100644 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/fabric/_list.py +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/fabric/_list.py @@ -253,54 +253,12 @@ def _build_schema_on_200(cls): serialized_name="infrastructureVpnConfiguration", flags={"required": True}, ) + _ListHelper._build_schema_vpn_configuration_properties_read(management_network_configuration.infrastructure_vpn_configuration) management_network_configuration.workload_vpn_configuration = AAZObjectType( serialized_name="workloadVpnConfiguration", flags={"required": True}, ) - - infrastructure_vpn_configuration = cls._schema_on_200.value.Element.properties.management_network_configuration.infrastructure_vpn_configuration - infrastructure_vpn_configuration.administrative_state = AAZStrType( - serialized_name="administrativeState", - flags={"read_only": True}, - ) - infrastructure_vpn_configuration.network_to_network_interconnect_id = AAZStrType( - serialized_name="networkToNetworkInterconnectId", - flags={"read_only": True}, - ) - infrastructure_vpn_configuration.option_a_properties = AAZObjectType( - serialized_name="optionAProperties", - ) - _ListHelper._build_schema_option_a_properties_read(infrastructure_vpn_configuration.option_a_properties) - infrastructure_vpn_configuration.option_b_properties = AAZObjectType( - serialized_name="optionBProperties", - ) - _ListHelper._build_schema_option_b_properties_read(infrastructure_vpn_configuration.option_b_properties) - infrastructure_vpn_configuration.peering_option = AAZStrType( - serialized_name="peeringOption", - flags={"required": True}, - ) - - workload_vpn_configuration = cls._schema_on_200.value.Element.properties.management_network_configuration.workload_vpn_configuration - workload_vpn_configuration.administrative_state = AAZStrType( - serialized_name="administrativeState", - flags={"read_only": True}, - ) - workload_vpn_configuration.network_to_network_interconnect_id = AAZStrType( - serialized_name="networkToNetworkInterconnectId", - flags={"read_only": True}, - ) - workload_vpn_configuration.option_a_properties = AAZObjectType( - serialized_name="optionAProperties", - ) - _ListHelper._build_schema_option_a_properties_read(workload_vpn_configuration.option_a_properties) - workload_vpn_configuration.option_b_properties = AAZObjectType( - serialized_name="optionBProperties", - ) - _ListHelper._build_schema_option_b_properties_read(workload_vpn_configuration.option_b_properties) - workload_vpn_configuration.peering_option = AAZStrType( - serialized_name="peeringOption", - flags={"required": True}, - ) + _ListHelper._build_schema_vpn_configuration_properties_read(management_network_configuration.workload_vpn_configuration) racks = cls._schema_on_200.value.Element.properties.racks racks.Element = AAZStrType() @@ -533,54 +491,12 @@ def _build_schema_on_200(cls): serialized_name="infrastructureVpnConfiguration", flags={"required": True}, ) + _ListHelper._build_schema_vpn_configuration_properties_read(management_network_configuration.infrastructure_vpn_configuration) management_network_configuration.workload_vpn_configuration = AAZObjectType( serialized_name="workloadVpnConfiguration", flags={"required": True}, ) - - infrastructure_vpn_configuration = cls._schema_on_200.value.Element.properties.management_network_configuration.infrastructure_vpn_configuration - infrastructure_vpn_configuration.administrative_state = AAZStrType( - serialized_name="administrativeState", - flags={"read_only": True}, - ) - infrastructure_vpn_configuration.network_to_network_interconnect_id = AAZStrType( - serialized_name="networkToNetworkInterconnectId", - flags={"read_only": True}, - ) - infrastructure_vpn_configuration.option_a_properties = AAZObjectType( - serialized_name="optionAProperties", - ) - _ListHelper._build_schema_option_a_properties_read(infrastructure_vpn_configuration.option_a_properties) - infrastructure_vpn_configuration.option_b_properties = AAZObjectType( - serialized_name="optionBProperties", - ) - _ListHelper._build_schema_option_b_properties_read(infrastructure_vpn_configuration.option_b_properties) - infrastructure_vpn_configuration.peering_option = AAZStrType( - serialized_name="peeringOption", - flags={"required": True}, - ) - - workload_vpn_configuration = cls._schema_on_200.value.Element.properties.management_network_configuration.workload_vpn_configuration - workload_vpn_configuration.administrative_state = AAZStrType( - serialized_name="administrativeState", - flags={"read_only": True}, - ) - workload_vpn_configuration.network_to_network_interconnect_id = AAZStrType( - serialized_name="networkToNetworkInterconnectId", - flags={"read_only": True}, - ) - workload_vpn_configuration.option_a_properties = AAZObjectType( - serialized_name="optionAProperties", - ) - _ListHelper._build_schema_option_a_properties_read(workload_vpn_configuration.option_a_properties) - workload_vpn_configuration.option_b_properties = AAZObjectType( - serialized_name="optionBProperties", - ) - _ListHelper._build_schema_option_b_properties_read(workload_vpn_configuration.option_b_properties) - workload_vpn_configuration.peering_option = AAZStrType( - serialized_name="peeringOption", - flags={"required": True}, - ) + _ListHelper._build_schema_vpn_configuration_properties_read(management_network_configuration.workload_vpn_configuration) racks = cls._schema_on_200.value.Element.properties.racks racks.Element = AAZStrType() @@ -643,48 +559,65 @@ def _build_schema_on_200(cls): class _ListHelper: """Helper class for List""" - _schema_option_a_properties_read = None + _schema_vpn_configuration_properties_read = None @classmethod - def _build_schema_option_a_properties_read(cls, _schema): - if cls._schema_option_a_properties_read is not None: - _schema.bfd_configuration = cls._schema_option_a_properties_read.bfd_configuration - _schema.mtu = cls._schema_option_a_properties_read.mtu - _schema.peer_asn = cls._schema_option_a_properties_read.peer_asn - _schema.primary_ipv4_prefix = cls._schema_option_a_properties_read.primary_ipv4_prefix - _schema.primary_ipv6_prefix = cls._schema_option_a_properties_read.primary_ipv6_prefix - _schema.secondary_ipv4_prefix = cls._schema_option_a_properties_read.secondary_ipv4_prefix - _schema.secondary_ipv6_prefix = cls._schema_option_a_properties_read.secondary_ipv6_prefix - _schema.vlan_id = cls._schema_option_a_properties_read.vlan_id + def _build_schema_vpn_configuration_properties_read(cls, _schema): + if cls._schema_vpn_configuration_properties_read is not None: + _schema.administrative_state = cls._schema_vpn_configuration_properties_read.administrative_state + _schema.network_to_network_interconnect_id = cls._schema_vpn_configuration_properties_read.network_to_network_interconnect_id + _schema.option_a_properties = cls._schema_vpn_configuration_properties_read.option_a_properties + _schema.option_b_properties = cls._schema_vpn_configuration_properties_read.option_b_properties + _schema.peering_option = cls._schema_vpn_configuration_properties_read.peering_option return - cls._schema_option_a_properties_read = _schema_option_a_properties_read = AAZObjectType() + cls._schema_vpn_configuration_properties_read = _schema_vpn_configuration_properties_read = AAZObjectType() - option_a_properties_read = _schema_option_a_properties_read - option_a_properties_read.bfd_configuration = AAZObjectType( + vpn_configuration_properties_read = _schema_vpn_configuration_properties_read + vpn_configuration_properties_read.administrative_state = AAZStrType( + serialized_name="administrativeState", + flags={"read_only": True}, + ) + vpn_configuration_properties_read.network_to_network_interconnect_id = AAZStrType( + serialized_name="networkToNetworkInterconnectId", + flags={"read_only": True}, + ) + vpn_configuration_properties_read.option_a_properties = AAZObjectType( + serialized_name="optionAProperties", + ) + vpn_configuration_properties_read.option_b_properties = AAZObjectType( + serialized_name="optionBProperties", + ) + vpn_configuration_properties_read.peering_option = AAZStrType( + serialized_name="peeringOption", + flags={"required": True}, + ) + + option_a_properties = _schema_vpn_configuration_properties_read.option_a_properties + option_a_properties.bfd_configuration = AAZObjectType( serialized_name="bfdConfiguration", ) - option_a_properties_read.mtu = AAZIntType() - option_a_properties_read.peer_asn = AAZIntType( + option_a_properties.mtu = AAZIntType() + option_a_properties.peer_asn = AAZIntType( serialized_name="peerASN", ) - option_a_properties_read.primary_ipv4_prefix = AAZStrType( + option_a_properties.primary_ipv4_prefix = AAZStrType( serialized_name="primaryIpv4Prefix", ) - option_a_properties_read.primary_ipv6_prefix = AAZStrType( + option_a_properties.primary_ipv6_prefix = AAZStrType( serialized_name="primaryIpv6Prefix", ) - option_a_properties_read.secondary_ipv4_prefix = AAZStrType( + option_a_properties.secondary_ipv4_prefix = AAZStrType( serialized_name="secondaryIpv4Prefix", ) - option_a_properties_read.secondary_ipv6_prefix = AAZStrType( + option_a_properties.secondary_ipv6_prefix = AAZStrType( serialized_name="secondaryIpv6Prefix", ) - option_a_properties_read.vlan_id = AAZIntType( + option_a_properties.vlan_id = AAZIntType( serialized_name="vlanId", ) - bfd_configuration = _schema_option_a_properties_read.bfd_configuration + bfd_configuration = _schema_vpn_configuration_properties_read.option_a_properties.bfd_configuration bfd_configuration.interval = AAZIntType( flags={"read_only": True}, ) @@ -692,44 +625,27 @@ def _build_schema_option_a_properties_read(cls, _schema): flags={"read_only": True}, ) - _schema.bfd_configuration = cls._schema_option_a_properties_read.bfd_configuration - _schema.mtu = cls._schema_option_a_properties_read.mtu - _schema.peer_asn = cls._schema_option_a_properties_read.peer_asn - _schema.primary_ipv4_prefix = cls._schema_option_a_properties_read.primary_ipv4_prefix - _schema.primary_ipv6_prefix = cls._schema_option_a_properties_read.primary_ipv6_prefix - _schema.secondary_ipv4_prefix = cls._schema_option_a_properties_read.secondary_ipv4_prefix - _schema.secondary_ipv6_prefix = cls._schema_option_a_properties_read.secondary_ipv6_prefix - _schema.vlan_id = cls._schema_option_a_properties_read.vlan_id - - _schema_option_b_properties_read = None - - @classmethod - def _build_schema_option_b_properties_read(cls, _schema): - if cls._schema_option_b_properties_read is not None: - _schema.export_route_targets = cls._schema_option_b_properties_read.export_route_targets - _schema.import_route_targets = cls._schema_option_b_properties_read.import_route_targets - return - - cls._schema_option_b_properties_read = _schema_option_b_properties_read = AAZObjectType() - - option_b_properties_read = _schema_option_b_properties_read - option_b_properties_read.export_route_targets = AAZListType( + option_b_properties = _schema_vpn_configuration_properties_read.option_b_properties + option_b_properties.export_route_targets = AAZListType( serialized_name="exportRouteTargets", flags={"required": True}, ) - option_b_properties_read.import_route_targets = AAZListType( + option_b_properties.import_route_targets = AAZListType( serialized_name="importRouteTargets", flags={"required": True}, ) - export_route_targets = _schema_option_b_properties_read.export_route_targets + export_route_targets = _schema_vpn_configuration_properties_read.option_b_properties.export_route_targets export_route_targets.Element = AAZStrType() - import_route_targets = _schema_option_b_properties_read.import_route_targets + import_route_targets = _schema_vpn_configuration_properties_read.option_b_properties.import_route_targets import_route_targets.Element = AAZStrType() - _schema.export_route_targets = cls._schema_option_b_properties_read.export_route_targets - _schema.import_route_targets = cls._schema_option_b_properties_read.import_route_targets + _schema.administrative_state = cls._schema_vpn_configuration_properties_read.administrative_state + _schema.network_to_network_interconnect_id = cls._schema_vpn_configuration_properties_read.network_to_network_interconnect_id + _schema.option_a_properties = cls._schema_vpn_configuration_properties_read.option_a_properties + _schema.option_b_properties = cls._schema_vpn_configuration_properties_read.option_b_properties + _schema.peering_option = cls._schema_vpn_configuration_properties_read.peering_option __all__ = ["List"] diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/fabric/_show.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/fabric/_show.py index de5970c0d84..320c3adc1e5 100644 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/fabric/_show.py +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/fabric/_show.py @@ -246,54 +246,12 @@ def _build_schema_on_200(cls): serialized_name="infrastructureVpnConfiguration", flags={"required": True}, ) + _ShowHelper._build_schema_vpn_configuration_properties_read(management_network_configuration.infrastructure_vpn_configuration) management_network_configuration.workload_vpn_configuration = AAZObjectType( serialized_name="workloadVpnConfiguration", flags={"required": True}, ) - - infrastructure_vpn_configuration = cls._schema_on_200.properties.management_network_configuration.infrastructure_vpn_configuration - infrastructure_vpn_configuration.administrative_state = AAZStrType( - serialized_name="administrativeState", - flags={"read_only": True}, - ) - infrastructure_vpn_configuration.network_to_network_interconnect_id = AAZStrType( - serialized_name="networkToNetworkInterconnectId", - flags={"read_only": True}, - ) - infrastructure_vpn_configuration.option_a_properties = AAZObjectType( - serialized_name="optionAProperties", - ) - _ShowHelper._build_schema_option_a_properties_read(infrastructure_vpn_configuration.option_a_properties) - infrastructure_vpn_configuration.option_b_properties = AAZObjectType( - serialized_name="optionBProperties", - ) - _ShowHelper._build_schema_option_b_properties_read(infrastructure_vpn_configuration.option_b_properties) - infrastructure_vpn_configuration.peering_option = AAZStrType( - serialized_name="peeringOption", - flags={"required": True}, - ) - - workload_vpn_configuration = cls._schema_on_200.properties.management_network_configuration.workload_vpn_configuration - workload_vpn_configuration.administrative_state = AAZStrType( - serialized_name="administrativeState", - flags={"read_only": True}, - ) - workload_vpn_configuration.network_to_network_interconnect_id = AAZStrType( - serialized_name="networkToNetworkInterconnectId", - flags={"read_only": True}, - ) - workload_vpn_configuration.option_a_properties = AAZObjectType( - serialized_name="optionAProperties", - ) - _ShowHelper._build_schema_option_a_properties_read(workload_vpn_configuration.option_a_properties) - workload_vpn_configuration.option_b_properties = AAZObjectType( - serialized_name="optionBProperties", - ) - _ShowHelper._build_schema_option_b_properties_read(workload_vpn_configuration.option_b_properties) - workload_vpn_configuration.peering_option = AAZStrType( - serialized_name="peeringOption", - flags={"required": True}, - ) + _ShowHelper._build_schema_vpn_configuration_properties_read(management_network_configuration.workload_vpn_configuration) racks = cls._schema_on_200.properties.racks racks.Element = AAZStrType() @@ -356,48 +314,65 @@ def _build_schema_on_200(cls): class _ShowHelper: """Helper class for Show""" - _schema_option_a_properties_read = None + _schema_vpn_configuration_properties_read = None @classmethod - def _build_schema_option_a_properties_read(cls, _schema): - if cls._schema_option_a_properties_read is not None: - _schema.bfd_configuration = cls._schema_option_a_properties_read.bfd_configuration - _schema.mtu = cls._schema_option_a_properties_read.mtu - _schema.peer_asn = cls._schema_option_a_properties_read.peer_asn - _schema.primary_ipv4_prefix = cls._schema_option_a_properties_read.primary_ipv4_prefix - _schema.primary_ipv6_prefix = cls._schema_option_a_properties_read.primary_ipv6_prefix - _schema.secondary_ipv4_prefix = cls._schema_option_a_properties_read.secondary_ipv4_prefix - _schema.secondary_ipv6_prefix = cls._schema_option_a_properties_read.secondary_ipv6_prefix - _schema.vlan_id = cls._schema_option_a_properties_read.vlan_id + def _build_schema_vpn_configuration_properties_read(cls, _schema): + if cls._schema_vpn_configuration_properties_read is not None: + _schema.administrative_state = cls._schema_vpn_configuration_properties_read.administrative_state + _schema.network_to_network_interconnect_id = cls._schema_vpn_configuration_properties_read.network_to_network_interconnect_id + _schema.option_a_properties = cls._schema_vpn_configuration_properties_read.option_a_properties + _schema.option_b_properties = cls._schema_vpn_configuration_properties_read.option_b_properties + _schema.peering_option = cls._schema_vpn_configuration_properties_read.peering_option return - cls._schema_option_a_properties_read = _schema_option_a_properties_read = AAZObjectType() + cls._schema_vpn_configuration_properties_read = _schema_vpn_configuration_properties_read = AAZObjectType() + + vpn_configuration_properties_read = _schema_vpn_configuration_properties_read + vpn_configuration_properties_read.administrative_state = AAZStrType( + serialized_name="administrativeState", + flags={"read_only": True}, + ) + vpn_configuration_properties_read.network_to_network_interconnect_id = AAZStrType( + serialized_name="networkToNetworkInterconnectId", + flags={"read_only": True}, + ) + vpn_configuration_properties_read.option_a_properties = AAZObjectType( + serialized_name="optionAProperties", + ) + vpn_configuration_properties_read.option_b_properties = AAZObjectType( + serialized_name="optionBProperties", + ) + vpn_configuration_properties_read.peering_option = AAZStrType( + serialized_name="peeringOption", + flags={"required": True}, + ) - option_a_properties_read = _schema_option_a_properties_read - option_a_properties_read.bfd_configuration = AAZObjectType( + option_a_properties = _schema_vpn_configuration_properties_read.option_a_properties + option_a_properties.bfd_configuration = AAZObjectType( serialized_name="bfdConfiguration", ) - option_a_properties_read.mtu = AAZIntType() - option_a_properties_read.peer_asn = AAZIntType( + option_a_properties.mtu = AAZIntType() + option_a_properties.peer_asn = AAZIntType( serialized_name="peerASN", ) - option_a_properties_read.primary_ipv4_prefix = AAZStrType( + option_a_properties.primary_ipv4_prefix = AAZStrType( serialized_name="primaryIpv4Prefix", ) - option_a_properties_read.primary_ipv6_prefix = AAZStrType( + option_a_properties.primary_ipv6_prefix = AAZStrType( serialized_name="primaryIpv6Prefix", ) - option_a_properties_read.secondary_ipv4_prefix = AAZStrType( + option_a_properties.secondary_ipv4_prefix = AAZStrType( serialized_name="secondaryIpv4Prefix", ) - option_a_properties_read.secondary_ipv6_prefix = AAZStrType( + option_a_properties.secondary_ipv6_prefix = AAZStrType( serialized_name="secondaryIpv6Prefix", ) - option_a_properties_read.vlan_id = AAZIntType( + option_a_properties.vlan_id = AAZIntType( serialized_name="vlanId", ) - bfd_configuration = _schema_option_a_properties_read.bfd_configuration + bfd_configuration = _schema_vpn_configuration_properties_read.option_a_properties.bfd_configuration bfd_configuration.interval = AAZIntType( flags={"read_only": True}, ) @@ -405,44 +380,27 @@ def _build_schema_option_a_properties_read(cls, _schema): flags={"read_only": True}, ) - _schema.bfd_configuration = cls._schema_option_a_properties_read.bfd_configuration - _schema.mtu = cls._schema_option_a_properties_read.mtu - _schema.peer_asn = cls._schema_option_a_properties_read.peer_asn - _schema.primary_ipv4_prefix = cls._schema_option_a_properties_read.primary_ipv4_prefix - _schema.primary_ipv6_prefix = cls._schema_option_a_properties_read.primary_ipv6_prefix - _schema.secondary_ipv4_prefix = cls._schema_option_a_properties_read.secondary_ipv4_prefix - _schema.secondary_ipv6_prefix = cls._schema_option_a_properties_read.secondary_ipv6_prefix - _schema.vlan_id = cls._schema_option_a_properties_read.vlan_id - - _schema_option_b_properties_read = None - - @classmethod - def _build_schema_option_b_properties_read(cls, _schema): - if cls._schema_option_b_properties_read is not None: - _schema.export_route_targets = cls._schema_option_b_properties_read.export_route_targets - _schema.import_route_targets = cls._schema_option_b_properties_read.import_route_targets - return - - cls._schema_option_b_properties_read = _schema_option_b_properties_read = AAZObjectType() - - option_b_properties_read = _schema_option_b_properties_read - option_b_properties_read.export_route_targets = AAZListType( + option_b_properties = _schema_vpn_configuration_properties_read.option_b_properties + option_b_properties.export_route_targets = AAZListType( serialized_name="exportRouteTargets", flags={"required": True}, ) - option_b_properties_read.import_route_targets = AAZListType( + option_b_properties.import_route_targets = AAZListType( serialized_name="importRouteTargets", flags={"required": True}, ) - export_route_targets = _schema_option_b_properties_read.export_route_targets + export_route_targets = _schema_vpn_configuration_properties_read.option_b_properties.export_route_targets export_route_targets.Element = AAZStrType() - import_route_targets = _schema_option_b_properties_read.import_route_targets + import_route_targets = _schema_vpn_configuration_properties_read.option_b_properties.import_route_targets import_route_targets.Element = AAZStrType() - _schema.export_route_targets = cls._schema_option_b_properties_read.export_route_targets - _schema.import_route_targets = cls._schema_option_b_properties_read.import_route_targets + _schema.administrative_state = cls._schema_vpn_configuration_properties_read.administrative_state + _schema.network_to_network_interconnect_id = cls._schema_vpn_configuration_properties_read.network_to_network_interconnect_id + _schema.option_a_properties = cls._schema_vpn_configuration_properties_read.option_a_properties + _schema.option_b_properties = cls._schema_vpn_configuration_properties_read.option_b_properties + _schema.peering_option = cls._schema_vpn_configuration_properties_read.peering_option __all__ = ["Show"] diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/fabric/_wait.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/fabric/_wait.py index 32dc647225b..d788ee1af6e 100644 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/fabric/_wait.py +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/fabric/_wait.py @@ -242,54 +242,12 @@ def _build_schema_on_200(cls): serialized_name="infrastructureVpnConfiguration", flags={"required": True}, ) + _WaitHelper._build_schema_vpn_configuration_properties_read(management_network_configuration.infrastructure_vpn_configuration) management_network_configuration.workload_vpn_configuration = AAZObjectType( serialized_name="workloadVpnConfiguration", flags={"required": True}, ) - - infrastructure_vpn_configuration = cls._schema_on_200.properties.management_network_configuration.infrastructure_vpn_configuration - infrastructure_vpn_configuration.administrative_state = AAZStrType( - serialized_name="administrativeState", - flags={"read_only": True}, - ) - infrastructure_vpn_configuration.network_to_network_interconnect_id = AAZStrType( - serialized_name="networkToNetworkInterconnectId", - flags={"read_only": True}, - ) - infrastructure_vpn_configuration.option_a_properties = AAZObjectType( - serialized_name="optionAProperties", - ) - _WaitHelper._build_schema_option_a_properties_read(infrastructure_vpn_configuration.option_a_properties) - infrastructure_vpn_configuration.option_b_properties = AAZObjectType( - serialized_name="optionBProperties", - ) - _WaitHelper._build_schema_option_b_properties_read(infrastructure_vpn_configuration.option_b_properties) - infrastructure_vpn_configuration.peering_option = AAZStrType( - serialized_name="peeringOption", - flags={"required": True}, - ) - - workload_vpn_configuration = cls._schema_on_200.properties.management_network_configuration.workload_vpn_configuration - workload_vpn_configuration.administrative_state = AAZStrType( - serialized_name="administrativeState", - flags={"read_only": True}, - ) - workload_vpn_configuration.network_to_network_interconnect_id = AAZStrType( - serialized_name="networkToNetworkInterconnectId", - flags={"read_only": True}, - ) - workload_vpn_configuration.option_a_properties = AAZObjectType( - serialized_name="optionAProperties", - ) - _WaitHelper._build_schema_option_a_properties_read(workload_vpn_configuration.option_a_properties) - workload_vpn_configuration.option_b_properties = AAZObjectType( - serialized_name="optionBProperties", - ) - _WaitHelper._build_schema_option_b_properties_read(workload_vpn_configuration.option_b_properties) - workload_vpn_configuration.peering_option = AAZStrType( - serialized_name="peeringOption", - flags={"required": True}, - ) + _WaitHelper._build_schema_vpn_configuration_properties_read(management_network_configuration.workload_vpn_configuration) racks = cls._schema_on_200.properties.racks racks.Element = AAZStrType() @@ -352,48 +310,65 @@ def _build_schema_on_200(cls): class _WaitHelper: """Helper class for Wait""" - _schema_option_a_properties_read = None + _schema_vpn_configuration_properties_read = None @classmethod - def _build_schema_option_a_properties_read(cls, _schema): - if cls._schema_option_a_properties_read is not None: - _schema.bfd_configuration = cls._schema_option_a_properties_read.bfd_configuration - _schema.mtu = cls._schema_option_a_properties_read.mtu - _schema.peer_asn = cls._schema_option_a_properties_read.peer_asn - _schema.primary_ipv4_prefix = cls._schema_option_a_properties_read.primary_ipv4_prefix - _schema.primary_ipv6_prefix = cls._schema_option_a_properties_read.primary_ipv6_prefix - _schema.secondary_ipv4_prefix = cls._schema_option_a_properties_read.secondary_ipv4_prefix - _schema.secondary_ipv6_prefix = cls._schema_option_a_properties_read.secondary_ipv6_prefix - _schema.vlan_id = cls._schema_option_a_properties_read.vlan_id + def _build_schema_vpn_configuration_properties_read(cls, _schema): + if cls._schema_vpn_configuration_properties_read is not None: + _schema.administrative_state = cls._schema_vpn_configuration_properties_read.administrative_state + _schema.network_to_network_interconnect_id = cls._schema_vpn_configuration_properties_read.network_to_network_interconnect_id + _schema.option_a_properties = cls._schema_vpn_configuration_properties_read.option_a_properties + _schema.option_b_properties = cls._schema_vpn_configuration_properties_read.option_b_properties + _schema.peering_option = cls._schema_vpn_configuration_properties_read.peering_option return - cls._schema_option_a_properties_read = _schema_option_a_properties_read = AAZObjectType() + cls._schema_vpn_configuration_properties_read = _schema_vpn_configuration_properties_read = AAZObjectType() + + vpn_configuration_properties_read = _schema_vpn_configuration_properties_read + vpn_configuration_properties_read.administrative_state = AAZStrType( + serialized_name="administrativeState", + flags={"read_only": True}, + ) + vpn_configuration_properties_read.network_to_network_interconnect_id = AAZStrType( + serialized_name="networkToNetworkInterconnectId", + flags={"read_only": True}, + ) + vpn_configuration_properties_read.option_a_properties = AAZObjectType( + serialized_name="optionAProperties", + ) + vpn_configuration_properties_read.option_b_properties = AAZObjectType( + serialized_name="optionBProperties", + ) + vpn_configuration_properties_read.peering_option = AAZStrType( + serialized_name="peeringOption", + flags={"required": True}, + ) - option_a_properties_read = _schema_option_a_properties_read - option_a_properties_read.bfd_configuration = AAZObjectType( + option_a_properties = _schema_vpn_configuration_properties_read.option_a_properties + option_a_properties.bfd_configuration = AAZObjectType( serialized_name="bfdConfiguration", ) - option_a_properties_read.mtu = AAZIntType() - option_a_properties_read.peer_asn = AAZIntType( + option_a_properties.mtu = AAZIntType() + option_a_properties.peer_asn = AAZIntType( serialized_name="peerASN", ) - option_a_properties_read.primary_ipv4_prefix = AAZStrType( + option_a_properties.primary_ipv4_prefix = AAZStrType( serialized_name="primaryIpv4Prefix", ) - option_a_properties_read.primary_ipv6_prefix = AAZStrType( + option_a_properties.primary_ipv6_prefix = AAZStrType( serialized_name="primaryIpv6Prefix", ) - option_a_properties_read.secondary_ipv4_prefix = AAZStrType( + option_a_properties.secondary_ipv4_prefix = AAZStrType( serialized_name="secondaryIpv4Prefix", ) - option_a_properties_read.secondary_ipv6_prefix = AAZStrType( + option_a_properties.secondary_ipv6_prefix = AAZStrType( serialized_name="secondaryIpv6Prefix", ) - option_a_properties_read.vlan_id = AAZIntType( + option_a_properties.vlan_id = AAZIntType( serialized_name="vlanId", ) - bfd_configuration = _schema_option_a_properties_read.bfd_configuration + bfd_configuration = _schema_vpn_configuration_properties_read.option_a_properties.bfd_configuration bfd_configuration.interval = AAZIntType( flags={"read_only": True}, ) @@ -401,44 +376,27 @@ def _build_schema_option_a_properties_read(cls, _schema): flags={"read_only": True}, ) - _schema.bfd_configuration = cls._schema_option_a_properties_read.bfd_configuration - _schema.mtu = cls._schema_option_a_properties_read.mtu - _schema.peer_asn = cls._schema_option_a_properties_read.peer_asn - _schema.primary_ipv4_prefix = cls._schema_option_a_properties_read.primary_ipv4_prefix - _schema.primary_ipv6_prefix = cls._schema_option_a_properties_read.primary_ipv6_prefix - _schema.secondary_ipv4_prefix = cls._schema_option_a_properties_read.secondary_ipv4_prefix - _schema.secondary_ipv6_prefix = cls._schema_option_a_properties_read.secondary_ipv6_prefix - _schema.vlan_id = cls._schema_option_a_properties_read.vlan_id - - _schema_option_b_properties_read = None - - @classmethod - def _build_schema_option_b_properties_read(cls, _schema): - if cls._schema_option_b_properties_read is not None: - _schema.export_route_targets = cls._schema_option_b_properties_read.export_route_targets - _schema.import_route_targets = cls._schema_option_b_properties_read.import_route_targets - return - - cls._schema_option_b_properties_read = _schema_option_b_properties_read = AAZObjectType() - - option_b_properties_read = _schema_option_b_properties_read - option_b_properties_read.export_route_targets = AAZListType( + option_b_properties = _schema_vpn_configuration_properties_read.option_b_properties + option_b_properties.export_route_targets = AAZListType( serialized_name="exportRouteTargets", flags={"required": True}, ) - option_b_properties_read.import_route_targets = AAZListType( + option_b_properties.import_route_targets = AAZListType( serialized_name="importRouteTargets", flags={"required": True}, ) - export_route_targets = _schema_option_b_properties_read.export_route_targets + export_route_targets = _schema_vpn_configuration_properties_read.option_b_properties.export_route_targets export_route_targets.Element = AAZStrType() - import_route_targets = _schema_option_b_properties_read.import_route_targets + import_route_targets = _schema_vpn_configuration_properties_read.option_b_properties.import_route_targets import_route_targets.Element = AAZStrType() - _schema.export_route_targets = cls._schema_option_b_properties_read.export_route_targets - _schema.import_route_targets = cls._schema_option_b_properties_read.import_route_targets + _schema.administrative_state = cls._schema_vpn_configuration_properties_read.administrative_state + _schema.network_to_network_interconnect_id = cls._schema_vpn_configuration_properties_read.network_to_network_interconnect_id + _schema.option_a_properties = cls._schema_vpn_configuration_properties_read.option_a_properties + _schema.option_b_properties = cls._schema_vpn_configuration_properties_read.option_b_properties + _schema.peering_option = cls._schema_vpn_configuration_properties_read.peering_option __all__ = ["Wait"] diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/fabricsku/__cmd_group.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/fabricsku/__cmd_group.py deleted file mode 100644 index d8fa0089af2..00000000000 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/fabricsku/__cmd_group.py +++ /dev/null @@ -1,23 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command_group( - "networkfabric fabricsku", -) -class __CMDGroup(AAZCommandGroup): - """Manage Network Fabric SKU Resource - """ - pass - - -__all__ = ["__CMDGroup"] diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/fabricsku/__init__.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/fabricsku/__init__.py deleted file mode 100644 index 2df85698253..00000000000 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/fabricsku/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from .__cmd_group import * -from ._list import * -from ._show import * diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/fabricsku/_list.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/fabricsku/_list.py deleted file mode 100644 index 2817932e28c..00000000000 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/fabricsku/_list.py +++ /dev/null @@ -1,214 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "networkfabric fabricsku list", -) -class List(AAZCommand): - """List all Network Fabric SKUs in the provided subscription. - - :example: List the FabricSKU for Subscription - az networkfabric fabricsku list --subscription - """ - - _aaz_info = { - "version": "2023-02-01-preview", - "resources": [ - ["mgmt-plane", "/subscriptions/{}/providers/microsoft.managednetworkfabric/networkfabricskus", "2023-02-01-preview"], - ] - } - - def _handler(self, command_args): - super()._handler(command_args) - return self.build_paging(self._execute_operations, self._output) - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - self.NetworkFabricSkusListBySubscription(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - def _output(self, *args, **kwargs): - result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) - next_link = self.deserialize_output(self.ctx.vars.instance.next_link) - return result, next_link - - class NetworkFabricSkusListBySubscription(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [200]: - return self.on_200(session) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkFabricSkus", - **self.url_parameters - ) - - @property - def method(self): - return "GET" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "subscriptionId", self.ctx.subscription_id, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2023-02-01-preview", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - def on_200(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200 - ) - - _schema_on_200 = None - - @classmethod - def _build_schema_on_200(cls): - if cls._schema_on_200 is not None: - return cls._schema_on_200 - - cls._schema_on_200 = AAZObjectType() - - _schema_on_200 = cls._schema_on_200 - _schema_on_200.next_link = AAZStrType( - serialized_name="nextLink", - ) - _schema_on_200.value = AAZListType() - - value = cls._schema_on_200.value - value.Element = AAZObjectType() - - _element = cls._schema_on_200.value.Element - _element.id = AAZStrType( - flags={"read_only": True}, - ) - _element.name = AAZStrType( - flags={"read_only": True}, - ) - _element.properties = AAZObjectType( - flags={"required": True, "client_flatten": True}, - ) - _element.system_data = AAZObjectType( - serialized_name="systemData", - flags={"read_only": True}, - ) - _element.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = cls._schema_on_200.value.Element.properties - properties.details_uri = AAZStrType( - serialized_name="detailsUri", - flags={"read_only": True}, - ) - properties.max_compute_racks = AAZIntType( - serialized_name="maxComputeRacks", - ) - properties.max_supported_ver = AAZStrType( - serialized_name="maxSupportedVer", - flags={"read_only": True}, - ) - properties.min_supported_ver = AAZStrType( - serialized_name="minSupportedVer", - flags={"read_only": True}, - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.type = AAZStrType( - flags={"read_only": True}, - ) - - system_data = cls._schema_on_200.value.Element.system_data - system_data.created_at = AAZStrType( - serialized_name="createdAt", - ) - system_data.created_by = AAZStrType( - serialized_name="createdBy", - ) - system_data.created_by_type = AAZStrType( - serialized_name="createdByType", - ) - system_data.last_modified_at = AAZStrType( - serialized_name="lastModifiedAt", - ) - system_data.last_modified_by = AAZStrType( - serialized_name="lastModifiedBy", - ) - system_data.last_modified_by_type = AAZStrType( - serialized_name="lastModifiedByType", - ) - - return cls._schema_on_200 - - -class _ListHelper: - """Helper class for List""" - - -__all__ = ["List"] diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/fabricsku/_show.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/fabricsku/_show.py deleted file mode 100644 index cd9e9c94a12..00000000000 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/fabricsku/_show.py +++ /dev/null @@ -1,214 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "networkfabric fabricsku show", -) -class Show(AAZCommand): - """Show details of the provided Network Fabric SKU resource. - """ - - _aaz_info = { - "version": "2023-02-01-preview", - "resources": [ - ["mgmt-plane", "/subscriptions/{}/providers/microsoft.managednetworkfabric/networkfabricskus/{}", "2023-02-01-preview"], - ] - } - - def _handler(self, command_args): - super()._handler(command_args) - self._execute_operations() - return self._output() - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.resource_name = AAZStrArg( - options=["--resource-name"], - help="Name of the Network Fabric Sku", - required=True, - id_part="name", - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - self.NetworkFabricSkusGet(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - def _output(self, *args, **kwargs): - result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) - return result - - class NetworkFabricSkusGet(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [200]: - return self.on_200(session) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkFabricSkus/{networkFabricSkuName}", - **self.url_parameters - ) - - @property - def method(self): - return "GET" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "networkFabricSkuName", self.ctx.args.resource_name, - required=True, - ), - **self.serialize_url_param( - "subscriptionId", self.ctx.subscription_id, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2023-02-01-preview", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - def on_200(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200 - ) - - _schema_on_200 = None - - @classmethod - def _build_schema_on_200(cls): - if cls._schema_on_200 is not None: - return cls._schema_on_200 - - cls._schema_on_200 = AAZObjectType() - - _schema_on_200 = cls._schema_on_200 - _schema_on_200.id = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200.name = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200.properties = AAZObjectType( - flags={"required": True, "client_flatten": True}, - ) - _schema_on_200.system_data = AAZObjectType( - serialized_name="systemData", - flags={"read_only": True}, - ) - _schema_on_200.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = cls._schema_on_200.properties - properties.details_uri = AAZStrType( - serialized_name="detailsUri", - flags={"read_only": True}, - ) - properties.max_compute_racks = AAZIntType( - serialized_name="maxComputeRacks", - ) - properties.max_supported_ver = AAZStrType( - serialized_name="maxSupportedVer", - flags={"read_only": True}, - ) - properties.min_supported_ver = AAZStrType( - serialized_name="minSupportedVer", - flags={"read_only": True}, - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.type = AAZStrType( - flags={"read_only": True}, - ) - - system_data = cls._schema_on_200.system_data - system_data.created_at = AAZStrType( - serialized_name="createdAt", - ) - system_data.created_by = AAZStrType( - serialized_name="createdBy", - ) - system_data.created_by_type = AAZStrType( - serialized_name="createdByType", - ) - system_data.last_modified_at = AAZStrType( - serialized_name="lastModifiedAt", - ) - system_data.last_modified_by = AAZStrType( - serialized_name="lastModifiedBy", - ) - system_data.last_modified_by_type = AAZStrType( - serialized_name="lastModifiedByType", - ) - - return cls._schema_on_200 - - -class _ShowHelper: - """Helper class for Show""" - - -__all__ = ["Show"] diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/internalnetwork/__init__.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/internalnetwork/__init__.py index 2b037f08f76..2d1a2078686 100644 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/internalnetwork/__init__.py +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/internalnetwork/__init__.py @@ -13,5 +13,4 @@ from ._delete import * from ._list import * from ._show import * -from ._update_admin_state import * from ._wait import * diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/internalnetwork/_update_admin_state.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/internalnetwork/_update_admin_state.py deleted file mode 100644 index 07882eab323..00000000000 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/internalnetwork/_update_admin_state.py +++ /dev/null @@ -1,204 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "networkfabric internalnetwork update-admin-state", -) -class UpdateAdminState(AAZCommand): - """Update the admin state of the provided Internal Network resource. - - :example: Update admin state of Internal Network - az networkfabric internalnetwork update-admin-state --resource-group "example-rg" --l3domain "example-l3domain" --resource-name "example-internalNetwork" --state "Enable" - """ - - _aaz_info = { - "version": "2023-02-01-preview", - "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/l3isolationdomains/{}/internalnetworks/{}/updateadministrativestate", "2023-02-01-preview"], - ] - } - - AZ_SUPPORT_NO_WAIT = True - - def _handler(self, command_args): - super()._handler(command_args) - return self.build_lro_poller(self._execute_operations, None) - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.resource_name = AAZStrArg( - options=["--resource-name"], - help="Name of the InternalNetwork.", - required=True, - id_part="child_name_1", - ) - _args_schema.l3_isolation_domain_name = AAZStrArg( - options=["--l3domain", "--l3-isolation-domain-name"], - help="Name of the L3IsolationDomain", - required=True, - id_part="name", - ) - _args_schema.resource_group = AAZResourceGroupNameArg( - help="Name of the resource group", - required=True, - ) - - # define Arg Group "Body" - - _args_schema = cls._args_schema - _args_schema.resource_ids = AAZListArg( - options=["--resource-ids"], - arg_group="Body", - help="Network Fabrics or Network Rack resource Id.", - ) - _args_schema.state = AAZStrArg( - options=["--state"], - arg_group="Body", - help="Administrative state.", - enum={"Disable": "Disable", "Enable": "Enable"}, - ) - - resource_ids = cls._args_schema.resource_ids - resource_ids.Element = AAZStrArg() - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - yield self.InternalNetworksUpdateAdministrativeState(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - class InternalNetworksUpdateAdministrativeState(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [202]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_200, - self.on_error, - lro_options={"final-state-via": "location"}, - path_format_arguments=self.url_parameters, - ) - if session.http_response.status_code in [200]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_200, - self.on_error, - lro_options={"final-state-via": "location"}, - path_format_arguments=self.url_parameters, - ) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateAdministrativeState", - **self.url_parameters - ) - - @property - def method(self): - return "POST" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "internalNetworkName", self.ctx.args.resource_name, - required=True, - ), - **self.serialize_url_param( - "l3IsolationDomainName", self.ctx.args.l3_isolation_domain_name, - required=True, - ), - **self.serialize_url_param( - "resourceGroupName", self.ctx.args.resource_group, - required=True, - ), - **self.serialize_url_param( - "subscriptionId", self.ctx.subscription_id, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2023-02-01-preview", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Content-Type", "application/json", - ), - } - return parameters - - @property - def content(self): - _content_value, _builder = self.new_content_builder( - self.ctx.args, - typ=AAZObjectType, - typ_kwargs={"flags": {"required": True, "client_flatten": True}} - ) - _builder.set_prop("resourceIds", AAZListType, ".resource_ids") - _builder.set_prop("state", AAZStrType, ".state") - - resource_ids = _builder.get(".resourceIds") - if resource_ids is not None: - resource_ids.set_elements(AAZStrType, ".") - - return self.serialize_content(_content_value) - - def on_200(self, session): - pass - - -class _UpdateAdminStateHelper: - """Helper class for UpdateAdminState""" - - -__all__ = ["UpdateAdminState"] diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/l3domain/_create.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/l3domain/_create.py index 192eaf5edef..6f059f6cdfe 100644 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/l3domain/_create.py +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/l3domain/_create.py @@ -390,15 +390,11 @@ def _build_schema_on_200_201(cls): ipv4_routes = cls._schema_on_200_201.properties.aggregate_route_configuration.ipv4_routes ipv4_routes.Element = AAZObjectType() - - _element = cls._schema_on_200_201.properties.aggregate_route_configuration.ipv4_routes.Element - _element.prefix = AAZStrType() + _CreateHelper._build_schema_aggregate_route_read(ipv4_routes.Element) ipv6_routes = cls._schema_on_200_201.properties.aggregate_route_configuration.ipv6_routes ipv6_routes.Element = AAZObjectType() - - _element = cls._schema_on_200_201.properties.aggregate_route_configuration.ipv6_routes.Element - _element.prefix = AAZStrType() + _CreateHelper._build_schema_aggregate_route_read(ipv6_routes.Element) connected_subnet_route_policy = cls._schema_on_200_201.properties.connected_subnet_route_policy connected_subnet_route_policy.administrative_state = AAZStrType( @@ -444,5 +440,20 @@ def _build_schema_on_200_201(cls): class _CreateHelper: """Helper class for Create""" + _schema_aggregate_route_read = None + + @classmethod + def _build_schema_aggregate_route_read(cls, _schema): + if cls._schema_aggregate_route_read is not None: + _schema.prefix = cls._schema_aggregate_route_read.prefix + return + + cls._schema_aggregate_route_read = _schema_aggregate_route_read = AAZObjectType() + + aggregate_route_read = _schema_aggregate_route_read + aggregate_route_read.prefix = AAZStrType() + + _schema.prefix = cls._schema_aggregate_route_read.prefix + __all__ = ["Create"] diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/l3domain/_list.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/l3domain/_list.py index d7ce742dea1..e8365594996 100644 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/l3domain/_list.py +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/l3domain/_list.py @@ -228,15 +228,11 @@ def _build_schema_on_200(cls): ipv4_routes = cls._schema_on_200.value.Element.properties.aggregate_route_configuration.ipv4_routes ipv4_routes.Element = AAZObjectType() - - _element = cls._schema_on_200.value.Element.properties.aggregate_route_configuration.ipv4_routes.Element - _element.prefix = AAZStrType() + _ListHelper._build_schema_aggregate_route_read(ipv4_routes.Element) ipv6_routes = cls._schema_on_200.value.Element.properties.aggregate_route_configuration.ipv6_routes ipv6_routes.Element = AAZObjectType() - - _element = cls._schema_on_200.value.Element.properties.aggregate_route_configuration.ipv6_routes.Element - _element.prefix = AAZStrType() + _ListHelper._build_schema_aggregate_route_read(ipv6_routes.Element) connected_subnet_route_policy = cls._schema_on_200.value.Element.properties.connected_subnet_route_policy connected_subnet_route_policy.administrative_state = AAZStrType( @@ -427,15 +423,11 @@ def _build_schema_on_200(cls): ipv4_routes = cls._schema_on_200.value.Element.properties.aggregate_route_configuration.ipv4_routes ipv4_routes.Element = AAZObjectType() - - _element = cls._schema_on_200.value.Element.properties.aggregate_route_configuration.ipv4_routes.Element - _element.prefix = AAZStrType() + _ListHelper._build_schema_aggregate_route_read(ipv4_routes.Element) ipv6_routes = cls._schema_on_200.value.Element.properties.aggregate_route_configuration.ipv6_routes ipv6_routes.Element = AAZObjectType() - - _element = cls._schema_on_200.value.Element.properties.aggregate_route_configuration.ipv6_routes.Element - _element.prefix = AAZStrType() + _ListHelper._build_schema_aggregate_route_read(ipv6_routes.Element) connected_subnet_route_policy = cls._schema_on_200.value.Element.properties.connected_subnet_route_policy connected_subnet_route_policy.administrative_state = AAZStrType( @@ -481,5 +473,20 @@ def _build_schema_on_200(cls): class _ListHelper: """Helper class for List""" + _schema_aggregate_route_read = None + + @classmethod + def _build_schema_aggregate_route_read(cls, _schema): + if cls._schema_aggregate_route_read is not None: + _schema.prefix = cls._schema_aggregate_route_read.prefix + return + + cls._schema_aggregate_route_read = _schema_aggregate_route_read = AAZObjectType() + + aggregate_route_read = _schema_aggregate_route_read + aggregate_route_read.prefix = AAZStrType() + + _schema.prefix = cls._schema_aggregate_route_read.prefix + __all__ = ["List"] diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/l3domain/_show.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/l3domain/_show.py index 27f45f36bd0..409c0182e33 100644 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/l3domain/_show.py +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/l3domain/_show.py @@ -221,15 +221,11 @@ def _build_schema_on_200(cls): ipv4_routes = cls._schema_on_200.properties.aggregate_route_configuration.ipv4_routes ipv4_routes.Element = AAZObjectType() - - _element = cls._schema_on_200.properties.aggregate_route_configuration.ipv4_routes.Element - _element.prefix = AAZStrType() + _ShowHelper._build_schema_aggregate_route_read(ipv4_routes.Element) ipv6_routes = cls._schema_on_200.properties.aggregate_route_configuration.ipv6_routes ipv6_routes.Element = AAZObjectType() - - _element = cls._schema_on_200.properties.aggregate_route_configuration.ipv6_routes.Element - _element.prefix = AAZStrType() + _ShowHelper._build_schema_aggregate_route_read(ipv6_routes.Element) connected_subnet_route_policy = cls._schema_on_200.properties.connected_subnet_route_policy connected_subnet_route_policy.administrative_state = AAZStrType( @@ -275,5 +271,20 @@ def _build_schema_on_200(cls): class _ShowHelper: """Helper class for Show""" + _schema_aggregate_route_read = None + + @classmethod + def _build_schema_aggregate_route_read(cls, _schema): + if cls._schema_aggregate_route_read is not None: + _schema.prefix = cls._schema_aggregate_route_read.prefix + return + + cls._schema_aggregate_route_read = _schema_aggregate_route_read = AAZObjectType() + + aggregate_route_read = _schema_aggregate_route_read + aggregate_route_read.prefix = AAZStrType() + + _schema.prefix = cls._schema_aggregate_route_read.prefix + __all__ = ["Show"] diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/l3domain/_wait.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/l3domain/_wait.py index 0c83413c50f..6c6e1d5869b 100644 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/l3domain/_wait.py +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/l3domain/_wait.py @@ -217,15 +217,11 @@ def _build_schema_on_200(cls): ipv4_routes = cls._schema_on_200.properties.aggregate_route_configuration.ipv4_routes ipv4_routes.Element = AAZObjectType() - - _element = cls._schema_on_200.properties.aggregate_route_configuration.ipv4_routes.Element - _element.prefix = AAZStrType() + _WaitHelper._build_schema_aggregate_route_read(ipv4_routes.Element) ipv6_routes = cls._schema_on_200.properties.aggregate_route_configuration.ipv6_routes ipv6_routes.Element = AAZObjectType() - - _element = cls._schema_on_200.properties.aggregate_route_configuration.ipv6_routes.Element - _element.prefix = AAZStrType() + _WaitHelper._build_schema_aggregate_route_read(ipv6_routes.Element) connected_subnet_route_policy = cls._schema_on_200.properties.connected_subnet_route_policy connected_subnet_route_policy.administrative_state = AAZStrType( @@ -271,5 +267,20 @@ def _build_schema_on_200(cls): class _WaitHelper: """Helper class for Wait""" + _schema_aggregate_route_read = None + + @classmethod + def _build_schema_aggregate_route_read(cls, _schema): + if cls._schema_aggregate_route_read is not None: + _schema.prefix = cls._schema_aggregate_route_read.prefix + return + + cls._schema_aggregate_route_read = _schema_aggregate_route_read = AAZObjectType() + + aggregate_route_read = _schema_aggregate_route_read + aggregate_route_read.prefix = AAZStrType() + + _schema.prefix = cls._schema_aggregate_route_read.prefix + __all__ = ["Wait"] diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/rack/__init__.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/rack/__init__.py index 2d1a2078686..2df85698253 100644 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/rack/__init__.py +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/rack/__init__.py @@ -9,8 +9,5 @@ # flake8: noqa from .__cmd_group import * -from ._create import * -from ._delete import * from ._list import * from ._show import * -from ._wait import * diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/rack/_create.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/rack/_create.py deleted file mode 100644 index d07c101d592..00000000000 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/rack/_create.py +++ /dev/null @@ -1,313 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "networkfabric rack create", -) -class Create(AAZCommand): - """Create a Network Rack resource. - - :example: Create a Network Rack - az networkfabric rack create --resource-group "example-rg" --location "westus3" --network-rack-sku "rackskuname" --nf-id "/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/NetworkFabrics/example-fabricName" --resource-name "example-rack" - """ - - _aaz_info = { - "version": "2023-02-01-preview", - "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkracks/{}", "2023-02-01-preview"], - ] - } - - AZ_SUPPORT_NO_WAIT = True - - def _handler(self, command_args): - super()._handler(command_args) - return self.build_lro_poller(self._execute_operations, self._output) - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.resource_name = AAZStrArg( - options=["--resource-name"], - help="Name of the Network Rack", - required=True, - ) - _args_schema.resource_group = AAZResourceGroupNameArg( - help="Name of the resource group", - required=True, - ) - - # define Arg Group "Body" - - _args_schema = cls._args_schema - _args_schema.location = AAZResourceLocationArg( - arg_group="Body", - help="Location of Azure region", - required=True, - fmt=AAZResourceLocationArgFormat( - resource_group_arg="resource_group", - ), - ) - _args_schema.tags = AAZDictArg( - options=["--tags"], - arg_group="Body", - help="Resource tags.", - ) - - tags = cls._args_schema.tags - tags.Element = AAZStrArg() - - # define Arg Group "Properties" - - _args_schema = cls._args_schema - _args_schema.annotation = AAZStrArg( - options=["--annotation"], - arg_group="Properties", - help="Switch configuration description.", - ) - _args_schema.nf_id = AAZStrArg( - options=["--nf-id"], - arg_group="Properties", - help="Resource ID of the Network Fabric resource", - required=True, - ) - _args_schema.network_rack_sku = AAZStrArg( - options=["--network-rack-sku"], - arg_group="Properties", - help="Network Rack SKU name.", - required=True, - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - yield self.NetworkRacksCreate(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - def _output(self, *args, **kwargs): - result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) - return result - - class NetworkRacksCreate(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [202]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_200_201, - self.on_error, - lro_options={"final-state-via": "azure-async-operation"}, - path_format_arguments=self.url_parameters, - ) - if session.http_response.status_code in [200, 201]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_200_201, - self.on_error, - lro_options={"final-state-via": "azure-async-operation"}, - path_format_arguments=self.url_parameters, - ) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks/{networkRackName}", - **self.url_parameters - ) - - @property - def method(self): - return "PUT" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "networkRackName", self.ctx.args.resource_name, - required=True, - ), - **self.serialize_url_param( - "resourceGroupName", self.ctx.args.resource_group, - required=True, - ), - **self.serialize_url_param( - "subscriptionId", self.ctx.subscription_id, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2023-02-01-preview", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Content-Type", "application/json", - ), - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - @property - def content(self): - _content_value, _builder = self.new_content_builder( - self.ctx.args, - typ=AAZObjectType, - typ_kwargs={"flags": {"required": True, "client_flatten": True}} - ) - _builder.set_prop("location", AAZStrType, ".location", typ_kwargs={"flags": {"required": True}}) - _builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={"flags": {"required": True, "client_flatten": True}}) - _builder.set_prop("tags", AAZDictType, ".tags") - - properties = _builder.get(".properties") - if properties is not None: - properties.set_prop("annotation", AAZStrType, ".annotation") - properties.set_prop("networkFabricId", AAZStrType, ".nf_id", typ_kwargs={"flags": {"required": True}}) - properties.set_prop("networkRackSku", AAZStrType, ".network_rack_sku", typ_kwargs={"flags": {"required": True}}) - - tags = _builder.get(".tags") - if tags is not None: - tags.set_elements(AAZStrType, ".") - - return self.serialize_content(_content_value) - - def on_200_201(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200_201 - ) - - _schema_on_200_201 = None - - @classmethod - def _build_schema_on_200_201(cls): - if cls._schema_on_200_201 is not None: - return cls._schema_on_200_201 - - cls._schema_on_200_201 = AAZObjectType() - - _schema_on_200_201 = cls._schema_on_200_201 - _schema_on_200_201.id = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200_201.location = AAZStrType( - flags={"required": True}, - ) - _schema_on_200_201.name = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200_201.properties = AAZObjectType( - flags={"required": True, "client_flatten": True}, - ) - _schema_on_200_201.system_data = AAZObjectType( - serialized_name="systemData", - flags={"read_only": True}, - ) - _schema_on_200_201.tags = AAZDictType() - _schema_on_200_201.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = cls._schema_on_200_201.properties - properties.annotation = AAZStrType() - properties.network_devices = AAZListType( - serialized_name="networkDevices", - flags={"read_only": True}, - ) - properties.network_fabric_id = AAZStrType( - serialized_name="networkFabricId", - flags={"required": True}, - ) - properties.network_rack_sku = AAZStrType( - serialized_name="networkRackSku", - flags={"required": True}, - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - - network_devices = cls._schema_on_200_201.properties.network_devices - network_devices.Element = AAZStrType() - - system_data = cls._schema_on_200_201.system_data - system_data.created_at = AAZStrType( - serialized_name="createdAt", - ) - system_data.created_by = AAZStrType( - serialized_name="createdBy", - ) - system_data.created_by_type = AAZStrType( - serialized_name="createdByType", - ) - system_data.last_modified_at = AAZStrType( - serialized_name="lastModifiedAt", - ) - system_data.last_modified_by = AAZStrType( - serialized_name="lastModifiedBy", - ) - system_data.last_modified_by_type = AAZStrType( - serialized_name="lastModifiedByType", - ) - - tags = cls._schema_on_200_201.tags - tags.Element = AAZStrType() - - return cls._schema_on_200_201 - - -class _CreateHelper: - """Helper class for Create""" - - -__all__ = ["Create"] diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/rack/_delete.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/rack/_delete.py deleted file mode 100644 index 28a790e46ee..00000000000 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/rack/_delete.py +++ /dev/null @@ -1,151 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "networkfabric rack delete", -) -class Delete(AAZCommand): - """Delete the Network Rack resource. - - :example: Delete the Network Rack - az networkfabric rack delete --resource-group "example-rg" --resource-name "example-rack" - """ - - _aaz_info = { - "version": "2023-02-01-preview", - "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkracks/{}", "2023-02-01-preview"], - ] - } - - AZ_SUPPORT_NO_WAIT = True - - def _handler(self, command_args): - super()._handler(command_args) - return self.build_lro_poller(self._execute_operations, None) - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.resource_name = AAZStrArg( - options=["--resource-name"], - help="Name of the Network Rack", - required=True, - id_part="name", - ) - _args_schema.resource_group = AAZResourceGroupNameArg( - help="Name of the resource group", - required=True, - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - yield self.NetworkRacksDelete(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - class NetworkRacksDelete(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [202]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - None, - self.on_error, - lro_options={"final-state-via": "location"}, - path_format_arguments=self.url_parameters, - ) - if session.http_response.status_code in [204]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_204, - self.on_error, - lro_options={"final-state-via": "location"}, - path_format_arguments=self.url_parameters, - ) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks/{networkRackName}", - **self.url_parameters - ) - - @property - def method(self): - return "DELETE" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "networkRackName", self.ctx.args.resource_name, - required=True, - ), - **self.serialize_url_param( - "resourceGroupName", self.ctx.args.resource_group, - required=True, - ), - **self.serialize_url_param( - "subscriptionId", self.ctx.subscription_id, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2023-02-01-preview", - required=True, - ), - } - return parameters - - def on_204(self, session): - pass - - -class _DeleteHelper: - """Helper class for Delete""" - - -__all__ = ["Delete"] diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/rack/_wait.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/rack/_wait.py deleted file mode 100644 index f3ce857ece1..00000000000 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/rack/_wait.py +++ /dev/null @@ -1,226 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "networkfabric rack wait", -) -class Wait(AAZWaitCommand): - """Place the CLI in a waiting state until a condition is met. - """ - - _aaz_info = { - "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkracks/{}", "2023-02-01-preview"], - ] - } - - def _handler(self, command_args): - super()._handler(command_args) - self._execute_operations() - return self._output() - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.resource_name = AAZStrArg( - options=["--resource-name"], - help="Name of the Network Rack", - required=True, - id_part="name", - ) - _args_schema.resource_group = AAZResourceGroupNameArg( - help="Name of the resource group", - required=True, - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - self.NetworkRacksGet(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - def _output(self, *args, **kwargs): - result = self.deserialize_output(self.ctx.vars.instance, client_flatten=False) - return result - - class NetworkRacksGet(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [200]: - return self.on_200(session) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks/{networkRackName}", - **self.url_parameters - ) - - @property - def method(self): - return "GET" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "networkRackName", self.ctx.args.resource_name, - required=True, - ), - **self.serialize_url_param( - "resourceGroupName", self.ctx.args.resource_group, - required=True, - ), - **self.serialize_url_param( - "subscriptionId", self.ctx.subscription_id, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2023-02-01-preview", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - def on_200(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200 - ) - - _schema_on_200 = None - - @classmethod - def _build_schema_on_200(cls): - if cls._schema_on_200 is not None: - return cls._schema_on_200 - - cls._schema_on_200 = AAZObjectType() - - _schema_on_200 = cls._schema_on_200 - _schema_on_200.id = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200.location = AAZStrType( - flags={"required": True}, - ) - _schema_on_200.name = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200.properties = AAZObjectType( - flags={"required": True, "client_flatten": True}, - ) - _schema_on_200.system_data = AAZObjectType( - serialized_name="systemData", - flags={"read_only": True}, - ) - _schema_on_200.tags = AAZDictType() - _schema_on_200.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = cls._schema_on_200.properties - properties.annotation = AAZStrType() - properties.network_devices = AAZListType( - serialized_name="networkDevices", - flags={"read_only": True}, - ) - properties.network_fabric_id = AAZStrType( - serialized_name="networkFabricId", - flags={"required": True}, - ) - properties.network_rack_sku = AAZStrType( - serialized_name="networkRackSku", - flags={"required": True}, - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - - network_devices = cls._schema_on_200.properties.network_devices - network_devices.Element = AAZStrType() - - system_data = cls._schema_on_200.system_data - system_data.created_at = AAZStrType( - serialized_name="createdAt", - ) - system_data.created_by = AAZStrType( - serialized_name="createdBy", - ) - system_data.created_by_type = AAZStrType( - serialized_name="createdByType", - ) - system_data.last_modified_at = AAZStrType( - serialized_name="lastModifiedAt", - ) - system_data.last_modified_by = AAZStrType( - serialized_name="lastModifiedBy", - ) - system_data.last_modified_by_type = AAZStrType( - serialized_name="lastModifiedByType", - ) - - tags = cls._schema_on_200.tags - tags.Element = AAZStrType() - - return cls._schema_on_200 - - -class _WaitHelper: - """Helper class for Wait""" - - -__all__ = ["Wait"] diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/racksku/__cmd_group.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/racksku/__cmd_group.py deleted file mode 100644 index 7742a381ff4..00000000000 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/racksku/__cmd_group.py +++ /dev/null @@ -1,23 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command_group( - "networkfabric racksku", -) -class __CMDGroup(AAZCommandGroup): - """Manage Network Rack SKU Resource - """ - pass - - -__all__ = ["__CMDGroup"] diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/racksku/__init__.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/racksku/__init__.py deleted file mode 100644 index 2df85698253..00000000000 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/racksku/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from .__cmd_group import * -from ._list import * -from ._show import * diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/racksku/_list.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/racksku/_list.py deleted file mode 100644 index 3c217cd6e68..00000000000 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/racksku/_list.py +++ /dev/null @@ -1,226 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "networkfabric racksku list", -) -class List(AAZCommand): - """List all Network Rack SKUs in the provided subscription. - - :example: List the RackSKU for Subscription - az networkfabric racksku list --subscription - """ - - _aaz_info = { - "version": "2023-02-01-preview", - "resources": [ - ["mgmt-plane", "/subscriptions/{}/providers/microsoft.managednetworkfabric/networkrackskus", "2023-02-01-preview"], - ] - } - - def _handler(self, command_args): - super()._handler(command_args) - return self.build_paging(self._execute_operations, self._output) - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - self.NetworkRackSkusListBySubscription(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - def _output(self, *args, **kwargs): - result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) - next_link = self.deserialize_output(self.ctx.vars.instance.next_link) - return result, next_link - - class NetworkRackSkusListBySubscription(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [200]: - return self.on_200(session) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkRackSkus", - **self.url_parameters - ) - - @property - def method(self): - return "GET" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "subscriptionId", self.ctx.subscription_id, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2023-02-01-preview", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - def on_200(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200 - ) - - _schema_on_200 = None - - @classmethod - def _build_schema_on_200(cls): - if cls._schema_on_200 is not None: - return cls._schema_on_200 - - cls._schema_on_200 = AAZObjectType() - - _schema_on_200 = cls._schema_on_200 - _schema_on_200.next_link = AAZStrType( - serialized_name="nextLink", - ) - _schema_on_200.value = AAZListType() - - value = cls._schema_on_200.value - value.Element = AAZObjectType() - - _element = cls._schema_on_200.value.Element - _element.id = AAZStrType( - flags={"read_only": True}, - ) - _element.name = AAZStrType( - flags={"read_only": True}, - ) - _element.properties = AAZObjectType( - flags={"required": True, "client_flatten": True}, - ) - _element.system_data = AAZObjectType( - serialized_name="systemData", - flags={"read_only": True}, - ) - _element.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = cls._schema_on_200.value.Element.properties - properties.maximum_server_count = AAZIntType( - serialized_name="maximumServerCount", - ) - properties.maximum_storage_count = AAZIntType( - serialized_name="maximumStorageCount", - ) - properties.maximum_uplinks = AAZIntType( - serialized_name="maximumUplinks", - ) - properties.network_devices = AAZListType( - serialized_name="networkDevices", - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.role_name = AAZStrType( - serialized_name="roleName", - flags={"required": True}, - ) - - network_devices = cls._schema_on_200.value.Element.properties.network_devices - network_devices.Element = AAZObjectType() - - _element = cls._schema_on_200.value.Element.properties.network_devices.Element - _element.network_device_sku_name = AAZStrType( - serialized_name="networkDeviceSkuName", - ) - _element.rack_slot = AAZIntType( - serialized_name="rackSlot", - ) - _element.role_type = AAZStrType( - serialized_name="roleType", - ) - - system_data = cls._schema_on_200.value.Element.system_data - system_data.created_at = AAZStrType( - serialized_name="createdAt", - ) - system_data.created_by = AAZStrType( - serialized_name="createdBy", - ) - system_data.created_by_type = AAZStrType( - serialized_name="createdByType", - ) - system_data.last_modified_at = AAZStrType( - serialized_name="lastModifiedAt", - ) - system_data.last_modified_by = AAZStrType( - serialized_name="lastModifiedBy", - ) - system_data.last_modified_by_type = AAZStrType( - serialized_name="lastModifiedByType", - ) - - return cls._schema_on_200 - - -class _ListHelper: - """Helper class for List""" - - -__all__ = ["List"] diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/racksku/_show.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/racksku/_show.py deleted file mode 100644 index d4d73ac4600..00000000000 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/racksku/_show.py +++ /dev/null @@ -1,226 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "networkfabric racksku show", -) -class Show(AAZCommand): - """Show details of the provided Network Rack SKU resource. - """ - - _aaz_info = { - "version": "2023-02-01-preview", - "resources": [ - ["mgmt-plane", "/subscriptions/{}/providers/microsoft.managednetworkfabric/networkrackskus/{}", "2023-02-01-preview"], - ] - } - - def _handler(self, command_args): - super()._handler(command_args) - self._execute_operations() - return self._output() - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.resource_name = AAZStrArg( - options=["--resource-name"], - help="Name of the Network Rack Sku", - required=True, - id_part="name", - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - self.NetworkRackSkusGet(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - def _output(self, *args, **kwargs): - result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) - return result - - class NetworkRackSkusGet(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [200]: - return self.on_200(session) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkRackSkus/{networkRackSkuName}", - **self.url_parameters - ) - - @property - def method(self): - return "GET" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "networkRackSkuName", self.ctx.args.resource_name, - required=True, - ), - **self.serialize_url_param( - "subscriptionId", self.ctx.subscription_id, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2023-02-01-preview", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - def on_200(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200 - ) - - _schema_on_200 = None - - @classmethod - def _build_schema_on_200(cls): - if cls._schema_on_200 is not None: - return cls._schema_on_200 - - cls._schema_on_200 = AAZObjectType() - - _schema_on_200 = cls._schema_on_200 - _schema_on_200.id = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200.name = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200.properties = AAZObjectType( - flags={"required": True, "client_flatten": True}, - ) - _schema_on_200.system_data = AAZObjectType( - serialized_name="systemData", - flags={"read_only": True}, - ) - _schema_on_200.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = cls._schema_on_200.properties - properties.maximum_server_count = AAZIntType( - serialized_name="maximumServerCount", - ) - properties.maximum_storage_count = AAZIntType( - serialized_name="maximumStorageCount", - ) - properties.maximum_uplinks = AAZIntType( - serialized_name="maximumUplinks", - ) - properties.network_devices = AAZListType( - serialized_name="networkDevices", - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.role_name = AAZStrType( - serialized_name="roleName", - flags={"required": True}, - ) - - network_devices = cls._schema_on_200.properties.network_devices - network_devices.Element = AAZObjectType() - - _element = cls._schema_on_200.properties.network_devices.Element - _element.network_device_sku_name = AAZStrType( - serialized_name="networkDeviceSkuName", - ) - _element.rack_slot = AAZIntType( - serialized_name="rackSlot", - ) - _element.role_type = AAZStrType( - serialized_name="roleType", - ) - - system_data = cls._schema_on_200.system_data - system_data.created_at = AAZStrType( - serialized_name="createdAt", - ) - system_data.created_by = AAZStrType( - serialized_name="createdBy", - ) - system_data.created_by_type = AAZStrType( - serialized_name="createdByType", - ) - system_data.last_modified_at = AAZStrType( - serialized_name="lastModifiedAt", - ) - system_data.last_modified_by = AAZStrType( - serialized_name="lastModifiedBy", - ) - system_data.last_modified_by_type = AAZStrType( - serialized_name="lastModifiedByType", - ) - - return cls._schema_on_200 - - -class _ShowHelper: - """Helper class for Show""" - - -__all__ = ["Show"] diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/routepolicy/_create.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/routepolicy/_create.py index 10b20d4250b..4de768ea16b 100644 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/routepolicy/_create.py +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/routepolicy/_create.py @@ -548,61 +548,19 @@ def _build_schema_on_200_201(cls): ip_community_properties = cls._schema_on_200_201.properties.statements.Element.action.ip_community_properties ip_community_properties.add = AAZObjectType() + _CreateHelper._build_schema_ip_community_id_list_read(ip_community_properties.add) ip_community_properties.delete = AAZObjectType() + _CreateHelper._build_schema_ip_community_id_list_read(ip_community_properties.delete) ip_community_properties.set = AAZObjectType() - - add = cls._schema_on_200_201.properties.statements.Element.action.ip_community_properties.add - add.ip_community_ids = AAZListType( - serialized_name="ipCommunityIds", - ) - - ip_community_ids = cls._schema_on_200_201.properties.statements.Element.action.ip_community_properties.add.ip_community_ids - ip_community_ids.Element = AAZStrType() - - delete = cls._schema_on_200_201.properties.statements.Element.action.ip_community_properties.delete - delete.ip_community_ids = AAZListType( - serialized_name="ipCommunityIds", - ) - - ip_community_ids = cls._schema_on_200_201.properties.statements.Element.action.ip_community_properties.delete.ip_community_ids - ip_community_ids.Element = AAZStrType() - - set = cls._schema_on_200_201.properties.statements.Element.action.ip_community_properties.set - set.ip_community_ids = AAZListType( - serialized_name="ipCommunityIds", - ) - - ip_community_ids = cls._schema_on_200_201.properties.statements.Element.action.ip_community_properties.set.ip_community_ids - ip_community_ids.Element = AAZStrType() + _CreateHelper._build_schema_ip_community_id_list_read(ip_community_properties.set) ip_extended_community_properties = cls._schema_on_200_201.properties.statements.Element.action.ip_extended_community_properties ip_extended_community_properties.add = AAZObjectType() + _CreateHelper._build_schema_ip_extended_community_id_list_read(ip_extended_community_properties.add) ip_extended_community_properties.delete = AAZObjectType() + _CreateHelper._build_schema_ip_extended_community_id_list_read(ip_extended_community_properties.delete) ip_extended_community_properties.set = AAZObjectType() - - add = cls._schema_on_200_201.properties.statements.Element.action.ip_extended_community_properties.add - add.ip_extended_community_ids = AAZListType( - serialized_name="ipExtendedCommunityIds", - ) - - ip_extended_community_ids = cls._schema_on_200_201.properties.statements.Element.action.ip_extended_community_properties.add.ip_extended_community_ids - ip_extended_community_ids.Element = AAZStrType() - - delete = cls._schema_on_200_201.properties.statements.Element.action.ip_extended_community_properties.delete - delete.ip_extended_community_ids = AAZListType( - serialized_name="ipExtendedCommunityIds", - ) - - ip_extended_community_ids = cls._schema_on_200_201.properties.statements.Element.action.ip_extended_community_properties.delete.ip_extended_community_ids - ip_extended_community_ids.Element = AAZStrType() - - set = cls._schema_on_200_201.properties.statements.Element.action.ip_extended_community_properties.set - set.ip_extended_community_ids = AAZListType( - serialized_name="ipExtendedCommunityIds", - ) - - ip_extended_community_ids = cls._schema_on_200_201.properties.statements.Element.action.ip_extended_community_properties.set.ip_extended_community_ids - ip_extended_community_ids.Element = AAZStrType() + _CreateHelper._build_schema_ip_extended_community_id_list_read(ip_extended_community_properties.set) condition = cls._schema_on_200_201.properties.statements.Element.condition condition.ip_community_ids = AAZListType( @@ -650,5 +608,45 @@ def _build_schema_on_200_201(cls): class _CreateHelper: """Helper class for Create""" + _schema_ip_community_id_list_read = None + + @classmethod + def _build_schema_ip_community_id_list_read(cls, _schema): + if cls._schema_ip_community_id_list_read is not None: + _schema.ip_community_ids = cls._schema_ip_community_id_list_read.ip_community_ids + return + + cls._schema_ip_community_id_list_read = _schema_ip_community_id_list_read = AAZObjectType() + + ip_community_id_list_read = _schema_ip_community_id_list_read + ip_community_id_list_read.ip_community_ids = AAZListType( + serialized_name="ipCommunityIds", + ) + + ip_community_ids = _schema_ip_community_id_list_read.ip_community_ids + ip_community_ids.Element = AAZStrType() + + _schema.ip_community_ids = cls._schema_ip_community_id_list_read.ip_community_ids + + _schema_ip_extended_community_id_list_read = None + + @classmethod + def _build_schema_ip_extended_community_id_list_read(cls, _schema): + if cls._schema_ip_extended_community_id_list_read is not None: + _schema.ip_extended_community_ids = cls._schema_ip_extended_community_id_list_read.ip_extended_community_ids + return + + cls._schema_ip_extended_community_id_list_read = _schema_ip_extended_community_id_list_read = AAZObjectType() + + ip_extended_community_id_list_read = _schema_ip_extended_community_id_list_read + ip_extended_community_id_list_read.ip_extended_community_ids = AAZListType( + serialized_name="ipExtendedCommunityIds", + ) + + ip_extended_community_ids = _schema_ip_extended_community_id_list_read.ip_extended_community_ids + ip_extended_community_ids.Element = AAZStrType() + + _schema.ip_extended_community_ids = cls._schema_ip_extended_community_id_list_read.ip_extended_community_ids + __all__ = ["Create"] diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/routepolicy/_list.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/routepolicy/_list.py index 6c5d54f59ab..65b3ee8f0cc 100644 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/routepolicy/_list.py +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/routepolicy/_list.py @@ -225,61 +225,19 @@ def _build_schema_on_200(cls): ip_community_properties = cls._schema_on_200.value.Element.properties.statements.Element.action.ip_community_properties ip_community_properties.add = AAZObjectType() + _ListHelper._build_schema_ip_community_id_list_read(ip_community_properties.add) ip_community_properties.delete = AAZObjectType() + _ListHelper._build_schema_ip_community_id_list_read(ip_community_properties.delete) ip_community_properties.set = AAZObjectType() - - add = cls._schema_on_200.value.Element.properties.statements.Element.action.ip_community_properties.add - add.ip_community_ids = AAZListType( - serialized_name="ipCommunityIds", - ) - - ip_community_ids = cls._schema_on_200.value.Element.properties.statements.Element.action.ip_community_properties.add.ip_community_ids - ip_community_ids.Element = AAZStrType() - - delete = cls._schema_on_200.value.Element.properties.statements.Element.action.ip_community_properties.delete - delete.ip_community_ids = AAZListType( - serialized_name="ipCommunityIds", - ) - - ip_community_ids = cls._schema_on_200.value.Element.properties.statements.Element.action.ip_community_properties.delete.ip_community_ids - ip_community_ids.Element = AAZStrType() - - set = cls._schema_on_200.value.Element.properties.statements.Element.action.ip_community_properties.set - set.ip_community_ids = AAZListType( - serialized_name="ipCommunityIds", - ) - - ip_community_ids = cls._schema_on_200.value.Element.properties.statements.Element.action.ip_community_properties.set.ip_community_ids - ip_community_ids.Element = AAZStrType() + _ListHelper._build_schema_ip_community_id_list_read(ip_community_properties.set) ip_extended_community_properties = cls._schema_on_200.value.Element.properties.statements.Element.action.ip_extended_community_properties ip_extended_community_properties.add = AAZObjectType() + _ListHelper._build_schema_ip_extended_community_id_list_read(ip_extended_community_properties.add) ip_extended_community_properties.delete = AAZObjectType() + _ListHelper._build_schema_ip_extended_community_id_list_read(ip_extended_community_properties.delete) ip_extended_community_properties.set = AAZObjectType() - - add = cls._schema_on_200.value.Element.properties.statements.Element.action.ip_extended_community_properties.add - add.ip_extended_community_ids = AAZListType( - serialized_name="ipExtendedCommunityIds", - ) - - ip_extended_community_ids = cls._schema_on_200.value.Element.properties.statements.Element.action.ip_extended_community_properties.add.ip_extended_community_ids - ip_extended_community_ids.Element = AAZStrType() - - delete = cls._schema_on_200.value.Element.properties.statements.Element.action.ip_extended_community_properties.delete - delete.ip_extended_community_ids = AAZListType( - serialized_name="ipExtendedCommunityIds", - ) - - ip_extended_community_ids = cls._schema_on_200.value.Element.properties.statements.Element.action.ip_extended_community_properties.delete.ip_extended_community_ids - ip_extended_community_ids.Element = AAZStrType() - - set = cls._schema_on_200.value.Element.properties.statements.Element.action.ip_extended_community_properties.set - set.ip_extended_community_ids = AAZListType( - serialized_name="ipExtendedCommunityIds", - ) - - ip_extended_community_ids = cls._schema_on_200.value.Element.properties.statements.Element.action.ip_extended_community_properties.set.ip_extended_community_ids - ip_extended_community_ids.Element = AAZStrType() + _ListHelper._build_schema_ip_extended_community_id_list_read(ip_extended_community_properties.set) condition = cls._schema_on_200.value.Element.properties.statements.Element.condition condition.ip_community_ids = AAZListType( @@ -469,61 +427,19 @@ def _build_schema_on_200(cls): ip_community_properties = cls._schema_on_200.value.Element.properties.statements.Element.action.ip_community_properties ip_community_properties.add = AAZObjectType() + _ListHelper._build_schema_ip_community_id_list_read(ip_community_properties.add) ip_community_properties.delete = AAZObjectType() + _ListHelper._build_schema_ip_community_id_list_read(ip_community_properties.delete) ip_community_properties.set = AAZObjectType() - - add = cls._schema_on_200.value.Element.properties.statements.Element.action.ip_community_properties.add - add.ip_community_ids = AAZListType( - serialized_name="ipCommunityIds", - ) - - ip_community_ids = cls._schema_on_200.value.Element.properties.statements.Element.action.ip_community_properties.add.ip_community_ids - ip_community_ids.Element = AAZStrType() - - delete = cls._schema_on_200.value.Element.properties.statements.Element.action.ip_community_properties.delete - delete.ip_community_ids = AAZListType( - serialized_name="ipCommunityIds", - ) - - ip_community_ids = cls._schema_on_200.value.Element.properties.statements.Element.action.ip_community_properties.delete.ip_community_ids - ip_community_ids.Element = AAZStrType() - - set = cls._schema_on_200.value.Element.properties.statements.Element.action.ip_community_properties.set - set.ip_community_ids = AAZListType( - serialized_name="ipCommunityIds", - ) - - ip_community_ids = cls._schema_on_200.value.Element.properties.statements.Element.action.ip_community_properties.set.ip_community_ids - ip_community_ids.Element = AAZStrType() + _ListHelper._build_schema_ip_community_id_list_read(ip_community_properties.set) ip_extended_community_properties = cls._schema_on_200.value.Element.properties.statements.Element.action.ip_extended_community_properties ip_extended_community_properties.add = AAZObjectType() + _ListHelper._build_schema_ip_extended_community_id_list_read(ip_extended_community_properties.add) ip_extended_community_properties.delete = AAZObjectType() + _ListHelper._build_schema_ip_extended_community_id_list_read(ip_extended_community_properties.delete) ip_extended_community_properties.set = AAZObjectType() - - add = cls._schema_on_200.value.Element.properties.statements.Element.action.ip_extended_community_properties.add - add.ip_extended_community_ids = AAZListType( - serialized_name="ipExtendedCommunityIds", - ) - - ip_extended_community_ids = cls._schema_on_200.value.Element.properties.statements.Element.action.ip_extended_community_properties.add.ip_extended_community_ids - ip_extended_community_ids.Element = AAZStrType() - - delete = cls._schema_on_200.value.Element.properties.statements.Element.action.ip_extended_community_properties.delete - delete.ip_extended_community_ids = AAZListType( - serialized_name="ipExtendedCommunityIds", - ) - - ip_extended_community_ids = cls._schema_on_200.value.Element.properties.statements.Element.action.ip_extended_community_properties.delete.ip_extended_community_ids - ip_extended_community_ids.Element = AAZStrType() - - set = cls._schema_on_200.value.Element.properties.statements.Element.action.ip_extended_community_properties.set - set.ip_extended_community_ids = AAZListType( - serialized_name="ipExtendedCommunityIds", - ) - - ip_extended_community_ids = cls._schema_on_200.value.Element.properties.statements.Element.action.ip_extended_community_properties.set.ip_extended_community_ids - ip_extended_community_ids.Element = AAZStrType() + _ListHelper._build_schema_ip_extended_community_id_list_read(ip_extended_community_properties.set) condition = cls._schema_on_200.value.Element.properties.statements.Element.condition condition.ip_community_ids = AAZListType( @@ -571,5 +487,45 @@ def _build_schema_on_200(cls): class _ListHelper: """Helper class for List""" + _schema_ip_community_id_list_read = None + + @classmethod + def _build_schema_ip_community_id_list_read(cls, _schema): + if cls._schema_ip_community_id_list_read is not None: + _schema.ip_community_ids = cls._schema_ip_community_id_list_read.ip_community_ids + return + + cls._schema_ip_community_id_list_read = _schema_ip_community_id_list_read = AAZObjectType() + + ip_community_id_list_read = _schema_ip_community_id_list_read + ip_community_id_list_read.ip_community_ids = AAZListType( + serialized_name="ipCommunityIds", + ) + + ip_community_ids = _schema_ip_community_id_list_read.ip_community_ids + ip_community_ids.Element = AAZStrType() + + _schema.ip_community_ids = cls._schema_ip_community_id_list_read.ip_community_ids + + _schema_ip_extended_community_id_list_read = None + + @classmethod + def _build_schema_ip_extended_community_id_list_read(cls, _schema): + if cls._schema_ip_extended_community_id_list_read is not None: + _schema.ip_extended_community_ids = cls._schema_ip_extended_community_id_list_read.ip_extended_community_ids + return + + cls._schema_ip_extended_community_id_list_read = _schema_ip_extended_community_id_list_read = AAZObjectType() + + ip_extended_community_id_list_read = _schema_ip_extended_community_id_list_read + ip_extended_community_id_list_read.ip_extended_community_ids = AAZListType( + serialized_name="ipExtendedCommunityIds", + ) + + ip_extended_community_ids = _schema_ip_extended_community_id_list_read.ip_extended_community_ids + ip_extended_community_ids.Element = AAZStrType() + + _schema.ip_extended_community_ids = cls._schema_ip_extended_community_id_list_read.ip_extended_community_ids + __all__ = ["List"] diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/routepolicy/_show.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/routepolicy/_show.py index bfc393d4dc7..3ccd98f9cd7 100644 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/routepolicy/_show.py +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/routepolicy/_show.py @@ -218,61 +218,19 @@ def _build_schema_on_200(cls): ip_community_properties = cls._schema_on_200.properties.statements.Element.action.ip_community_properties ip_community_properties.add = AAZObjectType() + _ShowHelper._build_schema_ip_community_id_list_read(ip_community_properties.add) ip_community_properties.delete = AAZObjectType() + _ShowHelper._build_schema_ip_community_id_list_read(ip_community_properties.delete) ip_community_properties.set = AAZObjectType() - - add = cls._schema_on_200.properties.statements.Element.action.ip_community_properties.add - add.ip_community_ids = AAZListType( - serialized_name="ipCommunityIds", - ) - - ip_community_ids = cls._schema_on_200.properties.statements.Element.action.ip_community_properties.add.ip_community_ids - ip_community_ids.Element = AAZStrType() - - delete = cls._schema_on_200.properties.statements.Element.action.ip_community_properties.delete - delete.ip_community_ids = AAZListType( - serialized_name="ipCommunityIds", - ) - - ip_community_ids = cls._schema_on_200.properties.statements.Element.action.ip_community_properties.delete.ip_community_ids - ip_community_ids.Element = AAZStrType() - - set = cls._schema_on_200.properties.statements.Element.action.ip_community_properties.set - set.ip_community_ids = AAZListType( - serialized_name="ipCommunityIds", - ) - - ip_community_ids = cls._schema_on_200.properties.statements.Element.action.ip_community_properties.set.ip_community_ids - ip_community_ids.Element = AAZStrType() + _ShowHelper._build_schema_ip_community_id_list_read(ip_community_properties.set) ip_extended_community_properties = cls._schema_on_200.properties.statements.Element.action.ip_extended_community_properties ip_extended_community_properties.add = AAZObjectType() + _ShowHelper._build_schema_ip_extended_community_id_list_read(ip_extended_community_properties.add) ip_extended_community_properties.delete = AAZObjectType() + _ShowHelper._build_schema_ip_extended_community_id_list_read(ip_extended_community_properties.delete) ip_extended_community_properties.set = AAZObjectType() - - add = cls._schema_on_200.properties.statements.Element.action.ip_extended_community_properties.add - add.ip_extended_community_ids = AAZListType( - serialized_name="ipExtendedCommunityIds", - ) - - ip_extended_community_ids = cls._schema_on_200.properties.statements.Element.action.ip_extended_community_properties.add.ip_extended_community_ids - ip_extended_community_ids.Element = AAZStrType() - - delete = cls._schema_on_200.properties.statements.Element.action.ip_extended_community_properties.delete - delete.ip_extended_community_ids = AAZListType( - serialized_name="ipExtendedCommunityIds", - ) - - ip_extended_community_ids = cls._schema_on_200.properties.statements.Element.action.ip_extended_community_properties.delete.ip_extended_community_ids - ip_extended_community_ids.Element = AAZStrType() - - set = cls._schema_on_200.properties.statements.Element.action.ip_extended_community_properties.set - set.ip_extended_community_ids = AAZListType( - serialized_name="ipExtendedCommunityIds", - ) - - ip_extended_community_ids = cls._schema_on_200.properties.statements.Element.action.ip_extended_community_properties.set.ip_extended_community_ids - ip_extended_community_ids.Element = AAZStrType() + _ShowHelper._build_schema_ip_extended_community_id_list_read(ip_extended_community_properties.set) condition = cls._schema_on_200.properties.statements.Element.condition condition.ip_community_ids = AAZListType( @@ -320,5 +278,45 @@ def _build_schema_on_200(cls): class _ShowHelper: """Helper class for Show""" + _schema_ip_community_id_list_read = None + + @classmethod + def _build_schema_ip_community_id_list_read(cls, _schema): + if cls._schema_ip_community_id_list_read is not None: + _schema.ip_community_ids = cls._schema_ip_community_id_list_read.ip_community_ids + return + + cls._schema_ip_community_id_list_read = _schema_ip_community_id_list_read = AAZObjectType() + + ip_community_id_list_read = _schema_ip_community_id_list_read + ip_community_id_list_read.ip_community_ids = AAZListType( + serialized_name="ipCommunityIds", + ) + + ip_community_ids = _schema_ip_community_id_list_read.ip_community_ids + ip_community_ids.Element = AAZStrType() + + _schema.ip_community_ids = cls._schema_ip_community_id_list_read.ip_community_ids + + _schema_ip_extended_community_id_list_read = None + + @classmethod + def _build_schema_ip_extended_community_id_list_read(cls, _schema): + if cls._schema_ip_extended_community_id_list_read is not None: + _schema.ip_extended_community_ids = cls._schema_ip_extended_community_id_list_read.ip_extended_community_ids + return + + cls._schema_ip_extended_community_id_list_read = _schema_ip_extended_community_id_list_read = AAZObjectType() + + ip_extended_community_id_list_read = _schema_ip_extended_community_id_list_read + ip_extended_community_id_list_read.ip_extended_community_ids = AAZListType( + serialized_name="ipExtendedCommunityIds", + ) + + ip_extended_community_ids = _schema_ip_extended_community_id_list_read.ip_extended_community_ids + ip_extended_community_ids.Element = AAZStrType() + + _schema.ip_extended_community_ids = cls._schema_ip_extended_community_id_list_read.ip_extended_community_ids + __all__ = ["Show"] diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/routepolicy/_wait.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/routepolicy/_wait.py index 359f1f5e7a7..30bb260660d 100644 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/routepolicy/_wait.py +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/routepolicy/_wait.py @@ -214,61 +214,19 @@ def _build_schema_on_200(cls): ip_community_properties = cls._schema_on_200.properties.statements.Element.action.ip_community_properties ip_community_properties.add = AAZObjectType() + _WaitHelper._build_schema_ip_community_id_list_read(ip_community_properties.add) ip_community_properties.delete = AAZObjectType() + _WaitHelper._build_schema_ip_community_id_list_read(ip_community_properties.delete) ip_community_properties.set = AAZObjectType() - - add = cls._schema_on_200.properties.statements.Element.action.ip_community_properties.add - add.ip_community_ids = AAZListType( - serialized_name="ipCommunityIds", - ) - - ip_community_ids = cls._schema_on_200.properties.statements.Element.action.ip_community_properties.add.ip_community_ids - ip_community_ids.Element = AAZStrType() - - delete = cls._schema_on_200.properties.statements.Element.action.ip_community_properties.delete - delete.ip_community_ids = AAZListType( - serialized_name="ipCommunityIds", - ) - - ip_community_ids = cls._schema_on_200.properties.statements.Element.action.ip_community_properties.delete.ip_community_ids - ip_community_ids.Element = AAZStrType() - - set = cls._schema_on_200.properties.statements.Element.action.ip_community_properties.set - set.ip_community_ids = AAZListType( - serialized_name="ipCommunityIds", - ) - - ip_community_ids = cls._schema_on_200.properties.statements.Element.action.ip_community_properties.set.ip_community_ids - ip_community_ids.Element = AAZStrType() + _WaitHelper._build_schema_ip_community_id_list_read(ip_community_properties.set) ip_extended_community_properties = cls._schema_on_200.properties.statements.Element.action.ip_extended_community_properties ip_extended_community_properties.add = AAZObjectType() + _WaitHelper._build_schema_ip_extended_community_id_list_read(ip_extended_community_properties.add) ip_extended_community_properties.delete = AAZObjectType() + _WaitHelper._build_schema_ip_extended_community_id_list_read(ip_extended_community_properties.delete) ip_extended_community_properties.set = AAZObjectType() - - add = cls._schema_on_200.properties.statements.Element.action.ip_extended_community_properties.add - add.ip_extended_community_ids = AAZListType( - serialized_name="ipExtendedCommunityIds", - ) - - ip_extended_community_ids = cls._schema_on_200.properties.statements.Element.action.ip_extended_community_properties.add.ip_extended_community_ids - ip_extended_community_ids.Element = AAZStrType() - - delete = cls._schema_on_200.properties.statements.Element.action.ip_extended_community_properties.delete - delete.ip_extended_community_ids = AAZListType( - serialized_name="ipExtendedCommunityIds", - ) - - ip_extended_community_ids = cls._schema_on_200.properties.statements.Element.action.ip_extended_community_properties.delete.ip_extended_community_ids - ip_extended_community_ids.Element = AAZStrType() - - set = cls._schema_on_200.properties.statements.Element.action.ip_extended_community_properties.set - set.ip_extended_community_ids = AAZListType( - serialized_name="ipExtendedCommunityIds", - ) - - ip_extended_community_ids = cls._schema_on_200.properties.statements.Element.action.ip_extended_community_properties.set.ip_extended_community_ids - ip_extended_community_ids.Element = AAZStrType() + _WaitHelper._build_schema_ip_extended_community_id_list_read(ip_extended_community_properties.set) condition = cls._schema_on_200.properties.statements.Element.condition condition.ip_community_ids = AAZListType( @@ -316,5 +274,45 @@ def _build_schema_on_200(cls): class _WaitHelper: """Helper class for Wait""" + _schema_ip_community_id_list_read = None + + @classmethod + def _build_schema_ip_community_id_list_read(cls, _schema): + if cls._schema_ip_community_id_list_read is not None: + _schema.ip_community_ids = cls._schema_ip_community_id_list_read.ip_community_ids + return + + cls._schema_ip_community_id_list_read = _schema_ip_community_id_list_read = AAZObjectType() + + ip_community_id_list_read = _schema_ip_community_id_list_read + ip_community_id_list_read.ip_community_ids = AAZListType( + serialized_name="ipCommunityIds", + ) + + ip_community_ids = _schema_ip_community_id_list_read.ip_community_ids + ip_community_ids.Element = AAZStrType() + + _schema.ip_community_ids = cls._schema_ip_community_id_list_read.ip_community_ids + + _schema_ip_extended_community_id_list_read = None + + @classmethod + def _build_schema_ip_extended_community_id_list_read(cls, _schema): + if cls._schema_ip_extended_community_id_list_read is not None: + _schema.ip_extended_community_ids = cls._schema_ip_extended_community_id_list_read.ip_extended_community_ids + return + + cls._schema_ip_extended_community_id_list_read = _schema_ip_extended_community_id_list_read = AAZObjectType() + + ip_extended_community_id_list_read = _schema_ip_extended_community_id_list_read + ip_extended_community_id_list_read.ip_extended_community_ids = AAZListType( + serialized_name="ipExtendedCommunityIds", + ) + + ip_extended_community_ids = _schema_ip_extended_community_id_list_read.ip_extended_community_ids + ip_extended_community_ids.Element = AAZStrType() + + _schema.ip_extended_community_ids = cls._schema_ip_extended_community_id_list_read.ip_extended_community_ids + __all__ = ["Wait"] diff --git a/src/managednetworkfabric/setup.py b/src/managednetworkfabric/setup.py index 5491bfcaf8c..b1976abe5c9 100644 --- a/src/managednetworkfabric/setup.py +++ b/src/managednetworkfabric/setup.py @@ -10,7 +10,7 @@ # HISTORY.rst entry. -VERSION = '1.0.0b1' +VERSION = '1.0.0b2' # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers