diff --git a/src/managednetworkfabric/HISTORY.rst b/src/managednetworkfabric/HISTORY.rst index 25eb00c5591..6a130619836 100644 --- a/src/managednetworkfabric/HISTORY.rst +++ b/src/managednetworkfabric/HISTORY.rst @@ -3,6 +3,13 @@ Release History =============== +9.1.0 +++++++ +* Enables the following previously removed command/command groups: +* - `bootstrapdevice` and `bootstrapinterface` command groups that both support `list` and `show` operations. +* - `fabric` commands `resync-certificate` and `rotate-certificate` to support certificate resync and rotation operations on the fabric resource. +* - `device` command `resync-certificate` to support resync operations for certificates on the device resource. + 9.0.0 ++++++ * Updates this 2025-07-15 CLI to a stable version (9.0.0) from beta version (9.0.0b1). diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/acl/_create.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/acl/_create.py index a4b783679dd..5da6107f216 100644 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/acl/_create.py +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/acl/_create.py @@ -63,6 +63,26 @@ def _build_arguments_schema(cls, *args, **kwargs): required=True, ) + # define Arg Group "Body" + + _args_schema = cls._args_schema + _args_schema.location = AAZResourceLocationArg( + arg_group="Body", + help="The geo-location where the resource lives", + 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 @@ -628,26 +648,6 @@ def _build_arguments_schema(cls, *args, **kwargs): vlans = cls._args_schema.match_configurations.Element.match_conditions.Element.vlan_match_condition.vlans vlans.Element = AAZStrArg() - - # define Arg Group "Resource" - - _args_schema = cls._args_schema - _args_schema.location = AAZResourceLocationArg( - arg_group="Resource", - help="The geo-location where the resource lives", - required=True, - fmt=AAZResourceLocationArgFormat( - resource_group_arg="resource_group", - ), - ) - _args_schema.tags = AAZDictArg( - options=["--tags"], - arg_group="Resource", - help="Resource tags.", - ) - - tags = cls._args_schema.tags - tags.Element = AAZStrArg() return cls._args_schema _args_control_plane_acl_port_condition_create = None diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/acl/_update.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/acl/_update.py index c79372f1e3b..19fb4392f19 100644 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/acl/_update.py +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/acl/_update.py @@ -58,6 +58,18 @@ def _build_arguments_schema(cls, *args, **kwargs): required=True, ) + # define Arg Group "Body" + + _args_schema = cls._args_schema + _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 @@ -131,11 +143,6 @@ def _build_arguments_schema(cls, *args, **kwargs): min_length=1, ), ) - _args_schema.tags = AAZDictArg( - options=["--tags"], - arg_group="Properties", - help="Resource tags.", - ) control_plane_acl_configuration = cls._args_schema.control_plane_acl_configuration control_plane_acl_configuration.Element = AAZObjectArg() @@ -607,9 +614,6 @@ def _build_arguments_schema(cls, *args, **kwargs): vlans = cls._args_schema.match_configurations.Element.match_conditions.Element.vlan_match_condition.vlans vlans.Element = AAZStrArg() - - tags = cls._args_schema.tags - tags.Element = AAZStrArg() return cls._args_schema _args_control_plane_acl_port_condition_update = None diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/bootstrapdevice/__cmd_group.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/bootstrapdevice/__cmd_group.py new file mode 100644 index 00000000000..57c19e5b0ae --- /dev/null +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/bootstrapdevice/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# 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 bootstrapdevice", +) +class __CMDGroup(AAZCommandGroup): + """Manage Network Bootstrap Device Resource + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/bootstrapdevice/__init__.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/bootstrapdevice/__init__.py new file mode 100644 index 00000000000..c1a7c93ebe7 --- /dev/null +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/bootstrapdevice/__init__.py @@ -0,0 +1,14 @@ +# -------------------------------------------------------------------------------------------- +# 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 * +from ._wait import * diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/bootstrapdevice/_list.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/bootstrapdevice/_list.py new file mode 100644 index 00000000000..3bff58b5002 --- /dev/null +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/bootstrapdevice/_list.py @@ -0,0 +1,515 @@ +# -------------------------------------------------------------------------------------------- +# 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 bootstrapdevice list", +) +class List(AAZCommand): + """List all the Network Bootstrap Device resources in a given subscription. + + :example: List the Bootstrap Device for Subscription + az networkfabric bootstrapdevice list --subscription + + :example: List the Bootstrap Device for Resource Group + az networkfabric bootstrapdevice list --resource-group example-rg + """ + + _aaz_info = { + "version": "2025-07-15", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/microsoft.managednetworkfabric/networkbootstrapdevices", "2025-07-15"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkbootstrapdevices", "2025-07-15"], + ] + } + + AZ_SUPPORT_PAGINATION = True + + 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() + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + condition_0 = has_value(self.ctx.subscription_id) and has_value(self.ctx.args.resource_group) is not True + condition_1 = has_value(self.ctx.args.resource_group) and has_value(self.ctx.subscription_id) + if condition_0: + self.NetworkBootstrapDevicesListBySubscription(ctx=self.ctx)() + if condition_1: + self.NetworkBootstrapDevicesListByResourceGroup(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 NetworkBootstrapDevicesListBySubscription(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/networkBootstrapDevices", + **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", "2025-07-15", + 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( + flags={"required": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.identity = AAZIdentityObjectType() + _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}, + ) + + identity = cls._schema_on_200.value.Element.identity + identity.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity.type = AAZStrType( + flags={"required": True}, + ) + identity.user_assigned_identities = AAZDictType( + serialized_name="userAssignedIdentities", + ) + + user_assigned_identities = cls._schema_on_200.value.Element.identity.user_assigned_identities + user_assigned_identities.Element = AAZObjectType( + nullable=True, + ) + + _element = cls._schema_on_200.value.Element.identity.user_assigned_identities.Element + _element.client_id = AAZStrType( + serialized_name="clientId", + flags={"read_only": True}, + ) + _element.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.administrative_state = AAZStrType( + serialized_name="administrativeState", + flags={"read_only": True}, + ) + properties.annotation = AAZStrType() + properties.configuration_state = AAZStrType( + serialized_name="configurationState", + flags={"read_only": True}, + ) + properties.dhcp_v4_server_ip_address = AAZStrType( + serialized_name="dhcpV4ServerIpAddress", + flags={"read_only": True}, + ) + properties.host_name = AAZStrType( + serialized_name="hostName", + ) + properties.network_device_sku = AAZStrType( + serialized_name="networkDeviceSku", + ) + properties.network_fabric_id = AAZStrType( + serialized_name="networkFabricId", + nullable=True, + flags={"read_only": True}, + ) + properties.primary_management_ipv4_address = AAZStrType( + serialized_name="primaryManagementIpv4Address", + flags={"read_only": True}, + ) + properties.primary_management_ipv6_address = AAZStrType( + serialized_name="primaryManagementIpv6Address", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.secondary_management_ipv4_address = AAZStrType( + serialized_name="secondaryManagementIpv4Address", + flags={"read_only": True}, + ) + properties.secondary_management_ipv6_address = AAZStrType( + serialized_name="secondaryManagementIpv6Address", + flags={"read_only": True}, + ) + properties.serial_number = AAZStrType( + serialized_name="serialNumber", + ) + properties.version = 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", + ) + + tags = cls._schema_on_200.value.Element.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + class NetworkBootstrapDevicesListByResourceGroup(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/networkBootstrapDevices", + **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", "2025-07-15", + 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( + flags={"required": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.identity = AAZIdentityObjectType() + _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}, + ) + + identity = cls._schema_on_200.value.Element.identity + identity.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity.type = AAZStrType( + flags={"required": True}, + ) + identity.user_assigned_identities = AAZDictType( + serialized_name="userAssignedIdentities", + ) + + user_assigned_identities = cls._schema_on_200.value.Element.identity.user_assigned_identities + user_assigned_identities.Element = AAZObjectType( + nullable=True, + ) + + _element = cls._schema_on_200.value.Element.identity.user_assigned_identities.Element + _element.client_id = AAZStrType( + serialized_name="clientId", + flags={"read_only": True}, + ) + _element.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.administrative_state = AAZStrType( + serialized_name="administrativeState", + flags={"read_only": True}, + ) + properties.annotation = AAZStrType() + properties.configuration_state = AAZStrType( + serialized_name="configurationState", + flags={"read_only": True}, + ) + properties.dhcp_v4_server_ip_address = AAZStrType( + serialized_name="dhcpV4ServerIpAddress", + flags={"read_only": True}, + ) + properties.host_name = AAZStrType( + serialized_name="hostName", + ) + properties.network_device_sku = AAZStrType( + serialized_name="networkDeviceSku", + ) + properties.network_fabric_id = AAZStrType( + serialized_name="networkFabricId", + nullable=True, + flags={"read_only": True}, + ) + properties.primary_management_ipv4_address = AAZStrType( + serialized_name="primaryManagementIpv4Address", + flags={"read_only": True}, + ) + properties.primary_management_ipv6_address = AAZStrType( + serialized_name="primaryManagementIpv6Address", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.secondary_management_ipv4_address = AAZStrType( + serialized_name="secondaryManagementIpv4Address", + flags={"read_only": True}, + ) + properties.secondary_management_ipv6_address = AAZStrType( + serialized_name="secondaryManagementIpv6Address", + flags={"read_only": True}, + ) + properties.serial_number = AAZStrType( + serialized_name="serialNumber", + ) + properties.version = 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", + ) + + 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/bootstrapdevice/_show.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/bootstrapdevice/_show.py new file mode 100644 index 00000000000..728d33a9e6c --- /dev/null +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/bootstrapdevice/_show.py @@ -0,0 +1,294 @@ +# -------------------------------------------------------------------------------------------- +# 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 bootstrapdevice show", +) +class Show(AAZCommand): + """Get a Network Bootstrap Device resource details. + + :example: Show the Bootstrap Device resource + az networkfabric bootstrapdevice show --resource-group example-rg --resource-name example-device + """ + + _aaz_info = { + "version": "2025-07-15", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkbootstrapdevices/{}", "2025-07-15"], + ] + } + + 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 Bootstrap Device.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z]{1}[a-zA-Z0-9-_]{2,127}$", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.NetworkBootstrapDevicesGet(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 NetworkBootstrapDevicesGet(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/networkBootstrapDevices/{networkBootstrapDeviceName}", + **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( + "networkBootstrapDeviceName", 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", "2025-07-15", + 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.identity = AAZIdentityObjectType() + _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}, + ) + + identity = cls._schema_on_200.identity + identity.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity.type = AAZStrType( + flags={"required": True}, + ) + identity.user_assigned_identities = AAZDictType( + serialized_name="userAssignedIdentities", + ) + + user_assigned_identities = cls._schema_on_200.identity.user_assigned_identities + user_assigned_identities.Element = AAZObjectType( + nullable=True, + ) + + _element = cls._schema_on_200.identity.user_assigned_identities.Element + _element.client_id = AAZStrType( + serialized_name="clientId", + flags={"read_only": True}, + ) + _element.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.administrative_state = AAZStrType( + serialized_name="administrativeState", + flags={"read_only": True}, + ) + properties.annotation = AAZStrType() + properties.configuration_state = AAZStrType( + serialized_name="configurationState", + flags={"read_only": True}, + ) + properties.dhcp_v4_server_ip_address = AAZStrType( + serialized_name="dhcpV4ServerIpAddress", + flags={"read_only": True}, + ) + properties.host_name = AAZStrType( + serialized_name="hostName", + ) + properties.network_device_sku = AAZStrType( + serialized_name="networkDeviceSku", + ) + properties.network_fabric_id = AAZStrType( + serialized_name="networkFabricId", + nullable=True, + flags={"read_only": True}, + ) + properties.primary_management_ipv4_address = AAZStrType( + serialized_name="primaryManagementIpv4Address", + flags={"read_only": True}, + ) + properties.primary_management_ipv6_address = AAZStrType( + serialized_name="primaryManagementIpv6Address", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.secondary_management_ipv4_address = AAZStrType( + serialized_name="secondaryManagementIpv4Address", + flags={"read_only": True}, + ) + properties.secondary_management_ipv6_address = AAZStrType( + serialized_name="secondaryManagementIpv6Address", + flags={"read_only": True}, + ) + properties.serial_number = AAZStrType( + serialized_name="serialNumber", + ) + properties.version = 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", + ) + + 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/bootstrapdevice/_wait.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/bootstrapdevice/_wait.py new file mode 100644 index 00000000000..d52f316339b --- /dev/null +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/bootstrapdevice/_wait.py @@ -0,0 +1,290 @@ +# -------------------------------------------------------------------------------------------- +# 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 bootstrapdevice 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/networkbootstrapdevices/{}", "2025-07-15"], + ] + } + + 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 Bootstrap Device.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z]{1}[a-zA-Z0-9-_]{2,127}$", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.NetworkBootstrapDevicesGet(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 NetworkBootstrapDevicesGet(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/networkBootstrapDevices/{networkBootstrapDeviceName}", + **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( + "networkBootstrapDeviceName", 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", "2025-07-15", + 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.identity = AAZIdentityObjectType() + _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}, + ) + + identity = cls._schema_on_200.identity + identity.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity.type = AAZStrType( + flags={"required": True}, + ) + identity.user_assigned_identities = AAZDictType( + serialized_name="userAssignedIdentities", + ) + + user_assigned_identities = cls._schema_on_200.identity.user_assigned_identities + user_assigned_identities.Element = AAZObjectType( + nullable=True, + ) + + _element = cls._schema_on_200.identity.user_assigned_identities.Element + _element.client_id = AAZStrType( + serialized_name="clientId", + flags={"read_only": True}, + ) + _element.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.administrative_state = AAZStrType( + serialized_name="administrativeState", + flags={"read_only": True}, + ) + properties.annotation = AAZStrType() + properties.configuration_state = AAZStrType( + serialized_name="configurationState", + flags={"read_only": True}, + ) + properties.dhcp_v4_server_ip_address = AAZStrType( + serialized_name="dhcpV4ServerIpAddress", + flags={"read_only": True}, + ) + properties.host_name = AAZStrType( + serialized_name="hostName", + ) + properties.network_device_sku = AAZStrType( + serialized_name="networkDeviceSku", + ) + properties.network_fabric_id = AAZStrType( + serialized_name="networkFabricId", + nullable=True, + flags={"read_only": True}, + ) + properties.primary_management_ipv4_address = AAZStrType( + serialized_name="primaryManagementIpv4Address", + flags={"read_only": True}, + ) + properties.primary_management_ipv6_address = AAZStrType( + serialized_name="primaryManagementIpv6Address", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.secondary_management_ipv4_address = AAZStrType( + serialized_name="secondaryManagementIpv4Address", + flags={"read_only": True}, + ) + properties.secondary_management_ipv6_address = AAZStrType( + serialized_name="secondaryManagementIpv6Address", + flags={"read_only": True}, + ) + properties.serial_number = AAZStrType( + serialized_name="serialNumber", + ) + properties.version = 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", + ) + + 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/bootstrapinterface/__cmd_group.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/bootstrapinterface/__cmd_group.py new file mode 100644 index 00000000000..fe309dcd910 --- /dev/null +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/bootstrapinterface/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# 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 bootstrapinterface", +) +class __CMDGroup(AAZCommandGroup): + """Manage Network Bootstrap Interface + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/bootstrapinterface/__init__.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/bootstrapinterface/__init__.py new file mode 100644 index 00000000000..c1a7c93ebe7 --- /dev/null +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/bootstrapinterface/__init__.py @@ -0,0 +1,14 @@ +# -------------------------------------------------------------------------------------------- +# 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 * +from ._wait import * diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/bootstrapinterface/_list.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/bootstrapinterface/_list.py new file mode 100644 index 00000000000..818ab7ba8d5 --- /dev/null +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/bootstrapinterface/_list.py @@ -0,0 +1,259 @@ +# -------------------------------------------------------------------------------------------- +# 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 bootstrapinterface list", +) +class List(AAZCommand): + """List all the Network Bootstrap Interface resources in a given resource group. + + :example: List the Bootstrap Interfaces in a Resource Group for a specific Subscription + az networkfabric bootstrapinterface list --subscription --resource-group example-rg --bootstrap-device example-device + """ + + _aaz_info = { + "version": "2025-07-15", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkbootstrapdevices/{}/networkbootstrapinterfaces", "2025-07-15"], + ] + } + + AZ_SUPPORT_PAGINATION = True + + 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.network_bootstrap_device_name = AAZStrArg( + options=["--bootstrap-device", "--network-bootstrap-device-name"], + help="Name of the Network Bootstrap Device.", + required=True, + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z]{1}[a-zA-Z0-9-_]{2,127}$", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.NetworkBootstrapInterfacesListByNetworkBootstrapDevice(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 NetworkBootstrapInterfacesListByNetworkBootstrapDevice(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/networkBootstrapDevices/{networkBootstrapDeviceName}/networkBootstrapInterfaces", + **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( + "networkBootstrapDeviceName", self.ctx.args.network_bootstrap_device_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", "2025-07-15", + 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( + flags={"required": True}, + ) + + 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.additional_description = AAZStrType( + serialized_name="additionalDescription", + ) + properties.administrative_state = AAZStrType( + serialized_name="administrativeState", + flags={"read_only": True}, + ) + properties.annotation = AAZStrType() + properties.configuration_state = AAZStrType( + serialized_name="configurationState", + flags={"read_only": True}, + ) + properties.connected_to = AAZStrType( + serialized_name="connectedTo", + flags={"read_only": True}, + ) + properties.description = AAZStrType( + flags={"read_only": True}, + ) + properties.interface_type = AAZStrType( + serialized_name="interfaceType", + flags={"read_only": True}, + ) + properties.ipv4_address = AAZStrType( + serialized_name="ipv4Address", + flags={"read_only": True}, + ) + properties.ipv6_address = AAZStrType( + serialized_name="ipv6Address", + flags={"read_only": True}, + ) + properties.physical_identifier = AAZStrType( + serialized_name="physicalIdentifier", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.serial_number = AAZStrType( + serialized_name="serialNumber", + ) + + 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/bootstrapinterface/_show.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/bootstrapinterface/_show.py new file mode 100644 index 00000000000..bc59714b459 --- /dev/null +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/bootstrapinterface/_show.py @@ -0,0 +1,260 @@ +# -------------------------------------------------------------------------------------------- +# 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 bootstrapinterface show", +) +class Show(AAZCommand): + """Get the Network Bootstrap Interface resource details. + + :example: Show the Bootstrap Interface resource + az networkfabric bootstrapinterface show --resource-group example-rg --network-bootstrap-device-name example-device --resource-name example-interface + """ + + _aaz_info = { + "version": "2025-07-15", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkbootstrapdevices/{}/networkbootstrapinterfaces/{}", "2025-07-15"], + ] + } + + 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.network_bootstrap_device_name = AAZStrArg( + options=["--bootstrap-device", "--network-bootstrap-device-name"], + help="Name of the Network Bootstrap Device.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z]{1}[a-zA-Z0-9-_]{2,127}$", + ), + ) + _args_schema.resource_name = AAZStrArg( + options=["--resource-name"], + help="Name of the Network Bootstrap Interface.", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z]{1}[a-zA-Z0-9-_]{2,127}$", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.NetworkBootstrapInterfacesGet(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 NetworkBootstrapInterfacesGet(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/networkBootstrapDevices/{networkBootstrapDeviceName}/networkBootstrapInterfaces/{networkBootstrapInterfaceName}", + **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( + "networkBootstrapDeviceName", self.ctx.args.network_bootstrap_device_name, + required=True, + ), + **self.serialize_url_param( + "networkBootstrapInterfaceName", 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", "2025-07-15", + 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.additional_description = AAZStrType( + serialized_name="additionalDescription", + ) + properties.administrative_state = AAZStrType( + serialized_name="administrativeState", + flags={"read_only": True}, + ) + properties.annotation = AAZStrType() + properties.configuration_state = AAZStrType( + serialized_name="configurationState", + flags={"read_only": True}, + ) + properties.connected_to = AAZStrType( + serialized_name="connectedTo", + flags={"read_only": True}, + ) + properties.description = AAZStrType( + flags={"read_only": True}, + ) + properties.interface_type = AAZStrType( + serialized_name="interfaceType", + flags={"read_only": True}, + ) + properties.ipv4_address = AAZStrType( + serialized_name="ipv4Address", + flags={"read_only": True}, + ) + properties.ipv6_address = AAZStrType( + serialized_name="ipv6Address", + flags={"read_only": True}, + ) + properties.physical_identifier = AAZStrType( + serialized_name="physicalIdentifier", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.serial_number = AAZStrType( + serialized_name="serialNumber", + ) + + 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/bootstrapinterface/_wait.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/bootstrapinterface/_wait.py new file mode 100644 index 00000000000..cdcbf3fc4f6 --- /dev/null +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/bootstrapinterface/_wait.py @@ -0,0 +1,256 @@ +# -------------------------------------------------------------------------------------------- +# 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 bootstrapinterface 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/networkbootstrapdevices/{}/networkbootstrapinterfaces/{}", "2025-07-15"], + ] + } + + 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.network_bootstrap_device_name = AAZStrArg( + options=["--bootstrap-device", "--network-bootstrap-device-name"], + help="Name of the Network Bootstrap Device.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z]{1}[a-zA-Z0-9-_]{2,127}$", + ), + ) + _args_schema.resource_name = AAZStrArg( + options=["--resource-name"], + help="Name of the Network Bootstrap Interface.", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z]{1}[a-zA-Z0-9-_]{2,127}$", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.NetworkBootstrapInterfacesGet(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 NetworkBootstrapInterfacesGet(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/networkBootstrapDevices/{networkBootstrapDeviceName}/networkBootstrapInterfaces/{networkBootstrapInterfaceName}", + **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( + "networkBootstrapDeviceName", self.ctx.args.network_bootstrap_device_name, + required=True, + ), + **self.serialize_url_param( + "networkBootstrapInterfaceName", 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", "2025-07-15", + 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.additional_description = AAZStrType( + serialized_name="additionalDescription", + ) + properties.administrative_state = AAZStrType( + serialized_name="administrativeState", + flags={"read_only": True}, + ) + properties.annotation = AAZStrType() + properties.configuration_state = AAZStrType( + serialized_name="configurationState", + flags={"read_only": True}, + ) + properties.connected_to = AAZStrType( + serialized_name="connectedTo", + flags={"read_only": True}, + ) + properties.description = AAZStrType( + flags={"read_only": True}, + ) + properties.interface_type = AAZStrType( + serialized_name="interfaceType", + flags={"read_only": True}, + ) + properties.ipv4_address = AAZStrType( + serialized_name="ipv4Address", + flags={"read_only": True}, + ) + properties.ipv6_address = AAZStrType( + serialized_name="ipv6Address", + flags={"read_only": True}, + ) + properties.physical_identifier = AAZStrType( + serialized_name="physicalIdentifier", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.serial_number = AAZStrType( + serialized_name="serialNumber", + ) + + 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 _WaitHelper: + """Helper class for Wait""" + + +__all__ = ["Wait"] diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/controller/_create.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/controller/_create.py index 5d9b12a2897..ca8bc8349f2 100644 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/controller/_create.py +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/controller/_create.py @@ -60,6 +60,26 @@ def _build_arguments_schema(cls, *args, **kwargs): required=True, ) + # define Arg Group "Body" + + _args_schema = cls._args_schema + _args_schema.location = AAZResourceLocationArg( + arg_group="Body", + help="The geo-location where the resource lives", + 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 "Identity" _args_schema = cls._args_schema @@ -152,26 +172,6 @@ def _build_arguments_schema(cls, *args, **kwargs): workload_express_route_connections = cls._args_schema.workload_express_route_connections workload_express_route_connections.Element = AAZObjectArg() cls._build_args_express_route_connection_information_create(workload_express_route_connections.Element) - - # define Arg Group "Resource" - - _args_schema = cls._args_schema - _args_schema.location = AAZResourceLocationArg( - arg_group="Resource", - help="The geo-location where the resource lives", - required=True, - fmt=AAZResourceLocationArgFormat( - resource_group_arg="resource_group", - ), - ) - _args_schema.tags = AAZDictArg( - options=["--tags"], - arg_group="Resource", - help="Resource tags.", - ) - - tags = cls._args_schema.tags - tags.Element = AAZStrArg() return cls._args_schema _args_express_route_connection_information_create = None diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/controller/_update.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/controller/_update.py index 0d354d0169a..3049bf5d9dd 100644 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/controller/_update.py +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/controller/_update.py @@ -61,6 +61,18 @@ def _build_arguments_schema(cls, *args, **kwargs): required=True, ) + # define Arg Group "Body" + + _args_schema = cls._args_schema + _args_schema.tags = AAZDictArg( + options=["--tags"], + arg_group="Body", + help="Resource tags.", + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg() + # define Arg Group "Identity" _args_schema = cls._args_schema @@ -95,11 +107,6 @@ def _build_arguments_schema(cls, *args, **kwargs): help="As part of an update, the workload ExpressRoute CircuitID should be provided to create and Provision a NFC. This Express route is dedicated for Workload services. (This is a Mandatory attribute).", nullable=True, ) - _args_schema.tags = AAZDictArg( - options=["--tags"], - arg_group="Properties", - help="Resource tags.", - ) infrastructure_express_route_connections = cls._args_schema.infrastructure_express_route_connections infrastructure_express_route_connections.Element = AAZObjectArg() @@ -108,9 +115,6 @@ def _build_arguments_schema(cls, *args, **kwargs): workload_express_route_connections = cls._args_schema.workload_express_route_connections workload_express_route_connections.Element = AAZObjectArg() cls._build_args_express_route_connection_information_update(workload_express_route_connections.Element) - - tags = cls._args_schema.tags - tags.Element = AAZStrArg() return cls._args_schema _args_express_route_connection_information_update = None 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 269f305052d..395904c045c 100644 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/device/__init__.py +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/device/__init__.py @@ -12,6 +12,7 @@ from ._list import * from ._reboot import * from ._refresh_configuration import * +from ._resync_certificate import * from ._resync_password import * from ._run_ro import * from ._run_rw import * diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/device/_resync_certificate.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/device/_resync_certificate.py new file mode 100644 index 00000000000..79c3bbeca31 --- /dev/null +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/device/_resync_certificate.py @@ -0,0 +1,323 @@ +# -------------------------------------------------------------------------------------------- +# 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 resync-certificate", +) +class ResyncCertificate(AAZCommand): + """Updates the Network Device to use the latest certificates. Does not generate new certificates. Allows network devices missed during a previous certificate rotation to be brought back into sync. + + :example: Updates the Network Device to use the latest certificates + az networkfabric device resync-certificate --resource-group example-rg --resource-name example-device + """ + + _aaz_info = { + "version": "2025-07-15", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkdevices/{}/resynccertificates", "2025-07-15"], + ] + } + + 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 Device.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z]{1}[a-zA-Z0-9-_]{2,127}$", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.NetworkDevicesResyncCertificates(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 NetworkDevicesResyncCertificates(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/networkDevices/{networkDeviceName}/resyncCertificates", + **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( + "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", "2025-07-15", + 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.end_time = AAZStrType( + serialized_name="endTime", + ) + _schema_on_200.error = AAZObjectType() + _ResyncCertificateHelper._build_schema_error_detail_read(_schema_on_200.error) + _schema_on_200.id = AAZStrType( + nullable=True, + ) + _schema_on_200.name = AAZStrType() + _schema_on_200.operations = AAZListType() + _schema_on_200.percent_complete = AAZFloatType( + serialized_name="percentComplete", + ) + _schema_on_200.resource_id = AAZStrType( + serialized_name="resourceId", + nullable=True, + flags={"read_only": True}, + ) + _schema_on_200.start_time = AAZStrType( + serialized_name="startTime", + ) + _schema_on_200.status = AAZStrType( + flags={"required": True}, + ) + + operations = cls._schema_on_200.operations + operations.Element = AAZObjectType() + _ResyncCertificateHelper._build_schema_operation_status_result_read(operations.Element) + + return cls._schema_on_200 + + +class _ResyncCertificateHelper: + """Helper class for ResyncCertificate""" + + _schema_error_detail_read = None + + @classmethod + def _build_schema_error_detail_read(cls, _schema): + if cls._schema_error_detail_read is not None: + _schema.additional_info = cls._schema_error_detail_read.additional_info + _schema.code = cls._schema_error_detail_read.code + _schema.details = cls._schema_error_detail_read.details + _schema.message = cls._schema_error_detail_read.message + _schema.target = cls._schema_error_detail_read.target + return + + cls._schema_error_detail_read = _schema_error_detail_read = AAZObjectType() + + error_detail_read = _schema_error_detail_read + error_detail_read.additional_info = AAZListType( + serialized_name="additionalInfo", + flags={"read_only": True}, + ) + error_detail_read.code = AAZStrType( + flags={"read_only": True}, + ) + error_detail_read.details = AAZListType( + flags={"read_only": True}, + ) + error_detail_read.message = AAZStrType( + flags={"read_only": True}, + ) + error_detail_read.target = AAZStrType( + flags={"read_only": True}, + ) + + additional_info = _schema_error_detail_read.additional_info + additional_info.Element = AAZObjectType() + + _element = _schema_error_detail_read.additional_info.Element + _element.info = AAZDictType( + flags={"read_only": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + info = _schema_error_detail_read.additional_info.Element.info + info.Element = AAZAnyType() + + details = _schema_error_detail_read.details + details.Element = AAZObjectType() + cls._build_schema_error_detail_read(details.Element) + + _schema.additional_info = cls._schema_error_detail_read.additional_info + _schema.code = cls._schema_error_detail_read.code + _schema.details = cls._schema_error_detail_read.details + _schema.message = cls._schema_error_detail_read.message + _schema.target = cls._schema_error_detail_read.target + + _schema_operation_status_result_read = None + + @classmethod + def _build_schema_operation_status_result_read(cls, _schema): + if cls._schema_operation_status_result_read is not None: + _schema.end_time = cls._schema_operation_status_result_read.end_time + _schema.error = cls._schema_operation_status_result_read.error + _schema.id = cls._schema_operation_status_result_read.id + _schema.name = cls._schema_operation_status_result_read.name + _schema.operations = cls._schema_operation_status_result_read.operations + _schema.percent_complete = cls._schema_operation_status_result_read.percent_complete + _schema.resource_id = cls._schema_operation_status_result_read.resource_id + _schema.start_time = cls._schema_operation_status_result_read.start_time + _schema.status = cls._schema_operation_status_result_read.status + return + + cls._schema_operation_status_result_read = _schema_operation_status_result_read = AAZObjectType() + + operation_status_result_read = _schema_operation_status_result_read + operation_status_result_read.end_time = AAZStrType( + serialized_name="endTime", + ) + operation_status_result_read.error = AAZObjectType() + cls._build_schema_error_detail_read(operation_status_result_read.error) + operation_status_result_read.id = AAZStrType() + operation_status_result_read.name = AAZStrType() + operation_status_result_read.operations = AAZListType() + operation_status_result_read.percent_complete = AAZFloatType( + serialized_name="percentComplete", + ) + operation_status_result_read.resource_id = AAZStrType( + serialized_name="resourceId", + flags={"read_only": True}, + ) + operation_status_result_read.start_time = AAZStrType( + serialized_name="startTime", + ) + operation_status_result_read.status = AAZStrType( + flags={"required": True}, + ) + + operations = _schema_operation_status_result_read.operations + operations.Element = AAZObjectType() + cls._build_schema_operation_status_result_read(operations.Element) + + _schema.end_time = cls._schema_operation_status_result_read.end_time + _schema.error = cls._schema_operation_status_result_read.error + _schema.id = cls._schema_operation_status_result_read.id + _schema.name = cls._schema_operation_status_result_read.name + _schema.operations = cls._schema_operation_status_result_read.operations + _schema.percent_complete = cls._schema_operation_status_result_read.percent_complete + _schema.resource_id = cls._schema_operation_status_result_read.resource_id + _schema.start_time = cls._schema_operation_status_result_read.start_time + _schema.status = cls._schema_operation_status_result_read.status + + +__all__ = ["ResyncCertificate"] diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/device/_update.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/device/_update.py index 994b3256a99..3e635f45750 100644 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/device/_update.py +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/device/_update.py @@ -58,6 +58,18 @@ def _build_arguments_schema(cls, *args, **kwargs): required=True, ) + # define Arg Group "Body" + + _args_schema = cls._args_schema + _args_schema.tags = AAZDictArg( + options=["--tags"], + arg_group="Body", + help="Resource tags.", + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg() + # define Arg Group "Identity" _args_schema = cls._args_schema @@ -110,11 +122,6 @@ def _build_arguments_schema(cls, *args, **kwargs): min_length=1, ), ) - _args_schema.tags = AAZDictArg( - options=["--tags"], - arg_group="Properties", - help="Resource tags.", - ) identity_selector = cls._args_schema.identity_selector identity_selector.identity_type = AAZStrArg( @@ -127,9 +134,6 @@ def _build_arguments_schema(cls, *args, **kwargs): help="The user assigned managed identity resource ID to use. Mutually exclusive with a system assigned identity type.", nullable=True, ) - - tags = cls._args_schema.tags - tags.Element = AAZStrArg() return cls._args_schema def _execute_operations(self): diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/fabric/__init__.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/fabric/__init__.py index 30425174a4e..3519c0f5983 100644 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/fabric/__init__.py +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/fabric/__init__.py @@ -18,7 +18,9 @@ from ._list import * from ._lock_fabric import * from ._provision import * +from ._resync_certificate import * from ._resync_password import * +from ._rotate_certificate import * from ._rotate_password import * from ._show import * from ._update import * 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 83012dba438..11b05173c08 100644 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/fabric/_create.py +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/fabric/_create.py @@ -65,6 +65,26 @@ def _build_arguments_schema(cls, *args, **kwargs): required=True, ) + # define Arg Group "Body" + + _args_schema = cls._args_schema + _args_schema.location = AAZResourceLocationArg( + arg_group="Body", + help="The geo-location where the resource lives", + 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 "Identity" _args_schema = cls._args_schema @@ -366,26 +386,6 @@ def _build_arguments_schema(cls, *args, **kwargs): default="Enabled", enum={"Disabled": "Disabled", "Enabled": "Enabled"}, ) - - # define Arg Group "Resource" - - _args_schema = cls._args_schema - _args_schema.location = AAZResourceLocationArg( - arg_group="Resource", - help="The geo-location where the resource lives", - required=True, - fmt=AAZResourceLocationArgFormat( - resource_group_arg="resource_group", - ), - ) - _args_schema.tags = AAZDictArg( - options=["--tags"], - arg_group="Resource", - help="Resource tags.", - ) - - tags = cls._args_schema.tags - tags.Element = AAZStrArg() return cls._args_schema _args_vpn_configuration_properties_create = None diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/fabric/_resync_certificate.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/fabric/_resync_certificate.py new file mode 100644 index 00000000000..c07d5aaf0eb --- /dev/null +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/fabric/_resync_certificate.py @@ -0,0 +1,323 @@ +# -------------------------------------------------------------------------------------------- +# 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 fabric resync-certificate", +) +class ResyncCertificate(AAZCommand): + """Updates all Network Devices to use the latest certificates. Does not generate new certificates. Allows network devices missed during a previous certificate rotation to be brought back into sync. + + :example: Updates all Network Devices to use the latest certificates + az networkfabric fabric resync-certificate --resource-group example-rg --resource-name example-fabric + """ + + _aaz_info = { + "version": "2025-07-15", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkfabrics/{}/resynccertificates", "2025-07-15"], + ] + } + + 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.network_fabric_name = AAZStrArg( + options=["--resource-name", "--network-fabric-name"], + help="Name of the Network Fabric.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z]{1}[a-zA-Z0-9-_]{2,127}$", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.NetworkFabricsResyncCertificates(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 NetworkFabricsResyncCertificates(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/networkFabrics/{networkFabricName}/resyncCertificates", + **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( + "networkFabricName", self.ctx.args.network_fabric_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", "2025-07-15", + 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.end_time = AAZStrType( + serialized_name="endTime", + ) + _schema_on_200.error = AAZObjectType() + _ResyncCertificateHelper._build_schema_error_detail_read(_schema_on_200.error) + _schema_on_200.id = AAZStrType( + nullable=True, + ) + _schema_on_200.name = AAZStrType() + _schema_on_200.operations = AAZListType() + _schema_on_200.percent_complete = AAZFloatType( + serialized_name="percentComplete", + ) + _schema_on_200.resource_id = AAZStrType( + serialized_name="resourceId", + nullable=True, + flags={"read_only": True}, + ) + _schema_on_200.start_time = AAZStrType( + serialized_name="startTime", + ) + _schema_on_200.status = AAZStrType( + flags={"required": True}, + ) + + operations = cls._schema_on_200.operations + operations.Element = AAZObjectType() + _ResyncCertificateHelper._build_schema_operation_status_result_read(operations.Element) + + return cls._schema_on_200 + + +class _ResyncCertificateHelper: + """Helper class for ResyncCertificate""" + + _schema_error_detail_read = None + + @classmethod + def _build_schema_error_detail_read(cls, _schema): + if cls._schema_error_detail_read is not None: + _schema.additional_info = cls._schema_error_detail_read.additional_info + _schema.code = cls._schema_error_detail_read.code + _schema.details = cls._schema_error_detail_read.details + _schema.message = cls._schema_error_detail_read.message + _schema.target = cls._schema_error_detail_read.target + return + + cls._schema_error_detail_read = _schema_error_detail_read = AAZObjectType() + + error_detail_read = _schema_error_detail_read + error_detail_read.additional_info = AAZListType( + serialized_name="additionalInfo", + flags={"read_only": True}, + ) + error_detail_read.code = AAZStrType( + flags={"read_only": True}, + ) + error_detail_read.details = AAZListType( + flags={"read_only": True}, + ) + error_detail_read.message = AAZStrType( + flags={"read_only": True}, + ) + error_detail_read.target = AAZStrType( + flags={"read_only": True}, + ) + + additional_info = _schema_error_detail_read.additional_info + additional_info.Element = AAZObjectType() + + _element = _schema_error_detail_read.additional_info.Element + _element.info = AAZDictType( + flags={"read_only": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + info = _schema_error_detail_read.additional_info.Element.info + info.Element = AAZAnyType() + + details = _schema_error_detail_read.details + details.Element = AAZObjectType() + cls._build_schema_error_detail_read(details.Element) + + _schema.additional_info = cls._schema_error_detail_read.additional_info + _schema.code = cls._schema_error_detail_read.code + _schema.details = cls._schema_error_detail_read.details + _schema.message = cls._schema_error_detail_read.message + _schema.target = cls._schema_error_detail_read.target + + _schema_operation_status_result_read = None + + @classmethod + def _build_schema_operation_status_result_read(cls, _schema): + if cls._schema_operation_status_result_read is not None: + _schema.end_time = cls._schema_operation_status_result_read.end_time + _schema.error = cls._schema_operation_status_result_read.error + _schema.id = cls._schema_operation_status_result_read.id + _schema.name = cls._schema_operation_status_result_read.name + _schema.operations = cls._schema_operation_status_result_read.operations + _schema.percent_complete = cls._schema_operation_status_result_read.percent_complete + _schema.resource_id = cls._schema_operation_status_result_read.resource_id + _schema.start_time = cls._schema_operation_status_result_read.start_time + _schema.status = cls._schema_operation_status_result_read.status + return + + cls._schema_operation_status_result_read = _schema_operation_status_result_read = AAZObjectType() + + operation_status_result_read = _schema_operation_status_result_read + operation_status_result_read.end_time = AAZStrType( + serialized_name="endTime", + ) + operation_status_result_read.error = AAZObjectType() + cls._build_schema_error_detail_read(operation_status_result_read.error) + operation_status_result_read.id = AAZStrType() + operation_status_result_read.name = AAZStrType() + operation_status_result_read.operations = AAZListType() + operation_status_result_read.percent_complete = AAZFloatType( + serialized_name="percentComplete", + ) + operation_status_result_read.resource_id = AAZStrType( + serialized_name="resourceId", + flags={"read_only": True}, + ) + operation_status_result_read.start_time = AAZStrType( + serialized_name="startTime", + ) + operation_status_result_read.status = AAZStrType( + flags={"required": True}, + ) + + operations = _schema_operation_status_result_read.operations + operations.Element = AAZObjectType() + cls._build_schema_operation_status_result_read(operations.Element) + + _schema.end_time = cls._schema_operation_status_result_read.end_time + _schema.error = cls._schema_operation_status_result_read.error + _schema.id = cls._schema_operation_status_result_read.id + _schema.name = cls._schema_operation_status_result_read.name + _schema.operations = cls._schema_operation_status_result_read.operations + _schema.percent_complete = cls._schema_operation_status_result_read.percent_complete + _schema.resource_id = cls._schema_operation_status_result_read.resource_id + _schema.start_time = cls._schema_operation_status_result_read.start_time + _schema.status = cls._schema_operation_status_result_read.status + + +__all__ = ["ResyncCertificate"] diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/fabric/_rotate_certificate.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/fabric/_rotate_certificate.py new file mode 100644 index 00000000000..3c0f336cac4 --- /dev/null +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/fabric/_rotate_certificate.py @@ -0,0 +1,323 @@ +# -------------------------------------------------------------------------------------------- +# 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 fabric rotate-certificate", +) +class RotateCertificate(AAZCommand): + """Creates new certificates, then updates the Network Devices to use the new certificates. Note that disabled devices cannot be updated and must be resynchronized with the new certificates once they are enabled. + + :example: Create new certificates, then updates the Network Devices to use the new certificates + az networkfabric fabric rotate-certificate --resource-group example-rg --resource-name example-fabric + """ + + _aaz_info = { + "version": "2025-07-15", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkfabrics/{}/rotatecertificates", "2025-07-15"], + ] + } + + 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.network_fabric_name = AAZStrArg( + options=["--resource-name", "--network-fabric-name"], + help="Name of the Network Fabric.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z]{1}[a-zA-Z0-9-_]{2,127}$", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.NetworkFabricsRotateCertificates(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 NetworkFabricsRotateCertificates(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/networkFabrics/{networkFabricName}/rotateCertificates", + **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( + "networkFabricName", self.ctx.args.network_fabric_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", "2025-07-15", + 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.end_time = AAZStrType( + serialized_name="endTime", + ) + _schema_on_200.error = AAZObjectType() + _RotateCertificateHelper._build_schema_error_detail_read(_schema_on_200.error) + _schema_on_200.id = AAZStrType( + nullable=True, + ) + _schema_on_200.name = AAZStrType() + _schema_on_200.operations = AAZListType() + _schema_on_200.percent_complete = AAZFloatType( + serialized_name="percentComplete", + ) + _schema_on_200.resource_id = AAZStrType( + serialized_name="resourceId", + nullable=True, + flags={"read_only": True}, + ) + _schema_on_200.start_time = AAZStrType( + serialized_name="startTime", + ) + _schema_on_200.status = AAZStrType( + flags={"required": True}, + ) + + operations = cls._schema_on_200.operations + operations.Element = AAZObjectType() + _RotateCertificateHelper._build_schema_operation_status_result_read(operations.Element) + + return cls._schema_on_200 + + +class _RotateCertificateHelper: + """Helper class for RotateCertificate""" + + _schema_error_detail_read = None + + @classmethod + def _build_schema_error_detail_read(cls, _schema): + if cls._schema_error_detail_read is not None: + _schema.additional_info = cls._schema_error_detail_read.additional_info + _schema.code = cls._schema_error_detail_read.code + _schema.details = cls._schema_error_detail_read.details + _schema.message = cls._schema_error_detail_read.message + _schema.target = cls._schema_error_detail_read.target + return + + cls._schema_error_detail_read = _schema_error_detail_read = AAZObjectType() + + error_detail_read = _schema_error_detail_read + error_detail_read.additional_info = AAZListType( + serialized_name="additionalInfo", + flags={"read_only": True}, + ) + error_detail_read.code = AAZStrType( + flags={"read_only": True}, + ) + error_detail_read.details = AAZListType( + flags={"read_only": True}, + ) + error_detail_read.message = AAZStrType( + flags={"read_only": True}, + ) + error_detail_read.target = AAZStrType( + flags={"read_only": True}, + ) + + additional_info = _schema_error_detail_read.additional_info + additional_info.Element = AAZObjectType() + + _element = _schema_error_detail_read.additional_info.Element + _element.info = AAZDictType( + flags={"read_only": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + info = _schema_error_detail_read.additional_info.Element.info + info.Element = AAZAnyType() + + details = _schema_error_detail_read.details + details.Element = AAZObjectType() + cls._build_schema_error_detail_read(details.Element) + + _schema.additional_info = cls._schema_error_detail_read.additional_info + _schema.code = cls._schema_error_detail_read.code + _schema.details = cls._schema_error_detail_read.details + _schema.message = cls._schema_error_detail_read.message + _schema.target = cls._schema_error_detail_read.target + + _schema_operation_status_result_read = None + + @classmethod + def _build_schema_operation_status_result_read(cls, _schema): + if cls._schema_operation_status_result_read is not None: + _schema.end_time = cls._schema_operation_status_result_read.end_time + _schema.error = cls._schema_operation_status_result_read.error + _schema.id = cls._schema_operation_status_result_read.id + _schema.name = cls._schema_operation_status_result_read.name + _schema.operations = cls._schema_operation_status_result_read.operations + _schema.percent_complete = cls._schema_operation_status_result_read.percent_complete + _schema.resource_id = cls._schema_operation_status_result_read.resource_id + _schema.start_time = cls._schema_operation_status_result_read.start_time + _schema.status = cls._schema_operation_status_result_read.status + return + + cls._schema_operation_status_result_read = _schema_operation_status_result_read = AAZObjectType() + + operation_status_result_read = _schema_operation_status_result_read + operation_status_result_read.end_time = AAZStrType( + serialized_name="endTime", + ) + operation_status_result_read.error = AAZObjectType() + cls._build_schema_error_detail_read(operation_status_result_read.error) + operation_status_result_read.id = AAZStrType() + operation_status_result_read.name = AAZStrType() + operation_status_result_read.operations = AAZListType() + operation_status_result_read.percent_complete = AAZFloatType( + serialized_name="percentComplete", + ) + operation_status_result_read.resource_id = AAZStrType( + serialized_name="resourceId", + flags={"read_only": True}, + ) + operation_status_result_read.start_time = AAZStrType( + serialized_name="startTime", + ) + operation_status_result_read.status = AAZStrType( + flags={"required": True}, + ) + + operations = _schema_operation_status_result_read.operations + operations.Element = AAZObjectType() + cls._build_schema_operation_status_result_read(operations.Element) + + _schema.end_time = cls._schema_operation_status_result_read.end_time + _schema.error = cls._schema_operation_status_result_read.error + _schema.id = cls._schema_operation_status_result_read.id + _schema.name = cls._schema_operation_status_result_read.name + _schema.operations = cls._schema_operation_status_result_read.operations + _schema.percent_complete = cls._schema_operation_status_result_read.percent_complete + _schema.resource_id = cls._schema_operation_status_result_read.resource_id + _schema.start_time = cls._schema_operation_status_result_read.start_time + _schema.status = cls._schema_operation_status_result_read.status + + +__all__ = ["RotateCertificate"] diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/fabric/_update.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/fabric/_update.py index a9a714affea..ae460c21475 100644 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/fabric/_update.py +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/fabric/_update.py @@ -66,6 +66,18 @@ def _build_arguments_schema(cls, *args, **kwargs): required=True, ) + # define Arg Group "Body" + + _args_schema = cls._args_schema + _args_schema.tags = AAZDictArg( + options=["--tags"], + arg_group="Body", + help="Resource tags.", + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg() + # define Arg Group "Identity" _args_schema = cls._args_schema @@ -191,7 +203,7 @@ def _build_arguments_schema(cls, *args, **kwargs): _args_schema.terminal_server_configuration = AAZObjectArg( options=["--ts-config", "--terminal-server-configuration"], arg_group="Properties", - help="Network and credentials configuration already applied to terminal server.", + help="Network and credentials configuration currently applied to terminal server.", nullable=True, ) _args_schema.trusted_ip_prefixes = AAZListArg( @@ -206,11 +218,6 @@ def _build_arguments_schema(cls, *args, **kwargs): help="Unique Route Distinguisher configuration", nullable=True, ) - _args_schema.tags = AAZDictArg( - options=["--tags"], - arg_group="Properties", - help="Resource tags.", - ) authorized_transceiver = cls._args_schema.authorized_transceiver authorized_transceiver.key = AAZStrArg( @@ -340,9 +347,6 @@ def _build_arguments_schema(cls, *args, **kwargs): help="Unique Route Distinguisher configuration state. Default is Enabled.", enum={"Disabled": "Disabled", "Enabled": "Enabled"}, ) - - tags = cls._args_schema.tags - tags.Element = AAZStrArg() return cls._args_schema _args_vpn_configuration_patchable_properties_update = None diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/interface/_update.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/interface/_update.py index 8a99883590b..a2fa086f0c4 100644 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/interface/_update.py +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/interface/_update.py @@ -99,7 +99,6 @@ def _build_arguments_schema(cls, *args, **kwargs): options=["--annotation"], arg_group="Properties", help="Switch configuration description.", - nullable=True, ) return cls._args_schema @@ -228,7 +227,7 @@ def content(self): properties = _builder.get(".properties") if properties is not None: properties.set_prop("additionalDescription", AAZStrType, ".additional_description", typ_kwargs={"nullable": True}) - properties.set_prop("annotation", AAZStrType, ".annotation", typ_kwargs={"nullable": True}) + properties.set_prop("annotation", AAZStrType, ".annotation") return self.serialize_content(_content_value) diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/internalnetwork/_update.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/internalnetwork/_update.py index 4173a8e73ca..ba0701b65f3 100644 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/internalnetwork/_update.py +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/internalnetwork/_update.py @@ -233,7 +233,7 @@ def _build_arguments_schema(cls, *args, **kwargs): ) bmp_configuration.neighbor_ip_exclusions = AAZListArg( options=["neighbor-ip-exclusions"], - help="BMP Collector Address.", + help="Neighbor IP Address exclusions for BMP.", ) neighbor_ip_exclusions = cls._args_schema.bgp_configuration.bmp_configuration.neighbor_ip_exclusions diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/internetgateway/_update.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/internetgateway/_update.py index d14ca9ef68e..310af7db304 100644 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/internetgateway/_update.py +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/internetgateway/_update.py @@ -58,23 +58,27 @@ def _build_arguments_schema(cls, *args, **kwargs): required=True, ) - # define Arg Group "Properties" + # define Arg Group "Body" _args_schema = cls._args_schema - _args_schema.internet_gateway_rule_id = AAZResourceIdArg( - options=["--gateway-rule-id", "--internet-gateway-rule-id"], - arg_group="Properties", - help="ARM Resource ID of the Internet Gateway Rule.", - nullable=True, - ) _args_schema.tags = AAZDictArg( options=["--tags"], - arg_group="Properties", + 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.internet_gateway_rule_id = AAZResourceIdArg( + options=["--gateway-rule-id", "--internet-gateway-rule-id"], + arg_group="Properties", + help="ARM Resource ID of the Internet Gateway Rule.", + nullable=True, + ) return cls._args_schema def _execute_operations(self): diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/internetgatewayrule/_create.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/internetgatewayrule/_create.py index 5151e6b5e03..67b51d5f786 100644 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/internetgatewayrule/_create.py +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/internetgatewayrule/_create.py @@ -60,6 +60,26 @@ def _build_arguments_schema(cls, *args, **kwargs): required=True, ) + # define Arg Group "Body" + + _args_schema = cls._args_schema + _args_schema.location = AAZResourceLocationArg( + arg_group="Body", + help="The geo-location where the resource lives", + 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 @@ -131,26 +151,6 @@ def _build_arguments_schema(cls, *args, **kwargs): source_address_list = cls._args_schema.rule_properties.source_address_list source_address_list.Element = AAZStrArg() - - # define Arg Group "Resource" - - _args_schema = cls._args_schema - _args_schema.location = AAZResourceLocationArg( - arg_group="Resource", - help="The geo-location where the resource lives", - required=True, - fmt=AAZResourceLocationArgFormat( - resource_group_arg="resource_group", - ), - ) - _args_schema.tags = AAZDictArg( - options=["--tags"], - arg_group="Resource", - help="Resource tags.", - ) - - tags = cls._args_schema.tags - tags.Element = AAZStrArg() return cls._args_schema def _execute_operations(self): diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/internetgatewayrule/_update.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/internetgatewayrule/_update.py index c6d71a9bb4b..017a2a840ce 100644 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/internetgatewayrule/_update.py +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/internetgatewayrule/_update.py @@ -58,12 +58,12 @@ def _build_arguments_schema(cls, *args, **kwargs): required=True, ) - # define Arg Group "Properties" + # define Arg Group "Body" _args_schema = cls._args_schema _args_schema.tags = AAZDictArg( options=["--tags"], - arg_group="Properties", + arg_group="Body", help="Resource tags.", ) diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/ipcommunity/_create.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/ipcommunity/_create.py index d0b85fd8244..edf22bf6a4e 100644 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/ipcommunity/_create.py +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/ipcommunity/_create.py @@ -60,6 +60,26 @@ def _build_arguments_schema(cls, *args, **kwargs): required=True, ) + # define Arg Group "Body" + + _args_schema = cls._args_schema + _args_schema.location = AAZResourceLocationArg( + arg_group="Body", + help="The geo-location where the resource lives", + 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 @@ -114,26 +134,6 @@ def _build_arguments_schema(cls, *args, **kwargs): well_known_communities.Element = AAZStrArg( enum={"GShut": "GShut", "Internet": "Internet", "LocalAS": "LocalAS", "NoAdvertise": "NoAdvertise", "NoExport": "NoExport"}, ) - - # define Arg Group "Resource" - - _args_schema = cls._args_schema - _args_schema.location = AAZResourceLocationArg( - arg_group="Resource", - help="The geo-location where the resource lives", - required=True, - fmt=AAZResourceLocationArgFormat( - resource_group_arg="resource_group", - ), - ) - _args_schema.tags = AAZDictArg( - options=["--tags"], - arg_group="Resource", - help="Resource tags.", - ) - - tags = cls._args_schema.tags - tags.Element = AAZStrArg() return cls._args_schema def _execute_operations(self): diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/ipcommunity/_update.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/ipcommunity/_update.py index f48ed6ac4ee..e39f0cd4a13 100644 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/ipcommunity/_update.py +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/ipcommunity/_update.py @@ -58,6 +58,18 @@ def _build_arguments_schema(cls, *args, **kwargs): required=True, ) + # define Arg Group "Body" + + _args_schema = cls._args_schema + _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 @@ -67,11 +79,6 @@ def _build_arguments_schema(cls, *args, **kwargs): help="List of IP Community Rules.", nullable=True, ) - _args_schema.tags = AAZDictArg( - options=["--tags"], - arg_group="Properties", - help="Resource tags.", - ) ip_community_rules = cls._args_schema.ip_community_rules ip_community_rules.Element = AAZObjectArg() @@ -112,9 +119,6 @@ def _build_arguments_schema(cls, *args, **kwargs): well_known_communities.Element = AAZStrArg( enum={"GShut": "GShut", "Internet": "Internet", "LocalAS": "LocalAS", "NoAdvertise": "NoAdvertise", "NoExport": "NoExport"}, ) - - tags = cls._args_schema.tags - tags.Element = AAZStrArg() return cls._args_schema def _execute_operations(self): diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/ipextendedcommunity/_create.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/ipextendedcommunity/_create.py index 52682cf75b1..bf933deb39d 100644 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/ipextendedcommunity/_create.py +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/ipextendedcommunity/_create.py @@ -60,6 +60,26 @@ def _build_arguments_schema(cls, *args, **kwargs): required=True, ) + # define Arg Group "Body" + + _args_schema = cls._args_schema + _args_schema.location = AAZResourceLocationArg( + arg_group="Body", + help="The geo-location where the resource lives", + 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 @@ -105,26 +125,6 @@ def _build_arguments_schema(cls, *args, **kwargs): route_targets = cls._args_schema.ip_extended_community_rules.Element.route_targets route_targets.Element = AAZStrArg() - - # define Arg Group "Resource" - - _args_schema = cls._args_schema - _args_schema.location = AAZResourceLocationArg( - arg_group="Resource", - help="The geo-location where the resource lives", - required=True, - fmt=AAZResourceLocationArgFormat( - resource_group_arg="resource_group", - ), - ) - _args_schema.tags = AAZDictArg( - options=["--tags"], - arg_group="Resource", - help="Resource tags.", - ) - - tags = cls._args_schema.tags - tags.Element = AAZStrArg() return cls._args_schema def _execute_operations(self): diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/ipextendedcommunity/_update.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/ipextendedcommunity/_update.py index 5f846ebedce..61bcd991fe8 100644 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/ipextendedcommunity/_update.py +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/ipextendedcommunity/_update.py @@ -58,6 +58,18 @@ def _build_arguments_schema(cls, *args, **kwargs): required=True, ) + # define Arg Group "Body" + + _args_schema = cls._args_schema + _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 @@ -73,11 +85,6 @@ def _build_arguments_schema(cls, *args, **kwargs): help="List of IP Extended Community Rules.", nullable=True, ) - _args_schema.tags = AAZDictArg( - options=["--tags"], - arg_group="Properties", - help="Resource tags.", - ) ip_extended_community_rules = cls._args_schema.ip_extended_community_rules ip_extended_community_rules.Element = AAZObjectArg() @@ -109,9 +116,6 @@ def _build_arguments_schema(cls, *args, **kwargs): route_targets = cls._args_schema.ip_extended_community_rules.Element.route_targets route_targets.Element = AAZStrArg() - - tags = cls._args_schema.tags - tags.Element = AAZStrArg() return cls._args_schema def _execute_operations(self): diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/ipprefix/_create.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/ipprefix/_create.py index 3fe13d1f87f..d7436ad18db 100644 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/ipprefix/_create.py +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/ipprefix/_create.py @@ -60,6 +60,26 @@ def _build_arguments_schema(cls, *args, **kwargs): required=True, ) + # define Arg Group "Body" + + _args_schema = cls._args_schema + _args_schema.location = AAZResourceLocationArg( + arg_group="Body", + help="The geo-location where the resource lives", + 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 @@ -108,26 +128,6 @@ def _build_arguments_schema(cls, *args, **kwargs): options=["subnet-mask-length"], help="SubnetMaskLength gives the minimum NetworkPrefix length to be matched. Possible values for IPv4 are 1 - 32 . Possible values of IPv6 are 1 - 128.", ) - - # define Arg Group "Resource" - - _args_schema = cls._args_schema - _args_schema.location = AAZResourceLocationArg( - arg_group="Resource", - help="The geo-location where the resource lives", - required=True, - fmt=AAZResourceLocationArgFormat( - resource_group_arg="resource_group", - ), - ) - _args_schema.tags = AAZDictArg( - options=["--tags"], - arg_group="Resource", - help="Resource tags.", - ) - - tags = cls._args_schema.tags - tags.Element = AAZStrArg() return cls._args_schema def _execute_operations(self): diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/ipprefix/_update.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/ipprefix/_update.py index 9838a858c1e..9150bc5b974 100644 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/ipprefix/_update.py +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/ipprefix/_update.py @@ -58,6 +58,18 @@ def _build_arguments_schema(cls, *args, **kwargs): required=True, ) + # define Arg Group "Body" + + _args_schema = cls._args_schema + _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 @@ -73,11 +85,6 @@ def _build_arguments_schema(cls, *args, **kwargs): help="The list of IP Prefix Rules.", nullable=True, ) - _args_schema.tags = AAZDictArg( - options=["--tags"], - arg_group="Properties", - help="Resource tags.", - ) ip_prefix_rules = cls._args_schema.ip_prefix_rules ip_prefix_rules.Element = AAZObjectArg() @@ -112,9 +119,6 @@ def _build_arguments_schema(cls, *args, **kwargs): options=["subnet-mask-length"], help="SubnetMaskLength gives the minimum NetworkPrefix length to be matched. Possible values for IPv4 are 1 - 32 . Possible values of IPv6 are 1 - 128.", ) - - tags = cls._args_schema.tags - tags.Element = AAZStrArg() return cls._args_schema def _execute_operations(self): diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/l2domain/_create.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/l2domain/_create.py index 731a98561b0..392c9d6f98b 100644 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/l2domain/_create.py +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/l2domain/_create.py @@ -57,6 +57,26 @@ def _build_arguments_schema(cls, *args, **kwargs): required=True, ) + # define Arg Group "Body" + + _args_schema = cls._args_schema + _args_schema.location = AAZResourceLocationArg( + arg_group="Body", + help="The geo-location where the resource lives", + 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 "Identity" _args_schema = cls._args_schema @@ -111,7 +131,7 @@ def _build_arguments_schema(cls, *args, **kwargs): _args_schema.network_to_network_interconnect_id = AAZResourceIdArg( options=["--nni-id", "--network-to-network-interconnect-id"], arg_group="Properties", - help="ARM Resource ID of the networkToNetworkInterconnectId of the L2 ISD resource.", + help="ARM Resource ID of the networkToNetworkInterconnectId of the ExternalNetwork resource.", nullable=True, ) _args_schema.vlan_id = AAZIntArg( @@ -124,26 +144,6 @@ def _build_arguments_schema(cls, *args, **kwargs): minimum=100, ), ) - - # define Arg Group "Resource" - - _args_schema = cls._args_schema - _args_schema.location = AAZResourceLocationArg( - arg_group="Resource", - help="The geo-location where the resource lives", - required=True, - fmt=AAZResourceLocationArgFormat( - resource_group_arg="resource_group", - ), - ) - _args_schema.tags = AAZDictArg( - options=["--tags"], - arg_group="Resource", - help="Resource tags.", - ) - - tags = cls._args_schema.tags - tags.Element = AAZStrArg() return cls._args_schema def _execute_operations(self): diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/l2domain/_update.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/l2domain/_update.py index 680f23dfb28..2f3810409c6 100644 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/l2domain/_update.py +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/l2domain/_update.py @@ -58,6 +58,18 @@ def _build_arguments_schema(cls, *args, **kwargs): required=True, ) + # define Arg Group "Body" + + _args_schema = cls._args_schema + _args_schema.tags = AAZDictArg( + options=["--tags"], + arg_group="Body", + help="Resource tags.", + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg() + # define Arg Group "Identity" _args_schema = cls._args_schema @@ -84,7 +96,6 @@ def _build_arguments_schema(cls, *args, **kwargs): options=["--annotation"], arg_group="Properties", help="Switch configuration description.", - nullable=True, ) _args_schema.extended_vlan = AAZStrArg( options=["--extended-vlan"], @@ -106,17 +117,9 @@ def _build_arguments_schema(cls, *args, **kwargs): _args_schema.network_to_network_interconnect_id = AAZResourceIdArg( options=["--nni-id", "--network-to-network-interconnect-id"], arg_group="Properties", - help="ARM Resource ID of the networkToNetworkInterconnectId of the L2 ISD resource.", + help="ARM Resource ID of the networkToNetworkInterconnectId of the ExternalNetwork resource.", nullable=True, ) - _args_schema.tags = AAZDictArg( - options=["--tags"], - arg_group="Properties", - help="Resource tags.", - ) - - tags = cls._args_schema.tags - tags.Element = AAZStrArg() return cls._args_schema def _execute_operations(self): @@ -240,7 +243,7 @@ def content(self): properties = _builder.get(".properties") if properties is not None: - properties.set_prop("annotation", AAZStrType, ".annotation", typ_kwargs={"nullable": True}) + properties.set_prop("annotation", AAZStrType, ".annotation") properties.set_prop("extendedVlan", AAZStrType, ".extended_vlan", typ_kwargs={"nullable": True}) properties.set_prop("mtu", AAZIntType, ".mtu", typ_kwargs={"nullable": True}) properties.set_prop("networkToNetworkInterconnectId", AAZStrType, ".network_to_network_interconnect_id", typ_kwargs={"nullable": True}) 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 dce0cd48f71..1f522b68cd1 100644 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/l3domain/_create.py +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/l3domain/_create.py @@ -60,6 +60,26 @@ def _build_arguments_schema(cls, *args, **kwargs): required=True, ) + # define Arg Group "Body" + + _args_schema = cls._args_schema + _args_schema.location = AAZResourceLocationArg( + arg_group="Body", + help="The geo-location where the resource lives", + 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 "Identity" _args_schema = cls._args_schema @@ -203,26 +223,6 @@ def _build_arguments_schema(cls, *args, **kwargs): help="Array of ARM Resource ID of the RoutePolicies.", ) cls._build_args_l3_export_route_policy_create(static_route_route_policy.export_route_policy) - - # define Arg Group "Resource" - - _args_schema = cls._args_schema - _args_schema.location = AAZResourceLocationArg( - arg_group="Resource", - help="The geo-location where the resource lives", - required=True, - fmt=AAZResourceLocationArgFormat( - resource_group_arg="resource_group", - ), - ) - _args_schema.tags = AAZDictArg( - options=["--tags"], - arg_group="Resource", - help="Resource tags.", - ) - - tags = cls._args_schema.tags - tags.Element = AAZStrArg() return cls._args_schema _args_aggregate_route_create = None diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/l3domain/_update.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/l3domain/_update.py index 7175f4cd6ca..fd7a21f38bd 100644 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/l3domain/_update.py +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/l3domain/_update.py @@ -61,6 +61,18 @@ def _build_arguments_schema(cls, *args, **kwargs): required=True, ) + # define Arg Group "Body" + + _args_schema = cls._args_schema + _args_schema.tags = AAZDictArg( + options=["--tags"], + arg_group="Body", + help="Resource tags.", + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg() + # define Arg Group "Identity" _args_schema = cls._args_schema @@ -139,11 +151,6 @@ def _build_arguments_schema(cls, *args, **kwargs): help="IPv6 VRF Limit configuration.", nullable=True, ) - _args_schema.tags = AAZDictArg( - options=["--tags"], - arg_group="Properties", - help="Resource tags.", - ) aggregate_route_configuration = cls._args_schema.aggregate_route_configuration aggregate_route_configuration.ipv4_routes = AAZListArg( @@ -218,9 +225,6 @@ def _build_arguments_schema(cls, *args, **kwargs): options=["threshold"], help="Threshold for the routes.", ) - - tags = cls._args_schema.tags - tags.Element = AAZStrArg() return cls._args_schema _args_aggregate_route_update = None diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/neighborgroup/_create.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/neighborgroup/_create.py index 98354d8ffaf..c995e0c0fa0 100644 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/neighborgroup/_create.py +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/neighborgroup/_create.py @@ -60,6 +60,26 @@ def _build_arguments_schema(cls, *args, **kwargs): required=True, ) + # define Arg Group "Body" + + _args_schema = cls._args_schema + _args_schema.location = AAZResourceLocationArg( + arg_group="Body", + help="The geo-location where the resource lives", + 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 "Identity" _args_schema = cls._args_schema @@ -115,26 +135,6 @@ def _build_arguments_schema(cls, *args, **kwargs): ipv6_addresses = cls._args_schema.destination.ipv6_addresses ipv6_addresses.Element = AAZStrArg() - - # define Arg Group "Resource" - - _args_schema = cls._args_schema - _args_schema.location = AAZResourceLocationArg( - arg_group="Resource", - help="The geo-location where the resource lives", - required=True, - fmt=AAZResourceLocationArgFormat( - resource_group_arg="resource_group", - ), - ) - _args_schema.tags = AAZDictArg( - options=["--tags"], - arg_group="Resource", - help="Resource tags.", - ) - - tags = cls._args_schema.tags - tags.Element = AAZStrArg() return cls._args_schema def _execute_operations(self): diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/neighborgroup/_update.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/neighborgroup/_update.py index f6061491b26..cac7abc6a14 100644 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/neighborgroup/_update.py +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/neighborgroup/_update.py @@ -61,6 +61,18 @@ def _build_arguments_schema(cls, *args, **kwargs): required=True, ) + # define Arg Group "Body" + + _args_schema = cls._args_schema + _args_schema.tags = AAZDictArg( + options=["--tags"], + arg_group="Body", + help="Resource tags.", + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg() + # define Arg Group "Identity" _args_schema = cls._args_schema @@ -95,11 +107,6 @@ def _build_arguments_schema(cls, *args, **kwargs): help="An array of destination IPv4 Addresses or IPv6 Addresses.", nullable=True, ) - _args_schema.tags = AAZDictArg( - options=["--tags"], - arg_group="Properties", - help="Resource tags.", - ) destination = cls._args_schema.destination destination.ipv4_addresses = AAZListArg( @@ -122,9 +129,6 @@ def _build_arguments_schema(cls, *args, **kwargs): ipv6_addresses = cls._args_schema.destination.ipv6_addresses ipv6_addresses.Element = AAZStrArg() - - tags = cls._args_schema.tags - tags.Element = AAZStrArg() return cls._args_schema def _execute_operations(self): diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/nni/_update.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/nni/_update.py index edefc78d3aa..9f0b1592945 100644 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/nni/_update.py +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/nni/_update.py @@ -100,7 +100,7 @@ def _build_arguments_schema(cls, *args, **kwargs): _args_schema.layer2_configuration = AAZObjectArg( options=["--l2-config", "--layer2-configuration"], arg_group="Properties", - help="Common properties for Layer2Configuration.", + help="Common properties for Layer2 Configuration.", nullable=True, ) _args_schema.micro_bfd_state = AAZStrArg( @@ -465,7 +465,7 @@ def content(self): typ=AAZObjectType, typ_kwargs={"flags": {"required": True, "client_flatten": True}} ) - _builder.set_prop("properties", AAZObjectType) + _builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) properties = _builder.get(".properties") if properties is not None: 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 4019300631c..47ed57e9028 100644 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/routepolicy/_create.py +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/routepolicy/_create.py @@ -65,6 +65,26 @@ def _build_arguments_schema(cls, *args, **kwargs): ), ) + # define Arg Group "Body" + + _args_schema = cls._args_schema + _args_schema.location = AAZResourceLocationArg( + arg_group="Body", + help="The geo-location where the resource lives", + 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 @@ -212,26 +232,6 @@ def _build_arguments_schema(cls, *args, **kwargs): ip_extended_community_ids = cls._args_schema.statements.Element.condition.ip_extended_community_ids ip_extended_community_ids.Element = AAZStrArg() - - # define Arg Group "Resource" - - _args_schema = cls._args_schema - _args_schema.location = AAZResourceLocationArg( - arg_group="Resource", - help="The geo-location where the resource lives", - required=True, - fmt=AAZResourceLocationArgFormat( - resource_group_arg="resource_group", - ), - ) - _args_schema.tags = AAZDictArg( - options=["--tags"], - arg_group="Resource", - help="Resource tags.", - ) - - tags = cls._args_schema.tags - tags.Element = AAZStrArg() return cls._args_schema _args_ip_community_id_list_create = None diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/routepolicy/_update.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/routepolicy/_update.py index f4fdcb8c84f..fb6102d3679 100644 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/routepolicy/_update.py +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/routepolicy/_update.py @@ -61,6 +61,18 @@ def _build_arguments_schema(cls, *args, **kwargs): ), ) + # define Arg Group "Body" + + _args_schema = cls._args_schema + _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 @@ -77,11 +89,6 @@ def _build_arguments_schema(cls, *args, **kwargs): help="Route Policy statements.", nullable=True, ) - _args_schema.tags = AAZDictArg( - options=["--tags"], - arg_group="Properties", - help="Resource tags.", - ) statements = cls._args_schema.statements statements.Element = AAZObjectArg() @@ -193,9 +200,6 @@ def _build_arguments_schema(cls, *args, **kwargs): ip_extended_community_ids = cls._args_schema.statements.Element.condition.ip_extended_community_ids ip_extended_community_ids.Element = AAZStrArg() - - tags = cls._args_schema.tags - tags.Element = AAZStrArg() return cls._args_schema _args_ip_community_id_list_update = None diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/tap/_create.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/tap/_create.py index 5367cf1c3e4..f8aaa087325 100644 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/tap/_create.py +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/tap/_create.py @@ -60,6 +60,26 @@ def _build_arguments_schema(cls, *args, **kwargs): required=True, ) + # define Arg Group "Body" + + _args_schema = cls._args_schema + _args_schema.location = AAZResourceLocationArg( + arg_group="Body", + help="The geo-location where the resource lives", + 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 "Identity" _args_schema = cls._args_schema @@ -157,26 +177,6 @@ def _build_arguments_schema(cls, *args, **kwargs): neighbor_group_ids.Element = AAZResourceIdArg( nullable=True, ) - - # define Arg Group "Resource" - - _args_schema = cls._args_schema - _args_schema.location = AAZResourceLocationArg( - arg_group="Resource", - help="The geo-location where the resource lives", - required=True, - fmt=AAZResourceLocationArgFormat( - resource_group_arg="resource_group", - ), - ) - _args_schema.tags = AAZDictArg( - options=["--tags"], - arg_group="Resource", - help="Resource tags.", - ) - - tags = cls._args_schema.tags - tags.Element = AAZStrArg() return cls._args_schema def _execute_operations(self): diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/tap/_update.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/tap/_update.py index 2e04b2a4318..eabe0db587a 100644 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/tap/_update.py +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/tap/_update.py @@ -61,6 +61,18 @@ def _build_arguments_schema(cls, *args, **kwargs): required=True, ) + # define Arg Group "Body" + + _args_schema = cls._args_schema + _args_schema.tags = AAZDictArg( + options=["--tags"], + arg_group="Body", + help="Resource tags.", + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg() + # define Arg Group "Identity" _args_schema = cls._args_schema @@ -87,7 +99,6 @@ def _build_arguments_schema(cls, *args, **kwargs): options=["--annotation"], arg_group="Properties", help="Switch configuration description.", - nullable=True, ) _args_schema.destinations = AAZListArg( options=["--destinations"], @@ -102,11 +113,6 @@ def _build_arguments_schema(cls, *args, **kwargs): nullable=True, enum={"Pull": "Pull", "Push": "Push"}, ) - _args_schema.tags = AAZDictArg( - options=["--tags"], - arg_group="Properties", - help="Resource tags.", - ) destinations = cls._args_schema.destinations destinations.Element = AAZObjectArg() @@ -154,9 +160,6 @@ def _build_arguments_schema(cls, *args, **kwargs): neighbor_group_ids.Element = AAZResourceIdArg( nullable=True, ) - - tags = cls._args_schema.tags - tags.Element = AAZStrArg() return cls._args_schema def _execute_operations(self): @@ -280,7 +283,7 @@ def content(self): properties = _builder.get(".properties") if properties is not None: - properties.set_prop("annotation", AAZStrType, ".annotation", typ_kwargs={"nullable": True}) + properties.set_prop("annotation", AAZStrType, ".annotation") properties.set_prop("destinations", AAZListType, ".destinations", typ_kwargs={"nullable": True}) properties.set_prop("pollingType", AAZStrType, ".polling_type", typ_kwargs={"nullable": True}) diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/taprule/_create.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/taprule/_create.py index 41f50d8d383..cef5b29acec 100644 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/taprule/_create.py +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/taprule/_create.py @@ -63,6 +63,26 @@ def _build_arguments_schema(cls, *args, **kwargs): required=True, ) + # define Arg Group "Body" + + _args_schema = cls._args_schema + _args_schema.location = AAZResourceLocationArg( + arg_group="Body", + help="The geo-location where the resource lives", + 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 "Identity" _args_schema = cls._args_schema @@ -432,26 +452,6 @@ def _build_arguments_schema(cls, *args, **kwargs): vlans = cls._args_schema.match_configurations.Element.match_conditions.Element.vlan_match_condition.vlans vlans.Element = AAZStrArg() - - # define Arg Group "Resource" - - _args_schema = cls._args_schema - _args_schema.location = AAZResourceLocationArg( - arg_group="Resource", - help="The geo-location where the resource lives", - required=True, - fmt=AAZResourceLocationArgFormat( - resource_group_arg="resource_group", - ), - ) - _args_schema.tags = AAZDictArg( - options=["--tags"], - arg_group="Resource", - help="Resource tags.", - ) - - tags = cls._args_schema.tags - tags.Element = AAZStrArg() return cls._args_schema def _execute_operations(self): diff --git a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/taprule/_update.py b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/taprule/_update.py index 1fbf0ce36d5..699ed2f7bd3 100644 --- a/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/taprule/_update.py +++ b/src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/taprule/_update.py @@ -61,6 +61,18 @@ def _build_arguments_schema(cls, *args, **kwargs): required=True, ) + # define Arg Group "Body" + + _args_schema = cls._args_schema + _args_schema.tags = AAZDictArg( + options=["--tags"], + arg_group="Body", + help="Resource tags.", + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg() + # define Arg Group "Identity" _args_schema = cls._args_schema @@ -129,11 +141,6 @@ def _build_arguments_schema(cls, *args, **kwargs): help="Network Tap Rules file URL.", nullable=True, ) - _args_schema.tags = AAZDictArg( - options=["--tags"], - arg_group="Properties", - help="Resource tags.", - ) dynamic_match_configurations = cls._args_schema.dynamic_match_configurations dynamic_match_configurations.Element = AAZObjectArg() @@ -410,9 +417,6 @@ def _build_arguments_schema(cls, *args, **kwargs): vlans = cls._args_schema.match_configurations.Element.match_conditions.Element.vlan_match_condition.vlans vlans.Element = AAZStrArg() - - tags = cls._args_schema.tags - tags.Element = AAZStrArg() return cls._args_schema def _execute_operations(self): diff --git a/src/managednetworkfabric/azext_managednetworkfabric/tests/latest/recordings/test_GA_bootstrapInterface_scenario1.yaml b/src/managednetworkfabric/azext_managednetworkfabric/tests/latest/recordings/test_GA_bootstrapinterface_scenario1.yaml similarity index 85% rename from src/managednetworkfabric/azext_managednetworkfabric/tests/latest/recordings/test_GA_bootstrapInterface_scenario1.yaml rename to src/managednetworkfabric/azext_managednetworkfabric/tests/latest/recordings/test_GA_bootstrapinterface_scenario1.yaml index f2f661d033d..8a372499ec5 100644 --- a/src/managednetworkfabric/azext_managednetworkfabric/tests/latest/recordings/test_GA_bootstrapInterface_scenario1.yaml +++ b/src/managednetworkfabric/azext_managednetworkfabric/tests/latest/recordings/test_GA_bootstrapinterface_scenario1.yaml @@ -66,7 +66,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Fab3LabNF-5-1/providers/Microsoft.ManagedNetworkFabric/networkBootstrapDevices/example-device/networkBootstrapInterfaces?api-version=2025-07-15 response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Fab3LabNF-5-1/providers/Microsoft.ManagedNetworkFabric/networkBootstrapDevices/example-device/networkBootstrapInterfaces/example-interface","name":"example-interface","type":"Microsoft.ManagedNetworkFabric/networkBootstrapDevices/networkBootstrapInterfaces","systemData":{"createdBy":"d1bd24c7-b27f-477e-86dd-939e107873d7","createdByType":"Application","createdAt":"2024-02-12T09:32:41.2764291Z","lastModifiedBy":"d1bd24c7-b27f-477e-86dd-939e107873d7","lastModifiedByType":"Application","lastModifiedAt":"2024-02-12T09:32:41.2764291Z"},"properties":{"annotation":null,"interfaceType":"Physical","physicalIdentifier":"Ethernet1/1","connectedTo":"Server1","neighbor":"server1.example.com","neighborPort":"eth0","ipv4Address":"192.168.1.10/24","ipv6Address":"2001:db8::1/64","macAddress":"aa:bb:cc:dd:ee:ff","speed":"10Gbps","mtu":1500,"administrativeState":"Enabled","operationalState":"Up","provisioningState":"Succeeded","configurationState":"Succeeded"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Fab3LabNF-5-1/providers/Microsoft.ManagedNetworkFabric/networkBootstrapDevices/example-device/networkBootstrapInterfaces/Ethernet1/2","name":"Ethernet1/2","type":"Microsoft.ManagedNetworkFabric/networkBootstrapDevices/networkBootstrapInterfaces","systemData":{"createdBy":"d1bd24c7-b27f-477e-86dd-939e107873d7","createdByType":"Application","createdAt":"2024-02-12T09:32:41.3764291Z","lastModifiedBy":"d1bd24c7-b27f-477e-86dd-939e107873d7","lastModifiedByType":"Application","lastModifiedAt":"2024-02-12T09:32:41.3764291Z"},"properties":{"annotation":null,"interfaceType":"Physical","physicalIdentifier":"Ethernet1/2","connectedTo":"Server2","neighbor":"server2.example.com","neighborPort":"eth0","ipv4Address":"192.168.1.11/24","ipv6Address":"2001:db8::2/64","macAddress":"aa:bb:cc:dd:ee:f0","speed":"10Gbps","mtu":1500,"administrativeState":"Enabled","operationalState":"Up","provisioningState":"Succeeded","configurationState":"Succeeded"}}]}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Fab3LabNF-5-1/providers/Microsoft.ManagedNetworkFabric/networkBootstrapDevices/example-device/networkBootstrapInterfaces/example-interface","name":"example-interface","type":"Microsoft.ManagedNetworkFabric/networkBootstrapDevices/networkBootstrapInterfaces","systemData":{"createdBy":"d1bd24c7-b27f-477e-86dd-939e107873d7","createdByType":"Application","createdAt":"2024-02-12T09:32:41.2764291Z","lastModifiedBy":"d1bd24c7-b27f-477e-86dd-939e107873d7","lastModifiedByType":"Application","lastModifiedAt":"2024-02-12T09:32:41.2764291Z"},"properties":{"annotation":null,"interfaceType":"Physical","physicalIdentifier":"Ethernet1/1","connectedTo":"Server1","neighbor":"server1.example.com","neighborPort":"eth0","ipv4Address":"192.168.1.10/24","ipv6Address":"2001:db8::1/64","macAddress":"aa:bb:cc:dd:ee:ff","speed":"10Gbps","mtu":1500,"administrativeState":"Enabled","operationalState":"Up","provisioningState":"Succeeded","configurationState":"Succeeded"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Fab3LabNF-5-1/providers/Microsoft.ManagedNetworkFabric/networkBootstrapDevices/example-device/networkBootstrapInterfaces/testbootstrapinterface1","name":"testbootstrapinterface1","type":"Microsoft.ManagedNetworkFabric/networkBootstrapDevices/networkBootstrapInterfaces","systemData":{"createdBy":"d1bd24c7-b27f-477e-86dd-939e107873d7","createdByType":"Application","createdAt":"2024-02-12T09:32:41.3764291Z","lastModifiedBy":"d1bd24c7-b27f-477e-86dd-939e107873d7","lastModifiedByType":"Application","lastModifiedAt":"2024-02-12T09:32:41.3764291Z"},"properties":{"annotation":null,"interfaceType":"Physical","physicalIdentifier":"testbootstrapinterface1","connectedTo":"Server2","neighbor":"server2.example.com","neighborPort":"eth0","ipv4Address":"192.168.1.11/24","ipv6Address":"2001:db8::2/64","macAddress":"aa:bb:cc:dd:ee:f0","speed":"10Gbps","mtu":1500,"administrativeState":"Enabled","operationalState":"Up","provisioningState":"Succeeded","configurationState":"Succeeded"}}]}' headers: cache-control: - no-cache diff --git a/src/managednetworkfabric/azext_managednetworkfabric/tests/latest/test_bootstrapdevice.py b/src/managednetworkfabric/azext_managednetworkfabric/tests/latest/test_bootstrapdevice.py index 55671c77e8c..da07177e27f 100644 --- a/src/managednetworkfabric/azext_managednetworkfabric/tests/latest/test_bootstrapdevice.py +++ b/src/managednetworkfabric/azext_managednetworkfabric/tests/latest/test_bootstrapdevice.py @@ -1,76 +1,76 @@ # -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# + # -------------------------------------------------------------------------------------------- # pylint: disable=too-few-public-methods,unnecessary-pass,unused-argument -# from azure.cli.testsdk.scenario_tests import AllowLargeResponse +from azure.cli.testsdk.scenario_tests import AllowLargeResponse -# """ -# Bootstrap Device tests scenarios -# """ +""" +Bootstrap Device tests scenarios +""" -# from azure.cli.testsdk import ScenarioTest +from azure.cli.testsdk import ScenarioTest -# from .config import CONFIG +from .config import CONFIG -# def setup_scenario1(test): -# """Env setup_scenario1""" -# pass +def setup_scenario1(test): + """Env setup_scenario1""" + pass -# def cleanup_scenario1(test): -# """Env cleanup_scenario1""" -# pass +def cleanup_scenario1(test): + """Env cleanup_scenario1""" + pass -# def call_scenario1(test): -# """Testcase: scenario1""" -# setup_scenario1(test) -# step_show(test, checks=[]) -# step_list_resource_group(test, checks=[]) -# step_list_subscription(test, checks=[]) -# cleanup_scenario1(test) +def call_scenario1(test): + """Testcase: scenario1""" + setup_scenario1(test) + step_show(test, checks=[]) + step_list_resource_group(test, checks=[]) + step_list_subscription(test, checks=[]) + cleanup_scenario1(test) -# def step_show(test, checks=None): -# """Bootstrap Device show operation""" -# if checks is None: -# checks = [] -# test.cmd( -# "az networkfabric bootstrapdevice show --resource-name {name} --resource-group {rg}" -# ) +def step_show(test, checks=None): + """Bootstrap Device show operation""" + if checks is None: + checks = [] + test.cmd( + "az networkfabric bootstrapdevice show --resource-name {name} --resource-group {rg}" + ) -# def step_list_resource_group(test, checks=None): -# """Bootstrap Device list by resource group operation""" -# if checks is None: -# checks = [] -# test.cmd("az networkfabric bootstrapdevice list --resource-group {rg}") +def step_list_resource_group(test, checks=None): + """Bootstrap Device list by resource group operation""" + if checks is None: + checks = [] + test.cmd("az networkfabric bootstrapdevice list --resource-group {rg}") -# def step_list_subscription(test, checks=None): -# """Bootstrap Device list by subscription operation""" -# if checks is None: -# checks = [] -# test.cmd("az networkfabric bootstrapdevice list") +def step_list_subscription(test, checks=None): + """Bootstrap Device list by subscription operation""" + if checks is None: + checks = [] + test.cmd("az networkfabric bootstrapdevice list") -# class GA_BootstrapDeviceScenarioTest1(ScenarioTest): -# """Bootstrap Device Scenario test""" +class GA_BootstrapDeviceScenarioTest1(ScenarioTest): + """Bootstrap Device Scenario test""" -# def __init__(self, *args, **kwargs): -# super().__init__(*args, **kwargs) -# self.kwargs.update( -# { -# "name": CONFIG.get("BOOTSTRAP_DEVICE", "name"), -# "rg": CONFIG.get("BOOTSTRAP_DEVICE", "resource_group"), -# } -# ) + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + self.kwargs.update( + { + "name": CONFIG.get("BOOTSTRAP_DEVICE", "name"), + "rg": CONFIG.get("BOOTSTRAP_DEVICE", "resource_group"), + } + ) -# @AllowLargeResponse() -# def test_GA_bootstrapdevice_scenario1(self): -# """test scenario for Bootstrap Device CRUD operations""" -# call_scenario1(self) + @AllowLargeResponse() + def test_GA_bootstrapdevice_scenario1(self): + """test scenario for Bootstrap Device CRUD operations""" + call_scenario1(self) diff --git a/src/managednetworkfabric/azext_managednetworkfabric/tests/latest/test_bootstrapinterface.py b/src/managednetworkfabric/azext_managednetworkfabric/tests/latest/test_bootstrapinterface.py index 50502812931..3064624a12b 100644 --- a/src/managednetworkfabric/azext_managednetworkfabric/tests/latest/test_bootstrapinterface.py +++ b/src/managednetworkfabric/azext_managednetworkfabric/tests/latest/test_bootstrapinterface.py @@ -1,70 +1,70 @@ # -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# + # -------------------------------------------------------------------------------------------- # pylint: disable=too-few-public-methods,unnecessary-pass,unused-argument -# """ -# Bootstrap Interface tests scenarios -# """ +""" +Bootstrap Interface tests scenarios +""" -# from azure.cli.testsdk import ScenarioTest +from azure.cli.testsdk import ScenarioTest -# from .config import CONFIG +from .config import CONFIG -# def setup_scenario1(test): -# """Env setup_scenario1""" -# pass +def setup_scenario1(test): + """Env setup_scenario1""" + pass -# def cleanup_scenario1(test): -# """Env cleanup_scenario1""" -# pass +def cleanup_scenario1(test): + """Env cleanup_scenario1""" + pass -# def call_scenario1(test): -# """Testcase: scenario1""" -# setup_scenario1(test) -# step_show(test, checks=[]) -# step_list_resource_group(test, checks=[]) -# cleanup_scenario1(test) +def call_scenario1(test): + """Testcase: scenario1""" + setup_scenario1(test) + step_show(test, checks=[]) + step_list_resource_group(test, checks=[]) + cleanup_scenario1(test) -# def step_show(test, checks=None): -# """Bootstrap Interface show operation""" -# if checks is None: -# checks = [] -# test.cmd( -# "az networkfabric bootstrapinterface show --resource-name {name} --resource-group {rg} --bootstrap-device {bootstrapDeviceName}" -# ) +def step_show(test, checks=None): + """Bootstrap Interface show operation""" + if checks is None: + checks = [] + test.cmd( + "az networkfabric bootstrapinterface show --resource-name {name} --resource-group {rg} --bootstrap-device {bootstrapDeviceName}" + ) -# def step_list_resource_group(test, checks=None): -# """Interface list by resource group operation""" -# if checks is None: -# checks = [] -# test.cmd( -# "az networkfabric bootstrapinterface list --resource-group {rg} --bootstrap-device {bootstrapDeviceName}" -# ) +def step_list_resource_group(test, checks=None): + """Interface list by resource group operation""" + if checks is None: + checks = [] + test.cmd( + "az networkfabric bootstrapinterface list --resource-group {rg} --bootstrap-device {bootstrapDeviceName}" + ) -# class GA_BootstrapInterfaceScenarioTest1(ScenarioTest): -# """Bootstrap InterfaceScenario test""" +class GA_BootstrapInterfaceScenarioTest1(ScenarioTest): + """Bootstrap InterfaceScenario test""" -# def __init__(self, *args, **kwargs): -# super().__init__(*args, **kwargs) -# self.kwargs.update( -# { -# "name": CONFIG.get("BOOTSTRAP_INTERFACE", "name"), -# "rg": CONFIG.get("BOOTSTRAP_INTERFACE", "resource_group"), -# "bootstrapDeviceName": CONFIG.get( -# "BOOTSTRAP_INTERFACE", "bootstrap_device_name" -# ), -# } -# ) + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + self.kwargs.update( + { + "name": CONFIG.get("BOOTSTRAP_INTERFACE", "name"), + "rg": CONFIG.get("BOOTSTRAP_INTERFACE", "resource_group"), + "bootstrapDeviceName": CONFIG.get( + "BOOTSTRAP_INTERFACE", "bootstrap_device_name" + ), + } + ) -# def test_GA_bootstrapinterface_scenario1(self): -# """test scenario for Bootstrap Interface CRUD operations""" -# call_scenario1(self) + def test_GA_bootstrapinterface_scenario1(self): + """test scenario for Bootstrap Interface CRUD operations""" + call_scenario1(self) diff --git a/src/managednetworkfabric/azext_managednetworkfabric/tests/latest/test_device_resync_certificate.py b/src/managednetworkfabric/azext_managednetworkfabric/tests/latest/test_device_resync_certificate.py index d5f5649b785..f89b38c198d 100644 --- a/src/managednetworkfabric/azext_managednetworkfabric/tests/latest/test_device_resync_certificate.py +++ b/src/managednetworkfabric/azext_managednetworkfabric/tests/latest/test_device_resync_certificate.py @@ -1,61 +1,61 @@ # -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# + # -------------------------------------------------------------------------------------------- # pylint: disable=too-few-public-methods,unnecessary-pass,unused-argument -# from azure.cli.testsdk.scenario_tests import AllowLargeResponse +from azure.cli.testsdk.scenario_tests import AllowLargeResponse -# """ -# Device tests scenarios -# """ +""" +Device tests scenarios +""" -# from azure.cli.testsdk import ScenarioTest +from azure.cli.testsdk import ScenarioTest -# from .config import CONFIG +from .config import CONFIG -# def setup_scenario1(test): -# """Env setup_scenario1""" -# pass +def setup_scenario1(test): + """Env setup_scenario1""" + pass -# def cleanup_scenario1(test): -# """Env cleanup_scenario1""" -# pass +def cleanup_scenario1(test): + """Env cleanup_scenario1""" + pass -# def call_scenario1(test): -# """Testcase: scenario1""" -# setup_scenario1(test) -# step_resync_certificate(test, checks=[]) -# cleanup_scenario1(test) +def call_scenario1(test): + """Testcase: scenario1""" + setup_scenario1(test) + step_resync_certificate(test, checks=[]) + cleanup_scenario1(test) -# def step_resync_certificate(test, checks=None): -# """Device resync-certificate operation""" -# if checks is None: -# checks = [] -# test.cmd( -# "az networkfabric device resync-certificate --resource-group {rg} --resource-name {name}", -# checks=checks, -# ) +def step_resync_certificate(test, checks=None): + """Device resync-certificate operation""" + if checks is None: + checks = [] + test.cmd( + "az networkfabric device resync-certificate --resource-group {rg} --resource-name {name}", + checks=checks, + ) -# class GA_DeviceRefreshConfigurationScenarioTest1(ScenarioTest): -# """DeviceScenario test""" +class GA_DeviceResyncCertificateScenarioTest1(ScenarioTest): + """Device resync-certificate scenario test""" -# def __init__(self, *args, **kwargs): -# super().__init__(*args, **kwargs) -# self.kwargs.update( -# { -# "rg": CONFIG.get("NETWORK_DEVICE", "resource_group"), -# "name": CONFIG.get("NETWORK_DEVICE", "name"), -# } -# ) + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + self.kwargs.update( + { + "rg": CONFIG.get("NETWORK_DEVICE", "resource_group"), + "name": CONFIG.get("NETWORK_DEVICE", "name"), + } + ) -# @AllowLargeResponse() -# def test_GA_device_resync_certificate_scenario1(self): -# """test scenario for Device resync-certificate operation""" -# call_scenario1(self) + @AllowLargeResponse() + def test_GA_device_resync_certificate_scenario1(self): + """test scenario for Device resync-certificate operation""" + call_scenario1(self) diff --git a/src/managednetworkfabric/azext_managednetworkfabric/tests/latest/test_nf_resync_certificate.py b/src/managednetworkfabric/azext_managednetworkfabric/tests/latest/test_nf_resync_certificate.py index 17892664a14..3f4cd2138be 100644 --- a/src/managednetworkfabric/azext_managednetworkfabric/tests/latest/test_nf_resync_certificate.py +++ b/src/managednetworkfabric/azext_managednetworkfabric/tests/latest/test_nf_resync_certificate.py @@ -1,73 +1,73 @@ # -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# + # -------------------------------------------------------------------------------------------- # pylint: disable=too-few-public-methods,unnecessary-pass,unused-argument -# """ -# NF post tests scenarios -# """ +""" +NF post tests scenarios +""" -# from azure.cli.testsdk import ScenarioTest +from azure.cli.testsdk import ScenarioTest -# from .config import CONFIG +from .config import CONFIG -# def setup_scenario(test): -# """Env setup_scenario""" -# pass +def setup_scenario(test): + """Env setup_scenario""" + pass -# def cleanup_scenario(test): -# """Env cleanup_scenario""" -# pass +def cleanup_scenario(test): + """Env cleanup_scenario""" + pass -# def call_scenario1(test): -# """Testcase: scenario1""" -# setup_scenario(test) -# step_resync_cetificate_scenario1(test) -# cleanup_scenario(test) +def call_scenario1(test): + """Testcase: scenario1""" + setup_scenario(test) + step_resync_certificate_scenario1(test) + cleanup_scenario(test) -# def call_scenario2(test): -# """Testcase: scenario2""" -# setup_scenario(test) -# step_resync_cetificate_scenario2(test) -# cleanup_scenario(test) +def call_scenario2(test): + """Testcase: scenario2""" + setup_scenario(test) + step_resync_certificate_scenario2(test) + cleanup_scenario(test) -# def step_resync_cetificate_scenario1(test, checks=None): -# """nf resync certificate operation""" -# if checks is None: -# checks = [] -# test.cmd( -# "az networkfabric fabric resync-certificate --resource-name {name} --resource-group {resourceGroup}" -# ) +def step_resync_certificate_scenario1(test, checks=None): + """nf resync certificate operation""" + if checks is None: + checks = [] + test.cmd( + "az networkfabric fabric resync-certificate --resource-name {name} --resource-group {resourceGroup}" + ) -# def step_resync_cetificate_scenario2(test, checks=None): -# """nf resync certificate operation""" -# if checks is None: -# checks = [] -# test.cmd( -# "az networkfabric fabric resync-certificate --network-fabric-name {name} --resource-group {resourceGroup}" -# ) +def step_resync_certificate_scenario2(test, checks=None): + """nf resync certificate operation""" + if checks is None: + checks = [] + test.cmd( + "az networkfabric fabric resync-certificate --network-fabric-name {name} --resource-group {resourceGroup}" + ) -# class GA_NFResyncCertificateScenarioTest1(ScenarioTest): -# """NFScenario test""" +class GA_NFResyncCertificateScenarioTest1(ScenarioTest): + """NFScenario test""" -# def __init__(self, *args, **kwargs): -# super().__init__(*args, **kwargs) -# self.kwargs.update( -# { -# "name": CONFIG.get("NETWORK_FABRIC", "name"), -# "resourceGroup": CONFIG.get("NETWORK_FABRIC", "resource_group"), -# } -# ) + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + self.kwargs.update( + { + "name": CONFIG.get("NETWORK_FABRIC", "name"), + "resourceGroup": CONFIG.get("NETWORK_FABRIC", "resource_group"), + } + ) -# def test_GA_nf_resync_certificate_scenario1(self): -# """test scenario for NF resync certificate operations""" -# call_scenario1(self) + def test_GA_nf_resync_certificate_scenario1(self): + """test scenario for NF resync certificate operations""" + call_scenario1(self) diff --git a/src/managednetworkfabric/azext_managednetworkfabric/tests/latest/test_nf_rotate_certificate.py b/src/managednetworkfabric/azext_managednetworkfabric/tests/latest/test_nf_rotate_certificate.py index 1be177ec56b..77608380ed6 100644 --- a/src/managednetworkfabric/azext_managednetworkfabric/tests/latest/test_nf_rotate_certificate.py +++ b/src/managednetworkfabric/azext_managednetworkfabric/tests/latest/test_nf_rotate_certificate.py @@ -1,73 +1,73 @@ # -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# + # -------------------------------------------------------------------------------------------- # pylint: disable=too-few-public-methods,unnecessary-pass,unused-argument -# """ -# NF post tests scenarios -# """ +""" +NF post tests scenarios +""" -# from azure.cli.testsdk import ScenarioTest +from azure.cli.testsdk import ScenarioTest -# from .config import CONFIG +from .config import CONFIG -# def setup_scenario(test): -# """Env setup_scenario""" -# pass +def setup_scenario(test): + """Env setup_scenario""" + pass -# def cleanup_scenario(test): -# """Env cleanup_scenario""" -# pass +def cleanup_scenario(test): + """Env cleanup_scenario""" + pass -# def call_scenario1(test): -# """Testcase: scenario1""" -# setup_scenario(test) -# step_rotate_certificate_scenario1(test) -# cleanup_scenario(test) +def call_scenario1(test): + """Testcase: scenario1""" + setup_scenario(test) + step_rotate_certificate_scenario1(test) + cleanup_scenario(test) -# def call_scenario2(test): -# """Testcase: scenario2""" -# setup_scenario(test) -# step_rotate_certificate_scenario2(test) -# cleanup_scenario(test) +def call_scenario2(test): + """Testcase: scenario2""" + setup_scenario(test) + step_rotate_certificate_scenario2(test) + cleanup_scenario(test) -# def step_rotate_certificate_scenario1(test, checks=None): -# """nf rotate password operation""" -# if checks is None: -# checks = [] -# test.cmd( -# "az networkfabric fabric rotate-certificate --resource-name {name} --resource-group {resourceGroup}" -# ) +def step_rotate_certificate_scenario1(test, checks=None): + """nf rotate certificate operation""" + if checks is None: + checks = [] + test.cmd( + "az networkfabric fabric rotate-certificate --resource-name {name} --resource-group {resourceGroup}" + ) -# def step_rotate_certificate_scenario2(test, checks=None): -# """nf rotate password operation""" -# if checks is None: -# checks = [] -# test.cmd( -# "az networkfabric fabric rotate-certificate --network-fabric-name {name} --resource-group {resourceGroup}" -# ) +def step_rotate_certificate_scenario2(test, checks=None): + """nf rotate certificate operation""" + if checks is None: + checks = [] + test.cmd( + "az networkfabric fabric rotate-certificate --network-fabric-name {name} --resource-group {resourceGroup}" + ) -# class GA_NFRotatePasswordScenarioTest1(ScenarioTest): -# """NFScenario test""" +class GA_NFRotatePasswordScenarioTest1(ScenarioTest): + """NFScenario test""" -# def __init__(self, *args, **kwargs): -# super().__init__(*args, **kwargs) -# self.kwargs.update( -# { -# "name": CONFIG.get("NETWORK_FABRIC", "name"), -# "resourceGroup": CONFIG.get("NETWORK_FABRIC", "resource_group"), -# } -# ) + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + self.kwargs.update( + { + "name": CONFIG.get("NETWORK_FABRIC", "name"), + "resourceGroup": CONFIG.get("NETWORK_FABRIC", "resource_group"), + } + ) -# def test_GA_nf_rotate_certificate_scenario1(self): -# """test scenario for NF rotate password operations""" -# call_scenario1(self) + def test_GA_nf_rotate_certificate_scenario1(self): + """test scenario for NF rotate certificate operations""" + call_scenario1(self) diff --git a/src/managednetworkfabric/setup.py b/src/managednetworkfabric/setup.py index cf1f0f48b88..ffbe507a693 100644 --- a/src/managednetworkfabric/setup.py +++ b/src/managednetworkfabric/setup.py @@ -10,7 +10,7 @@ # HISTORY.rst entry. -VERSION = '9.0.0' +VERSION = '9.1.0' # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers