ManagedNetworkFabric - CLI Extension for 2023-06-15 API version (#6553)
* Added GA CLI extension * updated CLI version * updating linter exclusion * updated linterexclusion.yml * updated config file * updated test scenarios * Replacing subscription ID * supported InternetGatewayRules and added fltten workaround for Internetgateways * updated README.md * updated linter exclusion
This commit is contained in:
Родитель
93112cadd1
Коммит
2d6d95bf47
|
@ -2175,18 +2175,58 @@ networkfabric controller create:
|
|||
workload_er_connections:
|
||||
rule_exclusions:
|
||||
- option_length_too_long
|
||||
is_workload_management_network_enabled:
|
||||
rule_exclusions:
|
||||
- option_length_too_long
|
||||
networkfabric controller update:
|
||||
parameters:
|
||||
workload_er_connections:
|
||||
rule_exclusions:
|
||||
- option_length_too_long
|
||||
rule_exclusions:
|
||||
- missing_command_test_coverage
|
||||
networkfabric fabric update:
|
||||
rule_exclusions:
|
||||
- missing_command_test_coverage
|
||||
networkfabric rack create:
|
||||
rule_exclusions:
|
||||
- missing_command_test_coverage
|
||||
networkfabric rack delete:
|
||||
rule_exclusions:
|
||||
- missing_command_test_coverage
|
||||
networkfabric device create:
|
||||
rule_exclusions:
|
||||
- missing_command_test_coverage
|
||||
networkfabric device delete:
|
||||
rule_exclusions:
|
||||
- missing_command_test_coverage
|
||||
networkfabric interface create:
|
||||
rule_exclusions:
|
||||
- missing_command_test_coverage
|
||||
networkfabric interface delete:
|
||||
rule_exclusions:
|
||||
- missing_command_test_coverage
|
||||
networkfabric nni create:
|
||||
parameters:
|
||||
npb_static_route_configuration:
|
||||
rule_exclusions:
|
||||
- option_length_too_long
|
||||
option_b_layer3_configuration:
|
||||
rule_exclusions:
|
||||
- option_length_too_long
|
||||
networkfabric nni update:
|
||||
parameters:
|
||||
npb_static_route_configuration:
|
||||
rule_exclusions:
|
||||
- option_length_too_long
|
||||
option_b_layer3_configuration:
|
||||
rule_exclusions:
|
||||
- option_length_too_long
|
||||
rule_exclusions:
|
||||
- missing_command_test_coverage
|
||||
networkfabric l2domain update:
|
||||
rule_exclusions:
|
||||
- missing_command_test_coverage
|
||||
networkfabric l3domain create:
|
||||
parameters:
|
||||
aggregate_route_configuration:
|
||||
|
@ -2201,11 +2241,65 @@ networkfabric l3domain create:
|
|||
redistribute_static_routes:
|
||||
rule_exclusions:
|
||||
- option_length_too_long
|
||||
networkfabric l3domain update:
|
||||
parameters:
|
||||
aggregate_route_configuration:
|
||||
rule_exclusions:
|
||||
- option_length_too_long
|
||||
connected_subnet_route_policy:
|
||||
rule_exclusions:
|
||||
- option_length_too_long
|
||||
redistribute_connected_subnets:
|
||||
rule_exclusions:
|
||||
- option_length_too_long
|
||||
redistribute_static_routes:
|
||||
rule_exclusions:
|
||||
- option_length_too_long
|
||||
rule_exclusions:
|
||||
- missing_command_test_coverage
|
||||
networkfabric internalnetwork create:
|
||||
parameters:
|
||||
static_route_configuration:
|
||||
rule_exclusions:
|
||||
- option_length_too_long
|
||||
networkfabric internalnetwork update:
|
||||
parameters:
|
||||
static_route_configuration:
|
||||
rule_exclusions:
|
||||
- option_length_too_long
|
||||
rule_exclusions:
|
||||
- missing_command_test_coverage
|
||||
networkfabric internetgateway update:
|
||||
parameters:
|
||||
internet_gateway_rule_id:
|
||||
rule_exclusions:
|
||||
- option_length_too_long
|
||||
networkfabric internetgatewayrule create:
|
||||
rule_exclusions:
|
||||
- missing_command_test_coverage
|
||||
networkfabric internetgatewayrule delete:
|
||||
rule_exclusions:
|
||||
- missing_command_test_coverage
|
||||
networkfabric internetgatewayrule list:
|
||||
rule_exclusions:
|
||||
- missing_command_test_coverage
|
||||
networkfabric internetgatewayrule show:
|
||||
rule_exclusions:
|
||||
- missing_command_test_coverage
|
||||
networkfabric internetgatewayrule update:
|
||||
rule_exclusions:
|
||||
- missing_command_test_coverage
|
||||
networkfabric externalnetwork update:
|
||||
rule_exclusions:
|
||||
- missing_command_test_coverage
|
||||
networkfabric ipextendedcommunity create:
|
||||
parameters:
|
||||
ip_extended_community_rules:
|
||||
rule_exclusions:
|
||||
- option_length_too_long
|
||||
networkfabric npb show:
|
||||
rule_exclusions:
|
||||
- missing_command_test_coverage
|
||||
notification-hub authorization-rule create:
|
||||
parameters:
|
||||
notification_hub_name:
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
Release History
|
||||
===============
|
||||
|
||||
3.1.0
|
||||
++++++
|
||||
* GA Initial release.
|
||||
|
||||
1.0.0b2
|
||||
++++++
|
||||
* Updated latest swagger specification.
|
||||
|
|
|
@ -27,11 +27,14 @@ Below is a high-level overview of managednetworkfabric commands.
|
|||
| az networkfabric fabric | Manage Network Fabric Resource. |
|
||||
| az networkfabric interface | Manage Network Interface Resource. |
|
||||
| az networkfabric internalnetwork | Manage Internal Network Resource. |
|
||||
| az networkfabric internetgateway | Manage Internet Gateway Resource. |
|
||||
| az networkfabric internetgatewayrule | Manage Internet Gateway Rule Resource. |
|
||||
| az networkfabric ipcommunity | Manage Ip Community Resource. |
|
||||
| az networkfabric ipextendedcommunity | Manage Ip Extended Community Resource. |
|
||||
| az networkfabric ipprefix | Manage Ip Prefix Resource. |
|
||||
| az networkfabric l2domain | Manage L2 Isolation Domain Resource. |
|
||||
| az networkfabric l3domain | Manage L3 Isolation Domain Resource. |
|
||||
| az networkfabric nni | Manage Network To Network Interconnect Resource. |
|
||||
| az networkfabric npb | Manage Network Packet Broker Resource. |
|
||||
| az networkfabric rack | Manage Network Rack Resource. |
|
||||
| az networkfabric routepolicy | Manage Route Policy Resource. |
|
|
@ -13,4 +13,5 @@ from ._create import *
|
|||
from ._delete import *
|
||||
from ._list import *
|
||||
from ._show import *
|
||||
from ._update import *
|
||||
from ._wait import *
|
||||
|
|
|
@ -15,19 +15,19 @@ from azure.cli.core.aaz import *
|
|||
"networkfabric controller create",
|
||||
)
|
||||
class Create(AAZCommand):
|
||||
"""Create a Network Fabric Controller resource.
|
||||
"""Create a Network Fabric Controller resource
|
||||
|
||||
:example: Create a Network Fabric Controller. For RE-PUT with 'mrg' parameter, both name and location properties are required.
|
||||
az networkfabric controller create --resource-group "example-rg" --location "westus3" --resource-name "example-nfc" --ipv4-address-space "10.0.0.0/19" --infra-er-connections "[{expressRouteCircuitId:'/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/Microsoft.Network/expressRouteCircuits/example-expressRouteCircuit',expressRouteAuthorizationKey:'auth-key'},{expressRouteCircuitId:'/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/Microsoft.Network/expressRouteCircuits/example-expressRouteCircuit',expressRouteAuthorizationKey:'auth-key'}]" --workload-er-connections "[{expressRouteCircuitId:'/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/Microsoft.Network/expressRouteCircuits/example-expressRouteCircuit',expressRouteAuthorizationKey:'auth-key'},{expressRouteCircuitId:'/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/Microsoft.Network/expressRouteCircuits/example-expressRouteCircuit',expressRouteAuthorizationKey:'auth-key'}]" --mrg name=example-mrgName location=eastus
|
||||
az networkfabric controller create --resource-group "example-rg" --location "westus3" --resource-name "example-nfc" --ipv4-address-space "10.0.0.0/19" --is-workload-management-network-enabled "True" --nfc-sku "Basic" --infra-er-connections "[{expressRouteCircuitId:'/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/Microsoft.Network/expressRouteCircuits/example-expressRouteCircuit',expressRouteAuthorizationKey:'auth-key'},{expressRouteCircuitId:'/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/Microsoft.Network/expressRouteCircuits/example-expressRouteCircuit',expressRouteAuthorizationKey:'auth-key'}]" --workload-er-connections "[{expressRouteCircuitId:'/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/Microsoft.Network/expressRouteCircuits/example-expressRouteCircuit',expressRouteAuthorizationKey:'auth-key'},{expressRouteCircuitId:'/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/Microsoft.Network/expressRouteCircuits/example-expressRouteCircuit',expressRouteAuthorizationKey:'auth-key'}]" --mrg name=example-mrgName location=eastus
|
||||
|
||||
:example: Help text for sub parameters under the specific parent can be viewed by using the shorthand syntax '??'. See https://github.com/Azure/azure-cli/tree/dev/doc/shorthand_syntax.md for more about shorthand syntax.
|
||||
az networkfabric controller create --infra-er-connections ??
|
||||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-02-01-preview",
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkfabriccontrollers/{}", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkfabriccontrollers/{}", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -50,7 +50,7 @@ class Create(AAZCommand):
|
|||
_args_schema = cls._args_schema
|
||||
_args_schema.resource_name = AAZStrArg(
|
||||
options=["--resource-name"],
|
||||
help="Name of the Network Fabric Controller",
|
||||
help="Name of the Network Fabric Controller.",
|
||||
required=True,
|
||||
)
|
||||
_args_schema.resource_group = AAZResourceGroupNameArg(
|
||||
|
@ -84,7 +84,7 @@ class Create(AAZCommand):
|
|||
_args_schema.annotation = AAZStrArg(
|
||||
options=["--annotation"],
|
||||
arg_group="Properties",
|
||||
help="Switch configuration description.",
|
||||
help="Description for underlying resource.",
|
||||
)
|
||||
_args_schema.infra_er_connections = AAZListArg(
|
||||
options=["--infra-er-connections"],
|
||||
|
@ -95,17 +95,35 @@ class Create(AAZCommand):
|
|||
options=["--ipv4-address-space"],
|
||||
arg_group="Properties",
|
||||
help="IPv4 Network Fabric Controller Address Space.",
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
_args_schema.ipv6_address_space = AAZStrArg(
|
||||
options=["--ipv6-address-space"],
|
||||
arg_group="Properties",
|
||||
help="IPv6 Network Fabric Controller Address Space.",
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
_args_schema.is_workload_management_network_enabled = AAZStrArg(
|
||||
options=["--is-workload-management-network-enabled"],
|
||||
arg_group="Properties",
|
||||
help="A workload management network is required for all the tenant (workload) traffic. This traffic is only dedicated for Tenant workloads which are required to access internet or any other MSFT/Public endpoints. Default value is True.",
|
||||
enum={"False": "False", "True": "True"},
|
||||
)
|
||||
_args_schema.managed_resource_group_configuration = AAZObjectArg(
|
||||
options=["--mrg", "--managed-resource-group-configuration"],
|
||||
arg_group="Properties",
|
||||
help="Managed Resource Group configuration properties.",
|
||||
)
|
||||
_args_schema.nfc_sku = AAZStrArg(
|
||||
options=["--nfc-sku"],
|
||||
arg_group="Properties",
|
||||
help="Network Fabric Controller SKU.",
|
||||
enum={"Basic": "Basic", "HighPerformance": "HighPerformance", "Standard": "Standard"},
|
||||
)
|
||||
_args_schema.workload_er_connections = AAZListArg(
|
||||
options=["--workload-er-connections"],
|
||||
arg_group="Properties",
|
||||
|
@ -145,12 +163,12 @@ class Create(AAZCommand):
|
|||
express_route_connection_information_create = cls._args_express_route_connection_information_create
|
||||
express_route_connection_information_create.express_route_authorization_key = AAZStrArg(
|
||||
options=["express-route-authorization-key"],
|
||||
help="Authorization key for the circuit, must be of type Microsoft.Network/expressRouteCircuits/authorizations.",
|
||||
help="Authorization key for the circuit, must be of type Microsoft.Network/expressRouteCircuits/authorizations. The Auth Key is a mandatory attribute.",
|
||||
required=True,
|
||||
)
|
||||
express_route_connection_information_create.express_route_circuit_id = AAZStrArg(
|
||||
options=["express-route-circuit-id"],
|
||||
help="The name of express route circuit, must be of type Microsoft.NetworkexpressRouteCircuits/circuitName.",
|
||||
help="The express route circuit Azure resource ID, must be of type Microsoft.Network/expressRouteCircuits/circuitName. The ExpressRoute Circuit is a mandatory attribute.",
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
@ -238,7 +256,7 @@ class Create(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
@ -264,7 +282,7 @@ class Create(AAZCommand):
|
|||
typ_kwargs={"flags": {"required": True, "client_flatten": True}}
|
||||
)
|
||||
_builder.set_prop("location", AAZStrType, ".location", typ_kwargs={"flags": {"required": True}})
|
||||
_builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
|
||||
_builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={"flags": {"required": True, "client_flatten": True}})
|
||||
_builder.set_prop("tags", AAZDictType, ".tags")
|
||||
|
||||
properties = _builder.get(".properties")
|
||||
|
@ -273,7 +291,9 @@ class Create(AAZCommand):
|
|||
properties.set_prop("infrastructureExpressRouteConnections", AAZListType, ".infra_er_connections")
|
||||
properties.set_prop("ipv4AddressSpace", AAZStrType, ".ipv4_address_space")
|
||||
properties.set_prop("ipv6AddressSpace", AAZStrType, ".ipv6_address_space")
|
||||
properties.set_prop("isWorkloadManagementNetworkEnabled", AAZStrType, ".is_workload_management_network_enabled")
|
||||
properties.set_prop("managedResourceGroupConfiguration", AAZObjectType, ".managed_resource_group_configuration")
|
||||
properties.set_prop("nfcSku", AAZStrType, ".nfc_sku")
|
||||
properties.set_prop("workloadExpressRouteConnections", AAZListType, ".workload_er_connections")
|
||||
|
||||
infrastructure_express_route_connections = _builder.get(".properties.infrastructureExpressRouteConnections")
|
||||
|
@ -323,7 +343,7 @@ class Create(AAZCommand):
|
|||
flags={"read_only": True},
|
||||
)
|
||||
_schema_on_200_201.properties = AAZObjectType(
|
||||
flags={"client_flatten": True},
|
||||
flags={"required": True, "client_flatten": True},
|
||||
)
|
||||
_schema_on_200_201.system_data = AAZObjectType(
|
||||
serialized_name="systemData",
|
||||
|
@ -343,12 +363,16 @@ class Create(AAZCommand):
|
|||
serialized_name="infrastructureServices",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_CreateHelper._build_schema_controller_services_read(properties.infrastructure_services)
|
||||
properties.ipv4_address_space = AAZStrType(
|
||||
serialized_name="ipv4AddressSpace",
|
||||
)
|
||||
properties.ipv6_address_space = AAZStrType(
|
||||
serialized_name="ipv6AddressSpace",
|
||||
)
|
||||
properties.is_workload_management_network_enabled = AAZStrType(
|
||||
serialized_name="isWorkloadManagementNetworkEnabled",
|
||||
)
|
||||
properties.managed_resource_group_configuration = AAZObjectType(
|
||||
serialized_name="managedResourceGroupConfiguration",
|
||||
)
|
||||
|
@ -356,14 +380,17 @@ class Create(AAZCommand):
|
|||
serialized_name="networkFabricIds",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.operational_state = AAZStrType(
|
||||
serialized_name="operationalState",
|
||||
flags={"read_only": True},
|
||||
properties.nfc_sku = AAZStrType(
|
||||
serialized_name="nfcSku",
|
||||
)
|
||||
properties.provisioning_state = AAZStrType(
|
||||
serialized_name="provisioningState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.tenant_internet_gateway_ids = AAZListType(
|
||||
serialized_name="tenantInternetGatewayIds",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.workload_express_route_connections = AAZListType(
|
||||
serialized_name="workloadExpressRouteConnections",
|
||||
)
|
||||
|
@ -375,25 +402,12 @@ class Create(AAZCommand):
|
|||
serialized_name="workloadServices",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_CreateHelper._build_schema_controller_services_read(properties.workload_services)
|
||||
|
||||
infrastructure_express_route_connections = cls._schema_on_200_201.properties.infrastructure_express_route_connections
|
||||
infrastructure_express_route_connections.Element = AAZObjectType()
|
||||
_CreateHelper._build_schema_express_route_connection_information_read(infrastructure_express_route_connections.Element)
|
||||
|
||||
infrastructure_services = cls._schema_on_200_201.properties.infrastructure_services
|
||||
infrastructure_services.ipv4_address_spaces = AAZListType(
|
||||
serialized_name="ipv4AddressSpaces",
|
||||
)
|
||||
infrastructure_services.ipv6_address_spaces = AAZListType(
|
||||
serialized_name="ipv6AddressSpaces",
|
||||
)
|
||||
|
||||
ipv4_address_spaces = cls._schema_on_200_201.properties.infrastructure_services.ipv4_address_spaces
|
||||
ipv4_address_spaces.Element = AAZStrType()
|
||||
|
||||
ipv6_address_spaces = cls._schema_on_200_201.properties.infrastructure_services.ipv6_address_spaces
|
||||
ipv6_address_spaces.Element = AAZStrType()
|
||||
|
||||
managed_resource_group_configuration = cls._schema_on_200_201.properties.managed_resource_group_configuration
|
||||
managed_resource_group_configuration.location = AAZStrType()
|
||||
managed_resource_group_configuration.name = AAZStrType()
|
||||
|
@ -401,24 +415,13 @@ class Create(AAZCommand):
|
|||
network_fabric_ids = cls._schema_on_200_201.properties.network_fabric_ids
|
||||
network_fabric_ids.Element = AAZStrType()
|
||||
|
||||
tenant_internet_gateway_ids = cls._schema_on_200_201.properties.tenant_internet_gateway_ids
|
||||
tenant_internet_gateway_ids.Element = AAZStrType()
|
||||
|
||||
workload_express_route_connections = cls._schema_on_200_201.properties.workload_express_route_connections
|
||||
workload_express_route_connections.Element = AAZObjectType()
|
||||
_CreateHelper._build_schema_express_route_connection_information_read(workload_express_route_connections.Element)
|
||||
|
||||
workload_services = cls._schema_on_200_201.properties.workload_services
|
||||
workload_services.ipv4_address_spaces = AAZListType(
|
||||
serialized_name="ipv4AddressSpaces",
|
||||
)
|
||||
workload_services.ipv6_address_spaces = AAZListType(
|
||||
serialized_name="ipv6AddressSpaces",
|
||||
)
|
||||
|
||||
ipv4_address_spaces = cls._schema_on_200_201.properties.workload_services.ipv4_address_spaces
|
||||
ipv4_address_spaces.Element = AAZStrType()
|
||||
|
||||
ipv6_address_spaces = cls._schema_on_200_201.properties.workload_services.ipv6_address_spaces
|
||||
ipv6_address_spaces.Element = AAZStrType()
|
||||
|
||||
system_data = cls._schema_on_200_201.system_data
|
||||
system_data.created_at = AAZStrType(
|
||||
serialized_name="createdAt",
|
||||
|
@ -455,6 +458,36 @@ class _CreateHelper:
|
|||
_builder.set_prop("expressRouteAuthorizationKey", AAZStrType, ".express_route_authorization_key", typ_kwargs={"flags": {"required": True, "secret": True}})
|
||||
_builder.set_prop("expressRouteCircuitId", AAZStrType, ".express_route_circuit_id", typ_kwargs={"flags": {"required": True}})
|
||||
|
||||
_schema_controller_services_read = None
|
||||
|
||||
@classmethod
|
||||
def _build_schema_controller_services_read(cls, _schema):
|
||||
if cls._schema_controller_services_read is not None:
|
||||
_schema.ipv4_address_spaces = cls._schema_controller_services_read.ipv4_address_spaces
|
||||
_schema.ipv6_address_spaces = cls._schema_controller_services_read.ipv6_address_spaces
|
||||
return
|
||||
|
||||
cls._schema_controller_services_read = _schema_controller_services_read = AAZObjectType(
|
||||
flags={"read_only": True}
|
||||
)
|
||||
|
||||
controller_services_read = _schema_controller_services_read
|
||||
controller_services_read.ipv4_address_spaces = AAZListType(
|
||||
serialized_name="ipv4AddressSpaces",
|
||||
)
|
||||
controller_services_read.ipv6_address_spaces = AAZListType(
|
||||
serialized_name="ipv6AddressSpaces",
|
||||
)
|
||||
|
||||
ipv4_address_spaces = _schema_controller_services_read.ipv4_address_spaces
|
||||
ipv4_address_spaces.Element = AAZStrType()
|
||||
|
||||
ipv6_address_spaces = _schema_controller_services_read.ipv6_address_spaces
|
||||
ipv6_address_spaces.Element = AAZStrType()
|
||||
|
||||
_schema.ipv4_address_spaces = cls._schema_controller_services_read.ipv4_address_spaces
|
||||
_schema.ipv6_address_spaces = cls._schema_controller_services_read.ipv6_address_spaces
|
||||
|
||||
_schema_express_route_connection_information_read = None
|
||||
|
||||
@classmethod
|
||||
|
|
|
@ -15,16 +15,16 @@ from azure.cli.core.aaz import *
|
|||
"networkfabric controller delete",
|
||||
)
|
||||
class Delete(AAZCommand):
|
||||
"""Delete the Network Fabric Controller resource.
|
||||
"""Delete the Network Fabric Controller resource
|
||||
|
||||
:example: Delete the Network Fabric Controller
|
||||
az networkfabric controller delete --resource-group "example-rg" --resource-name "example-nfc"
|
||||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-02-01-preview",
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkfabriccontrollers/{}", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkfabriccontrollers/{}", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -47,7 +47,7 @@ class Delete(AAZCommand):
|
|||
_args_schema = cls._args_schema
|
||||
_args_schema.resource_name = AAZStrArg(
|
||||
options=["--resource-name"],
|
||||
help="Name of the Network Fabric Controller",
|
||||
help="Name of the Network Fabric Controller.",
|
||||
required=True,
|
||||
id_part="name",
|
||||
)
|
||||
|
@ -143,7 +143,7 @@ class Delete(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
|
|
@ -15,21 +15,20 @@ from azure.cli.core.aaz import *
|
|||
"networkfabric controller list",
|
||||
)
|
||||
class List(AAZCommand):
|
||||
"""List all Network Fabric Controllers in the provided resource group or subscription.
|
||||
"""List all Network Fabric Controllers in the provided resource group or subscription
|
||||
|
||||
:example: List the Network Fabric Controllers for Resource group
|
||||
az networkfabric controller list --resource-group "example-rg"
|
||||
az networkfabric controller list -g "example-rg"
|
||||
|
||||
:example: List the Network Fabric Controllers for Subscription.
|
||||
:example: List the Network Fabric Controllers for Subscription
|
||||
az networkfabric controller list --subscription "<subscriptionId>"
|
||||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-02-01-preview",
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/providers/microsoft.managednetworkfabric/networkfabriccontrollers", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkfabriccontrollers", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/providers/microsoft.managednetworkfabric/networkfabriccontrollers", "2023-06-15"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkfabriccontrollers", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -120,7 +119,7 @@ class List(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
@ -172,7 +171,7 @@ class List(AAZCommand):
|
|||
flags={"read_only": True},
|
||||
)
|
||||
_element.properties = AAZObjectType(
|
||||
flags={"client_flatten": True},
|
||||
flags={"required": True, "client_flatten": True},
|
||||
)
|
||||
_element.system_data = AAZObjectType(
|
||||
serialized_name="systemData",
|
||||
|
@ -192,12 +191,16 @@ class List(AAZCommand):
|
|||
serialized_name="infrastructureServices",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_ListHelper._build_schema_controller_services_read(properties.infrastructure_services)
|
||||
properties.ipv4_address_space = AAZStrType(
|
||||
serialized_name="ipv4AddressSpace",
|
||||
)
|
||||
properties.ipv6_address_space = AAZStrType(
|
||||
serialized_name="ipv6AddressSpace",
|
||||
)
|
||||
properties.is_workload_management_network_enabled = AAZStrType(
|
||||
serialized_name="isWorkloadManagementNetworkEnabled",
|
||||
)
|
||||
properties.managed_resource_group_configuration = AAZObjectType(
|
||||
serialized_name="managedResourceGroupConfiguration",
|
||||
)
|
||||
|
@ -205,14 +208,17 @@ class List(AAZCommand):
|
|||
serialized_name="networkFabricIds",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.operational_state = AAZStrType(
|
||||
serialized_name="operationalState",
|
||||
flags={"read_only": True},
|
||||
properties.nfc_sku = AAZStrType(
|
||||
serialized_name="nfcSku",
|
||||
)
|
||||
properties.provisioning_state = AAZStrType(
|
||||
serialized_name="provisioningState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.tenant_internet_gateway_ids = AAZListType(
|
||||
serialized_name="tenantInternetGatewayIds",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.workload_express_route_connections = AAZListType(
|
||||
serialized_name="workloadExpressRouteConnections",
|
||||
)
|
||||
|
@ -224,25 +230,12 @@ class List(AAZCommand):
|
|||
serialized_name="workloadServices",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_ListHelper._build_schema_controller_services_read(properties.workload_services)
|
||||
|
||||
infrastructure_express_route_connections = cls._schema_on_200.value.Element.properties.infrastructure_express_route_connections
|
||||
infrastructure_express_route_connections.Element = AAZObjectType()
|
||||
_ListHelper._build_schema_express_route_connection_information_read(infrastructure_express_route_connections.Element)
|
||||
|
||||
infrastructure_services = cls._schema_on_200.value.Element.properties.infrastructure_services
|
||||
infrastructure_services.ipv4_address_spaces = AAZListType(
|
||||
serialized_name="ipv4AddressSpaces",
|
||||
)
|
||||
infrastructure_services.ipv6_address_spaces = AAZListType(
|
||||
serialized_name="ipv6AddressSpaces",
|
||||
)
|
||||
|
||||
ipv4_address_spaces = cls._schema_on_200.value.Element.properties.infrastructure_services.ipv4_address_spaces
|
||||
ipv4_address_spaces.Element = AAZStrType()
|
||||
|
||||
ipv6_address_spaces = cls._schema_on_200.value.Element.properties.infrastructure_services.ipv6_address_spaces
|
||||
ipv6_address_spaces.Element = AAZStrType()
|
||||
|
||||
managed_resource_group_configuration = cls._schema_on_200.value.Element.properties.managed_resource_group_configuration
|
||||
managed_resource_group_configuration.location = AAZStrType()
|
||||
managed_resource_group_configuration.name = AAZStrType()
|
||||
|
@ -250,24 +243,13 @@ class List(AAZCommand):
|
|||
network_fabric_ids = cls._schema_on_200.value.Element.properties.network_fabric_ids
|
||||
network_fabric_ids.Element = AAZStrType()
|
||||
|
||||
tenant_internet_gateway_ids = cls._schema_on_200.value.Element.properties.tenant_internet_gateway_ids
|
||||
tenant_internet_gateway_ids.Element = AAZStrType()
|
||||
|
||||
workload_express_route_connections = cls._schema_on_200.value.Element.properties.workload_express_route_connections
|
||||
workload_express_route_connections.Element = AAZObjectType()
|
||||
_ListHelper._build_schema_express_route_connection_information_read(workload_express_route_connections.Element)
|
||||
|
||||
workload_services = cls._schema_on_200.value.Element.properties.workload_services
|
||||
workload_services.ipv4_address_spaces = AAZListType(
|
||||
serialized_name="ipv4AddressSpaces",
|
||||
)
|
||||
workload_services.ipv6_address_spaces = AAZListType(
|
||||
serialized_name="ipv6AddressSpaces",
|
||||
)
|
||||
|
||||
ipv4_address_spaces = cls._schema_on_200.value.Element.properties.workload_services.ipv4_address_spaces
|
||||
ipv4_address_spaces.Element = AAZStrType()
|
||||
|
||||
ipv6_address_spaces = cls._schema_on_200.value.Element.properties.workload_services.ipv6_address_spaces
|
||||
ipv6_address_spaces.Element = AAZStrType()
|
||||
|
||||
system_data = cls._schema_on_200.value.Element.system_data
|
||||
system_data.created_at = AAZStrType(
|
||||
serialized_name="createdAt",
|
||||
|
@ -333,7 +315,7 @@ class List(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
@ -385,7 +367,7 @@ class List(AAZCommand):
|
|||
flags={"read_only": True},
|
||||
)
|
||||
_element.properties = AAZObjectType(
|
||||
flags={"client_flatten": True},
|
||||
flags={"required": True, "client_flatten": True},
|
||||
)
|
||||
_element.system_data = AAZObjectType(
|
||||
serialized_name="systemData",
|
||||
|
@ -405,12 +387,16 @@ class List(AAZCommand):
|
|||
serialized_name="infrastructureServices",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_ListHelper._build_schema_controller_services_read(properties.infrastructure_services)
|
||||
properties.ipv4_address_space = AAZStrType(
|
||||
serialized_name="ipv4AddressSpace",
|
||||
)
|
||||
properties.ipv6_address_space = AAZStrType(
|
||||
serialized_name="ipv6AddressSpace",
|
||||
)
|
||||
properties.is_workload_management_network_enabled = AAZStrType(
|
||||
serialized_name="isWorkloadManagementNetworkEnabled",
|
||||
)
|
||||
properties.managed_resource_group_configuration = AAZObjectType(
|
||||
serialized_name="managedResourceGroupConfiguration",
|
||||
)
|
||||
|
@ -418,14 +404,17 @@ class List(AAZCommand):
|
|||
serialized_name="networkFabricIds",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.operational_state = AAZStrType(
|
||||
serialized_name="operationalState",
|
||||
flags={"read_only": True},
|
||||
properties.nfc_sku = AAZStrType(
|
||||
serialized_name="nfcSku",
|
||||
)
|
||||
properties.provisioning_state = AAZStrType(
|
||||
serialized_name="provisioningState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.tenant_internet_gateway_ids = AAZListType(
|
||||
serialized_name="tenantInternetGatewayIds",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.workload_express_route_connections = AAZListType(
|
||||
serialized_name="workloadExpressRouteConnections",
|
||||
)
|
||||
|
@ -437,25 +426,12 @@ class List(AAZCommand):
|
|||
serialized_name="workloadServices",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_ListHelper._build_schema_controller_services_read(properties.workload_services)
|
||||
|
||||
infrastructure_express_route_connections = cls._schema_on_200.value.Element.properties.infrastructure_express_route_connections
|
||||
infrastructure_express_route_connections.Element = AAZObjectType()
|
||||
_ListHelper._build_schema_express_route_connection_information_read(infrastructure_express_route_connections.Element)
|
||||
|
||||
infrastructure_services = cls._schema_on_200.value.Element.properties.infrastructure_services
|
||||
infrastructure_services.ipv4_address_spaces = AAZListType(
|
||||
serialized_name="ipv4AddressSpaces",
|
||||
)
|
||||
infrastructure_services.ipv6_address_spaces = AAZListType(
|
||||
serialized_name="ipv6AddressSpaces",
|
||||
)
|
||||
|
||||
ipv4_address_spaces = cls._schema_on_200.value.Element.properties.infrastructure_services.ipv4_address_spaces
|
||||
ipv4_address_spaces.Element = AAZStrType()
|
||||
|
||||
ipv6_address_spaces = cls._schema_on_200.value.Element.properties.infrastructure_services.ipv6_address_spaces
|
||||
ipv6_address_spaces.Element = AAZStrType()
|
||||
|
||||
managed_resource_group_configuration = cls._schema_on_200.value.Element.properties.managed_resource_group_configuration
|
||||
managed_resource_group_configuration.location = AAZStrType()
|
||||
managed_resource_group_configuration.name = AAZStrType()
|
||||
|
@ -463,24 +439,13 @@ class List(AAZCommand):
|
|||
network_fabric_ids = cls._schema_on_200.value.Element.properties.network_fabric_ids
|
||||
network_fabric_ids.Element = AAZStrType()
|
||||
|
||||
tenant_internet_gateway_ids = cls._schema_on_200.value.Element.properties.tenant_internet_gateway_ids
|
||||
tenant_internet_gateway_ids.Element = AAZStrType()
|
||||
|
||||
workload_express_route_connections = cls._schema_on_200.value.Element.properties.workload_express_route_connections
|
||||
workload_express_route_connections.Element = AAZObjectType()
|
||||
_ListHelper._build_schema_express_route_connection_information_read(workload_express_route_connections.Element)
|
||||
|
||||
workload_services = cls._schema_on_200.value.Element.properties.workload_services
|
||||
workload_services.ipv4_address_spaces = AAZListType(
|
||||
serialized_name="ipv4AddressSpaces",
|
||||
)
|
||||
workload_services.ipv6_address_spaces = AAZListType(
|
||||
serialized_name="ipv6AddressSpaces",
|
||||
)
|
||||
|
||||
ipv4_address_spaces = cls._schema_on_200.value.Element.properties.workload_services.ipv4_address_spaces
|
||||
ipv4_address_spaces.Element = AAZStrType()
|
||||
|
||||
ipv6_address_spaces = cls._schema_on_200.value.Element.properties.workload_services.ipv6_address_spaces
|
||||
ipv6_address_spaces.Element = AAZStrType()
|
||||
|
||||
system_data = cls._schema_on_200.value.Element.system_data
|
||||
system_data.created_at = AAZStrType(
|
||||
serialized_name="createdAt",
|
||||
|
@ -510,6 +475,36 @@ class List(AAZCommand):
|
|||
class _ListHelper:
|
||||
"""Helper class for List"""
|
||||
|
||||
_schema_controller_services_read = None
|
||||
|
||||
@classmethod
|
||||
def _build_schema_controller_services_read(cls, _schema):
|
||||
if cls._schema_controller_services_read is not None:
|
||||
_schema.ipv4_address_spaces = cls._schema_controller_services_read.ipv4_address_spaces
|
||||
_schema.ipv6_address_spaces = cls._schema_controller_services_read.ipv6_address_spaces
|
||||
return
|
||||
|
||||
cls._schema_controller_services_read = _schema_controller_services_read = AAZObjectType(
|
||||
flags={"read_only": True}
|
||||
)
|
||||
|
||||
controller_services_read = _schema_controller_services_read
|
||||
controller_services_read.ipv4_address_spaces = AAZListType(
|
||||
serialized_name="ipv4AddressSpaces",
|
||||
)
|
||||
controller_services_read.ipv6_address_spaces = AAZListType(
|
||||
serialized_name="ipv6AddressSpaces",
|
||||
)
|
||||
|
||||
ipv4_address_spaces = _schema_controller_services_read.ipv4_address_spaces
|
||||
ipv4_address_spaces.Element = AAZStrType()
|
||||
|
||||
ipv6_address_spaces = _schema_controller_services_read.ipv6_address_spaces
|
||||
ipv6_address_spaces.Element = AAZStrType()
|
||||
|
||||
_schema.ipv4_address_spaces = cls._schema_controller_services_read.ipv4_address_spaces
|
||||
_schema.ipv6_address_spaces = cls._schema_controller_services_read.ipv6_address_spaces
|
||||
|
||||
_schema_express_route_connection_information_read = None
|
||||
|
||||
@classmethod
|
||||
|
|
|
@ -15,16 +15,16 @@ from azure.cli.core.aaz import *
|
|||
"networkfabric controller show",
|
||||
)
|
||||
class Show(AAZCommand):
|
||||
"""Show details of the provided Network Fabric Controller resource.
|
||||
"""Show details of the provided Network Fabric Controller resource
|
||||
|
||||
:example: Show the Network Fabric Controller
|
||||
az networkfabric controller show --resource-group "example-rg" --resource-name "example-nfc"
|
||||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-02-01-preview",
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkfabriccontrollers/{}", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkfabriccontrollers/{}", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -46,7 +46,7 @@ class Show(AAZCommand):
|
|||
_args_schema = cls._args_schema
|
||||
_args_schema.resource_name = AAZStrArg(
|
||||
options=["--resource-name"],
|
||||
help="Name of the Network Fabric Controller",
|
||||
help="Name of the Network Fabric Controller.",
|
||||
required=True,
|
||||
id_part="name",
|
||||
)
|
||||
|
@ -121,7 +121,7 @@ class Show(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
@ -164,7 +164,7 @@ class Show(AAZCommand):
|
|||
flags={"read_only": True},
|
||||
)
|
||||
_schema_on_200.properties = AAZObjectType(
|
||||
flags={"client_flatten": True},
|
||||
flags={"required": True, "client_flatten": True},
|
||||
)
|
||||
_schema_on_200.system_data = AAZObjectType(
|
||||
serialized_name="systemData",
|
||||
|
@ -184,12 +184,16 @@ class Show(AAZCommand):
|
|||
serialized_name="infrastructureServices",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_ShowHelper._build_schema_controller_services_read(properties.infrastructure_services)
|
||||
properties.ipv4_address_space = AAZStrType(
|
||||
serialized_name="ipv4AddressSpace",
|
||||
)
|
||||
properties.ipv6_address_space = AAZStrType(
|
||||
serialized_name="ipv6AddressSpace",
|
||||
)
|
||||
properties.is_workload_management_network_enabled = AAZStrType(
|
||||
serialized_name="isWorkloadManagementNetworkEnabled",
|
||||
)
|
||||
properties.managed_resource_group_configuration = AAZObjectType(
|
||||
serialized_name="managedResourceGroupConfiguration",
|
||||
)
|
||||
|
@ -197,14 +201,17 @@ class Show(AAZCommand):
|
|||
serialized_name="networkFabricIds",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.operational_state = AAZStrType(
|
||||
serialized_name="operationalState",
|
||||
flags={"read_only": True},
|
||||
properties.nfc_sku = AAZStrType(
|
||||
serialized_name="nfcSku",
|
||||
)
|
||||
properties.provisioning_state = AAZStrType(
|
||||
serialized_name="provisioningState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.tenant_internet_gateway_ids = AAZListType(
|
||||
serialized_name="tenantInternetGatewayIds",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.workload_express_route_connections = AAZListType(
|
||||
serialized_name="workloadExpressRouteConnections",
|
||||
)
|
||||
|
@ -216,25 +223,12 @@ class Show(AAZCommand):
|
|||
serialized_name="workloadServices",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_ShowHelper._build_schema_controller_services_read(properties.workload_services)
|
||||
|
||||
infrastructure_express_route_connections = cls._schema_on_200.properties.infrastructure_express_route_connections
|
||||
infrastructure_express_route_connections.Element = AAZObjectType()
|
||||
_ShowHelper._build_schema_express_route_connection_information_read(infrastructure_express_route_connections.Element)
|
||||
|
||||
infrastructure_services = cls._schema_on_200.properties.infrastructure_services
|
||||
infrastructure_services.ipv4_address_spaces = AAZListType(
|
||||
serialized_name="ipv4AddressSpaces",
|
||||
)
|
||||
infrastructure_services.ipv6_address_spaces = AAZListType(
|
||||
serialized_name="ipv6AddressSpaces",
|
||||
)
|
||||
|
||||
ipv4_address_spaces = cls._schema_on_200.properties.infrastructure_services.ipv4_address_spaces
|
||||
ipv4_address_spaces.Element = AAZStrType()
|
||||
|
||||
ipv6_address_spaces = cls._schema_on_200.properties.infrastructure_services.ipv6_address_spaces
|
||||
ipv6_address_spaces.Element = AAZStrType()
|
||||
|
||||
managed_resource_group_configuration = cls._schema_on_200.properties.managed_resource_group_configuration
|
||||
managed_resource_group_configuration.location = AAZStrType()
|
||||
managed_resource_group_configuration.name = AAZStrType()
|
||||
|
@ -242,24 +236,13 @@ class Show(AAZCommand):
|
|||
network_fabric_ids = cls._schema_on_200.properties.network_fabric_ids
|
||||
network_fabric_ids.Element = AAZStrType()
|
||||
|
||||
tenant_internet_gateway_ids = cls._schema_on_200.properties.tenant_internet_gateway_ids
|
||||
tenant_internet_gateway_ids.Element = AAZStrType()
|
||||
|
||||
workload_express_route_connections = cls._schema_on_200.properties.workload_express_route_connections
|
||||
workload_express_route_connections.Element = AAZObjectType()
|
||||
_ShowHelper._build_schema_express_route_connection_information_read(workload_express_route_connections.Element)
|
||||
|
||||
workload_services = cls._schema_on_200.properties.workload_services
|
||||
workload_services.ipv4_address_spaces = AAZListType(
|
||||
serialized_name="ipv4AddressSpaces",
|
||||
)
|
||||
workload_services.ipv6_address_spaces = AAZListType(
|
||||
serialized_name="ipv6AddressSpaces",
|
||||
)
|
||||
|
||||
ipv4_address_spaces = cls._schema_on_200.properties.workload_services.ipv4_address_spaces
|
||||
ipv4_address_spaces.Element = AAZStrType()
|
||||
|
||||
ipv6_address_spaces = cls._schema_on_200.properties.workload_services.ipv6_address_spaces
|
||||
ipv6_address_spaces.Element = AAZStrType()
|
||||
|
||||
system_data = cls._schema_on_200.system_data
|
||||
system_data.created_at = AAZStrType(
|
||||
serialized_name="createdAt",
|
||||
|
@ -289,6 +272,36 @@ class Show(AAZCommand):
|
|||
class _ShowHelper:
|
||||
"""Helper class for Show"""
|
||||
|
||||
_schema_controller_services_read = None
|
||||
|
||||
@classmethod
|
||||
def _build_schema_controller_services_read(cls, _schema):
|
||||
if cls._schema_controller_services_read is not None:
|
||||
_schema.ipv4_address_spaces = cls._schema_controller_services_read.ipv4_address_spaces
|
||||
_schema.ipv6_address_spaces = cls._schema_controller_services_read.ipv6_address_spaces
|
||||
return
|
||||
|
||||
cls._schema_controller_services_read = _schema_controller_services_read = AAZObjectType(
|
||||
flags={"read_only": True}
|
||||
)
|
||||
|
||||
controller_services_read = _schema_controller_services_read
|
||||
controller_services_read.ipv4_address_spaces = AAZListType(
|
||||
serialized_name="ipv4AddressSpaces",
|
||||
)
|
||||
controller_services_read.ipv6_address_spaces = AAZListType(
|
||||
serialized_name="ipv6AddressSpaces",
|
||||
)
|
||||
|
||||
ipv4_address_spaces = _schema_controller_services_read.ipv4_address_spaces
|
||||
ipv4_address_spaces.Element = AAZStrType()
|
||||
|
||||
ipv6_address_spaces = _schema_controller_services_read.ipv6_address_spaces
|
||||
ipv6_address_spaces.Element = AAZStrType()
|
||||
|
||||
_schema.ipv4_address_spaces = cls._schema_controller_services_read.ipv4_address_spaces
|
||||
_schema.ipv6_address_spaces = cls._schema_controller_services_read.ipv6_address_spaces
|
||||
|
||||
_schema_express_route_connection_information_read = None
|
||||
|
||||
@classmethod
|
||||
|
|
|
@ -0,0 +1,449 @@
|
|||
# --------------------------------------------------------------------------------------------
|
||||
# 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 controller update",
|
||||
)
|
||||
class Update(AAZCommand):
|
||||
"""Update the Network Fabric Controller resource
|
||||
|
||||
:example: Update the Network Fabric Controller
|
||||
az networkfabric controller update --resource-group "example-rg" --resource-name "example-nfc" --infra-er-connections "[{expressRouteCircuitId:'/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/Microsoft.Network/expressRouteCircuits/example-expressRouteCircuit',expressRouteAuthorizationKey:'auth-key'}]" --workload-er-connections "[{expressRouteCircuitId:'/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/Microsoft.Network/expressRouteCircuits/example-expressRouteCircuit',expressRouteAuthorizationKey:'auth-key'}]"
|
||||
|
||||
:example: Help text for sub parameters under the specific parent can be viewed by using the shorthand syntax '??'. See https://github.com/Azure/azure-cli/tree/dev/doc/shorthand_syntax.md for more about shorthand syntax.
|
||||
az networkfabric controller update --infra-er-connections ??
|
||||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkfabriccontrollers/{}", "2023-06-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 Fabric Controller.",
|
||||
required=True,
|
||||
id_part="name",
|
||||
)
|
||||
_args_schema.resource_group = AAZResourceGroupNameArg(
|
||||
help="Name of the resource group",
|
||||
required=True,
|
||||
)
|
||||
|
||||
# define Arg Group "Body"
|
||||
|
||||
_args_schema = cls._args_schema
|
||||
_args_schema.tags = AAZDictArg(
|
||||
options=["--tags"],
|
||||
arg_group="Body",
|
||||
help="Resource tags",
|
||||
)
|
||||
|
||||
tags = cls._args_schema.tags
|
||||
tags.Element = AAZStrArg()
|
||||
|
||||
# define Arg Group "Properties"
|
||||
|
||||
_args_schema = cls._args_schema
|
||||
_args_schema.infra_er_connections = AAZListArg(
|
||||
options=["--infra-er-connections"],
|
||||
arg_group="Properties",
|
||||
help="Infra ER connections to manage infra resources.",
|
||||
)
|
||||
_args_schema.workload_er_connections = AAZListArg(
|
||||
options=["--workload-er-connections"],
|
||||
arg_group="Properties",
|
||||
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).",
|
||||
)
|
||||
|
||||
infra_er_connections = cls._args_schema.infra_er_connections
|
||||
infra_er_connections.Element = AAZObjectArg()
|
||||
cls._build_args_express_route_connection_information_update(infra_er_connections.Element)
|
||||
|
||||
workload_er_connections = cls._args_schema.workload_er_connections
|
||||
workload_er_connections.Element = AAZObjectArg()
|
||||
cls._build_args_express_route_connection_information_update(workload_er_connections.Element)
|
||||
return cls._args_schema
|
||||
|
||||
_args_express_route_connection_information_update = None
|
||||
|
||||
@classmethod
|
||||
def _build_args_express_route_connection_information_update(cls, _schema):
|
||||
if cls._args_express_route_connection_information_update is not None:
|
||||
_schema.express_route_authorization_key = cls._args_express_route_connection_information_update.express_route_authorization_key
|
||||
_schema.express_route_circuit_id = cls._args_express_route_connection_information_update.express_route_circuit_id
|
||||
return
|
||||
|
||||
cls._args_express_route_connection_information_update = AAZObjectArg()
|
||||
|
||||
express_route_connection_information_update = cls._args_express_route_connection_information_update
|
||||
express_route_connection_information_update.express_route_authorization_key = AAZStrArg(
|
||||
options=["express-route-authorization-key"],
|
||||
help="Authorization key for the circuit, must be of type Microsoft.Network/expressRouteCircuits/authorizations. The Auth Key is a mandatory attribute.",
|
||||
required=True,
|
||||
)
|
||||
express_route_connection_information_update.express_route_circuit_id = AAZStrArg(
|
||||
options=["express-route-circuit-id"],
|
||||
help="The express route circuit Azure resource ID, must be of type Microsoft.Network/expressRouteCircuits/circuitName. The ExpressRoute Circuit is a mandatory attribute.",
|
||||
required=True,
|
||||
)
|
||||
|
||||
_schema.express_route_authorization_key = cls._args_express_route_connection_information_update.express_route_authorization_key
|
||||
_schema.express_route_circuit_id = cls._args_express_route_connection_information_update.express_route_circuit_id
|
||||
|
||||
def _execute_operations(self):
|
||||
self.pre_operations()
|
||||
yield self.NetworkFabricControllersUpdate(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 NetworkFabricControllersUpdate(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/networkFabricControllers/{networkFabricControllerName}",
|
||||
**self.url_parameters
|
||||
)
|
||||
|
||||
@property
|
||||
def method(self):
|
||||
return "PATCH"
|
||||
|
||||
@property
|
||||
def error_format(self):
|
||||
return "MgmtErrorFormat"
|
||||
|
||||
@property
|
||||
def url_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_url_param(
|
||||
"networkFabricControllerName", self.ctx.args.resource_name,
|
||||
required=True,
|
||||
),
|
||||
**self.serialize_url_param(
|
||||
"resourceGroupName", self.ctx.args.resource_group,
|
||||
required=True,
|
||||
),
|
||||
**self.serialize_url_param(
|
||||
"subscriptionId", self.ctx.subscription_id,
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
return parameters
|
||||
|
||||
@property
|
||||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
return parameters
|
||||
|
||||
@property
|
||||
def header_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_header_param(
|
||||
"Content-Type", "application/json",
|
||||
),
|
||||
**self.serialize_header_param(
|
||||
"Accept", "application/json",
|
||||
),
|
||||
}
|
||||
return parameters
|
||||
|
||||
@property
|
||||
def content(self):
|
||||
_content_value, _builder = self.new_content_builder(
|
||||
self.ctx.args,
|
||||
typ=AAZObjectType,
|
||||
typ_kwargs={"flags": {"required": True, "client_flatten": True}}
|
||||
)
|
||||
_builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
|
||||
_builder.set_prop("tags", AAZDictType, ".tags")
|
||||
|
||||
properties = _builder.get(".properties")
|
||||
if properties is not None:
|
||||
properties.set_prop("infrastructureExpressRouteConnections", AAZListType, ".infra_er_connections")
|
||||
properties.set_prop("workloadExpressRouteConnections", AAZListType, ".workload_er_connections")
|
||||
|
||||
infrastructure_express_route_connections = _builder.get(".properties.infrastructureExpressRouteConnections")
|
||||
if infrastructure_express_route_connections is not None:
|
||||
_UpdateHelper._build_schema_express_route_connection_information_update(infrastructure_express_route_connections.set_elements(AAZObjectType, "."))
|
||||
|
||||
workload_express_route_connections = _builder.get(".properties.workloadExpressRouteConnections")
|
||||
if workload_express_route_connections is not None:
|
||||
_UpdateHelper._build_schema_express_route_connection_information_update(workload_express_route_connections.set_elements(AAZObjectType, "."))
|
||||
|
||||
tags = _builder.get(".tags")
|
||||
if tags is not None:
|
||||
tags.set_elements(AAZStrType, ".")
|
||||
|
||||
return self.serialize_content(_content_value)
|
||||
|
||||
def on_200(self, session):
|
||||
data = self.deserialize_http_content(session)
|
||||
self.ctx.set_var(
|
||||
"instance",
|
||||
data,
|
||||
schema_builder=self._build_schema_on_200
|
||||
)
|
||||
|
||||
_schema_on_200 = None
|
||||
|
||||
@classmethod
|
||||
def _build_schema_on_200(cls):
|
||||
if cls._schema_on_200 is not None:
|
||||
return cls._schema_on_200
|
||||
|
||||
cls._schema_on_200 = AAZObjectType()
|
||||
|
||||
_schema_on_200 = cls._schema_on_200
|
||||
_schema_on_200.id = AAZStrType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_schema_on_200.location = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
_schema_on_200.name = AAZStrType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_schema_on_200.properties = AAZObjectType(
|
||||
flags={"required": True, "client_flatten": True},
|
||||
)
|
||||
_schema_on_200.system_data = AAZObjectType(
|
||||
serialized_name="systemData",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_schema_on_200.tags = AAZDictType()
|
||||
_schema_on_200.type = AAZStrType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
|
||||
properties = cls._schema_on_200.properties
|
||||
properties.annotation = AAZStrType()
|
||||
properties.infrastructure_express_route_connections = AAZListType(
|
||||
serialized_name="infrastructureExpressRouteConnections",
|
||||
)
|
||||
properties.infrastructure_services = AAZObjectType(
|
||||
serialized_name="infrastructureServices",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_UpdateHelper._build_schema_controller_services_read(properties.infrastructure_services)
|
||||
properties.ipv4_address_space = AAZStrType(
|
||||
serialized_name="ipv4AddressSpace",
|
||||
)
|
||||
properties.ipv6_address_space = AAZStrType(
|
||||
serialized_name="ipv6AddressSpace",
|
||||
)
|
||||
properties.is_workload_management_network_enabled = AAZStrType(
|
||||
serialized_name="isWorkloadManagementNetworkEnabled",
|
||||
)
|
||||
properties.managed_resource_group_configuration = AAZObjectType(
|
||||
serialized_name="managedResourceGroupConfiguration",
|
||||
)
|
||||
properties.network_fabric_ids = AAZListType(
|
||||
serialized_name="networkFabricIds",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.nfc_sku = AAZStrType(
|
||||
serialized_name="nfcSku",
|
||||
)
|
||||
properties.provisioning_state = AAZStrType(
|
||||
serialized_name="provisioningState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.tenant_internet_gateway_ids = AAZListType(
|
||||
serialized_name="tenantInternetGatewayIds",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.workload_express_route_connections = AAZListType(
|
||||
serialized_name="workloadExpressRouteConnections",
|
||||
)
|
||||
properties.workload_management_network = AAZBoolType(
|
||||
serialized_name="workloadManagementNetwork",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.workload_services = AAZObjectType(
|
||||
serialized_name="workloadServices",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_UpdateHelper._build_schema_controller_services_read(properties.workload_services)
|
||||
|
||||
infrastructure_express_route_connections = cls._schema_on_200.properties.infrastructure_express_route_connections
|
||||
infrastructure_express_route_connections.Element = AAZObjectType()
|
||||
_UpdateHelper._build_schema_express_route_connection_information_read(infrastructure_express_route_connections.Element)
|
||||
|
||||
managed_resource_group_configuration = cls._schema_on_200.properties.managed_resource_group_configuration
|
||||
managed_resource_group_configuration.location = AAZStrType()
|
||||
managed_resource_group_configuration.name = AAZStrType()
|
||||
|
||||
network_fabric_ids = cls._schema_on_200.properties.network_fabric_ids
|
||||
network_fabric_ids.Element = AAZStrType()
|
||||
|
||||
tenant_internet_gateway_ids = cls._schema_on_200.properties.tenant_internet_gateway_ids
|
||||
tenant_internet_gateway_ids.Element = AAZStrType()
|
||||
|
||||
workload_express_route_connections = cls._schema_on_200.properties.workload_express_route_connections
|
||||
workload_express_route_connections.Element = AAZObjectType()
|
||||
_UpdateHelper._build_schema_express_route_connection_information_read(workload_express_route_connections.Element)
|
||||
|
||||
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 _UpdateHelper:
|
||||
"""Helper class for Update"""
|
||||
|
||||
@classmethod
|
||||
def _build_schema_express_route_connection_information_update(cls, _builder):
|
||||
if _builder is None:
|
||||
return
|
||||
_builder.set_prop("expressRouteAuthorizationKey", AAZStrType, ".express_route_authorization_key", typ_kwargs={"flags": {"required": True, "secret": True}})
|
||||
_builder.set_prop("expressRouteCircuitId", AAZStrType, ".express_route_circuit_id", typ_kwargs={"flags": {"required": True}})
|
||||
|
||||
_schema_controller_services_read = None
|
||||
|
||||
@classmethod
|
||||
def _build_schema_controller_services_read(cls, _schema):
|
||||
if cls._schema_controller_services_read is not None:
|
||||
_schema.ipv4_address_spaces = cls._schema_controller_services_read.ipv4_address_spaces
|
||||
_schema.ipv6_address_spaces = cls._schema_controller_services_read.ipv6_address_spaces
|
||||
return
|
||||
|
||||
cls._schema_controller_services_read = _schema_controller_services_read = AAZObjectType(
|
||||
flags={"read_only": True}
|
||||
)
|
||||
|
||||
controller_services_read = _schema_controller_services_read
|
||||
controller_services_read.ipv4_address_spaces = AAZListType(
|
||||
serialized_name="ipv4AddressSpaces",
|
||||
)
|
||||
controller_services_read.ipv6_address_spaces = AAZListType(
|
||||
serialized_name="ipv6AddressSpaces",
|
||||
)
|
||||
|
||||
ipv4_address_spaces = _schema_controller_services_read.ipv4_address_spaces
|
||||
ipv4_address_spaces.Element = AAZStrType()
|
||||
|
||||
ipv6_address_spaces = _schema_controller_services_read.ipv6_address_spaces
|
||||
ipv6_address_spaces.Element = AAZStrType()
|
||||
|
||||
_schema.ipv4_address_spaces = cls._schema_controller_services_read.ipv4_address_spaces
|
||||
_schema.ipv6_address_spaces = cls._schema_controller_services_read.ipv6_address_spaces
|
||||
|
||||
_schema_express_route_connection_information_read = None
|
||||
|
||||
@classmethod
|
||||
def _build_schema_express_route_connection_information_read(cls, _schema):
|
||||
if cls._schema_express_route_connection_information_read is not None:
|
||||
_schema.express_route_authorization_key = cls._schema_express_route_connection_information_read.express_route_authorization_key
|
||||
_schema.express_route_circuit_id = cls._schema_express_route_connection_information_read.express_route_circuit_id
|
||||
return
|
||||
|
||||
cls._schema_express_route_connection_information_read = _schema_express_route_connection_information_read = AAZObjectType()
|
||||
|
||||
express_route_connection_information_read = _schema_express_route_connection_information_read
|
||||
express_route_connection_information_read.express_route_authorization_key = AAZStrType(
|
||||
serialized_name="expressRouteAuthorizationKey",
|
||||
flags={"required": True, "secret": True},
|
||||
)
|
||||
express_route_connection_information_read.express_route_circuit_id = AAZStrType(
|
||||
serialized_name="expressRouteCircuitId",
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
_schema.express_route_authorization_key = cls._schema_express_route_connection_information_read.express_route_authorization_key
|
||||
_schema.express_route_circuit_id = cls._schema_express_route_connection_information_read.express_route_circuit_id
|
||||
|
||||
|
||||
__all__ = ["Update"]
|
|
@ -20,7 +20,7 @@ class Wait(AAZWaitCommand):
|
|||
|
||||
_aaz_info = {
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkfabriccontrollers/{}", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkfabriccontrollers/{}", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@ class Wait(AAZWaitCommand):
|
|||
_args_schema = cls._args_schema
|
||||
_args_schema.resource_name = AAZStrArg(
|
||||
options=["--resource-name"],
|
||||
help="Name of the Network Fabric Controller",
|
||||
help="Name of the Network Fabric Controller.",
|
||||
required=True,
|
||||
id_part="name",
|
||||
)
|
||||
|
@ -117,7 +117,7 @@ class Wait(AAZWaitCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
@ -160,7 +160,7 @@ class Wait(AAZWaitCommand):
|
|||
flags={"read_only": True},
|
||||
)
|
||||
_schema_on_200.properties = AAZObjectType(
|
||||
flags={"client_flatten": True},
|
||||
flags={"required": True, "client_flatten": True},
|
||||
)
|
||||
_schema_on_200.system_data = AAZObjectType(
|
||||
serialized_name="systemData",
|
||||
|
@ -180,12 +180,16 @@ class Wait(AAZWaitCommand):
|
|||
serialized_name="infrastructureServices",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_WaitHelper._build_schema_controller_services_read(properties.infrastructure_services)
|
||||
properties.ipv4_address_space = AAZStrType(
|
||||
serialized_name="ipv4AddressSpace",
|
||||
)
|
||||
properties.ipv6_address_space = AAZStrType(
|
||||
serialized_name="ipv6AddressSpace",
|
||||
)
|
||||
properties.is_workload_management_network_enabled = AAZStrType(
|
||||
serialized_name="isWorkloadManagementNetworkEnabled",
|
||||
)
|
||||
properties.managed_resource_group_configuration = AAZObjectType(
|
||||
serialized_name="managedResourceGroupConfiguration",
|
||||
)
|
||||
|
@ -193,14 +197,17 @@ class Wait(AAZWaitCommand):
|
|||
serialized_name="networkFabricIds",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.operational_state = AAZStrType(
|
||||
serialized_name="operationalState",
|
||||
flags={"read_only": True},
|
||||
properties.nfc_sku = AAZStrType(
|
||||
serialized_name="nfcSku",
|
||||
)
|
||||
properties.provisioning_state = AAZStrType(
|
||||
serialized_name="provisioningState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.tenant_internet_gateway_ids = AAZListType(
|
||||
serialized_name="tenantInternetGatewayIds",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.workload_express_route_connections = AAZListType(
|
||||
serialized_name="workloadExpressRouteConnections",
|
||||
)
|
||||
|
@ -212,25 +219,12 @@ class Wait(AAZWaitCommand):
|
|||
serialized_name="workloadServices",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_WaitHelper._build_schema_controller_services_read(properties.workload_services)
|
||||
|
||||
infrastructure_express_route_connections = cls._schema_on_200.properties.infrastructure_express_route_connections
|
||||
infrastructure_express_route_connections.Element = AAZObjectType()
|
||||
_WaitHelper._build_schema_express_route_connection_information_read(infrastructure_express_route_connections.Element)
|
||||
|
||||
infrastructure_services = cls._schema_on_200.properties.infrastructure_services
|
||||
infrastructure_services.ipv4_address_spaces = AAZListType(
|
||||
serialized_name="ipv4AddressSpaces",
|
||||
)
|
||||
infrastructure_services.ipv6_address_spaces = AAZListType(
|
||||
serialized_name="ipv6AddressSpaces",
|
||||
)
|
||||
|
||||
ipv4_address_spaces = cls._schema_on_200.properties.infrastructure_services.ipv4_address_spaces
|
||||
ipv4_address_spaces.Element = AAZStrType()
|
||||
|
||||
ipv6_address_spaces = cls._schema_on_200.properties.infrastructure_services.ipv6_address_spaces
|
||||
ipv6_address_spaces.Element = AAZStrType()
|
||||
|
||||
managed_resource_group_configuration = cls._schema_on_200.properties.managed_resource_group_configuration
|
||||
managed_resource_group_configuration.location = AAZStrType()
|
||||
managed_resource_group_configuration.name = AAZStrType()
|
||||
|
@ -238,24 +232,13 @@ class Wait(AAZWaitCommand):
|
|||
network_fabric_ids = cls._schema_on_200.properties.network_fabric_ids
|
||||
network_fabric_ids.Element = AAZStrType()
|
||||
|
||||
tenant_internet_gateway_ids = cls._schema_on_200.properties.tenant_internet_gateway_ids
|
||||
tenant_internet_gateway_ids.Element = AAZStrType()
|
||||
|
||||
workload_express_route_connections = cls._schema_on_200.properties.workload_express_route_connections
|
||||
workload_express_route_connections.Element = AAZObjectType()
|
||||
_WaitHelper._build_schema_express_route_connection_information_read(workload_express_route_connections.Element)
|
||||
|
||||
workload_services = cls._schema_on_200.properties.workload_services
|
||||
workload_services.ipv4_address_spaces = AAZListType(
|
||||
serialized_name="ipv4AddressSpaces",
|
||||
)
|
||||
workload_services.ipv6_address_spaces = AAZListType(
|
||||
serialized_name="ipv6AddressSpaces",
|
||||
)
|
||||
|
||||
ipv4_address_spaces = cls._schema_on_200.properties.workload_services.ipv4_address_spaces
|
||||
ipv4_address_spaces.Element = AAZStrType()
|
||||
|
||||
ipv6_address_spaces = cls._schema_on_200.properties.workload_services.ipv6_address_spaces
|
||||
ipv6_address_spaces.Element = AAZStrType()
|
||||
|
||||
system_data = cls._schema_on_200.system_data
|
||||
system_data.created_at = AAZStrType(
|
||||
serialized_name="createdAt",
|
||||
|
@ -285,6 +268,36 @@ class Wait(AAZWaitCommand):
|
|||
class _WaitHelper:
|
||||
"""Helper class for Wait"""
|
||||
|
||||
_schema_controller_services_read = None
|
||||
|
||||
@classmethod
|
||||
def _build_schema_controller_services_read(cls, _schema):
|
||||
if cls._schema_controller_services_read is not None:
|
||||
_schema.ipv4_address_spaces = cls._schema_controller_services_read.ipv4_address_spaces
|
||||
_schema.ipv6_address_spaces = cls._schema_controller_services_read.ipv6_address_spaces
|
||||
return
|
||||
|
||||
cls._schema_controller_services_read = _schema_controller_services_read = AAZObjectType(
|
||||
flags={"read_only": True}
|
||||
)
|
||||
|
||||
controller_services_read = _schema_controller_services_read
|
||||
controller_services_read.ipv4_address_spaces = AAZListType(
|
||||
serialized_name="ipv4AddressSpaces",
|
||||
)
|
||||
controller_services_read.ipv6_address_spaces = AAZListType(
|
||||
serialized_name="ipv6AddressSpaces",
|
||||
)
|
||||
|
||||
ipv4_address_spaces = _schema_controller_services_read.ipv4_address_spaces
|
||||
ipv4_address_spaces.Element = AAZStrType()
|
||||
|
||||
ipv6_address_spaces = _schema_controller_services_read.ipv6_address_spaces
|
||||
ipv6_address_spaces.Element = AAZStrType()
|
||||
|
||||
_schema.ipv4_address_spaces = cls._schema_controller_services_read.ipv4_address_spaces
|
||||
_schema.ipv6_address_spaces = cls._schema_controller_services_read.ipv6_address_spaces
|
||||
|
||||
_schema_express_route_connection_information_read = None
|
||||
|
||||
@classmethod
|
||||
|
|
|
@ -15,7 +15,7 @@ from azure.cli.core.aaz import *
|
|||
"networkfabric device list",
|
||||
)
|
||||
class List(AAZCommand):
|
||||
"""List all Network Devices in the provided resource group or subscription.
|
||||
"""List all Network Devices in the provided resource group or subscription
|
||||
|
||||
:example: List the Network Devices for Resource Group
|
||||
az networkfabric device list --resource-group "example-rg"
|
||||
|
@ -25,10 +25,10 @@ class List(AAZCommand):
|
|||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-02-01-preview",
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/providers/microsoft.managednetworkfabric/networkdevices", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkdevices", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/providers/microsoft.managednetworkfabric/networkdevices", "2023-06-15"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkdevices", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -119,7 +119,7 @@ class List(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
@ -171,7 +171,7 @@ class List(AAZCommand):
|
|||
flags={"read_only": True},
|
||||
)
|
||||
_element.properties = AAZObjectType(
|
||||
flags={"client_flatten": True},
|
||||
flags={"required": True, "client_flatten": True},
|
||||
)
|
||||
_element.system_data = AAZObjectType(
|
||||
serialized_name="systemData",
|
||||
|
@ -183,17 +183,32 @@ class List(AAZCommand):
|
|||
)
|
||||
|
||||
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.host_name = AAZStrType(
|
||||
serialized_name="hostName",
|
||||
)
|
||||
properties.management_ipv4_address = AAZStrType(
|
||||
serialized_name="managementIpv4Address",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.management_ipv6_address = AAZStrType(
|
||||
serialized_name="managementIpv6Address",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.network_device_role = AAZStrType(
|
||||
serialized_name="networkDeviceRole",
|
||||
flags={"required": True},
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.network_device_sku = AAZStrType(
|
||||
serialized_name="networkDeviceSku",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.network_rack_id = AAZStrType(
|
||||
serialized_name="networkRackId",
|
||||
|
@ -276,7 +291,7 @@ class List(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
@ -328,7 +343,7 @@ class List(AAZCommand):
|
|||
flags={"read_only": True},
|
||||
)
|
||||
_element.properties = AAZObjectType(
|
||||
flags={"client_flatten": True},
|
||||
flags={"required": True, "client_flatten": True},
|
||||
)
|
||||
_element.system_data = AAZObjectType(
|
||||
serialized_name="systemData",
|
||||
|
@ -340,17 +355,32 @@ class List(AAZCommand):
|
|||
)
|
||||
|
||||
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.host_name = AAZStrType(
|
||||
serialized_name="hostName",
|
||||
)
|
||||
properties.management_ipv4_address = AAZStrType(
|
||||
serialized_name="managementIpv4Address",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.management_ipv6_address = AAZStrType(
|
||||
serialized_name="managementIpv6Address",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.network_device_role = AAZStrType(
|
||||
serialized_name="networkDeviceRole",
|
||||
flags={"required": True},
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.network_device_sku = AAZStrType(
|
||||
serialized_name="networkDeviceSku",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.network_rack_id = AAZStrType(
|
||||
serialized_name="networkRackId",
|
||||
|
|
|
@ -15,16 +15,16 @@ from azure.cli.core.aaz import *
|
|||
"networkfabric device show",
|
||||
)
|
||||
class Show(AAZCommand):
|
||||
"""Show details of the provided Network Device resource.
|
||||
"""Show details of the provided Network Device resource
|
||||
|
||||
:example: Show the Network Device
|
||||
az networkfabric device show --resource-group "example-rg" --resource-name "example-device"
|
||||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-02-01-preview",
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkdevices/{}", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkdevices/{}", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -46,7 +46,7 @@ class Show(AAZCommand):
|
|||
_args_schema = cls._args_schema
|
||||
_args_schema.resource_name = AAZStrArg(
|
||||
options=["--resource-name"],
|
||||
help="Name of the Network Device",
|
||||
help="Name of the Network Device.",
|
||||
required=True,
|
||||
id_part="name",
|
||||
)
|
||||
|
@ -121,7 +121,7 @@ class Show(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
@ -164,7 +164,7 @@ class Show(AAZCommand):
|
|||
flags={"read_only": True},
|
||||
)
|
||||
_schema_on_200.properties = AAZObjectType(
|
||||
flags={"client_flatten": True},
|
||||
flags={"required": True, "client_flatten": True},
|
||||
)
|
||||
_schema_on_200.system_data = AAZObjectType(
|
||||
serialized_name="systemData",
|
||||
|
@ -176,17 +176,32 @@ class Show(AAZCommand):
|
|||
)
|
||||
|
||||
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.host_name = AAZStrType(
|
||||
serialized_name="hostName",
|
||||
)
|
||||
properties.management_ipv4_address = AAZStrType(
|
||||
serialized_name="managementIpv4Address",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.management_ipv6_address = AAZStrType(
|
||||
serialized_name="managementIpv6Address",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.network_device_role = AAZStrType(
|
||||
serialized_name="networkDeviceRole",
|
||||
flags={"required": True},
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.network_device_sku = AAZStrType(
|
||||
serialized_name="networkDeviceSku",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.network_rack_id = AAZStrType(
|
||||
serialized_name="networkRackId",
|
||||
|
|
|
@ -15,16 +15,16 @@ from azure.cli.core.aaz import *
|
|||
"networkfabric device update",
|
||||
)
|
||||
class Update(AAZCommand):
|
||||
"""Update the properties of the provided Network Device resource.
|
||||
"""Update the Network Device resource.
|
||||
|
||||
:example: Update the Network Device
|
||||
az networkfabric device update --resource-group "example-rg" --resource-name "example-device" --host-name "AustinNF-AR-CE1" --serial-number "Arista;DCS-7280DR3-24;12.05;JPE21115446"
|
||||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-02-01-preview",
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkdevices/{}", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkdevices/{}", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -47,7 +47,7 @@ class Update(AAZCommand):
|
|||
_args_schema = cls._args_schema
|
||||
_args_schema.resource_name = AAZStrArg(
|
||||
options=["--resource-name"],
|
||||
help="Name of the Network Device",
|
||||
help="Name of the Network Device.",
|
||||
required=True,
|
||||
id_part="name",
|
||||
)
|
||||
|
@ -62,7 +62,7 @@ class Update(AAZCommand):
|
|||
_args_schema.tags = AAZDictArg(
|
||||
options=["--tags"],
|
||||
arg_group="Body",
|
||||
help="Azure resource tags that will replace the existing ones.",
|
||||
help="Resource tags",
|
||||
)
|
||||
|
||||
tags = cls._args_schema.tags
|
||||
|
@ -74,17 +74,23 @@ class Update(AAZCommand):
|
|||
_args_schema.annotation = AAZStrArg(
|
||||
options=["--annotation"],
|
||||
arg_group="Properties",
|
||||
help="Switch configuration description.",
|
||||
help="Description for underlying resource.",
|
||||
)
|
||||
_args_schema.host_name = AAZStrArg(
|
||||
options=["--host-name"],
|
||||
arg_group="Properties",
|
||||
help="The Host Name of the device. All Network Device names should follow the format <Fabric Name>-<Rack Type>-<Device Type>. Example: AustinNF-AR-CE1",
|
||||
help="The Host Name of the device. All Network Device names should follow the format <Fabric Name>-<Rack Type>-<Device Type>. Example: AustinNF-AR-CE1.",
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
_args_schema.serial_number = AAZStrArg(
|
||||
options=["--serial-number"],
|
||||
arg_group="Properties",
|
||||
help="serialNumber of the format Make;Model;HardwareRevisionId;SerialNumber. Example: Arista;DCS-7280DR3-24;12.05;JPE21116969",
|
||||
help="Serial number of the device. Format of serial Number - Make;Model;HardwareRevisionId;SerialNumber. Example: Arista;DCS-7280DR3-24;12.05;JPE21116969",
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
return cls._args_schema
|
||||
|
||||
|
@ -169,7 +175,7 @@ class Update(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
@ -237,7 +243,7 @@ class Update(AAZCommand):
|
|||
flags={"read_only": True},
|
||||
)
|
||||
_schema_on_200.properties = AAZObjectType(
|
||||
flags={"client_flatten": True},
|
||||
flags={"required": True, "client_flatten": True},
|
||||
)
|
||||
_schema_on_200.system_data = AAZObjectType(
|
||||
serialized_name="systemData",
|
||||
|
@ -249,17 +255,32 @@ class Update(AAZCommand):
|
|||
)
|
||||
|
||||
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.host_name = AAZStrType(
|
||||
serialized_name="hostName",
|
||||
)
|
||||
properties.management_ipv4_address = AAZStrType(
|
||||
serialized_name="managementIpv4Address",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.management_ipv6_address = AAZStrType(
|
||||
serialized_name="managementIpv6Address",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.network_device_role = AAZStrType(
|
||||
serialized_name="networkDeviceRole",
|
||||
flags={"required": True},
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.network_device_sku = AAZStrType(
|
||||
serialized_name="networkDeviceSku",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.network_rack_id = AAZStrType(
|
||||
serialized_name="networkRackId",
|
||||
|
|
|
@ -20,7 +20,7 @@ class Wait(AAZWaitCommand):
|
|||
|
||||
_aaz_info = {
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkdevices/{}", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkdevices/{}", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@ class Wait(AAZWaitCommand):
|
|||
_args_schema = cls._args_schema
|
||||
_args_schema.resource_name = AAZStrArg(
|
||||
options=["--resource-name"],
|
||||
help="Name of the Network Device",
|
||||
help="Name of the Network Device.",
|
||||
required=True,
|
||||
id_part="name",
|
||||
)
|
||||
|
@ -117,7 +117,7 @@ class Wait(AAZWaitCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
@ -160,7 +160,7 @@ class Wait(AAZWaitCommand):
|
|||
flags={"read_only": True},
|
||||
)
|
||||
_schema_on_200.properties = AAZObjectType(
|
||||
flags={"client_flatten": True},
|
||||
flags={"required": True, "client_flatten": True},
|
||||
)
|
||||
_schema_on_200.system_data = AAZObjectType(
|
||||
serialized_name="systemData",
|
||||
|
@ -172,17 +172,32 @@ class Wait(AAZWaitCommand):
|
|||
)
|
||||
|
||||
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.host_name = AAZStrType(
|
||||
serialized_name="hostName",
|
||||
)
|
||||
properties.management_ipv4_address = AAZStrType(
|
||||
serialized_name="managementIpv4Address",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.management_ipv6_address = AAZStrType(
|
||||
serialized_name="managementIpv6Address",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.network_device_role = AAZStrType(
|
||||
serialized_name="networkDeviceRole",
|
||||
flags={"required": True},
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.network_device_sku = AAZStrType(
|
||||
serialized_name="networkDeviceSku",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.network_rack_id = AAZStrType(
|
||||
serialized_name="networkRackId",
|
||||
|
|
|
@ -13,4 +13,5 @@ from ._create import *
|
|||
from ._delete import *
|
||||
from ._list import *
|
||||
from ._show import *
|
||||
from ._update import *
|
||||
from ._wait import *
|
||||
|
|
|
@ -18,19 +18,19 @@ class Create(AAZCommand):
|
|||
"""Create a External Network resource
|
||||
|
||||
:example: Create a External Network with option B properties
|
||||
az networkfabric externalnetwork create --resource-group "example-rg" --l3domain "example-l3domain" --resource-name "example-externalNetwork" --peering-option "OptionB" --import-route-policy-id "/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/microsoft.managednetworkfabric/routePolicies/example-routepolicy" --export-route-policy-id "/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/microsoft.managednetworkfabric/routePolicies/example-routepolicy" --option-b-properties "{importRouteTargets:['65541:2001','65542:2002'],exportRouteTargets:['65531:2001','65532:2002']}"
|
||||
az networkfabric externalnetwork create --resource-group "example-rg" --l3domain "example-l3domain" --resource-name "example-externalNetwork" --peering-option "OptionB" --option-b-properties "{routeTargets:{exportIpv4RouteTargets:['65046:10039'],exportIpv6RouteTargets:['65046:10039'],importIpv4RouteTargets:['65046:10039'],importIpv6RouteTargets:['65046:10039']}}" --import-route-policy "{importIpv4RoutePolicyId:'/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/microsoft.managednetworkfabric/routePolicies/example-routepolicy',importIpv6RoutePolicyId:'/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/microsoft.managednetworkfabric/routePolicies/example-routepolicy'}" --export-route-policy "{exportIpv4RoutePolicyId:'/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/microsoft.managednetworkfabric/routePolicies/example-routepolicy',exportIpv6RoutePolicyId:'/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/microsoft.managednetworkfabric/routePolicies/example-routepolicy'}"
|
||||
|
||||
:example: Create a External Network with option A properties
|
||||
az networkfabric externalnetwork create --resource-group "example-rg" --l3domain "example-l3domain" --resource-name "example-externalNetwork" --peering-option "OptionA" --import-route-policy-id "/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/microsoft.managednetworkfabric/routePolicies/example-routepolicy" --export-route-policy-id "/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/microsoft.managednetworkfabric/routePolicies/example-routepolicy" --option-a-properties "{peerASN:65234,vlanId:501,mtu:1500,primaryIpv4Prefix:'172.23.1.0/31',secondaryIpv4Prefix:'172.23.1.2/31'}"
|
||||
az networkfabric externalnetwork create --resource-group "example-rg" --l3domain "example-l3domain" --resource-name "example-externalNetwork" --peering-option "OptionA" --option-a-properties "{peerASN:65234,vlanId:501,mtu:1500,primaryIpv4Prefix:'172.23.1.0/31',secondaryIpv4Prefix:'172.23.1.2/31',bfdConfiguration:{multiplier:5,intervalInMilliSeconds:300}}" --import-route-policy "{importIpv4RoutePolicyId:'/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/microsoft.managednetworkfabric/routePolicies/example-routepolicy',importIpv6RoutePolicyId:'/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/microsoft.managednetworkfabric/routePolicies/example-routepolicy'}" --export-route-policy "{exportIpv4RoutePolicyId:'/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/microsoft.managednetworkfabric/routePolicies/example-routepolicy',exportIpv6RoutePolicyId:'/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/microsoft.managednetworkfabric/routePolicies/example-routepolicy'}"
|
||||
|
||||
:example: Help text for sub parameters under the specific parent can be viewed by using the shorthand syntax '??'. See https://github.com/Azure/azure-cli/tree/dev/doc/shorthand_syntax.md for more about shorthand syntax.
|
||||
az networkfabric externalnetwork create --option-a-properties ??
|
||||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-02-01-preview",
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/l3isolationdomains/{}/externalnetworks/{}", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/l3isolationdomains/{}/externalnetworks/{}", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -53,12 +53,12 @@ class Create(AAZCommand):
|
|||
_args_schema = cls._args_schema
|
||||
_args_schema.resource_name = AAZStrArg(
|
||||
options=["--resource-name"],
|
||||
help="Name of the ExternalNetwork",
|
||||
help="Name of the External Network.",
|
||||
required=True,
|
||||
)
|
||||
_args_schema.l3_isolation_domain_name = AAZStrArg(
|
||||
options=["--l3domain", "--l3-isolation-domain-name"],
|
||||
help="Name of the L3IsolationDomain",
|
||||
help="Name of the L3 Isolation Domain.",
|
||||
required=True,
|
||||
)
|
||||
_args_schema.resource_group = AAZResourceGroupNameArg(
|
||||
|
@ -72,17 +72,27 @@ class Create(AAZCommand):
|
|||
_args_schema.annotation = AAZStrArg(
|
||||
options=["--annotation"],
|
||||
arg_group="Properties",
|
||||
help="Switch configuration description.",
|
||||
help="Description for underlying resource.",
|
||||
)
|
||||
_args_schema.export_route_policy_id = AAZStrArg(
|
||||
_args_schema.export_route_policy = AAZObjectArg(
|
||||
options=["--export-route-policy"],
|
||||
arg_group="Properties",
|
||||
help="Export Route Policy either IPv4 or IPv6.",
|
||||
)
|
||||
_args_schema.export_route_policy_id = AAZResourceIdArg(
|
||||
options=["--export-route-policy-id"],
|
||||
arg_group="Properties",
|
||||
help="ARM resource ID of exportRoutePolicy.",
|
||||
help="ARM Resource ID of the RoutePolicy. This is used for the backward compatibility.",
|
||||
)
|
||||
_args_schema.import_route_policy_id = AAZStrArg(
|
||||
_args_schema.import_route_policy = AAZObjectArg(
|
||||
options=["--import-route-policy"],
|
||||
arg_group="Properties",
|
||||
help="Import Route Policy either IPv4 or IPv6.",
|
||||
)
|
||||
_args_schema.import_route_policy_id = AAZResourceIdArg(
|
||||
options=["--import-route-policy-id"],
|
||||
arg_group="Properties",
|
||||
help="ARM resource ID of importRoutePolicy.",
|
||||
help="ARM Resource ID of the RoutePolicy. This is used for the backward compatibility.",
|
||||
)
|
||||
_args_schema.option_a_properties = AAZObjectArg(
|
||||
options=["--option-a-properties"],
|
||||
|
@ -102,59 +112,104 @@ class Create(AAZCommand):
|
|||
enum={"OptionA": "OptionA", "OptionB": "OptionB"},
|
||||
)
|
||||
|
||||
export_route_policy = cls._args_schema.export_route_policy
|
||||
export_route_policy.export_ipv4_route_policy_id = AAZResourceIdArg(
|
||||
options=["export-ipv4-route-policy-id"],
|
||||
help="ARM resource ID of RoutePolicy.",
|
||||
)
|
||||
export_route_policy.export_ipv6_route_policy_id = AAZResourceIdArg(
|
||||
options=["export-ipv6-route-policy-id"],
|
||||
help="ARM resource ID of RoutePolicy.",
|
||||
)
|
||||
|
||||
import_route_policy = cls._args_schema.import_route_policy
|
||||
import_route_policy.import_ipv4_route_policy_id = AAZResourceIdArg(
|
||||
options=["import-ipv4-route-policy-id"],
|
||||
help="ARM resource ID of RoutePolicy.",
|
||||
)
|
||||
import_route_policy.import_ipv6_route_policy_id = AAZResourceIdArg(
|
||||
options=["import-ipv6-route-policy-id"],
|
||||
help="ARM resource ID of RoutePolicy.",
|
||||
)
|
||||
|
||||
option_a_properties = cls._args_schema.option_a_properties
|
||||
option_a_properties.bfd_configuration = AAZObjectArg(
|
||||
options=["bfd-configuration"],
|
||||
help="BFD configuration properties.",
|
||||
)
|
||||
option_a_properties.egress_acl_id = AAZResourceIdArg(
|
||||
options=["egress-acl-id"],
|
||||
help="Egress Acl ARM resource ID.",
|
||||
)
|
||||
option_a_properties.ingress_acl_id = AAZResourceIdArg(
|
||||
options=["ingress-acl-id"],
|
||||
help="Ingress Acl ARM resource ID.",
|
||||
)
|
||||
option_a_properties.mtu = AAZIntArg(
|
||||
options=["mtu"],
|
||||
help="MTU to use for option A peering. The value should be between 1500 to 9000.Default Value is 1500. Example : 1650.",
|
||||
default=1500,
|
||||
help="MTU to use for option A peering. The value should be between 64 to 9200. Default Value is 1500. Example: 1650",
|
||||
fmt=AAZIntArgFormat(
|
||||
maximum=9000,
|
||||
minimum=1500,
|
||||
maximum=9200,
|
||||
minimum=64,
|
||||
),
|
||||
)
|
||||
option_a_properties.peer_asn = AAZIntArg(
|
||||
options=["peer-asn"],
|
||||
help="Peer ASN number. The value should be between 1 to 65535. Example : 65234.",
|
||||
help="Peer ASN number. The value should be between 1 to 4294967295. Example: 28.",
|
||||
required=True,
|
||||
fmt=AAZIntArgFormat(
|
||||
maximum=65535,
|
||||
maximum=4294967295,
|
||||
minimum=1,
|
||||
),
|
||||
)
|
||||
option_a_properties.primary_ipv4_prefix = AAZStrArg(
|
||||
options=["primary-ipv4-prefix"],
|
||||
help="IPv4 Address Prefix of CE-PE interconnect links. Default value is 172.23.1.0/31.",
|
||||
help="IPv4 Address Prefix. Example: 172.23.1.0/31.",
|
||||
)
|
||||
option_a_properties.primary_ipv6_prefix = AAZStrArg(
|
||||
options=["primary-ipv6-prefix"],
|
||||
help="IPv6 Address Prefix of CE-PE interconnect links. Default value is 3FFE:FFFF:0:CD30::a1/126.",
|
||||
help="IPv6 Address Prefix. Example: 3FFE:FFFF:0:CD30::a1/127",
|
||||
)
|
||||
option_a_properties.secondary_ipv4_prefix = AAZStrArg(
|
||||
options=["secondary-ipv4-prefix"],
|
||||
help="Secondary IPv4 Address Prefix of CE-PE interconnect links. Default value is 172.23.1.2/31.",
|
||||
help="Secondary IPv4 Address Prefix. Example: 172.23.1.2/31.",
|
||||
)
|
||||
option_a_properties.secondary_ipv6_prefix = AAZStrArg(
|
||||
options=["secondary-ipv6-prefix"],
|
||||
help="Secondary IPv6 Address Prefix of CE-PE interconnect links. Default value is 3FFE:FFFF:0:CD30::a1/126.",
|
||||
help="Secondary IPv6 Address Prefix. Example: 3FFE:FFFF:0:CD30::a4/127",
|
||||
)
|
||||
option_a_properties.vlan_id = AAZIntArg(
|
||||
options=["vlan-id"],
|
||||
help="Vlan identifier. The value should be between 501 to 4095. Example : 501.",
|
||||
help="Vlan identifier. The value should be between 501 to 4094. Example : 501",
|
||||
required=True,
|
||||
fmt=AAZIntArgFormat(
|
||||
maximum=4095,
|
||||
maximum=4094,
|
||||
minimum=501,
|
||||
),
|
||||
)
|
||||
|
||||
bfd_configuration = cls._args_schema.option_a_properties.bfd_configuration
|
||||
bfd_configuration.interval_in_milli_seconds = AAZIntArg(
|
||||
options=["interval-in-milli-seconds"],
|
||||
help="Interval in milliseconds. Default Value is 300. Example: 300.",
|
||||
)
|
||||
bfd_configuration.multiplier = AAZIntArg(
|
||||
options=["multiplier"],
|
||||
help="Multiplier for the Bfd Configuration. Default Value is 5. Example: 5.",
|
||||
)
|
||||
|
||||
option_b_properties = cls._args_schema.option_b_properties
|
||||
option_b_properties.export_route_targets = AAZListArg(
|
||||
options=["export-route-targets"],
|
||||
help="Route Targets to be applied for outgoing routes from CE.",
|
||||
help="RouteTargets to be applied. This is used for the backward compatibility.",
|
||||
)
|
||||
option_b_properties.import_route_targets = AAZListArg(
|
||||
options=["import-route-targets"],
|
||||
help="Route Targets to be applied for incoming routes into CE.",
|
||||
help="RouteTargets to be applied. This is used for the backward compatibility.",
|
||||
)
|
||||
option_b_properties.route_targets = AAZObjectArg(
|
||||
options=["route-targets"],
|
||||
help="RouteTargets to be applied.",
|
||||
)
|
||||
|
||||
export_route_targets = cls._args_schema.option_b_properties.export_route_targets
|
||||
|
@ -162,6 +217,52 @@ class Create(AAZCommand):
|
|||
|
||||
import_route_targets = cls._args_schema.option_b_properties.import_route_targets
|
||||
import_route_targets.Element = AAZStrArg()
|
||||
|
||||
route_targets = cls._args_schema.option_b_properties.route_targets
|
||||
route_targets.export_ipv4_route_targets = AAZListArg(
|
||||
options=["export-ipv4-route-targets"],
|
||||
help="Route Targets to be applied for outgoing routes into CE.",
|
||||
)
|
||||
route_targets.export_ipv6_route_targets = AAZListArg(
|
||||
options=["export-ipv6-route-targets"],
|
||||
help="Route Targets to be applied for outgoing routes from CE.",
|
||||
)
|
||||
route_targets.import_ipv4_route_targets = AAZListArg(
|
||||
options=["import-ipv4-route-targets"],
|
||||
help="Route Targets to be applied for incoming routes into CE.",
|
||||
)
|
||||
route_targets.import_ipv6_route_targets = AAZListArg(
|
||||
options=["import-ipv6-route-targets"],
|
||||
help="Route Targets to be applied for incoming routes from CE.",
|
||||
)
|
||||
|
||||
export_ipv4_route_targets = cls._args_schema.option_b_properties.route_targets.export_ipv4_route_targets
|
||||
export_ipv4_route_targets.Element = AAZStrArg(
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
|
||||
export_ipv6_route_targets = cls._args_schema.option_b_properties.route_targets.export_ipv6_route_targets
|
||||
export_ipv6_route_targets.Element = AAZStrArg(
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
|
||||
import_ipv4_route_targets = cls._args_schema.option_b_properties.route_targets.import_ipv4_route_targets
|
||||
import_ipv4_route_targets.Element = AAZStrArg(
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
|
||||
import_ipv6_route_targets = cls._args_schema.option_b_properties.route_targets.import_ipv6_route_targets
|
||||
import_ipv6_route_targets.Element = AAZStrArg(
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
return cls._args_schema
|
||||
|
||||
def _execute_operations(self):
|
||||
|
@ -249,7 +350,7 @@ class Create(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
@ -279,14 +380,29 @@ class Create(AAZCommand):
|
|||
properties = _builder.get(".properties")
|
||||
if properties is not None:
|
||||
properties.set_prop("annotation", AAZStrType, ".annotation")
|
||||
properties.set_prop("exportRoutePolicy", AAZObjectType, ".export_route_policy")
|
||||
properties.set_prop("exportRoutePolicyId", AAZStrType, ".export_route_policy_id")
|
||||
properties.set_prop("importRoutePolicy", AAZObjectType, ".import_route_policy")
|
||||
properties.set_prop("importRoutePolicyId", AAZStrType, ".import_route_policy_id")
|
||||
properties.set_prop("optionAProperties", AAZObjectType, ".option_a_properties")
|
||||
properties.set_prop("optionBProperties", AAZObjectType, ".option_b_properties")
|
||||
properties.set_prop("peeringOption", AAZStrType, ".peering_option", typ_kwargs={"flags": {"required": True}})
|
||||
|
||||
export_route_policy = _builder.get(".properties.exportRoutePolicy")
|
||||
if export_route_policy is not None:
|
||||
export_route_policy.set_prop("exportIpv4RoutePolicyId", AAZStrType, ".export_ipv4_route_policy_id")
|
||||
export_route_policy.set_prop("exportIpv6RoutePolicyId", AAZStrType, ".export_ipv6_route_policy_id")
|
||||
|
||||
import_route_policy = _builder.get(".properties.importRoutePolicy")
|
||||
if import_route_policy is not None:
|
||||
import_route_policy.set_prop("importIpv4RoutePolicyId", AAZStrType, ".import_ipv4_route_policy_id")
|
||||
import_route_policy.set_prop("importIpv6RoutePolicyId", AAZStrType, ".import_ipv6_route_policy_id")
|
||||
|
||||
option_a_properties = _builder.get(".properties.optionAProperties")
|
||||
if option_a_properties is not None:
|
||||
option_a_properties.set_prop("bfdConfiguration", AAZObjectType, ".bfd_configuration")
|
||||
option_a_properties.set_prop("egressAclId", AAZStrType, ".egress_acl_id")
|
||||
option_a_properties.set_prop("ingressAclId", AAZStrType, ".ingress_acl_id")
|
||||
option_a_properties.set_prop("mtu", AAZIntType, ".mtu")
|
||||
option_a_properties.set_prop("peerASN", AAZIntType, ".peer_asn", typ_kwargs={"flags": {"required": True}})
|
||||
option_a_properties.set_prop("primaryIpv4Prefix", AAZStrType, ".primary_ipv4_prefix")
|
||||
|
@ -295,10 +411,16 @@ class Create(AAZCommand):
|
|||
option_a_properties.set_prop("secondaryIpv6Prefix", AAZStrType, ".secondary_ipv6_prefix")
|
||||
option_a_properties.set_prop("vlanId", AAZIntType, ".vlan_id", typ_kwargs={"flags": {"required": True}})
|
||||
|
||||
bfd_configuration = _builder.get(".properties.optionAProperties.bfdConfiguration")
|
||||
if bfd_configuration is not None:
|
||||
bfd_configuration.set_prop("intervalInMilliSeconds", AAZIntType, ".interval_in_milli_seconds")
|
||||
bfd_configuration.set_prop("multiplier", AAZIntType, ".multiplier")
|
||||
|
||||
option_b_properties = _builder.get(".properties.optionBProperties")
|
||||
if option_b_properties is not None:
|
||||
option_b_properties.set_prop("exportRouteTargets", AAZListType, ".export_route_targets")
|
||||
option_b_properties.set_prop("importRouteTargets", AAZListType, ".import_route_targets")
|
||||
option_b_properties.set_prop("routeTargets", AAZObjectType, ".route_targets")
|
||||
|
||||
export_route_targets = _builder.get(".properties.optionBProperties.exportRouteTargets")
|
||||
if export_route_targets is not None:
|
||||
|
@ -308,6 +430,29 @@ class Create(AAZCommand):
|
|||
if import_route_targets is not None:
|
||||
import_route_targets.set_elements(AAZStrType, ".")
|
||||
|
||||
route_targets = _builder.get(".properties.optionBProperties.routeTargets")
|
||||
if route_targets is not None:
|
||||
route_targets.set_prop("exportIpv4RouteTargets", AAZListType, ".export_ipv4_route_targets")
|
||||
route_targets.set_prop("exportIpv6RouteTargets", AAZListType, ".export_ipv6_route_targets")
|
||||
route_targets.set_prop("importIpv4RouteTargets", AAZListType, ".import_ipv4_route_targets")
|
||||
route_targets.set_prop("importIpv6RouteTargets", AAZListType, ".import_ipv6_route_targets")
|
||||
|
||||
export_ipv4_route_targets = _builder.get(".properties.optionBProperties.routeTargets.exportIpv4RouteTargets")
|
||||
if export_ipv4_route_targets is not None:
|
||||
export_ipv4_route_targets.set_elements(AAZStrType, ".")
|
||||
|
||||
export_ipv6_route_targets = _builder.get(".properties.optionBProperties.routeTargets.exportIpv6RouteTargets")
|
||||
if export_ipv6_route_targets is not None:
|
||||
export_ipv6_route_targets.set_elements(AAZStrType, ".")
|
||||
|
||||
import_ipv4_route_targets = _builder.get(".properties.optionBProperties.routeTargets.importIpv4RouteTargets")
|
||||
if import_ipv4_route_targets is not None:
|
||||
import_ipv4_route_targets.set_elements(AAZStrType, ".")
|
||||
|
||||
import_ipv6_route_targets = _builder.get(".properties.optionBProperties.routeTargets.importIpv6RouteTargets")
|
||||
if import_ipv6_route_targets is not None:
|
||||
import_ipv6_route_targets.set_elements(AAZStrType, ".")
|
||||
|
||||
return self.serialize_content(_content_value)
|
||||
|
||||
def on_200_201(self, session):
|
||||
|
@ -351,13 +496,19 @@ class Create(AAZCommand):
|
|||
flags={"read_only": True},
|
||||
)
|
||||
properties.annotation = AAZStrType()
|
||||
properties.disabled_on_resources = AAZListType(
|
||||
serialized_name="disabledOnResources",
|
||||
properties.configuration_state = AAZStrType(
|
||||
serialized_name="configurationState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.export_route_policy = AAZObjectType(
|
||||
serialized_name="exportRoutePolicy",
|
||||
)
|
||||
properties.export_route_policy_id = AAZStrType(
|
||||
serialized_name="exportRoutePolicyId",
|
||||
)
|
||||
properties.import_route_policy = AAZObjectType(
|
||||
serialized_name="importRoutePolicy",
|
||||
)
|
||||
properties.import_route_policy_id = AAZStrType(
|
||||
serialized_name="importRoutePolicyId",
|
||||
)
|
||||
|
@ -380,17 +531,36 @@ class Create(AAZCommand):
|
|||
flags={"read_only": True},
|
||||
)
|
||||
|
||||
disabled_on_resources = cls._schema_on_200_201.properties.disabled_on_resources
|
||||
disabled_on_resources.Element = AAZStrType()
|
||||
export_route_policy = cls._schema_on_200_201.properties.export_route_policy
|
||||
export_route_policy.export_ipv4_route_policy_id = AAZStrType(
|
||||
serialized_name="exportIpv4RoutePolicyId",
|
||||
)
|
||||
export_route_policy.export_ipv6_route_policy_id = AAZStrType(
|
||||
serialized_name="exportIpv6RoutePolicyId",
|
||||
)
|
||||
|
||||
import_route_policy = cls._schema_on_200_201.properties.import_route_policy
|
||||
import_route_policy.import_ipv4_route_policy_id = AAZStrType(
|
||||
serialized_name="importIpv4RoutePolicyId",
|
||||
)
|
||||
import_route_policy.import_ipv6_route_policy_id = AAZStrType(
|
||||
serialized_name="importIpv6RoutePolicyId",
|
||||
)
|
||||
|
||||
option_a_properties = cls._schema_on_200_201.properties.option_a_properties
|
||||
option_a_properties.bfd_configuration = AAZObjectType(
|
||||
serialized_name="bfdConfiguration",
|
||||
)
|
||||
option_a_properties.egress_acl_id = AAZStrType(
|
||||
serialized_name="egressAclId",
|
||||
)
|
||||
option_a_properties.fabric_asn = AAZIntType(
|
||||
serialized_name="fabricASN",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
option_a_properties.ingress_acl_id = AAZStrType(
|
||||
serialized_name="ingressAclId",
|
||||
)
|
||||
option_a_properties.mtu = AAZIntType()
|
||||
option_a_properties.peer_asn = AAZIntType(
|
||||
serialized_name="peerASN",
|
||||
|
@ -418,12 +588,10 @@ class Create(AAZCommand):
|
|||
serialized_name="administrativeState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
bfd_configuration.interval = AAZIntType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
bfd_configuration.multiplier = AAZIntType(
|
||||
flags={"read_only": True},
|
||||
bfd_configuration.interval_in_milli_seconds = AAZIntType(
|
||||
serialized_name="intervalInMilliSeconds",
|
||||
)
|
||||
bfd_configuration.multiplier = AAZIntType()
|
||||
|
||||
option_b_properties = cls._schema_on_200_201.properties.option_b_properties
|
||||
option_b_properties.export_route_targets = AAZListType(
|
||||
|
@ -432,6 +600,9 @@ class Create(AAZCommand):
|
|||
option_b_properties.import_route_targets = AAZListType(
|
||||
serialized_name="importRouteTargets",
|
||||
)
|
||||
option_b_properties.route_targets = AAZObjectType(
|
||||
serialized_name="routeTargets",
|
||||
)
|
||||
|
||||
export_route_targets = cls._schema_on_200_201.properties.option_b_properties.export_route_targets
|
||||
export_route_targets.Element = AAZStrType()
|
||||
|
@ -439,6 +610,32 @@ class Create(AAZCommand):
|
|||
import_route_targets = cls._schema_on_200_201.properties.option_b_properties.import_route_targets
|
||||
import_route_targets.Element = AAZStrType()
|
||||
|
||||
route_targets = cls._schema_on_200_201.properties.option_b_properties.route_targets
|
||||
route_targets.export_ipv4_route_targets = AAZListType(
|
||||
serialized_name="exportIpv4RouteTargets",
|
||||
)
|
||||
route_targets.export_ipv6_route_targets = AAZListType(
|
||||
serialized_name="exportIpv6RouteTargets",
|
||||
)
|
||||
route_targets.import_ipv4_route_targets = AAZListType(
|
||||
serialized_name="importIpv4RouteTargets",
|
||||
)
|
||||
route_targets.import_ipv6_route_targets = AAZListType(
|
||||
serialized_name="importIpv6RouteTargets",
|
||||
)
|
||||
|
||||
export_ipv4_route_targets = cls._schema_on_200_201.properties.option_b_properties.route_targets.export_ipv4_route_targets
|
||||
export_ipv4_route_targets.Element = AAZStrType()
|
||||
|
||||
export_ipv6_route_targets = cls._schema_on_200_201.properties.option_b_properties.route_targets.export_ipv6_route_targets
|
||||
export_ipv6_route_targets.Element = AAZStrType()
|
||||
|
||||
import_ipv4_route_targets = cls._schema_on_200_201.properties.option_b_properties.route_targets.import_ipv4_route_targets
|
||||
import_ipv4_route_targets.Element = AAZStrType()
|
||||
|
||||
import_ipv6_route_targets = cls._schema_on_200_201.properties.option_b_properties.route_targets.import_ipv6_route_targets
|
||||
import_ipv6_route_targets.Element = AAZStrType()
|
||||
|
||||
system_data = cls._schema_on_200_201.system_data
|
||||
system_data.created_at = AAZStrType(
|
||||
serialized_name="createdAt",
|
||||
|
|
|
@ -15,16 +15,16 @@ from azure.cli.core.aaz import *
|
|||
"networkfabric externalnetwork delete",
|
||||
)
|
||||
class Delete(AAZCommand):
|
||||
"""Delete the External Network resource.
|
||||
"""Delete the External Network resource
|
||||
|
||||
:example: Delete the External Network
|
||||
az networkfabric externalnetwork delete --resource-group "example-rg" --l3domain "example-l3domain" --resource-name "example-externalnetwork"
|
||||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-02-01-preview",
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/l3isolationdomains/{}/externalnetworks/{}", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/l3isolationdomains/{}/externalnetworks/{}", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -47,13 +47,13 @@ class Delete(AAZCommand):
|
|||
_args_schema = cls._args_schema
|
||||
_args_schema.resource_name = AAZStrArg(
|
||||
options=["--resource-name"],
|
||||
help="Name of the ExternalNetwork",
|
||||
help="Name of the External Network.",
|
||||
required=True,
|
||||
id_part="child_name_1",
|
||||
)
|
||||
_args_schema.l3_isolation_domain_name = AAZStrArg(
|
||||
options=["--l3domain", "--l3-isolation-domain-name"],
|
||||
help="Name of the L3IsolationDomain",
|
||||
help="Name of the L3 Isolation Domain.",
|
||||
required=True,
|
||||
id_part="name",
|
||||
)
|
||||
|
@ -153,7 +153,7 @@ class Delete(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
|
|
@ -15,16 +15,16 @@ from azure.cli.core.aaz import *
|
|||
"networkfabric externalnetwork list",
|
||||
)
|
||||
class List(AAZCommand):
|
||||
"""List all External Networks in the provided resource group.
|
||||
"""List all External Networks in the provided resource group
|
||||
|
||||
:example: List the External Network for Resource Group
|
||||
az networkfabric externalnetwork list --resource-group "example-rg" --l3domain "example-l3domain"
|
||||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-02-01-preview",
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/l3isolationdomains/{}/externalnetworks", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/l3isolationdomains/{}/externalnetworks", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -45,7 +45,7 @@ class List(AAZCommand):
|
|||
_args_schema = cls._args_schema
|
||||
_args_schema.l3_isolation_domain_name = AAZStrArg(
|
||||
options=["--l3domain", "--l3-isolation-domain-name"],
|
||||
help="Name of the L3IsolationDomain",
|
||||
help="Name of the L3 Isolation Domain.",
|
||||
required=True,
|
||||
)
|
||||
_args_schema.resource_group = AAZResourceGroupNameArg(
|
||||
|
@ -56,7 +56,7 @@ class List(AAZCommand):
|
|||
|
||||
def _execute_operations(self):
|
||||
self.pre_operations()
|
||||
self.ExternalNetworksList(ctx=self.ctx)()
|
||||
self.ExternalNetworksListByL3IsolationDomain(ctx=self.ctx)()
|
||||
self.post_operations()
|
||||
|
||||
@register_callback
|
||||
|
@ -72,7 +72,7 @@ class List(AAZCommand):
|
|||
next_link = self.deserialize_output(self.ctx.vars.instance.next_link)
|
||||
return result, next_link
|
||||
|
||||
class ExternalNetworksList(AAZHttpOperation):
|
||||
class ExternalNetworksListByL3IsolationDomain(AAZHttpOperation):
|
||||
CLIENT_TYPE = "MgmtClient"
|
||||
|
||||
def __call__(self, *args, **kwargs):
|
||||
|
@ -120,7 +120,7 @@ class List(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
@ -185,13 +185,19 @@ class List(AAZCommand):
|
|||
flags={"read_only": True},
|
||||
)
|
||||
properties.annotation = AAZStrType()
|
||||
properties.disabled_on_resources = AAZListType(
|
||||
serialized_name="disabledOnResources",
|
||||
properties.configuration_state = AAZStrType(
|
||||
serialized_name="configurationState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.export_route_policy = AAZObjectType(
|
||||
serialized_name="exportRoutePolicy",
|
||||
)
|
||||
properties.export_route_policy_id = AAZStrType(
|
||||
serialized_name="exportRoutePolicyId",
|
||||
)
|
||||
properties.import_route_policy = AAZObjectType(
|
||||
serialized_name="importRoutePolicy",
|
||||
)
|
||||
properties.import_route_policy_id = AAZStrType(
|
||||
serialized_name="importRoutePolicyId",
|
||||
)
|
||||
|
@ -214,17 +220,36 @@ class List(AAZCommand):
|
|||
flags={"read_only": True},
|
||||
)
|
||||
|
||||
disabled_on_resources = cls._schema_on_200.value.Element.properties.disabled_on_resources
|
||||
disabled_on_resources.Element = AAZStrType()
|
||||
export_route_policy = cls._schema_on_200.value.Element.properties.export_route_policy
|
||||
export_route_policy.export_ipv4_route_policy_id = AAZStrType(
|
||||
serialized_name="exportIpv4RoutePolicyId",
|
||||
)
|
||||
export_route_policy.export_ipv6_route_policy_id = AAZStrType(
|
||||
serialized_name="exportIpv6RoutePolicyId",
|
||||
)
|
||||
|
||||
import_route_policy = cls._schema_on_200.value.Element.properties.import_route_policy
|
||||
import_route_policy.import_ipv4_route_policy_id = AAZStrType(
|
||||
serialized_name="importIpv4RoutePolicyId",
|
||||
)
|
||||
import_route_policy.import_ipv6_route_policy_id = AAZStrType(
|
||||
serialized_name="importIpv6RoutePolicyId",
|
||||
)
|
||||
|
||||
option_a_properties = cls._schema_on_200.value.Element.properties.option_a_properties
|
||||
option_a_properties.bfd_configuration = AAZObjectType(
|
||||
serialized_name="bfdConfiguration",
|
||||
)
|
||||
option_a_properties.egress_acl_id = AAZStrType(
|
||||
serialized_name="egressAclId",
|
||||
)
|
||||
option_a_properties.fabric_asn = AAZIntType(
|
||||
serialized_name="fabricASN",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
option_a_properties.ingress_acl_id = AAZStrType(
|
||||
serialized_name="ingressAclId",
|
||||
)
|
||||
option_a_properties.mtu = AAZIntType()
|
||||
option_a_properties.peer_asn = AAZIntType(
|
||||
serialized_name="peerASN",
|
||||
|
@ -252,12 +277,10 @@ class List(AAZCommand):
|
|||
serialized_name="administrativeState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
bfd_configuration.interval = AAZIntType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
bfd_configuration.multiplier = AAZIntType(
|
||||
flags={"read_only": True},
|
||||
bfd_configuration.interval_in_milli_seconds = AAZIntType(
|
||||
serialized_name="intervalInMilliSeconds",
|
||||
)
|
||||
bfd_configuration.multiplier = AAZIntType()
|
||||
|
||||
option_b_properties = cls._schema_on_200.value.Element.properties.option_b_properties
|
||||
option_b_properties.export_route_targets = AAZListType(
|
||||
|
@ -266,6 +289,9 @@ class List(AAZCommand):
|
|||
option_b_properties.import_route_targets = AAZListType(
|
||||
serialized_name="importRouteTargets",
|
||||
)
|
||||
option_b_properties.route_targets = AAZObjectType(
|
||||
serialized_name="routeTargets",
|
||||
)
|
||||
|
||||
export_route_targets = cls._schema_on_200.value.Element.properties.option_b_properties.export_route_targets
|
||||
export_route_targets.Element = AAZStrType()
|
||||
|
@ -273,6 +299,32 @@ class List(AAZCommand):
|
|||
import_route_targets = cls._schema_on_200.value.Element.properties.option_b_properties.import_route_targets
|
||||
import_route_targets.Element = AAZStrType()
|
||||
|
||||
route_targets = cls._schema_on_200.value.Element.properties.option_b_properties.route_targets
|
||||
route_targets.export_ipv4_route_targets = AAZListType(
|
||||
serialized_name="exportIpv4RouteTargets",
|
||||
)
|
||||
route_targets.export_ipv6_route_targets = AAZListType(
|
||||
serialized_name="exportIpv6RouteTargets",
|
||||
)
|
||||
route_targets.import_ipv4_route_targets = AAZListType(
|
||||
serialized_name="importIpv4RouteTargets",
|
||||
)
|
||||
route_targets.import_ipv6_route_targets = AAZListType(
|
||||
serialized_name="importIpv6RouteTargets",
|
||||
)
|
||||
|
||||
export_ipv4_route_targets = cls._schema_on_200.value.Element.properties.option_b_properties.route_targets.export_ipv4_route_targets
|
||||
export_ipv4_route_targets.Element = AAZStrType()
|
||||
|
||||
export_ipv6_route_targets = cls._schema_on_200.value.Element.properties.option_b_properties.route_targets.export_ipv6_route_targets
|
||||
export_ipv6_route_targets.Element = AAZStrType()
|
||||
|
||||
import_ipv4_route_targets = cls._schema_on_200.value.Element.properties.option_b_properties.route_targets.import_ipv4_route_targets
|
||||
import_ipv4_route_targets.Element = AAZStrType()
|
||||
|
||||
import_ipv6_route_targets = cls._schema_on_200.value.Element.properties.option_b_properties.route_targets.import_ipv6_route_targets
|
||||
import_ipv6_route_targets.Element = AAZStrType()
|
||||
|
||||
system_data = cls._schema_on_200.value.Element.system_data
|
||||
system_data.created_at = AAZStrType(
|
||||
serialized_name="createdAt",
|
||||
|
|
|
@ -15,16 +15,16 @@ from azure.cli.core.aaz import *
|
|||
"networkfabric externalnetwork show",
|
||||
)
|
||||
class Show(AAZCommand):
|
||||
"""Show details of the provided External Network resource.
|
||||
"""Show details of the provided External Network resource
|
||||
|
||||
:example: Show the External Network
|
||||
az networkfabric externalnetwork show --resource-group "example-rg" --l3domain "example-l3domain" --resource-name "example-externalnetwork"
|
||||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-02-01-preview",
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/l3isolationdomains/{}/externalnetworks/{}", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/l3isolationdomains/{}/externalnetworks/{}", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -46,13 +46,13 @@ class Show(AAZCommand):
|
|||
_args_schema = cls._args_schema
|
||||
_args_schema.resource_name = AAZStrArg(
|
||||
options=["--resource-name"],
|
||||
help="Name of the ExternalNetwork",
|
||||
help="Name of the External Network.",
|
||||
required=True,
|
||||
id_part="child_name_1",
|
||||
)
|
||||
_args_schema.l3_isolation_domain_name = AAZStrArg(
|
||||
options=["--l3domain", "--l3-isolation-domain-name"],
|
||||
help="Name of the L3IsolationDomain",
|
||||
help="Name of the L3 Isolation Domain.",
|
||||
required=True,
|
||||
id_part="name",
|
||||
)
|
||||
|
@ -131,7 +131,7 @@ class Show(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
@ -187,13 +187,19 @@ class Show(AAZCommand):
|
|||
flags={"read_only": True},
|
||||
)
|
||||
properties.annotation = AAZStrType()
|
||||
properties.disabled_on_resources = AAZListType(
|
||||
serialized_name="disabledOnResources",
|
||||
properties.configuration_state = AAZStrType(
|
||||
serialized_name="configurationState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.export_route_policy = AAZObjectType(
|
||||
serialized_name="exportRoutePolicy",
|
||||
)
|
||||
properties.export_route_policy_id = AAZStrType(
|
||||
serialized_name="exportRoutePolicyId",
|
||||
)
|
||||
properties.import_route_policy = AAZObjectType(
|
||||
serialized_name="importRoutePolicy",
|
||||
)
|
||||
properties.import_route_policy_id = AAZStrType(
|
||||
serialized_name="importRoutePolicyId",
|
||||
)
|
||||
|
@ -216,17 +222,36 @@ class Show(AAZCommand):
|
|||
flags={"read_only": True},
|
||||
)
|
||||
|
||||
disabled_on_resources = cls._schema_on_200.properties.disabled_on_resources
|
||||
disabled_on_resources.Element = AAZStrType()
|
||||
export_route_policy = cls._schema_on_200.properties.export_route_policy
|
||||
export_route_policy.export_ipv4_route_policy_id = AAZStrType(
|
||||
serialized_name="exportIpv4RoutePolicyId",
|
||||
)
|
||||
export_route_policy.export_ipv6_route_policy_id = AAZStrType(
|
||||
serialized_name="exportIpv6RoutePolicyId",
|
||||
)
|
||||
|
||||
import_route_policy = cls._schema_on_200.properties.import_route_policy
|
||||
import_route_policy.import_ipv4_route_policy_id = AAZStrType(
|
||||
serialized_name="importIpv4RoutePolicyId",
|
||||
)
|
||||
import_route_policy.import_ipv6_route_policy_id = AAZStrType(
|
||||
serialized_name="importIpv6RoutePolicyId",
|
||||
)
|
||||
|
||||
option_a_properties = cls._schema_on_200.properties.option_a_properties
|
||||
option_a_properties.bfd_configuration = AAZObjectType(
|
||||
serialized_name="bfdConfiguration",
|
||||
)
|
||||
option_a_properties.egress_acl_id = AAZStrType(
|
||||
serialized_name="egressAclId",
|
||||
)
|
||||
option_a_properties.fabric_asn = AAZIntType(
|
||||
serialized_name="fabricASN",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
option_a_properties.ingress_acl_id = AAZStrType(
|
||||
serialized_name="ingressAclId",
|
||||
)
|
||||
option_a_properties.mtu = AAZIntType()
|
||||
option_a_properties.peer_asn = AAZIntType(
|
||||
serialized_name="peerASN",
|
||||
|
@ -254,12 +279,10 @@ class Show(AAZCommand):
|
|||
serialized_name="administrativeState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
bfd_configuration.interval = AAZIntType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
bfd_configuration.multiplier = AAZIntType(
|
||||
flags={"read_only": True},
|
||||
bfd_configuration.interval_in_milli_seconds = AAZIntType(
|
||||
serialized_name="intervalInMilliSeconds",
|
||||
)
|
||||
bfd_configuration.multiplier = AAZIntType()
|
||||
|
||||
option_b_properties = cls._schema_on_200.properties.option_b_properties
|
||||
option_b_properties.export_route_targets = AAZListType(
|
||||
|
@ -268,6 +291,9 @@ class Show(AAZCommand):
|
|||
option_b_properties.import_route_targets = AAZListType(
|
||||
serialized_name="importRouteTargets",
|
||||
)
|
||||
option_b_properties.route_targets = AAZObjectType(
|
||||
serialized_name="routeTargets",
|
||||
)
|
||||
|
||||
export_route_targets = cls._schema_on_200.properties.option_b_properties.export_route_targets
|
||||
export_route_targets.Element = AAZStrType()
|
||||
|
@ -275,6 +301,32 @@ class Show(AAZCommand):
|
|||
import_route_targets = cls._schema_on_200.properties.option_b_properties.import_route_targets
|
||||
import_route_targets.Element = AAZStrType()
|
||||
|
||||
route_targets = cls._schema_on_200.properties.option_b_properties.route_targets
|
||||
route_targets.export_ipv4_route_targets = AAZListType(
|
||||
serialized_name="exportIpv4RouteTargets",
|
||||
)
|
||||
route_targets.export_ipv6_route_targets = AAZListType(
|
||||
serialized_name="exportIpv6RouteTargets",
|
||||
)
|
||||
route_targets.import_ipv4_route_targets = AAZListType(
|
||||
serialized_name="importIpv4RouteTargets",
|
||||
)
|
||||
route_targets.import_ipv6_route_targets = AAZListType(
|
||||
serialized_name="importIpv6RouteTargets",
|
||||
)
|
||||
|
||||
export_ipv4_route_targets = cls._schema_on_200.properties.option_b_properties.route_targets.export_ipv4_route_targets
|
||||
export_ipv4_route_targets.Element = AAZStrType()
|
||||
|
||||
export_ipv6_route_targets = cls._schema_on_200.properties.option_b_properties.route_targets.export_ipv6_route_targets
|
||||
export_ipv6_route_targets.Element = AAZStrType()
|
||||
|
||||
import_ipv4_route_targets = cls._schema_on_200.properties.option_b_properties.route_targets.import_ipv4_route_targets
|
||||
import_ipv4_route_targets.Element = AAZStrType()
|
||||
|
||||
import_ipv6_route_targets = cls._schema_on_200.properties.option_b_properties.route_targets.import_ipv6_route_targets
|
||||
import_ipv6_route_targets.Element = AAZStrType()
|
||||
|
||||
system_data = cls._schema_on_200.system_data
|
||||
system_data.created_at = AAZStrType(
|
||||
serialized_name="createdAt",
|
||||
|
|
|
@ -0,0 +1,665 @@
|
|||
# --------------------------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
#
|
||||
# Code generated by aaz-dev-tools
|
||||
# --------------------------------------------------------------------------------------------
|
||||
|
||||
# pylint: skip-file
|
||||
# flake8: noqa
|
||||
|
||||
from azure.cli.core.aaz import *
|
||||
|
||||
|
||||
@register_command(
|
||||
"networkfabric externalnetwork update",
|
||||
)
|
||||
class Update(AAZCommand):
|
||||
"""Update the External Networks resource.
|
||||
|
||||
:example: Update the External Network with option B properties
|
||||
az networkfabric externalnetwork update --resource-group "example-rg" --l3domain "example-l3domain" --resource-name "example-externalNetwork" --peering-option "OptionB" --option-b-properties "{routeTargets:{exportIpv4RouteTargets:['65046:10039'],exportIpv6RouteTargets:['65046:10039'],importIpv4RouteTargets:['65046:10039'],importIpv6RouteTargets:['65046:10039']}}" --import-route-policy "{importIpv4RoutePolicyId:'/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/microsoft.managednetworkfabric/routePolicies/example-routepolicy',importIpv6RoutePolicyId:'/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/microsoft.managednetworkfabric/routePolicies/example-routepolicy'}" --export-route-policy "{exportIpv4RoutePolicyId:'/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/microsoft.managednetworkfabric/routePolicies/example-routepolicy',exportIpv6RoutePolicyId:'/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/microsoft.managednetworkfabric/routePolicies/example-routepolicy'}"
|
||||
|
||||
:example: Update the External Network with option A properties
|
||||
az networkfabric externalnetwork update --resource-group "example-rg" --l3domain "example-l3domain" --resource-name "example-externalNetwork" --peering-option "OptionA" --option-a-properties "{peerASN:65234,vlanId:501,mtu:1500,primaryIpv4Prefix:'172.23.1.0/31',secondaryIpv4Prefix:'172.23.1.2/31',bfdConfiguration:{multiplier:5,intervalInMilliSeconds:300}}" --import-route-policy "{importIpv4RoutePolicyId:'/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/microsoft.managednetworkfabric/routePolicies/example-routepolicy',importIpv6RoutePolicyId:'/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/microsoft.managednetworkfabric/routePolicies/example-routepolicy'}" --export-route-policy "{exportIpv4RoutePolicyId:'/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/microsoft.managednetworkfabric/routePolicies/example-routepolicy',exportIpv6RoutePolicyId:'/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/microsoft.managednetworkfabric/routePolicies/example-routepolicy'}"
|
||||
|
||||
:example: Help text for sub parameters under the specific parent can be viewed by using the shorthand syntax '??'. See https://github.com/Azure/azure-cli/tree/dev/doc/shorthand_syntax.md for more about shorthand syntax.
|
||||
az networkfabric externalnetwork update --option-a-properties ??
|
||||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/l3isolationdomains/{}/externalnetworks/{}", "2023-06-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 External Network.",
|
||||
required=True,
|
||||
id_part="child_name_1",
|
||||
)
|
||||
_args_schema.l3_isolation_domain_name = AAZStrArg(
|
||||
options=["--l3domain", "--l3-isolation-domain-name"],
|
||||
help="Name of the L3 Isolation Domain.",
|
||||
required=True,
|
||||
id_part="name",
|
||||
)
|
||||
_args_schema.resource_group = AAZResourceGroupNameArg(
|
||||
help="Name of the resource group",
|
||||
required=True,
|
||||
)
|
||||
|
||||
# define Arg Group "Properties"
|
||||
|
||||
_args_schema = cls._args_schema
|
||||
_args_schema.annotation = AAZStrArg(
|
||||
options=["--annotation"],
|
||||
arg_group="Properties",
|
||||
help="Description for underlying resource.",
|
||||
)
|
||||
_args_schema.export_route_policy = AAZObjectArg(
|
||||
options=["--export-route-policy"],
|
||||
arg_group="Properties",
|
||||
help="Export Route Policy either IPv4 or IPv6.",
|
||||
)
|
||||
_args_schema.export_route_policy_id = AAZResourceIdArg(
|
||||
options=["--export-route-policy-id"],
|
||||
arg_group="Properties",
|
||||
help="ARM Resource ID of the RoutePolicy. This is used for the backward compatibility.",
|
||||
)
|
||||
_args_schema.import_route_policy = AAZObjectArg(
|
||||
options=["--import-route-policy"],
|
||||
arg_group="Properties",
|
||||
help="Import Route Policy either IPv4 or IPv6.",
|
||||
)
|
||||
_args_schema.import_route_policy_id = AAZResourceIdArg(
|
||||
options=["--import-route-policy-id"],
|
||||
arg_group="Properties",
|
||||
help="ARM Resource ID of the RoutePolicy. This is used for the backward compatibility.",
|
||||
)
|
||||
_args_schema.option_a_properties = AAZObjectArg(
|
||||
options=["--option-a-properties"],
|
||||
arg_group="Properties",
|
||||
help="option A properties object.",
|
||||
)
|
||||
_args_schema.option_b_properties = AAZObjectArg(
|
||||
options=["--option-b-properties"],
|
||||
arg_group="Properties",
|
||||
help="option B properties object.",
|
||||
)
|
||||
_args_schema.peering_option = AAZStrArg(
|
||||
options=["--peering-option"],
|
||||
arg_group="Properties",
|
||||
help="Peering option list.",
|
||||
enum={"OptionA": "OptionA", "OptionB": "OptionB"},
|
||||
)
|
||||
|
||||
export_route_policy = cls._args_schema.export_route_policy
|
||||
export_route_policy.export_ipv4_route_policy_id = AAZResourceIdArg(
|
||||
options=["export-ipv4-route-policy-id"],
|
||||
help="ARM resource ID of RoutePolicy.",
|
||||
)
|
||||
export_route_policy.export_ipv6_route_policy_id = AAZResourceIdArg(
|
||||
options=["export-ipv6-route-policy-id"],
|
||||
help="ARM resource ID of RoutePolicy.",
|
||||
)
|
||||
|
||||
import_route_policy = cls._args_schema.import_route_policy
|
||||
import_route_policy.import_ipv4_route_policy_id = AAZResourceIdArg(
|
||||
options=["import-ipv4-route-policy-id"],
|
||||
help="ARM resource ID of RoutePolicy.",
|
||||
)
|
||||
import_route_policy.import_ipv6_route_policy_id = AAZResourceIdArg(
|
||||
options=["import-ipv6-route-policy-id"],
|
||||
help="ARM resource ID of RoutePolicy.",
|
||||
)
|
||||
|
||||
option_a_properties = cls._args_schema.option_a_properties
|
||||
option_a_properties.bfd_configuration = AAZObjectArg(
|
||||
options=["bfd-configuration"],
|
||||
help="BFD configuration properties.",
|
||||
)
|
||||
option_a_properties.egress_acl_id = AAZResourceIdArg(
|
||||
options=["egress-acl-id"],
|
||||
help="Egress Acl ARM resource ID.",
|
||||
)
|
||||
option_a_properties.ingress_acl_id = AAZResourceIdArg(
|
||||
options=["ingress-acl-id"],
|
||||
help="Ingress Acl ARM resource ID.",
|
||||
)
|
||||
option_a_properties.mtu = AAZIntArg(
|
||||
options=["mtu"],
|
||||
help="MTU to use for option A peering. The value should be between 64 to 9200. Default Value is 1500. Example: 1650",
|
||||
fmt=AAZIntArgFormat(
|
||||
maximum=9200,
|
||||
minimum=64,
|
||||
),
|
||||
)
|
||||
option_a_properties.peer_asn = AAZIntArg(
|
||||
options=["peer-asn"],
|
||||
help="Peer ASN number. The value should be between 1 to 4294967295. Example: 28.",
|
||||
fmt=AAZIntArgFormat(
|
||||
maximum=4294967295,
|
||||
minimum=1,
|
||||
),
|
||||
)
|
||||
option_a_properties.primary_ipv4_prefix = AAZStrArg(
|
||||
options=["primary-ipv4-prefix"],
|
||||
help="IPv4 Address Prefix. Example: 172.23.1.0/31.",
|
||||
)
|
||||
option_a_properties.primary_ipv6_prefix = AAZStrArg(
|
||||
options=["primary-ipv6-prefix"],
|
||||
help="IPv6 Address Prefix. Example: 3FFE:FFFF:0:CD30::a1/127",
|
||||
)
|
||||
option_a_properties.secondary_ipv4_prefix = AAZStrArg(
|
||||
options=["secondary-ipv4-prefix"],
|
||||
help="Secondary IPv4 Address Prefix. Example: 172.23.1.2/31.",
|
||||
)
|
||||
option_a_properties.secondary_ipv6_prefix = AAZStrArg(
|
||||
options=["secondary-ipv6-prefix"],
|
||||
help="Secondary IPv6 Address Prefix. Example: 3FFE:FFFF:0:CD30::a4/127",
|
||||
)
|
||||
option_a_properties.vlan_id = AAZIntArg(
|
||||
options=["vlan-id"],
|
||||
help="Vlan identifier. The value should be between 501 to 4094. Example : 501",
|
||||
fmt=AAZIntArgFormat(
|
||||
maximum=4094,
|
||||
minimum=501,
|
||||
),
|
||||
)
|
||||
|
||||
bfd_configuration = cls._args_schema.option_a_properties.bfd_configuration
|
||||
bfd_configuration.interval_in_milli_seconds = AAZIntArg(
|
||||
options=["interval-in-milli-seconds"],
|
||||
help="Interval in milliseconds. Default Value is 300. Example: 300.",
|
||||
)
|
||||
bfd_configuration.multiplier = AAZIntArg(
|
||||
options=["multiplier"],
|
||||
help="Multiplier for the Bfd Configuration. Default Value is 5. Example: 5.",
|
||||
)
|
||||
|
||||
option_b_properties = cls._args_schema.option_b_properties
|
||||
option_b_properties.export_route_targets = AAZListArg(
|
||||
options=["export-route-targets"],
|
||||
help="RouteTargets to be applied. This is used for the backward compatibility.",
|
||||
)
|
||||
option_b_properties.import_route_targets = AAZListArg(
|
||||
options=["import-route-targets"],
|
||||
help="RouteTargets to be applied. This is used for the backward compatibility.",
|
||||
)
|
||||
option_b_properties.route_targets = AAZObjectArg(
|
||||
options=["route-targets"],
|
||||
help="RouteTargets to be applied.",
|
||||
)
|
||||
|
||||
export_route_targets = cls._args_schema.option_b_properties.export_route_targets
|
||||
export_route_targets.Element = AAZStrArg()
|
||||
|
||||
import_route_targets = cls._args_schema.option_b_properties.import_route_targets
|
||||
import_route_targets.Element = AAZStrArg()
|
||||
|
||||
route_targets = cls._args_schema.option_b_properties.route_targets
|
||||
route_targets.export_ipv4_route_targets = AAZListArg(
|
||||
options=["export-ipv4-route-targets"],
|
||||
help="Route Targets to be applied for outgoing routes into CE.",
|
||||
)
|
||||
route_targets.export_ipv6_route_targets = AAZListArg(
|
||||
options=["export-ipv6-route-targets"],
|
||||
help="Route Targets to be applied for outgoing routes from CE.",
|
||||
)
|
||||
route_targets.import_ipv4_route_targets = AAZListArg(
|
||||
options=["import-ipv4-route-targets"],
|
||||
help="Route Targets to be applied for incoming routes into CE.",
|
||||
)
|
||||
route_targets.import_ipv6_route_targets = AAZListArg(
|
||||
options=["import-ipv6-route-targets"],
|
||||
help="Route Targets to be applied for incoming routes from CE.",
|
||||
)
|
||||
|
||||
export_ipv4_route_targets = cls._args_schema.option_b_properties.route_targets.export_ipv4_route_targets
|
||||
export_ipv4_route_targets.Element = AAZStrArg(
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
|
||||
export_ipv6_route_targets = cls._args_schema.option_b_properties.route_targets.export_ipv6_route_targets
|
||||
export_ipv6_route_targets.Element = AAZStrArg(
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
|
||||
import_ipv4_route_targets = cls._args_schema.option_b_properties.route_targets.import_ipv4_route_targets
|
||||
import_ipv4_route_targets.Element = AAZStrArg(
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
|
||||
import_ipv6_route_targets = cls._args_schema.option_b_properties.route_targets.import_ipv6_route_targets
|
||||
import_ipv6_route_targets.Element = AAZStrArg(
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
return cls._args_schema
|
||||
|
||||
def _execute_operations(self):
|
||||
self.pre_operations()
|
||||
yield self.ExternalNetworksUpdate(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 ExternalNetworksUpdate(AAZHttpOperation):
|
||||
CLIENT_TYPE = "MgmtClient"
|
||||
|
||||
def __call__(self, *args, **kwargs):
|
||||
request = self.make_request()
|
||||
session = self.client.send_request(request=request, stream=False, **kwargs)
|
||||
if session.http_response.status_code in [202]:
|
||||
return self.client.build_lro_polling(
|
||||
self.ctx.args.no_wait,
|
||||
session,
|
||||
self.on_200,
|
||||
self.on_error,
|
||||
lro_options={"final-state-via": "location"},
|
||||
path_format_arguments=self.url_parameters,
|
||||
)
|
||||
if session.http_response.status_code in [200]:
|
||||
return self.client.build_lro_polling(
|
||||
self.ctx.args.no_wait,
|
||||
session,
|
||||
self.on_200,
|
||||
self.on_error,
|
||||
lro_options={"final-state-via": "location"},
|
||||
path_format_arguments=self.url_parameters,
|
||||
)
|
||||
|
||||
return self.on_error(session.http_response)
|
||||
|
||||
@property
|
||||
def url(self):
|
||||
return self.client.format_url(
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}",
|
||||
**self.url_parameters
|
||||
)
|
||||
|
||||
@property
|
||||
def method(self):
|
||||
return "PATCH"
|
||||
|
||||
@property
|
||||
def error_format(self):
|
||||
return "MgmtErrorFormat"
|
||||
|
||||
@property
|
||||
def url_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_url_param(
|
||||
"externalNetworkName", self.ctx.args.resource_name,
|
||||
required=True,
|
||||
),
|
||||
**self.serialize_url_param(
|
||||
"l3IsolationDomainName", self.ctx.args.l3_isolation_domain_name,
|
||||
required=True,
|
||||
),
|
||||
**self.serialize_url_param(
|
||||
"resourceGroupName", self.ctx.args.resource_group,
|
||||
required=True,
|
||||
),
|
||||
**self.serialize_url_param(
|
||||
"subscriptionId", self.ctx.subscription_id,
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
return parameters
|
||||
|
||||
@property
|
||||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
return parameters
|
||||
|
||||
@property
|
||||
def header_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_header_param(
|
||||
"Content-Type", "application/json",
|
||||
),
|
||||
**self.serialize_header_param(
|
||||
"Accept", "application/json",
|
||||
),
|
||||
}
|
||||
return parameters
|
||||
|
||||
@property
|
||||
def content(self):
|
||||
_content_value, _builder = self.new_content_builder(
|
||||
self.ctx.args,
|
||||
typ=AAZObjectType,
|
||||
typ_kwargs={"flags": {"required": True, "client_flatten": True}}
|
||||
)
|
||||
_builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
|
||||
|
||||
properties = _builder.get(".properties")
|
||||
if properties is not None:
|
||||
properties.set_prop("annotation", AAZStrType, ".annotation")
|
||||
properties.set_prop("exportRoutePolicy", AAZObjectType, ".export_route_policy")
|
||||
properties.set_prop("exportRoutePolicyId", AAZStrType, ".export_route_policy_id")
|
||||
properties.set_prop("importRoutePolicy", AAZObjectType, ".import_route_policy")
|
||||
properties.set_prop("importRoutePolicyId", AAZStrType, ".import_route_policy_id")
|
||||
properties.set_prop("optionAProperties", AAZObjectType, ".option_a_properties")
|
||||
properties.set_prop("optionBProperties", AAZObjectType, ".option_b_properties")
|
||||
properties.set_prop("peeringOption", AAZStrType, ".peering_option")
|
||||
|
||||
export_route_policy = _builder.get(".properties.exportRoutePolicy")
|
||||
if export_route_policy is not None:
|
||||
export_route_policy.set_prop("exportIpv4RoutePolicyId", AAZStrType, ".export_ipv4_route_policy_id")
|
||||
export_route_policy.set_prop("exportIpv6RoutePolicyId", AAZStrType, ".export_ipv6_route_policy_id")
|
||||
|
||||
import_route_policy = _builder.get(".properties.importRoutePolicy")
|
||||
if import_route_policy is not None:
|
||||
import_route_policy.set_prop("importIpv4RoutePolicyId", AAZStrType, ".import_ipv4_route_policy_id")
|
||||
import_route_policy.set_prop("importIpv6RoutePolicyId", AAZStrType, ".import_ipv6_route_policy_id")
|
||||
|
||||
option_a_properties = _builder.get(".properties.optionAProperties")
|
||||
if option_a_properties is not None:
|
||||
option_a_properties.set_prop("bfdConfiguration", AAZObjectType, ".bfd_configuration")
|
||||
option_a_properties.set_prop("egressAclId", AAZStrType, ".egress_acl_id")
|
||||
option_a_properties.set_prop("ingressAclId", AAZStrType, ".ingress_acl_id")
|
||||
option_a_properties.set_prop("mtu", AAZIntType, ".mtu")
|
||||
option_a_properties.set_prop("peerASN", AAZIntType, ".peer_asn")
|
||||
option_a_properties.set_prop("primaryIpv4Prefix", AAZStrType, ".primary_ipv4_prefix")
|
||||
option_a_properties.set_prop("primaryIpv6Prefix", AAZStrType, ".primary_ipv6_prefix")
|
||||
option_a_properties.set_prop("secondaryIpv4Prefix", AAZStrType, ".secondary_ipv4_prefix")
|
||||
option_a_properties.set_prop("secondaryIpv6Prefix", AAZStrType, ".secondary_ipv6_prefix")
|
||||
option_a_properties.set_prop("vlanId", AAZIntType, ".vlan_id")
|
||||
|
||||
bfd_configuration = _builder.get(".properties.optionAProperties.bfdConfiguration")
|
||||
if bfd_configuration is not None:
|
||||
bfd_configuration.set_prop("intervalInMilliSeconds", AAZIntType, ".interval_in_milli_seconds")
|
||||
bfd_configuration.set_prop("multiplier", AAZIntType, ".multiplier")
|
||||
|
||||
option_b_properties = _builder.get(".properties.optionBProperties")
|
||||
if option_b_properties is not None:
|
||||
option_b_properties.set_prop("exportRouteTargets", AAZListType, ".export_route_targets")
|
||||
option_b_properties.set_prop("importRouteTargets", AAZListType, ".import_route_targets")
|
||||
option_b_properties.set_prop("routeTargets", AAZObjectType, ".route_targets")
|
||||
|
||||
export_route_targets = _builder.get(".properties.optionBProperties.exportRouteTargets")
|
||||
if export_route_targets is not None:
|
||||
export_route_targets.set_elements(AAZStrType, ".")
|
||||
|
||||
import_route_targets = _builder.get(".properties.optionBProperties.importRouteTargets")
|
||||
if import_route_targets is not None:
|
||||
import_route_targets.set_elements(AAZStrType, ".")
|
||||
|
||||
route_targets = _builder.get(".properties.optionBProperties.routeTargets")
|
||||
if route_targets is not None:
|
||||
route_targets.set_prop("exportIpv4RouteTargets", AAZListType, ".export_ipv4_route_targets")
|
||||
route_targets.set_prop("exportIpv6RouteTargets", AAZListType, ".export_ipv6_route_targets")
|
||||
route_targets.set_prop("importIpv4RouteTargets", AAZListType, ".import_ipv4_route_targets")
|
||||
route_targets.set_prop("importIpv6RouteTargets", AAZListType, ".import_ipv6_route_targets")
|
||||
|
||||
export_ipv4_route_targets = _builder.get(".properties.optionBProperties.routeTargets.exportIpv4RouteTargets")
|
||||
if export_ipv4_route_targets is not None:
|
||||
export_ipv4_route_targets.set_elements(AAZStrType, ".")
|
||||
|
||||
export_ipv6_route_targets = _builder.get(".properties.optionBProperties.routeTargets.exportIpv6RouteTargets")
|
||||
if export_ipv6_route_targets is not None:
|
||||
export_ipv6_route_targets.set_elements(AAZStrType, ".")
|
||||
|
||||
import_ipv4_route_targets = _builder.get(".properties.optionBProperties.routeTargets.importIpv4RouteTargets")
|
||||
if import_ipv4_route_targets is not None:
|
||||
import_ipv4_route_targets.set_elements(AAZStrType, ".")
|
||||
|
||||
import_ipv6_route_targets = _builder.get(".properties.optionBProperties.routeTargets.importIpv6RouteTargets")
|
||||
if import_ipv6_route_targets is not None:
|
||||
import_ipv6_route_targets.set_elements(AAZStrType, ".")
|
||||
|
||||
return self.serialize_content(_content_value)
|
||||
|
||||
def on_200(self, session):
|
||||
data = self.deserialize_http_content(session)
|
||||
self.ctx.set_var(
|
||||
"instance",
|
||||
data,
|
||||
schema_builder=self._build_schema_on_200
|
||||
)
|
||||
|
||||
_schema_on_200 = None
|
||||
|
||||
@classmethod
|
||||
def _build_schema_on_200(cls):
|
||||
if cls._schema_on_200 is not None:
|
||||
return cls._schema_on_200
|
||||
|
||||
cls._schema_on_200 = AAZObjectType()
|
||||
|
||||
_schema_on_200 = cls._schema_on_200
|
||||
_schema_on_200.id = AAZStrType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_schema_on_200.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.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.export_route_policy = AAZObjectType(
|
||||
serialized_name="exportRoutePolicy",
|
||||
)
|
||||
properties.export_route_policy_id = AAZStrType(
|
||||
serialized_name="exportRoutePolicyId",
|
||||
)
|
||||
properties.import_route_policy = AAZObjectType(
|
||||
serialized_name="importRoutePolicy",
|
||||
)
|
||||
properties.import_route_policy_id = AAZStrType(
|
||||
serialized_name="importRoutePolicyId",
|
||||
)
|
||||
properties.network_to_network_interconnect_id = AAZStrType(
|
||||
serialized_name="networkToNetworkInterconnectId",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.option_a_properties = AAZObjectType(
|
||||
serialized_name="optionAProperties",
|
||||
)
|
||||
properties.option_b_properties = AAZObjectType(
|
||||
serialized_name="optionBProperties",
|
||||
)
|
||||
properties.peering_option = AAZStrType(
|
||||
serialized_name="peeringOption",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.provisioning_state = AAZStrType(
|
||||
serialized_name="provisioningState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
|
||||
export_route_policy = cls._schema_on_200.properties.export_route_policy
|
||||
export_route_policy.export_ipv4_route_policy_id = AAZStrType(
|
||||
serialized_name="exportIpv4RoutePolicyId",
|
||||
)
|
||||
export_route_policy.export_ipv6_route_policy_id = AAZStrType(
|
||||
serialized_name="exportIpv6RoutePolicyId",
|
||||
)
|
||||
|
||||
import_route_policy = cls._schema_on_200.properties.import_route_policy
|
||||
import_route_policy.import_ipv4_route_policy_id = AAZStrType(
|
||||
serialized_name="importIpv4RoutePolicyId",
|
||||
)
|
||||
import_route_policy.import_ipv6_route_policy_id = AAZStrType(
|
||||
serialized_name="importIpv6RoutePolicyId",
|
||||
)
|
||||
|
||||
option_a_properties = cls._schema_on_200.properties.option_a_properties
|
||||
option_a_properties.bfd_configuration = AAZObjectType(
|
||||
serialized_name="bfdConfiguration",
|
||||
)
|
||||
option_a_properties.egress_acl_id = AAZStrType(
|
||||
serialized_name="egressAclId",
|
||||
)
|
||||
option_a_properties.fabric_asn = AAZIntType(
|
||||
serialized_name="fabricASN",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
option_a_properties.ingress_acl_id = AAZStrType(
|
||||
serialized_name="ingressAclId",
|
||||
)
|
||||
option_a_properties.mtu = AAZIntType()
|
||||
option_a_properties.peer_asn = AAZIntType(
|
||||
serialized_name="peerASN",
|
||||
flags={"required": True},
|
||||
)
|
||||
option_a_properties.primary_ipv4_prefix = AAZStrType(
|
||||
serialized_name="primaryIpv4Prefix",
|
||||
)
|
||||
option_a_properties.primary_ipv6_prefix = AAZStrType(
|
||||
serialized_name="primaryIpv6Prefix",
|
||||
)
|
||||
option_a_properties.secondary_ipv4_prefix = AAZStrType(
|
||||
serialized_name="secondaryIpv4Prefix",
|
||||
)
|
||||
option_a_properties.secondary_ipv6_prefix = AAZStrType(
|
||||
serialized_name="secondaryIpv6Prefix",
|
||||
)
|
||||
option_a_properties.vlan_id = AAZIntType(
|
||||
serialized_name="vlanId",
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
bfd_configuration = cls._schema_on_200.properties.option_a_properties.bfd_configuration
|
||||
bfd_configuration.administrative_state = AAZStrType(
|
||||
serialized_name="administrativeState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
bfd_configuration.interval_in_milli_seconds = AAZIntType(
|
||||
serialized_name="intervalInMilliSeconds",
|
||||
)
|
||||
bfd_configuration.multiplier = AAZIntType()
|
||||
|
||||
option_b_properties = cls._schema_on_200.properties.option_b_properties
|
||||
option_b_properties.export_route_targets = AAZListType(
|
||||
serialized_name="exportRouteTargets",
|
||||
)
|
||||
option_b_properties.import_route_targets = AAZListType(
|
||||
serialized_name="importRouteTargets",
|
||||
)
|
||||
option_b_properties.route_targets = AAZObjectType(
|
||||
serialized_name="routeTargets",
|
||||
)
|
||||
|
||||
export_route_targets = cls._schema_on_200.properties.option_b_properties.export_route_targets
|
||||
export_route_targets.Element = AAZStrType()
|
||||
|
||||
import_route_targets = cls._schema_on_200.properties.option_b_properties.import_route_targets
|
||||
import_route_targets.Element = AAZStrType()
|
||||
|
||||
route_targets = cls._schema_on_200.properties.option_b_properties.route_targets
|
||||
route_targets.export_ipv4_route_targets = AAZListType(
|
||||
serialized_name="exportIpv4RouteTargets",
|
||||
)
|
||||
route_targets.export_ipv6_route_targets = AAZListType(
|
||||
serialized_name="exportIpv6RouteTargets",
|
||||
)
|
||||
route_targets.import_ipv4_route_targets = AAZListType(
|
||||
serialized_name="importIpv4RouteTargets",
|
||||
)
|
||||
route_targets.import_ipv6_route_targets = AAZListType(
|
||||
serialized_name="importIpv6RouteTargets",
|
||||
)
|
||||
|
||||
export_ipv4_route_targets = cls._schema_on_200.properties.option_b_properties.route_targets.export_ipv4_route_targets
|
||||
export_ipv4_route_targets.Element = AAZStrType()
|
||||
|
||||
export_ipv6_route_targets = cls._schema_on_200.properties.option_b_properties.route_targets.export_ipv6_route_targets
|
||||
export_ipv6_route_targets.Element = AAZStrType()
|
||||
|
||||
import_ipv4_route_targets = cls._schema_on_200.properties.option_b_properties.route_targets.import_ipv4_route_targets
|
||||
import_ipv4_route_targets.Element = AAZStrType()
|
||||
|
||||
import_ipv6_route_targets = cls._schema_on_200.properties.option_b_properties.route_targets.import_ipv6_route_targets
|
||||
import_ipv6_route_targets.Element = AAZStrType()
|
||||
|
||||
system_data = cls._schema_on_200.system_data
|
||||
system_data.created_at = AAZStrType(
|
||||
serialized_name="createdAt",
|
||||
)
|
||||
system_data.created_by = AAZStrType(
|
||||
serialized_name="createdBy",
|
||||
)
|
||||
system_data.created_by_type = AAZStrType(
|
||||
serialized_name="createdByType",
|
||||
)
|
||||
system_data.last_modified_at = AAZStrType(
|
||||
serialized_name="lastModifiedAt",
|
||||
)
|
||||
system_data.last_modified_by = AAZStrType(
|
||||
serialized_name="lastModifiedBy",
|
||||
)
|
||||
system_data.last_modified_by_type = AAZStrType(
|
||||
serialized_name="lastModifiedByType",
|
||||
)
|
||||
|
||||
return cls._schema_on_200
|
||||
|
||||
|
||||
class _UpdateHelper:
|
||||
"""Helper class for Update"""
|
||||
|
||||
|
||||
__all__ = ["Update"]
|
|
@ -20,7 +20,7 @@ class Wait(AAZWaitCommand):
|
|||
|
||||
_aaz_info = {
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/l3isolationdomains/{}/externalnetworks/{}", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/l3isolationdomains/{}/externalnetworks/{}", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -42,13 +42,13 @@ class Wait(AAZWaitCommand):
|
|||
_args_schema = cls._args_schema
|
||||
_args_schema.resource_name = AAZStrArg(
|
||||
options=["--resource-name"],
|
||||
help="Name of the ExternalNetwork",
|
||||
help="Name of the External Network.",
|
||||
required=True,
|
||||
id_part="child_name_1",
|
||||
)
|
||||
_args_schema.l3_isolation_domain_name = AAZStrArg(
|
||||
options=["--l3domain", "--l3-isolation-domain-name"],
|
||||
help="Name of the L3IsolationDomain",
|
||||
help="Name of the L3 Isolation Domain.",
|
||||
required=True,
|
||||
id_part="name",
|
||||
)
|
||||
|
@ -127,7 +127,7 @@ class Wait(AAZWaitCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
@ -183,13 +183,19 @@ class Wait(AAZWaitCommand):
|
|||
flags={"read_only": True},
|
||||
)
|
||||
properties.annotation = AAZStrType()
|
||||
properties.disabled_on_resources = AAZListType(
|
||||
serialized_name="disabledOnResources",
|
||||
properties.configuration_state = AAZStrType(
|
||||
serialized_name="configurationState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.export_route_policy = AAZObjectType(
|
||||
serialized_name="exportRoutePolicy",
|
||||
)
|
||||
properties.export_route_policy_id = AAZStrType(
|
||||
serialized_name="exportRoutePolicyId",
|
||||
)
|
||||
properties.import_route_policy = AAZObjectType(
|
||||
serialized_name="importRoutePolicy",
|
||||
)
|
||||
properties.import_route_policy_id = AAZStrType(
|
||||
serialized_name="importRoutePolicyId",
|
||||
)
|
||||
|
@ -212,17 +218,36 @@ class Wait(AAZWaitCommand):
|
|||
flags={"read_only": True},
|
||||
)
|
||||
|
||||
disabled_on_resources = cls._schema_on_200.properties.disabled_on_resources
|
||||
disabled_on_resources.Element = AAZStrType()
|
||||
export_route_policy = cls._schema_on_200.properties.export_route_policy
|
||||
export_route_policy.export_ipv4_route_policy_id = AAZStrType(
|
||||
serialized_name="exportIpv4RoutePolicyId",
|
||||
)
|
||||
export_route_policy.export_ipv6_route_policy_id = AAZStrType(
|
||||
serialized_name="exportIpv6RoutePolicyId",
|
||||
)
|
||||
|
||||
import_route_policy = cls._schema_on_200.properties.import_route_policy
|
||||
import_route_policy.import_ipv4_route_policy_id = AAZStrType(
|
||||
serialized_name="importIpv4RoutePolicyId",
|
||||
)
|
||||
import_route_policy.import_ipv6_route_policy_id = AAZStrType(
|
||||
serialized_name="importIpv6RoutePolicyId",
|
||||
)
|
||||
|
||||
option_a_properties = cls._schema_on_200.properties.option_a_properties
|
||||
option_a_properties.bfd_configuration = AAZObjectType(
|
||||
serialized_name="bfdConfiguration",
|
||||
)
|
||||
option_a_properties.egress_acl_id = AAZStrType(
|
||||
serialized_name="egressAclId",
|
||||
)
|
||||
option_a_properties.fabric_asn = AAZIntType(
|
||||
serialized_name="fabricASN",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
option_a_properties.ingress_acl_id = AAZStrType(
|
||||
serialized_name="ingressAclId",
|
||||
)
|
||||
option_a_properties.mtu = AAZIntType()
|
||||
option_a_properties.peer_asn = AAZIntType(
|
||||
serialized_name="peerASN",
|
||||
|
@ -250,12 +275,10 @@ class Wait(AAZWaitCommand):
|
|||
serialized_name="administrativeState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
bfd_configuration.interval = AAZIntType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
bfd_configuration.multiplier = AAZIntType(
|
||||
flags={"read_only": True},
|
||||
bfd_configuration.interval_in_milli_seconds = AAZIntType(
|
||||
serialized_name="intervalInMilliSeconds",
|
||||
)
|
||||
bfd_configuration.multiplier = AAZIntType()
|
||||
|
||||
option_b_properties = cls._schema_on_200.properties.option_b_properties
|
||||
option_b_properties.export_route_targets = AAZListType(
|
||||
|
@ -264,6 +287,9 @@ class Wait(AAZWaitCommand):
|
|||
option_b_properties.import_route_targets = AAZListType(
|
||||
serialized_name="importRouteTargets",
|
||||
)
|
||||
option_b_properties.route_targets = AAZObjectType(
|
||||
serialized_name="routeTargets",
|
||||
)
|
||||
|
||||
export_route_targets = cls._schema_on_200.properties.option_b_properties.export_route_targets
|
||||
export_route_targets.Element = AAZStrType()
|
||||
|
@ -271,6 +297,32 @@ class Wait(AAZWaitCommand):
|
|||
import_route_targets = cls._schema_on_200.properties.option_b_properties.import_route_targets
|
||||
import_route_targets.Element = AAZStrType()
|
||||
|
||||
route_targets = cls._schema_on_200.properties.option_b_properties.route_targets
|
||||
route_targets.export_ipv4_route_targets = AAZListType(
|
||||
serialized_name="exportIpv4RouteTargets",
|
||||
)
|
||||
route_targets.export_ipv6_route_targets = AAZListType(
|
||||
serialized_name="exportIpv6RouteTargets",
|
||||
)
|
||||
route_targets.import_ipv4_route_targets = AAZListType(
|
||||
serialized_name="importIpv4RouteTargets",
|
||||
)
|
||||
route_targets.import_ipv6_route_targets = AAZListType(
|
||||
serialized_name="importIpv6RouteTargets",
|
||||
)
|
||||
|
||||
export_ipv4_route_targets = cls._schema_on_200.properties.option_b_properties.route_targets.export_ipv4_route_targets
|
||||
export_ipv4_route_targets.Element = AAZStrType()
|
||||
|
||||
export_ipv6_route_targets = cls._schema_on_200.properties.option_b_properties.route_targets.export_ipv6_route_targets
|
||||
export_ipv6_route_targets.Element = AAZStrType()
|
||||
|
||||
import_ipv4_route_targets = cls._schema_on_200.properties.option_b_properties.route_targets.import_ipv4_route_targets
|
||||
import_ipv4_route_targets.Element = AAZStrType()
|
||||
|
||||
import_ipv6_route_targets = cls._schema_on_200.properties.option_b_properties.route_targets.import_ipv6_route_targets
|
||||
import_ipv6_route_targets.Element = AAZStrType()
|
||||
|
||||
system_data = cls._schema_on_200.system_data
|
||||
system_data.created_at = AAZStrType(
|
||||
serialized_name="createdAt",
|
||||
|
|
|
@ -15,4 +15,5 @@ from ._deprovision import *
|
|||
from ._list import *
|
||||
from ._provision import *
|
||||
from ._show import *
|
||||
from ._update import *
|
||||
from ._wait import *
|
||||
|
|
|
@ -15,13 +15,13 @@ from azure.cli.core.aaz import *
|
|||
"networkfabric fabric create",
|
||||
)
|
||||
class Create(AAZCommand):
|
||||
"""Create a Network Fabric resource.
|
||||
"""Create a Network Fabric resource
|
||||
|
||||
:example: Create a Network Fabric with option B Properties
|
||||
az networkfabric fabric create --resource-group "example-rg" --location "westus3" --resource-name "example-fabric" --nf-sku "fab1" --nfc-id "/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/example-NFC" --fabric-asn 20 --ipv4-prefix 10.1.0.0/19 --rack-count 3 --server-count-per-rack 7 --ts-config "{primaryIpv4Prefix:'172.31.0.0/30',secondaryIpv4Prefix:'172.31.0.20/30',username:'****',password:'*****',serialNumber:'1234'}" --managed-network-config "{infrastructureVpnConfiguration:{peeringOption:OptionB,optionBProperties:{importRouteTargets:['65541:2001','65542:2001'],exportRouteTargets:['65531:1002','65531:1002']}},workloadVpnConfiguration:{peeringOption:OptionB,optionBProperties:{importRouteTargets:['65541:2001','65542:2001'],exportRouteTargets:['65531:1002','65531:1002']}}}"
|
||||
az networkfabric fabric create --resource-group "example-rg" --location "westus3" --resource-name "example-fabric" --nf-sku "fab1" --nfc-id "/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/example-NFC" --fabric-asn 20 --ipv4-prefix 10.1.0.0/19 --rack-count 2 --server-count-per-rack 5 --ts-config "{primaryIpv4Prefix:'172.31.0.0/30',secondaryIpv4Prefix:'172.31.0.20/30',username:'****',password:'*****',serialNumber:'1234'}" --managed-network-config "{infrastructureVpnConfiguration:{networkToNetworkInterconnectId:'/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric/networkToNetworkInterconnects/example-nni',peeringOption:OptionB,optionBProperties:{routeTargets:{exportIpv4RouteTargets:['65046:10039'],exportIpv6RouteTargets:['65046:10039'],importIpv4RouteTargets:['65046:10039'],importIpv6RouteTargets:['65046:10039']}}},workloadVpnConfiguration:{networkToNetworkInterconnectId:'/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric/networkToNetworkInterconnects/example-nni',peeringOption:OptionB,optionBProperties:{routeTargets:{exportIpv4RouteTargets:['65046:10039'],exportIpv6RouteTargets:['65046:10039'],importIpv4RouteTargets:['65046:10039'],importIpv6RouteTargets:['65046:10039']}}}}"
|
||||
|
||||
:example: Create a Network Fabric with option A Properties
|
||||
az networkfabric fabric create --resource-group "example-rg" --location "westus3" --resource-name "example-fabric" --nf-sku "fab1" --nfc-id "/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/example-NFC" --fabric-asn 20 --ipv4-prefix "10.1.0.0/19" --rack-count 3 --server-count-per-rack 7 --ts-config "{primaryIpv4Prefix:'172.31.0.0/30',secondaryIpv4Prefix:'172.31.0.20/30',username:'****',password:'*****',serialNumber:1234}" --managed-network-config "{infrastructureVpnConfiguration:{peeringOption:OptionA,optionAProperties:{mtu:1500,vlanId:520,peerASN:65133,primaryIpv4Prefix:'172.31.0.0/31',secondaryIpv4Prefix:'172.31.0.20/31'}},workloadVpnConfiguration:{peeringOption:OptionA,optionAProperties:{mtu:1500,vlanId:520,peerASN:65133,primaryIpv4Prefix:'172.31.0.0/31',secondaryIpv4Prefix:'172.31.0.20/31'}}}"
|
||||
az networkfabric fabric create --resource-group "example-rg" --location "westus3" --resource-name "example-fabric" --nf-sku "fab1" --nfc-id "/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/example-NFC" --fabric-asn 20 --ipv4-prefix "10.1.0.0/19" --rack-count 2 --server-count-per-rack 5 --ts-config "{primaryIpv4Prefix:'172.31.0.0/30',secondaryIpv4Prefix:'172.31.0.20/30',username:'****',password:'*****',serialNumber:1234}" --managed-network-config "{infrastructureVpnConfiguration:{networkToNetworkInterconnectId:'/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric/networkToNetworkInterconnects/example-nni',peeringOption:OptionA,optionAProperties:{bfdConfiguration:{multiplier:5,intervalInMilliSeconds:300},mtu:1500,vlanId:520,peerASN:65133,primaryIpv4Prefix:'172.31.0.0/31',secondaryIpv4Prefix:'172.31.0.20/31'}},workloadVpnConfiguration:{networkToNetworkInterconnectId:'/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric/networkToNetworkInterconnects/example-nni',peeringOption:OptionA,optionAProperties:{bfdConfiguration:{multiplier:5,intervalInMilliSeconds:300},mtu:1500,vlanId:520,peerASN:65133,primaryIpv4Prefix:'172.31.0.0/31',secondaryIpv4Prefix:'172.31.0.20/31',primaryIpv6Prefix:'3FFE:FFFF:0:CD30::a0/127',secondaryIpv6Prefix:'3FFE:FFFF:0:CD30::a0/127'}}}"
|
||||
|
||||
:example: Help text for sub parameters under the specific parent can be viewed by using the shorthand syntax '??'. See https://github.com/Azure/azure-cli/tree/dev/doc/shorthand_syntax.md for more about shorthand syntax.
|
||||
az networkfabric fabric create --ts-config ??
|
||||
|
@ -30,9 +30,9 @@ class Create(AAZCommand):
|
|||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-02-01-preview",
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkfabrics/{}", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkfabrics/{}", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@ class Create(AAZCommand):
|
|||
_args_schema = cls._args_schema
|
||||
_args_schema.resource_name = AAZStrArg(
|
||||
options=["--resource-name"],
|
||||
help="Name of the Network Fabric",
|
||||
help="Name of the Network Fabric.",
|
||||
required=True,
|
||||
)
|
||||
_args_schema.resource_group = AAZResourceGroupNameArg(
|
||||
|
@ -89,55 +89,70 @@ class Create(AAZCommand):
|
|||
_args_schema.annotation = AAZStrArg(
|
||||
options=["--annotation"],
|
||||
arg_group="Properties",
|
||||
help="Switch configuration description.",
|
||||
help="Description for underlying resource.",
|
||||
)
|
||||
_args_schema.fabric_asn = AAZIntArg(
|
||||
options=["--fabric-asn"],
|
||||
arg_group="Properties",
|
||||
help="ASN of CE devices for CE/PE connectivity. The value should be between 1 to 65535. Example : 65123",
|
||||
help="ASN of CE devices for CE/PE connectivity. The value should be between 1 to 4294967295. Example: 65123",
|
||||
required=True,
|
||||
fmt=AAZIntArgFormat(
|
||||
maximum=65535,
|
||||
maximum=4294967295,
|
||||
minimum=1,
|
||||
),
|
||||
)
|
||||
_args_schema.ipv4_prefix = AAZStrArg(
|
||||
options=["--ipv4-prefix"],
|
||||
arg_group="Properties",
|
||||
help="IPv4Prefix for Management Network. Example : 10.1.0.0/19.",
|
||||
help="IPv4Prefix for Management Network. Example: 10.1.0.0/19.",
|
||||
required=True,
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
_args_schema.ipv6_prefix = AAZStrArg(
|
||||
options=["--ipv6-prefix"],
|
||||
arg_group="Properties",
|
||||
help="IPv6Prefix for Management Network. Example : 3FFE:FFFF:0:CD40::/59.",
|
||||
help="IPv6Prefix for Management Network. Example: 3FFE:FFFF:0:CD40::/59",
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
_args_schema.managed_network_config = AAZObjectArg(
|
||||
options=["--managed-network-config"],
|
||||
arg_group="Properties",
|
||||
help="Configuration to be used to setup the management network.",
|
||||
required=True,
|
||||
)
|
||||
_args_schema.nfc_id = AAZStrArg(
|
||||
_args_schema.nfc_id = AAZResourceIdArg(
|
||||
options=["--nfc-id"],
|
||||
arg_group="Properties",
|
||||
help="Network Fabric Controller ARM resource id",
|
||||
help="Azure resource ID for the NetworkFabricController the NetworkFabric belongs.",
|
||||
required=True,
|
||||
)
|
||||
_args_schema.nf_sku = AAZStrArg(
|
||||
options=["--nf-sku"],
|
||||
arg_group="Properties",
|
||||
help="Fabric SKU id based on the SKU of the BoM that was ordered",
|
||||
help="Supported Network Fabric SKU. The SKU determines whether it is a single / multi rack Network Fabric.",
|
||||
required=True,
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
_args_schema.rack_count = AAZIntArg(
|
||||
options=["--rack-count"],
|
||||
arg_group="Properties",
|
||||
help="Number of racks associated to Network Fabric.Possible values are from 2-8.",
|
||||
help="Number of compute racks associated to Network Fabric. Possible values are from 1-8.",
|
||||
fmt=AAZIntArgFormat(
|
||||
maximum=8,
|
||||
minimum=2,
|
||||
minimum=1,
|
||||
),
|
||||
)
|
||||
_args_schema.server_count_per_rack = AAZIntArg(
|
||||
options=["--server-count-per-rack"],
|
||||
arg_group="Properties",
|
||||
help="Number of servers.Possible values are from 1-16.",
|
||||
required=True,
|
||||
fmt=AAZIntArgFormat(
|
||||
maximum=16,
|
||||
minimum=1,
|
||||
|
@ -147,207 +162,229 @@ class Create(AAZCommand):
|
|||
options=["--ts-config"],
|
||||
arg_group="Properties",
|
||||
help="Network and credentials configuration currently applied to terminal server.",
|
||||
required=True,
|
||||
)
|
||||
|
||||
managed_network_config = cls._args_schema.managed_network_config
|
||||
managed_network_config.infrastructure_vpn_configuration = AAZObjectArg(
|
||||
options=["infrastructure-vpn-configuration"],
|
||||
help="Configuration for infrastructure vpn.",
|
||||
help="VPN Configuration properties.",
|
||||
required=True,
|
||||
)
|
||||
cls._build_args_vpn_configuration_properties_create(managed_network_config.infrastructure_vpn_configuration)
|
||||
managed_network_config.workload_vpn_configuration = AAZObjectArg(
|
||||
options=["workload-vpn-configuration"],
|
||||
help="Configuration for workload vpn.",
|
||||
help="VPN Configuration properties.",
|
||||
required=True,
|
||||
)
|
||||
|
||||
infrastructure_vpn_configuration = cls._args_schema.managed_network_config.infrastructure_vpn_configuration
|
||||
infrastructure_vpn_configuration.option_a_properties = AAZObjectArg(
|
||||
options=["option-a-properties"],
|
||||
help="Peering option A properties.",
|
||||
)
|
||||
infrastructure_vpn_configuration.option_b_properties = AAZObjectArg(
|
||||
options=["option-b-properties"],
|
||||
help="Option B configuration to be used for management vpn.",
|
||||
)
|
||||
infrastructure_vpn_configuration.peering_option = AAZStrArg(
|
||||
options=["peering-option"],
|
||||
help="Peering option list.",
|
||||
required=True,
|
||||
enum={"OptionA": "OptionA", "OptionB": "OptionB"},
|
||||
)
|
||||
|
||||
option_a_properties = cls._args_schema.managed_network_config.infrastructure_vpn_configuration.option_a_properties
|
||||
option_a_properties.mtu = AAZIntArg(
|
||||
options=["mtu"],
|
||||
help="MTU to use for option A peering.",
|
||||
fmt=AAZIntArgFormat(
|
||||
maximum=9000,
|
||||
minimum=1500,
|
||||
),
|
||||
)
|
||||
option_a_properties.peer_asn = AAZIntArg(
|
||||
options=["peer-asn"],
|
||||
help="Peer ASN number.Example : 28",
|
||||
fmt=AAZIntArgFormat(
|
||||
maximum=65535,
|
||||
minimum=1,
|
||||
),
|
||||
)
|
||||
option_a_properties.primary_ipv4_prefix = AAZStrArg(
|
||||
options=["primary-ipv4-prefix"],
|
||||
help="IPv4 Address Prefix of CE-PE interconnect links. Example: 172.31.0.0/31. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces.",
|
||||
)
|
||||
option_a_properties.primary_ipv6_prefix = AAZStrArg(
|
||||
options=["primary-ipv6-prefix"],
|
||||
help="IPv6 Address Prefix of CE-PE interconnect links. Example: 3FFE:FFFF:0:CD30::a0/126. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces.",
|
||||
)
|
||||
option_a_properties.secondary_ipv4_prefix = AAZStrArg(
|
||||
options=["secondary-ipv4-prefix"],
|
||||
help="Secondary IPv4 Address Prefix of CE-PE interconnect links. Example: 172.31.0.20/31. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces.",
|
||||
)
|
||||
option_a_properties.secondary_ipv6_prefix = AAZStrArg(
|
||||
options=["secondary-ipv6-prefix"],
|
||||
help="Secondary IPv6 Address Prefix of CE-PE interconnect links. Example: 3FFE:FFFF:0:CD30::a4/126. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces.",
|
||||
)
|
||||
option_a_properties.vlan_id = AAZIntArg(
|
||||
options=["vlan-id"],
|
||||
help="Vlan identifier. Example : 501",
|
||||
fmt=AAZIntArgFormat(
|
||||
maximum=4095,
|
||||
minimum=501,
|
||||
),
|
||||
)
|
||||
|
||||
option_b_properties = cls._args_schema.managed_network_config.infrastructure_vpn_configuration.option_b_properties
|
||||
option_b_properties.export_route_targets = AAZListArg(
|
||||
options=["export-route-targets"],
|
||||
help="Route Targets to be applied for outgoing routes from CE.",
|
||||
required=True,
|
||||
)
|
||||
option_b_properties.import_route_targets = AAZListArg(
|
||||
options=["import-route-targets"],
|
||||
help="Route Targets to be applied for incoming routes into CE.",
|
||||
required=True,
|
||||
)
|
||||
|
||||
export_route_targets = cls._args_schema.managed_network_config.infrastructure_vpn_configuration.option_b_properties.export_route_targets
|
||||
export_route_targets.Element = AAZStrArg()
|
||||
|
||||
import_route_targets = cls._args_schema.managed_network_config.infrastructure_vpn_configuration.option_b_properties.import_route_targets
|
||||
import_route_targets.Element = AAZStrArg()
|
||||
|
||||
workload_vpn_configuration = cls._args_schema.managed_network_config.workload_vpn_configuration
|
||||
workload_vpn_configuration.option_a_properties = AAZObjectArg(
|
||||
options=["option-a-properties"],
|
||||
help="Peering option A properties.",
|
||||
)
|
||||
workload_vpn_configuration.option_b_properties = AAZObjectArg(
|
||||
options=["option-b-properties"],
|
||||
help="Option B configuration to be used for management vpn.",
|
||||
)
|
||||
workload_vpn_configuration.peering_option = AAZStrArg(
|
||||
options=["peering-option"],
|
||||
help="Peering option list.",
|
||||
required=True,
|
||||
enum={"OptionA": "OptionA", "OptionB": "OptionB"},
|
||||
)
|
||||
|
||||
option_a_properties = cls._args_schema.managed_network_config.workload_vpn_configuration.option_a_properties
|
||||
option_a_properties.mtu = AAZIntArg(
|
||||
options=["mtu"],
|
||||
help="MTU to use for option A peering.",
|
||||
fmt=AAZIntArgFormat(
|
||||
maximum=9000,
|
||||
minimum=1500,
|
||||
),
|
||||
)
|
||||
option_a_properties.peer_asn = AAZIntArg(
|
||||
options=["peer-asn"],
|
||||
help="Peer ASN number.Example : 28",
|
||||
fmt=AAZIntArgFormat(
|
||||
maximum=65535,
|
||||
minimum=1,
|
||||
),
|
||||
)
|
||||
option_a_properties.primary_ipv4_prefix = AAZStrArg(
|
||||
options=["primary-ipv4-prefix"],
|
||||
help="IPv4 Address Prefix of CE-PE interconnect links. Example: 172.31.0.0/31. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces.",
|
||||
)
|
||||
option_a_properties.primary_ipv6_prefix = AAZStrArg(
|
||||
options=["primary-ipv6-prefix"],
|
||||
help="IPv6 Address Prefix of CE-PE interconnect links. Example: 3FFE:FFFF:0:CD30::a0/126. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces.",
|
||||
)
|
||||
option_a_properties.secondary_ipv4_prefix = AAZStrArg(
|
||||
options=["secondary-ipv4-prefix"],
|
||||
help="Secondary IPv4 Address Prefix of CE-PE interconnect links. Example: 172.31.0.20/31. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces.",
|
||||
)
|
||||
option_a_properties.secondary_ipv6_prefix = AAZStrArg(
|
||||
options=["secondary-ipv6-prefix"],
|
||||
help="Secondary IPv6 Address Prefix of CE-PE interconnect links. Example: 3FFE:FFFF:0:CD30::a4/126. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces.",
|
||||
)
|
||||
option_a_properties.vlan_id = AAZIntArg(
|
||||
options=["vlan-id"],
|
||||
help="Vlan identifier. Example : 501",
|
||||
fmt=AAZIntArgFormat(
|
||||
maximum=4095,
|
||||
minimum=501,
|
||||
),
|
||||
)
|
||||
|
||||
option_b_properties = cls._args_schema.managed_network_config.workload_vpn_configuration.option_b_properties
|
||||
option_b_properties.export_route_targets = AAZListArg(
|
||||
options=["export-route-targets"],
|
||||
help="Route Targets to be applied for outgoing routes from CE.",
|
||||
required=True,
|
||||
)
|
||||
option_b_properties.import_route_targets = AAZListArg(
|
||||
options=["import-route-targets"],
|
||||
help="Route Targets to be applied for incoming routes into CE.",
|
||||
required=True,
|
||||
)
|
||||
|
||||
export_route_targets = cls._args_schema.managed_network_config.workload_vpn_configuration.option_b_properties.export_route_targets
|
||||
export_route_targets.Element = AAZStrArg()
|
||||
|
||||
import_route_targets = cls._args_schema.managed_network_config.workload_vpn_configuration.option_b_properties.import_route_targets
|
||||
import_route_targets.Element = AAZStrArg()
|
||||
cls._build_args_vpn_configuration_properties_create(managed_network_config.workload_vpn_configuration)
|
||||
|
||||
ts_config = cls._args_schema.ts_config
|
||||
ts_config.password = AAZStrArg(
|
||||
options=["password"],
|
||||
help="Password of terminal server.",
|
||||
help="Password for the terminal server connection.",
|
||||
required=True,
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
ts_config.primary_ipv4_prefix = AAZStrArg(
|
||||
options=["primary-ipv4-prefix"],
|
||||
help="IPv4 Address Prefix of CE-PE interconnect links. Example : 172.31.0.0/31.",
|
||||
help="IPv4 Address Prefix. Example:172.31.0.0/30.",
|
||||
required=True,
|
||||
)
|
||||
ts_config.primary_ipv6_prefix = AAZStrArg(
|
||||
options=["primary-ipv6-prefix"],
|
||||
help="IPv6 Address Prefix of CE-PE interconnect links. Example : 3FFE:FFFF:0:CD30::a0/126.",
|
||||
help="IPv6 Address Prefix. Example: 3FFE:FFFF:0:CD30::a0/127.",
|
||||
)
|
||||
ts_config.secondary_ipv4_prefix = AAZStrArg(
|
||||
options=["secondary-ipv4-prefix"],
|
||||
help="Secondary IPv4 Address Prefix of CE-PE interconnect links. Example : 172.31.0.20/31.",
|
||||
help="Secondary IPv4 Address Prefix. Example:172.31.0.20/30.",
|
||||
required=True,
|
||||
)
|
||||
ts_config.secondary_ipv6_prefix = AAZStrArg(
|
||||
options=["secondary-ipv6-prefix"],
|
||||
help="Secondary IPv6 Address Prefix of CE-PE interconnect links. Example : 3FFE:FFFF:0:CD30::a4/126.",
|
||||
help="Secondary IPv6 Address Prefix. Example: 3FFE:FFFF:0:CD30::a4/127.",
|
||||
)
|
||||
ts_config.serial_number = AAZStrArg(
|
||||
options=["serial-number"],
|
||||
help="Serial Number of Terminal server.",
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
ts_config.username = AAZStrArg(
|
||||
options=["username"],
|
||||
help="Username of terminal server.",
|
||||
help="Username for the terminal server connection.",
|
||||
required=True,
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
return cls._args_schema
|
||||
|
||||
_args_vpn_configuration_properties_create = None
|
||||
|
||||
@classmethod
|
||||
def _build_args_vpn_configuration_properties_create(cls, _schema):
|
||||
if cls._args_vpn_configuration_properties_create is not None:
|
||||
_schema.network_to_network_interconnect_id = cls._args_vpn_configuration_properties_create.network_to_network_interconnect_id
|
||||
_schema.option_a_properties = cls._args_vpn_configuration_properties_create.option_a_properties
|
||||
_schema.option_b_properties = cls._args_vpn_configuration_properties_create.option_b_properties
|
||||
_schema.peering_option = cls._args_vpn_configuration_properties_create.peering_option
|
||||
return
|
||||
|
||||
cls._args_vpn_configuration_properties_create = AAZObjectArg()
|
||||
|
||||
vpn_configuration_properties_create = cls._args_vpn_configuration_properties_create
|
||||
vpn_configuration_properties_create.network_to_network_interconnect_id = AAZResourceIdArg(
|
||||
options=["network-to-network-interconnect-id"],
|
||||
help="ARM Resource ID of the Network To Network Interconnect.",
|
||||
)
|
||||
vpn_configuration_properties_create.option_a_properties = AAZObjectArg(
|
||||
options=["option-a-properties"],
|
||||
help="option A properties.",
|
||||
)
|
||||
vpn_configuration_properties_create.option_b_properties = AAZObjectArg(
|
||||
options=["option-b-properties"],
|
||||
help="option B properties.",
|
||||
)
|
||||
vpn_configuration_properties_create.peering_option = AAZStrArg(
|
||||
options=["peering-option"],
|
||||
help="Peering option list.",
|
||||
required=True,
|
||||
enum={"OptionA": "OptionA", "OptionB": "OptionB"},
|
||||
)
|
||||
|
||||
option_a_properties = cls._args_vpn_configuration_properties_create.option_a_properties
|
||||
option_a_properties.bfd_configuration = AAZObjectArg(
|
||||
options=["bfd-configuration"],
|
||||
help="BFD Configuration properties.",
|
||||
)
|
||||
option_a_properties.mtu = AAZIntArg(
|
||||
options=["mtu"],
|
||||
help="MTU to use for option A peering. The value should be between 64 to 9200. Default value is 1500. Example: 1500",
|
||||
fmt=AAZIntArgFormat(
|
||||
maximum=9200,
|
||||
minimum=64,
|
||||
),
|
||||
)
|
||||
option_a_properties.peer_asn = AAZIntArg(
|
||||
options=["peer-asn"],
|
||||
help="Peer ASN number. The value should be between 1 to 4294967295. Example: 28.",
|
||||
required=True,
|
||||
fmt=AAZIntArgFormat(
|
||||
maximum=4294967295,
|
||||
minimum=1,
|
||||
),
|
||||
)
|
||||
option_a_properties.primary_ipv4_prefix = AAZStrArg(
|
||||
options=["primary-ipv4-prefix"],
|
||||
help="IPv4 Address Prefix. Example: 172.31.0.0/31.",
|
||||
)
|
||||
option_a_properties.primary_ipv6_prefix = AAZStrArg(
|
||||
options=["primary-ipv6-prefix"],
|
||||
help="IPv6 Address Prefix. Example: 3FFE:FFFF:0:CD30::a0/127.",
|
||||
)
|
||||
option_a_properties.secondary_ipv4_prefix = AAZStrArg(
|
||||
options=["secondary-ipv4-prefix"],
|
||||
help="Secondary IPv4 Address Prefix. Example: 172.31.0.20/31.",
|
||||
)
|
||||
option_a_properties.secondary_ipv6_prefix = AAZStrArg(
|
||||
options=["secondary-ipv6-prefix"],
|
||||
help="Secondary IPv6 Address Prefix. Example: 3FFE:FFFF:0:CD30::a4/127.",
|
||||
)
|
||||
option_a_properties.vlan_id = AAZIntArg(
|
||||
options=["vlan-id"],
|
||||
help="Vlan Id. The value should be between 501 to 4094. Example: 501",
|
||||
required=True,
|
||||
fmt=AAZIntArgFormat(
|
||||
maximum=4094,
|
||||
minimum=501,
|
||||
),
|
||||
)
|
||||
|
||||
bfd_configuration = cls._args_vpn_configuration_properties_create.option_a_properties.bfd_configuration
|
||||
bfd_configuration.interval_in_milli_seconds = AAZIntArg(
|
||||
options=["interval-in-milli-seconds"],
|
||||
help="Interval in milliseconds. Default Value is 300. Example: 300.",
|
||||
)
|
||||
bfd_configuration.multiplier = AAZIntArg(
|
||||
options=["multiplier"],
|
||||
help="Multiplier for the Bfd Configuration. Default Value is 5. Example: 5.",
|
||||
)
|
||||
|
||||
option_b_properties = cls._args_vpn_configuration_properties_create.option_b_properties
|
||||
option_b_properties.export_route_targets = AAZListArg(
|
||||
options=["export-route-targets"],
|
||||
help="Route Targets to be applied for outgoing routes from CE. This is for backward compatibility.",
|
||||
)
|
||||
option_b_properties.import_route_targets = AAZListArg(
|
||||
options=["import-route-targets"],
|
||||
help="Route Targets to be applied for incoming routes into CE. This is for backward compatibility.",
|
||||
)
|
||||
option_b_properties.route_targets = AAZObjectArg(
|
||||
options=["route-targets"],
|
||||
help="Route Targets to be applied.",
|
||||
)
|
||||
|
||||
export_route_targets = cls._args_vpn_configuration_properties_create.option_b_properties.export_route_targets
|
||||
export_route_targets.Element = AAZStrArg()
|
||||
|
||||
import_route_targets = cls._args_vpn_configuration_properties_create.option_b_properties.import_route_targets
|
||||
import_route_targets.Element = AAZStrArg()
|
||||
|
||||
route_targets = cls._args_vpn_configuration_properties_create.option_b_properties.route_targets
|
||||
route_targets.export_ipv4_route_targets = AAZListArg(
|
||||
options=["export-ipv4-route-targets"],
|
||||
help="Route Targets to be applied for outgoing routes into CE.",
|
||||
)
|
||||
route_targets.export_ipv6_route_targets = AAZListArg(
|
||||
options=["export-ipv6-route-targets"],
|
||||
help="Route Targets to be applied for outgoing routes from CE.",
|
||||
)
|
||||
route_targets.import_ipv4_route_targets = AAZListArg(
|
||||
options=["import-ipv4-route-targets"],
|
||||
help="Route Targets to be applied for incoming routes into CE.",
|
||||
)
|
||||
route_targets.import_ipv6_route_targets = AAZListArg(
|
||||
options=["import-ipv6-route-targets"],
|
||||
help="Route Targets to be applied for incoming routes from CE.",
|
||||
)
|
||||
|
||||
export_ipv4_route_targets = cls._args_vpn_configuration_properties_create.option_b_properties.route_targets.export_ipv4_route_targets
|
||||
export_ipv4_route_targets.Element = AAZStrArg(
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
|
||||
export_ipv6_route_targets = cls._args_vpn_configuration_properties_create.option_b_properties.route_targets.export_ipv6_route_targets
|
||||
export_ipv6_route_targets.Element = AAZStrArg(
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
|
||||
import_ipv4_route_targets = cls._args_vpn_configuration_properties_create.option_b_properties.route_targets.import_ipv4_route_targets
|
||||
import_ipv4_route_targets.Element = AAZStrArg(
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
|
||||
import_ipv6_route_targets = cls._args_vpn_configuration_properties_create.option_b_properties.route_targets.import_ipv6_route_targets
|
||||
import_ipv6_route_targets.Element = AAZStrArg(
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
|
||||
_schema.network_to_network_interconnect_id = cls._args_vpn_configuration_properties_create.network_to_network_interconnect_id
|
||||
_schema.option_a_properties = cls._args_vpn_configuration_properties_create.option_a_properties
|
||||
_schema.option_b_properties = cls._args_vpn_configuration_properties_create.option_b_properties
|
||||
_schema.peering_option = cls._args_vpn_configuration_properties_create.peering_option
|
||||
|
||||
def _execute_operations(self):
|
||||
self.pre_operations()
|
||||
yield self.NetworkFabricsCreate(ctx=self.ctx)()
|
||||
|
@ -429,7 +466,7 @@ class Create(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
@ -455,84 +492,26 @@ class Create(AAZCommand):
|
|||
typ_kwargs={"flags": {"required": True, "client_flatten": True}}
|
||||
)
|
||||
_builder.set_prop("location", AAZStrType, ".location", typ_kwargs={"flags": {"required": True}})
|
||||
_builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
|
||||
_builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={"flags": {"required": True, "client_flatten": True}})
|
||||
_builder.set_prop("tags", AAZDictType, ".tags")
|
||||
|
||||
properties = _builder.get(".properties")
|
||||
if properties is not None:
|
||||
properties.set_prop("annotation", AAZStrType, ".annotation")
|
||||
properties.set_prop("fabricASN", AAZIntType, ".fabric_asn", typ_kwargs={"flags": {"required": True}})
|
||||
properties.set_prop("ipv4Prefix", AAZStrType, ".ipv4_prefix")
|
||||
properties.set_prop("ipv4Prefix", AAZStrType, ".ipv4_prefix", typ_kwargs={"flags": {"required": True}})
|
||||
properties.set_prop("ipv6Prefix", AAZStrType, ".ipv6_prefix")
|
||||
properties.set_prop("managementNetworkConfiguration", AAZObjectType, ".managed_network_config", typ_kwargs={"flags": {"required": True}})
|
||||
properties.set_prop("networkFabricControllerId", AAZStrType, ".nfc_id", typ_kwargs={"flags": {"required": True}})
|
||||
properties.set_prop("networkFabricSku", AAZStrType, ".nf_sku", typ_kwargs={"flags": {"required": True}})
|
||||
properties.set_prop("rackCount", AAZIntType, ".rack_count", typ_kwargs={"flags": {"required": True}})
|
||||
properties.set_prop("rackCount", AAZIntType, ".rack_count")
|
||||
properties.set_prop("serverCountPerRack", AAZIntType, ".server_count_per_rack", typ_kwargs={"flags": {"required": True}})
|
||||
properties.set_prop("terminalServerConfiguration", AAZObjectType, ".ts_config", typ_kwargs={"flags": {"required": True}})
|
||||
|
||||
management_network_configuration = _builder.get(".properties.managementNetworkConfiguration")
|
||||
if management_network_configuration is not None:
|
||||
management_network_configuration.set_prop("infrastructureVpnConfiguration", AAZObjectType, ".infrastructure_vpn_configuration", typ_kwargs={"flags": {"required": True}})
|
||||
management_network_configuration.set_prop("workloadVpnConfiguration", AAZObjectType, ".workload_vpn_configuration", typ_kwargs={"flags": {"required": True}})
|
||||
|
||||
infrastructure_vpn_configuration = _builder.get(".properties.managementNetworkConfiguration.infrastructureVpnConfiguration")
|
||||
if infrastructure_vpn_configuration is not None:
|
||||
infrastructure_vpn_configuration.set_prop("optionAProperties", AAZObjectType, ".option_a_properties")
|
||||
infrastructure_vpn_configuration.set_prop("optionBProperties", AAZObjectType, ".option_b_properties")
|
||||
infrastructure_vpn_configuration.set_prop("peeringOption", AAZStrType, ".peering_option", typ_kwargs={"flags": {"required": True}})
|
||||
|
||||
option_a_properties = _builder.get(".properties.managementNetworkConfiguration.infrastructureVpnConfiguration.optionAProperties")
|
||||
if option_a_properties is not None:
|
||||
option_a_properties.set_prop("mtu", AAZIntType, ".mtu")
|
||||
option_a_properties.set_prop("peerASN", AAZIntType, ".peer_asn")
|
||||
option_a_properties.set_prop("primaryIpv4Prefix", AAZStrType, ".primary_ipv4_prefix")
|
||||
option_a_properties.set_prop("primaryIpv6Prefix", AAZStrType, ".primary_ipv6_prefix")
|
||||
option_a_properties.set_prop("secondaryIpv4Prefix", AAZStrType, ".secondary_ipv4_prefix")
|
||||
option_a_properties.set_prop("secondaryIpv6Prefix", AAZStrType, ".secondary_ipv6_prefix")
|
||||
option_a_properties.set_prop("vlanId", AAZIntType, ".vlan_id")
|
||||
|
||||
option_b_properties = _builder.get(".properties.managementNetworkConfiguration.infrastructureVpnConfiguration.optionBProperties")
|
||||
if option_b_properties is not None:
|
||||
option_b_properties.set_prop("exportRouteTargets", AAZListType, ".export_route_targets", typ_kwargs={"flags": {"required": True}})
|
||||
option_b_properties.set_prop("importRouteTargets", AAZListType, ".import_route_targets", typ_kwargs={"flags": {"required": True}})
|
||||
|
||||
export_route_targets = _builder.get(".properties.managementNetworkConfiguration.infrastructureVpnConfiguration.optionBProperties.exportRouteTargets")
|
||||
if export_route_targets is not None:
|
||||
export_route_targets.set_elements(AAZStrType, ".")
|
||||
|
||||
import_route_targets = _builder.get(".properties.managementNetworkConfiguration.infrastructureVpnConfiguration.optionBProperties.importRouteTargets")
|
||||
if import_route_targets is not None:
|
||||
import_route_targets.set_elements(AAZStrType, ".")
|
||||
|
||||
workload_vpn_configuration = _builder.get(".properties.managementNetworkConfiguration.workloadVpnConfiguration")
|
||||
if workload_vpn_configuration is not None:
|
||||
workload_vpn_configuration.set_prop("optionAProperties", AAZObjectType, ".option_a_properties")
|
||||
workload_vpn_configuration.set_prop("optionBProperties", AAZObjectType, ".option_b_properties")
|
||||
workload_vpn_configuration.set_prop("peeringOption", AAZStrType, ".peering_option", typ_kwargs={"flags": {"required": True}})
|
||||
|
||||
option_a_properties = _builder.get(".properties.managementNetworkConfiguration.workloadVpnConfiguration.optionAProperties")
|
||||
if option_a_properties is not None:
|
||||
option_a_properties.set_prop("mtu", AAZIntType, ".mtu")
|
||||
option_a_properties.set_prop("peerASN", AAZIntType, ".peer_asn")
|
||||
option_a_properties.set_prop("primaryIpv4Prefix", AAZStrType, ".primary_ipv4_prefix")
|
||||
option_a_properties.set_prop("primaryIpv6Prefix", AAZStrType, ".primary_ipv6_prefix")
|
||||
option_a_properties.set_prop("secondaryIpv4Prefix", AAZStrType, ".secondary_ipv4_prefix")
|
||||
option_a_properties.set_prop("secondaryIpv6Prefix", AAZStrType, ".secondary_ipv6_prefix")
|
||||
option_a_properties.set_prop("vlanId", AAZIntType, ".vlan_id")
|
||||
|
||||
option_b_properties = _builder.get(".properties.managementNetworkConfiguration.workloadVpnConfiguration.optionBProperties")
|
||||
if option_b_properties is not None:
|
||||
option_b_properties.set_prop("exportRouteTargets", AAZListType, ".export_route_targets", typ_kwargs={"flags": {"required": True}})
|
||||
option_b_properties.set_prop("importRouteTargets", AAZListType, ".import_route_targets", typ_kwargs={"flags": {"required": True}})
|
||||
|
||||
export_route_targets = _builder.get(".properties.managementNetworkConfiguration.workloadVpnConfiguration.optionBProperties.exportRouteTargets")
|
||||
if export_route_targets is not None:
|
||||
export_route_targets.set_elements(AAZStrType, ".")
|
||||
|
||||
import_route_targets = _builder.get(".properties.managementNetworkConfiguration.workloadVpnConfiguration.optionBProperties.importRouteTargets")
|
||||
if import_route_targets is not None:
|
||||
import_route_targets.set_elements(AAZStrType, ".")
|
||||
_CreateHelper._build_schema_vpn_configuration_properties_create(management_network_configuration.set_prop("infrastructureVpnConfiguration", AAZObjectType, ".infrastructure_vpn_configuration", typ_kwargs={"flags": {"required": True}}))
|
||||
_CreateHelper._build_schema_vpn_configuration_properties_create(management_network_configuration.set_prop("workloadVpnConfiguration", AAZObjectType, ".workload_vpn_configuration", typ_kwargs={"flags": {"required": True}}))
|
||||
|
||||
terminal_server_configuration = _builder.get(".properties.terminalServerConfiguration")
|
||||
if terminal_server_configuration is not None:
|
||||
|
@ -578,7 +557,7 @@ class Create(AAZCommand):
|
|||
flags={"read_only": True},
|
||||
)
|
||||
_schema_on_200_201.properties = AAZObjectType(
|
||||
flags={"client_flatten": True},
|
||||
flags={"required": True, "client_flatten": True},
|
||||
)
|
||||
_schema_on_200_201.system_data = AAZObjectType(
|
||||
serialized_name="systemData",
|
||||
|
@ -590,13 +569,26 @@ class Create(AAZCommand):
|
|||
)
|
||||
|
||||
properties = cls._schema_on_200_201.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.fabric_asn = AAZIntType(
|
||||
serialized_name="fabricASN",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.fabric_version = AAZStrType(
|
||||
serialized_name="fabricVersion",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.ipv4_prefix = AAZStrType(
|
||||
serialized_name="ipv4Prefix",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.ipv6_prefix = AAZStrType(
|
||||
serialized_name="ipv6Prefix",
|
||||
|
@ -621,23 +613,18 @@ class Create(AAZCommand):
|
|||
serialized_name="networkFabricSku",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.operational_state = AAZStrType(
|
||||
serialized_name="operationalState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.provisioning_state = AAZStrType(
|
||||
serialized_name="provisioningState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.rack_count = AAZIntType(
|
||||
serialized_name="rackCount",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.racks = AAZListType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.router_id = AAZStrType(
|
||||
serialized_name="routerId",
|
||||
properties.router_ids = AAZListType(
|
||||
serialized_name="routerIds",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.server_count_per_rack = AAZIntType(
|
||||
|
@ -670,6 +657,9 @@ class Create(AAZCommand):
|
|||
racks = cls._schema_on_200_201.properties.racks
|
||||
racks.Element = AAZStrType()
|
||||
|
||||
router_ids = cls._schema_on_200_201.properties.router_ids
|
||||
router_ids.Element = AAZStrType()
|
||||
|
||||
terminal_server_configuration = cls._schema_on_200_201.properties.terminal_server_configuration
|
||||
terminal_server_configuration.network_device_id = AAZStrType(
|
||||
serialized_name="networkDeviceId",
|
||||
|
@ -728,6 +718,68 @@ class Create(AAZCommand):
|
|||
class _CreateHelper:
|
||||
"""Helper class for Create"""
|
||||
|
||||
@classmethod
|
||||
def _build_schema_vpn_configuration_properties_create(cls, _builder):
|
||||
if _builder is None:
|
||||
return
|
||||
_builder.set_prop("networkToNetworkInterconnectId", AAZStrType, ".network_to_network_interconnect_id")
|
||||
_builder.set_prop("optionAProperties", AAZObjectType, ".option_a_properties")
|
||||
_builder.set_prop("optionBProperties", AAZObjectType, ".option_b_properties")
|
||||
_builder.set_prop("peeringOption", AAZStrType, ".peering_option", typ_kwargs={"flags": {"required": True}})
|
||||
|
||||
option_a_properties = _builder.get(".optionAProperties")
|
||||
if option_a_properties is not None:
|
||||
option_a_properties.set_prop("bfdConfiguration", AAZObjectType, ".bfd_configuration")
|
||||
option_a_properties.set_prop("mtu", AAZIntType, ".mtu")
|
||||
option_a_properties.set_prop("peerASN", AAZIntType, ".peer_asn", typ_kwargs={"flags": {"required": True}})
|
||||
option_a_properties.set_prop("primaryIpv4Prefix", AAZStrType, ".primary_ipv4_prefix")
|
||||
option_a_properties.set_prop("primaryIpv6Prefix", AAZStrType, ".primary_ipv6_prefix")
|
||||
option_a_properties.set_prop("secondaryIpv4Prefix", AAZStrType, ".secondary_ipv4_prefix")
|
||||
option_a_properties.set_prop("secondaryIpv6Prefix", AAZStrType, ".secondary_ipv6_prefix")
|
||||
option_a_properties.set_prop("vlanId", AAZIntType, ".vlan_id", typ_kwargs={"flags": {"required": True}})
|
||||
|
||||
bfd_configuration = _builder.get(".optionAProperties.bfdConfiguration")
|
||||
if bfd_configuration is not None:
|
||||
bfd_configuration.set_prop("intervalInMilliSeconds", AAZIntType, ".interval_in_milli_seconds")
|
||||
bfd_configuration.set_prop("multiplier", AAZIntType, ".multiplier")
|
||||
|
||||
option_b_properties = _builder.get(".optionBProperties")
|
||||
if option_b_properties is not None:
|
||||
option_b_properties.set_prop("exportRouteTargets", AAZListType, ".export_route_targets")
|
||||
option_b_properties.set_prop("importRouteTargets", AAZListType, ".import_route_targets")
|
||||
option_b_properties.set_prop("routeTargets", AAZObjectType, ".route_targets")
|
||||
|
||||
export_route_targets = _builder.get(".optionBProperties.exportRouteTargets")
|
||||
if export_route_targets is not None:
|
||||
export_route_targets.set_elements(AAZStrType, ".")
|
||||
|
||||
import_route_targets = _builder.get(".optionBProperties.importRouteTargets")
|
||||
if import_route_targets is not None:
|
||||
import_route_targets.set_elements(AAZStrType, ".")
|
||||
|
||||
route_targets = _builder.get(".optionBProperties.routeTargets")
|
||||
if route_targets is not None:
|
||||
route_targets.set_prop("exportIpv4RouteTargets", AAZListType, ".export_ipv4_route_targets")
|
||||
route_targets.set_prop("exportIpv6RouteTargets", AAZListType, ".export_ipv6_route_targets")
|
||||
route_targets.set_prop("importIpv4RouteTargets", AAZListType, ".import_ipv4_route_targets")
|
||||
route_targets.set_prop("importIpv6RouteTargets", AAZListType, ".import_ipv6_route_targets")
|
||||
|
||||
export_ipv4_route_targets = _builder.get(".optionBProperties.routeTargets.exportIpv4RouteTargets")
|
||||
if export_ipv4_route_targets is not None:
|
||||
export_ipv4_route_targets.set_elements(AAZStrType, ".")
|
||||
|
||||
export_ipv6_route_targets = _builder.get(".optionBProperties.routeTargets.exportIpv6RouteTargets")
|
||||
if export_ipv6_route_targets is not None:
|
||||
export_ipv6_route_targets.set_elements(AAZStrType, ".")
|
||||
|
||||
import_ipv4_route_targets = _builder.get(".optionBProperties.routeTargets.importIpv4RouteTargets")
|
||||
if import_ipv4_route_targets is not None:
|
||||
import_ipv4_route_targets.set_elements(AAZStrType, ".")
|
||||
|
||||
import_ipv6_route_targets = _builder.get(".optionBProperties.routeTargets.importIpv6RouteTargets")
|
||||
if import_ipv6_route_targets is not None:
|
||||
import_ipv6_route_targets.set_elements(AAZStrType, ".")
|
||||
|
||||
_schema_vpn_configuration_properties_read = None
|
||||
|
||||
@classmethod
|
||||
|
@ -749,7 +801,6 @@ class _CreateHelper:
|
|||
)
|
||||
vpn_configuration_properties_read.network_to_network_interconnect_id = AAZStrType(
|
||||
serialized_name="networkToNetworkInterconnectId",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
vpn_configuration_properties_read.option_a_properties = AAZObjectType(
|
||||
serialized_name="optionAProperties",
|
||||
|
@ -769,6 +820,7 @@ class _CreateHelper:
|
|||
option_a_properties.mtu = AAZIntType()
|
||||
option_a_properties.peer_asn = AAZIntType(
|
||||
serialized_name="peerASN",
|
||||
flags={"required": True},
|
||||
)
|
||||
option_a_properties.primary_ipv4_prefix = AAZStrType(
|
||||
serialized_name="primaryIpv4Prefix",
|
||||
|
@ -784,24 +836,28 @@ class _CreateHelper:
|
|||
)
|
||||
option_a_properties.vlan_id = AAZIntType(
|
||||
serialized_name="vlanId",
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
bfd_configuration = _schema_vpn_configuration_properties_read.option_a_properties.bfd_configuration
|
||||
bfd_configuration.interval = AAZIntType(
|
||||
bfd_configuration.administrative_state = AAZStrType(
|
||||
serialized_name="administrativeState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
bfd_configuration.multiplier = AAZIntType(
|
||||
flags={"read_only": True},
|
||||
bfd_configuration.interval_in_milli_seconds = AAZIntType(
|
||||
serialized_name="intervalInMilliSeconds",
|
||||
)
|
||||
bfd_configuration.multiplier = AAZIntType()
|
||||
|
||||
option_b_properties = _schema_vpn_configuration_properties_read.option_b_properties
|
||||
option_b_properties.export_route_targets = AAZListType(
|
||||
serialized_name="exportRouteTargets",
|
||||
flags={"required": True},
|
||||
)
|
||||
option_b_properties.import_route_targets = AAZListType(
|
||||
serialized_name="importRouteTargets",
|
||||
flags={"required": True},
|
||||
)
|
||||
option_b_properties.route_targets = AAZObjectType(
|
||||
serialized_name="routeTargets",
|
||||
)
|
||||
|
||||
export_route_targets = _schema_vpn_configuration_properties_read.option_b_properties.export_route_targets
|
||||
|
@ -810,6 +866,32 @@ class _CreateHelper:
|
|||
import_route_targets = _schema_vpn_configuration_properties_read.option_b_properties.import_route_targets
|
||||
import_route_targets.Element = AAZStrType()
|
||||
|
||||
route_targets = _schema_vpn_configuration_properties_read.option_b_properties.route_targets
|
||||
route_targets.export_ipv4_route_targets = AAZListType(
|
||||
serialized_name="exportIpv4RouteTargets",
|
||||
)
|
||||
route_targets.export_ipv6_route_targets = AAZListType(
|
||||
serialized_name="exportIpv6RouteTargets",
|
||||
)
|
||||
route_targets.import_ipv4_route_targets = AAZListType(
|
||||
serialized_name="importIpv4RouteTargets",
|
||||
)
|
||||
route_targets.import_ipv6_route_targets = AAZListType(
|
||||
serialized_name="importIpv6RouteTargets",
|
||||
)
|
||||
|
||||
export_ipv4_route_targets = _schema_vpn_configuration_properties_read.option_b_properties.route_targets.export_ipv4_route_targets
|
||||
export_ipv4_route_targets.Element = AAZStrType()
|
||||
|
||||
export_ipv6_route_targets = _schema_vpn_configuration_properties_read.option_b_properties.route_targets.export_ipv6_route_targets
|
||||
export_ipv6_route_targets.Element = AAZStrType()
|
||||
|
||||
import_ipv4_route_targets = _schema_vpn_configuration_properties_read.option_b_properties.route_targets.import_ipv4_route_targets
|
||||
import_ipv4_route_targets.Element = AAZStrType()
|
||||
|
||||
import_ipv6_route_targets = _schema_vpn_configuration_properties_read.option_b_properties.route_targets.import_ipv6_route_targets
|
||||
import_ipv6_route_targets.Element = AAZStrType()
|
||||
|
||||
_schema.administrative_state = cls._schema_vpn_configuration_properties_read.administrative_state
|
||||
_schema.network_to_network_interconnect_id = cls._schema_vpn_configuration_properties_read.network_to_network_interconnect_id
|
||||
_schema.option_a_properties = cls._schema_vpn_configuration_properties_read.option_a_properties
|
||||
|
|
|
@ -15,16 +15,16 @@ from azure.cli.core.aaz import *
|
|||
"networkfabric fabric delete",
|
||||
)
|
||||
class Delete(AAZCommand):
|
||||
"""Delete the Network Fabric resource.
|
||||
"""Delete the Network Fabric resource
|
||||
|
||||
:example: Delete the Network Fabric
|
||||
az networkfabric fabric delete --resource-group "example-rg" --resource-name "example-fabric"
|
||||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-02-01-preview",
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkfabrics/{}", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkfabrics/{}", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -47,7 +47,7 @@ class Delete(AAZCommand):
|
|||
_args_schema = cls._args_schema
|
||||
_args_schema.resource_name = AAZStrArg(
|
||||
options=["--resource-name"],
|
||||
help="Name of the Network Fabric",
|
||||
help="Name of the Network Fabric.",
|
||||
required=True,
|
||||
id_part="name",
|
||||
)
|
||||
|
@ -143,7 +143,7 @@ class Delete(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
|
|
@ -15,16 +15,16 @@ from azure.cli.core.aaz import *
|
|||
"networkfabric fabric deprovision",
|
||||
)
|
||||
class Deprovision(AAZCommand):
|
||||
"""Deprovisions the underlying hardware.
|
||||
"""Deprovisions the underlying resources in the given Network Fabric instance.
|
||||
|
||||
:example: Deprovision the Network Fabric
|
||||
az networkfabric fabric deprovision --resource-group "example-rg" --resource-name "example-fabric"
|
||||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-02-01-preview",
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkfabrics/{}/deprovision", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkfabrics/{}/deprovision", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@ class Deprovision(AAZCommand):
|
|||
|
||||
def _handler(self, command_args):
|
||||
super()._handler(command_args)
|
||||
return self.build_lro_poller(self._execute_operations, None)
|
||||
return self.build_lro_poller(self._execute_operations, self._output)
|
||||
|
||||
_args_schema = None
|
||||
|
||||
|
@ -47,7 +47,7 @@ class Deprovision(AAZCommand):
|
|||
_args_schema = cls._args_schema
|
||||
_args_schema.resource_name = AAZStrArg(
|
||||
options=["--resource-name"],
|
||||
help="Name of the NetworkFabric.",
|
||||
help="Name of the Network Fabric.",
|
||||
required=True,
|
||||
id_part="name",
|
||||
)
|
||||
|
@ -70,6 +70,10 @@ class Deprovision(AAZCommand):
|
|||
def post_operations(self):
|
||||
pass
|
||||
|
||||
def _output(self, *args, **kwargs):
|
||||
result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True)
|
||||
return result
|
||||
|
||||
class NetworkFabricsDeprovision(AAZHttpOperation):
|
||||
CLIENT_TYPE = "MgmtClient"
|
||||
|
||||
|
@ -134,18 +138,132 @@ class Deprovision(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-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):
|
||||
pass
|
||||
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()
|
||||
_DeprovisionHelper._build_schema_common_post_action_response_for_device_update_read(cls._schema_on_200)
|
||||
|
||||
return cls._schema_on_200
|
||||
|
||||
|
||||
class _DeprovisionHelper:
|
||||
"""Helper class for Deprovision"""
|
||||
|
||||
_schema_common_post_action_response_for_device_update_read = None
|
||||
|
||||
@classmethod
|
||||
def _build_schema_common_post_action_response_for_device_update_read(cls, _schema):
|
||||
if cls._schema_common_post_action_response_for_device_update_read is not None:
|
||||
_schema.configuration_state = cls._schema_common_post_action_response_for_device_update_read.configuration_state
|
||||
_schema.error = cls._schema_common_post_action_response_for_device_update_read.error
|
||||
_schema.failed_devices = cls._schema_common_post_action_response_for_device_update_read.failed_devices
|
||||
_schema.successful_devices = cls._schema_common_post_action_response_for_device_update_read.successful_devices
|
||||
return
|
||||
|
||||
cls._schema_common_post_action_response_for_device_update_read = _schema_common_post_action_response_for_device_update_read = AAZObjectType()
|
||||
|
||||
common_post_action_response_for_device_update_read = _schema_common_post_action_response_for_device_update_read
|
||||
common_post_action_response_for_device_update_read.configuration_state = AAZStrType(
|
||||
serialized_name="configurationState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
common_post_action_response_for_device_update_read.error = AAZObjectType()
|
||||
cls._build_schema_error_detail_read(common_post_action_response_for_device_update_read.error)
|
||||
common_post_action_response_for_device_update_read.failed_devices = AAZListType(
|
||||
serialized_name="failedDevices",
|
||||
)
|
||||
common_post_action_response_for_device_update_read.successful_devices = AAZListType(
|
||||
serialized_name="successfulDevices",
|
||||
)
|
||||
|
||||
failed_devices = _schema_common_post_action_response_for_device_update_read.failed_devices
|
||||
failed_devices.Element = AAZStrType()
|
||||
|
||||
successful_devices = _schema_common_post_action_response_for_device_update_read.successful_devices
|
||||
successful_devices.Element = AAZStrType()
|
||||
|
||||
_schema.configuration_state = cls._schema_common_post_action_response_for_device_update_read.configuration_state
|
||||
_schema.error = cls._schema_common_post_action_response_for_device_update_read.error
|
||||
_schema.failed_devices = cls._schema_common_post_action_response_for_device_update_read.failed_devices
|
||||
_schema.successful_devices = cls._schema_common_post_action_response_for_device_update_read.successful_devices
|
||||
|
||||
_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.type = AAZStrType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
|
||||
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
|
||||
|
||||
|
||||
__all__ = ["Deprovision"]
|
||||
|
|
|
@ -15,7 +15,7 @@ from azure.cli.core.aaz import *
|
|||
"networkfabric fabric list",
|
||||
)
|
||||
class List(AAZCommand):
|
||||
"""List all Network Fabrics in the provided resource group or subscription.
|
||||
"""List all Network Fabrics in the provided resource group or subscription
|
||||
|
||||
:example: List the Network Fabrics for Resource Group
|
||||
az networkfabric fabric list --resource-group "example-rg"
|
||||
|
@ -25,10 +25,10 @@ class List(AAZCommand):
|
|||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-02-01-preview",
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/providers/microsoft.managednetworkfabric/networkfabrics", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkfabrics", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/providers/microsoft.managednetworkfabric/networkfabrics", "2023-06-15"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkfabrics", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -119,7 +119,7 @@ class List(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
@ -171,7 +171,7 @@ class List(AAZCommand):
|
|||
flags={"read_only": True},
|
||||
)
|
||||
_element.properties = AAZObjectType(
|
||||
flags={"client_flatten": True},
|
||||
flags={"required": True, "client_flatten": True},
|
||||
)
|
||||
_element.system_data = AAZObjectType(
|
||||
serialized_name="systemData",
|
||||
|
@ -183,13 +183,26 @@ class List(AAZCommand):
|
|||
)
|
||||
|
||||
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.fabric_asn = AAZIntType(
|
||||
serialized_name="fabricASN",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.fabric_version = AAZStrType(
|
||||
serialized_name="fabricVersion",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.ipv4_prefix = AAZStrType(
|
||||
serialized_name="ipv4Prefix",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.ipv6_prefix = AAZStrType(
|
||||
serialized_name="ipv6Prefix",
|
||||
|
@ -214,23 +227,18 @@ class List(AAZCommand):
|
|||
serialized_name="networkFabricSku",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.operational_state = AAZStrType(
|
||||
serialized_name="operationalState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.provisioning_state = AAZStrType(
|
||||
serialized_name="provisioningState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.rack_count = AAZIntType(
|
||||
serialized_name="rackCount",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.racks = AAZListType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.router_id = AAZStrType(
|
||||
serialized_name="routerId",
|
||||
properties.router_ids = AAZListType(
|
||||
serialized_name="routerIds",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.server_count_per_rack = AAZIntType(
|
||||
|
@ -263,6 +271,9 @@ class List(AAZCommand):
|
|||
racks = cls._schema_on_200.value.Element.properties.racks
|
||||
racks.Element = AAZStrType()
|
||||
|
||||
router_ids = cls._schema_on_200.value.Element.properties.router_ids
|
||||
router_ids.Element = AAZStrType()
|
||||
|
||||
terminal_server_configuration = cls._schema_on_200.value.Element.properties.terminal_server_configuration
|
||||
terminal_server_configuration.network_device_id = AAZStrType(
|
||||
serialized_name="networkDeviceId",
|
||||
|
@ -357,7 +368,7 @@ class List(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
@ -409,7 +420,7 @@ class List(AAZCommand):
|
|||
flags={"read_only": True},
|
||||
)
|
||||
_element.properties = AAZObjectType(
|
||||
flags={"client_flatten": True},
|
||||
flags={"required": True, "client_flatten": True},
|
||||
)
|
||||
_element.system_data = AAZObjectType(
|
||||
serialized_name="systemData",
|
||||
|
@ -421,13 +432,26 @@ class List(AAZCommand):
|
|||
)
|
||||
|
||||
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.fabric_asn = AAZIntType(
|
||||
serialized_name="fabricASN",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.fabric_version = AAZStrType(
|
||||
serialized_name="fabricVersion",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.ipv4_prefix = AAZStrType(
|
||||
serialized_name="ipv4Prefix",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.ipv6_prefix = AAZStrType(
|
||||
serialized_name="ipv6Prefix",
|
||||
|
@ -452,23 +476,18 @@ class List(AAZCommand):
|
|||
serialized_name="networkFabricSku",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.operational_state = AAZStrType(
|
||||
serialized_name="operationalState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.provisioning_state = AAZStrType(
|
||||
serialized_name="provisioningState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.rack_count = AAZIntType(
|
||||
serialized_name="rackCount",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.racks = AAZListType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.router_id = AAZStrType(
|
||||
serialized_name="routerId",
|
||||
properties.router_ids = AAZListType(
|
||||
serialized_name="routerIds",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.server_count_per_rack = AAZIntType(
|
||||
|
@ -501,6 +520,9 @@ class List(AAZCommand):
|
|||
racks = cls._schema_on_200.value.Element.properties.racks
|
||||
racks.Element = AAZStrType()
|
||||
|
||||
router_ids = cls._schema_on_200.value.Element.properties.router_ids
|
||||
router_ids.Element = AAZStrType()
|
||||
|
||||
terminal_server_configuration = cls._schema_on_200.value.Element.properties.terminal_server_configuration
|
||||
terminal_server_configuration.network_device_id = AAZStrType(
|
||||
serialized_name="networkDeviceId",
|
||||
|
@ -580,7 +602,6 @@ class _ListHelper:
|
|||
)
|
||||
vpn_configuration_properties_read.network_to_network_interconnect_id = AAZStrType(
|
||||
serialized_name="networkToNetworkInterconnectId",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
vpn_configuration_properties_read.option_a_properties = AAZObjectType(
|
||||
serialized_name="optionAProperties",
|
||||
|
@ -600,6 +621,7 @@ class _ListHelper:
|
|||
option_a_properties.mtu = AAZIntType()
|
||||
option_a_properties.peer_asn = AAZIntType(
|
||||
serialized_name="peerASN",
|
||||
flags={"required": True},
|
||||
)
|
||||
option_a_properties.primary_ipv4_prefix = AAZStrType(
|
||||
serialized_name="primaryIpv4Prefix",
|
||||
|
@ -615,24 +637,28 @@ class _ListHelper:
|
|||
)
|
||||
option_a_properties.vlan_id = AAZIntType(
|
||||
serialized_name="vlanId",
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
bfd_configuration = _schema_vpn_configuration_properties_read.option_a_properties.bfd_configuration
|
||||
bfd_configuration.interval = AAZIntType(
|
||||
bfd_configuration.administrative_state = AAZStrType(
|
||||
serialized_name="administrativeState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
bfd_configuration.multiplier = AAZIntType(
|
||||
flags={"read_only": True},
|
||||
bfd_configuration.interval_in_milli_seconds = AAZIntType(
|
||||
serialized_name="intervalInMilliSeconds",
|
||||
)
|
||||
bfd_configuration.multiplier = AAZIntType()
|
||||
|
||||
option_b_properties = _schema_vpn_configuration_properties_read.option_b_properties
|
||||
option_b_properties.export_route_targets = AAZListType(
|
||||
serialized_name="exportRouteTargets",
|
||||
flags={"required": True},
|
||||
)
|
||||
option_b_properties.import_route_targets = AAZListType(
|
||||
serialized_name="importRouteTargets",
|
||||
flags={"required": True},
|
||||
)
|
||||
option_b_properties.route_targets = AAZObjectType(
|
||||
serialized_name="routeTargets",
|
||||
)
|
||||
|
||||
export_route_targets = _schema_vpn_configuration_properties_read.option_b_properties.export_route_targets
|
||||
|
@ -641,6 +667,32 @@ class _ListHelper:
|
|||
import_route_targets = _schema_vpn_configuration_properties_read.option_b_properties.import_route_targets
|
||||
import_route_targets.Element = AAZStrType()
|
||||
|
||||
route_targets = _schema_vpn_configuration_properties_read.option_b_properties.route_targets
|
||||
route_targets.export_ipv4_route_targets = AAZListType(
|
||||
serialized_name="exportIpv4RouteTargets",
|
||||
)
|
||||
route_targets.export_ipv6_route_targets = AAZListType(
|
||||
serialized_name="exportIpv6RouteTargets",
|
||||
)
|
||||
route_targets.import_ipv4_route_targets = AAZListType(
|
||||
serialized_name="importIpv4RouteTargets",
|
||||
)
|
||||
route_targets.import_ipv6_route_targets = AAZListType(
|
||||
serialized_name="importIpv6RouteTargets",
|
||||
)
|
||||
|
||||
export_ipv4_route_targets = _schema_vpn_configuration_properties_read.option_b_properties.route_targets.export_ipv4_route_targets
|
||||
export_ipv4_route_targets.Element = AAZStrType()
|
||||
|
||||
export_ipv6_route_targets = _schema_vpn_configuration_properties_read.option_b_properties.route_targets.export_ipv6_route_targets
|
||||
export_ipv6_route_targets.Element = AAZStrType()
|
||||
|
||||
import_ipv4_route_targets = _schema_vpn_configuration_properties_read.option_b_properties.route_targets.import_ipv4_route_targets
|
||||
import_ipv4_route_targets.Element = AAZStrType()
|
||||
|
||||
import_ipv6_route_targets = _schema_vpn_configuration_properties_read.option_b_properties.route_targets.import_ipv6_route_targets
|
||||
import_ipv6_route_targets.Element = AAZStrType()
|
||||
|
||||
_schema.administrative_state = cls._schema_vpn_configuration_properties_read.administrative_state
|
||||
_schema.network_to_network_interconnect_id = cls._schema_vpn_configuration_properties_read.network_to_network_interconnect_id
|
||||
_schema.option_a_properties = cls._schema_vpn_configuration_properties_read.option_a_properties
|
||||
|
|
|
@ -15,16 +15,16 @@ from azure.cli.core.aaz import *
|
|||
"networkfabric fabric provision",
|
||||
)
|
||||
class Provision(AAZCommand):
|
||||
"""Provisions the underlying hardware.
|
||||
"""Provisions the underlying resources in the given Network Fabric instance.
|
||||
|
||||
:example: Provision the Network Fabric
|
||||
az networkfabric fabric provision --resource-group "example-rg" --resource-name "example-fabric"
|
||||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-02-01-preview",
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkfabrics/{}/provision", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkfabrics/{}/provision", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@ class Provision(AAZCommand):
|
|||
|
||||
def _handler(self, command_args):
|
||||
super()._handler(command_args)
|
||||
return self.build_lro_poller(self._execute_operations, None)
|
||||
return self.build_lro_poller(self._execute_operations, self._output)
|
||||
|
||||
_args_schema = None
|
||||
|
||||
|
@ -47,7 +47,7 @@ class Provision(AAZCommand):
|
|||
_args_schema = cls._args_schema
|
||||
_args_schema.resource_name = AAZStrArg(
|
||||
options=["--resource-name"],
|
||||
help="Name of the NetworkFabric.",
|
||||
help="Name of the Network Fabric.",
|
||||
required=True,
|
||||
id_part="name",
|
||||
)
|
||||
|
@ -70,6 +70,10 @@ class Provision(AAZCommand):
|
|||
def post_operations(self):
|
||||
pass
|
||||
|
||||
def _output(self, *args, **kwargs):
|
||||
result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True)
|
||||
return result
|
||||
|
||||
class NetworkFabricsProvision(AAZHttpOperation):
|
||||
CLIENT_TYPE = "MgmtClient"
|
||||
|
||||
|
@ -134,18 +138,132 @@ class Provision(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-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):
|
||||
pass
|
||||
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()
|
||||
_ProvisionHelper._build_schema_common_post_action_response_for_device_update_read(cls._schema_on_200)
|
||||
|
||||
return cls._schema_on_200
|
||||
|
||||
|
||||
class _ProvisionHelper:
|
||||
"""Helper class for Provision"""
|
||||
|
||||
_schema_common_post_action_response_for_device_update_read = None
|
||||
|
||||
@classmethod
|
||||
def _build_schema_common_post_action_response_for_device_update_read(cls, _schema):
|
||||
if cls._schema_common_post_action_response_for_device_update_read is not None:
|
||||
_schema.configuration_state = cls._schema_common_post_action_response_for_device_update_read.configuration_state
|
||||
_schema.error = cls._schema_common_post_action_response_for_device_update_read.error
|
||||
_schema.failed_devices = cls._schema_common_post_action_response_for_device_update_read.failed_devices
|
||||
_schema.successful_devices = cls._schema_common_post_action_response_for_device_update_read.successful_devices
|
||||
return
|
||||
|
||||
cls._schema_common_post_action_response_for_device_update_read = _schema_common_post_action_response_for_device_update_read = AAZObjectType()
|
||||
|
||||
common_post_action_response_for_device_update_read = _schema_common_post_action_response_for_device_update_read
|
||||
common_post_action_response_for_device_update_read.configuration_state = AAZStrType(
|
||||
serialized_name="configurationState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
common_post_action_response_for_device_update_read.error = AAZObjectType()
|
||||
cls._build_schema_error_detail_read(common_post_action_response_for_device_update_read.error)
|
||||
common_post_action_response_for_device_update_read.failed_devices = AAZListType(
|
||||
serialized_name="failedDevices",
|
||||
)
|
||||
common_post_action_response_for_device_update_read.successful_devices = AAZListType(
|
||||
serialized_name="successfulDevices",
|
||||
)
|
||||
|
||||
failed_devices = _schema_common_post_action_response_for_device_update_read.failed_devices
|
||||
failed_devices.Element = AAZStrType()
|
||||
|
||||
successful_devices = _schema_common_post_action_response_for_device_update_read.successful_devices
|
||||
successful_devices.Element = AAZStrType()
|
||||
|
||||
_schema.configuration_state = cls._schema_common_post_action_response_for_device_update_read.configuration_state
|
||||
_schema.error = cls._schema_common_post_action_response_for_device_update_read.error
|
||||
_schema.failed_devices = cls._schema_common_post_action_response_for_device_update_read.failed_devices
|
||||
_schema.successful_devices = cls._schema_common_post_action_response_for_device_update_read.successful_devices
|
||||
|
||||
_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.type = AAZStrType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
|
||||
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
|
||||
|
||||
|
||||
__all__ = ["Provision"]
|
||||
|
|
|
@ -15,16 +15,16 @@ from azure.cli.core.aaz import *
|
|||
"networkfabric fabric show",
|
||||
)
|
||||
class Show(AAZCommand):
|
||||
"""Show details of the provided Network Fabric resource.
|
||||
"""Show details of the provided Network Fabric resource
|
||||
|
||||
:example: Show the Network Fabric
|
||||
az networkfabric fabric show --resource-group "example-rg" --resource-name "example-fabric"
|
||||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-02-01-preview",
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkfabrics/{}", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkfabrics/{}", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -46,7 +46,7 @@ class Show(AAZCommand):
|
|||
_args_schema = cls._args_schema
|
||||
_args_schema.resource_name = AAZStrArg(
|
||||
options=["--resource-name"],
|
||||
help="Name of the Network Fabric",
|
||||
help="Name of the Network Fabric.",
|
||||
required=True,
|
||||
id_part="name",
|
||||
)
|
||||
|
@ -121,7 +121,7 @@ class Show(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
@ -164,7 +164,7 @@ class Show(AAZCommand):
|
|||
flags={"read_only": True},
|
||||
)
|
||||
_schema_on_200.properties = AAZObjectType(
|
||||
flags={"client_flatten": True},
|
||||
flags={"required": True, "client_flatten": True},
|
||||
)
|
||||
_schema_on_200.system_data = AAZObjectType(
|
||||
serialized_name="systemData",
|
||||
|
@ -176,13 +176,26 @@ class Show(AAZCommand):
|
|||
)
|
||||
|
||||
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.fabric_asn = AAZIntType(
|
||||
serialized_name="fabricASN",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.fabric_version = AAZStrType(
|
||||
serialized_name="fabricVersion",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.ipv4_prefix = AAZStrType(
|
||||
serialized_name="ipv4Prefix",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.ipv6_prefix = AAZStrType(
|
||||
serialized_name="ipv6Prefix",
|
||||
|
@ -207,23 +220,18 @@ class Show(AAZCommand):
|
|||
serialized_name="networkFabricSku",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.operational_state = AAZStrType(
|
||||
serialized_name="operationalState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.provisioning_state = AAZStrType(
|
||||
serialized_name="provisioningState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.rack_count = AAZIntType(
|
||||
serialized_name="rackCount",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.racks = AAZListType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.router_id = AAZStrType(
|
||||
serialized_name="routerId",
|
||||
properties.router_ids = AAZListType(
|
||||
serialized_name="routerIds",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.server_count_per_rack = AAZIntType(
|
||||
|
@ -256,6 +264,9 @@ class Show(AAZCommand):
|
|||
racks = cls._schema_on_200.properties.racks
|
||||
racks.Element = AAZStrType()
|
||||
|
||||
router_ids = cls._schema_on_200.properties.router_ids
|
||||
router_ids.Element = AAZStrType()
|
||||
|
||||
terminal_server_configuration = cls._schema_on_200.properties.terminal_server_configuration
|
||||
terminal_server_configuration.network_device_id = AAZStrType(
|
||||
serialized_name="networkDeviceId",
|
||||
|
@ -335,7 +346,6 @@ class _ShowHelper:
|
|||
)
|
||||
vpn_configuration_properties_read.network_to_network_interconnect_id = AAZStrType(
|
||||
serialized_name="networkToNetworkInterconnectId",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
vpn_configuration_properties_read.option_a_properties = AAZObjectType(
|
||||
serialized_name="optionAProperties",
|
||||
|
@ -355,6 +365,7 @@ class _ShowHelper:
|
|||
option_a_properties.mtu = AAZIntType()
|
||||
option_a_properties.peer_asn = AAZIntType(
|
||||
serialized_name="peerASN",
|
||||
flags={"required": True},
|
||||
)
|
||||
option_a_properties.primary_ipv4_prefix = AAZStrType(
|
||||
serialized_name="primaryIpv4Prefix",
|
||||
|
@ -370,24 +381,28 @@ class _ShowHelper:
|
|||
)
|
||||
option_a_properties.vlan_id = AAZIntType(
|
||||
serialized_name="vlanId",
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
bfd_configuration = _schema_vpn_configuration_properties_read.option_a_properties.bfd_configuration
|
||||
bfd_configuration.interval = AAZIntType(
|
||||
bfd_configuration.administrative_state = AAZStrType(
|
||||
serialized_name="administrativeState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
bfd_configuration.multiplier = AAZIntType(
|
||||
flags={"read_only": True},
|
||||
bfd_configuration.interval_in_milli_seconds = AAZIntType(
|
||||
serialized_name="intervalInMilliSeconds",
|
||||
)
|
||||
bfd_configuration.multiplier = AAZIntType()
|
||||
|
||||
option_b_properties = _schema_vpn_configuration_properties_read.option_b_properties
|
||||
option_b_properties.export_route_targets = AAZListType(
|
||||
serialized_name="exportRouteTargets",
|
||||
flags={"required": True},
|
||||
)
|
||||
option_b_properties.import_route_targets = AAZListType(
|
||||
serialized_name="importRouteTargets",
|
||||
flags={"required": True},
|
||||
)
|
||||
option_b_properties.route_targets = AAZObjectType(
|
||||
serialized_name="routeTargets",
|
||||
)
|
||||
|
||||
export_route_targets = _schema_vpn_configuration_properties_read.option_b_properties.export_route_targets
|
||||
|
@ -396,6 +411,32 @@ class _ShowHelper:
|
|||
import_route_targets = _schema_vpn_configuration_properties_read.option_b_properties.import_route_targets
|
||||
import_route_targets.Element = AAZStrType()
|
||||
|
||||
route_targets = _schema_vpn_configuration_properties_read.option_b_properties.route_targets
|
||||
route_targets.export_ipv4_route_targets = AAZListType(
|
||||
serialized_name="exportIpv4RouteTargets",
|
||||
)
|
||||
route_targets.export_ipv6_route_targets = AAZListType(
|
||||
serialized_name="exportIpv6RouteTargets",
|
||||
)
|
||||
route_targets.import_ipv4_route_targets = AAZListType(
|
||||
serialized_name="importIpv4RouteTargets",
|
||||
)
|
||||
route_targets.import_ipv6_route_targets = AAZListType(
|
||||
serialized_name="importIpv6RouteTargets",
|
||||
)
|
||||
|
||||
export_ipv4_route_targets = _schema_vpn_configuration_properties_read.option_b_properties.route_targets.export_ipv4_route_targets
|
||||
export_ipv4_route_targets.Element = AAZStrType()
|
||||
|
||||
export_ipv6_route_targets = _schema_vpn_configuration_properties_read.option_b_properties.route_targets.export_ipv6_route_targets
|
||||
export_ipv6_route_targets.Element = AAZStrType()
|
||||
|
||||
import_ipv4_route_targets = _schema_vpn_configuration_properties_read.option_b_properties.route_targets.import_ipv4_route_targets
|
||||
import_ipv4_route_targets.Element = AAZStrType()
|
||||
|
||||
import_ipv6_route_targets = _schema_vpn_configuration_properties_read.option_b_properties.route_targets.import_ipv6_route_targets
|
||||
import_ipv6_route_targets.Element = AAZStrType()
|
||||
|
||||
_schema.administrative_state = cls._schema_vpn_configuration_properties_read.administrative_state
|
||||
_schema.network_to_network_interconnect_id = cls._schema_vpn_configuration_properties_read.network_to_network_interconnect_id
|
||||
_schema.option_a_properties = cls._schema_vpn_configuration_properties_read.option_a_properties
|
||||
|
|
|
@ -0,0 +1,863 @@
|
|||
# --------------------------------------------------------------------------------------------
|
||||
# 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 update",
|
||||
)
|
||||
class Update(AAZCommand):
|
||||
"""Update the Network Fabric resource.
|
||||
|
||||
:example: Update the Network Fabric option B Properties
|
||||
az networkfabric fabric update --resource-group "example-rg" --resource-name "example-fabric" --fabric-asn 20 --ipv4-prefix 10.1.0.0/19 --rack-count 3 --server-count-per-rack 7 --ts-config "{primaryIpv4Prefix:'172.31.0.0/30',secondaryIpv4Prefix:'172.31.0.20/30',username:'****',password:'*****',serialNumber:'1234'}" --managed-network-config "{infrastructureVpnConfiguration:{networkToNetworkInterconnectId:'/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric/networkToNetworkInterconnects/example-nni',peeringOption:OptionB,optionBProperties:{routeTargets:{exportIpv4RouteTargets:['65046:10039'],exportIpv6RouteTargets:['65046:10039'],importIpv4RouteTargets:['65046:10039'],importIpv6RouteTargets:['65046:10039']}}},workloadVpnConfiguration:{networkToNetworkInterconnectId:'/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric/networkToNetworkInterconnects/example-nni',peeringOption:OptionB,optionBProperties:{routeTargets:{exportIpv4RouteTargets:['65046:10039'],exportIpv6RouteTargets:['65046:10039'],importIpv4RouteTargets:['65046:10039'],importIpv6RouteTargets:['65046:10039']}}}}"
|
||||
|
||||
:example: Update the Network Fabric option A Properties
|
||||
az networkfabric fabric update --resource-group "example-rg" --resource-name "example-fabric" --fabric-asn 20 --ipv4-prefix "10.1.0.0/19" --rack-count 3 --server-count-per-rack 7 --ts-config "{primaryIpv4Prefix:'172.31.0.0/30',secondaryIpv4Prefix:'172.31.0.20/30',username:'****',password:'*****',serialNumber:1234}" --managed-network-config "{infrastructureVpnConfiguration:{networkToNetworkInterconnectId:'/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric/networkToNetworkInterconnects/example-nni',peeringOption:OptionA,optionAProperties:{bfdConfiguration:{multiplier:5,intervalInMilliSeconds:300},mtu:1500,vlanId:520,peerASN:65133,primaryIpv4Prefix:'172.31.0.0/31',secondaryIpv4Prefix:'172.31.0.20/31'}},workloadVpnConfiguration:{networkToNetworkInterconnectId:'/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric/networkToNetworkInterconnects/example-nni',peeringOption:OptionA,optionAProperties:{bfdConfiguration:{multiplier:5,intervalInMilliSeconds:300},mtu:1500,vlanId:520,peerASN:65133,primaryIpv4Prefix:'172.31.0.0/31',secondaryIpv4Prefix:'172.31.0.20/31'}}}"
|
||||
|
||||
:example: Help text for sub parameters under the specific parent can be viewed by using the shorthand syntax '??'. See https://github.com/Azure/azure-cli/tree/dev/doc/shorthand_syntax.md for more about shorthand syntax.
|
||||
az networkfabric fabric update --ts-config ??
|
||||
az networkfabric fabric update --managed-network-config "{infrastructureVpnConfiguration:??"
|
||||
az networkfabric fabric update --managed-network-config "{infrastructureVpnConfiguration:{option-b-properties:??"
|
||||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkfabrics/{}", "2023-06-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 Fabric.",
|
||||
required=True,
|
||||
id_part="name",
|
||||
)
|
||||
_args_schema.resource_group = AAZResourceGroupNameArg(
|
||||
help="Name of the resource group",
|
||||
required=True,
|
||||
)
|
||||
|
||||
# define Arg Group "Body"
|
||||
|
||||
_args_schema = cls._args_schema
|
||||
_args_schema.tags = AAZDictArg(
|
||||
options=["--tags"],
|
||||
arg_group="Body",
|
||||
help="Resource tags",
|
||||
)
|
||||
|
||||
tags = cls._args_schema.tags
|
||||
tags.Element = AAZStrArg()
|
||||
|
||||
# define Arg Group "Properties"
|
||||
|
||||
_args_schema = cls._args_schema
|
||||
_args_schema.annotation = AAZStrArg(
|
||||
options=["--annotation"],
|
||||
arg_group="Properties",
|
||||
help="Description for underlying resource.",
|
||||
)
|
||||
_args_schema.fabric_asn = AAZIntArg(
|
||||
options=["--fabric-asn"],
|
||||
arg_group="Properties",
|
||||
help="ASN of CE devices for CE/PE connectivity. The value should be between 1 to 4294967295. Example: 65123",
|
||||
fmt=AAZIntArgFormat(
|
||||
maximum=4294967295,
|
||||
minimum=1,
|
||||
),
|
||||
)
|
||||
_args_schema.ipv4_prefix = AAZStrArg(
|
||||
options=["--ipv4-prefix"],
|
||||
arg_group="Properties",
|
||||
help="IPv4Prefix for Management Network. Example: 10.1.0.0/19.",
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
_args_schema.ipv6_prefix = AAZStrArg(
|
||||
options=["--ipv6-prefix"],
|
||||
arg_group="Properties",
|
||||
help="IPv6Prefix for Management Network. Example: 3FFE:FFFF:0:CD40::/59.",
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
_args_schema.managed_network_config = AAZObjectArg(
|
||||
options=["--managed-network-config"],
|
||||
arg_group="Properties",
|
||||
help="Configuration to be used to setup the management network.",
|
||||
)
|
||||
_args_schema.rack_count = AAZIntArg(
|
||||
options=["--rack-count"],
|
||||
arg_group="Properties",
|
||||
help="Number of compute racks associated to Network Fabric. Possible values are from 1-8.",
|
||||
fmt=AAZIntArgFormat(
|
||||
maximum=8,
|
||||
minimum=1,
|
||||
),
|
||||
)
|
||||
_args_schema.server_count_per_rack = AAZIntArg(
|
||||
options=["--server-count-per-rack"],
|
||||
arg_group="Properties",
|
||||
help="Number of servers.Possible values are from 1-16.",
|
||||
fmt=AAZIntArgFormat(
|
||||
maximum=16,
|
||||
minimum=1,
|
||||
),
|
||||
)
|
||||
_args_schema.ts_config = AAZObjectArg(
|
||||
options=["--ts-config"],
|
||||
arg_group="Properties",
|
||||
help="Network and credentials configuration currently applied to terminal server.",
|
||||
)
|
||||
|
||||
managed_network_config = cls._args_schema.managed_network_config
|
||||
managed_network_config.infrastructure_vpn_configuration = AAZObjectArg(
|
||||
options=["infrastructure-vpn-configuration"],
|
||||
help="VPN Configuration properties.",
|
||||
)
|
||||
cls._build_args_vpn_configuration_patchable_properties_update(managed_network_config.infrastructure_vpn_configuration)
|
||||
managed_network_config.workload_vpn_configuration = AAZObjectArg(
|
||||
options=["workload-vpn-configuration"],
|
||||
help="VPN Configuration properties.",
|
||||
)
|
||||
cls._build_args_vpn_configuration_patchable_properties_update(managed_network_config.workload_vpn_configuration)
|
||||
|
||||
ts_config = cls._args_schema.ts_config
|
||||
ts_config.password = AAZStrArg(
|
||||
options=["password"],
|
||||
help="Password for the terminal server connection.",
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
ts_config.primary_ipv4_prefix = AAZStrArg(
|
||||
options=["primary-ipv4-prefix"],
|
||||
help="IPv4 Address Prefix. Example:172.31.0.0/30.",
|
||||
)
|
||||
ts_config.primary_ipv6_prefix = AAZStrArg(
|
||||
options=["primary-ipv6-prefix"],
|
||||
help="IPv6 Address Prefix. Example: 3FFE:FFFF:0:CD30::a0/127.",
|
||||
)
|
||||
ts_config.secondary_ipv4_prefix = AAZStrArg(
|
||||
options=["secondary-ipv4-prefix"],
|
||||
help="Secondary IPv4 Address Prefix. Example:172.31.0.20/30.",
|
||||
)
|
||||
ts_config.secondary_ipv6_prefix = AAZStrArg(
|
||||
options=["secondary-ipv6-prefix"],
|
||||
help="Secondary IPv6 Address Prefix. Example: 3FFE:FFFF:0:CD30::a4/127.",
|
||||
)
|
||||
ts_config.serial_number = AAZStrArg(
|
||||
options=["serial-number"],
|
||||
help="Serial Number of Terminal server.",
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
ts_config.username = AAZStrArg(
|
||||
options=["username"],
|
||||
help="Username for the terminal server connection.",
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
return cls._args_schema
|
||||
|
||||
_args_vpn_configuration_patchable_properties_update = None
|
||||
|
||||
@classmethod
|
||||
def _build_args_vpn_configuration_patchable_properties_update(cls, _schema):
|
||||
if cls._args_vpn_configuration_patchable_properties_update is not None:
|
||||
_schema.network_to_network_interconnect_id = cls._args_vpn_configuration_patchable_properties_update.network_to_network_interconnect_id
|
||||
_schema.option_a_properties = cls._args_vpn_configuration_patchable_properties_update.option_a_properties
|
||||
_schema.option_b_properties = cls._args_vpn_configuration_patchable_properties_update.option_b_properties
|
||||
_schema.peering_option = cls._args_vpn_configuration_patchable_properties_update.peering_option
|
||||
return
|
||||
|
||||
cls._args_vpn_configuration_patchable_properties_update = AAZObjectArg()
|
||||
|
||||
vpn_configuration_patchable_properties_update = cls._args_vpn_configuration_patchable_properties_update
|
||||
vpn_configuration_patchable_properties_update.network_to_network_interconnect_id = AAZResourceIdArg(
|
||||
options=["network-to-network-interconnect-id"],
|
||||
help="ARM Resource ID of the Network To Network Interconnect.",
|
||||
)
|
||||
vpn_configuration_patchable_properties_update.option_a_properties = AAZObjectArg(
|
||||
options=["option-a-properties"],
|
||||
help="option A properties.",
|
||||
)
|
||||
vpn_configuration_patchable_properties_update.option_b_properties = AAZObjectArg(
|
||||
options=["option-b-properties"],
|
||||
help="option B properties.",
|
||||
)
|
||||
vpn_configuration_patchable_properties_update.peering_option = AAZStrArg(
|
||||
options=["peering-option"],
|
||||
help="Peering option list.",
|
||||
enum={"OptionA": "OptionA", "OptionB": "OptionB"},
|
||||
)
|
||||
|
||||
option_a_properties = cls._args_vpn_configuration_patchable_properties_update.option_a_properties
|
||||
option_a_properties.bfd_configuration = AAZObjectArg(
|
||||
options=["bfd-configuration"],
|
||||
help="BFD Configuration properties.",
|
||||
)
|
||||
option_a_properties.mtu = AAZIntArg(
|
||||
options=["mtu"],
|
||||
help="MTU to use for option A peering. The value should be between 64 to 9200. Default value is 1500. Example: 1500",
|
||||
fmt=AAZIntArgFormat(
|
||||
maximum=9200,
|
||||
minimum=64,
|
||||
),
|
||||
)
|
||||
option_a_properties.peer_asn = AAZIntArg(
|
||||
options=["peer-asn"],
|
||||
help="Peer ASN number. The value should be between 1 to 4294967295. Example: 28.",
|
||||
fmt=AAZIntArgFormat(
|
||||
maximum=4294967295,
|
||||
minimum=1,
|
||||
),
|
||||
)
|
||||
option_a_properties.primary_ipv4_prefix = AAZStrArg(
|
||||
options=["primary-ipv4-prefix"],
|
||||
help="IPv4 Address Prefix. Example: 172.31.0.0/31.",
|
||||
)
|
||||
option_a_properties.primary_ipv6_prefix = AAZStrArg(
|
||||
options=["primary-ipv6-prefix"],
|
||||
help="IPv6 Address Prefix. Example: 3FFE:FFFF:0:CD30::a0/127.",
|
||||
)
|
||||
option_a_properties.secondary_ipv4_prefix = AAZStrArg(
|
||||
options=["secondary-ipv4-prefix"],
|
||||
help="Secondary IPv4 Address Prefix. Example: 172.31.0.20/31.",
|
||||
)
|
||||
option_a_properties.secondary_ipv6_prefix = AAZStrArg(
|
||||
options=["secondary-ipv6-prefix"],
|
||||
help="Secondary IPv6 Address Prefix. Example: 3FFE:FFFF:0:CD30::a4/127",
|
||||
)
|
||||
option_a_properties.vlan_id = AAZIntArg(
|
||||
options=["vlan-id"],
|
||||
help="Vlan Id. The value should be between 501 to 4094. Example: 501",
|
||||
fmt=AAZIntArgFormat(
|
||||
maximum=4094,
|
||||
minimum=501,
|
||||
),
|
||||
)
|
||||
|
||||
bfd_configuration = cls._args_vpn_configuration_patchable_properties_update.option_a_properties.bfd_configuration
|
||||
bfd_configuration.interval_in_milli_seconds = AAZIntArg(
|
||||
options=["interval-in-milli-seconds"],
|
||||
help="Interval in milliseconds. Default Value is 300. Example: 300.",
|
||||
)
|
||||
bfd_configuration.multiplier = AAZIntArg(
|
||||
options=["multiplier"],
|
||||
help="Multiplier for the Bfd Configuration. Default Value is 5. Example: 5.",
|
||||
)
|
||||
|
||||
option_b_properties = cls._args_vpn_configuration_patchable_properties_update.option_b_properties
|
||||
option_b_properties.export_route_targets = AAZListArg(
|
||||
options=["export-route-targets"],
|
||||
help="Route Targets to be applied for outgoing routes from CE. This is for backward compatibility.",
|
||||
)
|
||||
option_b_properties.import_route_targets = AAZListArg(
|
||||
options=["import-route-targets"],
|
||||
help="Route Targets to be applied for incoming routes into CE. This is for backward compatibility.",
|
||||
)
|
||||
option_b_properties.route_targets = AAZObjectArg(
|
||||
options=["route-targets"],
|
||||
help="Route Targets to be applied.",
|
||||
)
|
||||
|
||||
export_route_targets = cls._args_vpn_configuration_patchable_properties_update.option_b_properties.export_route_targets
|
||||
export_route_targets.Element = AAZStrArg()
|
||||
|
||||
import_route_targets = cls._args_vpn_configuration_patchable_properties_update.option_b_properties.import_route_targets
|
||||
import_route_targets.Element = AAZStrArg()
|
||||
|
||||
route_targets = cls._args_vpn_configuration_patchable_properties_update.option_b_properties.route_targets
|
||||
route_targets.export_ipv4_route_targets = AAZListArg(
|
||||
options=["export-ipv4-route-targets"],
|
||||
help="Route Targets to be applied for outgoing routes into CE.",
|
||||
)
|
||||
route_targets.export_ipv6_route_targets = AAZListArg(
|
||||
options=["export-ipv6-route-targets"],
|
||||
help="Route Targets to be applied for outgoing routes from CE.",
|
||||
)
|
||||
route_targets.import_ipv4_route_targets = AAZListArg(
|
||||
options=["import-ipv4-route-targets"],
|
||||
help="Route Targets to be applied for incoming routes into CE.",
|
||||
)
|
||||
route_targets.import_ipv6_route_targets = AAZListArg(
|
||||
options=["import-ipv6-route-targets"],
|
||||
help="Route Targets to be applied for incoming routes from CE.",
|
||||
)
|
||||
|
||||
export_ipv4_route_targets = cls._args_vpn_configuration_patchable_properties_update.option_b_properties.route_targets.export_ipv4_route_targets
|
||||
export_ipv4_route_targets.Element = AAZStrArg(
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
|
||||
export_ipv6_route_targets = cls._args_vpn_configuration_patchable_properties_update.option_b_properties.route_targets.export_ipv6_route_targets
|
||||
export_ipv6_route_targets.Element = AAZStrArg(
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
|
||||
import_ipv4_route_targets = cls._args_vpn_configuration_patchable_properties_update.option_b_properties.route_targets.import_ipv4_route_targets
|
||||
import_ipv4_route_targets.Element = AAZStrArg(
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
|
||||
import_ipv6_route_targets = cls._args_vpn_configuration_patchable_properties_update.option_b_properties.route_targets.import_ipv6_route_targets
|
||||
import_ipv6_route_targets.Element = AAZStrArg(
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
|
||||
_schema.network_to_network_interconnect_id = cls._args_vpn_configuration_patchable_properties_update.network_to_network_interconnect_id
|
||||
_schema.option_a_properties = cls._args_vpn_configuration_patchable_properties_update.option_a_properties
|
||||
_schema.option_b_properties = cls._args_vpn_configuration_patchable_properties_update.option_b_properties
|
||||
_schema.peering_option = cls._args_vpn_configuration_patchable_properties_update.peering_option
|
||||
|
||||
def _execute_operations(self):
|
||||
self.pre_operations()
|
||||
yield self.NetworkFabricsUpdate(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 NetworkFabricsUpdate(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}",
|
||||
**self.url_parameters
|
||||
)
|
||||
|
||||
@property
|
||||
def method(self):
|
||||
return "PATCH"
|
||||
|
||||
@property
|
||||
def error_format(self):
|
||||
return "MgmtErrorFormat"
|
||||
|
||||
@property
|
||||
def url_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_url_param(
|
||||
"networkFabricName", self.ctx.args.resource_name,
|
||||
required=True,
|
||||
),
|
||||
**self.serialize_url_param(
|
||||
"resourceGroupName", self.ctx.args.resource_group,
|
||||
required=True,
|
||||
),
|
||||
**self.serialize_url_param(
|
||||
"subscriptionId", self.ctx.subscription_id,
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
return parameters
|
||||
|
||||
@property
|
||||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
return parameters
|
||||
|
||||
@property
|
||||
def header_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_header_param(
|
||||
"Content-Type", "application/json",
|
||||
),
|
||||
**self.serialize_header_param(
|
||||
"Accept", "application/json",
|
||||
),
|
||||
}
|
||||
return parameters
|
||||
|
||||
@property
|
||||
def content(self):
|
||||
_content_value, _builder = self.new_content_builder(
|
||||
self.ctx.args,
|
||||
typ=AAZObjectType,
|
||||
typ_kwargs={"flags": {"required": True, "client_flatten": True}}
|
||||
)
|
||||
_builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
|
||||
_builder.set_prop("tags", AAZDictType, ".tags")
|
||||
|
||||
properties = _builder.get(".properties")
|
||||
if properties is not None:
|
||||
properties.set_prop("annotation", AAZStrType, ".annotation")
|
||||
properties.set_prop("fabricASN", AAZIntType, ".fabric_asn")
|
||||
properties.set_prop("ipv4Prefix", AAZStrType, ".ipv4_prefix")
|
||||
properties.set_prop("ipv6Prefix", AAZStrType, ".ipv6_prefix")
|
||||
properties.set_prop("managementNetworkConfiguration", AAZObjectType, ".managed_network_config")
|
||||
properties.set_prop("rackCount", AAZIntType, ".rack_count")
|
||||
properties.set_prop("serverCountPerRack", AAZIntType, ".server_count_per_rack")
|
||||
properties.set_prop("terminalServerConfiguration", AAZObjectType, ".ts_config")
|
||||
|
||||
management_network_configuration = _builder.get(".properties.managementNetworkConfiguration")
|
||||
if management_network_configuration is not None:
|
||||
_UpdateHelper._build_schema_vpn_configuration_patchable_properties_update(management_network_configuration.set_prop("infrastructureVpnConfiguration", AAZObjectType, ".infrastructure_vpn_configuration"))
|
||||
_UpdateHelper._build_schema_vpn_configuration_patchable_properties_update(management_network_configuration.set_prop("workloadVpnConfiguration", AAZObjectType, ".workload_vpn_configuration"))
|
||||
|
||||
terminal_server_configuration = _builder.get(".properties.terminalServerConfiguration")
|
||||
if terminal_server_configuration is not None:
|
||||
terminal_server_configuration.set_prop("password", AAZStrType, ".password", typ_kwargs={"flags": {"secret": True}})
|
||||
terminal_server_configuration.set_prop("primaryIpv4Prefix", AAZStrType, ".primary_ipv4_prefix")
|
||||
terminal_server_configuration.set_prop("primaryIpv6Prefix", AAZStrType, ".primary_ipv6_prefix")
|
||||
terminal_server_configuration.set_prop("secondaryIpv4Prefix", AAZStrType, ".secondary_ipv4_prefix")
|
||||
terminal_server_configuration.set_prop("secondaryIpv6Prefix", AAZStrType, ".secondary_ipv6_prefix")
|
||||
terminal_server_configuration.set_prop("serialNumber", AAZStrType, ".serial_number")
|
||||
terminal_server_configuration.set_prop("username", AAZStrType, ".username")
|
||||
|
||||
tags = _builder.get(".tags")
|
||||
if tags is not None:
|
||||
tags.set_elements(AAZStrType, ".")
|
||||
|
||||
return self.serialize_content(_content_value)
|
||||
|
||||
def on_200(self, session):
|
||||
data = self.deserialize_http_content(session)
|
||||
self.ctx.set_var(
|
||||
"instance",
|
||||
data,
|
||||
schema_builder=self._build_schema_on_200
|
||||
)
|
||||
|
||||
_schema_on_200 = None
|
||||
|
||||
@classmethod
|
||||
def _build_schema_on_200(cls):
|
||||
if cls._schema_on_200 is not None:
|
||||
return cls._schema_on_200
|
||||
|
||||
cls._schema_on_200 = AAZObjectType()
|
||||
|
||||
_schema_on_200 = cls._schema_on_200
|
||||
_schema_on_200.id = AAZStrType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_schema_on_200.location = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
_schema_on_200.name = AAZStrType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_schema_on_200.properties = AAZObjectType(
|
||||
flags={"required": True, "client_flatten": True},
|
||||
)
|
||||
_schema_on_200.system_data = AAZObjectType(
|
||||
serialized_name="systemData",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_schema_on_200.tags = AAZDictType()
|
||||
_schema_on_200.type = AAZStrType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
|
||||
properties = cls._schema_on_200.properties
|
||||
properties.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.fabric_asn = AAZIntType(
|
||||
serialized_name="fabricASN",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.fabric_version = AAZStrType(
|
||||
serialized_name="fabricVersion",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.ipv4_prefix = AAZStrType(
|
||||
serialized_name="ipv4Prefix",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.ipv6_prefix = AAZStrType(
|
||||
serialized_name="ipv6Prefix",
|
||||
)
|
||||
properties.l2_isolation_domains = AAZListType(
|
||||
serialized_name="l2IsolationDomains",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.l3_isolation_domains = AAZListType(
|
||||
serialized_name="l3IsolationDomains",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.management_network_configuration = AAZObjectType(
|
||||
serialized_name="managementNetworkConfiguration",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.network_fabric_controller_id = AAZStrType(
|
||||
serialized_name="networkFabricControllerId",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.network_fabric_sku = AAZStrType(
|
||||
serialized_name="networkFabricSku",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.provisioning_state = AAZStrType(
|
||||
serialized_name="provisioningState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.rack_count = AAZIntType(
|
||||
serialized_name="rackCount",
|
||||
)
|
||||
properties.racks = AAZListType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.router_ids = AAZListType(
|
||||
serialized_name="routerIds",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.server_count_per_rack = AAZIntType(
|
||||
serialized_name="serverCountPerRack",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.terminal_server_configuration = AAZObjectType(
|
||||
serialized_name="terminalServerConfiguration",
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
l2_isolation_domains = cls._schema_on_200.properties.l2_isolation_domains
|
||||
l2_isolation_domains.Element = AAZStrType()
|
||||
|
||||
l3_isolation_domains = cls._schema_on_200.properties.l3_isolation_domains
|
||||
l3_isolation_domains.Element = AAZStrType()
|
||||
|
||||
management_network_configuration = cls._schema_on_200.properties.management_network_configuration
|
||||
management_network_configuration.infrastructure_vpn_configuration = AAZObjectType(
|
||||
serialized_name="infrastructureVpnConfiguration",
|
||||
flags={"required": True},
|
||||
)
|
||||
_UpdateHelper._build_schema_vpn_configuration_properties_read(management_network_configuration.infrastructure_vpn_configuration)
|
||||
management_network_configuration.workload_vpn_configuration = AAZObjectType(
|
||||
serialized_name="workloadVpnConfiguration",
|
||||
flags={"required": True},
|
||||
)
|
||||
_UpdateHelper._build_schema_vpn_configuration_properties_read(management_network_configuration.workload_vpn_configuration)
|
||||
|
||||
racks = cls._schema_on_200.properties.racks
|
||||
racks.Element = AAZStrType()
|
||||
|
||||
router_ids = cls._schema_on_200.properties.router_ids
|
||||
router_ids.Element = AAZStrType()
|
||||
|
||||
terminal_server_configuration = cls._schema_on_200.properties.terminal_server_configuration
|
||||
terminal_server_configuration.network_device_id = AAZStrType(
|
||||
serialized_name="networkDeviceId",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
terminal_server_configuration.password = AAZStrType(
|
||||
flags={"required": True, "secret": True},
|
||||
)
|
||||
terminal_server_configuration.primary_ipv4_prefix = AAZStrType(
|
||||
serialized_name="primaryIpv4Prefix",
|
||||
flags={"required": True},
|
||||
)
|
||||
terminal_server_configuration.primary_ipv6_prefix = AAZStrType(
|
||||
serialized_name="primaryIpv6Prefix",
|
||||
)
|
||||
terminal_server_configuration.secondary_ipv4_prefix = AAZStrType(
|
||||
serialized_name="secondaryIpv4Prefix",
|
||||
flags={"required": True},
|
||||
)
|
||||
terminal_server_configuration.secondary_ipv6_prefix = AAZStrType(
|
||||
serialized_name="secondaryIpv6Prefix",
|
||||
)
|
||||
terminal_server_configuration.serial_number = AAZStrType(
|
||||
serialized_name="serialNumber",
|
||||
)
|
||||
terminal_server_configuration.username = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
system_data = cls._schema_on_200.system_data
|
||||
system_data.created_at = AAZStrType(
|
||||
serialized_name="createdAt",
|
||||
)
|
||||
system_data.created_by = AAZStrType(
|
||||
serialized_name="createdBy",
|
||||
)
|
||||
system_data.created_by_type = AAZStrType(
|
||||
serialized_name="createdByType",
|
||||
)
|
||||
system_data.last_modified_at = AAZStrType(
|
||||
serialized_name="lastModifiedAt",
|
||||
)
|
||||
system_data.last_modified_by = AAZStrType(
|
||||
serialized_name="lastModifiedBy",
|
||||
)
|
||||
system_data.last_modified_by_type = AAZStrType(
|
||||
serialized_name="lastModifiedByType",
|
||||
)
|
||||
|
||||
tags = cls._schema_on_200.tags
|
||||
tags.Element = AAZStrType()
|
||||
|
||||
return cls._schema_on_200
|
||||
|
||||
|
||||
class _UpdateHelper:
|
||||
"""Helper class for Update"""
|
||||
|
||||
@classmethod
|
||||
def _build_schema_vpn_configuration_patchable_properties_update(cls, _builder):
|
||||
if _builder is None:
|
||||
return
|
||||
_builder.set_prop("networkToNetworkInterconnectId", AAZStrType, ".network_to_network_interconnect_id")
|
||||
_builder.set_prop("optionAProperties", AAZObjectType, ".option_a_properties")
|
||||
_builder.set_prop("optionBProperties", AAZObjectType, ".option_b_properties")
|
||||
_builder.set_prop("peeringOption", AAZStrType, ".peering_option")
|
||||
|
||||
option_a_properties = _builder.get(".optionAProperties")
|
||||
if option_a_properties is not None:
|
||||
option_a_properties.set_prop("bfdConfiguration", AAZObjectType, ".bfd_configuration")
|
||||
option_a_properties.set_prop("mtu", AAZIntType, ".mtu")
|
||||
option_a_properties.set_prop("peerASN", AAZIntType, ".peer_asn")
|
||||
option_a_properties.set_prop("primaryIpv4Prefix", AAZStrType, ".primary_ipv4_prefix")
|
||||
option_a_properties.set_prop("primaryIpv6Prefix", AAZStrType, ".primary_ipv6_prefix")
|
||||
option_a_properties.set_prop("secondaryIpv4Prefix", AAZStrType, ".secondary_ipv4_prefix")
|
||||
option_a_properties.set_prop("secondaryIpv6Prefix", AAZStrType, ".secondary_ipv6_prefix")
|
||||
option_a_properties.set_prop("vlanId", AAZIntType, ".vlan_id")
|
||||
|
||||
bfd_configuration = _builder.get(".optionAProperties.bfdConfiguration")
|
||||
if bfd_configuration is not None:
|
||||
bfd_configuration.set_prop("intervalInMilliSeconds", AAZIntType, ".interval_in_milli_seconds")
|
||||
bfd_configuration.set_prop("multiplier", AAZIntType, ".multiplier")
|
||||
|
||||
option_b_properties = _builder.get(".optionBProperties")
|
||||
if option_b_properties is not None:
|
||||
option_b_properties.set_prop("exportRouteTargets", AAZListType, ".export_route_targets")
|
||||
option_b_properties.set_prop("importRouteTargets", AAZListType, ".import_route_targets")
|
||||
option_b_properties.set_prop("routeTargets", AAZObjectType, ".route_targets")
|
||||
|
||||
export_route_targets = _builder.get(".optionBProperties.exportRouteTargets")
|
||||
if export_route_targets is not None:
|
||||
export_route_targets.set_elements(AAZStrType, ".")
|
||||
|
||||
import_route_targets = _builder.get(".optionBProperties.importRouteTargets")
|
||||
if import_route_targets is not None:
|
||||
import_route_targets.set_elements(AAZStrType, ".")
|
||||
|
||||
route_targets = _builder.get(".optionBProperties.routeTargets")
|
||||
if route_targets is not None:
|
||||
route_targets.set_prop("exportIpv4RouteTargets", AAZListType, ".export_ipv4_route_targets")
|
||||
route_targets.set_prop("exportIpv6RouteTargets", AAZListType, ".export_ipv6_route_targets")
|
||||
route_targets.set_prop("importIpv4RouteTargets", AAZListType, ".import_ipv4_route_targets")
|
||||
route_targets.set_prop("importIpv6RouteTargets", AAZListType, ".import_ipv6_route_targets")
|
||||
|
||||
export_ipv4_route_targets = _builder.get(".optionBProperties.routeTargets.exportIpv4RouteTargets")
|
||||
if export_ipv4_route_targets is not None:
|
||||
export_ipv4_route_targets.set_elements(AAZStrType, ".")
|
||||
|
||||
export_ipv6_route_targets = _builder.get(".optionBProperties.routeTargets.exportIpv6RouteTargets")
|
||||
if export_ipv6_route_targets is not None:
|
||||
export_ipv6_route_targets.set_elements(AAZStrType, ".")
|
||||
|
||||
import_ipv4_route_targets = _builder.get(".optionBProperties.routeTargets.importIpv4RouteTargets")
|
||||
if import_ipv4_route_targets is not None:
|
||||
import_ipv4_route_targets.set_elements(AAZStrType, ".")
|
||||
|
||||
import_ipv6_route_targets = _builder.get(".optionBProperties.routeTargets.importIpv6RouteTargets")
|
||||
if import_ipv6_route_targets is not None:
|
||||
import_ipv6_route_targets.set_elements(AAZStrType, ".")
|
||||
|
||||
_schema_vpn_configuration_properties_read = None
|
||||
|
||||
@classmethod
|
||||
def _build_schema_vpn_configuration_properties_read(cls, _schema):
|
||||
if cls._schema_vpn_configuration_properties_read is not None:
|
||||
_schema.administrative_state = cls._schema_vpn_configuration_properties_read.administrative_state
|
||||
_schema.network_to_network_interconnect_id = cls._schema_vpn_configuration_properties_read.network_to_network_interconnect_id
|
||||
_schema.option_a_properties = cls._schema_vpn_configuration_properties_read.option_a_properties
|
||||
_schema.option_b_properties = cls._schema_vpn_configuration_properties_read.option_b_properties
|
||||
_schema.peering_option = cls._schema_vpn_configuration_properties_read.peering_option
|
||||
return
|
||||
|
||||
cls._schema_vpn_configuration_properties_read = _schema_vpn_configuration_properties_read = AAZObjectType()
|
||||
|
||||
vpn_configuration_properties_read = _schema_vpn_configuration_properties_read
|
||||
vpn_configuration_properties_read.administrative_state = AAZStrType(
|
||||
serialized_name="administrativeState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
vpn_configuration_properties_read.network_to_network_interconnect_id = AAZStrType(
|
||||
serialized_name="networkToNetworkInterconnectId",
|
||||
)
|
||||
vpn_configuration_properties_read.option_a_properties = AAZObjectType(
|
||||
serialized_name="optionAProperties",
|
||||
)
|
||||
vpn_configuration_properties_read.option_b_properties = AAZObjectType(
|
||||
serialized_name="optionBProperties",
|
||||
)
|
||||
vpn_configuration_properties_read.peering_option = AAZStrType(
|
||||
serialized_name="peeringOption",
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
option_a_properties = _schema_vpn_configuration_properties_read.option_a_properties
|
||||
option_a_properties.bfd_configuration = AAZObjectType(
|
||||
serialized_name="bfdConfiguration",
|
||||
)
|
||||
option_a_properties.mtu = AAZIntType()
|
||||
option_a_properties.peer_asn = AAZIntType(
|
||||
serialized_name="peerASN",
|
||||
flags={"required": True},
|
||||
)
|
||||
option_a_properties.primary_ipv4_prefix = AAZStrType(
|
||||
serialized_name="primaryIpv4Prefix",
|
||||
)
|
||||
option_a_properties.primary_ipv6_prefix = AAZStrType(
|
||||
serialized_name="primaryIpv6Prefix",
|
||||
)
|
||||
option_a_properties.secondary_ipv4_prefix = AAZStrType(
|
||||
serialized_name="secondaryIpv4Prefix",
|
||||
)
|
||||
option_a_properties.secondary_ipv6_prefix = AAZStrType(
|
||||
serialized_name="secondaryIpv6Prefix",
|
||||
)
|
||||
option_a_properties.vlan_id = AAZIntType(
|
||||
serialized_name="vlanId",
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
bfd_configuration = _schema_vpn_configuration_properties_read.option_a_properties.bfd_configuration
|
||||
bfd_configuration.administrative_state = AAZStrType(
|
||||
serialized_name="administrativeState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
bfd_configuration.interval_in_milli_seconds = AAZIntType(
|
||||
serialized_name="intervalInMilliSeconds",
|
||||
)
|
||||
bfd_configuration.multiplier = AAZIntType()
|
||||
|
||||
option_b_properties = _schema_vpn_configuration_properties_read.option_b_properties
|
||||
option_b_properties.export_route_targets = AAZListType(
|
||||
serialized_name="exportRouteTargets",
|
||||
)
|
||||
option_b_properties.import_route_targets = AAZListType(
|
||||
serialized_name="importRouteTargets",
|
||||
)
|
||||
option_b_properties.route_targets = AAZObjectType(
|
||||
serialized_name="routeTargets",
|
||||
)
|
||||
|
||||
export_route_targets = _schema_vpn_configuration_properties_read.option_b_properties.export_route_targets
|
||||
export_route_targets.Element = AAZStrType()
|
||||
|
||||
import_route_targets = _schema_vpn_configuration_properties_read.option_b_properties.import_route_targets
|
||||
import_route_targets.Element = AAZStrType()
|
||||
|
||||
route_targets = _schema_vpn_configuration_properties_read.option_b_properties.route_targets
|
||||
route_targets.export_ipv4_route_targets = AAZListType(
|
||||
serialized_name="exportIpv4RouteTargets",
|
||||
)
|
||||
route_targets.export_ipv6_route_targets = AAZListType(
|
||||
serialized_name="exportIpv6RouteTargets",
|
||||
)
|
||||
route_targets.import_ipv4_route_targets = AAZListType(
|
||||
serialized_name="importIpv4RouteTargets",
|
||||
)
|
||||
route_targets.import_ipv6_route_targets = AAZListType(
|
||||
serialized_name="importIpv6RouteTargets",
|
||||
)
|
||||
|
||||
export_ipv4_route_targets = _schema_vpn_configuration_properties_read.option_b_properties.route_targets.export_ipv4_route_targets
|
||||
export_ipv4_route_targets.Element = AAZStrType()
|
||||
|
||||
export_ipv6_route_targets = _schema_vpn_configuration_properties_read.option_b_properties.route_targets.export_ipv6_route_targets
|
||||
export_ipv6_route_targets.Element = AAZStrType()
|
||||
|
||||
import_ipv4_route_targets = _schema_vpn_configuration_properties_read.option_b_properties.route_targets.import_ipv4_route_targets
|
||||
import_ipv4_route_targets.Element = AAZStrType()
|
||||
|
||||
import_ipv6_route_targets = _schema_vpn_configuration_properties_read.option_b_properties.route_targets.import_ipv6_route_targets
|
||||
import_ipv6_route_targets.Element = AAZStrType()
|
||||
|
||||
_schema.administrative_state = cls._schema_vpn_configuration_properties_read.administrative_state
|
||||
_schema.network_to_network_interconnect_id = cls._schema_vpn_configuration_properties_read.network_to_network_interconnect_id
|
||||
_schema.option_a_properties = cls._schema_vpn_configuration_properties_read.option_a_properties
|
||||
_schema.option_b_properties = cls._schema_vpn_configuration_properties_read.option_b_properties
|
||||
_schema.peering_option = cls._schema_vpn_configuration_properties_read.peering_option
|
||||
|
||||
|
||||
__all__ = ["Update"]
|
|
@ -20,7 +20,7 @@ class Wait(AAZWaitCommand):
|
|||
|
||||
_aaz_info = {
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkfabrics/{}", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkfabrics/{}", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@ class Wait(AAZWaitCommand):
|
|||
_args_schema = cls._args_schema
|
||||
_args_schema.resource_name = AAZStrArg(
|
||||
options=["--resource-name"],
|
||||
help="Name of the Network Fabric",
|
||||
help="Name of the Network Fabric.",
|
||||
required=True,
|
||||
id_part="name",
|
||||
)
|
||||
|
@ -117,7 +117,7 @@ class Wait(AAZWaitCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
@ -160,7 +160,7 @@ class Wait(AAZWaitCommand):
|
|||
flags={"read_only": True},
|
||||
)
|
||||
_schema_on_200.properties = AAZObjectType(
|
||||
flags={"client_flatten": True},
|
||||
flags={"required": True, "client_flatten": True},
|
||||
)
|
||||
_schema_on_200.system_data = AAZObjectType(
|
||||
serialized_name="systemData",
|
||||
|
@ -172,13 +172,26 @@ class Wait(AAZWaitCommand):
|
|||
)
|
||||
|
||||
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.fabric_asn = AAZIntType(
|
||||
serialized_name="fabricASN",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.fabric_version = AAZStrType(
|
||||
serialized_name="fabricVersion",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.ipv4_prefix = AAZStrType(
|
||||
serialized_name="ipv4Prefix",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.ipv6_prefix = AAZStrType(
|
||||
serialized_name="ipv6Prefix",
|
||||
|
@ -203,23 +216,18 @@ class Wait(AAZWaitCommand):
|
|||
serialized_name="networkFabricSku",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.operational_state = AAZStrType(
|
||||
serialized_name="operationalState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.provisioning_state = AAZStrType(
|
||||
serialized_name="provisioningState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.rack_count = AAZIntType(
|
||||
serialized_name="rackCount",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.racks = AAZListType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.router_id = AAZStrType(
|
||||
serialized_name="routerId",
|
||||
properties.router_ids = AAZListType(
|
||||
serialized_name="routerIds",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.server_count_per_rack = AAZIntType(
|
||||
|
@ -252,6 +260,9 @@ class Wait(AAZWaitCommand):
|
|||
racks = cls._schema_on_200.properties.racks
|
||||
racks.Element = AAZStrType()
|
||||
|
||||
router_ids = cls._schema_on_200.properties.router_ids
|
||||
router_ids.Element = AAZStrType()
|
||||
|
||||
terminal_server_configuration = cls._schema_on_200.properties.terminal_server_configuration
|
||||
terminal_server_configuration.network_device_id = AAZStrType(
|
||||
serialized_name="networkDeviceId",
|
||||
|
@ -331,7 +342,6 @@ class _WaitHelper:
|
|||
)
|
||||
vpn_configuration_properties_read.network_to_network_interconnect_id = AAZStrType(
|
||||
serialized_name="networkToNetworkInterconnectId",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
vpn_configuration_properties_read.option_a_properties = AAZObjectType(
|
||||
serialized_name="optionAProperties",
|
||||
|
@ -351,6 +361,7 @@ class _WaitHelper:
|
|||
option_a_properties.mtu = AAZIntType()
|
||||
option_a_properties.peer_asn = AAZIntType(
|
||||
serialized_name="peerASN",
|
||||
flags={"required": True},
|
||||
)
|
||||
option_a_properties.primary_ipv4_prefix = AAZStrType(
|
||||
serialized_name="primaryIpv4Prefix",
|
||||
|
@ -366,24 +377,28 @@ class _WaitHelper:
|
|||
)
|
||||
option_a_properties.vlan_id = AAZIntType(
|
||||
serialized_name="vlanId",
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
bfd_configuration = _schema_vpn_configuration_properties_read.option_a_properties.bfd_configuration
|
||||
bfd_configuration.interval = AAZIntType(
|
||||
bfd_configuration.administrative_state = AAZStrType(
|
||||
serialized_name="administrativeState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
bfd_configuration.multiplier = AAZIntType(
|
||||
flags={"read_only": True},
|
||||
bfd_configuration.interval_in_milli_seconds = AAZIntType(
|
||||
serialized_name="intervalInMilliSeconds",
|
||||
)
|
||||
bfd_configuration.multiplier = AAZIntType()
|
||||
|
||||
option_b_properties = _schema_vpn_configuration_properties_read.option_b_properties
|
||||
option_b_properties.export_route_targets = AAZListType(
|
||||
serialized_name="exportRouteTargets",
|
||||
flags={"required": True},
|
||||
)
|
||||
option_b_properties.import_route_targets = AAZListType(
|
||||
serialized_name="importRouteTargets",
|
||||
flags={"required": True},
|
||||
)
|
||||
option_b_properties.route_targets = AAZObjectType(
|
||||
serialized_name="routeTargets",
|
||||
)
|
||||
|
||||
export_route_targets = _schema_vpn_configuration_properties_read.option_b_properties.export_route_targets
|
||||
|
@ -392,6 +407,32 @@ class _WaitHelper:
|
|||
import_route_targets = _schema_vpn_configuration_properties_read.option_b_properties.import_route_targets
|
||||
import_route_targets.Element = AAZStrType()
|
||||
|
||||
route_targets = _schema_vpn_configuration_properties_read.option_b_properties.route_targets
|
||||
route_targets.export_ipv4_route_targets = AAZListType(
|
||||
serialized_name="exportIpv4RouteTargets",
|
||||
)
|
||||
route_targets.export_ipv6_route_targets = AAZListType(
|
||||
serialized_name="exportIpv6RouteTargets",
|
||||
)
|
||||
route_targets.import_ipv4_route_targets = AAZListType(
|
||||
serialized_name="importIpv4RouteTargets",
|
||||
)
|
||||
route_targets.import_ipv6_route_targets = AAZListType(
|
||||
serialized_name="importIpv6RouteTargets",
|
||||
)
|
||||
|
||||
export_ipv4_route_targets = _schema_vpn_configuration_properties_read.option_b_properties.route_targets.export_ipv4_route_targets
|
||||
export_ipv4_route_targets.Element = AAZStrType()
|
||||
|
||||
export_ipv6_route_targets = _schema_vpn_configuration_properties_read.option_b_properties.route_targets.export_ipv6_route_targets
|
||||
export_ipv6_route_targets.Element = AAZStrType()
|
||||
|
||||
import_ipv4_route_targets = _schema_vpn_configuration_properties_read.option_b_properties.route_targets.import_ipv4_route_targets
|
||||
import_ipv4_route_targets.Element = AAZStrType()
|
||||
|
||||
import_ipv6_route_targets = _schema_vpn_configuration_properties_read.option_b_properties.route_targets.import_ipv6_route_targets
|
||||
import_ipv6_route_targets.Element = AAZStrType()
|
||||
|
||||
_schema.administrative_state = cls._schema_vpn_configuration_properties_read.administrative_state
|
||||
_schema.network_to_network_interconnect_id = cls._schema_vpn_configuration_properties_read.network_to_network_interconnect_id
|
||||
_schema.option_a_properties = cls._schema_vpn_configuration_properties_read.option_a_properties
|
||||
|
|
|
@ -15,16 +15,16 @@ from azure.cli.core.aaz import *
|
|||
"networkfabric interface delete",
|
||||
)
|
||||
class Delete(AAZCommand):
|
||||
"""Delete the Network Interface resource.
|
||||
"""Delete the Network Interface resource
|
||||
|
||||
:example: Delete the Network Interface
|
||||
az networkfabric interface delete -g "example-rg" --network-device-name "example-device" --resource-name "example-interface"
|
||||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-02-01-preview",
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkdevices/{}/networkinterfaces/{}", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkdevices/{}/networkinterfaces/{}", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -47,13 +47,13 @@ class Delete(AAZCommand):
|
|||
_args_schema = cls._args_schema
|
||||
_args_schema.network_device_name = AAZStrArg(
|
||||
options=["--device", "--network-device-name"],
|
||||
help="Name of the Network Device",
|
||||
help="Name of the Network Device.",
|
||||
required=True,
|
||||
id_part="name",
|
||||
)
|
||||
_args_schema.resource_name = AAZStrArg(
|
||||
options=["--resource-name"],
|
||||
help="Name of the NetworkInterfaceName",
|
||||
help="Name of the Network Interface.",
|
||||
required=True,
|
||||
id_part="child_name_1",
|
||||
)
|
||||
|
@ -153,7 +153,7 @@ class Delete(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
|
|
@ -15,16 +15,16 @@ from azure.cli.core.aaz import *
|
|||
"networkfabric interface list",
|
||||
)
|
||||
class List(AAZCommand):
|
||||
"""List all Network Interfaces in the provided resource group.
|
||||
"""List all Network Interfaces in the provided resource group
|
||||
|
||||
:example: List the Network Interfaces for Resource Group
|
||||
az networkfabric interface list -g "example-rg" --network-device-name "example-device"
|
||||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-02-01-preview",
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkdevices/{}/networkinterfaces", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkdevices/{}/networkinterfaces", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -45,7 +45,7 @@ class List(AAZCommand):
|
|||
_args_schema = cls._args_schema
|
||||
_args_schema.network_device_name = AAZStrArg(
|
||||
options=["--device", "--network-device-name"],
|
||||
help="Name of the Network Device",
|
||||
help="Name of the Network Device.",
|
||||
required=True,
|
||||
)
|
||||
_args_schema.resource_group = AAZResourceGroupNameArg(
|
||||
|
@ -56,7 +56,7 @@ class List(AAZCommand):
|
|||
|
||||
def _execute_operations(self):
|
||||
self.pre_operations()
|
||||
self.NetworkInterfacesList(ctx=self.ctx)()
|
||||
self.NetworkInterfacesListByNetworkDevice(ctx=self.ctx)()
|
||||
self.post_operations()
|
||||
|
||||
@register_callback
|
||||
|
@ -72,7 +72,7 @@ class List(AAZCommand):
|
|||
next_link = self.deserialize_output(self.ctx.vars.instance.next_link)
|
||||
return result, next_link
|
||||
|
||||
class NetworkInterfacesList(AAZHttpOperation):
|
||||
class NetworkInterfacesListByNetworkDevice(AAZHttpOperation):
|
||||
CLIENT_TYPE = "MgmtClient"
|
||||
|
||||
def __call__(self, *args, **kwargs):
|
||||
|
@ -120,7 +120,7 @@ class List(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
|
|
@ -15,16 +15,16 @@ from azure.cli.core.aaz import *
|
|||
"networkfabric interface show",
|
||||
)
|
||||
class Show(AAZCommand):
|
||||
"""Show details of the provided Network Interface resource.
|
||||
"""Show details of the provided Network Interface resource
|
||||
|
||||
:example: Show the Network Interface
|
||||
az networkfabric interface show -g "example-rg" --network-device-name "example-device" --resource-name "example-interface"
|
||||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-02-01-preview",
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkdevices/{}/networkinterfaces/{}", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkdevices/{}/networkinterfaces/{}", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -46,13 +46,13 @@ class Show(AAZCommand):
|
|||
_args_schema = cls._args_schema
|
||||
_args_schema.network_device_name = AAZStrArg(
|
||||
options=["--device", "--network-device-name"],
|
||||
help="Name of the Network Device",
|
||||
help="Name of the Network Device.",
|
||||
required=True,
|
||||
id_part="name",
|
||||
)
|
||||
_args_schema.resource_name = AAZStrArg(
|
||||
options=["--resource-name"],
|
||||
help="Name of the NetworkInterfaceName",
|
||||
help="Name of the Network Interface.",
|
||||
required=True,
|
||||
id_part="child_name_1",
|
||||
)
|
||||
|
@ -131,7 +131,7 @@ class Show(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
|
|
@ -15,16 +15,16 @@ from azure.cli.core.aaz import *
|
|||
"networkfabric interface update-admin-state",
|
||||
)
|
||||
class UpdateAdminState(AAZCommand):
|
||||
"""Update the admin state of the provided Network Interface resource.
|
||||
"""Update the admin state of the Network Interface.
|
||||
|
||||
:example: Update admin state of Network Interface
|
||||
az networkfabric interface update-admin-state -g "example-rg" --network-device-name "example-device" --resource-name "example-interface" --state "Enable"
|
||||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-02-01-preview",
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkdevices/{}/networkinterfaces/{}/updateadministrativestate", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkdevices/{}/networkinterfaces/{}/updateadministrativestate", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@ class UpdateAdminState(AAZCommand):
|
|||
|
||||
def _handler(self, command_args):
|
||||
super()._handler(command_args)
|
||||
return self.build_lro_poller(self._execute_operations, None)
|
||||
return self.build_lro_poller(self._execute_operations, self._output)
|
||||
|
||||
_args_schema = None
|
||||
|
||||
|
@ -47,13 +47,13 @@ class UpdateAdminState(AAZCommand):
|
|||
_args_schema = cls._args_schema
|
||||
_args_schema.network_device_name = AAZStrArg(
|
||||
options=["--device", "--network-device-name"],
|
||||
help="Name of the Network Device",
|
||||
help="Name of the Network Device.",
|
||||
required=True,
|
||||
id_part="name",
|
||||
)
|
||||
_args_schema.resource_name = AAZStrArg(
|
||||
options=["--resource-name"],
|
||||
help="Name of the NetworkInterface",
|
||||
help="Name of the Network Interface.",
|
||||
required=True,
|
||||
id_part="child_name_1",
|
||||
)
|
||||
|
@ -94,6 +94,10 @@ class UpdateAdminState(AAZCommand):
|
|||
def post_operations(self):
|
||||
pass
|
||||
|
||||
def _output(self, *args, **kwargs):
|
||||
result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True)
|
||||
return result
|
||||
|
||||
class NetworkInterfacesUpdateAdministrativeState(AAZHttpOperation):
|
||||
CLIENT_TYPE = "MgmtClient"
|
||||
|
||||
|
@ -162,7 +166,7 @@ class UpdateAdminState(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
@ -174,6 +178,9 @@ class UpdateAdminState(AAZCommand):
|
|||
**self.serialize_header_param(
|
||||
"Content-Type", "application/json",
|
||||
),
|
||||
**self.serialize_header_param(
|
||||
"Accept", "application/json",
|
||||
),
|
||||
}
|
||||
return parameters
|
||||
|
||||
|
@ -194,11 +201,100 @@ class UpdateAdminState(AAZCommand):
|
|||
return self.serialize_content(_content_value)
|
||||
|
||||
def on_200(self, session):
|
||||
pass
|
||||
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()
|
||||
_UpdateAdminStateHelper._build_schema_common_post_action_response_for_state_update_read(cls._schema_on_200)
|
||||
|
||||
return cls._schema_on_200
|
||||
|
||||
|
||||
class _UpdateAdminStateHelper:
|
||||
"""Helper class for UpdateAdminState"""
|
||||
|
||||
_schema_common_post_action_response_for_state_update_read = None
|
||||
|
||||
@classmethod
|
||||
def _build_schema_common_post_action_response_for_state_update_read(cls, _schema):
|
||||
if cls._schema_common_post_action_response_for_state_update_read is not None:
|
||||
_schema.configuration_state = cls._schema_common_post_action_response_for_state_update_read.configuration_state
|
||||
_schema.error = cls._schema_common_post_action_response_for_state_update_read.error
|
||||
return
|
||||
|
||||
cls._schema_common_post_action_response_for_state_update_read = _schema_common_post_action_response_for_state_update_read = AAZObjectType()
|
||||
|
||||
common_post_action_response_for_state_update_read = _schema_common_post_action_response_for_state_update_read
|
||||
common_post_action_response_for_state_update_read.configuration_state = AAZStrType(
|
||||
serialized_name="configurationState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
common_post_action_response_for_state_update_read.error = AAZObjectType()
|
||||
cls._build_schema_error_detail_read(common_post_action_response_for_state_update_read.error)
|
||||
|
||||
_schema.configuration_state = cls._schema_common_post_action_response_for_state_update_read.configuration_state
|
||||
_schema.error = cls._schema_common_post_action_response_for_state_update_read.error
|
||||
|
||||
_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.type = AAZStrType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
|
||||
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
|
||||
|
||||
|
||||
__all__ = ["UpdateAdminState"]
|
||||
|
|
|
@ -20,7 +20,7 @@ class Wait(AAZWaitCommand):
|
|||
|
||||
_aaz_info = {
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkdevices/{}/networkinterfaces/{}", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkdevices/{}/networkinterfaces/{}", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -42,13 +42,13 @@ class Wait(AAZWaitCommand):
|
|||
_args_schema = cls._args_schema
|
||||
_args_schema.network_device_name = AAZStrArg(
|
||||
options=["--device", "--network-device-name"],
|
||||
help="Name of the Network Device",
|
||||
help="Name of the Network Device.",
|
||||
required=True,
|
||||
id_part="name",
|
||||
)
|
||||
_args_schema.resource_name = AAZStrArg(
|
||||
options=["--resource-name"],
|
||||
help="Name of the NetworkInterfaceName",
|
||||
help="Name of the Network Interface.",
|
||||
required=True,
|
||||
id_part="child_name_1",
|
||||
)
|
||||
|
@ -127,7 +127,7 @@ class Wait(AAZWaitCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
|
|
@ -13,4 +13,5 @@ from ._create import *
|
|||
from ._delete import *
|
||||
from ._list import *
|
||||
from ._show import *
|
||||
from ._update import *
|
||||
from ._wait import *
|
||||
|
|
|
@ -15,10 +15,10 @@ from azure.cli.core.aaz import *
|
|||
"networkfabric internalnetwork create",
|
||||
)
|
||||
class Create(AAZCommand):
|
||||
"""Create a Internal Network resource.
|
||||
"""Create a Internal Network resource
|
||||
|
||||
:example: Create a Internal Network
|
||||
az networkfabric internalnetwork create --resource-group "example-rg" --l3-isolation-domain-name "example-l3domain" --resource-name "example-internalNetwork" --vlan-id 2600 --mtu 1500 --connected-ipv4-subnets "[{prefix:'10.0.0.1/21'},{prefix:'10.0.0.1/22'}]" --static-route-configuration "{ipv4Routes:[{prefix:'10.1.0.0/24',nextHop:['10.0.0.1','10.0.0.2']},{prefix:'10.1.0.0/24',nextHop:['10.0.0.1','10.0.0.2']}]}" --bgp-configuration "{defaultRouteOriginate:True,allowAS:2,allowASOverride:Enable,peerASN:65047,ipv4ListenRangePrefixes:['10.1.0.0/28','10.1.0.1/28'],ipv4NeighborAddress:[{address:'10.0.0.11'},{address:'10.0.0.12'}]}" --export-route-policy-id "/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/microsoft.managednetworkfabric/routePolicies/example-routepolicy" --import-route-policy-id "/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/microsoft.managednetworkfabric/routePolicies/example-routepolicy"
|
||||
az networkfabric internalnetwork create --resource-group "example-rg" --l3-isolation-domain-name "example-l3domain" --resource-name "example-internalNetwork" --vlan-id 2600 --mtu 1500 --extension "NoExtension" --is-monitoring-enabled "True" --connected-ipv4-subnets "[{prefix:'10.0.0.1/21'},{prefix:'10.1.1.1/22'}]" --connected-ipv6-subnets "[{prefix:'2fff::/64'}]" --static-route-configuration "{extension:NPB,bfdConfiguration:{multiplier:5,intervalInMilliSeconds:300},ipv4Routes:[{prefix:'10.1.0.0/24',nextHop:['10.0.0.1','10.0.0.2']},{prefix:'10.1.0.0/24',nextHop:['10.0.0.1','10.0.0.2']}],ipv6Routes:[{prefix:'2fff::/64',nextHop:['3fff::1']}]}" --bgp-configuration "{bfdConfiguration:{multiplier:5,intervalInMilliSeconds:300},defaultRouteOriginate:True,allowAS:2,allowASOverride:Enable,peerASN:65047,ipv4ListenRangePrefixes:['10.1.1.1/28','10.0.0.1/28'],ipv6ListenRangePrefixes:['2fff::/66'],ipv4NeighborAddress:[{address:'10.0.0.11'},{address:'10.0.0.12'}],ipv6NeighborAddress:[{address:'2fff::'}]}" --import-route-policy "{importIpv4RoutePolicyId:'/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/microsoft.managednetworkfabric/routePolicies/example-routepolicy',importIpv6RoutePolicyId:'/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/microsoft.managednetworkfabric/routePolicies/example-routepolicy'}" --export-route-policy "{exportIpv4RoutePolicyId:'/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/microsoft.managednetworkfabric/routePolicies/example-routepolicy',exportIpv6RoutePolicyId:'/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/microsoft.managednetworkfabric/routePolicies/example-routepolicy'}"
|
||||
|
||||
:example: Help text for sub parameters under the specific parent can be viewed by using the shorthand syntax '??'. See https://github.com/Azure/azure-cli/tree/dev/doc/shorthand_syntax.md for more about shorthand syntax.
|
||||
az networkfabric internalnetwork create --static-route-configuration ??
|
||||
|
@ -26,9 +26,9 @@ class Create(AAZCommand):
|
|||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-02-01-preview",
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/l3isolationdomains/{}/internalnetworks/{}", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/l3isolationdomains/{}/internalnetworks/{}", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -51,12 +51,12 @@ class Create(AAZCommand):
|
|||
_args_schema = cls._args_schema
|
||||
_args_schema.resource_name = AAZStrArg(
|
||||
options=["--resource-name"],
|
||||
help="Name of the InternalNetwork",
|
||||
help="Name of the Internal Network.",
|
||||
required=True,
|
||||
)
|
||||
_args_schema.l3_isolation_domain_name = AAZStrArg(
|
||||
options=["--l3domain", "--l3-isolation-domain-name"],
|
||||
help="Name of the L3IsolationDomain",
|
||||
help="Name of the L3 Isolation Domain.",
|
||||
required=True,
|
||||
)
|
||||
_args_schema.resource_group = AAZResourceGroupNameArg(
|
||||
|
@ -70,54 +70,92 @@ class Create(AAZCommand):
|
|||
_args_schema.annotation = AAZStrArg(
|
||||
options=["--annotation"],
|
||||
arg_group="Properties",
|
||||
help="Switch configuration description.",
|
||||
help="Description for underlying resource.",
|
||||
)
|
||||
_args_schema.bgp_configuration = AAZObjectArg(
|
||||
options=["--bgp-configuration"],
|
||||
arg_group="Properties",
|
||||
help="BGP configuration properties",
|
||||
help="BGP configuration properties.",
|
||||
)
|
||||
_args_schema.connected_ipv4_subnets = AAZListArg(
|
||||
options=["--connected-ipv4-subnets"],
|
||||
arg_group="Properties",
|
||||
help="List with object connectedIPv4Subnets.",
|
||||
help="List of Connected IPv4 Subnets.",
|
||||
)
|
||||
_args_schema.connected_ipv6_subnets = AAZListArg(
|
||||
options=["--connected-ipv6-subnets"],
|
||||
arg_group="Properties",
|
||||
help="List with object connectedIPv6Subnets.",
|
||||
help="List of connected IPv6 Subnets.",
|
||||
)
|
||||
_args_schema.export_route_policy_id = AAZStrArg(
|
||||
_args_schema.egress_acl_id = AAZResourceIdArg(
|
||||
options=["--egress-acl-id"],
|
||||
arg_group="Properties",
|
||||
help="Egress Acl ARM resource ID.",
|
||||
)
|
||||
_args_schema.export_route_policy = AAZObjectArg(
|
||||
options=["--export-route-policy"],
|
||||
arg_group="Properties",
|
||||
help="Export Route Policy either IPv4 or IPv6.",
|
||||
)
|
||||
_args_schema.export_route_policy_id = AAZResourceIdArg(
|
||||
options=["--export-route-policy-id"],
|
||||
arg_group="Properties",
|
||||
help="ARM resource ID of importRoutePolicy.",
|
||||
help="ARM Resource ID of the RoutePolicy. This is used for the backward compatibility.",
|
||||
)
|
||||
_args_schema.import_route_policy_id = AAZStrArg(
|
||||
_args_schema.extension = AAZStrArg(
|
||||
options=["--extension"],
|
||||
arg_group="Properties",
|
||||
help="Internal Network Extension type. Default value is NoExtension. Example: NoExtension.",
|
||||
enum={"NPB": "NPB", "NoExtension": "NoExtension"},
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
_args_schema.import_route_policy = AAZObjectArg(
|
||||
options=["--import-route-policy"],
|
||||
arg_group="Properties",
|
||||
help="Import Route Policy either IPv4 or IPv6.",
|
||||
)
|
||||
_args_schema.import_route_policy_id = AAZResourceIdArg(
|
||||
options=["--import-route-policy-id"],
|
||||
arg_group="Properties",
|
||||
help="ARM resource ID of importRoutePolicy.",
|
||||
help="ARM Resource ID of the RoutePolicy. This is used for the backward compatibility.",
|
||||
)
|
||||
_args_schema.ingress_acl_id = AAZResourceIdArg(
|
||||
options=["--ingress-acl-id"],
|
||||
arg_group="Properties",
|
||||
help="Ingress Acl ARM resource ID.",
|
||||
)
|
||||
_args_schema.is_monitoring_enabled = AAZStrArg(
|
||||
options=["--is-monitoring-enabled"],
|
||||
arg_group="Properties",
|
||||
help="To check whether monitoring of internal network is enabled or not. Default value is False. Example: False.",
|
||||
enum={"False": "False", "True": "True"},
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
_args_schema.mtu = AAZIntArg(
|
||||
options=["--mtu"],
|
||||
arg_group="Properties",
|
||||
help="Maximum transmission unit: The value should be between 1500-9000. Default value is 1500",
|
||||
help="Maximum transmission unit. The value should be between 64 to 9200. Default value is 1500. Example: 1500.",
|
||||
fmt=AAZIntArgFormat(
|
||||
maximum=9000,
|
||||
minimum=1500,
|
||||
maximum=9200,
|
||||
minimum=64,
|
||||
),
|
||||
)
|
||||
_args_schema.static_route_configuration = AAZObjectArg(
|
||||
options=["--static-route-configuration"],
|
||||
arg_group="Properties",
|
||||
help="staticRouteConfiguration model.",
|
||||
help="Static Route Configuration properties.",
|
||||
)
|
||||
_args_schema.vlan_id = AAZIntArg(
|
||||
options=["--vlan-id"],
|
||||
arg_group="Properties",
|
||||
help="Vlan identifier value. The value should be between 501-4095. Example: 501.",
|
||||
help="Vlan identifier. The value should be between 100-4094. Example: 1001.",
|
||||
required=True,
|
||||
fmt=AAZIntArgFormat(
|
||||
maximum=4095,
|
||||
maximum=4094,
|
||||
minimum=100,
|
||||
),
|
||||
)
|
||||
|
@ -125,8 +163,7 @@ class Create(AAZCommand):
|
|||
bgp_configuration = cls._args_schema.bgp_configuration
|
||||
bgp_configuration.allow_as = AAZIntArg(
|
||||
options=["allow-as"],
|
||||
help="Allows for routes to be received and processed even if the router detects its own ASN in the AS-Path. 0 is disable, Possible values are 1-10, default is 2.",
|
||||
default=2,
|
||||
help="Allows for routes to be received and processed even if the router detects its own ASN in the AS-Path. 0 is disable, Possible values are 1-10, Default value is 2.",
|
||||
fmt=AAZIntArgFormat(
|
||||
maximum=10,
|
||||
minimum=0,
|
||||
|
@ -134,141 +171,240 @@ class Create(AAZCommand):
|
|||
)
|
||||
bgp_configuration.allow_as_override = AAZStrArg(
|
||||
options=["allow-as-override"],
|
||||
help="Enable Or Disable state.",
|
||||
help="Enable Or Disable state. Example: Enable",
|
||||
enum={"Disable": "Disable", "Enable": "Enable"},
|
||||
)
|
||||
bgp_configuration.annotation = AAZStrArg(
|
||||
options=["annotation"],
|
||||
help="Switch configuration description.",
|
||||
help="Description for underlying resource.",
|
||||
)
|
||||
bgp_configuration.bfd_configuration = AAZObjectArg(
|
||||
options=["bfd-configuration"],
|
||||
help="BFD configuration properties.",
|
||||
)
|
||||
cls._build_args_bfd_configuration_create(bgp_configuration.bfd_configuration)
|
||||
bgp_configuration.default_route_originate = AAZStrArg(
|
||||
options=["default-route-originate"],
|
||||
help="Enables default route to be originated when advertising routes via BGP.",
|
||||
help="Originate a defaultRoute. Example: True.",
|
||||
enum={"False": "False", "True": "True"},
|
||||
)
|
||||
bgp_configuration.ipv4_listen_range_prefixes = AAZListArg(
|
||||
options=["ipv4-listen-range-prefixes"],
|
||||
help="BGP Ipv4 ListenRange. Example: 10.1.0.0/28.",
|
||||
help="List of BGP IPv4 Listen Range prefixes.",
|
||||
)
|
||||
bgp_configuration.ipv4_neighbor_address = AAZListArg(
|
||||
options=["ipv4-neighbor-address"],
|
||||
help="Specific IPv4 address for peering.",
|
||||
help="List with stringified IPv4 Neighbor Addresses.",
|
||||
)
|
||||
bgp_configuration.ipv6_listen_range_prefixes = AAZListArg(
|
||||
options=["ipv6-listen-range-prefixes"],
|
||||
help="BGP Ipv6 ListenRange.",
|
||||
help="List of BGP IPv6 Listen Ranges prefixes.",
|
||||
)
|
||||
bgp_configuration.ipv6_neighbor_address = AAZListArg(
|
||||
options=["ipv6-neighbor-address"],
|
||||
help="Specific IPv6 address for peering.",
|
||||
help="List with stringified IPv6 Neighbor Address.",
|
||||
)
|
||||
bgp_configuration.peer_asn = AAZIntArg(
|
||||
options=["peer-asn"],
|
||||
help="Peer ASN of Network Function. The value should be between 1 to 65535. Example: 65047.",
|
||||
help="Peer ASN. The value should be between 1 to 4294967295. Example: 65047.",
|
||||
required=True,
|
||||
fmt=AAZIntArgFormat(
|
||||
maximum=65535,
|
||||
maximum=4294967295,
|
||||
minimum=1,
|
||||
),
|
||||
)
|
||||
|
||||
ipv4_listen_range_prefixes = cls._args_schema.bgp_configuration.ipv4_listen_range_prefixes
|
||||
ipv4_listen_range_prefixes.Element = AAZStrArg()
|
||||
ipv4_listen_range_prefixes.Element = AAZStrArg(
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
|
||||
ipv4_neighbor_address = cls._args_schema.bgp_configuration.ipv4_neighbor_address
|
||||
ipv4_neighbor_address.Element = AAZObjectArg()
|
||||
|
||||
_element = cls._args_schema.bgp_configuration.ipv4_neighbor_address.Element
|
||||
_element.address = AAZStrArg(
|
||||
options=["address"],
|
||||
help="IP Address of the IPv4NeighborAddress. Example: \"10.0.0.11\".",
|
||||
)
|
||||
cls._build_args_neighbor_address_create(ipv4_neighbor_address.Element)
|
||||
|
||||
ipv6_listen_range_prefixes = cls._args_schema.bgp_configuration.ipv6_listen_range_prefixes
|
||||
ipv6_listen_range_prefixes.Element = AAZStrArg()
|
||||
ipv6_listen_range_prefixes.Element = AAZStrArg(
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
|
||||
ipv6_neighbor_address = cls._args_schema.bgp_configuration.ipv6_neighbor_address
|
||||
ipv6_neighbor_address.Element = AAZObjectArg()
|
||||
|
||||
_element = cls._args_schema.bgp_configuration.ipv6_neighbor_address.Element
|
||||
_element.address = AAZStrArg(
|
||||
options=["address"],
|
||||
help="IP address of the ipv6NeighborAddress. Example: \"3FFE:FFFF:0:CD31::a4\"",
|
||||
)
|
||||
cls._build_args_neighbor_address_create(ipv6_neighbor_address.Element)
|
||||
|
||||
connected_ipv4_subnets = cls._args_schema.connected_ipv4_subnets
|
||||
connected_ipv4_subnets.Element = AAZObjectArg()
|
||||
|
||||
_element = cls._args_schema.connected_ipv4_subnets.Element
|
||||
_element.annotation = AAZStrArg(
|
||||
options=["annotation"],
|
||||
help="Switch configuration description.",
|
||||
)
|
||||
_element.prefix = AAZStrArg(
|
||||
options=["prefix"],
|
||||
help="IPv4 Prefix of the subnet in the VLAN. Subnet length range should be from 8 to 28. Example: \"10.0.0.1/21\"",
|
||||
)
|
||||
cls._build_args_connected_subnet_create(connected_ipv4_subnets.Element)
|
||||
|
||||
connected_ipv6_subnets = cls._args_schema.connected_ipv6_subnets
|
||||
connected_ipv6_subnets.Element = AAZObjectArg()
|
||||
cls._build_args_connected_subnet_create(connected_ipv6_subnets.Element)
|
||||
|
||||
_element = cls._args_schema.connected_ipv6_subnets.Element
|
||||
_element.annotation = AAZStrArg(
|
||||
options=["annotation"],
|
||||
help="Switch configuration description.",
|
||||
export_route_policy = cls._args_schema.export_route_policy
|
||||
export_route_policy.export_ipv4_route_policy_id = AAZResourceIdArg(
|
||||
options=["export-ipv4-route-policy-id"],
|
||||
help="ARM resource ID of RoutePolicy.",
|
||||
)
|
||||
_element.prefix = AAZStrArg(
|
||||
options=["prefix"],
|
||||
help="IPv6 Prefix of the subnet in the VLAN. Subnet length range should be from 16 to 124. Example: \"3FFE:FFFF:0:CD30::a4/121\"",
|
||||
export_route_policy.export_ipv6_route_policy_id = AAZResourceIdArg(
|
||||
options=["export-ipv6-route-policy-id"],
|
||||
help="ARM resource ID of RoutePolicy.",
|
||||
)
|
||||
|
||||
import_route_policy = cls._args_schema.import_route_policy
|
||||
import_route_policy.import_ipv4_route_policy_id = AAZResourceIdArg(
|
||||
options=["import-ipv4-route-policy-id"],
|
||||
help="ARM resource ID of RoutePolicy.",
|
||||
)
|
||||
import_route_policy.import_ipv6_route_policy_id = AAZResourceIdArg(
|
||||
options=["import-ipv6-route-policy-id"],
|
||||
help="ARM resource ID of RoutePolicy.",
|
||||
)
|
||||
|
||||
static_route_configuration = cls._args_schema.static_route_configuration
|
||||
static_route_configuration.bfd_configuration = AAZObjectArg(
|
||||
options=["bfd-configuration"],
|
||||
help="BFD configuration properties",
|
||||
)
|
||||
cls._build_args_bfd_configuration_create(static_route_configuration.bfd_configuration)
|
||||
static_route_configuration.extension = AAZStrArg(
|
||||
options=["extension"],
|
||||
help="Static Route Extension type. Default value is NoExtension. Example: NoExtension.",
|
||||
enum={"NPB": "NPB", "NoExtension": "NoExtension"},
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
static_route_configuration.ipv4_routes = AAZListArg(
|
||||
options=["ipv4-routes"],
|
||||
help="Static IPv4 routes configuration.",
|
||||
help="List of IPv4 Routes.",
|
||||
)
|
||||
static_route_configuration.ipv6_routes = AAZListArg(
|
||||
options=["ipv6-routes"],
|
||||
help="Static IPv6 routes configuration.",
|
||||
help="List of IPv6 Routes.",
|
||||
)
|
||||
|
||||
ipv4_routes = cls._args_schema.static_route_configuration.ipv4_routes
|
||||
ipv4_routes.Element = AAZObjectArg()
|
||||
|
||||
_element = cls._args_schema.static_route_configuration.ipv4_routes.Element
|
||||
_element.next_hop = AAZListArg(
|
||||
options=["next-hop"],
|
||||
help="List of next hop IPv4 addresses. Example: \"10.0.0.1\"",
|
||||
required=True,
|
||||
)
|
||||
_element.prefix = AAZStrArg(
|
||||
options=["prefix"],
|
||||
help="IPv4 prefix of the staticIpv4Route. Example: \"10.1.0.0/24\"",
|
||||
required=True,
|
||||
)
|
||||
|
||||
next_hop = cls._args_schema.static_route_configuration.ipv4_routes.Element.next_hop
|
||||
next_hop.Element = AAZStrArg()
|
||||
cls._build_args_static_route_properties_create(ipv4_routes.Element)
|
||||
|
||||
ipv6_routes = cls._args_schema.static_route_configuration.ipv6_routes
|
||||
ipv6_routes.Element = AAZObjectArg()
|
||||
|
||||
_element = cls._args_schema.static_route_configuration.ipv6_routes.Element
|
||||
_element.next_hop = AAZListArg(
|
||||
options=["next-hop"],
|
||||
help="List of next hop IPv6 addresses. Example: \"2ffe::1\"",
|
||||
required=True,
|
||||
)
|
||||
_element.prefix = AAZStrArg(
|
||||
options=["prefix"],
|
||||
help="IPv6 prefix of the staticIPv6Route. Example: \"2fff::/64\"",
|
||||
required=True,
|
||||
)
|
||||
|
||||
next_hop = cls._args_schema.static_route_configuration.ipv6_routes.Element.next_hop
|
||||
next_hop.Element = AAZStrArg()
|
||||
cls._build_args_static_route_properties_create(ipv6_routes.Element)
|
||||
return cls._args_schema
|
||||
|
||||
_args_bfd_configuration_create = None
|
||||
|
||||
@classmethod
|
||||
def _build_args_bfd_configuration_create(cls, _schema):
|
||||
if cls._args_bfd_configuration_create is not None:
|
||||
_schema.interval_in_milli_seconds = cls._args_bfd_configuration_create.interval_in_milli_seconds
|
||||
_schema.multiplier = cls._args_bfd_configuration_create.multiplier
|
||||
return
|
||||
|
||||
cls._args_bfd_configuration_create = AAZObjectArg()
|
||||
|
||||
bfd_configuration_create = cls._args_bfd_configuration_create
|
||||
bfd_configuration_create.interval_in_milli_seconds = AAZIntArg(
|
||||
options=["interval-in-milli-seconds"],
|
||||
help="Interval in milliseconds. Default value is 300. Example: 300.",
|
||||
)
|
||||
bfd_configuration_create.multiplier = AAZIntArg(
|
||||
options=["multiplier"],
|
||||
help="Multiplier for the Bfd Configuration. Default value is 5. Example: 5.",
|
||||
)
|
||||
|
||||
_schema.interval_in_milli_seconds = cls._args_bfd_configuration_create.interval_in_milli_seconds
|
||||
_schema.multiplier = cls._args_bfd_configuration_create.multiplier
|
||||
|
||||
_args_connected_subnet_create = None
|
||||
|
||||
@classmethod
|
||||
def _build_args_connected_subnet_create(cls, _schema):
|
||||
if cls._args_connected_subnet_create is not None:
|
||||
_schema.annotation = cls._args_connected_subnet_create.annotation
|
||||
_schema.prefix = cls._args_connected_subnet_create.prefix
|
||||
return
|
||||
|
||||
cls._args_connected_subnet_create = AAZObjectArg()
|
||||
|
||||
connected_subnet_create = cls._args_connected_subnet_create
|
||||
connected_subnet_create.annotation = AAZStrArg(
|
||||
options=["annotation"],
|
||||
help="Description for underlying resource.",
|
||||
)
|
||||
connected_subnet_create.prefix = AAZStrArg(
|
||||
options=["prefix"],
|
||||
help="Prefix of the Connected Subnet.",
|
||||
required=True,
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
|
||||
_schema.annotation = cls._args_connected_subnet_create.annotation
|
||||
_schema.prefix = cls._args_connected_subnet_create.prefix
|
||||
|
||||
_args_neighbor_address_create = None
|
||||
|
||||
@classmethod
|
||||
def _build_args_neighbor_address_create(cls, _schema):
|
||||
if cls._args_neighbor_address_create is not None:
|
||||
_schema.address = cls._args_neighbor_address_create.address
|
||||
return
|
||||
|
||||
cls._args_neighbor_address_create = AAZObjectArg()
|
||||
|
||||
neighbor_address_create = cls._args_neighbor_address_create
|
||||
neighbor_address_create.address = AAZStrArg(
|
||||
options=["address"],
|
||||
help="IP Address.",
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
|
||||
_schema.address = cls._args_neighbor_address_create.address
|
||||
|
||||
_args_static_route_properties_create = None
|
||||
|
||||
@classmethod
|
||||
def _build_args_static_route_properties_create(cls, _schema):
|
||||
if cls._args_static_route_properties_create is not None:
|
||||
_schema.next_hop = cls._args_static_route_properties_create.next_hop
|
||||
_schema.prefix = cls._args_static_route_properties_create.prefix
|
||||
return
|
||||
|
||||
cls._args_static_route_properties_create = AAZObjectArg()
|
||||
|
||||
static_route_properties_create = cls._args_static_route_properties_create
|
||||
static_route_properties_create.next_hop = AAZListArg(
|
||||
options=["next-hop"],
|
||||
help="List of next hop addresses.",
|
||||
required=True,
|
||||
)
|
||||
static_route_properties_create.prefix = AAZStrArg(
|
||||
options=["prefix"],
|
||||
help="Prefix of the route.",
|
||||
required=True,
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
|
||||
next_hop = cls._args_static_route_properties_create.next_hop
|
||||
next_hop.Element = AAZStrArg(
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
|
||||
_schema.next_hop = cls._args_static_route_properties_create.next_hop
|
||||
_schema.prefix = cls._args_static_route_properties_create.prefix
|
||||
|
||||
def _execute_operations(self):
|
||||
self.pre_operations()
|
||||
yield self.InternalNetworksCreate(ctx=self.ctx)()
|
||||
|
@ -354,7 +490,7 @@ class Create(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
@ -387,8 +523,14 @@ class Create(AAZCommand):
|
|||
properties.set_prop("bgpConfiguration", AAZObjectType, ".bgp_configuration")
|
||||
properties.set_prop("connectedIPv4Subnets", AAZListType, ".connected_ipv4_subnets")
|
||||
properties.set_prop("connectedIPv6Subnets", AAZListType, ".connected_ipv6_subnets")
|
||||
properties.set_prop("egressAclId", AAZStrType, ".egress_acl_id")
|
||||
properties.set_prop("exportRoutePolicy", AAZObjectType, ".export_route_policy")
|
||||
properties.set_prop("exportRoutePolicyId", AAZStrType, ".export_route_policy_id")
|
||||
properties.set_prop("extension", AAZStrType, ".extension")
|
||||
properties.set_prop("importRoutePolicy", AAZObjectType, ".import_route_policy")
|
||||
properties.set_prop("importRoutePolicyId", AAZStrType, ".import_route_policy_id")
|
||||
properties.set_prop("ingressAclId", AAZStrType, ".ingress_acl_id")
|
||||
properties.set_prop("isMonitoringEnabled", AAZStrType, ".is_monitoring_enabled")
|
||||
properties.set_prop("mtu", AAZIntType, ".mtu")
|
||||
properties.set_prop("staticRouteConfiguration", AAZObjectType, ".static_route_configuration")
|
||||
properties.set_prop("vlanId", AAZIntType, ".vlan_id", typ_kwargs={"flags": {"required": True}})
|
||||
|
@ -398,6 +540,7 @@ class Create(AAZCommand):
|
|||
bgp_configuration.set_prop("allowAS", AAZIntType, ".allow_as")
|
||||
bgp_configuration.set_prop("allowASOverride", AAZStrType, ".allow_as_override")
|
||||
bgp_configuration.set_prop("annotation", AAZStrType, ".annotation")
|
||||
_CreateHelper._build_schema_bfd_configuration_create(bgp_configuration.set_prop("bfdConfiguration", AAZObjectType, ".bfd_configuration"))
|
||||
bgp_configuration.set_prop("defaultRouteOriginate", AAZStrType, ".default_route_originate")
|
||||
bgp_configuration.set_prop("ipv4ListenRangePrefixes", AAZListType, ".ipv4_listen_range_prefixes")
|
||||
bgp_configuration.set_prop("ipv4NeighborAddress", AAZListType, ".ipv4_neighbor_address")
|
||||
|
@ -411,11 +554,7 @@ class Create(AAZCommand):
|
|||
|
||||
ipv4_neighbor_address = _builder.get(".properties.bgpConfiguration.ipv4NeighborAddress")
|
||||
if ipv4_neighbor_address is not None:
|
||||
ipv4_neighbor_address.set_elements(AAZObjectType, ".")
|
||||
|
||||
_elements = _builder.get(".properties.bgpConfiguration.ipv4NeighborAddress[]")
|
||||
if _elements is not None:
|
||||
_elements.set_prop("address", AAZStrType, ".address")
|
||||
_CreateHelper._build_schema_neighbor_address_create(ipv4_neighbor_address.set_elements(AAZObjectType, "."))
|
||||
|
||||
ipv6_listen_range_prefixes = _builder.get(".properties.bgpConfiguration.ipv6ListenRangePrefixes")
|
||||
if ipv6_listen_range_prefixes is not None:
|
||||
|
@ -423,60 +562,40 @@ class Create(AAZCommand):
|
|||
|
||||
ipv6_neighbor_address = _builder.get(".properties.bgpConfiguration.ipv6NeighborAddress")
|
||||
if ipv6_neighbor_address is not None:
|
||||
ipv6_neighbor_address.set_elements(AAZObjectType, ".")
|
||||
|
||||
_elements = _builder.get(".properties.bgpConfiguration.ipv6NeighborAddress[]")
|
||||
if _elements is not None:
|
||||
_elements.set_prop("address", AAZStrType, ".address")
|
||||
_CreateHelper._build_schema_neighbor_address_create(ipv6_neighbor_address.set_elements(AAZObjectType, "."))
|
||||
|
||||
connected_i_pv4_subnets = _builder.get(".properties.connectedIPv4Subnets")
|
||||
if connected_i_pv4_subnets is not None:
|
||||
connected_i_pv4_subnets.set_elements(AAZObjectType, ".")
|
||||
|
||||
_elements = _builder.get(".properties.connectedIPv4Subnets[]")
|
||||
if _elements is not None:
|
||||
_elements.set_prop("annotation", AAZStrType, ".annotation")
|
||||
_elements.set_prop("prefix", AAZStrType, ".prefix")
|
||||
_CreateHelper._build_schema_connected_subnet_create(connected_i_pv4_subnets.set_elements(AAZObjectType, "."))
|
||||
|
||||
connected_i_pv6_subnets = _builder.get(".properties.connectedIPv6Subnets")
|
||||
if connected_i_pv6_subnets is not None:
|
||||
connected_i_pv6_subnets.set_elements(AAZObjectType, ".")
|
||||
_CreateHelper._build_schema_connected_subnet_create(connected_i_pv6_subnets.set_elements(AAZObjectType, "."))
|
||||
|
||||
_elements = _builder.get(".properties.connectedIPv6Subnets[]")
|
||||
if _elements is not None:
|
||||
_elements.set_prop("annotation", AAZStrType, ".annotation")
|
||||
_elements.set_prop("prefix", AAZStrType, ".prefix")
|
||||
export_route_policy = _builder.get(".properties.exportRoutePolicy")
|
||||
if export_route_policy is not None:
|
||||
export_route_policy.set_prop("exportIpv4RoutePolicyId", AAZStrType, ".export_ipv4_route_policy_id")
|
||||
export_route_policy.set_prop("exportIpv6RoutePolicyId", AAZStrType, ".export_ipv6_route_policy_id")
|
||||
|
||||
import_route_policy = _builder.get(".properties.importRoutePolicy")
|
||||
if import_route_policy is not None:
|
||||
import_route_policy.set_prop("importIpv4RoutePolicyId", AAZStrType, ".import_ipv4_route_policy_id")
|
||||
import_route_policy.set_prop("importIpv6RoutePolicyId", AAZStrType, ".import_ipv6_route_policy_id")
|
||||
|
||||
static_route_configuration = _builder.get(".properties.staticRouteConfiguration")
|
||||
if static_route_configuration is not None:
|
||||
_CreateHelper._build_schema_bfd_configuration_create(static_route_configuration.set_prop("bfdConfiguration", AAZObjectType, ".bfd_configuration"))
|
||||
static_route_configuration.set_prop("extension", AAZStrType, ".extension")
|
||||
static_route_configuration.set_prop("ipv4Routes", AAZListType, ".ipv4_routes")
|
||||
static_route_configuration.set_prop("ipv6Routes", AAZListType, ".ipv6_routes")
|
||||
|
||||
ipv4_routes = _builder.get(".properties.staticRouteConfiguration.ipv4Routes")
|
||||
if ipv4_routes is not None:
|
||||
ipv4_routes.set_elements(AAZObjectType, ".")
|
||||
|
||||
_elements = _builder.get(".properties.staticRouteConfiguration.ipv4Routes[]")
|
||||
if _elements is not None:
|
||||
_elements.set_prop("nextHop", AAZListType, ".next_hop", typ_kwargs={"flags": {"required": True}})
|
||||
_elements.set_prop("prefix", AAZStrType, ".prefix", typ_kwargs={"flags": {"required": True}})
|
||||
|
||||
next_hop = _builder.get(".properties.staticRouteConfiguration.ipv4Routes[].nextHop")
|
||||
if next_hop is not None:
|
||||
next_hop.set_elements(AAZStrType, ".")
|
||||
_CreateHelper._build_schema_static_route_properties_create(ipv4_routes.set_elements(AAZObjectType, "."))
|
||||
|
||||
ipv6_routes = _builder.get(".properties.staticRouteConfiguration.ipv6Routes")
|
||||
if ipv6_routes is not None:
|
||||
ipv6_routes.set_elements(AAZObjectType, ".")
|
||||
|
||||
_elements = _builder.get(".properties.staticRouteConfiguration.ipv6Routes[]")
|
||||
if _elements is not None:
|
||||
_elements.set_prop("nextHop", AAZListType, ".next_hop", typ_kwargs={"flags": {"required": True}})
|
||||
_elements.set_prop("prefix", AAZStrType, ".prefix", typ_kwargs={"flags": {"required": True}})
|
||||
|
||||
next_hop = _builder.get(".properties.staticRouteConfiguration.ipv6Routes[].nextHop")
|
||||
if next_hop is not None:
|
||||
next_hop.set_elements(AAZStrType, ".")
|
||||
_CreateHelper._build_schema_static_route_properties_create(ipv6_routes.set_elements(AAZObjectType, "."))
|
||||
|
||||
return self.serialize_content(_content_value)
|
||||
|
||||
|
@ -521,19 +640,11 @@ class Create(AAZCommand):
|
|||
flags={"read_only": True},
|
||||
)
|
||||
properties.annotation = AAZStrType()
|
||||
properties.bfd_disabled_on_resources = AAZListType(
|
||||
serialized_name="bfdDisabledOnResources",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.bfd_for_static_routes_disabled_on_resources = AAZListType(
|
||||
serialized_name="bfdForStaticRoutesDisabledOnResources",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.bgp_configuration = AAZObjectType(
|
||||
serialized_name="bgpConfiguration",
|
||||
)
|
||||
properties.bgp_disabled_on_resources = AAZListType(
|
||||
serialized_name="bgpDisabledOnResources",
|
||||
properties.configuration_state = AAZStrType(
|
||||
serialized_name="configurationState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.connected_i_pv4_subnets = AAZListType(
|
||||
|
@ -542,16 +653,28 @@ class Create(AAZCommand):
|
|||
properties.connected_i_pv6_subnets = AAZListType(
|
||||
serialized_name="connectedIPv6Subnets",
|
||||
)
|
||||
properties.disabled_on_resources = AAZListType(
|
||||
serialized_name="disabledOnResources",
|
||||
flags={"read_only": True},
|
||||
properties.egress_acl_id = AAZStrType(
|
||||
serialized_name="egressAclId",
|
||||
)
|
||||
properties.export_route_policy = AAZObjectType(
|
||||
serialized_name="exportRoutePolicy",
|
||||
)
|
||||
properties.export_route_policy_id = AAZStrType(
|
||||
serialized_name="exportRoutePolicyId",
|
||||
)
|
||||
properties.extension = AAZStrType()
|
||||
properties.import_route_policy = AAZObjectType(
|
||||
serialized_name="importRoutePolicy",
|
||||
)
|
||||
properties.import_route_policy_id = AAZStrType(
|
||||
serialized_name="importRoutePolicyId",
|
||||
)
|
||||
properties.ingress_acl_id = AAZStrType(
|
||||
serialized_name="ingressAclId",
|
||||
)
|
||||
properties.is_monitoring_enabled = AAZStrType(
|
||||
serialized_name="isMonitoringEnabled",
|
||||
)
|
||||
properties.mtu = AAZIntType()
|
||||
properties.provisioning_state = AAZStrType(
|
||||
serialized_name="provisioningState",
|
||||
|
@ -565,12 +688,6 @@ class Create(AAZCommand):
|
|||
flags={"required": True},
|
||||
)
|
||||
|
||||
bfd_disabled_on_resources = cls._schema_on_200_201.properties.bfd_disabled_on_resources
|
||||
bfd_disabled_on_resources.Element = AAZStrType()
|
||||
|
||||
bfd_for_static_routes_disabled_on_resources = cls._schema_on_200_201.properties.bfd_for_static_routes_disabled_on_resources
|
||||
bfd_for_static_routes_disabled_on_resources.Element = AAZStrType()
|
||||
|
||||
bgp_configuration = cls._schema_on_200_201.properties.bgp_configuration
|
||||
bgp_configuration.allow_as = AAZIntType(
|
||||
serialized_name="allowAS",
|
||||
|
@ -612,52 +729,45 @@ class Create(AAZCommand):
|
|||
|
||||
ipv4_neighbor_address = cls._schema_on_200_201.properties.bgp_configuration.ipv4_neighbor_address
|
||||
ipv4_neighbor_address.Element = AAZObjectType()
|
||||
|
||||
_element = cls._schema_on_200_201.properties.bgp_configuration.ipv4_neighbor_address.Element
|
||||
_element.address = AAZStrType()
|
||||
_element.operational_state = AAZStrType(
|
||||
serialized_name="operationalState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_CreateHelper._build_schema_neighbor_address_read(ipv4_neighbor_address.Element)
|
||||
|
||||
ipv6_listen_range_prefixes = cls._schema_on_200_201.properties.bgp_configuration.ipv6_listen_range_prefixes
|
||||
ipv6_listen_range_prefixes.Element = AAZStrType()
|
||||
|
||||
ipv6_neighbor_address = cls._schema_on_200_201.properties.bgp_configuration.ipv6_neighbor_address
|
||||
ipv6_neighbor_address.Element = AAZObjectType()
|
||||
|
||||
_element = cls._schema_on_200_201.properties.bgp_configuration.ipv6_neighbor_address.Element
|
||||
_element.address = AAZStrType()
|
||||
_element.operational_state = AAZStrType(
|
||||
serialized_name="operationalState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
|
||||
bgp_disabled_on_resources = cls._schema_on_200_201.properties.bgp_disabled_on_resources
|
||||
bgp_disabled_on_resources.Element = AAZStrType()
|
||||
_CreateHelper._build_schema_neighbor_address_read(ipv6_neighbor_address.Element)
|
||||
|
||||
connected_i_pv4_subnets = cls._schema_on_200_201.properties.connected_i_pv4_subnets
|
||||
connected_i_pv4_subnets.Element = AAZObjectType()
|
||||
|
||||
_element = cls._schema_on_200_201.properties.connected_i_pv4_subnets.Element
|
||||
_element.annotation = AAZStrType()
|
||||
_element.prefix = AAZStrType()
|
||||
_CreateHelper._build_schema_connected_subnet_read(connected_i_pv4_subnets.Element)
|
||||
|
||||
connected_i_pv6_subnets = cls._schema_on_200_201.properties.connected_i_pv6_subnets
|
||||
connected_i_pv6_subnets.Element = AAZObjectType()
|
||||
_CreateHelper._build_schema_connected_subnet_read(connected_i_pv6_subnets.Element)
|
||||
|
||||
_element = cls._schema_on_200_201.properties.connected_i_pv6_subnets.Element
|
||||
_element.annotation = AAZStrType()
|
||||
_element.prefix = AAZStrType()
|
||||
export_route_policy = cls._schema_on_200_201.properties.export_route_policy
|
||||
export_route_policy.export_ipv4_route_policy_id = AAZStrType(
|
||||
serialized_name="exportIpv4RoutePolicyId",
|
||||
)
|
||||
export_route_policy.export_ipv6_route_policy_id = AAZStrType(
|
||||
serialized_name="exportIpv6RoutePolicyId",
|
||||
)
|
||||
|
||||
disabled_on_resources = cls._schema_on_200_201.properties.disabled_on_resources
|
||||
disabled_on_resources.Element = AAZStrType()
|
||||
import_route_policy = cls._schema_on_200_201.properties.import_route_policy
|
||||
import_route_policy.import_ipv4_route_policy_id = AAZStrType(
|
||||
serialized_name="importIpv4RoutePolicyId",
|
||||
)
|
||||
import_route_policy.import_ipv6_route_policy_id = AAZStrType(
|
||||
serialized_name="importIpv6RoutePolicyId",
|
||||
)
|
||||
|
||||
static_route_configuration = cls._schema_on_200_201.properties.static_route_configuration
|
||||
static_route_configuration.bfd_configuration = AAZObjectType(
|
||||
serialized_name="bfdConfiguration",
|
||||
)
|
||||
_CreateHelper._build_schema_bfd_configuration_read(static_route_configuration.bfd_configuration)
|
||||
static_route_configuration.extension = AAZStrType()
|
||||
static_route_configuration.ipv4_routes = AAZListType(
|
||||
serialized_name="ipv4Routes",
|
||||
)
|
||||
|
@ -667,33 +777,11 @@ class Create(AAZCommand):
|
|||
|
||||
ipv4_routes = cls._schema_on_200_201.properties.static_route_configuration.ipv4_routes
|
||||
ipv4_routes.Element = AAZObjectType()
|
||||
|
||||
_element = cls._schema_on_200_201.properties.static_route_configuration.ipv4_routes.Element
|
||||
_element.next_hop = AAZListType(
|
||||
serialized_name="nextHop",
|
||||
flags={"required": True},
|
||||
)
|
||||
_element.prefix = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
next_hop = cls._schema_on_200_201.properties.static_route_configuration.ipv4_routes.Element.next_hop
|
||||
next_hop.Element = AAZStrType()
|
||||
_CreateHelper._build_schema_static_route_properties_read(ipv4_routes.Element)
|
||||
|
||||
ipv6_routes = cls._schema_on_200_201.properties.static_route_configuration.ipv6_routes
|
||||
ipv6_routes.Element = AAZObjectType()
|
||||
|
||||
_element = cls._schema_on_200_201.properties.static_route_configuration.ipv6_routes.Element
|
||||
_element.next_hop = AAZListType(
|
||||
serialized_name="nextHop",
|
||||
flags={"required": True},
|
||||
)
|
||||
_element.prefix = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
next_hop = cls._schema_on_200_201.properties.static_route_configuration.ipv6_routes.Element.next_hop
|
||||
next_hop.Element = AAZStrType()
|
||||
_CreateHelper._build_schema_static_route_properties_read(ipv6_routes.Element)
|
||||
|
||||
system_data = cls._schema_on_200_201.system_data
|
||||
system_data.created_at = AAZStrType(
|
||||
|
@ -721,13 +809,44 @@ class Create(AAZCommand):
|
|||
class _CreateHelper:
|
||||
"""Helper class for Create"""
|
||||
|
||||
@classmethod
|
||||
def _build_schema_bfd_configuration_create(cls, _builder):
|
||||
if _builder is None:
|
||||
return
|
||||
_builder.set_prop("intervalInMilliSeconds", AAZIntType, ".interval_in_milli_seconds")
|
||||
_builder.set_prop("multiplier", AAZIntType, ".multiplier")
|
||||
|
||||
@classmethod
|
||||
def _build_schema_connected_subnet_create(cls, _builder):
|
||||
if _builder is None:
|
||||
return
|
||||
_builder.set_prop("annotation", AAZStrType, ".annotation")
|
||||
_builder.set_prop("prefix", AAZStrType, ".prefix", typ_kwargs={"flags": {"required": True}})
|
||||
|
||||
@classmethod
|
||||
def _build_schema_neighbor_address_create(cls, _builder):
|
||||
if _builder is None:
|
||||
return
|
||||
_builder.set_prop("address", AAZStrType, ".address")
|
||||
|
||||
@classmethod
|
||||
def _build_schema_static_route_properties_create(cls, _builder):
|
||||
if _builder is None:
|
||||
return
|
||||
_builder.set_prop("nextHop", AAZListType, ".next_hop", typ_kwargs={"flags": {"required": True}})
|
||||
_builder.set_prop("prefix", AAZStrType, ".prefix", typ_kwargs={"flags": {"required": True}})
|
||||
|
||||
next_hop = _builder.get(".nextHop")
|
||||
if next_hop is not None:
|
||||
next_hop.set_elements(AAZStrType, ".")
|
||||
|
||||
_schema_bfd_configuration_read = None
|
||||
|
||||
@classmethod
|
||||
def _build_schema_bfd_configuration_read(cls, _schema):
|
||||
if cls._schema_bfd_configuration_read is not None:
|
||||
_schema.administrative_state = cls._schema_bfd_configuration_read.administrative_state
|
||||
_schema.interval = cls._schema_bfd_configuration_read.interval
|
||||
_schema.interval_in_milli_seconds = cls._schema_bfd_configuration_read.interval_in_milli_seconds
|
||||
_schema.multiplier = cls._schema_bfd_configuration_read.multiplier
|
||||
return
|
||||
|
||||
|
@ -738,16 +857,81 @@ class _CreateHelper:
|
|||
serialized_name="administrativeState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
bfd_configuration_read.interval = AAZIntType(
|
||||
flags={"read_only": True},
|
||||
bfd_configuration_read.interval_in_milli_seconds = AAZIntType(
|
||||
serialized_name="intervalInMilliSeconds",
|
||||
)
|
||||
bfd_configuration_read.multiplier = AAZIntType(
|
||||
bfd_configuration_read.multiplier = AAZIntType()
|
||||
|
||||
_schema.administrative_state = cls._schema_bfd_configuration_read.administrative_state
|
||||
_schema.interval_in_milli_seconds = cls._schema_bfd_configuration_read.interval_in_milli_seconds
|
||||
_schema.multiplier = cls._schema_bfd_configuration_read.multiplier
|
||||
|
||||
_schema_connected_subnet_read = None
|
||||
|
||||
@classmethod
|
||||
def _build_schema_connected_subnet_read(cls, _schema):
|
||||
if cls._schema_connected_subnet_read is not None:
|
||||
_schema.annotation = cls._schema_connected_subnet_read.annotation
|
||||
_schema.prefix = cls._schema_connected_subnet_read.prefix
|
||||
return
|
||||
|
||||
cls._schema_connected_subnet_read = _schema_connected_subnet_read = AAZObjectType()
|
||||
|
||||
connected_subnet_read = _schema_connected_subnet_read
|
||||
connected_subnet_read.annotation = AAZStrType()
|
||||
connected_subnet_read.prefix = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
_schema.annotation = cls._schema_connected_subnet_read.annotation
|
||||
_schema.prefix = cls._schema_connected_subnet_read.prefix
|
||||
|
||||
_schema_neighbor_address_read = None
|
||||
|
||||
@classmethod
|
||||
def _build_schema_neighbor_address_read(cls, _schema):
|
||||
if cls._schema_neighbor_address_read is not None:
|
||||
_schema.address = cls._schema_neighbor_address_read.address
|
||||
_schema.configuration_state = cls._schema_neighbor_address_read.configuration_state
|
||||
return
|
||||
|
||||
cls._schema_neighbor_address_read = _schema_neighbor_address_read = AAZObjectType()
|
||||
|
||||
neighbor_address_read = _schema_neighbor_address_read
|
||||
neighbor_address_read.address = AAZStrType()
|
||||
neighbor_address_read.configuration_state = AAZStrType(
|
||||
serialized_name="configurationState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
|
||||
_schema.administrative_state = cls._schema_bfd_configuration_read.administrative_state
|
||||
_schema.interval = cls._schema_bfd_configuration_read.interval
|
||||
_schema.multiplier = cls._schema_bfd_configuration_read.multiplier
|
||||
_schema.address = cls._schema_neighbor_address_read.address
|
||||
_schema.configuration_state = cls._schema_neighbor_address_read.configuration_state
|
||||
|
||||
_schema_static_route_properties_read = None
|
||||
|
||||
@classmethod
|
||||
def _build_schema_static_route_properties_read(cls, _schema):
|
||||
if cls._schema_static_route_properties_read is not None:
|
||||
_schema.next_hop = cls._schema_static_route_properties_read.next_hop
|
||||
_schema.prefix = cls._schema_static_route_properties_read.prefix
|
||||
return
|
||||
|
||||
cls._schema_static_route_properties_read = _schema_static_route_properties_read = AAZObjectType()
|
||||
|
||||
static_route_properties_read = _schema_static_route_properties_read
|
||||
static_route_properties_read.next_hop = AAZListType(
|
||||
serialized_name="nextHop",
|
||||
flags={"required": True},
|
||||
)
|
||||
static_route_properties_read.prefix = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
next_hop = _schema_static_route_properties_read.next_hop
|
||||
next_hop.Element = AAZStrType()
|
||||
|
||||
_schema.next_hop = cls._schema_static_route_properties_read.next_hop
|
||||
_schema.prefix = cls._schema_static_route_properties_read.prefix
|
||||
|
||||
|
||||
__all__ = ["Create"]
|
||||
|
|
|
@ -15,16 +15,16 @@ from azure.cli.core.aaz import *
|
|||
"networkfabric internalnetwork delete",
|
||||
)
|
||||
class Delete(AAZCommand):
|
||||
"""Delete the Internal Network resource.
|
||||
"""Delete the Internal Network resource
|
||||
|
||||
:example: Delete the Internal Network
|
||||
az networkfabric internalnetwork delete --resource-group "example-rg" --l3domain "example-l3domain" --resource-name "example-internalnetwork"
|
||||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-02-01-preview",
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/l3isolationdomains/{}/internalnetworks/{}", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/l3isolationdomains/{}/internalnetworks/{}", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -47,13 +47,13 @@ class Delete(AAZCommand):
|
|||
_args_schema = cls._args_schema
|
||||
_args_schema.resource_name = AAZStrArg(
|
||||
options=["--resource-name"],
|
||||
help="Name of the InternalNetwork",
|
||||
help="Name of the Internal Network.",
|
||||
required=True,
|
||||
id_part="child_name_1",
|
||||
)
|
||||
_args_schema.l3_isolation_domain_name = AAZStrArg(
|
||||
options=["--l3domain", "--l3-isolation-domain-name"],
|
||||
help="Name of the L3IsolationDomain",
|
||||
help="Name of the L3 Isolation Domain.",
|
||||
required=True,
|
||||
id_part="name",
|
||||
)
|
||||
|
@ -153,7 +153,7 @@ class Delete(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
|
|
@ -15,16 +15,16 @@ from azure.cli.core.aaz import *
|
|||
"networkfabric internalnetwork list",
|
||||
)
|
||||
class List(AAZCommand):
|
||||
"""List all Internal Networks in the provided resource group.
|
||||
"""List all Internal Networks in the provided resource group
|
||||
|
||||
:example: List the Internal Networks for Resource Group
|
||||
az networkfabric internalnetwork list --resource-group "example-rg" --l3domain "example-l3domain"
|
||||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-02-01-preview",
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/l3isolationdomains/{}/internalnetworks", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/l3isolationdomains/{}/internalnetworks", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -45,7 +45,7 @@ class List(AAZCommand):
|
|||
_args_schema = cls._args_schema
|
||||
_args_schema.l3_isolation_domain_name = AAZStrArg(
|
||||
options=["--l3domain", "--l3-isolation-domain-name"],
|
||||
help="Name of the L3IsolationDomain",
|
||||
help="Name of the L3 Isolation Domain.",
|
||||
required=True,
|
||||
)
|
||||
_args_schema.resource_group = AAZResourceGroupNameArg(
|
||||
|
@ -56,7 +56,7 @@ class List(AAZCommand):
|
|||
|
||||
def _execute_operations(self):
|
||||
self.pre_operations()
|
||||
self.InternalNetworksList(ctx=self.ctx)()
|
||||
self.InternalNetworksListByL3IsolationDomain(ctx=self.ctx)()
|
||||
self.post_operations()
|
||||
|
||||
@register_callback
|
||||
|
@ -72,7 +72,7 @@ class List(AAZCommand):
|
|||
next_link = self.deserialize_output(self.ctx.vars.instance.next_link)
|
||||
return result, next_link
|
||||
|
||||
class InternalNetworksList(AAZHttpOperation):
|
||||
class InternalNetworksListByL3IsolationDomain(AAZHttpOperation):
|
||||
CLIENT_TYPE = "MgmtClient"
|
||||
|
||||
def __call__(self, *args, **kwargs):
|
||||
|
@ -120,7 +120,7 @@ class List(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
@ -185,19 +185,11 @@ class List(AAZCommand):
|
|||
flags={"read_only": True},
|
||||
)
|
||||
properties.annotation = AAZStrType()
|
||||
properties.bfd_disabled_on_resources = AAZListType(
|
||||
serialized_name="bfdDisabledOnResources",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.bfd_for_static_routes_disabled_on_resources = AAZListType(
|
||||
serialized_name="bfdForStaticRoutesDisabledOnResources",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.bgp_configuration = AAZObjectType(
|
||||
serialized_name="bgpConfiguration",
|
||||
)
|
||||
properties.bgp_disabled_on_resources = AAZListType(
|
||||
serialized_name="bgpDisabledOnResources",
|
||||
properties.configuration_state = AAZStrType(
|
||||
serialized_name="configurationState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.connected_i_pv4_subnets = AAZListType(
|
||||
|
@ -206,16 +198,28 @@ class List(AAZCommand):
|
|||
properties.connected_i_pv6_subnets = AAZListType(
|
||||
serialized_name="connectedIPv6Subnets",
|
||||
)
|
||||
properties.disabled_on_resources = AAZListType(
|
||||
serialized_name="disabledOnResources",
|
||||
flags={"read_only": True},
|
||||
properties.egress_acl_id = AAZStrType(
|
||||
serialized_name="egressAclId",
|
||||
)
|
||||
properties.export_route_policy = AAZObjectType(
|
||||
serialized_name="exportRoutePolicy",
|
||||
)
|
||||
properties.export_route_policy_id = AAZStrType(
|
||||
serialized_name="exportRoutePolicyId",
|
||||
)
|
||||
properties.extension = AAZStrType()
|
||||
properties.import_route_policy = AAZObjectType(
|
||||
serialized_name="importRoutePolicy",
|
||||
)
|
||||
properties.import_route_policy_id = AAZStrType(
|
||||
serialized_name="importRoutePolicyId",
|
||||
)
|
||||
properties.ingress_acl_id = AAZStrType(
|
||||
serialized_name="ingressAclId",
|
||||
)
|
||||
properties.is_monitoring_enabled = AAZStrType(
|
||||
serialized_name="isMonitoringEnabled",
|
||||
)
|
||||
properties.mtu = AAZIntType()
|
||||
properties.provisioning_state = AAZStrType(
|
||||
serialized_name="provisioningState",
|
||||
|
@ -229,12 +233,6 @@ class List(AAZCommand):
|
|||
flags={"required": True},
|
||||
)
|
||||
|
||||
bfd_disabled_on_resources = cls._schema_on_200.value.Element.properties.bfd_disabled_on_resources
|
||||
bfd_disabled_on_resources.Element = AAZStrType()
|
||||
|
||||
bfd_for_static_routes_disabled_on_resources = cls._schema_on_200.value.Element.properties.bfd_for_static_routes_disabled_on_resources
|
||||
bfd_for_static_routes_disabled_on_resources.Element = AAZStrType()
|
||||
|
||||
bgp_configuration = cls._schema_on_200.value.Element.properties.bgp_configuration
|
||||
bgp_configuration.allow_as = AAZIntType(
|
||||
serialized_name="allowAS",
|
||||
|
@ -276,52 +274,45 @@ class List(AAZCommand):
|
|||
|
||||
ipv4_neighbor_address = cls._schema_on_200.value.Element.properties.bgp_configuration.ipv4_neighbor_address
|
||||
ipv4_neighbor_address.Element = AAZObjectType()
|
||||
|
||||
_element = cls._schema_on_200.value.Element.properties.bgp_configuration.ipv4_neighbor_address.Element
|
||||
_element.address = AAZStrType()
|
||||
_element.operational_state = AAZStrType(
|
||||
serialized_name="operationalState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_ListHelper._build_schema_neighbor_address_read(ipv4_neighbor_address.Element)
|
||||
|
||||
ipv6_listen_range_prefixes = cls._schema_on_200.value.Element.properties.bgp_configuration.ipv6_listen_range_prefixes
|
||||
ipv6_listen_range_prefixes.Element = AAZStrType()
|
||||
|
||||
ipv6_neighbor_address = cls._schema_on_200.value.Element.properties.bgp_configuration.ipv6_neighbor_address
|
||||
ipv6_neighbor_address.Element = AAZObjectType()
|
||||
|
||||
_element = cls._schema_on_200.value.Element.properties.bgp_configuration.ipv6_neighbor_address.Element
|
||||
_element.address = AAZStrType()
|
||||
_element.operational_state = AAZStrType(
|
||||
serialized_name="operationalState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
|
||||
bgp_disabled_on_resources = cls._schema_on_200.value.Element.properties.bgp_disabled_on_resources
|
||||
bgp_disabled_on_resources.Element = AAZStrType()
|
||||
_ListHelper._build_schema_neighbor_address_read(ipv6_neighbor_address.Element)
|
||||
|
||||
connected_i_pv4_subnets = cls._schema_on_200.value.Element.properties.connected_i_pv4_subnets
|
||||
connected_i_pv4_subnets.Element = AAZObjectType()
|
||||
|
||||
_element = cls._schema_on_200.value.Element.properties.connected_i_pv4_subnets.Element
|
||||
_element.annotation = AAZStrType()
|
||||
_element.prefix = AAZStrType()
|
||||
_ListHelper._build_schema_connected_subnet_read(connected_i_pv4_subnets.Element)
|
||||
|
||||
connected_i_pv6_subnets = cls._schema_on_200.value.Element.properties.connected_i_pv6_subnets
|
||||
connected_i_pv6_subnets.Element = AAZObjectType()
|
||||
_ListHelper._build_schema_connected_subnet_read(connected_i_pv6_subnets.Element)
|
||||
|
||||
_element = cls._schema_on_200.value.Element.properties.connected_i_pv6_subnets.Element
|
||||
_element.annotation = AAZStrType()
|
||||
_element.prefix = AAZStrType()
|
||||
export_route_policy = cls._schema_on_200.value.Element.properties.export_route_policy
|
||||
export_route_policy.export_ipv4_route_policy_id = AAZStrType(
|
||||
serialized_name="exportIpv4RoutePolicyId",
|
||||
)
|
||||
export_route_policy.export_ipv6_route_policy_id = AAZStrType(
|
||||
serialized_name="exportIpv6RoutePolicyId",
|
||||
)
|
||||
|
||||
disabled_on_resources = cls._schema_on_200.value.Element.properties.disabled_on_resources
|
||||
disabled_on_resources.Element = AAZStrType()
|
||||
import_route_policy = cls._schema_on_200.value.Element.properties.import_route_policy
|
||||
import_route_policy.import_ipv4_route_policy_id = AAZStrType(
|
||||
serialized_name="importIpv4RoutePolicyId",
|
||||
)
|
||||
import_route_policy.import_ipv6_route_policy_id = AAZStrType(
|
||||
serialized_name="importIpv6RoutePolicyId",
|
||||
)
|
||||
|
||||
static_route_configuration = cls._schema_on_200.value.Element.properties.static_route_configuration
|
||||
static_route_configuration.bfd_configuration = AAZObjectType(
|
||||
serialized_name="bfdConfiguration",
|
||||
)
|
||||
_ListHelper._build_schema_bfd_configuration_read(static_route_configuration.bfd_configuration)
|
||||
static_route_configuration.extension = AAZStrType()
|
||||
static_route_configuration.ipv4_routes = AAZListType(
|
||||
serialized_name="ipv4Routes",
|
||||
)
|
||||
|
@ -331,33 +322,11 @@ class List(AAZCommand):
|
|||
|
||||
ipv4_routes = cls._schema_on_200.value.Element.properties.static_route_configuration.ipv4_routes
|
||||
ipv4_routes.Element = AAZObjectType()
|
||||
|
||||
_element = cls._schema_on_200.value.Element.properties.static_route_configuration.ipv4_routes.Element
|
||||
_element.next_hop = AAZListType(
|
||||
serialized_name="nextHop",
|
||||
flags={"required": True},
|
||||
)
|
||||
_element.prefix = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
next_hop = cls._schema_on_200.value.Element.properties.static_route_configuration.ipv4_routes.Element.next_hop
|
||||
next_hop.Element = AAZStrType()
|
||||
_ListHelper._build_schema_static_route_properties_read(ipv4_routes.Element)
|
||||
|
||||
ipv6_routes = cls._schema_on_200.value.Element.properties.static_route_configuration.ipv6_routes
|
||||
ipv6_routes.Element = AAZObjectType()
|
||||
|
||||
_element = cls._schema_on_200.value.Element.properties.static_route_configuration.ipv6_routes.Element
|
||||
_element.next_hop = AAZListType(
|
||||
serialized_name="nextHop",
|
||||
flags={"required": True},
|
||||
)
|
||||
_element.prefix = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
next_hop = cls._schema_on_200.value.Element.properties.static_route_configuration.ipv6_routes.Element.next_hop
|
||||
next_hop.Element = AAZStrType()
|
||||
_ListHelper._build_schema_static_route_properties_read(ipv6_routes.Element)
|
||||
|
||||
system_data = cls._schema_on_200.value.Element.system_data
|
||||
system_data.created_at = AAZStrType(
|
||||
|
@ -391,7 +360,7 @@ class _ListHelper:
|
|||
def _build_schema_bfd_configuration_read(cls, _schema):
|
||||
if cls._schema_bfd_configuration_read is not None:
|
||||
_schema.administrative_state = cls._schema_bfd_configuration_read.administrative_state
|
||||
_schema.interval = cls._schema_bfd_configuration_read.interval
|
||||
_schema.interval_in_milli_seconds = cls._schema_bfd_configuration_read.interval_in_milli_seconds
|
||||
_schema.multiplier = cls._schema_bfd_configuration_read.multiplier
|
||||
return
|
||||
|
||||
|
@ -402,16 +371,81 @@ class _ListHelper:
|
|||
serialized_name="administrativeState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
bfd_configuration_read.interval = AAZIntType(
|
||||
flags={"read_only": True},
|
||||
bfd_configuration_read.interval_in_milli_seconds = AAZIntType(
|
||||
serialized_name="intervalInMilliSeconds",
|
||||
)
|
||||
bfd_configuration_read.multiplier = AAZIntType(
|
||||
bfd_configuration_read.multiplier = AAZIntType()
|
||||
|
||||
_schema.administrative_state = cls._schema_bfd_configuration_read.administrative_state
|
||||
_schema.interval_in_milli_seconds = cls._schema_bfd_configuration_read.interval_in_milli_seconds
|
||||
_schema.multiplier = cls._schema_bfd_configuration_read.multiplier
|
||||
|
||||
_schema_connected_subnet_read = None
|
||||
|
||||
@classmethod
|
||||
def _build_schema_connected_subnet_read(cls, _schema):
|
||||
if cls._schema_connected_subnet_read is not None:
|
||||
_schema.annotation = cls._schema_connected_subnet_read.annotation
|
||||
_schema.prefix = cls._schema_connected_subnet_read.prefix
|
||||
return
|
||||
|
||||
cls._schema_connected_subnet_read = _schema_connected_subnet_read = AAZObjectType()
|
||||
|
||||
connected_subnet_read = _schema_connected_subnet_read
|
||||
connected_subnet_read.annotation = AAZStrType()
|
||||
connected_subnet_read.prefix = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
_schema.annotation = cls._schema_connected_subnet_read.annotation
|
||||
_schema.prefix = cls._schema_connected_subnet_read.prefix
|
||||
|
||||
_schema_neighbor_address_read = None
|
||||
|
||||
@classmethod
|
||||
def _build_schema_neighbor_address_read(cls, _schema):
|
||||
if cls._schema_neighbor_address_read is not None:
|
||||
_schema.address = cls._schema_neighbor_address_read.address
|
||||
_schema.configuration_state = cls._schema_neighbor_address_read.configuration_state
|
||||
return
|
||||
|
||||
cls._schema_neighbor_address_read = _schema_neighbor_address_read = AAZObjectType()
|
||||
|
||||
neighbor_address_read = _schema_neighbor_address_read
|
||||
neighbor_address_read.address = AAZStrType()
|
||||
neighbor_address_read.configuration_state = AAZStrType(
|
||||
serialized_name="configurationState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
|
||||
_schema.administrative_state = cls._schema_bfd_configuration_read.administrative_state
|
||||
_schema.interval = cls._schema_bfd_configuration_read.interval
|
||||
_schema.multiplier = cls._schema_bfd_configuration_read.multiplier
|
||||
_schema.address = cls._schema_neighbor_address_read.address
|
||||
_schema.configuration_state = cls._schema_neighbor_address_read.configuration_state
|
||||
|
||||
_schema_static_route_properties_read = None
|
||||
|
||||
@classmethod
|
||||
def _build_schema_static_route_properties_read(cls, _schema):
|
||||
if cls._schema_static_route_properties_read is not None:
|
||||
_schema.next_hop = cls._schema_static_route_properties_read.next_hop
|
||||
_schema.prefix = cls._schema_static_route_properties_read.prefix
|
||||
return
|
||||
|
||||
cls._schema_static_route_properties_read = _schema_static_route_properties_read = AAZObjectType()
|
||||
|
||||
static_route_properties_read = _schema_static_route_properties_read
|
||||
static_route_properties_read.next_hop = AAZListType(
|
||||
serialized_name="nextHop",
|
||||
flags={"required": True},
|
||||
)
|
||||
static_route_properties_read.prefix = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
next_hop = _schema_static_route_properties_read.next_hop
|
||||
next_hop.Element = AAZStrType()
|
||||
|
||||
_schema.next_hop = cls._schema_static_route_properties_read.next_hop
|
||||
_schema.prefix = cls._schema_static_route_properties_read.prefix
|
||||
|
||||
|
||||
__all__ = ["List"]
|
||||
|
|
|
@ -15,16 +15,16 @@ from azure.cli.core.aaz import *
|
|||
"networkfabric internalnetwork show",
|
||||
)
|
||||
class Show(AAZCommand):
|
||||
"""Show details of the provided Internal Network resource.
|
||||
"""Show details of the provided Internal Network resource
|
||||
|
||||
:example: Show the Internal Network
|
||||
az networkfabric internalnetwork show --resource-group "example-rg" --resource-name "example-internalnetwork" --l3domain "example-l3domain"
|
||||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-02-01-preview",
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/l3isolationdomains/{}/internalnetworks/{}", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/l3isolationdomains/{}/internalnetworks/{}", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -46,13 +46,13 @@ class Show(AAZCommand):
|
|||
_args_schema = cls._args_schema
|
||||
_args_schema.resource_name = AAZStrArg(
|
||||
options=["--resource-name"],
|
||||
help="Name of the InternalNetwork",
|
||||
help="Name of the Internal Network.",
|
||||
required=True,
|
||||
id_part="child_name_1",
|
||||
)
|
||||
_args_schema.l3_isolation_domain_name = AAZStrArg(
|
||||
options=["--l3domain", "--l3-isolation-domain-name"],
|
||||
help="Name of the L3IsolationDomain",
|
||||
help="Name of the L3 Isolation Domain.",
|
||||
required=True,
|
||||
id_part="name",
|
||||
)
|
||||
|
@ -131,7 +131,7 @@ class Show(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
@ -187,19 +187,11 @@ class Show(AAZCommand):
|
|||
flags={"read_only": True},
|
||||
)
|
||||
properties.annotation = AAZStrType()
|
||||
properties.bfd_disabled_on_resources = AAZListType(
|
||||
serialized_name="bfdDisabledOnResources",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.bfd_for_static_routes_disabled_on_resources = AAZListType(
|
||||
serialized_name="bfdForStaticRoutesDisabledOnResources",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.bgp_configuration = AAZObjectType(
|
||||
serialized_name="bgpConfiguration",
|
||||
)
|
||||
properties.bgp_disabled_on_resources = AAZListType(
|
||||
serialized_name="bgpDisabledOnResources",
|
||||
properties.configuration_state = AAZStrType(
|
||||
serialized_name="configurationState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.connected_i_pv4_subnets = AAZListType(
|
||||
|
@ -208,16 +200,28 @@ class Show(AAZCommand):
|
|||
properties.connected_i_pv6_subnets = AAZListType(
|
||||
serialized_name="connectedIPv6Subnets",
|
||||
)
|
||||
properties.disabled_on_resources = AAZListType(
|
||||
serialized_name="disabledOnResources",
|
||||
flags={"read_only": True},
|
||||
properties.egress_acl_id = AAZStrType(
|
||||
serialized_name="egressAclId",
|
||||
)
|
||||
properties.export_route_policy = AAZObjectType(
|
||||
serialized_name="exportRoutePolicy",
|
||||
)
|
||||
properties.export_route_policy_id = AAZStrType(
|
||||
serialized_name="exportRoutePolicyId",
|
||||
)
|
||||
properties.extension = AAZStrType()
|
||||
properties.import_route_policy = AAZObjectType(
|
||||
serialized_name="importRoutePolicy",
|
||||
)
|
||||
properties.import_route_policy_id = AAZStrType(
|
||||
serialized_name="importRoutePolicyId",
|
||||
)
|
||||
properties.ingress_acl_id = AAZStrType(
|
||||
serialized_name="ingressAclId",
|
||||
)
|
||||
properties.is_monitoring_enabled = AAZStrType(
|
||||
serialized_name="isMonitoringEnabled",
|
||||
)
|
||||
properties.mtu = AAZIntType()
|
||||
properties.provisioning_state = AAZStrType(
|
||||
serialized_name="provisioningState",
|
||||
|
@ -231,12 +235,6 @@ class Show(AAZCommand):
|
|||
flags={"required": True},
|
||||
)
|
||||
|
||||
bfd_disabled_on_resources = cls._schema_on_200.properties.bfd_disabled_on_resources
|
||||
bfd_disabled_on_resources.Element = AAZStrType()
|
||||
|
||||
bfd_for_static_routes_disabled_on_resources = cls._schema_on_200.properties.bfd_for_static_routes_disabled_on_resources
|
||||
bfd_for_static_routes_disabled_on_resources.Element = AAZStrType()
|
||||
|
||||
bgp_configuration = cls._schema_on_200.properties.bgp_configuration
|
||||
bgp_configuration.allow_as = AAZIntType(
|
||||
serialized_name="allowAS",
|
||||
|
@ -278,52 +276,45 @@ class Show(AAZCommand):
|
|||
|
||||
ipv4_neighbor_address = cls._schema_on_200.properties.bgp_configuration.ipv4_neighbor_address
|
||||
ipv4_neighbor_address.Element = AAZObjectType()
|
||||
|
||||
_element = cls._schema_on_200.properties.bgp_configuration.ipv4_neighbor_address.Element
|
||||
_element.address = AAZStrType()
|
||||
_element.operational_state = AAZStrType(
|
||||
serialized_name="operationalState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_ShowHelper._build_schema_neighbor_address_read(ipv4_neighbor_address.Element)
|
||||
|
||||
ipv6_listen_range_prefixes = cls._schema_on_200.properties.bgp_configuration.ipv6_listen_range_prefixes
|
||||
ipv6_listen_range_prefixes.Element = AAZStrType()
|
||||
|
||||
ipv6_neighbor_address = cls._schema_on_200.properties.bgp_configuration.ipv6_neighbor_address
|
||||
ipv6_neighbor_address.Element = AAZObjectType()
|
||||
|
||||
_element = cls._schema_on_200.properties.bgp_configuration.ipv6_neighbor_address.Element
|
||||
_element.address = AAZStrType()
|
||||
_element.operational_state = AAZStrType(
|
||||
serialized_name="operationalState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
|
||||
bgp_disabled_on_resources = cls._schema_on_200.properties.bgp_disabled_on_resources
|
||||
bgp_disabled_on_resources.Element = AAZStrType()
|
||||
_ShowHelper._build_schema_neighbor_address_read(ipv6_neighbor_address.Element)
|
||||
|
||||
connected_i_pv4_subnets = cls._schema_on_200.properties.connected_i_pv4_subnets
|
||||
connected_i_pv4_subnets.Element = AAZObjectType()
|
||||
|
||||
_element = cls._schema_on_200.properties.connected_i_pv4_subnets.Element
|
||||
_element.annotation = AAZStrType()
|
||||
_element.prefix = AAZStrType()
|
||||
_ShowHelper._build_schema_connected_subnet_read(connected_i_pv4_subnets.Element)
|
||||
|
||||
connected_i_pv6_subnets = cls._schema_on_200.properties.connected_i_pv6_subnets
|
||||
connected_i_pv6_subnets.Element = AAZObjectType()
|
||||
_ShowHelper._build_schema_connected_subnet_read(connected_i_pv6_subnets.Element)
|
||||
|
||||
_element = cls._schema_on_200.properties.connected_i_pv6_subnets.Element
|
||||
_element.annotation = AAZStrType()
|
||||
_element.prefix = AAZStrType()
|
||||
export_route_policy = cls._schema_on_200.properties.export_route_policy
|
||||
export_route_policy.export_ipv4_route_policy_id = AAZStrType(
|
||||
serialized_name="exportIpv4RoutePolicyId",
|
||||
)
|
||||
export_route_policy.export_ipv6_route_policy_id = AAZStrType(
|
||||
serialized_name="exportIpv6RoutePolicyId",
|
||||
)
|
||||
|
||||
disabled_on_resources = cls._schema_on_200.properties.disabled_on_resources
|
||||
disabled_on_resources.Element = AAZStrType()
|
||||
import_route_policy = cls._schema_on_200.properties.import_route_policy
|
||||
import_route_policy.import_ipv4_route_policy_id = AAZStrType(
|
||||
serialized_name="importIpv4RoutePolicyId",
|
||||
)
|
||||
import_route_policy.import_ipv6_route_policy_id = AAZStrType(
|
||||
serialized_name="importIpv6RoutePolicyId",
|
||||
)
|
||||
|
||||
static_route_configuration = cls._schema_on_200.properties.static_route_configuration
|
||||
static_route_configuration.bfd_configuration = AAZObjectType(
|
||||
serialized_name="bfdConfiguration",
|
||||
)
|
||||
_ShowHelper._build_schema_bfd_configuration_read(static_route_configuration.bfd_configuration)
|
||||
static_route_configuration.extension = AAZStrType()
|
||||
static_route_configuration.ipv4_routes = AAZListType(
|
||||
serialized_name="ipv4Routes",
|
||||
)
|
||||
|
@ -333,33 +324,11 @@ class Show(AAZCommand):
|
|||
|
||||
ipv4_routes = cls._schema_on_200.properties.static_route_configuration.ipv4_routes
|
||||
ipv4_routes.Element = AAZObjectType()
|
||||
|
||||
_element = cls._schema_on_200.properties.static_route_configuration.ipv4_routes.Element
|
||||
_element.next_hop = AAZListType(
|
||||
serialized_name="nextHop",
|
||||
flags={"required": True},
|
||||
)
|
||||
_element.prefix = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
next_hop = cls._schema_on_200.properties.static_route_configuration.ipv4_routes.Element.next_hop
|
||||
next_hop.Element = AAZStrType()
|
||||
_ShowHelper._build_schema_static_route_properties_read(ipv4_routes.Element)
|
||||
|
||||
ipv6_routes = cls._schema_on_200.properties.static_route_configuration.ipv6_routes
|
||||
ipv6_routes.Element = AAZObjectType()
|
||||
|
||||
_element = cls._schema_on_200.properties.static_route_configuration.ipv6_routes.Element
|
||||
_element.next_hop = AAZListType(
|
||||
serialized_name="nextHop",
|
||||
flags={"required": True},
|
||||
)
|
||||
_element.prefix = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
next_hop = cls._schema_on_200.properties.static_route_configuration.ipv6_routes.Element.next_hop
|
||||
next_hop.Element = AAZStrType()
|
||||
_ShowHelper._build_schema_static_route_properties_read(ipv6_routes.Element)
|
||||
|
||||
system_data = cls._schema_on_200.system_data
|
||||
system_data.created_at = AAZStrType(
|
||||
|
@ -393,7 +362,7 @@ class _ShowHelper:
|
|||
def _build_schema_bfd_configuration_read(cls, _schema):
|
||||
if cls._schema_bfd_configuration_read is not None:
|
||||
_schema.administrative_state = cls._schema_bfd_configuration_read.administrative_state
|
||||
_schema.interval = cls._schema_bfd_configuration_read.interval
|
||||
_schema.interval_in_milli_seconds = cls._schema_bfd_configuration_read.interval_in_milli_seconds
|
||||
_schema.multiplier = cls._schema_bfd_configuration_read.multiplier
|
||||
return
|
||||
|
||||
|
@ -404,16 +373,81 @@ class _ShowHelper:
|
|||
serialized_name="administrativeState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
bfd_configuration_read.interval = AAZIntType(
|
||||
flags={"read_only": True},
|
||||
bfd_configuration_read.interval_in_milli_seconds = AAZIntType(
|
||||
serialized_name="intervalInMilliSeconds",
|
||||
)
|
||||
bfd_configuration_read.multiplier = AAZIntType(
|
||||
bfd_configuration_read.multiplier = AAZIntType()
|
||||
|
||||
_schema.administrative_state = cls._schema_bfd_configuration_read.administrative_state
|
||||
_schema.interval_in_milli_seconds = cls._schema_bfd_configuration_read.interval_in_milli_seconds
|
||||
_schema.multiplier = cls._schema_bfd_configuration_read.multiplier
|
||||
|
||||
_schema_connected_subnet_read = None
|
||||
|
||||
@classmethod
|
||||
def _build_schema_connected_subnet_read(cls, _schema):
|
||||
if cls._schema_connected_subnet_read is not None:
|
||||
_schema.annotation = cls._schema_connected_subnet_read.annotation
|
||||
_schema.prefix = cls._schema_connected_subnet_read.prefix
|
||||
return
|
||||
|
||||
cls._schema_connected_subnet_read = _schema_connected_subnet_read = AAZObjectType()
|
||||
|
||||
connected_subnet_read = _schema_connected_subnet_read
|
||||
connected_subnet_read.annotation = AAZStrType()
|
||||
connected_subnet_read.prefix = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
_schema.annotation = cls._schema_connected_subnet_read.annotation
|
||||
_schema.prefix = cls._schema_connected_subnet_read.prefix
|
||||
|
||||
_schema_neighbor_address_read = None
|
||||
|
||||
@classmethod
|
||||
def _build_schema_neighbor_address_read(cls, _schema):
|
||||
if cls._schema_neighbor_address_read is not None:
|
||||
_schema.address = cls._schema_neighbor_address_read.address
|
||||
_schema.configuration_state = cls._schema_neighbor_address_read.configuration_state
|
||||
return
|
||||
|
||||
cls._schema_neighbor_address_read = _schema_neighbor_address_read = AAZObjectType()
|
||||
|
||||
neighbor_address_read = _schema_neighbor_address_read
|
||||
neighbor_address_read.address = AAZStrType()
|
||||
neighbor_address_read.configuration_state = AAZStrType(
|
||||
serialized_name="configurationState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
|
||||
_schema.administrative_state = cls._schema_bfd_configuration_read.administrative_state
|
||||
_schema.interval = cls._schema_bfd_configuration_read.interval
|
||||
_schema.multiplier = cls._schema_bfd_configuration_read.multiplier
|
||||
_schema.address = cls._schema_neighbor_address_read.address
|
||||
_schema.configuration_state = cls._schema_neighbor_address_read.configuration_state
|
||||
|
||||
_schema_static_route_properties_read = None
|
||||
|
||||
@classmethod
|
||||
def _build_schema_static_route_properties_read(cls, _schema):
|
||||
if cls._schema_static_route_properties_read is not None:
|
||||
_schema.next_hop = cls._schema_static_route_properties_read.next_hop
|
||||
_schema.prefix = cls._schema_static_route_properties_read.prefix
|
||||
return
|
||||
|
||||
cls._schema_static_route_properties_read = _schema_static_route_properties_read = AAZObjectType()
|
||||
|
||||
static_route_properties_read = _schema_static_route_properties_read
|
||||
static_route_properties_read.next_hop = AAZListType(
|
||||
serialized_name="nextHop",
|
||||
flags={"required": True},
|
||||
)
|
||||
static_route_properties_read.prefix = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
next_hop = _schema_static_route_properties_read.next_hop
|
||||
next_hop.Element = AAZStrType()
|
||||
|
||||
_schema.next_hop = cls._schema_static_route_properties_read.next_hop
|
||||
_schema.prefix = cls._schema_static_route_properties_read.prefix
|
||||
|
||||
|
||||
__all__ = ["Show"]
|
||||
|
|
|
@ -0,0 +1,908 @@
|
|||
# --------------------------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
#
|
||||
# Code generated by aaz-dev-tools
|
||||
# --------------------------------------------------------------------------------------------
|
||||
|
||||
# pylint: skip-file
|
||||
# flake8: noqa
|
||||
|
||||
from azure.cli.core.aaz import *
|
||||
|
||||
|
||||
@register_command(
|
||||
"networkfabric internalnetwork update",
|
||||
)
|
||||
class Update(AAZCommand):
|
||||
"""Update the Internal Network resource.
|
||||
|
||||
:example: Update the Internal Network resource
|
||||
az networkfabric internalnetwork update --resource-group "example-rg" --l3-isolation-domain-name "example-l3domain" --resource-name "example-internalNetwork" --mtu 1500 --is-monitoring-enabled "True" --connected-ipv4-subnets "[{prefix:'10.0.0.1/21'},{prefix:'10.0.0.1/22'}]" --static-route-configuration "{bfdConfiguration:{multiplier:5,intervalInMilliSeconds:300},ipv4Routes:[{prefix:'10.1.0.0/24',nextHop:['10.0.0.1','10.0.0.2']},{prefix:'10.1.0.0/24',nextHop:['10.0.0.1','10.0.0.2']}]}" --bgp-configuration "{bfdConfiguration:{multiplier:5,intervalInMilliSeconds:300},defaultRouteOriginate:True,allowAS:2,allowASOverride:Enable,peerASN:65047,ipv4ListenRangePrefixes:['10.1.0.0/28','10.1.0.1/28'],ipv4NeighborAddress:[{address:'10.0.0.11'},{address:'10.0.0.12'}]}" --import-route-policy "{importIpv4RoutePolicyId:'/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/microsoft.managednetworkfabric/routePolicies/example-routepolicy',importIpv6RoutePolicyId:'/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/microsoft.managednetworkfabric/routePolicies/example-routepolicy'}" --export-route-policy "{exportIpv4RoutePolicyId:'/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/microsoft.managednetworkfabric/routePolicies/example-routepolicy',exportIpv6RoutePolicyId:'/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/microsoft.managednetworkfabric/routePolicies/example-routepolicy'}"
|
||||
|
||||
:example: Help text for sub parameters under the specific parent can be viewed by using the shorthand syntax '??'. See https://github.com/Azure/azure-cli/tree/dev/doc/shorthand_syntax.md for more about shorthand syntax.
|
||||
az networkfabric internalnetwork update --static-route-configuration ??
|
||||
az networkfabric internalnetwork update --static-route-configuration "{ipv4-routes:??"
|
||||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/l3isolationdomains/{}/internalnetworks/{}", "2023-06-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 Internal Network.",
|
||||
required=True,
|
||||
id_part="child_name_1",
|
||||
)
|
||||
_args_schema.l3_isolation_domain_name = AAZStrArg(
|
||||
options=["--l3domain", "--l3-isolation-domain-name"],
|
||||
help="Name of the L3 Isolation Domain.",
|
||||
required=True,
|
||||
id_part="name",
|
||||
)
|
||||
_args_schema.resource_group = AAZResourceGroupNameArg(
|
||||
help="Name of the resource group",
|
||||
required=True,
|
||||
)
|
||||
|
||||
# define Arg Group "Properties"
|
||||
|
||||
_args_schema = cls._args_schema
|
||||
_args_schema.annotation = AAZStrArg(
|
||||
options=["--annotation"],
|
||||
arg_group="Properties",
|
||||
help="Description for underlying resource.",
|
||||
)
|
||||
_args_schema.bgp_configuration = AAZObjectArg(
|
||||
options=["--bgp-configuration"],
|
||||
arg_group="Properties",
|
||||
help="BGP configuration properties.",
|
||||
)
|
||||
_args_schema.connected_ipv4_subnets = AAZListArg(
|
||||
options=["--connected-ipv4-subnets"],
|
||||
arg_group="Properties",
|
||||
help="List of Connected IPv4 Subnets.",
|
||||
)
|
||||
_args_schema.connected_ipv6_subnets = AAZListArg(
|
||||
options=["--connected-ipv6-subnets"],
|
||||
arg_group="Properties",
|
||||
help="List of connected IPv6 Subnets.",
|
||||
)
|
||||
_args_schema.egress_acl_id = AAZResourceIdArg(
|
||||
options=["--egress-acl-id"],
|
||||
arg_group="Properties",
|
||||
help="Egress Acl ARM resource ID.",
|
||||
)
|
||||
_args_schema.export_route_policy = AAZObjectArg(
|
||||
options=["--export-route-policy"],
|
||||
arg_group="Properties",
|
||||
help="Export Route Policy either IPv4 or IPv6.",
|
||||
)
|
||||
_args_schema.export_route_policy_id = AAZResourceIdArg(
|
||||
options=["--export-route-policy-id"],
|
||||
arg_group="Properties",
|
||||
help="ARM Resource ID of the RoutePolicy. This is used for the backward compatibility.",
|
||||
)
|
||||
_args_schema.import_route_policy = AAZObjectArg(
|
||||
options=["--import-route-policy"],
|
||||
arg_group="Properties",
|
||||
help="Import Route Policy either IPv4 or IPv6.",
|
||||
)
|
||||
_args_schema.import_route_policy_id = AAZResourceIdArg(
|
||||
options=["--import-route-policy-id"],
|
||||
arg_group="Properties",
|
||||
help="ARM Resource ID of the RoutePolicy. This is used for the backward compatibility.",
|
||||
)
|
||||
_args_schema.ingress_acl_id = AAZResourceIdArg(
|
||||
options=["--ingress-acl-id"],
|
||||
arg_group="Properties",
|
||||
help="Ingress Acl ARM resource ID.",
|
||||
)
|
||||
_args_schema.is_monitoring_enabled = AAZStrArg(
|
||||
options=["--is-monitoring-enabled"],
|
||||
arg_group="Properties",
|
||||
help="To check whether monitoring of internal network is enabled or not. Default value is False. Example: False.",
|
||||
enum={"False": "False", "True": "True"},
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
_args_schema.mtu = AAZIntArg(
|
||||
options=["--mtu"],
|
||||
arg_group="Properties",
|
||||
help="Maximum transmission unit. The value should be between 64 to 9200. Default value is 1500. Example: 1500.",
|
||||
fmt=AAZIntArgFormat(
|
||||
maximum=9200,
|
||||
minimum=64,
|
||||
),
|
||||
)
|
||||
_args_schema.static_route_configuration = AAZObjectArg(
|
||||
options=["--static-route-configuration"],
|
||||
arg_group="Properties",
|
||||
help="Static Route Configuration properties.",
|
||||
)
|
||||
|
||||
bgp_configuration = cls._args_schema.bgp_configuration
|
||||
bgp_configuration.allow_as = AAZIntArg(
|
||||
options=["allow-as"],
|
||||
help="Allows for routes to be received and processed even if the router detects its own ASN in the AS-Path. 0 is disable, Possible values are 1-10, Default value is 2.",
|
||||
fmt=AAZIntArgFormat(
|
||||
maximum=10,
|
||||
minimum=0,
|
||||
),
|
||||
)
|
||||
bgp_configuration.allow_as_override = AAZStrArg(
|
||||
options=["allow-as-override"],
|
||||
help="Enable Or Disable state. Example: Enable",
|
||||
enum={"Disable": "Disable", "Enable": "Enable"},
|
||||
)
|
||||
bgp_configuration.annotation = AAZStrArg(
|
||||
options=["annotation"],
|
||||
help="Description for underlying resource.",
|
||||
)
|
||||
bgp_configuration.bfd_configuration = AAZObjectArg(
|
||||
options=["bfd-configuration"],
|
||||
help="BFD configuration properties.",
|
||||
)
|
||||
cls._build_args_bfd_configuration_update(bgp_configuration.bfd_configuration)
|
||||
bgp_configuration.default_route_originate = AAZStrArg(
|
||||
options=["default-route-originate"],
|
||||
help="Originate a defaultRoute. Example: True.",
|
||||
enum={"False": "False", "True": "True"},
|
||||
)
|
||||
bgp_configuration.ipv4_listen_range_prefixes = AAZListArg(
|
||||
options=["ipv4-listen-range-prefixes"],
|
||||
help="List of BGP IPv4 Listen Range prefixes.",
|
||||
)
|
||||
bgp_configuration.ipv4_neighbor_address = AAZListArg(
|
||||
options=["ipv4-neighbor-address"],
|
||||
help="List with stringified IPv4 Neighbor Addresses.",
|
||||
)
|
||||
bgp_configuration.ipv6_listen_range_prefixes = AAZListArg(
|
||||
options=["ipv6-listen-range-prefixes"],
|
||||
help="List of BGP IPv6 Listen Ranges prefixes.",
|
||||
)
|
||||
bgp_configuration.ipv6_neighbor_address = AAZListArg(
|
||||
options=["ipv6-neighbor-address"],
|
||||
help="List with stringified IPv6 Neighbor Address.",
|
||||
)
|
||||
bgp_configuration.peer_asn = AAZIntArg(
|
||||
options=["peer-asn"],
|
||||
help="Peer ASN. The value should be between 1 to 4294967295. Example: 65047.",
|
||||
fmt=AAZIntArgFormat(
|
||||
maximum=4294967295,
|
||||
minimum=1,
|
||||
),
|
||||
)
|
||||
|
||||
ipv4_listen_range_prefixes = cls._args_schema.bgp_configuration.ipv4_listen_range_prefixes
|
||||
ipv4_listen_range_prefixes.Element = AAZStrArg(
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
|
||||
ipv4_neighbor_address = cls._args_schema.bgp_configuration.ipv4_neighbor_address
|
||||
ipv4_neighbor_address.Element = AAZObjectArg()
|
||||
cls._build_args_neighbor_address_update(ipv4_neighbor_address.Element)
|
||||
|
||||
ipv6_listen_range_prefixes = cls._args_schema.bgp_configuration.ipv6_listen_range_prefixes
|
||||
ipv6_listen_range_prefixes.Element = AAZStrArg(
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
|
||||
ipv6_neighbor_address = cls._args_schema.bgp_configuration.ipv6_neighbor_address
|
||||
ipv6_neighbor_address.Element = AAZObjectArg()
|
||||
cls._build_args_neighbor_address_update(ipv6_neighbor_address.Element)
|
||||
|
||||
connected_ipv4_subnets = cls._args_schema.connected_ipv4_subnets
|
||||
connected_ipv4_subnets.Element = AAZObjectArg()
|
||||
cls._build_args_connected_subnet_update(connected_ipv4_subnets.Element)
|
||||
|
||||
connected_ipv6_subnets = cls._args_schema.connected_ipv6_subnets
|
||||
connected_ipv6_subnets.Element = AAZObjectArg()
|
||||
cls._build_args_connected_subnet_update(connected_ipv6_subnets.Element)
|
||||
|
||||
export_route_policy = cls._args_schema.export_route_policy
|
||||
export_route_policy.export_ipv4_route_policy_id = AAZResourceIdArg(
|
||||
options=["export-ipv4-route-policy-id"],
|
||||
help="ARM resource ID of RoutePolicy.",
|
||||
)
|
||||
export_route_policy.export_ipv6_route_policy_id = AAZResourceIdArg(
|
||||
options=["export-ipv6-route-policy-id"],
|
||||
help="ARM resource ID of RoutePolicy.",
|
||||
)
|
||||
|
||||
import_route_policy = cls._args_schema.import_route_policy
|
||||
import_route_policy.import_ipv4_route_policy_id = AAZResourceIdArg(
|
||||
options=["import-ipv4-route-policy-id"],
|
||||
help="ARM resource ID of RoutePolicy.",
|
||||
)
|
||||
import_route_policy.import_ipv6_route_policy_id = AAZResourceIdArg(
|
||||
options=["import-ipv6-route-policy-id"],
|
||||
help="ARM resource ID of RoutePolicy.",
|
||||
)
|
||||
|
||||
static_route_configuration = cls._args_schema.static_route_configuration
|
||||
static_route_configuration.bfd_configuration = AAZObjectArg(
|
||||
options=["bfd-configuration"],
|
||||
help="BFD configuration properties",
|
||||
)
|
||||
cls._build_args_bfd_configuration_update(static_route_configuration.bfd_configuration)
|
||||
static_route_configuration.ipv4_routes = AAZListArg(
|
||||
options=["ipv4-routes"],
|
||||
help="List of IPv4 Routes.",
|
||||
)
|
||||
static_route_configuration.ipv6_routes = AAZListArg(
|
||||
options=["ipv6-routes"],
|
||||
help="List of IPv6 Routes.",
|
||||
)
|
||||
|
||||
ipv4_routes = cls._args_schema.static_route_configuration.ipv4_routes
|
||||
ipv4_routes.Element = AAZObjectArg()
|
||||
cls._build_args_static_route_properties_update(ipv4_routes.Element)
|
||||
|
||||
ipv6_routes = cls._args_schema.static_route_configuration.ipv6_routes
|
||||
ipv6_routes.Element = AAZObjectArg()
|
||||
cls._build_args_static_route_properties_update(ipv6_routes.Element)
|
||||
return cls._args_schema
|
||||
|
||||
_args_bfd_configuration_update = None
|
||||
|
||||
@classmethod
|
||||
def _build_args_bfd_configuration_update(cls, _schema):
|
||||
if cls._args_bfd_configuration_update is not None:
|
||||
_schema.interval_in_milli_seconds = cls._args_bfd_configuration_update.interval_in_milli_seconds
|
||||
_schema.multiplier = cls._args_bfd_configuration_update.multiplier
|
||||
return
|
||||
|
||||
cls._args_bfd_configuration_update = AAZObjectArg()
|
||||
|
||||
bfd_configuration_update = cls._args_bfd_configuration_update
|
||||
bfd_configuration_update.interval_in_milli_seconds = AAZIntArg(
|
||||
options=["interval-in-milli-seconds"],
|
||||
help="Interval in milliseconds. Default value is 300. Example: 300.",
|
||||
)
|
||||
bfd_configuration_update.multiplier = AAZIntArg(
|
||||
options=["multiplier"],
|
||||
help="Multiplier for the Bfd Configuration. Default value is 5. Example: 5.",
|
||||
)
|
||||
|
||||
_schema.interval_in_milli_seconds = cls._args_bfd_configuration_update.interval_in_milli_seconds
|
||||
_schema.multiplier = cls._args_bfd_configuration_update.multiplier
|
||||
|
||||
_args_connected_subnet_update = None
|
||||
|
||||
@classmethod
|
||||
def _build_args_connected_subnet_update(cls, _schema):
|
||||
if cls._args_connected_subnet_update is not None:
|
||||
_schema.annotation = cls._args_connected_subnet_update.annotation
|
||||
_schema.prefix = cls._args_connected_subnet_update.prefix
|
||||
return
|
||||
|
||||
cls._args_connected_subnet_update = AAZObjectArg()
|
||||
|
||||
connected_subnet_update = cls._args_connected_subnet_update
|
||||
connected_subnet_update.annotation = AAZStrArg(
|
||||
options=["annotation"],
|
||||
help="Description for underlying resource.",
|
||||
)
|
||||
connected_subnet_update.prefix = AAZStrArg(
|
||||
options=["prefix"],
|
||||
help="Prefix of the Connected Subnet.",
|
||||
required=True,
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
|
||||
_schema.annotation = cls._args_connected_subnet_update.annotation
|
||||
_schema.prefix = cls._args_connected_subnet_update.prefix
|
||||
|
||||
_args_neighbor_address_update = None
|
||||
|
||||
@classmethod
|
||||
def _build_args_neighbor_address_update(cls, _schema):
|
||||
if cls._args_neighbor_address_update is not None:
|
||||
_schema.address = cls._args_neighbor_address_update.address
|
||||
return
|
||||
|
||||
cls._args_neighbor_address_update = AAZObjectArg()
|
||||
|
||||
neighbor_address_update = cls._args_neighbor_address_update
|
||||
neighbor_address_update.address = AAZStrArg(
|
||||
options=["address"],
|
||||
help="IP Address.",
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
|
||||
_schema.address = cls._args_neighbor_address_update.address
|
||||
|
||||
_args_static_route_properties_update = None
|
||||
|
||||
@classmethod
|
||||
def _build_args_static_route_properties_update(cls, _schema):
|
||||
if cls._args_static_route_properties_update is not None:
|
||||
_schema.next_hop = cls._args_static_route_properties_update.next_hop
|
||||
_schema.prefix = cls._args_static_route_properties_update.prefix
|
||||
return
|
||||
|
||||
cls._args_static_route_properties_update = AAZObjectArg()
|
||||
|
||||
static_route_properties_update = cls._args_static_route_properties_update
|
||||
static_route_properties_update.next_hop = AAZListArg(
|
||||
options=["next-hop"],
|
||||
help="List of next hop addresses.",
|
||||
required=True,
|
||||
)
|
||||
static_route_properties_update.prefix = AAZStrArg(
|
||||
options=["prefix"],
|
||||
help="Prefix of the route.",
|
||||
required=True,
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
|
||||
next_hop = cls._args_static_route_properties_update.next_hop
|
||||
next_hop.Element = AAZStrArg(
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
|
||||
_schema.next_hop = cls._args_static_route_properties_update.next_hop
|
||||
_schema.prefix = cls._args_static_route_properties_update.prefix
|
||||
|
||||
def _execute_operations(self):
|
||||
self.pre_operations()
|
||||
yield self.InternalNetworksUpdate(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 InternalNetworksUpdate(AAZHttpOperation):
|
||||
CLIENT_TYPE = "MgmtClient"
|
||||
|
||||
def __call__(self, *args, **kwargs):
|
||||
request = self.make_request()
|
||||
session = self.client.send_request(request=request, stream=False, **kwargs)
|
||||
if session.http_response.status_code in [202]:
|
||||
return self.client.build_lro_polling(
|
||||
self.ctx.args.no_wait,
|
||||
session,
|
||||
self.on_200,
|
||||
self.on_error,
|
||||
lro_options={"final-state-via": "location"},
|
||||
path_format_arguments=self.url_parameters,
|
||||
)
|
||||
if session.http_response.status_code in [200]:
|
||||
return self.client.build_lro_polling(
|
||||
self.ctx.args.no_wait,
|
||||
session,
|
||||
self.on_200,
|
||||
self.on_error,
|
||||
lro_options={"final-state-via": "location"},
|
||||
path_format_arguments=self.url_parameters,
|
||||
)
|
||||
|
||||
return self.on_error(session.http_response)
|
||||
|
||||
@property
|
||||
def url(self):
|
||||
return self.client.format_url(
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}",
|
||||
**self.url_parameters
|
||||
)
|
||||
|
||||
@property
|
||||
def method(self):
|
||||
return "PATCH"
|
||||
|
||||
@property
|
||||
def error_format(self):
|
||||
return "MgmtErrorFormat"
|
||||
|
||||
@property
|
||||
def url_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_url_param(
|
||||
"internalNetworkName", self.ctx.args.resource_name,
|
||||
required=True,
|
||||
),
|
||||
**self.serialize_url_param(
|
||||
"l3IsolationDomainName", self.ctx.args.l3_isolation_domain_name,
|
||||
required=True,
|
||||
),
|
||||
**self.serialize_url_param(
|
||||
"resourceGroupName", self.ctx.args.resource_group,
|
||||
required=True,
|
||||
),
|
||||
**self.serialize_url_param(
|
||||
"subscriptionId", self.ctx.subscription_id,
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
return parameters
|
||||
|
||||
@property
|
||||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
return parameters
|
||||
|
||||
@property
|
||||
def header_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_header_param(
|
||||
"Content-Type", "application/json",
|
||||
),
|
||||
**self.serialize_header_param(
|
||||
"Accept", "application/json",
|
||||
),
|
||||
}
|
||||
return parameters
|
||||
|
||||
@property
|
||||
def content(self):
|
||||
_content_value, _builder = self.new_content_builder(
|
||||
self.ctx.args,
|
||||
typ=AAZObjectType,
|
||||
typ_kwargs={"flags": {"required": True, "client_flatten": True}}
|
||||
)
|
||||
_builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
|
||||
|
||||
properties = _builder.get(".properties")
|
||||
if properties is not None:
|
||||
properties.set_prop("annotation", AAZStrType, ".annotation")
|
||||
properties.set_prop("bgpConfiguration", AAZObjectType, ".bgp_configuration")
|
||||
properties.set_prop("connectedIPv4Subnets", AAZListType, ".connected_ipv4_subnets")
|
||||
properties.set_prop("connectedIPv6Subnets", AAZListType, ".connected_ipv6_subnets")
|
||||
properties.set_prop("egressAclId", AAZStrType, ".egress_acl_id")
|
||||
properties.set_prop("exportRoutePolicy", AAZObjectType, ".export_route_policy")
|
||||
properties.set_prop("exportRoutePolicyId", AAZStrType, ".export_route_policy_id")
|
||||
properties.set_prop("importRoutePolicy", AAZObjectType, ".import_route_policy")
|
||||
properties.set_prop("importRoutePolicyId", AAZStrType, ".import_route_policy_id")
|
||||
properties.set_prop("ingressAclId", AAZStrType, ".ingress_acl_id")
|
||||
properties.set_prop("isMonitoringEnabled", AAZStrType, ".is_monitoring_enabled")
|
||||
properties.set_prop("mtu", AAZIntType, ".mtu")
|
||||
properties.set_prop("staticRouteConfiguration", AAZObjectType, ".static_route_configuration")
|
||||
|
||||
bgp_configuration = _builder.get(".properties.bgpConfiguration")
|
||||
if bgp_configuration is not None:
|
||||
bgp_configuration.set_prop("allowAS", AAZIntType, ".allow_as")
|
||||
bgp_configuration.set_prop("allowASOverride", AAZStrType, ".allow_as_override")
|
||||
bgp_configuration.set_prop("annotation", AAZStrType, ".annotation")
|
||||
_UpdateHelper._build_schema_bfd_configuration_update(bgp_configuration.set_prop("bfdConfiguration", AAZObjectType, ".bfd_configuration"))
|
||||
bgp_configuration.set_prop("defaultRouteOriginate", AAZStrType, ".default_route_originate")
|
||||
bgp_configuration.set_prop("ipv4ListenRangePrefixes", AAZListType, ".ipv4_listen_range_prefixes")
|
||||
bgp_configuration.set_prop("ipv4NeighborAddress", AAZListType, ".ipv4_neighbor_address")
|
||||
bgp_configuration.set_prop("ipv6ListenRangePrefixes", AAZListType, ".ipv6_listen_range_prefixes")
|
||||
bgp_configuration.set_prop("ipv6NeighborAddress", AAZListType, ".ipv6_neighbor_address")
|
||||
bgp_configuration.set_prop("peerASN", AAZIntType, ".peer_asn")
|
||||
|
||||
ipv4_listen_range_prefixes = _builder.get(".properties.bgpConfiguration.ipv4ListenRangePrefixes")
|
||||
if ipv4_listen_range_prefixes is not None:
|
||||
ipv4_listen_range_prefixes.set_elements(AAZStrType, ".")
|
||||
|
||||
ipv4_neighbor_address = _builder.get(".properties.bgpConfiguration.ipv4NeighborAddress")
|
||||
if ipv4_neighbor_address is not None:
|
||||
_UpdateHelper._build_schema_neighbor_address_update(ipv4_neighbor_address.set_elements(AAZObjectType, "."))
|
||||
|
||||
ipv6_listen_range_prefixes = _builder.get(".properties.bgpConfiguration.ipv6ListenRangePrefixes")
|
||||
if ipv6_listen_range_prefixes is not None:
|
||||
ipv6_listen_range_prefixes.set_elements(AAZStrType, ".")
|
||||
|
||||
ipv6_neighbor_address = _builder.get(".properties.bgpConfiguration.ipv6NeighborAddress")
|
||||
if ipv6_neighbor_address is not None:
|
||||
_UpdateHelper._build_schema_neighbor_address_update(ipv6_neighbor_address.set_elements(AAZObjectType, "."))
|
||||
|
||||
connected_i_pv4_subnets = _builder.get(".properties.connectedIPv4Subnets")
|
||||
if connected_i_pv4_subnets is not None:
|
||||
_UpdateHelper._build_schema_connected_subnet_update(connected_i_pv4_subnets.set_elements(AAZObjectType, "."))
|
||||
|
||||
connected_i_pv6_subnets = _builder.get(".properties.connectedIPv6Subnets")
|
||||
if connected_i_pv6_subnets is not None:
|
||||
_UpdateHelper._build_schema_connected_subnet_update(connected_i_pv6_subnets.set_elements(AAZObjectType, "."))
|
||||
|
||||
export_route_policy = _builder.get(".properties.exportRoutePolicy")
|
||||
if export_route_policy is not None:
|
||||
export_route_policy.set_prop("exportIpv4RoutePolicyId", AAZStrType, ".export_ipv4_route_policy_id")
|
||||
export_route_policy.set_prop("exportIpv6RoutePolicyId", AAZStrType, ".export_ipv6_route_policy_id")
|
||||
|
||||
import_route_policy = _builder.get(".properties.importRoutePolicy")
|
||||
if import_route_policy is not None:
|
||||
import_route_policy.set_prop("importIpv4RoutePolicyId", AAZStrType, ".import_ipv4_route_policy_id")
|
||||
import_route_policy.set_prop("importIpv6RoutePolicyId", AAZStrType, ".import_ipv6_route_policy_id")
|
||||
|
||||
static_route_configuration = _builder.get(".properties.staticRouteConfiguration")
|
||||
if static_route_configuration is not None:
|
||||
_UpdateHelper._build_schema_bfd_configuration_update(static_route_configuration.set_prop("bfdConfiguration", AAZObjectType, ".bfd_configuration"))
|
||||
static_route_configuration.set_prop("ipv4Routes", AAZListType, ".ipv4_routes")
|
||||
static_route_configuration.set_prop("ipv6Routes", AAZListType, ".ipv6_routes")
|
||||
|
||||
ipv4_routes = _builder.get(".properties.staticRouteConfiguration.ipv4Routes")
|
||||
if ipv4_routes is not None:
|
||||
_UpdateHelper._build_schema_static_route_properties_update(ipv4_routes.set_elements(AAZObjectType, "."))
|
||||
|
||||
ipv6_routes = _builder.get(".properties.staticRouteConfiguration.ipv6Routes")
|
||||
if ipv6_routes is not None:
|
||||
_UpdateHelper._build_schema_static_route_properties_update(ipv6_routes.set_elements(AAZObjectType, "."))
|
||||
|
||||
return self.serialize_content(_content_value)
|
||||
|
||||
def on_200(self, session):
|
||||
data = self.deserialize_http_content(session)
|
||||
self.ctx.set_var(
|
||||
"instance",
|
||||
data,
|
||||
schema_builder=self._build_schema_on_200
|
||||
)
|
||||
|
||||
_schema_on_200 = None
|
||||
|
||||
@classmethod
|
||||
def _build_schema_on_200(cls):
|
||||
if cls._schema_on_200 is not None:
|
||||
return cls._schema_on_200
|
||||
|
||||
cls._schema_on_200 = AAZObjectType()
|
||||
|
||||
_schema_on_200 = cls._schema_on_200
|
||||
_schema_on_200.id = AAZStrType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_schema_on_200.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.administrative_state = AAZStrType(
|
||||
serialized_name="administrativeState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.annotation = AAZStrType()
|
||||
properties.bgp_configuration = AAZObjectType(
|
||||
serialized_name="bgpConfiguration",
|
||||
)
|
||||
properties.configuration_state = AAZStrType(
|
||||
serialized_name="configurationState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.connected_i_pv4_subnets = AAZListType(
|
||||
serialized_name="connectedIPv4Subnets",
|
||||
)
|
||||
properties.connected_i_pv6_subnets = AAZListType(
|
||||
serialized_name="connectedIPv6Subnets",
|
||||
)
|
||||
properties.egress_acl_id = AAZStrType(
|
||||
serialized_name="egressAclId",
|
||||
)
|
||||
properties.export_route_policy = AAZObjectType(
|
||||
serialized_name="exportRoutePolicy",
|
||||
)
|
||||
properties.export_route_policy_id = AAZStrType(
|
||||
serialized_name="exportRoutePolicyId",
|
||||
)
|
||||
properties.extension = AAZStrType()
|
||||
properties.import_route_policy = AAZObjectType(
|
||||
serialized_name="importRoutePolicy",
|
||||
)
|
||||
properties.import_route_policy_id = AAZStrType(
|
||||
serialized_name="importRoutePolicyId",
|
||||
)
|
||||
properties.ingress_acl_id = AAZStrType(
|
||||
serialized_name="ingressAclId",
|
||||
)
|
||||
properties.is_monitoring_enabled = AAZStrType(
|
||||
serialized_name="isMonitoringEnabled",
|
||||
)
|
||||
properties.mtu = AAZIntType()
|
||||
properties.provisioning_state = AAZStrType(
|
||||
serialized_name="provisioningState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.static_route_configuration = AAZObjectType(
|
||||
serialized_name="staticRouteConfiguration",
|
||||
)
|
||||
properties.vlan_id = AAZIntType(
|
||||
serialized_name="vlanId",
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
bgp_configuration = cls._schema_on_200.properties.bgp_configuration
|
||||
bgp_configuration.allow_as = AAZIntType(
|
||||
serialized_name="allowAS",
|
||||
)
|
||||
bgp_configuration.allow_as_override = AAZStrType(
|
||||
serialized_name="allowASOverride",
|
||||
)
|
||||
bgp_configuration.annotation = AAZStrType()
|
||||
bgp_configuration.bfd_configuration = AAZObjectType(
|
||||
serialized_name="bfdConfiguration",
|
||||
)
|
||||
_UpdateHelper._build_schema_bfd_configuration_read(bgp_configuration.bfd_configuration)
|
||||
bgp_configuration.default_route_originate = AAZStrType(
|
||||
serialized_name="defaultRouteOriginate",
|
||||
)
|
||||
bgp_configuration.fabric_asn = AAZIntType(
|
||||
serialized_name="fabricASN",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
bgp_configuration.ipv4_listen_range_prefixes = AAZListType(
|
||||
serialized_name="ipv4ListenRangePrefixes",
|
||||
)
|
||||
bgp_configuration.ipv4_neighbor_address = AAZListType(
|
||||
serialized_name="ipv4NeighborAddress",
|
||||
)
|
||||
bgp_configuration.ipv6_listen_range_prefixes = AAZListType(
|
||||
serialized_name="ipv6ListenRangePrefixes",
|
||||
)
|
||||
bgp_configuration.ipv6_neighbor_address = AAZListType(
|
||||
serialized_name="ipv6NeighborAddress",
|
||||
)
|
||||
bgp_configuration.peer_asn = AAZIntType(
|
||||
serialized_name="peerASN",
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
ipv4_listen_range_prefixes = cls._schema_on_200.properties.bgp_configuration.ipv4_listen_range_prefixes
|
||||
ipv4_listen_range_prefixes.Element = AAZStrType()
|
||||
|
||||
ipv4_neighbor_address = cls._schema_on_200.properties.bgp_configuration.ipv4_neighbor_address
|
||||
ipv4_neighbor_address.Element = AAZObjectType()
|
||||
_UpdateHelper._build_schema_neighbor_address_read(ipv4_neighbor_address.Element)
|
||||
|
||||
ipv6_listen_range_prefixes = cls._schema_on_200.properties.bgp_configuration.ipv6_listen_range_prefixes
|
||||
ipv6_listen_range_prefixes.Element = AAZStrType()
|
||||
|
||||
ipv6_neighbor_address = cls._schema_on_200.properties.bgp_configuration.ipv6_neighbor_address
|
||||
ipv6_neighbor_address.Element = AAZObjectType()
|
||||
_UpdateHelper._build_schema_neighbor_address_read(ipv6_neighbor_address.Element)
|
||||
|
||||
connected_i_pv4_subnets = cls._schema_on_200.properties.connected_i_pv4_subnets
|
||||
connected_i_pv4_subnets.Element = AAZObjectType()
|
||||
_UpdateHelper._build_schema_connected_subnet_read(connected_i_pv4_subnets.Element)
|
||||
|
||||
connected_i_pv6_subnets = cls._schema_on_200.properties.connected_i_pv6_subnets
|
||||
connected_i_pv6_subnets.Element = AAZObjectType()
|
||||
_UpdateHelper._build_schema_connected_subnet_read(connected_i_pv6_subnets.Element)
|
||||
|
||||
export_route_policy = cls._schema_on_200.properties.export_route_policy
|
||||
export_route_policy.export_ipv4_route_policy_id = AAZStrType(
|
||||
serialized_name="exportIpv4RoutePolicyId",
|
||||
)
|
||||
export_route_policy.export_ipv6_route_policy_id = AAZStrType(
|
||||
serialized_name="exportIpv6RoutePolicyId",
|
||||
)
|
||||
|
||||
import_route_policy = cls._schema_on_200.properties.import_route_policy
|
||||
import_route_policy.import_ipv4_route_policy_id = AAZStrType(
|
||||
serialized_name="importIpv4RoutePolicyId",
|
||||
)
|
||||
import_route_policy.import_ipv6_route_policy_id = AAZStrType(
|
||||
serialized_name="importIpv6RoutePolicyId",
|
||||
)
|
||||
|
||||
static_route_configuration = cls._schema_on_200.properties.static_route_configuration
|
||||
static_route_configuration.bfd_configuration = AAZObjectType(
|
||||
serialized_name="bfdConfiguration",
|
||||
)
|
||||
_UpdateHelper._build_schema_bfd_configuration_read(static_route_configuration.bfd_configuration)
|
||||
static_route_configuration.extension = AAZStrType()
|
||||
static_route_configuration.ipv4_routes = AAZListType(
|
||||
serialized_name="ipv4Routes",
|
||||
)
|
||||
static_route_configuration.ipv6_routes = AAZListType(
|
||||
serialized_name="ipv6Routes",
|
||||
)
|
||||
|
||||
ipv4_routes = cls._schema_on_200.properties.static_route_configuration.ipv4_routes
|
||||
ipv4_routes.Element = AAZObjectType()
|
||||
_UpdateHelper._build_schema_static_route_properties_read(ipv4_routes.Element)
|
||||
|
||||
ipv6_routes = cls._schema_on_200.properties.static_route_configuration.ipv6_routes
|
||||
ipv6_routes.Element = AAZObjectType()
|
||||
_UpdateHelper._build_schema_static_route_properties_read(ipv6_routes.Element)
|
||||
|
||||
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 _UpdateHelper:
|
||||
"""Helper class for Update"""
|
||||
|
||||
@classmethod
|
||||
def _build_schema_bfd_configuration_update(cls, _builder):
|
||||
if _builder is None:
|
||||
return
|
||||
_builder.set_prop("intervalInMilliSeconds", AAZIntType, ".interval_in_milli_seconds")
|
||||
_builder.set_prop("multiplier", AAZIntType, ".multiplier")
|
||||
|
||||
@classmethod
|
||||
def _build_schema_connected_subnet_update(cls, _builder):
|
||||
if _builder is None:
|
||||
return
|
||||
_builder.set_prop("annotation", AAZStrType, ".annotation")
|
||||
_builder.set_prop("prefix", AAZStrType, ".prefix", typ_kwargs={"flags": {"required": True}})
|
||||
|
||||
@classmethod
|
||||
def _build_schema_neighbor_address_update(cls, _builder):
|
||||
if _builder is None:
|
||||
return
|
||||
_builder.set_prop("address", AAZStrType, ".address")
|
||||
|
||||
@classmethod
|
||||
def _build_schema_static_route_properties_update(cls, _builder):
|
||||
if _builder is None:
|
||||
return
|
||||
_builder.set_prop("nextHop", AAZListType, ".next_hop", typ_kwargs={"flags": {"required": True}})
|
||||
_builder.set_prop("prefix", AAZStrType, ".prefix", typ_kwargs={"flags": {"required": True}})
|
||||
|
||||
next_hop = _builder.get(".nextHop")
|
||||
if next_hop is not None:
|
||||
next_hop.set_elements(AAZStrType, ".")
|
||||
|
||||
_schema_bfd_configuration_read = None
|
||||
|
||||
@classmethod
|
||||
def _build_schema_bfd_configuration_read(cls, _schema):
|
||||
if cls._schema_bfd_configuration_read is not None:
|
||||
_schema.administrative_state = cls._schema_bfd_configuration_read.administrative_state
|
||||
_schema.interval_in_milli_seconds = cls._schema_bfd_configuration_read.interval_in_milli_seconds
|
||||
_schema.multiplier = cls._schema_bfd_configuration_read.multiplier
|
||||
return
|
||||
|
||||
cls._schema_bfd_configuration_read = _schema_bfd_configuration_read = AAZObjectType()
|
||||
|
||||
bfd_configuration_read = _schema_bfd_configuration_read
|
||||
bfd_configuration_read.administrative_state = AAZStrType(
|
||||
serialized_name="administrativeState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
bfd_configuration_read.interval_in_milli_seconds = AAZIntType(
|
||||
serialized_name="intervalInMilliSeconds",
|
||||
)
|
||||
bfd_configuration_read.multiplier = AAZIntType()
|
||||
|
||||
_schema.administrative_state = cls._schema_bfd_configuration_read.administrative_state
|
||||
_schema.interval_in_milli_seconds = cls._schema_bfd_configuration_read.interval_in_milli_seconds
|
||||
_schema.multiplier = cls._schema_bfd_configuration_read.multiplier
|
||||
|
||||
_schema_connected_subnet_read = None
|
||||
|
||||
@classmethod
|
||||
def _build_schema_connected_subnet_read(cls, _schema):
|
||||
if cls._schema_connected_subnet_read is not None:
|
||||
_schema.annotation = cls._schema_connected_subnet_read.annotation
|
||||
_schema.prefix = cls._schema_connected_subnet_read.prefix
|
||||
return
|
||||
|
||||
cls._schema_connected_subnet_read = _schema_connected_subnet_read = AAZObjectType()
|
||||
|
||||
connected_subnet_read = _schema_connected_subnet_read
|
||||
connected_subnet_read.annotation = AAZStrType()
|
||||
connected_subnet_read.prefix = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
_schema.annotation = cls._schema_connected_subnet_read.annotation
|
||||
_schema.prefix = cls._schema_connected_subnet_read.prefix
|
||||
|
||||
_schema_neighbor_address_read = None
|
||||
|
||||
@classmethod
|
||||
def _build_schema_neighbor_address_read(cls, _schema):
|
||||
if cls._schema_neighbor_address_read is not None:
|
||||
_schema.address = cls._schema_neighbor_address_read.address
|
||||
_schema.configuration_state = cls._schema_neighbor_address_read.configuration_state
|
||||
return
|
||||
|
||||
cls._schema_neighbor_address_read = _schema_neighbor_address_read = AAZObjectType()
|
||||
|
||||
neighbor_address_read = _schema_neighbor_address_read
|
||||
neighbor_address_read.address = AAZStrType()
|
||||
neighbor_address_read.configuration_state = AAZStrType(
|
||||
serialized_name="configurationState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
|
||||
_schema.address = cls._schema_neighbor_address_read.address
|
||||
_schema.configuration_state = cls._schema_neighbor_address_read.configuration_state
|
||||
|
||||
_schema_static_route_properties_read = None
|
||||
|
||||
@classmethod
|
||||
def _build_schema_static_route_properties_read(cls, _schema):
|
||||
if cls._schema_static_route_properties_read is not None:
|
||||
_schema.next_hop = cls._schema_static_route_properties_read.next_hop
|
||||
_schema.prefix = cls._schema_static_route_properties_read.prefix
|
||||
return
|
||||
|
||||
cls._schema_static_route_properties_read = _schema_static_route_properties_read = AAZObjectType()
|
||||
|
||||
static_route_properties_read = _schema_static_route_properties_read
|
||||
static_route_properties_read.next_hop = AAZListType(
|
||||
serialized_name="nextHop",
|
||||
flags={"required": True},
|
||||
)
|
||||
static_route_properties_read.prefix = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
next_hop = _schema_static_route_properties_read.next_hop
|
||||
next_hop.Element = AAZStrType()
|
||||
|
||||
_schema.next_hop = cls._schema_static_route_properties_read.next_hop
|
||||
_schema.prefix = cls._schema_static_route_properties_read.prefix
|
||||
|
||||
|
||||
__all__ = ["Update"]
|
|
@ -20,7 +20,7 @@ class Wait(AAZWaitCommand):
|
|||
|
||||
_aaz_info = {
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/l3isolationdomains/{}/internalnetworks/{}", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/l3isolationdomains/{}/internalnetworks/{}", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -42,13 +42,13 @@ class Wait(AAZWaitCommand):
|
|||
_args_schema = cls._args_schema
|
||||
_args_schema.resource_name = AAZStrArg(
|
||||
options=["--resource-name"],
|
||||
help="Name of the InternalNetwork",
|
||||
help="Name of the Internal Network.",
|
||||
required=True,
|
||||
id_part="child_name_1",
|
||||
)
|
||||
_args_schema.l3_isolation_domain_name = AAZStrArg(
|
||||
options=["--l3domain", "--l3-isolation-domain-name"],
|
||||
help="Name of the L3IsolationDomain",
|
||||
help="Name of the L3 Isolation Domain.",
|
||||
required=True,
|
||||
id_part="name",
|
||||
)
|
||||
|
@ -127,7 +127,7 @@ class Wait(AAZWaitCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
@ -183,19 +183,11 @@ class Wait(AAZWaitCommand):
|
|||
flags={"read_only": True},
|
||||
)
|
||||
properties.annotation = AAZStrType()
|
||||
properties.bfd_disabled_on_resources = AAZListType(
|
||||
serialized_name="bfdDisabledOnResources",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.bfd_for_static_routes_disabled_on_resources = AAZListType(
|
||||
serialized_name="bfdForStaticRoutesDisabledOnResources",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.bgp_configuration = AAZObjectType(
|
||||
serialized_name="bgpConfiguration",
|
||||
)
|
||||
properties.bgp_disabled_on_resources = AAZListType(
|
||||
serialized_name="bgpDisabledOnResources",
|
||||
properties.configuration_state = AAZStrType(
|
||||
serialized_name="configurationState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.connected_i_pv4_subnets = AAZListType(
|
||||
|
@ -204,16 +196,28 @@ class Wait(AAZWaitCommand):
|
|||
properties.connected_i_pv6_subnets = AAZListType(
|
||||
serialized_name="connectedIPv6Subnets",
|
||||
)
|
||||
properties.disabled_on_resources = AAZListType(
|
||||
serialized_name="disabledOnResources",
|
||||
flags={"read_only": True},
|
||||
properties.egress_acl_id = AAZStrType(
|
||||
serialized_name="egressAclId",
|
||||
)
|
||||
properties.export_route_policy = AAZObjectType(
|
||||
serialized_name="exportRoutePolicy",
|
||||
)
|
||||
properties.export_route_policy_id = AAZStrType(
|
||||
serialized_name="exportRoutePolicyId",
|
||||
)
|
||||
properties.extension = AAZStrType()
|
||||
properties.import_route_policy = AAZObjectType(
|
||||
serialized_name="importRoutePolicy",
|
||||
)
|
||||
properties.import_route_policy_id = AAZStrType(
|
||||
serialized_name="importRoutePolicyId",
|
||||
)
|
||||
properties.ingress_acl_id = AAZStrType(
|
||||
serialized_name="ingressAclId",
|
||||
)
|
||||
properties.is_monitoring_enabled = AAZStrType(
|
||||
serialized_name="isMonitoringEnabled",
|
||||
)
|
||||
properties.mtu = AAZIntType()
|
||||
properties.provisioning_state = AAZStrType(
|
||||
serialized_name="provisioningState",
|
||||
|
@ -227,12 +231,6 @@ class Wait(AAZWaitCommand):
|
|||
flags={"required": True},
|
||||
)
|
||||
|
||||
bfd_disabled_on_resources = cls._schema_on_200.properties.bfd_disabled_on_resources
|
||||
bfd_disabled_on_resources.Element = AAZStrType()
|
||||
|
||||
bfd_for_static_routes_disabled_on_resources = cls._schema_on_200.properties.bfd_for_static_routes_disabled_on_resources
|
||||
bfd_for_static_routes_disabled_on_resources.Element = AAZStrType()
|
||||
|
||||
bgp_configuration = cls._schema_on_200.properties.bgp_configuration
|
||||
bgp_configuration.allow_as = AAZIntType(
|
||||
serialized_name="allowAS",
|
||||
|
@ -274,52 +272,45 @@ class Wait(AAZWaitCommand):
|
|||
|
||||
ipv4_neighbor_address = cls._schema_on_200.properties.bgp_configuration.ipv4_neighbor_address
|
||||
ipv4_neighbor_address.Element = AAZObjectType()
|
||||
|
||||
_element = cls._schema_on_200.properties.bgp_configuration.ipv4_neighbor_address.Element
|
||||
_element.address = AAZStrType()
|
||||
_element.operational_state = AAZStrType(
|
||||
serialized_name="operationalState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_WaitHelper._build_schema_neighbor_address_read(ipv4_neighbor_address.Element)
|
||||
|
||||
ipv6_listen_range_prefixes = cls._schema_on_200.properties.bgp_configuration.ipv6_listen_range_prefixes
|
||||
ipv6_listen_range_prefixes.Element = AAZStrType()
|
||||
|
||||
ipv6_neighbor_address = cls._schema_on_200.properties.bgp_configuration.ipv6_neighbor_address
|
||||
ipv6_neighbor_address.Element = AAZObjectType()
|
||||
|
||||
_element = cls._schema_on_200.properties.bgp_configuration.ipv6_neighbor_address.Element
|
||||
_element.address = AAZStrType()
|
||||
_element.operational_state = AAZStrType(
|
||||
serialized_name="operationalState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
|
||||
bgp_disabled_on_resources = cls._schema_on_200.properties.bgp_disabled_on_resources
|
||||
bgp_disabled_on_resources.Element = AAZStrType()
|
||||
_WaitHelper._build_schema_neighbor_address_read(ipv6_neighbor_address.Element)
|
||||
|
||||
connected_i_pv4_subnets = cls._schema_on_200.properties.connected_i_pv4_subnets
|
||||
connected_i_pv4_subnets.Element = AAZObjectType()
|
||||
|
||||
_element = cls._schema_on_200.properties.connected_i_pv4_subnets.Element
|
||||
_element.annotation = AAZStrType()
|
||||
_element.prefix = AAZStrType()
|
||||
_WaitHelper._build_schema_connected_subnet_read(connected_i_pv4_subnets.Element)
|
||||
|
||||
connected_i_pv6_subnets = cls._schema_on_200.properties.connected_i_pv6_subnets
|
||||
connected_i_pv6_subnets.Element = AAZObjectType()
|
||||
_WaitHelper._build_schema_connected_subnet_read(connected_i_pv6_subnets.Element)
|
||||
|
||||
_element = cls._schema_on_200.properties.connected_i_pv6_subnets.Element
|
||||
_element.annotation = AAZStrType()
|
||||
_element.prefix = AAZStrType()
|
||||
export_route_policy = cls._schema_on_200.properties.export_route_policy
|
||||
export_route_policy.export_ipv4_route_policy_id = AAZStrType(
|
||||
serialized_name="exportIpv4RoutePolicyId",
|
||||
)
|
||||
export_route_policy.export_ipv6_route_policy_id = AAZStrType(
|
||||
serialized_name="exportIpv6RoutePolicyId",
|
||||
)
|
||||
|
||||
disabled_on_resources = cls._schema_on_200.properties.disabled_on_resources
|
||||
disabled_on_resources.Element = AAZStrType()
|
||||
import_route_policy = cls._schema_on_200.properties.import_route_policy
|
||||
import_route_policy.import_ipv4_route_policy_id = AAZStrType(
|
||||
serialized_name="importIpv4RoutePolicyId",
|
||||
)
|
||||
import_route_policy.import_ipv6_route_policy_id = AAZStrType(
|
||||
serialized_name="importIpv6RoutePolicyId",
|
||||
)
|
||||
|
||||
static_route_configuration = cls._schema_on_200.properties.static_route_configuration
|
||||
static_route_configuration.bfd_configuration = AAZObjectType(
|
||||
serialized_name="bfdConfiguration",
|
||||
)
|
||||
_WaitHelper._build_schema_bfd_configuration_read(static_route_configuration.bfd_configuration)
|
||||
static_route_configuration.extension = AAZStrType()
|
||||
static_route_configuration.ipv4_routes = AAZListType(
|
||||
serialized_name="ipv4Routes",
|
||||
)
|
||||
|
@ -329,33 +320,11 @@ class Wait(AAZWaitCommand):
|
|||
|
||||
ipv4_routes = cls._schema_on_200.properties.static_route_configuration.ipv4_routes
|
||||
ipv4_routes.Element = AAZObjectType()
|
||||
|
||||
_element = cls._schema_on_200.properties.static_route_configuration.ipv4_routes.Element
|
||||
_element.next_hop = AAZListType(
|
||||
serialized_name="nextHop",
|
||||
flags={"required": True},
|
||||
)
|
||||
_element.prefix = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
next_hop = cls._schema_on_200.properties.static_route_configuration.ipv4_routes.Element.next_hop
|
||||
next_hop.Element = AAZStrType()
|
||||
_WaitHelper._build_schema_static_route_properties_read(ipv4_routes.Element)
|
||||
|
||||
ipv6_routes = cls._schema_on_200.properties.static_route_configuration.ipv6_routes
|
||||
ipv6_routes.Element = AAZObjectType()
|
||||
|
||||
_element = cls._schema_on_200.properties.static_route_configuration.ipv6_routes.Element
|
||||
_element.next_hop = AAZListType(
|
||||
serialized_name="nextHop",
|
||||
flags={"required": True},
|
||||
)
|
||||
_element.prefix = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
next_hop = cls._schema_on_200.properties.static_route_configuration.ipv6_routes.Element.next_hop
|
||||
next_hop.Element = AAZStrType()
|
||||
_WaitHelper._build_schema_static_route_properties_read(ipv6_routes.Element)
|
||||
|
||||
system_data = cls._schema_on_200.system_data
|
||||
system_data.created_at = AAZStrType(
|
||||
|
@ -389,7 +358,7 @@ class _WaitHelper:
|
|||
def _build_schema_bfd_configuration_read(cls, _schema):
|
||||
if cls._schema_bfd_configuration_read is not None:
|
||||
_schema.administrative_state = cls._schema_bfd_configuration_read.administrative_state
|
||||
_schema.interval = cls._schema_bfd_configuration_read.interval
|
||||
_schema.interval_in_milli_seconds = cls._schema_bfd_configuration_read.interval_in_milli_seconds
|
||||
_schema.multiplier = cls._schema_bfd_configuration_read.multiplier
|
||||
return
|
||||
|
||||
|
@ -400,16 +369,81 @@ class _WaitHelper:
|
|||
serialized_name="administrativeState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
bfd_configuration_read.interval = AAZIntType(
|
||||
flags={"read_only": True},
|
||||
bfd_configuration_read.interval_in_milli_seconds = AAZIntType(
|
||||
serialized_name="intervalInMilliSeconds",
|
||||
)
|
||||
bfd_configuration_read.multiplier = AAZIntType(
|
||||
bfd_configuration_read.multiplier = AAZIntType()
|
||||
|
||||
_schema.administrative_state = cls._schema_bfd_configuration_read.administrative_state
|
||||
_schema.interval_in_milli_seconds = cls._schema_bfd_configuration_read.interval_in_milli_seconds
|
||||
_schema.multiplier = cls._schema_bfd_configuration_read.multiplier
|
||||
|
||||
_schema_connected_subnet_read = None
|
||||
|
||||
@classmethod
|
||||
def _build_schema_connected_subnet_read(cls, _schema):
|
||||
if cls._schema_connected_subnet_read is not None:
|
||||
_schema.annotation = cls._schema_connected_subnet_read.annotation
|
||||
_schema.prefix = cls._schema_connected_subnet_read.prefix
|
||||
return
|
||||
|
||||
cls._schema_connected_subnet_read = _schema_connected_subnet_read = AAZObjectType()
|
||||
|
||||
connected_subnet_read = _schema_connected_subnet_read
|
||||
connected_subnet_read.annotation = AAZStrType()
|
||||
connected_subnet_read.prefix = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
_schema.annotation = cls._schema_connected_subnet_read.annotation
|
||||
_schema.prefix = cls._schema_connected_subnet_read.prefix
|
||||
|
||||
_schema_neighbor_address_read = None
|
||||
|
||||
@classmethod
|
||||
def _build_schema_neighbor_address_read(cls, _schema):
|
||||
if cls._schema_neighbor_address_read is not None:
|
||||
_schema.address = cls._schema_neighbor_address_read.address
|
||||
_schema.configuration_state = cls._schema_neighbor_address_read.configuration_state
|
||||
return
|
||||
|
||||
cls._schema_neighbor_address_read = _schema_neighbor_address_read = AAZObjectType()
|
||||
|
||||
neighbor_address_read = _schema_neighbor_address_read
|
||||
neighbor_address_read.address = AAZStrType()
|
||||
neighbor_address_read.configuration_state = AAZStrType(
|
||||
serialized_name="configurationState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
|
||||
_schema.administrative_state = cls._schema_bfd_configuration_read.administrative_state
|
||||
_schema.interval = cls._schema_bfd_configuration_read.interval
|
||||
_schema.multiplier = cls._schema_bfd_configuration_read.multiplier
|
||||
_schema.address = cls._schema_neighbor_address_read.address
|
||||
_schema.configuration_state = cls._schema_neighbor_address_read.configuration_state
|
||||
|
||||
_schema_static_route_properties_read = None
|
||||
|
||||
@classmethod
|
||||
def _build_schema_static_route_properties_read(cls, _schema):
|
||||
if cls._schema_static_route_properties_read is not None:
|
||||
_schema.next_hop = cls._schema_static_route_properties_read.next_hop
|
||||
_schema.prefix = cls._schema_static_route_properties_read.prefix
|
||||
return
|
||||
|
||||
cls._schema_static_route_properties_read = _schema_static_route_properties_read = AAZObjectType()
|
||||
|
||||
static_route_properties_read = _schema_static_route_properties_read
|
||||
static_route_properties_read.next_hop = AAZListType(
|
||||
serialized_name="nextHop",
|
||||
flags={"required": True},
|
||||
)
|
||||
static_route_properties_read.prefix = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
next_hop = _schema_static_route_properties_read.next_hop
|
||||
next_hop.Element = AAZStrType()
|
||||
|
||||
_schema.next_hop = cls._schema_static_route_properties_read.next_hop
|
||||
_schema.prefix = cls._schema_static_route_properties_read.prefix
|
||||
|
||||
|
||||
__all__ = ["Wait"]
|
||||
|
|
|
@ -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 internetgateway",
|
||||
)
|
||||
class __CMDGroup(AAZCommandGroup):
|
||||
"""Manage Internet Gateway Resource
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
__all__ = ["__CMDGroup"]
|
|
@ -0,0 +1,15 @@
|
|||
# --------------------------------------------------------------------------------------------
|
||||
# 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 ._update import *
|
||||
from ._wait import *
|
|
@ -0,0 +1,391 @@
|
|||
# --------------------------------------------------------------------------------------------
|
||||
# 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 internetgateway list",
|
||||
)
|
||||
class List(AAZCommand):
|
||||
"""List all Internet Gateways in the provided resource group or subscription
|
||||
|
||||
:example: List the Internet Gateway for Resource group
|
||||
az networkfabric internetgateway list --resource-group "example-rg"
|
||||
|
||||
:example: List the Internet Gateway for Subscription.
|
||||
az networkfabric internetgateway list --subscription "<subscriptionId>"
|
||||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/providers/microsoft.managednetworkfabric/internetgateways", "2023-06-15"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/internetgateways", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
def _handler(self, command_args):
|
||||
super()._handler(command_args)
|
||||
return self.build_paging(self._execute_operations, self._output)
|
||||
|
||||
_args_schema = None
|
||||
|
||||
@classmethod
|
||||
def _build_arguments_schema(cls, *args, **kwargs):
|
||||
if cls._args_schema is not None:
|
||||
return cls._args_schema
|
||||
cls._args_schema = super()._build_arguments_schema(*args, **kwargs)
|
||||
|
||||
# define Arg Group ""
|
||||
|
||||
_args_schema = cls._args_schema
|
||||
_args_schema.resource_group = AAZResourceGroupNameArg(
|
||||
help="Name of the resource group",
|
||||
)
|
||||
return cls._args_schema
|
||||
|
||||
def _execute_operations(self):
|
||||
self.pre_operations()
|
||||
condition_0 = has_value(self.ctx.args.resource_group) and has_value(self.ctx.subscription_id)
|
||||
condition_1 = has_value(self.ctx.subscription_id) and has_value(self.ctx.args.resource_group) is not True
|
||||
if condition_0:
|
||||
self.InternetGatewaysListByResourceGroup(ctx=self.ctx)()
|
||||
if condition_1:
|
||||
self.InternetGatewaysListBySubscription(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=False)
|
||||
next_link = self.deserialize_output(self.ctx.vars.instance.next_link)
|
||||
return result, next_link
|
||||
|
||||
class InternetGatewaysListByResourceGroup(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/internetGateways",
|
||||
**self.url_parameters
|
||||
)
|
||||
|
||||
@property
|
||||
def method(self):
|
||||
return "GET"
|
||||
|
||||
@property
|
||||
def error_format(self):
|
||||
return "MgmtErrorFormat"
|
||||
|
||||
@property
|
||||
def url_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_url_param(
|
||||
"resourceGroupName", self.ctx.args.resource_group,
|
||||
required=True,
|
||||
),
|
||||
**self.serialize_url_param(
|
||||
"subscriptionId", self.ctx.subscription_id,
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
return parameters
|
||||
|
||||
@property
|
||||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-06-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()
|
||||
|
||||
value = cls._schema_on_200.value
|
||||
value.Element = AAZObjectType()
|
||||
|
||||
_element = cls._schema_on_200.value.Element
|
||||
_element.id = AAZStrType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_element.location = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
_element.name = AAZStrType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_element.properties = AAZObjectType(
|
||||
flags={"required": True, "client_flatten": True},
|
||||
)
|
||||
_element.system_data = AAZObjectType(
|
||||
serialized_name="systemData",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_element.tags = AAZDictType()
|
||||
_element.type = AAZStrType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
|
||||
properties = cls._schema_on_200.value.Element.properties
|
||||
properties.annotation = AAZStrType()
|
||||
properties.internet_gateway_rule_id = AAZStrType(
|
||||
serialized_name="internetGatewayRuleId",
|
||||
)
|
||||
properties.ipv4_address = AAZStrType(
|
||||
serialized_name="ipv4Address",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.network_fabric_controller_id = AAZStrType(
|
||||
serialized_name="networkFabricControllerId",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.port = AAZIntType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.provisioning_state = AAZStrType(
|
||||
serialized_name="provisioningState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.type = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
system_data = cls._schema_on_200.value.Element.system_data
|
||||
system_data.created_at = AAZStrType(
|
||||
serialized_name="createdAt",
|
||||
)
|
||||
system_data.created_by = AAZStrType(
|
||||
serialized_name="createdBy",
|
||||
)
|
||||
system_data.created_by_type = AAZStrType(
|
||||
serialized_name="createdByType",
|
||||
)
|
||||
system_data.last_modified_at = AAZStrType(
|
||||
serialized_name="lastModifiedAt",
|
||||
)
|
||||
system_data.last_modified_by = AAZStrType(
|
||||
serialized_name="lastModifiedBy",
|
||||
)
|
||||
system_data.last_modified_by_type = AAZStrType(
|
||||
serialized_name="lastModifiedByType",
|
||||
)
|
||||
|
||||
tags = cls._schema_on_200.value.Element.tags
|
||||
tags.Element = AAZStrType()
|
||||
|
||||
return cls._schema_on_200
|
||||
|
||||
class InternetGatewaysListBySubscription(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/internetGateways",
|
||||
**self.url_parameters
|
||||
)
|
||||
|
||||
@property
|
||||
def method(self):
|
||||
return "GET"
|
||||
|
||||
@property
|
||||
def error_format(self):
|
||||
return "MgmtErrorFormat"
|
||||
|
||||
@property
|
||||
def url_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_url_param(
|
||||
"subscriptionId", self.ctx.subscription_id,
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
return parameters
|
||||
|
||||
@property
|
||||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-06-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()
|
||||
|
||||
value = cls._schema_on_200.value
|
||||
value.Element = AAZObjectType()
|
||||
|
||||
_element = cls._schema_on_200.value.Element
|
||||
_element.id = AAZStrType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_element.location = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
_element.name = AAZStrType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_element.properties = AAZObjectType(
|
||||
flags={"required": True, "client_flatten": True},
|
||||
)
|
||||
_element.system_data = AAZObjectType(
|
||||
serialized_name="systemData",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_element.tags = AAZDictType()
|
||||
_element.type = AAZStrType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
|
||||
properties = cls._schema_on_200.value.Element.properties
|
||||
properties.annotation = AAZStrType()
|
||||
properties.internet_gateway_rule_id = AAZStrType(
|
||||
serialized_name="internetGatewayRuleId",
|
||||
)
|
||||
properties.ipv4_address = AAZStrType(
|
||||
serialized_name="ipv4Address",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.network_fabric_controller_id = AAZStrType(
|
||||
serialized_name="networkFabricControllerId",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.port = AAZIntType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.provisioning_state = AAZStrType(
|
||||
serialized_name="provisioningState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.type = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
system_data = cls._schema_on_200.value.Element.system_data
|
||||
system_data.created_at = AAZStrType(
|
||||
serialized_name="createdAt",
|
||||
)
|
||||
system_data.created_by = AAZStrType(
|
||||
serialized_name="createdBy",
|
||||
)
|
||||
system_data.created_by_type = AAZStrType(
|
||||
serialized_name="createdByType",
|
||||
)
|
||||
system_data.last_modified_at = AAZStrType(
|
||||
serialized_name="lastModifiedAt",
|
||||
)
|
||||
system_data.last_modified_by = AAZStrType(
|
||||
serialized_name="lastModifiedBy",
|
||||
)
|
||||
system_data.last_modified_by_type = AAZStrType(
|
||||
serialized_name="lastModifiedByType",
|
||||
)
|
||||
|
||||
tags = cls._schema_on_200.value.Element.tags
|
||||
tags.Element = AAZStrType()
|
||||
|
||||
return cls._schema_on_200
|
||||
|
||||
|
||||
class _ListHelper:
|
||||
"""Helper class for List"""
|
||||
|
||||
|
||||
__all__ = ["List"]
|
|
@ -0,0 +1,232 @@
|
|||
# --------------------------------------------------------------------------------------------
|
||||
# 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 internetgateway show",
|
||||
)
|
||||
class Show(AAZCommand):
|
||||
"""Show details of the provided Internet Gateway resource
|
||||
|
||||
:example: Show the Internet Gateway
|
||||
az networkfabric internetgateway show --resource-group "example-rg" --resource-name "example-internetgateway"
|
||||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/internetgateways/{}", "2023-06-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 Internet Gateway.",
|
||||
required=True,
|
||||
id_part="name",
|
||||
)
|
||||
_args_schema.resource_group = AAZResourceGroupNameArg(
|
||||
help="Name of the resource group",
|
||||
required=True,
|
||||
)
|
||||
return cls._args_schema
|
||||
|
||||
def _execute_operations(self):
|
||||
self.pre_operations()
|
||||
self.InternetGatewaysGet(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 InternetGatewaysGet(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/internetGateways/{internetGatewayName}",
|
||||
**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(
|
||||
"internetGatewayName", self.ctx.args.resource_name,
|
||||
required=True,
|
||||
),
|
||||
**self.serialize_url_param(
|
||||
"resourceGroupName", self.ctx.args.resource_group,
|
||||
required=True,
|
||||
),
|
||||
**self.serialize_url_param(
|
||||
"subscriptionId", self.ctx.subscription_id,
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
return parameters
|
||||
|
||||
@property
|
||||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-06-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.location = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
_schema_on_200.name = AAZStrType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_schema_on_200.properties = AAZObjectType(
|
||||
flags={"required": True, "client_flatten": True},
|
||||
)
|
||||
_schema_on_200.system_data = AAZObjectType(
|
||||
serialized_name="systemData",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_schema_on_200.tags = AAZDictType()
|
||||
_schema_on_200.type = AAZStrType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
|
||||
properties = cls._schema_on_200.properties
|
||||
properties.annotation = AAZStrType()
|
||||
properties.internet_gateway_rule_id = AAZStrType(
|
||||
serialized_name="internetGatewayRuleId",
|
||||
)
|
||||
properties.ipv4_address = AAZStrType(
|
||||
serialized_name="ipv4Address",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.network_fabric_controller_id = AAZStrType(
|
||||
serialized_name="networkFabricControllerId",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.port = AAZIntType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.provisioning_state = AAZStrType(
|
||||
serialized_name="provisioningState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.type = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
system_data = cls._schema_on_200.system_data
|
||||
system_data.created_at = AAZStrType(
|
||||
serialized_name="createdAt",
|
||||
)
|
||||
system_data.created_by = AAZStrType(
|
||||
serialized_name="createdBy",
|
||||
)
|
||||
system_data.created_by_type = AAZStrType(
|
||||
serialized_name="createdByType",
|
||||
)
|
||||
system_data.last_modified_at = AAZStrType(
|
||||
serialized_name="lastModifiedAt",
|
||||
)
|
||||
system_data.last_modified_by = AAZStrType(
|
||||
serialized_name="lastModifiedBy",
|
||||
)
|
||||
system_data.last_modified_by_type = AAZStrType(
|
||||
serialized_name="lastModifiedByType",
|
||||
)
|
||||
|
||||
tags = cls._schema_on_200.tags
|
||||
tags.Element = AAZStrType()
|
||||
|
||||
return cls._schema_on_200
|
||||
|
||||
|
||||
class _ShowHelper:
|
||||
"""Helper class for Show"""
|
||||
|
||||
|
||||
__all__ = ["Show"]
|
|
@ -0,0 +1,293 @@
|
|||
# --------------------------------------------------------------------------------------------
|
||||
# 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 internetgateway update",
|
||||
)
|
||||
class Update(AAZCommand):
|
||||
"""Update the Internet Gateway resource.
|
||||
|
||||
:example: Update the Internet Gateway
|
||||
az networkfabric internetgateway update --resource-group "example-rg" --resource-name "example-internetgateway" --internet-gateway-rule-id "/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/example-internetGatewayRule"
|
||||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/internetgateways/{}", "2023-06-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 Internet Gateway.",
|
||||
required=True,
|
||||
id_part="name",
|
||||
)
|
||||
_args_schema.resource_group = AAZResourceGroupNameArg(
|
||||
help="Name of the resource group",
|
||||
required=True,
|
||||
)
|
||||
|
||||
# define Arg Group "Body"
|
||||
|
||||
_args_schema = cls._args_schema
|
||||
_args_schema.tags = AAZDictArg(
|
||||
options=["--tags"],
|
||||
arg_group="Body",
|
||||
help="Resource tags",
|
||||
)
|
||||
|
||||
tags = cls._args_schema.tags
|
||||
tags.Element = AAZStrArg()
|
||||
|
||||
# define Arg Group "Properties"
|
||||
|
||||
_args_schema = cls._args_schema
|
||||
_args_schema.internet_gateway_rule_id = AAZResourceIdArg(
|
||||
options=["--internet-gateway-rule-id"],
|
||||
arg_group="Properties",
|
||||
help="ARM Resource ID of the Internet Gateway Rule.",
|
||||
)
|
||||
return cls._args_schema
|
||||
|
||||
def _execute_operations(self):
|
||||
self.pre_operations()
|
||||
yield self.InternetGatewaysUpdate(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 InternetGatewaysUpdate(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/internetGateways/{internetGatewayName}",
|
||||
**self.url_parameters
|
||||
)
|
||||
|
||||
@property
|
||||
def method(self):
|
||||
return "PATCH"
|
||||
|
||||
@property
|
||||
def error_format(self):
|
||||
return "MgmtErrorFormat"
|
||||
|
||||
@property
|
||||
def url_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_url_param(
|
||||
"internetGatewayName", self.ctx.args.resource_name,
|
||||
required=True,
|
||||
),
|
||||
**self.serialize_url_param(
|
||||
"resourceGroupName", self.ctx.args.resource_group,
|
||||
required=True,
|
||||
),
|
||||
**self.serialize_url_param(
|
||||
"subscriptionId", self.ctx.subscription_id,
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
return parameters
|
||||
|
||||
@property
|
||||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
return parameters
|
||||
|
||||
@property
|
||||
def header_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_header_param(
|
||||
"Content-Type", "application/json",
|
||||
),
|
||||
**self.serialize_header_param(
|
||||
"Accept", "application/json",
|
||||
),
|
||||
}
|
||||
return parameters
|
||||
|
||||
@property
|
||||
def content(self):
|
||||
_content_value, _builder = self.new_content_builder(
|
||||
self.ctx.args,
|
||||
typ=AAZObjectType,
|
||||
typ_kwargs={"flags": {"required": True, "client_flatten": True}}
|
||||
)
|
||||
_builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
|
||||
_builder.set_prop("tags", AAZDictType, ".tags")
|
||||
|
||||
properties = _builder.get(".properties")
|
||||
if properties is not None:
|
||||
properties.set_prop("internetGatewayRuleId", AAZStrType, ".internet_gateway_rule_id")
|
||||
|
||||
tags = _builder.get(".tags")
|
||||
if tags is not None:
|
||||
tags.set_elements(AAZStrType, ".")
|
||||
|
||||
return self.serialize_content(_content_value)
|
||||
|
||||
def on_200(self, session):
|
||||
data = self.deserialize_http_content(session)
|
||||
self.ctx.set_var(
|
||||
"instance",
|
||||
data,
|
||||
schema_builder=self._build_schema_on_200
|
||||
)
|
||||
|
||||
_schema_on_200 = None
|
||||
|
||||
@classmethod
|
||||
def _build_schema_on_200(cls):
|
||||
if cls._schema_on_200 is not None:
|
||||
return cls._schema_on_200
|
||||
|
||||
cls._schema_on_200 = AAZObjectType()
|
||||
|
||||
_schema_on_200 = cls._schema_on_200
|
||||
_schema_on_200.id = AAZStrType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_schema_on_200.location = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
_schema_on_200.name = AAZStrType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_schema_on_200.properties = AAZObjectType(
|
||||
flags={"required": True, "client_flatten": True},
|
||||
)
|
||||
_schema_on_200.system_data = AAZObjectType(
|
||||
serialized_name="systemData",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_schema_on_200.tags = AAZDictType()
|
||||
_schema_on_200.type = AAZStrType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
|
||||
properties = cls._schema_on_200.properties
|
||||
properties.annotation = AAZStrType()
|
||||
properties.internet_gateway_rule_id = AAZStrType(
|
||||
serialized_name="internetGatewayRuleId",
|
||||
)
|
||||
properties.ipv4_address = AAZStrType(
|
||||
serialized_name="ipv4Address",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.network_fabric_controller_id = AAZStrType(
|
||||
serialized_name="networkFabricControllerId",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.port = AAZIntType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.provisioning_state = AAZStrType(
|
||||
serialized_name="provisioningState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.type = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
system_data = cls._schema_on_200.system_data
|
||||
system_data.created_at = AAZStrType(
|
||||
serialized_name="createdAt",
|
||||
)
|
||||
system_data.created_by = AAZStrType(
|
||||
serialized_name="createdBy",
|
||||
)
|
||||
system_data.created_by_type = AAZStrType(
|
||||
serialized_name="createdByType",
|
||||
)
|
||||
system_data.last_modified_at = AAZStrType(
|
||||
serialized_name="lastModifiedAt",
|
||||
)
|
||||
system_data.last_modified_by = AAZStrType(
|
||||
serialized_name="lastModifiedBy",
|
||||
)
|
||||
system_data.last_modified_by_type = AAZStrType(
|
||||
serialized_name="lastModifiedByType",
|
||||
)
|
||||
|
||||
tags = cls._schema_on_200.tags
|
||||
tags.Element = AAZStrType()
|
||||
|
||||
return cls._schema_on_200
|
||||
|
||||
|
||||
class _UpdateHelper:
|
||||
"""Helper class for Update"""
|
||||
|
||||
|
||||
__all__ = ["Update"]
|
|
@ -0,0 +1,228 @@
|
|||
# --------------------------------------------------------------------------------------------
|
||||
# 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 internetgateway 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/internetgateways/{}", "2023-06-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 Internet Gateway.",
|
||||
required=True,
|
||||
id_part="name",
|
||||
)
|
||||
_args_schema.resource_group = AAZResourceGroupNameArg(
|
||||
help="Name of the resource group",
|
||||
required=True,
|
||||
)
|
||||
return cls._args_schema
|
||||
|
||||
def _execute_operations(self):
|
||||
self.pre_operations()
|
||||
self.InternetGatewaysGet(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 InternetGatewaysGet(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/internetGateways/{internetGatewayName}",
|
||||
**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(
|
||||
"internetGatewayName", self.ctx.args.resource_name,
|
||||
required=True,
|
||||
),
|
||||
**self.serialize_url_param(
|
||||
"resourceGroupName", self.ctx.args.resource_group,
|
||||
required=True,
|
||||
),
|
||||
**self.serialize_url_param(
|
||||
"subscriptionId", self.ctx.subscription_id,
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
return parameters
|
||||
|
||||
@property
|
||||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-06-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.location = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
_schema_on_200.name = AAZStrType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_schema_on_200.properties = AAZObjectType(
|
||||
flags={"required": True, "client_flatten": True},
|
||||
)
|
||||
_schema_on_200.system_data = AAZObjectType(
|
||||
serialized_name="systemData",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_schema_on_200.tags = AAZDictType()
|
||||
_schema_on_200.type = AAZStrType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
|
||||
properties = cls._schema_on_200.properties
|
||||
properties.annotation = AAZStrType()
|
||||
properties.internet_gateway_rule_id = AAZStrType(
|
||||
serialized_name="internetGatewayRuleId",
|
||||
)
|
||||
properties.ipv4_address = AAZStrType(
|
||||
serialized_name="ipv4Address",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.network_fabric_controller_id = AAZStrType(
|
||||
serialized_name="networkFabricControllerId",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.port = AAZIntType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.provisioning_state = AAZStrType(
|
||||
serialized_name="provisioningState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.type = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
system_data = cls._schema_on_200.system_data
|
||||
system_data.created_at = AAZStrType(
|
||||
serialized_name="createdAt",
|
||||
)
|
||||
system_data.created_by = AAZStrType(
|
||||
serialized_name="createdBy",
|
||||
)
|
||||
system_data.created_by_type = AAZStrType(
|
||||
serialized_name="createdByType",
|
||||
)
|
||||
system_data.last_modified_at = AAZStrType(
|
||||
serialized_name="lastModifiedAt",
|
||||
)
|
||||
system_data.last_modified_by = AAZStrType(
|
||||
serialized_name="lastModifiedBy",
|
||||
)
|
||||
system_data.last_modified_by_type = AAZStrType(
|
||||
serialized_name="lastModifiedByType",
|
||||
)
|
||||
|
||||
tags = cls._schema_on_200.tags
|
||||
tags.Element = AAZStrType()
|
||||
|
||||
return cls._schema_on_200
|
||||
|
||||
|
||||
class _WaitHelper:
|
||||
"""Helper class for Wait"""
|
||||
|
||||
|
||||
__all__ = ["Wait"]
|
|
@ -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 internetgatewayrule",
|
||||
)
|
||||
class __CMDGroup(AAZCommandGroup):
|
||||
"""Manage Internet Gateway Rule Resource
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
__all__ = ["__CMDGroup"]
|
|
@ -0,0 +1,17 @@
|
|||
# --------------------------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
#
|
||||
# Code generated by aaz-dev-tools
|
||||
# --------------------------------------------------------------------------------------------
|
||||
|
||||
# pylint: skip-file
|
||||
# flake8: noqa
|
||||
|
||||
from .__cmd_group import *
|
||||
from ._create import *
|
||||
from ._delete import *
|
||||
from ._list import *
|
||||
from ._show import *
|
||||
from ._update import *
|
||||
from ._wait import *
|
|
@ -0,0 +1,349 @@
|
|||
# --------------------------------------------------------------------------------------------
|
||||
# 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 internetgatewayrule create",
|
||||
)
|
||||
class Create(AAZCommand):
|
||||
"""Create an Internet Gateway Rule resource
|
||||
|
||||
:example: Create a Internet Gateway Rule
|
||||
az networkfabric internetgatewayrule create --resource-group "example-rg" --location "westus3" --resource-name "example-internetgatewayrule" --rule-properties "{action:Allow,addressList:['10.10.10.10']}"
|
||||
|
||||
:example: Help text for sub parameters under the specific parent can be viewed by using the shorthand syntax '??'. See https://github.com/Azure/azure-cli/tree/dev/doc/shorthand_syntax.md for more about shorthand syntax.
|
||||
az networkfabric internetgatewayrule create --rule-properties ??
|
||||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/internetgatewayrules/{}", "2023-06-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 Internet Gateway rule.",
|
||||
required=True,
|
||||
)
|
||||
_args_schema.resource_group = AAZResourceGroupNameArg(
|
||||
help="Name of the resource group",
|
||||
required=True,
|
||||
)
|
||||
|
||||
# define Arg Group "Body"
|
||||
|
||||
_args_schema = cls._args_schema
|
||||
_args_schema.location = AAZResourceLocationArg(
|
||||
arg_group="Body",
|
||||
help="Location of Azure region",
|
||||
required=True,
|
||||
fmt=AAZResourceLocationArgFormat(
|
||||
resource_group_arg="resource_group",
|
||||
),
|
||||
)
|
||||
_args_schema.tags = AAZDictArg(
|
||||
options=["--tags"],
|
||||
arg_group="Body",
|
||||
help="Resource tags.",
|
||||
)
|
||||
|
||||
tags = cls._args_schema.tags
|
||||
tags.Element = AAZStrArg()
|
||||
|
||||
# define Arg Group "Properties"
|
||||
|
||||
_args_schema = cls._args_schema
|
||||
_args_schema.annotation = AAZStrArg(
|
||||
options=["--annotation"],
|
||||
arg_group="Properties",
|
||||
help="Description for underlying resource.",
|
||||
)
|
||||
_args_schema.rule_properties = AAZObjectArg(
|
||||
options=["--rule-properties"],
|
||||
arg_group="Properties",
|
||||
help="Rules for the InternetGateways.",
|
||||
required=True,
|
||||
)
|
||||
|
||||
rule_properties = cls._args_schema.rule_properties
|
||||
rule_properties.action = AAZStrArg(
|
||||
options=["action"],
|
||||
help="Specify action. Example: Allow.",
|
||||
required=True,
|
||||
enum={"Allow": "Allow", "Deny": "Deny"},
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
rule_properties.address_list = AAZListArg(
|
||||
options=["address-list"],
|
||||
help="List of Addresses to be allowed or denied.",
|
||||
required=True,
|
||||
)
|
||||
|
||||
address_list = cls._args_schema.rule_properties.address_list
|
||||
address_list.Element = AAZStrArg(
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
return cls._args_schema
|
||||
|
||||
def _execute_operations(self):
|
||||
self.pre_operations()
|
||||
yield self.InternetGatewayRulesCreate(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 InternetGatewayRulesCreate(AAZHttpOperation):
|
||||
CLIENT_TYPE = "MgmtClient"
|
||||
|
||||
def __call__(self, *args, **kwargs):
|
||||
request = self.make_request()
|
||||
session = self.client.send_request(request=request, stream=False, **kwargs)
|
||||
if session.http_response.status_code in [202]:
|
||||
return self.client.build_lro_polling(
|
||||
self.ctx.args.no_wait,
|
||||
session,
|
||||
self.on_200_201,
|
||||
self.on_error,
|
||||
lro_options={"final-state-via": "azure-async-operation"},
|
||||
path_format_arguments=self.url_parameters,
|
||||
)
|
||||
if session.http_response.status_code in [200, 201]:
|
||||
return self.client.build_lro_polling(
|
||||
self.ctx.args.no_wait,
|
||||
session,
|
||||
self.on_200_201,
|
||||
self.on_error,
|
||||
lro_options={"final-state-via": "azure-async-operation"},
|
||||
path_format_arguments=self.url_parameters,
|
||||
)
|
||||
|
||||
return self.on_error(session.http_response)
|
||||
|
||||
@property
|
||||
def url(self):
|
||||
return self.client.format_url(
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName}",
|
||||
**self.url_parameters
|
||||
)
|
||||
|
||||
@property
|
||||
def method(self):
|
||||
return "PUT"
|
||||
|
||||
@property
|
||||
def error_format(self):
|
||||
return "MgmtErrorFormat"
|
||||
|
||||
@property
|
||||
def url_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_url_param(
|
||||
"internetGatewayRuleName", self.ctx.args.resource_name,
|
||||
required=True,
|
||||
),
|
||||
**self.serialize_url_param(
|
||||
"resourceGroupName", self.ctx.args.resource_group,
|
||||
required=True,
|
||||
),
|
||||
**self.serialize_url_param(
|
||||
"subscriptionId", self.ctx.subscription_id,
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
return parameters
|
||||
|
||||
@property
|
||||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
return parameters
|
||||
|
||||
@property
|
||||
def header_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_header_param(
|
||||
"Content-Type", "application/json",
|
||||
),
|
||||
**self.serialize_header_param(
|
||||
"Accept", "application/json",
|
||||
),
|
||||
}
|
||||
return parameters
|
||||
|
||||
@property
|
||||
def content(self):
|
||||
_content_value, _builder = self.new_content_builder(
|
||||
self.ctx.args,
|
||||
typ=AAZObjectType,
|
||||
typ_kwargs={"flags": {"required": True, "client_flatten": True}}
|
||||
)
|
||||
_builder.set_prop("location", AAZStrType, ".location", typ_kwargs={"flags": {"required": True}})
|
||||
_builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={"flags": {"required": True, "client_flatten": True}})
|
||||
_builder.set_prop("tags", AAZDictType, ".tags")
|
||||
|
||||
properties = _builder.get(".properties")
|
||||
if properties is not None:
|
||||
properties.set_prop("annotation", AAZStrType, ".annotation")
|
||||
properties.set_prop("ruleProperties", AAZObjectType, ".rule_properties", typ_kwargs={"flags": {"required": True}})
|
||||
|
||||
rule_properties = _builder.get(".properties.ruleProperties")
|
||||
if rule_properties is not None:
|
||||
rule_properties.set_prop("action", AAZStrType, ".action", typ_kwargs={"flags": {"required": True}})
|
||||
rule_properties.set_prop("addressList", AAZListType, ".address_list", typ_kwargs={"flags": {"required": True}})
|
||||
|
||||
address_list = _builder.get(".properties.ruleProperties.addressList")
|
||||
if address_list is not None:
|
||||
address_list.set_elements(AAZStrType, ".")
|
||||
|
||||
tags = _builder.get(".tags")
|
||||
if tags is not None:
|
||||
tags.set_elements(AAZStrType, ".")
|
||||
|
||||
return self.serialize_content(_content_value)
|
||||
|
||||
def on_200_201(self, session):
|
||||
data = self.deserialize_http_content(session)
|
||||
self.ctx.set_var(
|
||||
"instance",
|
||||
data,
|
||||
schema_builder=self._build_schema_on_200_201
|
||||
)
|
||||
|
||||
_schema_on_200_201 = None
|
||||
|
||||
@classmethod
|
||||
def _build_schema_on_200_201(cls):
|
||||
if cls._schema_on_200_201 is not None:
|
||||
return cls._schema_on_200_201
|
||||
|
||||
cls._schema_on_200_201 = AAZObjectType()
|
||||
|
||||
_schema_on_200_201 = cls._schema_on_200_201
|
||||
_schema_on_200_201.id = AAZStrType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_schema_on_200_201.location = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
_schema_on_200_201.name = AAZStrType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_schema_on_200_201.properties = AAZObjectType(
|
||||
flags={"required": True, "client_flatten": True},
|
||||
)
|
||||
_schema_on_200_201.system_data = AAZObjectType(
|
||||
serialized_name="systemData",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_schema_on_200_201.tags = AAZDictType()
|
||||
_schema_on_200_201.type = AAZStrType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
|
||||
properties = cls._schema_on_200_201.properties
|
||||
properties.annotation = AAZStrType()
|
||||
properties.internet_gateway_ids = AAZListType(
|
||||
serialized_name="internetGatewayIds",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.provisioning_state = AAZStrType(
|
||||
serialized_name="provisioningState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.rule_properties = AAZObjectType(
|
||||
serialized_name="ruleProperties",
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
internet_gateway_ids = cls._schema_on_200_201.properties.internet_gateway_ids
|
||||
internet_gateway_ids.Element = AAZStrType()
|
||||
|
||||
rule_properties = cls._schema_on_200_201.properties.rule_properties
|
||||
rule_properties.action = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
rule_properties.address_list = AAZListType(
|
||||
serialized_name="addressList",
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
address_list = cls._schema_on_200_201.properties.rule_properties.address_list
|
||||
address_list.Element = AAZStrType()
|
||||
|
||||
system_data = cls._schema_on_200_201.system_data
|
||||
system_data.created_at = AAZStrType(
|
||||
serialized_name="createdAt",
|
||||
)
|
||||
system_data.created_by = AAZStrType(
|
||||
serialized_name="createdBy",
|
||||
)
|
||||
system_data.created_by_type = AAZStrType(
|
||||
serialized_name="createdByType",
|
||||
)
|
||||
system_data.last_modified_at = AAZStrType(
|
||||
serialized_name="lastModifiedAt",
|
||||
)
|
||||
system_data.last_modified_by = AAZStrType(
|
||||
serialized_name="lastModifiedBy",
|
||||
)
|
||||
system_data.last_modified_by_type = AAZStrType(
|
||||
serialized_name="lastModifiedByType",
|
||||
)
|
||||
|
||||
tags = cls._schema_on_200_201.tags
|
||||
tags.Element = AAZStrType()
|
||||
|
||||
return cls._schema_on_200_201
|
||||
|
||||
|
||||
class _CreateHelper:
|
||||
"""Helper class for Create"""
|
||||
|
||||
|
||||
__all__ = ["Create"]
|
|
@ -0,0 +1,163 @@
|
|||
# --------------------------------------------------------------------------------------------
|
||||
# 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 internetgatewayrule delete",
|
||||
)
|
||||
class Delete(AAZCommand):
|
||||
"""Delete the Internet Gateway Rule resource
|
||||
|
||||
:example: Delete the Internet Gateway Rule
|
||||
az networkfabric internetgatewayrule delete --resource-group "example-rg" --resource-name "example-internetgatewayrule"
|
||||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/internetgatewayrules/{}", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
AZ_SUPPORT_NO_WAIT = True
|
||||
|
||||
def _handler(self, command_args):
|
||||
super()._handler(command_args)
|
||||
return self.build_lro_poller(self._execute_operations, None)
|
||||
|
||||
_args_schema = None
|
||||
|
||||
@classmethod
|
||||
def _build_arguments_schema(cls, *args, **kwargs):
|
||||
if cls._args_schema is not None:
|
||||
return cls._args_schema
|
||||
cls._args_schema = super()._build_arguments_schema(*args, **kwargs)
|
||||
|
||||
# define Arg Group ""
|
||||
|
||||
_args_schema = cls._args_schema
|
||||
_args_schema.resource_name = AAZStrArg(
|
||||
options=["--resource-name"],
|
||||
help="Name of the Internet Gateway rule.",
|
||||
required=True,
|
||||
id_part="name",
|
||||
)
|
||||
_args_schema.resource_group = AAZResourceGroupNameArg(
|
||||
help="Name of the resource group",
|
||||
required=True,
|
||||
)
|
||||
return cls._args_schema
|
||||
|
||||
def _execute_operations(self):
|
||||
self.pre_operations()
|
||||
yield self.InternetGatewayRulesDelete(ctx=self.ctx)()
|
||||
self.post_operations()
|
||||
|
||||
@register_callback
|
||||
def pre_operations(self):
|
||||
pass
|
||||
|
||||
@register_callback
|
||||
def post_operations(self):
|
||||
pass
|
||||
|
||||
class InternetGatewayRulesDelete(AAZHttpOperation):
|
||||
CLIENT_TYPE = "MgmtClient"
|
||||
|
||||
def __call__(self, *args, **kwargs):
|
||||
request = self.make_request()
|
||||
session = self.client.send_request(request=request, stream=False, **kwargs)
|
||||
if session.http_response.status_code in [202]:
|
||||
return self.client.build_lro_polling(
|
||||
self.ctx.args.no_wait,
|
||||
session,
|
||||
self.on_200,
|
||||
self.on_error,
|
||||
lro_options={"final-state-via": "location"},
|
||||
path_format_arguments=self.url_parameters,
|
||||
)
|
||||
if session.http_response.status_code in [200]:
|
||||
return self.client.build_lro_polling(
|
||||
self.ctx.args.no_wait,
|
||||
session,
|
||||
self.on_200,
|
||||
self.on_error,
|
||||
lro_options={"final-state-via": "location"},
|
||||
path_format_arguments=self.url_parameters,
|
||||
)
|
||||
if session.http_response.status_code in [204]:
|
||||
return self.client.build_lro_polling(
|
||||
self.ctx.args.no_wait,
|
||||
session,
|
||||
self.on_204,
|
||||
self.on_error,
|
||||
lro_options={"final-state-via": "location"},
|
||||
path_format_arguments=self.url_parameters,
|
||||
)
|
||||
|
||||
return self.on_error(session.http_response)
|
||||
|
||||
@property
|
||||
def url(self):
|
||||
return self.client.format_url(
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName}",
|
||||
**self.url_parameters
|
||||
)
|
||||
|
||||
@property
|
||||
def method(self):
|
||||
return "DELETE"
|
||||
|
||||
@property
|
||||
def error_format(self):
|
||||
return "MgmtErrorFormat"
|
||||
|
||||
@property
|
||||
def url_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_url_param(
|
||||
"internetGatewayRuleName", self.ctx.args.resource_name,
|
||||
required=True,
|
||||
),
|
||||
**self.serialize_url_param(
|
||||
"resourceGroupName", self.ctx.args.resource_group,
|
||||
required=True,
|
||||
),
|
||||
**self.serialize_url_param(
|
||||
"subscriptionId", self.ctx.subscription_id,
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
return parameters
|
||||
|
||||
@property
|
||||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
return parameters
|
||||
|
||||
def on_200(self, session):
|
||||
pass
|
||||
|
||||
def on_204(self, session):
|
||||
pass
|
||||
|
||||
|
||||
class _DeleteHelper:
|
||||
"""Helper class for Delete"""
|
||||
|
||||
|
||||
__all__ = ["Delete"]
|
|
@ -0,0 +1,403 @@
|
|||
# --------------------------------------------------------------------------------------------
|
||||
# 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 internetgatewayrule list",
|
||||
)
|
||||
class List(AAZCommand):
|
||||
"""List all Internet Gateway Rules in the provided resource group or subscription
|
||||
|
||||
:example: List the Internet Gateway Rule for Resource group
|
||||
az networkfabric internetgatewayrule list --resource-group "example-rg"
|
||||
|
||||
:example: List the Internet Gateway Rule for Subscription
|
||||
az networkfabric internetgatewayrule list --subscription "<subscriptionId>"
|
||||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/providers/microsoft.managednetworkfabric/internetgatewayrules", "2023-06-15"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/internetgatewayrules", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
def _handler(self, command_args):
|
||||
super()._handler(command_args)
|
||||
return self.build_paging(self._execute_operations, self._output)
|
||||
|
||||
_args_schema = None
|
||||
|
||||
@classmethod
|
||||
def _build_arguments_schema(cls, *args, **kwargs):
|
||||
if cls._args_schema is not None:
|
||||
return cls._args_schema
|
||||
cls._args_schema = super()._build_arguments_schema(*args, **kwargs)
|
||||
|
||||
# define Arg Group ""
|
||||
|
||||
_args_schema = cls._args_schema
|
||||
_args_schema.resource_group = AAZResourceGroupNameArg(
|
||||
help="Name of the resource group",
|
||||
)
|
||||
return cls._args_schema
|
||||
|
||||
def _execute_operations(self):
|
||||
self.pre_operations()
|
||||
condition_0 = has_value(self.ctx.args.resource_group) and has_value(self.ctx.subscription_id)
|
||||
condition_1 = has_value(self.ctx.subscription_id) and has_value(self.ctx.args.resource_group) is not True
|
||||
if condition_0:
|
||||
self.InternetGatewayRulesListByResourceGroup(ctx=self.ctx)()
|
||||
if condition_1:
|
||||
self.InternetGatewayRulesListBySubscription(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 InternetGatewayRulesListByResourceGroup(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/internetGatewayRules",
|
||||
**self.url_parameters
|
||||
)
|
||||
|
||||
@property
|
||||
def method(self):
|
||||
return "GET"
|
||||
|
||||
@property
|
||||
def error_format(self):
|
||||
return "MgmtErrorFormat"
|
||||
|
||||
@property
|
||||
def url_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_url_param(
|
||||
"resourceGroupName", self.ctx.args.resource_group,
|
||||
required=True,
|
||||
),
|
||||
**self.serialize_url_param(
|
||||
"subscriptionId", self.ctx.subscription_id,
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
return parameters
|
||||
|
||||
@property
|
||||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-06-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()
|
||||
|
||||
value = cls._schema_on_200.value
|
||||
value.Element = AAZObjectType()
|
||||
|
||||
_element = cls._schema_on_200.value.Element
|
||||
_element.id = AAZStrType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_element.location = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
_element.name = AAZStrType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_element.properties = AAZObjectType(
|
||||
flags={"required": True, "client_flatten": True},
|
||||
)
|
||||
_element.system_data = AAZObjectType(
|
||||
serialized_name="systemData",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_element.tags = AAZDictType()
|
||||
_element.type = AAZStrType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
|
||||
properties = cls._schema_on_200.value.Element.properties
|
||||
properties.annotation = AAZStrType()
|
||||
properties.internet_gateway_ids = AAZListType(
|
||||
serialized_name="internetGatewayIds",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.provisioning_state = AAZStrType(
|
||||
serialized_name="provisioningState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.rule_properties = AAZObjectType(
|
||||
serialized_name="ruleProperties",
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
internet_gateway_ids = cls._schema_on_200.value.Element.properties.internet_gateway_ids
|
||||
internet_gateway_ids.Element = AAZStrType()
|
||||
|
||||
rule_properties = cls._schema_on_200.value.Element.properties.rule_properties
|
||||
rule_properties.action = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
rule_properties.address_list = AAZListType(
|
||||
serialized_name="addressList",
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
address_list = cls._schema_on_200.value.Element.properties.rule_properties.address_list
|
||||
address_list.Element = AAZStrType()
|
||||
|
||||
system_data = cls._schema_on_200.value.Element.system_data
|
||||
system_data.created_at = AAZStrType(
|
||||
serialized_name="createdAt",
|
||||
)
|
||||
system_data.created_by = AAZStrType(
|
||||
serialized_name="createdBy",
|
||||
)
|
||||
system_data.created_by_type = AAZStrType(
|
||||
serialized_name="createdByType",
|
||||
)
|
||||
system_data.last_modified_at = AAZStrType(
|
||||
serialized_name="lastModifiedAt",
|
||||
)
|
||||
system_data.last_modified_by = AAZStrType(
|
||||
serialized_name="lastModifiedBy",
|
||||
)
|
||||
system_data.last_modified_by_type = AAZStrType(
|
||||
serialized_name="lastModifiedByType",
|
||||
)
|
||||
|
||||
tags = cls._schema_on_200.value.Element.tags
|
||||
tags.Element = AAZStrType()
|
||||
|
||||
return cls._schema_on_200
|
||||
|
||||
class InternetGatewayRulesListBySubscription(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/internetGatewayRules",
|
||||
**self.url_parameters
|
||||
)
|
||||
|
||||
@property
|
||||
def method(self):
|
||||
return "GET"
|
||||
|
||||
@property
|
||||
def error_format(self):
|
||||
return "MgmtErrorFormat"
|
||||
|
||||
@property
|
||||
def url_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_url_param(
|
||||
"subscriptionId", self.ctx.subscription_id,
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
return parameters
|
||||
|
||||
@property
|
||||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-06-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()
|
||||
|
||||
value = cls._schema_on_200.value
|
||||
value.Element = AAZObjectType()
|
||||
|
||||
_element = cls._schema_on_200.value.Element
|
||||
_element.id = AAZStrType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_element.location = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
_element.name = AAZStrType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_element.properties = AAZObjectType(
|
||||
flags={"required": True, "client_flatten": True},
|
||||
)
|
||||
_element.system_data = AAZObjectType(
|
||||
serialized_name="systemData",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_element.tags = AAZDictType()
|
||||
_element.type = AAZStrType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
|
||||
properties = cls._schema_on_200.value.Element.properties
|
||||
properties.annotation = AAZStrType()
|
||||
properties.internet_gateway_ids = AAZListType(
|
||||
serialized_name="internetGatewayIds",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.provisioning_state = AAZStrType(
|
||||
serialized_name="provisioningState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.rule_properties = AAZObjectType(
|
||||
serialized_name="ruleProperties",
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
internet_gateway_ids = cls._schema_on_200.value.Element.properties.internet_gateway_ids
|
||||
internet_gateway_ids.Element = AAZStrType()
|
||||
|
||||
rule_properties = cls._schema_on_200.value.Element.properties.rule_properties
|
||||
rule_properties.action = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
rule_properties.address_list = AAZListType(
|
||||
serialized_name="addressList",
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
address_list = cls._schema_on_200.value.Element.properties.rule_properties.address_list
|
||||
address_list.Element = AAZStrType()
|
||||
|
||||
system_data = cls._schema_on_200.value.Element.system_data
|
||||
system_data.created_at = AAZStrType(
|
||||
serialized_name="createdAt",
|
||||
)
|
||||
system_data.created_by = AAZStrType(
|
||||
serialized_name="createdBy",
|
||||
)
|
||||
system_data.created_by_type = AAZStrType(
|
||||
serialized_name="createdByType",
|
||||
)
|
||||
system_data.last_modified_at = AAZStrType(
|
||||
serialized_name="lastModifiedAt",
|
||||
)
|
||||
system_data.last_modified_by = AAZStrType(
|
||||
serialized_name="lastModifiedBy",
|
||||
)
|
||||
system_data.last_modified_by_type = AAZStrType(
|
||||
serialized_name="lastModifiedByType",
|
||||
)
|
||||
|
||||
tags = cls._schema_on_200.value.Element.tags
|
||||
tags.Element = AAZStrType()
|
||||
|
||||
return cls._schema_on_200
|
||||
|
||||
|
||||
class _ListHelper:
|
||||
"""Helper class for List"""
|
||||
|
||||
|
||||
__all__ = ["List"]
|
|
@ -0,0 +1,238 @@
|
|||
# --------------------------------------------------------------------------------------------
|
||||
# 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 internetgatewayrule show",
|
||||
)
|
||||
class Show(AAZCommand):
|
||||
"""Show details of the provided Internet Gateway Rule resource
|
||||
|
||||
:example: Show the Internet Gateway Rule
|
||||
az networkfabric internetgatewayrule show --resource-group "example-rg" --resource-name "example-internetgatewayrule"
|
||||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/internetgatewayrules/{}", "2023-06-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 Internet Gateway rule.",
|
||||
required=True,
|
||||
id_part="name",
|
||||
)
|
||||
_args_schema.resource_group = AAZResourceGroupNameArg(
|
||||
help="Name of the resource group",
|
||||
required=True,
|
||||
)
|
||||
return cls._args_schema
|
||||
|
||||
def _execute_operations(self):
|
||||
self.pre_operations()
|
||||
self.InternetGatewayRulesGet(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 InternetGatewayRulesGet(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/internetGatewayRules/{internetGatewayRuleName}",
|
||||
**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(
|
||||
"internetGatewayRuleName", self.ctx.args.resource_name,
|
||||
required=True,
|
||||
),
|
||||
**self.serialize_url_param(
|
||||
"resourceGroupName", self.ctx.args.resource_group,
|
||||
required=True,
|
||||
),
|
||||
**self.serialize_url_param(
|
||||
"subscriptionId", self.ctx.subscription_id,
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
return parameters
|
||||
|
||||
@property
|
||||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-06-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.location = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
_schema_on_200.name = AAZStrType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_schema_on_200.properties = AAZObjectType(
|
||||
flags={"required": True, "client_flatten": True},
|
||||
)
|
||||
_schema_on_200.system_data = AAZObjectType(
|
||||
serialized_name="systemData",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_schema_on_200.tags = AAZDictType()
|
||||
_schema_on_200.type = AAZStrType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
|
||||
properties = cls._schema_on_200.properties
|
||||
properties.annotation = AAZStrType()
|
||||
properties.internet_gateway_ids = AAZListType(
|
||||
serialized_name="internetGatewayIds",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.provisioning_state = AAZStrType(
|
||||
serialized_name="provisioningState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.rule_properties = AAZObjectType(
|
||||
serialized_name="ruleProperties",
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
internet_gateway_ids = cls._schema_on_200.properties.internet_gateway_ids
|
||||
internet_gateway_ids.Element = AAZStrType()
|
||||
|
||||
rule_properties = cls._schema_on_200.properties.rule_properties
|
||||
rule_properties.action = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
rule_properties.address_list = AAZListType(
|
||||
serialized_name="addressList",
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
address_list = cls._schema_on_200.properties.rule_properties.address_list
|
||||
address_list.Element = AAZStrType()
|
||||
|
||||
system_data = cls._schema_on_200.system_data
|
||||
system_data.created_at = AAZStrType(
|
||||
serialized_name="createdAt",
|
||||
)
|
||||
system_data.created_by = AAZStrType(
|
||||
serialized_name="createdBy",
|
||||
)
|
||||
system_data.created_by_type = AAZStrType(
|
||||
serialized_name="createdByType",
|
||||
)
|
||||
system_data.last_modified_at = AAZStrType(
|
||||
serialized_name="lastModifiedAt",
|
||||
)
|
||||
system_data.last_modified_by = AAZStrType(
|
||||
serialized_name="lastModifiedBy",
|
||||
)
|
||||
system_data.last_modified_by_type = AAZStrType(
|
||||
serialized_name="lastModifiedByType",
|
||||
)
|
||||
|
||||
tags = cls._schema_on_200.tags
|
||||
tags.Element = AAZStrType()
|
||||
|
||||
return cls._schema_on_200
|
||||
|
||||
|
||||
class _ShowHelper:
|
||||
"""Helper class for Show"""
|
||||
|
||||
|
||||
__all__ = ["Show"]
|
|
@ -0,0 +1,285 @@
|
|||
# --------------------------------------------------------------------------------------------
|
||||
# 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 internetgatewayrule update",
|
||||
)
|
||||
class Update(AAZCommand):
|
||||
"""Update the Internet Gateway Rule resource.
|
||||
|
||||
:example: Update the Internet Gateway Rule
|
||||
az networkfabric internetgatewayrule update --resource-group "example-rg" --resource-name "example-internetgatewayrule" --tags "{key3311:1234}"
|
||||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/internetgatewayrules/{}", "2023-06-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 Internet Gateway rule.",
|
||||
required=True,
|
||||
id_part="name",
|
||||
)
|
||||
_args_schema.resource_group = AAZResourceGroupNameArg(
|
||||
help="Name of the resource group",
|
||||
required=True,
|
||||
)
|
||||
|
||||
# define Arg Group "Body"
|
||||
|
||||
_args_schema = cls._args_schema
|
||||
_args_schema.tags = AAZDictArg(
|
||||
options=["--tags"],
|
||||
arg_group="Body",
|
||||
help="Resource tags",
|
||||
)
|
||||
|
||||
tags = cls._args_schema.tags
|
||||
tags.Element = AAZStrArg()
|
||||
return cls._args_schema
|
||||
|
||||
def _execute_operations(self):
|
||||
self.pre_operations()
|
||||
yield self.InternetGatewayRulesUpdate(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 InternetGatewayRulesUpdate(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/internetGatewayRules/{internetGatewayRuleName}",
|
||||
**self.url_parameters
|
||||
)
|
||||
|
||||
@property
|
||||
def method(self):
|
||||
return "PATCH"
|
||||
|
||||
@property
|
||||
def error_format(self):
|
||||
return "MgmtErrorFormat"
|
||||
|
||||
@property
|
||||
def url_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_url_param(
|
||||
"internetGatewayRuleName", self.ctx.args.resource_name,
|
||||
required=True,
|
||||
),
|
||||
**self.serialize_url_param(
|
||||
"resourceGroupName", self.ctx.args.resource_group,
|
||||
required=True,
|
||||
),
|
||||
**self.serialize_url_param(
|
||||
"subscriptionId", self.ctx.subscription_id,
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
return parameters
|
||||
|
||||
@property
|
||||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
return parameters
|
||||
|
||||
@property
|
||||
def header_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_header_param(
|
||||
"Content-Type", "application/json",
|
||||
),
|
||||
**self.serialize_header_param(
|
||||
"Accept", "application/json",
|
||||
),
|
||||
}
|
||||
return parameters
|
||||
|
||||
@property
|
||||
def content(self):
|
||||
_content_value, _builder = self.new_content_builder(
|
||||
self.ctx.args,
|
||||
typ=AAZObjectType,
|
||||
typ_kwargs={"flags": {"required": True, "client_flatten": True}}
|
||||
)
|
||||
_builder.set_prop("tags", AAZDictType, ".tags")
|
||||
|
||||
tags = _builder.get(".tags")
|
||||
if tags is not None:
|
||||
tags.set_elements(AAZStrType, ".")
|
||||
|
||||
return self.serialize_content(_content_value)
|
||||
|
||||
def on_200(self, session):
|
||||
data = self.deserialize_http_content(session)
|
||||
self.ctx.set_var(
|
||||
"instance",
|
||||
data,
|
||||
schema_builder=self._build_schema_on_200
|
||||
)
|
||||
|
||||
_schema_on_200 = None
|
||||
|
||||
@classmethod
|
||||
def _build_schema_on_200(cls):
|
||||
if cls._schema_on_200 is not None:
|
||||
return cls._schema_on_200
|
||||
|
||||
cls._schema_on_200 = AAZObjectType()
|
||||
|
||||
_schema_on_200 = cls._schema_on_200
|
||||
_schema_on_200.id = AAZStrType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_schema_on_200.location = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
_schema_on_200.name = AAZStrType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_schema_on_200.properties = AAZObjectType(
|
||||
flags={"required": True, "client_flatten": True},
|
||||
)
|
||||
_schema_on_200.system_data = AAZObjectType(
|
||||
serialized_name="systemData",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_schema_on_200.tags = AAZDictType()
|
||||
_schema_on_200.type = AAZStrType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
|
||||
properties = cls._schema_on_200.properties
|
||||
properties.annotation = AAZStrType()
|
||||
properties.internet_gateway_ids = AAZListType(
|
||||
serialized_name="internetGatewayIds",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.provisioning_state = AAZStrType(
|
||||
serialized_name="provisioningState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.rule_properties = AAZObjectType(
|
||||
serialized_name="ruleProperties",
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
internet_gateway_ids = cls._schema_on_200.properties.internet_gateway_ids
|
||||
internet_gateway_ids.Element = AAZStrType()
|
||||
|
||||
rule_properties = cls._schema_on_200.properties.rule_properties
|
||||
rule_properties.action = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
rule_properties.address_list = AAZListType(
|
||||
serialized_name="addressList",
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
address_list = cls._schema_on_200.properties.rule_properties.address_list
|
||||
address_list.Element = AAZStrType()
|
||||
|
||||
system_data = cls._schema_on_200.system_data
|
||||
system_data.created_at = AAZStrType(
|
||||
serialized_name="createdAt",
|
||||
)
|
||||
system_data.created_by = AAZStrType(
|
||||
serialized_name="createdBy",
|
||||
)
|
||||
system_data.created_by_type = AAZStrType(
|
||||
serialized_name="createdByType",
|
||||
)
|
||||
system_data.last_modified_at = AAZStrType(
|
||||
serialized_name="lastModifiedAt",
|
||||
)
|
||||
system_data.last_modified_by = AAZStrType(
|
||||
serialized_name="lastModifiedBy",
|
||||
)
|
||||
system_data.last_modified_by_type = AAZStrType(
|
||||
serialized_name="lastModifiedByType",
|
||||
)
|
||||
|
||||
tags = cls._schema_on_200.tags
|
||||
tags.Element = AAZStrType()
|
||||
|
||||
return cls._schema_on_200
|
||||
|
||||
|
||||
class _UpdateHelper:
|
||||
"""Helper class for Update"""
|
||||
|
||||
|
||||
__all__ = ["Update"]
|
|
@ -0,0 +1,234 @@
|
|||
# --------------------------------------------------------------------------------------------
|
||||
# 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 internetgatewayrule 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/internetgatewayrules/{}", "2023-06-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 Internet Gateway rule.",
|
||||
required=True,
|
||||
id_part="name",
|
||||
)
|
||||
_args_schema.resource_group = AAZResourceGroupNameArg(
|
||||
help="Name of the resource group",
|
||||
required=True,
|
||||
)
|
||||
return cls._args_schema
|
||||
|
||||
def _execute_operations(self):
|
||||
self.pre_operations()
|
||||
self.InternetGatewayRulesGet(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 InternetGatewayRulesGet(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/internetGatewayRules/{internetGatewayRuleName}",
|
||||
**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(
|
||||
"internetGatewayRuleName", self.ctx.args.resource_name,
|
||||
required=True,
|
||||
),
|
||||
**self.serialize_url_param(
|
||||
"resourceGroupName", self.ctx.args.resource_group,
|
||||
required=True,
|
||||
),
|
||||
**self.serialize_url_param(
|
||||
"subscriptionId", self.ctx.subscription_id,
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
return parameters
|
||||
|
||||
@property
|
||||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-06-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.location = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
_schema_on_200.name = AAZStrType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_schema_on_200.properties = AAZObjectType(
|
||||
flags={"required": True, "client_flatten": True},
|
||||
)
|
||||
_schema_on_200.system_data = AAZObjectType(
|
||||
serialized_name="systemData",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_schema_on_200.tags = AAZDictType()
|
||||
_schema_on_200.type = AAZStrType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
|
||||
properties = cls._schema_on_200.properties
|
||||
properties.annotation = AAZStrType()
|
||||
properties.internet_gateway_ids = AAZListType(
|
||||
serialized_name="internetGatewayIds",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.provisioning_state = AAZStrType(
|
||||
serialized_name="provisioningState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.rule_properties = AAZObjectType(
|
||||
serialized_name="ruleProperties",
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
internet_gateway_ids = cls._schema_on_200.properties.internet_gateway_ids
|
||||
internet_gateway_ids.Element = AAZStrType()
|
||||
|
||||
rule_properties = cls._schema_on_200.properties.rule_properties
|
||||
rule_properties.action = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
rule_properties.address_list = AAZListType(
|
||||
serialized_name="addressList",
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
address_list = cls._schema_on_200.properties.rule_properties.address_list
|
||||
address_list.Element = AAZStrType()
|
||||
|
||||
system_data = cls._schema_on_200.system_data
|
||||
system_data.created_at = AAZStrType(
|
||||
serialized_name="createdAt",
|
||||
)
|
||||
system_data.created_by = AAZStrType(
|
||||
serialized_name="createdBy",
|
||||
)
|
||||
system_data.created_by_type = AAZStrType(
|
||||
serialized_name="createdByType",
|
||||
)
|
||||
system_data.last_modified_at = AAZStrType(
|
||||
serialized_name="lastModifiedAt",
|
||||
)
|
||||
system_data.last_modified_by = AAZStrType(
|
||||
serialized_name="lastModifiedBy",
|
||||
)
|
||||
system_data.last_modified_by_type = AAZStrType(
|
||||
serialized_name="lastModifiedByType",
|
||||
)
|
||||
|
||||
tags = cls._schema_on_200.tags
|
||||
tags.Element = AAZStrType()
|
||||
|
||||
return cls._schema_on_200
|
||||
|
||||
|
||||
class _WaitHelper:
|
||||
"""Helper class for Wait"""
|
||||
|
||||
|
||||
__all__ = ["Wait"]
|
|
@ -15,16 +15,19 @@ from azure.cli.core.aaz import *
|
|||
"networkfabric ipcommunity create",
|
||||
)
|
||||
class Create(AAZCommand):
|
||||
"""Create a Ip Community resource.
|
||||
"""Create a Ip Community resource
|
||||
|
||||
:example: Create a Ip Community
|
||||
az networkfabric ipcommunity create --resource-group "example-rg" --location "westus3" --resource-name "example-ipcommunity" --action "Deny" --well-known-communities "LocalAS" "GShut" --community-members "100:200" "101:201"
|
||||
az networkfabric ipcommunity create --resource-group "example-rg" --location "westus3" --resource-name "example-ipcommunity" --ip-community-rules "[{action:Permit,communityMembers:['1:1'],sequenceNumber:1234,wellKnownCommunities:[Internet,GShut]}]"
|
||||
|
||||
:example: Help text for sub parameters under the specific parent can be viewed by using the shorthand syntax '??'. See https://github.com/Azure/azure-cli/tree/dev/doc/shorthand_syntax.md for more about shorthand syntax.
|
||||
az networkfabric ipcommunity create --ip-community-rules ??
|
||||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-02-01-preview",
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/ipcommunities/{}", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/ipcommunities/{}", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -47,7 +50,7 @@ class Create(AAZCommand):
|
|||
_args_schema = cls._args_schema
|
||||
_args_schema.resource_name = AAZStrArg(
|
||||
options=["--resource-name"],
|
||||
help="Name of the IP Community",
|
||||
help="Name of the IP Community.",
|
||||
required=True,
|
||||
)
|
||||
_args_schema.resource_group = AAZResourceGroupNameArg(
|
||||
|
@ -78,37 +81,63 @@ class Create(AAZCommand):
|
|||
# define Arg Group "Properties"
|
||||
|
||||
_args_schema = cls._args_schema
|
||||
_args_schema.action = AAZStrArg(
|
||||
options=["--action"],
|
||||
arg_group="Properties",
|
||||
help="Action to be taken on the configuration. Example: Permit | Deny.",
|
||||
enum={"Deny": "Deny", "Permit": "Permit"},
|
||||
)
|
||||
_args_schema.annotation = AAZStrArg(
|
||||
options=["--annotation"],
|
||||
arg_group="Properties",
|
||||
help="Switch configuration description.",
|
||||
help="Description for underlying resource.",
|
||||
)
|
||||
_args_schema.community_members = AAZListArg(
|
||||
options=["--community-members"],
|
||||
_args_schema.ip_community_rules = AAZListArg(
|
||||
options=["--ip-community-rules"],
|
||||
arg_group="Properties",
|
||||
help="List the communityMembers of IP Community.",
|
||||
help="List of IP Community Rules.",
|
||||
required=True,
|
||||
)
|
||||
_args_schema.well_known_communities = AAZListArg(
|
||||
options=["--well-known-communities"],
|
||||
arg_group="Properties",
|
||||
|
||||
ip_community_rules = cls._args_schema.ip_community_rules
|
||||
ip_community_rules.Element = AAZObjectArg()
|
||||
|
||||
_element = cls._args_schema.ip_community_rules.Element
|
||||
_element.action = AAZStrArg(
|
||||
options=["action"],
|
||||
help="Action to be taken on the configuration. Example: Permit.",
|
||||
required=True,
|
||||
enum={"Deny": "Deny", "Permit": "Permit"},
|
||||
)
|
||||
_element.community_members = AAZListArg(
|
||||
options=["community-members"],
|
||||
help="List the community members of IP Community.",
|
||||
required=True,
|
||||
)
|
||||
_element.sequence_number = AAZIntArg(
|
||||
options=["sequence-number"],
|
||||
help="Sequence to insert to/delete from existing route. Prefix lists are evaluated starting with the lowest sequence number and continue down the list until a match is made. Once a match is made, the permit or deny statement is applied to that network and the rest of the list is ignored.",
|
||||
required=True,
|
||||
fmt=AAZIntArgFormat(
|
||||
maximum=4294967295,
|
||||
minimum=1,
|
||||
),
|
||||
)
|
||||
_element.well_known_communities = AAZListArg(
|
||||
options=["well-known-communities"],
|
||||
help="Supported well known Community List.",
|
||||
fmt=AAZListArgFormat(
|
||||
unique=True,
|
||||
),
|
||||
)
|
||||
|
||||
community_members = cls._args_schema.community_members
|
||||
community_members.Element = AAZStrArg()
|
||||
community_members = cls._args_schema.ip_community_rules.Element.community_members
|
||||
community_members.Element = AAZStrArg(
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
|
||||
well_known_communities = cls._args_schema.well_known_communities
|
||||
well_known_communities = cls._args_schema.ip_community_rules.Element.well_known_communities
|
||||
well_known_communities.Element = AAZStrArg(
|
||||
enum={"GShut": "GShut", "Internet": "Internet", "LocalAS": "LocalAS", "NoAdvertise": "NoAdvertise", "NoExport": "NoExport"},
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
return cls._args_schema
|
||||
|
||||
|
@ -193,7 +222,7 @@ class Create(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
@ -219,21 +248,30 @@ class Create(AAZCommand):
|
|||
typ_kwargs={"flags": {"required": True, "client_flatten": True}}
|
||||
)
|
||||
_builder.set_prop("location", AAZStrType, ".location", typ_kwargs={"flags": {"required": True}})
|
||||
_builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
|
||||
_builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={"flags": {"required": True, "client_flatten": True}})
|
||||
_builder.set_prop("tags", AAZDictType, ".tags")
|
||||
|
||||
properties = _builder.get(".properties")
|
||||
if properties is not None:
|
||||
properties.set_prop("action", AAZStrType, ".action", typ_kwargs={"flags": {"required": True}})
|
||||
properties.set_prop("annotation", AAZStrType, ".annotation")
|
||||
properties.set_prop("communityMembers", AAZListType, ".community_members", typ_kwargs={"flags": {"required": True}})
|
||||
properties.set_prop("wellKnownCommunities", AAZListType, ".well_known_communities")
|
||||
properties.set_prop("ipCommunityRules", AAZListType, ".ip_community_rules", typ_kwargs={"flags": {"required": True}})
|
||||
|
||||
community_members = _builder.get(".properties.communityMembers")
|
||||
ip_community_rules = _builder.get(".properties.ipCommunityRules")
|
||||
if ip_community_rules is not None:
|
||||
ip_community_rules.set_elements(AAZObjectType, ".")
|
||||
|
||||
_elements = _builder.get(".properties.ipCommunityRules[]")
|
||||
if _elements is not None:
|
||||
_elements.set_prop("action", AAZStrType, ".action", typ_kwargs={"flags": {"required": True}})
|
||||
_elements.set_prop("communityMembers", AAZListType, ".community_members", typ_kwargs={"flags": {"required": True}})
|
||||
_elements.set_prop("sequenceNumber", AAZIntType, ".sequence_number", typ_kwargs={"flags": {"required": True}})
|
||||
_elements.set_prop("wellKnownCommunities", AAZListType, ".well_known_communities")
|
||||
|
||||
community_members = _builder.get(".properties.ipCommunityRules[].communityMembers")
|
||||
if community_members is not None:
|
||||
community_members.set_elements(AAZStrType, ".")
|
||||
|
||||
well_known_communities = _builder.get(".properties.wellKnownCommunities")
|
||||
well_known_communities = _builder.get(".properties.ipCommunityRules[].wellKnownCommunities")
|
||||
if well_known_communities is not None:
|
||||
well_known_communities.set_elements(AAZStrType, ".")
|
||||
|
||||
|
@ -271,7 +309,7 @@ class Create(AAZCommand):
|
|||
flags={"read_only": True},
|
||||
)
|
||||
_schema_on_200_201.properties = AAZObjectType(
|
||||
flags={"client_flatten": True},
|
||||
flags={"required": True, "client_flatten": True},
|
||||
)
|
||||
_schema_on_200_201.system_data = AAZObjectType(
|
||||
serialized_name="systemData",
|
||||
|
@ -283,26 +321,47 @@ class Create(AAZCommand):
|
|||
)
|
||||
|
||||
properties = cls._schema_on_200_201.properties
|
||||
properties.action = AAZStrType(
|
||||
flags={"required": True},
|
||||
properties.administrative_state = AAZStrType(
|
||||
serialized_name="administrativeState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.annotation = AAZStrType()
|
||||
properties.community_members = AAZListType(
|
||||
serialized_name="communityMembers",
|
||||
properties.configuration_state = AAZStrType(
|
||||
serialized_name="configurationState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.ip_community_rules = AAZListType(
|
||||
serialized_name="ipCommunityRules",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.provisioning_state = AAZStrType(
|
||||
serialized_name="provisioningState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.well_known_communities = AAZListType(
|
||||
|
||||
ip_community_rules = cls._schema_on_200_201.properties.ip_community_rules
|
||||
ip_community_rules.Element = AAZObjectType()
|
||||
|
||||
_element = cls._schema_on_200_201.properties.ip_community_rules.Element
|
||||
_element.action = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
_element.community_members = AAZListType(
|
||||
serialized_name="communityMembers",
|
||||
flags={"required": True},
|
||||
)
|
||||
_element.sequence_number = AAZIntType(
|
||||
serialized_name="sequenceNumber",
|
||||
flags={"required": True},
|
||||
)
|
||||
_element.well_known_communities = AAZListType(
|
||||
serialized_name="wellKnownCommunities",
|
||||
)
|
||||
|
||||
community_members = cls._schema_on_200_201.properties.community_members
|
||||
community_members = cls._schema_on_200_201.properties.ip_community_rules.Element.community_members
|
||||
community_members.Element = AAZStrType()
|
||||
|
||||
well_known_communities = cls._schema_on_200_201.properties.well_known_communities
|
||||
well_known_communities = cls._schema_on_200_201.properties.ip_community_rules.Element.well_known_communities
|
||||
well_known_communities.Element = AAZStrType()
|
||||
|
||||
system_data = cls._schema_on_200_201.system_data
|
||||
|
|
|
@ -15,16 +15,16 @@ from azure.cli.core.aaz import *
|
|||
"networkfabric ipcommunity delete",
|
||||
)
|
||||
class Delete(AAZCommand):
|
||||
"""Delete the Ip Community resource.
|
||||
"""Delete the Ip Community resource
|
||||
|
||||
:example: Delete the Ip Community
|
||||
az networkfabric ipcommunity delete --resource-group "example-rg" --resource-name "example-ipcommunity"
|
||||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-02-01-preview",
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/ipcommunities/{}", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/ipcommunities/{}", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -47,7 +47,7 @@ class Delete(AAZCommand):
|
|||
_args_schema = cls._args_schema
|
||||
_args_schema.resource_name = AAZStrArg(
|
||||
options=["--resource-name"],
|
||||
help="Name of the IP Community",
|
||||
help="Name of the IP Community.",
|
||||
required=True,
|
||||
id_part="name",
|
||||
)
|
||||
|
@ -143,7 +143,7 @@ class Delete(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ from azure.cli.core.aaz import *
|
|||
"networkfabric ipcommunity list",
|
||||
)
|
||||
class List(AAZCommand):
|
||||
"""List all Ip Communities in the provided resource group or subscription.
|
||||
"""List all Ip Communities in the provided resource group or subscription
|
||||
|
||||
:example: List the Ip Communities for Resource Group
|
||||
az networkfabric ipcommunity list --resource-group "example-rg"
|
||||
|
@ -25,10 +25,10 @@ class List(AAZCommand):
|
|||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-02-01-preview",
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/providers/microsoft.managednetworkfabric/ipcommunities", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/ipcommunities", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/providers/microsoft.managednetworkfabric/ipcommunities", "2023-06-15"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/ipcommunities", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -119,7 +119,7 @@ class List(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
@ -171,7 +171,7 @@ class List(AAZCommand):
|
|||
flags={"read_only": True},
|
||||
)
|
||||
_element.properties = AAZObjectType(
|
||||
flags={"client_flatten": True},
|
||||
flags={"required": True, "client_flatten": True},
|
||||
)
|
||||
_element.system_data = AAZObjectType(
|
||||
serialized_name="systemData",
|
||||
|
@ -183,26 +183,47 @@ class List(AAZCommand):
|
|||
)
|
||||
|
||||
properties = cls._schema_on_200.value.Element.properties
|
||||
properties.action = AAZStrType(
|
||||
flags={"required": True},
|
||||
properties.administrative_state = AAZStrType(
|
||||
serialized_name="administrativeState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.annotation = AAZStrType()
|
||||
properties.community_members = AAZListType(
|
||||
serialized_name="communityMembers",
|
||||
properties.configuration_state = AAZStrType(
|
||||
serialized_name="configurationState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.ip_community_rules = AAZListType(
|
||||
serialized_name="ipCommunityRules",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.provisioning_state = AAZStrType(
|
||||
serialized_name="provisioningState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.well_known_communities = AAZListType(
|
||||
|
||||
ip_community_rules = cls._schema_on_200.value.Element.properties.ip_community_rules
|
||||
ip_community_rules.Element = AAZObjectType()
|
||||
|
||||
_element = cls._schema_on_200.value.Element.properties.ip_community_rules.Element
|
||||
_element.action = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
_element.community_members = AAZListType(
|
||||
serialized_name="communityMembers",
|
||||
flags={"required": True},
|
||||
)
|
||||
_element.sequence_number = AAZIntType(
|
||||
serialized_name="sequenceNumber",
|
||||
flags={"required": True},
|
||||
)
|
||||
_element.well_known_communities = AAZListType(
|
||||
serialized_name="wellKnownCommunities",
|
||||
)
|
||||
|
||||
community_members = cls._schema_on_200.value.Element.properties.community_members
|
||||
community_members = cls._schema_on_200.value.Element.properties.ip_community_rules.Element.community_members
|
||||
community_members.Element = AAZStrType()
|
||||
|
||||
well_known_communities = cls._schema_on_200.value.Element.properties.well_known_communities
|
||||
well_known_communities = cls._schema_on_200.value.Element.properties.ip_community_rules.Element.well_known_communities
|
||||
well_known_communities.Element = AAZStrType()
|
||||
|
||||
system_data = cls._schema_on_200.value.Element.system_data
|
||||
|
@ -270,7 +291,7 @@ class List(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
@ -322,7 +343,7 @@ class List(AAZCommand):
|
|||
flags={"read_only": True},
|
||||
)
|
||||
_element.properties = AAZObjectType(
|
||||
flags={"client_flatten": True},
|
||||
flags={"required": True, "client_flatten": True},
|
||||
)
|
||||
_element.system_data = AAZObjectType(
|
||||
serialized_name="systemData",
|
||||
|
@ -334,26 +355,47 @@ class List(AAZCommand):
|
|||
)
|
||||
|
||||
properties = cls._schema_on_200.value.Element.properties
|
||||
properties.action = AAZStrType(
|
||||
flags={"required": True},
|
||||
properties.administrative_state = AAZStrType(
|
||||
serialized_name="administrativeState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.annotation = AAZStrType()
|
||||
properties.community_members = AAZListType(
|
||||
serialized_name="communityMembers",
|
||||
properties.configuration_state = AAZStrType(
|
||||
serialized_name="configurationState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.ip_community_rules = AAZListType(
|
||||
serialized_name="ipCommunityRules",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.provisioning_state = AAZStrType(
|
||||
serialized_name="provisioningState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.well_known_communities = AAZListType(
|
||||
|
||||
ip_community_rules = cls._schema_on_200.value.Element.properties.ip_community_rules
|
||||
ip_community_rules.Element = AAZObjectType()
|
||||
|
||||
_element = cls._schema_on_200.value.Element.properties.ip_community_rules.Element
|
||||
_element.action = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
_element.community_members = AAZListType(
|
||||
serialized_name="communityMembers",
|
||||
flags={"required": True},
|
||||
)
|
||||
_element.sequence_number = AAZIntType(
|
||||
serialized_name="sequenceNumber",
|
||||
flags={"required": True},
|
||||
)
|
||||
_element.well_known_communities = AAZListType(
|
||||
serialized_name="wellKnownCommunities",
|
||||
)
|
||||
|
||||
community_members = cls._schema_on_200.value.Element.properties.community_members
|
||||
community_members = cls._schema_on_200.value.Element.properties.ip_community_rules.Element.community_members
|
||||
community_members.Element = AAZStrType()
|
||||
|
||||
well_known_communities = cls._schema_on_200.value.Element.properties.well_known_communities
|
||||
well_known_communities = cls._schema_on_200.value.Element.properties.ip_community_rules.Element.well_known_communities
|
||||
well_known_communities.Element = AAZStrType()
|
||||
|
||||
system_data = cls._schema_on_200.value.Element.system_data
|
||||
|
|
|
@ -15,16 +15,16 @@ from azure.cli.core.aaz import *
|
|||
"networkfabric ipcommunity show",
|
||||
)
|
||||
class Show(AAZCommand):
|
||||
"""Show details of the provided Ip Community resource.
|
||||
"""Show details of the provided Ip Community resource
|
||||
|
||||
:example: Show the Ip Community
|
||||
az networkfabric ipcommunity show --resource-group "example-rg" --resource-name "example-ipcommunity"
|
||||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-02-01-preview",
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/ipcommunities/{}", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/ipcommunities/{}", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -46,7 +46,7 @@ class Show(AAZCommand):
|
|||
_args_schema = cls._args_schema
|
||||
_args_schema.resource_name = AAZStrArg(
|
||||
options=["--resource-name"],
|
||||
help="Name of the IP Community",
|
||||
help="Name of the IP Community.",
|
||||
required=True,
|
||||
id_part="name",
|
||||
)
|
||||
|
@ -121,7 +121,7 @@ class Show(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
@ -164,7 +164,7 @@ class Show(AAZCommand):
|
|||
flags={"read_only": True},
|
||||
)
|
||||
_schema_on_200.properties = AAZObjectType(
|
||||
flags={"client_flatten": True},
|
||||
flags={"required": True, "client_flatten": True},
|
||||
)
|
||||
_schema_on_200.system_data = AAZObjectType(
|
||||
serialized_name="systemData",
|
||||
|
@ -176,26 +176,47 @@ class Show(AAZCommand):
|
|||
)
|
||||
|
||||
properties = cls._schema_on_200.properties
|
||||
properties.action = AAZStrType(
|
||||
flags={"required": True},
|
||||
properties.administrative_state = AAZStrType(
|
||||
serialized_name="administrativeState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.annotation = AAZStrType()
|
||||
properties.community_members = AAZListType(
|
||||
serialized_name="communityMembers",
|
||||
properties.configuration_state = AAZStrType(
|
||||
serialized_name="configurationState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.ip_community_rules = AAZListType(
|
||||
serialized_name="ipCommunityRules",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.provisioning_state = AAZStrType(
|
||||
serialized_name="provisioningState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.well_known_communities = AAZListType(
|
||||
|
||||
ip_community_rules = cls._schema_on_200.properties.ip_community_rules
|
||||
ip_community_rules.Element = AAZObjectType()
|
||||
|
||||
_element = cls._schema_on_200.properties.ip_community_rules.Element
|
||||
_element.action = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
_element.community_members = AAZListType(
|
||||
serialized_name="communityMembers",
|
||||
flags={"required": True},
|
||||
)
|
||||
_element.sequence_number = AAZIntType(
|
||||
serialized_name="sequenceNumber",
|
||||
flags={"required": True},
|
||||
)
|
||||
_element.well_known_communities = AAZListType(
|
||||
serialized_name="wellKnownCommunities",
|
||||
)
|
||||
|
||||
community_members = cls._schema_on_200.properties.community_members
|
||||
community_members = cls._schema_on_200.properties.ip_community_rules.Element.community_members
|
||||
community_members.Element = AAZStrType()
|
||||
|
||||
well_known_communities = cls._schema_on_200.properties.well_known_communities
|
||||
well_known_communities = cls._schema_on_200.properties.ip_community_rules.Element.well_known_communities
|
||||
well_known_communities.Element = AAZStrType()
|
||||
|
||||
system_data = cls._schema_on_200.system_data
|
||||
|
|
|
@ -20,7 +20,7 @@ class Wait(AAZWaitCommand):
|
|||
|
||||
_aaz_info = {
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/ipcommunities/{}", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/ipcommunities/{}", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@ class Wait(AAZWaitCommand):
|
|||
_args_schema = cls._args_schema
|
||||
_args_schema.resource_name = AAZStrArg(
|
||||
options=["--resource-name"],
|
||||
help="Name of the IP Community",
|
||||
help="Name of the IP Community.",
|
||||
required=True,
|
||||
id_part="name",
|
||||
)
|
||||
|
@ -117,7 +117,7 @@ class Wait(AAZWaitCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
@ -160,7 +160,7 @@ class Wait(AAZWaitCommand):
|
|||
flags={"read_only": True},
|
||||
)
|
||||
_schema_on_200.properties = AAZObjectType(
|
||||
flags={"client_flatten": True},
|
||||
flags={"required": True, "client_flatten": True},
|
||||
)
|
||||
_schema_on_200.system_data = AAZObjectType(
|
||||
serialized_name="systemData",
|
||||
|
@ -172,26 +172,47 @@ class Wait(AAZWaitCommand):
|
|||
)
|
||||
|
||||
properties = cls._schema_on_200.properties
|
||||
properties.action = AAZStrType(
|
||||
flags={"required": True},
|
||||
properties.administrative_state = AAZStrType(
|
||||
serialized_name="administrativeState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.annotation = AAZStrType()
|
||||
properties.community_members = AAZListType(
|
||||
serialized_name="communityMembers",
|
||||
properties.configuration_state = AAZStrType(
|
||||
serialized_name="configurationState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.ip_community_rules = AAZListType(
|
||||
serialized_name="ipCommunityRules",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.provisioning_state = AAZStrType(
|
||||
serialized_name="provisioningState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.well_known_communities = AAZListType(
|
||||
|
||||
ip_community_rules = cls._schema_on_200.properties.ip_community_rules
|
||||
ip_community_rules.Element = AAZObjectType()
|
||||
|
||||
_element = cls._schema_on_200.properties.ip_community_rules.Element
|
||||
_element.action = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
_element.community_members = AAZListType(
|
||||
serialized_name="communityMembers",
|
||||
flags={"required": True},
|
||||
)
|
||||
_element.sequence_number = AAZIntType(
|
||||
serialized_name="sequenceNumber",
|
||||
flags={"required": True},
|
||||
)
|
||||
_element.well_known_communities = AAZListType(
|
||||
serialized_name="wellKnownCommunities",
|
||||
)
|
||||
|
||||
community_members = cls._schema_on_200.properties.community_members
|
||||
community_members = cls._schema_on_200.properties.ip_community_rules.Element.community_members
|
||||
community_members.Element = AAZStrType()
|
||||
|
||||
well_known_communities = cls._schema_on_200.properties.well_known_communities
|
||||
well_known_communities = cls._schema_on_200.properties.ip_community_rules.Element.well_known_communities
|
||||
well_known_communities.Element = AAZStrType()
|
||||
|
||||
system_data = cls._schema_on_200.system_data
|
||||
|
|
|
@ -15,16 +15,19 @@ from azure.cli.core.aaz import *
|
|||
"networkfabric ipextendedcommunity create",
|
||||
)
|
||||
class Create(AAZCommand):
|
||||
"""Create a Ip Extended Community resource.
|
||||
"""Create a Ip Extended Community resource
|
||||
|
||||
:example: Create a Ip Extended Community
|
||||
az networkfabric ipextendedcommunity create --resource-group "example-rg" --location "westus3" --resource-name "example-ipextendedcommunity" --action "Deny" --route-targets "1024:219" "1001:200"
|
||||
az networkfabric ipextendedcommunity create --resource-group "example-rg" --location "westus3" --resource-name "example-ipextendedcommunity" --ip-extended-community-rules "[{action:Permit,sequenceNumber:1234,routeTargets:['1024:219','1001:200']}]"
|
||||
|
||||
:example: Help text for sub parameters under the specific parent can be viewed by using the shorthand syntax '??'. See https://github.com/Azure/azure-cli/tree/dev/doc/shorthand_syntax.md for more about shorthand syntax.
|
||||
az networkfabric ipextendedcommunity create --ip-extended-community-rules ??
|
||||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-02-01-preview",
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/ipextendedcommunities/{}", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/ipextendedcommunities/{}", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -47,7 +50,7 @@ class Create(AAZCommand):
|
|||
_args_schema = cls._args_schema
|
||||
_args_schema.resource_name = AAZStrArg(
|
||||
options=["--resource-name"],
|
||||
help="Name of the IP Extended Community",
|
||||
help="Name of the IP Extended Community.",
|
||||
required=True,
|
||||
)
|
||||
_args_schema.resource_group = AAZResourceGroupNameArg(
|
||||
|
@ -78,25 +81,49 @@ class Create(AAZCommand):
|
|||
# define Arg Group "Properties"
|
||||
|
||||
_args_schema = cls._args_schema
|
||||
_args_schema.action = AAZStrArg(
|
||||
options=["--action"],
|
||||
arg_group="Properties",
|
||||
help="Action to be taken on the configuration. Example: Permit | Deny.",
|
||||
enum={"Deny": "Deny", "Permit": "Permit"},
|
||||
)
|
||||
_args_schema.annotation = AAZStrArg(
|
||||
options=["--annotation"],
|
||||
arg_group="Properties",
|
||||
help="Switch configuration description.",
|
||||
help="Description for underlying resource.",
|
||||
)
|
||||
_args_schema.route_targets = AAZListArg(
|
||||
options=["--route-targets"],
|
||||
_args_schema.ip_extended_community_rules = AAZListArg(
|
||||
options=["--ip-extended-community-rules"],
|
||||
arg_group="Properties",
|
||||
help="Route Target List.The expected formats are ASN(plain):NN >> example 4294967294:50, ASN.ASN:NN >> example 65533.65333:40, IP-address:NN >> example 10.10.10.10:65535. The possible values of ASN,NN are in range of 0-65535, ASN(plain) is in range of 0-4294967295.",
|
||||
help="List of IP Extended Community Rules.",
|
||||
required=True,
|
||||
)
|
||||
|
||||
route_targets = cls._args_schema.route_targets
|
||||
route_targets.Element = AAZStrArg()
|
||||
ip_extended_community_rules = cls._args_schema.ip_extended_community_rules
|
||||
ip_extended_community_rules.Element = AAZObjectArg()
|
||||
|
||||
_element = cls._args_schema.ip_extended_community_rules.Element
|
||||
_element.action = AAZStrArg(
|
||||
options=["action"],
|
||||
help="Action to be taken on the configuration. Example: Permit.",
|
||||
required=True,
|
||||
enum={"Deny": "Deny", "Permit": "Permit"},
|
||||
)
|
||||
_element.route_targets = AAZListArg(
|
||||
options=["route-targets"],
|
||||
help="Route Target List.The expected formats are ASN(plain):NN >> example 4294967294:50, ASN.ASN:NN >> example 65533.65333:40, IP-address:NN >> example 10.10.10.10:65535. The possible values of ASN,NN are in range of 0-65535, ASN(plain) is in range of 0-4294967295.",
|
||||
required=True,
|
||||
)
|
||||
_element.sequence_number = AAZIntArg(
|
||||
options=["sequence-number"],
|
||||
help="Sequence to insert to/delete from existing route. Prefix lists are evaluated starting with the lowest sequence number and continue down the list until a match is made. Once a match is made, the permit or deny statement is applied to that network and the rest of the list is ignored.",
|
||||
required=True,
|
||||
fmt=AAZIntArgFormat(
|
||||
maximum=4294967295,
|
||||
minimum=1,
|
||||
),
|
||||
)
|
||||
|
||||
route_targets = cls._args_schema.ip_extended_community_rules.Element.route_targets
|
||||
route_targets.Element = AAZStrArg(
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
return cls._args_schema
|
||||
|
||||
def _execute_operations(self):
|
||||
|
@ -180,7 +207,7 @@ class Create(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
@ -206,16 +233,25 @@ class Create(AAZCommand):
|
|||
typ_kwargs={"flags": {"required": True, "client_flatten": True}}
|
||||
)
|
||||
_builder.set_prop("location", AAZStrType, ".location", typ_kwargs={"flags": {"required": True}})
|
||||
_builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
|
||||
_builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={"flags": {"required": True, "client_flatten": True}})
|
||||
_builder.set_prop("tags", AAZDictType, ".tags")
|
||||
|
||||
properties = _builder.get(".properties")
|
||||
if properties is not None:
|
||||
properties.set_prop("action", AAZStrType, ".action", typ_kwargs={"flags": {"required": True}})
|
||||
properties.set_prop("annotation", AAZStrType, ".annotation")
|
||||
properties.set_prop("routeTargets", AAZListType, ".route_targets", typ_kwargs={"flags": {"required": True}})
|
||||
properties.set_prop("ipExtendedCommunityRules", AAZListType, ".ip_extended_community_rules", typ_kwargs={"flags": {"required": True}})
|
||||
|
||||
route_targets = _builder.get(".properties.routeTargets")
|
||||
ip_extended_community_rules = _builder.get(".properties.ipExtendedCommunityRules")
|
||||
if ip_extended_community_rules is not None:
|
||||
ip_extended_community_rules.set_elements(AAZObjectType, ".")
|
||||
|
||||
_elements = _builder.get(".properties.ipExtendedCommunityRules[]")
|
||||
if _elements is not None:
|
||||
_elements.set_prop("action", AAZStrType, ".action", typ_kwargs={"flags": {"required": True}})
|
||||
_elements.set_prop("routeTargets", AAZListType, ".route_targets", typ_kwargs={"flags": {"required": True}})
|
||||
_elements.set_prop("sequenceNumber", AAZIntType, ".sequence_number", typ_kwargs={"flags": {"required": True}})
|
||||
|
||||
route_targets = _builder.get(".properties.ipExtendedCommunityRules[].routeTargets")
|
||||
if route_targets is not None:
|
||||
route_targets.set_elements(AAZStrType, ".")
|
||||
|
||||
|
@ -253,7 +289,7 @@ class Create(AAZCommand):
|
|||
flags={"read_only": True},
|
||||
)
|
||||
_schema_on_200_201.properties = AAZObjectType(
|
||||
flags={"client_flatten": True},
|
||||
flags={"required": True, "client_flatten": True},
|
||||
)
|
||||
_schema_on_200_201.system_data = AAZObjectType(
|
||||
serialized_name="systemData",
|
||||
|
@ -265,20 +301,41 @@ class Create(AAZCommand):
|
|||
)
|
||||
|
||||
properties = cls._schema_on_200_201.properties
|
||||
properties.action = AAZStrType(
|
||||
flags={"required": True},
|
||||
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.ip_extended_community_rules = AAZListType(
|
||||
serialized_name="ipExtendedCommunityRules",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.provisioning_state = AAZStrType(
|
||||
serialized_name="provisioningState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.route_targets = AAZListType(
|
||||
|
||||
ip_extended_community_rules = cls._schema_on_200_201.properties.ip_extended_community_rules
|
||||
ip_extended_community_rules.Element = AAZObjectType()
|
||||
|
||||
_element = cls._schema_on_200_201.properties.ip_extended_community_rules.Element
|
||||
_element.action = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
_element.route_targets = AAZListType(
|
||||
serialized_name="routeTargets",
|
||||
flags={"required": True},
|
||||
)
|
||||
_element.sequence_number = AAZIntType(
|
||||
serialized_name="sequenceNumber",
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
route_targets = cls._schema_on_200_201.properties.route_targets
|
||||
route_targets = cls._schema_on_200_201.properties.ip_extended_community_rules.Element.route_targets
|
||||
route_targets.Element = AAZStrType()
|
||||
|
||||
system_data = cls._schema_on_200_201.system_data
|
||||
|
|
|
@ -15,16 +15,16 @@ from azure.cli.core.aaz import *
|
|||
"networkfabric ipextendedcommunity delete",
|
||||
)
|
||||
class Delete(AAZCommand):
|
||||
"""Delete the Ip Extended Community resource.
|
||||
"""Delete the Ip Extended Community resource
|
||||
|
||||
:example: Delete the Ip Extended Community
|
||||
az networkfabric ipextendedcommunity delete --resource-group "example-rg" --resource-name "example-ipextendedcommunity"
|
||||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-02-01-preview",
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/ipextendedcommunities/{}", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/ipextendedcommunities/{}", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -47,7 +47,7 @@ class Delete(AAZCommand):
|
|||
_args_schema = cls._args_schema
|
||||
_args_schema.resource_name = AAZStrArg(
|
||||
options=["--resource-name"],
|
||||
help="Name of the IP Extended Community",
|
||||
help="Name of the IP Extended Community.",
|
||||
required=True,
|
||||
id_part="name",
|
||||
)
|
||||
|
@ -143,7 +143,7 @@ class Delete(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ from azure.cli.core.aaz import *
|
|||
"networkfabric ipextendedcommunity list",
|
||||
)
|
||||
class List(AAZCommand):
|
||||
"""List all Ip Extended Communities in the provided resource group or subscription.
|
||||
"""List all Ip Extended Communities in the provided resource group or subscription
|
||||
|
||||
:example: List the Ip Extended Communities for Resource Group
|
||||
az networkfabric ipextendedcommunity list --resource-group "example-rg"
|
||||
|
@ -25,10 +25,10 @@ class List(AAZCommand):
|
|||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-02-01-preview",
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/providers/microsoft.managednetworkfabric/ipextendedcommunities", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/ipextendedcommunities", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/providers/microsoft.managednetworkfabric/ipextendedcommunities", "2023-06-15"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/ipextendedcommunities", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -119,7 +119,7 @@ class List(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
@ -171,7 +171,7 @@ class List(AAZCommand):
|
|||
flags={"read_only": True},
|
||||
)
|
||||
_element.properties = AAZObjectType(
|
||||
flags={"client_flatten": True},
|
||||
flags={"required": True, "client_flatten": True},
|
||||
)
|
||||
_element.system_data = AAZObjectType(
|
||||
serialized_name="systemData",
|
||||
|
@ -183,20 +183,41 @@ class List(AAZCommand):
|
|||
)
|
||||
|
||||
properties = cls._schema_on_200.value.Element.properties
|
||||
properties.action = AAZStrType(
|
||||
flags={"required": True},
|
||||
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.ip_extended_community_rules = AAZListType(
|
||||
serialized_name="ipExtendedCommunityRules",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.provisioning_state = AAZStrType(
|
||||
serialized_name="provisioningState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.route_targets = AAZListType(
|
||||
|
||||
ip_extended_community_rules = cls._schema_on_200.value.Element.properties.ip_extended_community_rules
|
||||
ip_extended_community_rules.Element = AAZObjectType()
|
||||
|
||||
_element = cls._schema_on_200.value.Element.properties.ip_extended_community_rules.Element
|
||||
_element.action = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
_element.route_targets = AAZListType(
|
||||
serialized_name="routeTargets",
|
||||
flags={"required": True},
|
||||
)
|
||||
_element.sequence_number = AAZIntType(
|
||||
serialized_name="sequenceNumber",
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
route_targets = cls._schema_on_200.value.Element.properties.route_targets
|
||||
route_targets = cls._schema_on_200.value.Element.properties.ip_extended_community_rules.Element.route_targets
|
||||
route_targets.Element = AAZStrType()
|
||||
|
||||
system_data = cls._schema_on_200.value.Element.system_data
|
||||
|
@ -264,7 +285,7 @@ class List(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
@ -316,7 +337,7 @@ class List(AAZCommand):
|
|||
flags={"read_only": True},
|
||||
)
|
||||
_element.properties = AAZObjectType(
|
||||
flags={"client_flatten": True},
|
||||
flags={"required": True, "client_flatten": True},
|
||||
)
|
||||
_element.system_data = AAZObjectType(
|
||||
serialized_name="systemData",
|
||||
|
@ -328,20 +349,41 @@ class List(AAZCommand):
|
|||
)
|
||||
|
||||
properties = cls._schema_on_200.value.Element.properties
|
||||
properties.action = AAZStrType(
|
||||
flags={"required": True},
|
||||
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.ip_extended_community_rules = AAZListType(
|
||||
serialized_name="ipExtendedCommunityRules",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.provisioning_state = AAZStrType(
|
||||
serialized_name="provisioningState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.route_targets = AAZListType(
|
||||
|
||||
ip_extended_community_rules = cls._schema_on_200.value.Element.properties.ip_extended_community_rules
|
||||
ip_extended_community_rules.Element = AAZObjectType()
|
||||
|
||||
_element = cls._schema_on_200.value.Element.properties.ip_extended_community_rules.Element
|
||||
_element.action = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
_element.route_targets = AAZListType(
|
||||
serialized_name="routeTargets",
|
||||
flags={"required": True},
|
||||
)
|
||||
_element.sequence_number = AAZIntType(
|
||||
serialized_name="sequenceNumber",
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
route_targets = cls._schema_on_200.value.Element.properties.route_targets
|
||||
route_targets = cls._schema_on_200.value.Element.properties.ip_extended_community_rules.Element.route_targets
|
||||
route_targets.Element = AAZStrType()
|
||||
|
||||
system_data = cls._schema_on_200.value.Element.system_data
|
||||
|
|
|
@ -15,16 +15,16 @@ from azure.cli.core.aaz import *
|
|||
"networkfabric ipextendedcommunity show",
|
||||
)
|
||||
class Show(AAZCommand):
|
||||
"""Show details of the provided Ip Extended Community resource.
|
||||
"""Show details of the provided Ip Extended Community resource
|
||||
|
||||
:example: Show the Ip Community
|
||||
:example: Show the Ip Extended Community
|
||||
az networkfabric ipextendedcommunity show --resource-group "example-rg" --resource-name "example-ipextendedcommunity"
|
||||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-02-01-preview",
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/ipextendedcommunities/{}", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/ipextendedcommunities/{}", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -46,7 +46,7 @@ class Show(AAZCommand):
|
|||
_args_schema = cls._args_schema
|
||||
_args_schema.resource_name = AAZStrArg(
|
||||
options=["--resource-name"],
|
||||
help="Name of the IP Extended Community",
|
||||
help="Name of the IP Extended Community.",
|
||||
required=True,
|
||||
id_part="name",
|
||||
)
|
||||
|
@ -121,7 +121,7 @@ class Show(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
@ -164,7 +164,7 @@ class Show(AAZCommand):
|
|||
flags={"read_only": True},
|
||||
)
|
||||
_schema_on_200.properties = AAZObjectType(
|
||||
flags={"client_flatten": True},
|
||||
flags={"required": True, "client_flatten": True},
|
||||
)
|
||||
_schema_on_200.system_data = AAZObjectType(
|
||||
serialized_name="systemData",
|
||||
|
@ -176,20 +176,41 @@ class Show(AAZCommand):
|
|||
)
|
||||
|
||||
properties = cls._schema_on_200.properties
|
||||
properties.action = AAZStrType(
|
||||
flags={"required": True},
|
||||
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.ip_extended_community_rules = AAZListType(
|
||||
serialized_name="ipExtendedCommunityRules",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.provisioning_state = AAZStrType(
|
||||
serialized_name="provisioningState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.route_targets = AAZListType(
|
||||
|
||||
ip_extended_community_rules = cls._schema_on_200.properties.ip_extended_community_rules
|
||||
ip_extended_community_rules.Element = AAZObjectType()
|
||||
|
||||
_element = cls._schema_on_200.properties.ip_extended_community_rules.Element
|
||||
_element.action = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
_element.route_targets = AAZListType(
|
||||
serialized_name="routeTargets",
|
||||
flags={"required": True},
|
||||
)
|
||||
_element.sequence_number = AAZIntType(
|
||||
serialized_name="sequenceNumber",
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
route_targets = cls._schema_on_200.properties.route_targets
|
||||
route_targets = cls._schema_on_200.properties.ip_extended_community_rules.Element.route_targets
|
||||
route_targets.Element = AAZStrType()
|
||||
|
||||
system_data = cls._schema_on_200.system_data
|
||||
|
|
|
@ -20,7 +20,7 @@ class Wait(AAZWaitCommand):
|
|||
|
||||
_aaz_info = {
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/ipextendedcommunities/{}", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/ipextendedcommunities/{}", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@ class Wait(AAZWaitCommand):
|
|||
_args_schema = cls._args_schema
|
||||
_args_schema.resource_name = AAZStrArg(
|
||||
options=["--resource-name"],
|
||||
help="Name of the IP Extended Community",
|
||||
help="Name of the IP Extended Community.",
|
||||
required=True,
|
||||
id_part="name",
|
||||
)
|
||||
|
@ -117,7 +117,7 @@ class Wait(AAZWaitCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
@ -160,7 +160,7 @@ class Wait(AAZWaitCommand):
|
|||
flags={"read_only": True},
|
||||
)
|
||||
_schema_on_200.properties = AAZObjectType(
|
||||
flags={"client_flatten": True},
|
||||
flags={"required": True, "client_flatten": True},
|
||||
)
|
||||
_schema_on_200.system_data = AAZObjectType(
|
||||
serialized_name="systemData",
|
||||
|
@ -172,20 +172,41 @@ class Wait(AAZWaitCommand):
|
|||
)
|
||||
|
||||
properties = cls._schema_on_200.properties
|
||||
properties.action = AAZStrType(
|
||||
flags={"required": True},
|
||||
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.ip_extended_community_rules = AAZListType(
|
||||
serialized_name="ipExtendedCommunityRules",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.provisioning_state = AAZStrType(
|
||||
serialized_name="provisioningState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.route_targets = AAZListType(
|
||||
|
||||
ip_extended_community_rules = cls._schema_on_200.properties.ip_extended_community_rules
|
||||
ip_extended_community_rules.Element = AAZObjectType()
|
||||
|
||||
_element = cls._schema_on_200.properties.ip_extended_community_rules.Element
|
||||
_element.action = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
_element.route_targets = AAZListType(
|
||||
serialized_name="routeTargets",
|
||||
flags={"required": True},
|
||||
)
|
||||
_element.sequence_number = AAZIntType(
|
||||
serialized_name="sequenceNumber",
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
route_targets = cls._schema_on_200.properties.route_targets
|
||||
route_targets = cls._schema_on_200.properties.ip_extended_community_rules.Element.route_targets
|
||||
route_targets.Element = AAZStrType()
|
||||
|
||||
system_data = cls._schema_on_200.system_data
|
||||
|
|
|
@ -15,7 +15,7 @@ from azure.cli.core.aaz import *
|
|||
"networkfabric ipprefix create",
|
||||
)
|
||||
class Create(AAZCommand):
|
||||
"""Create a Ip Prefix resource.
|
||||
"""Create a Ip Prefix resource
|
||||
|
||||
:example: Create a Ip Prefix
|
||||
az networkfabric ipprefix create --resource-group "example-rg" --location "westus3" --resource-name "example-ipprefix" --ip-prefix-rules "[{action:Permit,sequenceNumber:1234,networkPrefix:'1.1.1.0/24',condition:EqualTo,subnetMaskLength:24}]"
|
||||
|
@ -25,9 +25,9 @@ class Create(AAZCommand):
|
|||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-02-01-preview",
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/ipprefixes/{}", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/ipprefixes/{}", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -50,7 +50,7 @@ class Create(AAZCommand):
|
|||
_args_schema = cls._args_schema
|
||||
_args_schema.resource_name = AAZStrArg(
|
||||
options=["--resource-name"],
|
||||
help="Name of the IP Prefix",
|
||||
help="Name of the IP Prefix.",
|
||||
required=True,
|
||||
)
|
||||
_args_schema.resource_group = AAZResourceGroupNameArg(
|
||||
|
@ -84,12 +84,12 @@ class Create(AAZCommand):
|
|||
_args_schema.annotation = AAZStrArg(
|
||||
options=["--annotation"],
|
||||
arg_group="Properties",
|
||||
help="Switch configuration description.",
|
||||
help="Description for underlying resource.",
|
||||
)
|
||||
_args_schema.ip_prefix_rules = AAZListArg(
|
||||
options=["--ip-prefix-rules"],
|
||||
arg_group="Properties",
|
||||
help="IpPrefix contains the list of IP PrefixRules objects.",
|
||||
help="The list of IP Prefix Rules.",
|
||||
required=True,
|
||||
)
|
||||
|
||||
|
@ -99,36 +99,32 @@ class Create(AAZCommand):
|
|||
_element = cls._args_schema.ip_prefix_rules.Element
|
||||
_element.action = AAZStrArg(
|
||||
options=["action"],
|
||||
help="Action to be taken on the configuration. Example: Permit | Deny.",
|
||||
help="Action to be taken on the configuration. Example: Permit.",
|
||||
required=True,
|
||||
enum={"Deny": "Deny", "Permit": "Permit"},
|
||||
)
|
||||
_element.condition = AAZStrArg(
|
||||
options=["condition"],
|
||||
help="Specify prefix-list bounds.",
|
||||
enum={"EqualTo": "EqualTo", "GreaterThanOrEqualTo": "GreaterThanOrEqualTo", "LesserThanOrEqualTo": "LesserThanOrEqualTo"},
|
||||
enum={"EqualTo": "EqualTo", "GreaterThanOrEqualTo": "GreaterThanOrEqualTo", "LesserThanOrEqualTo": "LesserThanOrEqualTo", "Range": "Range"},
|
||||
)
|
||||
_element.network_prefix = AAZStrArg(
|
||||
options=["network-prefix"],
|
||||
help="Network Prefix specifying IPv4/IPv6 packets to be permitted or denied. Example: 1.1.1.0/24 | 3FFE:FFFF:0:CD30::/126 ",
|
||||
help="Network Prefix specifying IPv4/IPv6 packets to be permitted or denied. Example: 1.1.1.0/24.",
|
||||
required=True,
|
||||
)
|
||||
_element.sequence_number = AAZIntArg(
|
||||
options=["sequence-number"],
|
||||
help="Sequence to insert to/delete from existing route. Prefix lists are evaluated starting with the lowest sequence number and continue down the list until a match is made. Once a match is made, the permit or deny statement is applied to that network and the rest of the list is ignored. The value should be between 1 to 4294967295.",
|
||||
help="Sequence to insert to/delete from existing route. Prefix lists are evaluated starting with the lowest sequence number and continue down the list until a match is made. Once a match is made, the permit or deny statement is applied to that network and the rest of the list is ignored.",
|
||||
required=True,
|
||||
fmt=AAZIntArgFormat(
|
||||
maximum=4294967295,
|
||||
minimum=1,
|
||||
),
|
||||
)
|
||||
_element.subnet_mask_length = AAZIntArg(
|
||||
_element.subnet_mask_length = AAZStrArg(
|
||||
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.",
|
||||
fmt=AAZIntArgFormat(
|
||||
maximum=128,
|
||||
minimum=1,
|
||||
),
|
||||
help="SubnetMaskLength gives the minimum NetworkPrefix length to be matched. Possible values for IPv4 are 1 - 32 . Possible values of IPv6 are 1 - 128.",
|
||||
)
|
||||
return cls._args_schema
|
||||
|
||||
|
@ -213,7 +209,7 @@ class Create(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
@ -257,7 +253,7 @@ class Create(AAZCommand):
|
|||
_elements.set_prop("condition", AAZStrType, ".condition")
|
||||
_elements.set_prop("networkPrefix", AAZStrType, ".network_prefix", typ_kwargs={"flags": {"required": True}})
|
||||
_elements.set_prop("sequenceNumber", AAZIntType, ".sequence_number", typ_kwargs={"flags": {"required": True}})
|
||||
_elements.set_prop("subnetMaskLength", AAZIntType, ".subnet_mask_length")
|
||||
_elements.set_prop("subnetMaskLength", AAZStrType, ".subnet_mask_length")
|
||||
|
||||
tags = _builder.get(".tags")
|
||||
if tags is not None:
|
||||
|
@ -305,7 +301,15 @@ class Create(AAZCommand):
|
|||
)
|
||||
|
||||
properties = cls._schema_on_200_201.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.ip_prefix_rules = AAZListType(
|
||||
serialized_name="ipPrefixRules",
|
||||
flags={"required": True},
|
||||
|
@ -331,7 +335,7 @@ class Create(AAZCommand):
|
|||
serialized_name="sequenceNumber",
|
||||
flags={"required": True},
|
||||
)
|
||||
_element.subnet_mask_length = AAZIntType(
|
||||
_element.subnet_mask_length = AAZStrType(
|
||||
serialized_name="subnetMaskLength",
|
||||
)
|
||||
|
||||
|
|
|
@ -15,16 +15,16 @@ from azure.cli.core.aaz import *
|
|||
"networkfabric ipprefix delete",
|
||||
)
|
||||
class Delete(AAZCommand):
|
||||
"""Delete the Ip Prefix resource.
|
||||
"""Delete the Ip Prefix resource
|
||||
|
||||
:example: Delete the Ip Prefix
|
||||
az networkfabric ipprefix delete --resource-group "example-rg" --resource-name "example-ipprefix"
|
||||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-02-01-preview",
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/ipprefixes/{}", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/ipprefixes/{}", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -47,7 +47,7 @@ class Delete(AAZCommand):
|
|||
_args_schema = cls._args_schema
|
||||
_args_schema.resource_name = AAZStrArg(
|
||||
options=["--resource-name"],
|
||||
help="Name of the IP Prefix",
|
||||
help="Name of the IP Prefix.",
|
||||
required=True,
|
||||
id_part="name",
|
||||
)
|
||||
|
@ -143,7 +143,7 @@ class Delete(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ from azure.cli.core.aaz import *
|
|||
"networkfabric ipprefix list",
|
||||
)
|
||||
class List(AAZCommand):
|
||||
"""List all Ip Prefixes in the provided resource group or subscription.
|
||||
"""List all Ip Prefixes in the provided resource group or subscription
|
||||
|
||||
:example: List the Ip Prefixes for Resource Group
|
||||
az networkfabric ipprefix list --resource-group "example-rg"
|
||||
|
@ -25,10 +25,10 @@ class List(AAZCommand):
|
|||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-02-01-preview",
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/providers/microsoft.managednetworkfabric/ipprefixes", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/ipprefixes", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/providers/microsoft.managednetworkfabric/ipprefixes", "2023-06-15"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/ipprefixes", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -119,7 +119,7 @@ class List(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
@ -183,7 +183,15 @@ class List(AAZCommand):
|
|||
)
|
||||
|
||||
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.ip_prefix_rules = AAZListType(
|
||||
serialized_name="ipPrefixRules",
|
||||
flags={"required": True},
|
||||
|
@ -209,7 +217,7 @@ class List(AAZCommand):
|
|||
serialized_name="sequenceNumber",
|
||||
flags={"required": True},
|
||||
)
|
||||
_element.subnet_mask_length = AAZIntType(
|
||||
_element.subnet_mask_length = AAZStrType(
|
||||
serialized_name="subnetMaskLength",
|
||||
)
|
||||
|
||||
|
@ -278,7 +286,7 @@ class List(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
@ -342,7 +350,15 @@ class List(AAZCommand):
|
|||
)
|
||||
|
||||
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.ip_prefix_rules = AAZListType(
|
||||
serialized_name="ipPrefixRules",
|
||||
flags={"required": True},
|
||||
|
@ -368,7 +384,7 @@ class List(AAZCommand):
|
|||
serialized_name="sequenceNumber",
|
||||
flags={"required": True},
|
||||
)
|
||||
_element.subnet_mask_length = AAZIntType(
|
||||
_element.subnet_mask_length = AAZStrType(
|
||||
serialized_name="subnetMaskLength",
|
||||
)
|
||||
|
||||
|
|
|
@ -15,16 +15,16 @@ from azure.cli.core.aaz import *
|
|||
"networkfabric ipprefix show",
|
||||
)
|
||||
class Show(AAZCommand):
|
||||
"""Show details of the provided Ip Prefix resource.
|
||||
"""Show details of the provided Ip Prefix resource
|
||||
|
||||
:example: Show the Ip Prefix
|
||||
az networkfabric ipprefix show --resource-group "example-rg" --resource-name "example-ipprefix"
|
||||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-02-01-preview",
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/ipprefixes/{}", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/ipprefixes/{}", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -46,7 +46,7 @@ class Show(AAZCommand):
|
|||
_args_schema = cls._args_schema
|
||||
_args_schema.resource_name = AAZStrArg(
|
||||
options=["--resource-name"],
|
||||
help="Name of the IP Prefix",
|
||||
help="Name of the IP Prefix.",
|
||||
required=True,
|
||||
id_part="name",
|
||||
)
|
||||
|
@ -121,7 +121,7 @@ class Show(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
@ -176,7 +176,15 @@ class Show(AAZCommand):
|
|||
)
|
||||
|
||||
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.ip_prefix_rules = AAZListType(
|
||||
serialized_name="ipPrefixRules",
|
||||
flags={"required": True},
|
||||
|
@ -202,7 +210,7 @@ class Show(AAZCommand):
|
|||
serialized_name="sequenceNumber",
|
||||
flags={"required": True},
|
||||
)
|
||||
_element.subnet_mask_length = AAZIntType(
|
||||
_element.subnet_mask_length = AAZStrType(
|
||||
serialized_name="subnetMaskLength",
|
||||
)
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ class Wait(AAZWaitCommand):
|
|||
|
||||
_aaz_info = {
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/ipprefixes/{}", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/ipprefixes/{}", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@ class Wait(AAZWaitCommand):
|
|||
_args_schema = cls._args_schema
|
||||
_args_schema.resource_name = AAZStrArg(
|
||||
options=["--resource-name"],
|
||||
help="Name of the IP Prefix",
|
||||
help="Name of the IP Prefix.",
|
||||
required=True,
|
||||
id_part="name",
|
||||
)
|
||||
|
@ -117,7 +117,7 @@ class Wait(AAZWaitCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
@ -172,7 +172,15 @@ class Wait(AAZWaitCommand):
|
|||
)
|
||||
|
||||
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.ip_prefix_rules = AAZListType(
|
||||
serialized_name="ipPrefixRules",
|
||||
flags={"required": True},
|
||||
|
@ -198,7 +206,7 @@ class Wait(AAZWaitCommand):
|
|||
serialized_name="sequenceNumber",
|
||||
flags={"required": True},
|
||||
)
|
||||
_element.subnet_mask_length = AAZIntType(
|
||||
_element.subnet_mask_length = AAZStrType(
|
||||
serialized_name="subnetMaskLength",
|
||||
)
|
||||
|
||||
|
|
|
@ -13,5 +13,6 @@ from ._create import *
|
|||
from ._delete import *
|
||||
from ._list import *
|
||||
from ._show import *
|
||||
from ._update import *
|
||||
from ._update_admin_state import *
|
||||
from ._wait import *
|
||||
|
|
|
@ -15,16 +15,16 @@ from azure.cli.core.aaz import *
|
|||
"networkfabric l2domain create",
|
||||
)
|
||||
class Create(AAZCommand):
|
||||
"""Create a L2 Isolation Domain resource.
|
||||
"""Create a L2 Isolation Domain resource
|
||||
|
||||
:example: Create a L2 Isolation Domain
|
||||
az networkfabric l2domain create --resource-group "example-rg" --resource-name "example-l2domain" --location "westus3" --nf-id "/subscriptions/xxxxxx-xxxxxx-xxxx-xxxx-xxxxxx/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/NetworkFabrics/example-fabricName" --vlan-id 501 --mtu 1500
|
||||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-02-01-preview",
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/l2isolationdomains/{}", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/l2isolationdomains/{}", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -47,7 +47,7 @@ class Create(AAZCommand):
|
|||
_args_schema = cls._args_schema
|
||||
_args_schema.resource_name = AAZStrArg(
|
||||
options=["--resource-name"],
|
||||
help="Name of the L2 Isolation Domain",
|
||||
help="Name of the L2 Isolation Domain.",
|
||||
required=True,
|
||||
)
|
||||
_args_schema.resource_group = AAZResourceGroupNameArg(
|
||||
|
@ -81,22 +81,32 @@ class Create(AAZCommand):
|
|||
_args_schema.annotation = AAZStrArg(
|
||||
options=["--annotation"],
|
||||
arg_group="Properties",
|
||||
help="Switch configuration description.",
|
||||
help="Description for underlying resource.",
|
||||
)
|
||||
_args_schema.mtu = AAZIntArg(
|
||||
options=["--mtu"],
|
||||
arg_group="Properties",
|
||||
help="Maximum transmission unit: The value should be between 1500-9000. Default value is 1500",
|
||||
help="Maximum transmission unit. The value should be between 64 to 9200. Default value is 1500. Example: 1500.",
|
||||
fmt=AAZIntArgFormat(
|
||||
maximum=9200,
|
||||
minimum=64,
|
||||
),
|
||||
)
|
||||
_args_schema.nf_id = AAZStrArg(
|
||||
_args_schema.nf_id = AAZResourceIdArg(
|
||||
options=["--nf-id"],
|
||||
arg_group="Properties",
|
||||
help="Resource ID of the Network Fabric resource",
|
||||
help="ARM Resource ID of the Network Fabric.",
|
||||
required=True,
|
||||
)
|
||||
_args_schema.vlan_id = AAZIntArg(
|
||||
options=["--vlan-id"],
|
||||
arg_group="Properties",
|
||||
help="Vlan identifier value. The value should be between 501-4095. Example: 501.",
|
||||
help="Vlan Identifier of the Network Fabric. The value should be between 100 to 4094. Example: 501.",
|
||||
required=True,
|
||||
fmt=AAZIntArgFormat(
|
||||
maximum=4094,
|
||||
minimum=100,
|
||||
),
|
||||
)
|
||||
return cls._args_schema
|
||||
|
||||
|
@ -181,7 +191,7 @@ class Create(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
@ -207,7 +217,7 @@ class Create(AAZCommand):
|
|||
typ_kwargs={"flags": {"required": True, "client_flatten": True}}
|
||||
)
|
||||
_builder.set_prop("location", AAZStrType, ".location", typ_kwargs={"flags": {"required": True}})
|
||||
_builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
|
||||
_builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={"flags": {"required": True, "client_flatten": True}})
|
||||
_builder.set_prop("tags", AAZDictType, ".tags")
|
||||
|
||||
properties = _builder.get(".properties")
|
||||
|
@ -251,7 +261,7 @@ class Create(AAZCommand):
|
|||
flags={"read_only": True},
|
||||
)
|
||||
_schema_on_200_201.properties = AAZObjectType(
|
||||
flags={"client_flatten": True},
|
||||
flags={"required": True, "client_flatten": True},
|
||||
)
|
||||
_schema_on_200_201.system_data = AAZObjectType(
|
||||
serialized_name="systemData",
|
||||
|
@ -268,8 +278,8 @@ class Create(AAZCommand):
|
|||
flags={"read_only": True},
|
||||
)
|
||||
properties.annotation = AAZStrType()
|
||||
properties.disabled_on_resources = AAZListType(
|
||||
serialized_name="disabledOnResources",
|
||||
properties.configuration_state = AAZStrType(
|
||||
serialized_name="configurationState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.mtu = AAZIntType()
|
||||
|
@ -286,9 +296,6 @@ class Create(AAZCommand):
|
|||
flags={"required": True},
|
||||
)
|
||||
|
||||
disabled_on_resources = cls._schema_on_200_201.properties.disabled_on_resources
|
||||
disabled_on_resources.Element = AAZStrType()
|
||||
|
||||
system_data = cls._schema_on_200_201.system_data
|
||||
system_data.created_at = AAZStrType(
|
||||
serialized_name="createdAt",
|
||||
|
|
|
@ -15,16 +15,16 @@ from azure.cli.core.aaz import *
|
|||
"networkfabric l2domain delete",
|
||||
)
|
||||
class Delete(AAZCommand):
|
||||
"""Delete the L2 Isolation Domain resource.
|
||||
"""Delete the L2 Isolation Domain resource
|
||||
|
||||
:example: Delete the L2 Isolation Domain
|
||||
az networkfabric l2domain delete --resource-group "example-rg" --resource-name "example-l2domain"
|
||||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-02-01-preview",
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/l2isolationdomains/{}", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/l2isolationdomains/{}", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -47,7 +47,7 @@ class Delete(AAZCommand):
|
|||
_args_schema = cls._args_schema
|
||||
_args_schema.resource_name = AAZStrArg(
|
||||
options=["--resource-name"],
|
||||
help="Name of the L2 Isolation Domain",
|
||||
help="Name of the L2 Isolation Domain.",
|
||||
required=True,
|
||||
id_part="name",
|
||||
)
|
||||
|
@ -143,7 +143,7 @@ class Delete(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ from azure.cli.core.aaz import *
|
|||
"networkfabric l2domain list",
|
||||
)
|
||||
class List(AAZCommand):
|
||||
"""List all L2 Isolation Domains in the provided resource group or subscription.
|
||||
"""List all L2 Isolation Domains in the provided resource group or subscription
|
||||
|
||||
:example: List the L2 Isolation Domains for Resource Group
|
||||
az networkfabric l2domain list --resource-group "example-rg"
|
||||
|
@ -25,10 +25,10 @@ class List(AAZCommand):
|
|||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-02-01-preview",
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/providers/microsoft.managednetworkfabric/l2isolationdomains", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/l2isolationdomains", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/providers/microsoft.managednetworkfabric/l2isolationdomains", "2023-06-15"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/l2isolationdomains", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -119,7 +119,7 @@ class List(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
@ -171,7 +171,7 @@ class List(AAZCommand):
|
|||
flags={"read_only": True},
|
||||
)
|
||||
_element.properties = AAZObjectType(
|
||||
flags={"client_flatten": True},
|
||||
flags={"required": True, "client_flatten": True},
|
||||
)
|
||||
_element.system_data = AAZObjectType(
|
||||
serialized_name="systemData",
|
||||
|
@ -188,8 +188,8 @@ class List(AAZCommand):
|
|||
flags={"read_only": True},
|
||||
)
|
||||
properties.annotation = AAZStrType()
|
||||
properties.disabled_on_resources = AAZListType(
|
||||
serialized_name="disabledOnResources",
|
||||
properties.configuration_state = AAZStrType(
|
||||
serialized_name="configurationState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.mtu = AAZIntType()
|
||||
|
@ -206,9 +206,6 @@ class List(AAZCommand):
|
|||
flags={"required": True},
|
||||
)
|
||||
|
||||
disabled_on_resources = cls._schema_on_200.value.Element.properties.disabled_on_resources
|
||||
disabled_on_resources.Element = AAZStrType()
|
||||
|
||||
system_data = cls._schema_on_200.value.Element.system_data
|
||||
system_data.created_at = AAZStrType(
|
||||
serialized_name="createdAt",
|
||||
|
@ -274,7 +271,7 @@ class List(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
@ -326,7 +323,7 @@ class List(AAZCommand):
|
|||
flags={"read_only": True},
|
||||
)
|
||||
_element.properties = AAZObjectType(
|
||||
flags={"client_flatten": True},
|
||||
flags={"required": True, "client_flatten": True},
|
||||
)
|
||||
_element.system_data = AAZObjectType(
|
||||
serialized_name="systemData",
|
||||
|
@ -343,8 +340,8 @@ class List(AAZCommand):
|
|||
flags={"read_only": True},
|
||||
)
|
||||
properties.annotation = AAZStrType()
|
||||
properties.disabled_on_resources = AAZListType(
|
||||
serialized_name="disabledOnResources",
|
||||
properties.configuration_state = AAZStrType(
|
||||
serialized_name="configurationState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.mtu = AAZIntType()
|
||||
|
@ -361,9 +358,6 @@ class List(AAZCommand):
|
|||
flags={"required": True},
|
||||
)
|
||||
|
||||
disabled_on_resources = cls._schema_on_200.value.Element.properties.disabled_on_resources
|
||||
disabled_on_resources.Element = AAZStrType()
|
||||
|
||||
system_data = cls._schema_on_200.value.Element.system_data
|
||||
system_data.created_at = AAZStrType(
|
||||
serialized_name="createdAt",
|
||||
|
|
|
@ -15,16 +15,16 @@ from azure.cli.core.aaz import *
|
|||
"networkfabric l2domain show",
|
||||
)
|
||||
class Show(AAZCommand):
|
||||
"""Show details of the provided L2 Isolation Domain resource.
|
||||
"""Show details of the provided L2 Isolation Domain resource
|
||||
|
||||
:example: Show the L2 Isolation Domain
|
||||
az networkfabric l2domain show --resource-group "example-rg" --resource-name "example-l2domain"
|
||||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-02-01-preview",
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/l2isolationdomains/{}", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/l2isolationdomains/{}", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -46,7 +46,7 @@ class Show(AAZCommand):
|
|||
_args_schema = cls._args_schema
|
||||
_args_schema.resource_name = AAZStrArg(
|
||||
options=["--resource-name"],
|
||||
help="Name of the L2 Isolation Domain",
|
||||
help="Name of the L2 Isolation Domain.",
|
||||
required=True,
|
||||
id_part="name",
|
||||
)
|
||||
|
@ -121,7 +121,7 @@ class Show(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
@ -164,7 +164,7 @@ class Show(AAZCommand):
|
|||
flags={"read_only": True},
|
||||
)
|
||||
_schema_on_200.properties = AAZObjectType(
|
||||
flags={"client_flatten": True},
|
||||
flags={"required": True, "client_flatten": True},
|
||||
)
|
||||
_schema_on_200.system_data = AAZObjectType(
|
||||
serialized_name="systemData",
|
||||
|
@ -181,8 +181,8 @@ class Show(AAZCommand):
|
|||
flags={"read_only": True},
|
||||
)
|
||||
properties.annotation = AAZStrType()
|
||||
properties.disabled_on_resources = AAZListType(
|
||||
serialized_name="disabledOnResources",
|
||||
properties.configuration_state = AAZStrType(
|
||||
serialized_name="configurationState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.mtu = AAZIntType()
|
||||
|
@ -199,9 +199,6 @@ class Show(AAZCommand):
|
|||
flags={"required": True},
|
||||
)
|
||||
|
||||
disabled_on_resources = cls._schema_on_200.properties.disabled_on_resources
|
||||
disabled_on_resources.Element = AAZStrType()
|
||||
|
||||
system_data = cls._schema_on_200.system_data
|
||||
system_data.created_at = AAZStrType(
|
||||
serialized_name="createdAt",
|
||||
|
|
|
@ -0,0 +1,303 @@
|
|||
# --------------------------------------------------------------------------------------------
|
||||
# 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 l2domain update",
|
||||
)
|
||||
class Update(AAZCommand):
|
||||
"""Update the L2 Isolation Domain resource.
|
||||
|
||||
:example: Update the L2 Isolation Domain
|
||||
az networkfabric l2domain update --resource-group "example-rg" --resource-name "example-l2domain" --mtu 1500
|
||||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/l2isolationdomains/{}", "2023-06-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 L2 Isolation Domain.",
|
||||
required=True,
|
||||
id_part="name",
|
||||
)
|
||||
_args_schema.resource_group = AAZResourceGroupNameArg(
|
||||
help="Name of the resource group",
|
||||
required=True,
|
||||
)
|
||||
|
||||
# define Arg Group "Body"
|
||||
|
||||
_args_schema = cls._args_schema
|
||||
_args_schema.tags = AAZDictArg(
|
||||
options=["--tags"],
|
||||
arg_group="Body",
|
||||
help="Resource tags",
|
||||
)
|
||||
|
||||
tags = cls._args_schema.tags
|
||||
tags.Element = AAZStrArg()
|
||||
|
||||
# define Arg Group "Properties"
|
||||
|
||||
_args_schema = cls._args_schema
|
||||
_args_schema.annotation = AAZStrArg(
|
||||
options=["--annotation"],
|
||||
arg_group="Properties",
|
||||
help="Description for underlying resource.",
|
||||
)
|
||||
_args_schema.mtu = AAZIntArg(
|
||||
options=["--mtu"],
|
||||
arg_group="Properties",
|
||||
help="Maximum transmission unit. The value should be between 64 to 9200. Default value is 1500. Example: 1500.",
|
||||
fmt=AAZIntArgFormat(
|
||||
maximum=9200,
|
||||
minimum=64,
|
||||
),
|
||||
)
|
||||
return cls._args_schema
|
||||
|
||||
def _execute_operations(self):
|
||||
self.pre_operations()
|
||||
yield self.L2IsolationDomainsUpdate(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 L2IsolationDomainsUpdate(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/l2IsolationDomains/{l2IsolationDomainName}",
|
||||
**self.url_parameters
|
||||
)
|
||||
|
||||
@property
|
||||
def method(self):
|
||||
return "PATCH"
|
||||
|
||||
@property
|
||||
def error_format(self):
|
||||
return "MgmtErrorFormat"
|
||||
|
||||
@property
|
||||
def url_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_url_param(
|
||||
"l2IsolationDomainName", self.ctx.args.resource_name,
|
||||
required=True,
|
||||
),
|
||||
**self.serialize_url_param(
|
||||
"resourceGroupName", self.ctx.args.resource_group,
|
||||
required=True,
|
||||
),
|
||||
**self.serialize_url_param(
|
||||
"subscriptionId", self.ctx.subscription_id,
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
return parameters
|
||||
|
||||
@property
|
||||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
return parameters
|
||||
|
||||
@property
|
||||
def header_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_header_param(
|
||||
"Content-Type", "application/json",
|
||||
),
|
||||
**self.serialize_header_param(
|
||||
"Accept", "application/json",
|
||||
),
|
||||
}
|
||||
return parameters
|
||||
|
||||
@property
|
||||
def content(self):
|
||||
_content_value, _builder = self.new_content_builder(
|
||||
self.ctx.args,
|
||||
typ=AAZObjectType,
|
||||
typ_kwargs={"flags": {"required": True, "client_flatten": True}}
|
||||
)
|
||||
_builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
|
||||
_builder.set_prop("tags", AAZDictType, ".tags")
|
||||
|
||||
properties = _builder.get(".properties")
|
||||
if properties is not None:
|
||||
properties.set_prop("annotation", AAZStrType, ".annotation")
|
||||
properties.set_prop("mtu", AAZIntType, ".mtu")
|
||||
|
||||
tags = _builder.get(".tags")
|
||||
if tags is not None:
|
||||
tags.set_elements(AAZStrType, ".")
|
||||
|
||||
return self.serialize_content(_content_value)
|
||||
|
||||
def on_200(self, session):
|
||||
data = self.deserialize_http_content(session)
|
||||
self.ctx.set_var(
|
||||
"instance",
|
||||
data,
|
||||
schema_builder=self._build_schema_on_200
|
||||
)
|
||||
|
||||
_schema_on_200 = None
|
||||
|
||||
@classmethod
|
||||
def _build_schema_on_200(cls):
|
||||
if cls._schema_on_200 is not None:
|
||||
return cls._schema_on_200
|
||||
|
||||
cls._schema_on_200 = AAZObjectType()
|
||||
|
||||
_schema_on_200 = cls._schema_on_200
|
||||
_schema_on_200.id = AAZStrType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_schema_on_200.location = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
_schema_on_200.name = AAZStrType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_schema_on_200.properties = AAZObjectType(
|
||||
flags={"required": True, "client_flatten": True},
|
||||
)
|
||||
_schema_on_200.system_data = AAZObjectType(
|
||||
serialized_name="systemData",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_schema_on_200.tags = AAZDictType()
|
||||
_schema_on_200.type = AAZStrType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
|
||||
properties = cls._schema_on_200.properties
|
||||
properties.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.mtu = AAZIntType()
|
||||
properties.network_fabric_id = AAZStrType(
|
||||
serialized_name="networkFabricId",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.provisioning_state = AAZStrType(
|
||||
serialized_name="provisioningState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.vlan_id = AAZIntType(
|
||||
serialized_name="vlanId",
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
system_data = cls._schema_on_200.system_data
|
||||
system_data.created_at = AAZStrType(
|
||||
serialized_name="createdAt",
|
||||
)
|
||||
system_data.created_by = AAZStrType(
|
||||
serialized_name="createdBy",
|
||||
)
|
||||
system_data.created_by_type = AAZStrType(
|
||||
serialized_name="createdByType",
|
||||
)
|
||||
system_data.last_modified_at = AAZStrType(
|
||||
serialized_name="lastModifiedAt",
|
||||
)
|
||||
system_data.last_modified_by = AAZStrType(
|
||||
serialized_name="lastModifiedBy",
|
||||
)
|
||||
system_data.last_modified_by_type = AAZStrType(
|
||||
serialized_name="lastModifiedByType",
|
||||
)
|
||||
|
||||
tags = cls._schema_on_200.tags
|
||||
tags.Element = AAZStrType()
|
||||
|
||||
return cls._schema_on_200
|
||||
|
||||
|
||||
class _UpdateHelper:
|
||||
"""Helper class for Update"""
|
||||
|
||||
|
||||
__all__ = ["Update"]
|
|
@ -22,9 +22,9 @@ class UpdateAdminState(AAZCommand):
|
|||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-02-01-preview",
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/l2isolationdomains/{}/updateadministrativestate", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/l2isolationdomains/{}/updateadministrativestate", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@ class UpdateAdminState(AAZCommand):
|
|||
|
||||
def _handler(self, command_args):
|
||||
super()._handler(command_args)
|
||||
return self.build_lro_poller(self._execute_operations, None)
|
||||
return self.build_lro_poller(self._execute_operations, self._output)
|
||||
|
||||
_args_schema = None
|
||||
|
||||
|
@ -47,7 +47,7 @@ class UpdateAdminState(AAZCommand):
|
|||
_args_schema = cls._args_schema
|
||||
_args_schema.resource_name = AAZStrArg(
|
||||
options=["--resource-name"],
|
||||
help="Name of the L2IsolationDomain.",
|
||||
help="Name of the L2 Isolation Domain.",
|
||||
required=True,
|
||||
id_part="name",
|
||||
)
|
||||
|
@ -88,6 +88,10 @@ class UpdateAdminState(AAZCommand):
|
|||
def post_operations(self):
|
||||
pass
|
||||
|
||||
def _output(self, *args, **kwargs):
|
||||
result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True)
|
||||
return result
|
||||
|
||||
class L2IsolationDomainsUpdateAdministrativeState(AAZHttpOperation):
|
||||
CLIENT_TYPE = "MgmtClient"
|
||||
|
||||
|
@ -152,7 +156,7 @@ class UpdateAdminState(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
@ -164,6 +168,9 @@ class UpdateAdminState(AAZCommand):
|
|||
**self.serialize_header_param(
|
||||
"Content-Type", "application/json",
|
||||
),
|
||||
**self.serialize_header_param(
|
||||
"Accept", "application/json",
|
||||
),
|
||||
}
|
||||
return parameters
|
||||
|
||||
|
@ -184,11 +191,116 @@ class UpdateAdminState(AAZCommand):
|
|||
return self.serialize_content(_content_value)
|
||||
|
||||
def on_200(self, session):
|
||||
pass
|
||||
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()
|
||||
_UpdateAdminStateHelper._build_schema_common_post_action_response_for_device_update_read(cls._schema_on_200)
|
||||
|
||||
return cls._schema_on_200
|
||||
|
||||
|
||||
class _UpdateAdminStateHelper:
|
||||
"""Helper class for UpdateAdminState"""
|
||||
|
||||
_schema_common_post_action_response_for_device_update_read = None
|
||||
|
||||
@classmethod
|
||||
def _build_schema_common_post_action_response_for_device_update_read(cls, _schema):
|
||||
if cls._schema_common_post_action_response_for_device_update_read is not None:
|
||||
_schema.configuration_state = cls._schema_common_post_action_response_for_device_update_read.configuration_state
|
||||
_schema.error = cls._schema_common_post_action_response_for_device_update_read.error
|
||||
_schema.failed_devices = cls._schema_common_post_action_response_for_device_update_read.failed_devices
|
||||
_schema.successful_devices = cls._schema_common_post_action_response_for_device_update_read.successful_devices
|
||||
return
|
||||
|
||||
cls._schema_common_post_action_response_for_device_update_read = _schema_common_post_action_response_for_device_update_read = AAZObjectType()
|
||||
|
||||
common_post_action_response_for_device_update_read = _schema_common_post_action_response_for_device_update_read
|
||||
common_post_action_response_for_device_update_read.configuration_state = AAZStrType(
|
||||
serialized_name="configurationState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
common_post_action_response_for_device_update_read.error = AAZObjectType()
|
||||
cls._build_schema_error_detail_read(common_post_action_response_for_device_update_read.error)
|
||||
common_post_action_response_for_device_update_read.failed_devices = AAZListType(
|
||||
serialized_name="failedDevices",
|
||||
)
|
||||
common_post_action_response_for_device_update_read.successful_devices = AAZListType(
|
||||
serialized_name="successfulDevices",
|
||||
)
|
||||
|
||||
failed_devices = _schema_common_post_action_response_for_device_update_read.failed_devices
|
||||
failed_devices.Element = AAZStrType()
|
||||
|
||||
successful_devices = _schema_common_post_action_response_for_device_update_read.successful_devices
|
||||
successful_devices.Element = AAZStrType()
|
||||
|
||||
_schema.configuration_state = cls._schema_common_post_action_response_for_device_update_read.configuration_state
|
||||
_schema.error = cls._schema_common_post_action_response_for_device_update_read.error
|
||||
_schema.failed_devices = cls._schema_common_post_action_response_for_device_update_read.failed_devices
|
||||
_schema.successful_devices = cls._schema_common_post_action_response_for_device_update_read.successful_devices
|
||||
|
||||
_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.type = AAZStrType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
|
||||
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
|
||||
|
||||
|
||||
__all__ = ["UpdateAdminState"]
|
||||
|
|
|
@ -20,7 +20,7 @@ class Wait(AAZWaitCommand):
|
|||
|
||||
_aaz_info = {
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/l2isolationdomains/{}", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/l2isolationdomains/{}", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@ class Wait(AAZWaitCommand):
|
|||
_args_schema = cls._args_schema
|
||||
_args_schema.resource_name = AAZStrArg(
|
||||
options=["--resource-name"],
|
||||
help="Name of the L2 Isolation Domain",
|
||||
help="Name of the L2 Isolation Domain.",
|
||||
required=True,
|
||||
id_part="name",
|
||||
)
|
||||
|
@ -117,7 +117,7 @@ class Wait(AAZWaitCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
@ -160,7 +160,7 @@ class Wait(AAZWaitCommand):
|
|||
flags={"read_only": True},
|
||||
)
|
||||
_schema_on_200.properties = AAZObjectType(
|
||||
flags={"client_flatten": True},
|
||||
flags={"required": True, "client_flatten": True},
|
||||
)
|
||||
_schema_on_200.system_data = AAZObjectType(
|
||||
serialized_name="systemData",
|
||||
|
@ -177,8 +177,8 @@ class Wait(AAZWaitCommand):
|
|||
flags={"read_only": True},
|
||||
)
|
||||
properties.annotation = AAZStrType()
|
||||
properties.disabled_on_resources = AAZListType(
|
||||
serialized_name="disabledOnResources",
|
||||
properties.configuration_state = AAZStrType(
|
||||
serialized_name="configurationState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.mtu = AAZIntType()
|
||||
|
@ -195,9 +195,6 @@ class Wait(AAZWaitCommand):
|
|||
flags={"required": True},
|
||||
)
|
||||
|
||||
disabled_on_resources = cls._schema_on_200.properties.disabled_on_resources
|
||||
disabled_on_resources.Element = AAZStrType()
|
||||
|
||||
system_data = cls._schema_on_200.system_data
|
||||
system_data.created_at = AAZStrType(
|
||||
serialized_name="createdAt",
|
||||
|
|
|
@ -13,5 +13,6 @@ from ._create import *
|
|||
from ._delete import *
|
||||
from ._list import *
|
||||
from ._show import *
|
||||
from ._update import *
|
||||
from ._update_admin_state import *
|
||||
from ._wait import *
|
||||
|
|
|
@ -15,19 +15,19 @@ from azure.cli.core.aaz import *
|
|||
"networkfabric l3domain create",
|
||||
)
|
||||
class Create(AAZCommand):
|
||||
"""Create a L3 Isolation Domain resource.
|
||||
"""Create a L3 Isolation Domain resource
|
||||
|
||||
:example: Create a L3 Isolation Domain
|
||||
az networkfabric l3domain create --resource-group "example-rg" --resource-name "example-l3domain" --location "westus3" --nf-id "/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabricName" --redistribute-connected-subnets "True" --redistribute-static-routes "True" --aggregate-route-configuration "{ipv4Routes:[{prefix:'10.0.0.1/28'},{prefix:'10.0.0.2/28'}],ipv6Routes:[{prefix:'2fff::/64'},{prefix:'2fff::/65'}]}" --connected-subnet-route-policy "{exportRoutePolicyId:'exportRoutePolicyId'}"
|
||||
az networkfabric l3domain create --resource-group "example-rg" --resource-name "example-l3domain" --location "westus3" --nf-id "/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabricName" --redistribute-connected-subnets "True" --redistribute-static-routes "True" --aggregate-route-configuration "{ipv4Routes:[{prefix:'10.0.0.1/28'},{prefix:'10.0.0.2/28'}],ipv6Routes:[{prefix:'2fff::/64'},{prefix:'2fff::/65'}]}" --connected-subnet-route-policy "{exportRoutePolicy:{exportIpv4RoutePolicyId:'/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/microsoft.managednetworkfabric/routePolicies/example-routepolicy'}}"
|
||||
|
||||
:example: Help text for sub parameters under the specific parent can be viewed by using the shorthand syntax '??'. See https://github.com/Azure/azure-cli/tree/dev/doc/shorthand_syntax.md for more about shorthand syntax.
|
||||
az networkfabric l3domain create --connected-subnet-route-policy ??
|
||||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-02-01-preview",
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/l3isolationdomains/{}", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/l3isolationdomains/{}", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -50,7 +50,7 @@ class Create(AAZCommand):
|
|||
_args_schema = cls._args_schema
|
||||
_args_schema.resource_name = AAZStrArg(
|
||||
options=["--resource-name"],
|
||||
help="Name of the L3 Isolation Domain",
|
||||
help="Name of the L3 Isolation Domain.",
|
||||
required=True,
|
||||
)
|
||||
_args_schema.resource_group = AAZResourceGroupNameArg(
|
||||
|
@ -84,76 +84,104 @@ class Create(AAZCommand):
|
|||
_args_schema.aggregate_route_configuration = AAZObjectArg(
|
||||
options=["--aggregate-route-configuration"],
|
||||
arg_group="Properties",
|
||||
help="List of Ipv4 and Ipv6 route configurations.",
|
||||
help="Aggregate route configurations.",
|
||||
)
|
||||
_args_schema.annotation = AAZStrArg(
|
||||
options=["--annotation"],
|
||||
arg_group="Properties",
|
||||
help="Switch configuration description.",
|
||||
help="Description for underlying resource.",
|
||||
)
|
||||
_args_schema.connected_subnet_route_policy = AAZObjectArg(
|
||||
options=["--connected-subnet-route-policy"],
|
||||
arg_group="Properties",
|
||||
help="Connected Subnet RoutePolicy",
|
||||
help="Connected Subnet RoutePolicy.",
|
||||
)
|
||||
_args_schema.description = AAZStrArg(
|
||||
options=["--description"],
|
||||
arg_group="Properties",
|
||||
help="L3 Isolation Domain description.",
|
||||
)
|
||||
_args_schema.nf_id = AAZStrArg(
|
||||
_args_schema.nf_id = AAZResourceIdArg(
|
||||
options=["--nf-id"],
|
||||
arg_group="Properties",
|
||||
help="Resource ID of the Network Fabric resource",
|
||||
help="ARM Resource ID of the Network Fabric.",
|
||||
required=True,
|
||||
)
|
||||
_args_schema.redistribute_connected_subnets = AAZStrArg(
|
||||
options=["--redistribute-connected-subnets"],
|
||||
arg_group="Properties",
|
||||
help="Advertise Connected Subnets. Default Value is True. Ex: \"True\" | \"False\".",
|
||||
help="Advertise Connected Subnets. Default value is True. Example: True.",
|
||||
enum={"False": "False", "True": "True"},
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
_args_schema.redistribute_static_routes = AAZStrArg(
|
||||
options=["--redistribute-static-routes"],
|
||||
arg_group="Properties",
|
||||
help="Advertise Static Routes. Default Value is False. Ex: \"True\" | \"False\".",
|
||||
help="Advertise Static Routes. Default value is False. Example: True.",
|
||||
enum={"False": "False", "True": "True"},
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
|
||||
aggregate_route_configuration = cls._args_schema.aggregate_route_configuration
|
||||
aggregate_route_configuration.ipv4_routes = AAZListArg(
|
||||
options=["ipv4-routes"],
|
||||
help="List of Ipv4Route prefixes.",
|
||||
help="List of IPv4 Route prefixes.",
|
||||
)
|
||||
aggregate_route_configuration.ipv6_routes = AAZListArg(
|
||||
options=["ipv6-routes"],
|
||||
help="List of Ipv6Routes prefixes.",
|
||||
help="List of IPv6 Route prefixes.",
|
||||
)
|
||||
|
||||
ipv4_routes = cls._args_schema.aggregate_route_configuration.ipv4_routes
|
||||
ipv4_routes.Element = AAZObjectArg()
|
||||
|
||||
_element = cls._args_schema.aggregate_route_configuration.ipv4_routes.Element
|
||||
_element.prefix = AAZStrArg(
|
||||
options=["prefix"],
|
||||
help="IPv4 Prefix of the aggregate Ipv4Route.",
|
||||
)
|
||||
cls._build_args_aggregate_route_create(ipv4_routes.Element)
|
||||
|
||||
ipv6_routes = cls._args_schema.aggregate_route_configuration.ipv6_routes
|
||||
ipv6_routes.Element = AAZObjectArg()
|
||||
|
||||
_element = cls._args_schema.aggregate_route_configuration.ipv6_routes.Element
|
||||
_element.prefix = AAZStrArg(
|
||||
options=["prefix"],
|
||||
help="IPv6 Prefix of the aggregate IPv6 Route.",
|
||||
)
|
||||
cls._build_args_aggregate_route_create(ipv6_routes.Element)
|
||||
|
||||
connected_subnet_route_policy = cls._args_schema.connected_subnet_route_policy
|
||||
connected_subnet_route_policy.export_route_policy_id = AAZStrArg(
|
||||
connected_subnet_route_policy.export_route_policy = AAZObjectArg(
|
||||
options=["export-route-policy"],
|
||||
help="Array of ARM Resource ID of the RoutePolicies.",
|
||||
)
|
||||
connected_subnet_route_policy.export_route_policy_id = AAZResourceIdArg(
|
||||
options=["export-route-policy-id"],
|
||||
help="exportRoutePolicyId value.",
|
||||
help="ARM Resource ID of the Route Policy. This is used for the backward compatibility.",
|
||||
)
|
||||
|
||||
export_route_policy = cls._args_schema.connected_subnet_route_policy.export_route_policy
|
||||
export_route_policy.export_ipv4_route_policy_id = AAZResourceIdArg(
|
||||
options=["export-ipv4-route-policy-id"],
|
||||
help="ARM Resource ID of the RoutePolicy.",
|
||||
)
|
||||
export_route_policy.export_ipv6_route_policy_id = AAZResourceIdArg(
|
||||
options=["export-ipv6-route-policy-id"],
|
||||
help="ARM Resource ID of the RoutePolicy.",
|
||||
)
|
||||
return cls._args_schema
|
||||
|
||||
_args_aggregate_route_create = None
|
||||
|
||||
@classmethod
|
||||
def _build_args_aggregate_route_create(cls, _schema):
|
||||
if cls._args_aggregate_route_create is not None:
|
||||
_schema.prefix = cls._args_aggregate_route_create.prefix
|
||||
return
|
||||
|
||||
cls._args_aggregate_route_create = AAZObjectArg()
|
||||
|
||||
aggregate_route_create = cls._args_aggregate_route_create
|
||||
aggregate_route_create.prefix = AAZStrArg(
|
||||
options=["prefix"],
|
||||
help="Prefix of the aggregate Route.",
|
||||
required=True,
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
|
||||
_schema.prefix = cls._args_aggregate_route_create.prefix
|
||||
|
||||
def _execute_operations(self):
|
||||
self.pre_operations()
|
||||
yield self.L3IsolationDomainsCreate(ctx=self.ctx)()
|
||||
|
@ -235,7 +263,7 @@ class Create(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
@ -261,7 +289,7 @@ class Create(AAZCommand):
|
|||
typ_kwargs={"flags": {"required": True, "client_flatten": True}}
|
||||
)
|
||||
_builder.set_prop("location", AAZStrType, ".location", typ_kwargs={"flags": {"required": True}})
|
||||
_builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
|
||||
_builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={"flags": {"required": True, "client_flatten": True}})
|
||||
_builder.set_prop("tags", AAZDictType, ".tags")
|
||||
|
||||
properties = _builder.get(".properties")
|
||||
|
@ -269,7 +297,6 @@ class Create(AAZCommand):
|
|||
properties.set_prop("aggregateRouteConfiguration", AAZObjectType, ".aggregate_route_configuration")
|
||||
properties.set_prop("annotation", AAZStrType, ".annotation")
|
||||
properties.set_prop("connectedSubnetRoutePolicy", AAZObjectType, ".connected_subnet_route_policy")
|
||||
properties.set_prop("description", AAZStrType, ".description")
|
||||
properties.set_prop("networkFabricId", AAZStrType, ".nf_id", typ_kwargs={"flags": {"required": True}})
|
||||
properties.set_prop("redistributeConnectedSubnets", AAZStrType, ".redistribute_connected_subnets")
|
||||
properties.set_prop("redistributeStaticRoutes", AAZStrType, ".redistribute_static_routes")
|
||||
|
@ -281,24 +308,22 @@ class Create(AAZCommand):
|
|||
|
||||
ipv4_routes = _builder.get(".properties.aggregateRouteConfiguration.ipv4Routes")
|
||||
if ipv4_routes is not None:
|
||||
ipv4_routes.set_elements(AAZObjectType, ".")
|
||||
|
||||
_elements = _builder.get(".properties.aggregateRouteConfiguration.ipv4Routes[]")
|
||||
if _elements is not None:
|
||||
_elements.set_prop("prefix", AAZStrType, ".prefix")
|
||||
_CreateHelper._build_schema_aggregate_route_create(ipv4_routes.set_elements(AAZObjectType, "."))
|
||||
|
||||
ipv6_routes = _builder.get(".properties.aggregateRouteConfiguration.ipv6Routes")
|
||||
if ipv6_routes is not None:
|
||||
ipv6_routes.set_elements(AAZObjectType, ".")
|
||||
|
||||
_elements = _builder.get(".properties.aggregateRouteConfiguration.ipv6Routes[]")
|
||||
if _elements is not None:
|
||||
_elements.set_prop("prefix", AAZStrType, ".prefix")
|
||||
_CreateHelper._build_schema_aggregate_route_create(ipv6_routes.set_elements(AAZObjectType, "."))
|
||||
|
||||
connected_subnet_route_policy = _builder.get(".properties.connectedSubnetRoutePolicy")
|
||||
if connected_subnet_route_policy is not None:
|
||||
connected_subnet_route_policy.set_prop("exportRoutePolicy", AAZObjectType, ".export_route_policy")
|
||||
connected_subnet_route_policy.set_prop("exportRoutePolicyId", AAZStrType, ".export_route_policy_id")
|
||||
|
||||
export_route_policy = _builder.get(".properties.connectedSubnetRoutePolicy.exportRoutePolicy")
|
||||
if export_route_policy is not None:
|
||||
export_route_policy.set_prop("exportIpv4RoutePolicyId", AAZStrType, ".export_ipv4_route_policy_id")
|
||||
export_route_policy.set_prop("exportIpv6RoutePolicyId", AAZStrType, ".export_ipv6_route_policy_id")
|
||||
|
||||
tags = _builder.get(".tags")
|
||||
if tags is not None:
|
||||
tags.set_elements(AAZStrType, ".")
|
||||
|
@ -333,7 +358,7 @@ class Create(AAZCommand):
|
|||
flags={"read_only": True},
|
||||
)
|
||||
_schema_on_200_201.properties = AAZObjectType(
|
||||
flags={"client_flatten": True},
|
||||
flags={"required": True, "client_flatten": True},
|
||||
)
|
||||
_schema_on_200_201.system_data = AAZObjectType(
|
||||
serialized_name="systemData",
|
||||
|
@ -353,22 +378,17 @@ class Create(AAZCommand):
|
|||
serialized_name="aggregateRouteConfiguration",
|
||||
)
|
||||
properties.annotation = AAZStrType()
|
||||
properties.configuration_state = AAZStrType(
|
||||
serialized_name="configurationState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.connected_subnet_route_policy = AAZObjectType(
|
||||
serialized_name="connectedSubnetRoutePolicy",
|
||||
)
|
||||
properties.description = AAZStrType()
|
||||
properties.disabled_on_resources = AAZListType(
|
||||
serialized_name="disabledOnResources",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.network_fabric_id = AAZStrType(
|
||||
serialized_name="networkFabricId",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.option_b_disabled_on_resources = AAZListType(
|
||||
serialized_name="optionBDisabledOnResources",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.provisioning_state = AAZStrType(
|
||||
serialized_name="provisioningState",
|
||||
flags={"read_only": True},
|
||||
|
@ -397,19 +417,20 @@ class Create(AAZCommand):
|
|||
_CreateHelper._build_schema_aggregate_route_read(ipv6_routes.Element)
|
||||
|
||||
connected_subnet_route_policy = cls._schema_on_200_201.properties.connected_subnet_route_policy
|
||||
connected_subnet_route_policy.administrative_state = AAZStrType(
|
||||
serialized_name="administrativeState",
|
||||
flags={"read_only": True},
|
||||
connected_subnet_route_policy.export_route_policy = AAZObjectType(
|
||||
serialized_name="exportRoutePolicy",
|
||||
)
|
||||
connected_subnet_route_policy.export_route_policy_id = AAZStrType(
|
||||
serialized_name="exportRoutePolicyId",
|
||||
)
|
||||
|
||||
disabled_on_resources = cls._schema_on_200_201.properties.disabled_on_resources
|
||||
disabled_on_resources.Element = AAZStrType()
|
||||
|
||||
option_b_disabled_on_resources = cls._schema_on_200_201.properties.option_b_disabled_on_resources
|
||||
option_b_disabled_on_resources.Element = AAZStrType()
|
||||
export_route_policy = cls._schema_on_200_201.properties.connected_subnet_route_policy.export_route_policy
|
||||
export_route_policy.export_ipv4_route_policy_id = AAZStrType(
|
||||
serialized_name="exportIpv4RoutePolicyId",
|
||||
)
|
||||
export_route_policy.export_ipv6_route_policy_id = AAZStrType(
|
||||
serialized_name="exportIpv6RoutePolicyId",
|
||||
)
|
||||
|
||||
system_data = cls._schema_on_200_201.system_data
|
||||
system_data.created_at = AAZStrType(
|
||||
|
@ -440,6 +461,12 @@ class Create(AAZCommand):
|
|||
class _CreateHelper:
|
||||
"""Helper class for Create"""
|
||||
|
||||
@classmethod
|
||||
def _build_schema_aggregate_route_create(cls, _builder):
|
||||
if _builder is None:
|
||||
return
|
||||
_builder.set_prop("prefix", AAZStrType, ".prefix", typ_kwargs={"flags": {"required": True}})
|
||||
|
||||
_schema_aggregate_route_read = None
|
||||
|
||||
@classmethod
|
||||
|
@ -451,7 +478,9 @@ class _CreateHelper:
|
|||
cls._schema_aggregate_route_read = _schema_aggregate_route_read = AAZObjectType()
|
||||
|
||||
aggregate_route_read = _schema_aggregate_route_read
|
||||
aggregate_route_read.prefix = AAZStrType()
|
||||
aggregate_route_read.prefix = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
_schema.prefix = cls._schema_aggregate_route_read.prefix
|
||||
|
||||
|
|
|
@ -15,16 +15,16 @@ from azure.cli.core.aaz import *
|
|||
"networkfabric l3domain delete",
|
||||
)
|
||||
class Delete(AAZCommand):
|
||||
"""Delete the L3 Isolation Domain resource.
|
||||
"""Delete the L3 Isolation Domain resource
|
||||
|
||||
:example: Delete the L3 Isolation Domain
|
||||
az networkfabric l3domain delete --resource-group "example-rg" --resource-name "example-l3domain"
|
||||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-02-01-preview",
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/l3isolationdomains/{}", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/l3isolationdomains/{}", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -47,7 +47,7 @@ class Delete(AAZCommand):
|
|||
_args_schema = cls._args_schema
|
||||
_args_schema.resource_name = AAZStrArg(
|
||||
options=["--resource-name"],
|
||||
help="Name of the L3 Isolation Domain",
|
||||
help="Name of the L3 Isolation Domain.",
|
||||
required=True,
|
||||
id_part="name",
|
||||
)
|
||||
|
@ -143,7 +143,7 @@ class Delete(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ from azure.cli.core.aaz import *
|
|||
"networkfabric l3domain list",
|
||||
)
|
||||
class List(AAZCommand):
|
||||
"""List all L3 Isolation Domains in the provided resource group or subscription.
|
||||
"""List all L3 Isolation Domains in the provided resource group or subscription
|
||||
|
||||
:example: List the L3 Isolation Domains for Resource Group
|
||||
az networkfabric l3domain list --resource-group "example-rg"
|
||||
|
@ -25,10 +25,10 @@ class List(AAZCommand):
|
|||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-02-01-preview",
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/providers/microsoft.managednetworkfabric/l3isolationdomains", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/l3isolationdomains", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/providers/microsoft.managednetworkfabric/l3isolationdomains", "2023-06-15"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/l3isolationdomains", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -119,7 +119,7 @@ class List(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
@ -171,7 +171,7 @@ class List(AAZCommand):
|
|||
flags={"read_only": True},
|
||||
)
|
||||
_element.properties = AAZObjectType(
|
||||
flags={"client_flatten": True},
|
||||
flags={"required": True, "client_flatten": True},
|
||||
)
|
||||
_element.system_data = AAZObjectType(
|
||||
serialized_name="systemData",
|
||||
|
@ -191,22 +191,17 @@ class List(AAZCommand):
|
|||
serialized_name="aggregateRouteConfiguration",
|
||||
)
|
||||
properties.annotation = AAZStrType()
|
||||
properties.configuration_state = AAZStrType(
|
||||
serialized_name="configurationState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.connected_subnet_route_policy = AAZObjectType(
|
||||
serialized_name="connectedSubnetRoutePolicy",
|
||||
)
|
||||
properties.description = AAZStrType()
|
||||
properties.disabled_on_resources = AAZListType(
|
||||
serialized_name="disabledOnResources",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.network_fabric_id = AAZStrType(
|
||||
serialized_name="networkFabricId",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.option_b_disabled_on_resources = AAZListType(
|
||||
serialized_name="optionBDisabledOnResources",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.provisioning_state = AAZStrType(
|
||||
serialized_name="provisioningState",
|
||||
flags={"read_only": True},
|
||||
|
@ -235,19 +230,20 @@ class List(AAZCommand):
|
|||
_ListHelper._build_schema_aggregate_route_read(ipv6_routes.Element)
|
||||
|
||||
connected_subnet_route_policy = cls._schema_on_200.value.Element.properties.connected_subnet_route_policy
|
||||
connected_subnet_route_policy.administrative_state = AAZStrType(
|
||||
serialized_name="administrativeState",
|
||||
flags={"read_only": True},
|
||||
connected_subnet_route_policy.export_route_policy = AAZObjectType(
|
||||
serialized_name="exportRoutePolicy",
|
||||
)
|
||||
connected_subnet_route_policy.export_route_policy_id = AAZStrType(
|
||||
serialized_name="exportRoutePolicyId",
|
||||
)
|
||||
|
||||
disabled_on_resources = cls._schema_on_200.value.Element.properties.disabled_on_resources
|
||||
disabled_on_resources.Element = AAZStrType()
|
||||
|
||||
option_b_disabled_on_resources = cls._schema_on_200.value.Element.properties.option_b_disabled_on_resources
|
||||
option_b_disabled_on_resources.Element = AAZStrType()
|
||||
export_route_policy = cls._schema_on_200.value.Element.properties.connected_subnet_route_policy.export_route_policy
|
||||
export_route_policy.export_ipv4_route_policy_id = AAZStrType(
|
||||
serialized_name="exportIpv4RoutePolicyId",
|
||||
)
|
||||
export_route_policy.export_ipv6_route_policy_id = AAZStrType(
|
||||
serialized_name="exportIpv6RoutePolicyId",
|
||||
)
|
||||
|
||||
system_data = cls._schema_on_200.value.Element.system_data
|
||||
system_data.created_at = AAZStrType(
|
||||
|
@ -314,7 +310,7 @@ class List(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
@ -366,7 +362,7 @@ class List(AAZCommand):
|
|||
flags={"read_only": True},
|
||||
)
|
||||
_element.properties = AAZObjectType(
|
||||
flags={"client_flatten": True},
|
||||
flags={"required": True, "client_flatten": True},
|
||||
)
|
||||
_element.system_data = AAZObjectType(
|
||||
serialized_name="systemData",
|
||||
|
@ -386,22 +382,17 @@ class List(AAZCommand):
|
|||
serialized_name="aggregateRouteConfiguration",
|
||||
)
|
||||
properties.annotation = AAZStrType()
|
||||
properties.configuration_state = AAZStrType(
|
||||
serialized_name="configurationState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.connected_subnet_route_policy = AAZObjectType(
|
||||
serialized_name="connectedSubnetRoutePolicy",
|
||||
)
|
||||
properties.description = AAZStrType()
|
||||
properties.disabled_on_resources = AAZListType(
|
||||
serialized_name="disabledOnResources",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.network_fabric_id = AAZStrType(
|
||||
serialized_name="networkFabricId",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.option_b_disabled_on_resources = AAZListType(
|
||||
serialized_name="optionBDisabledOnResources",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.provisioning_state = AAZStrType(
|
||||
serialized_name="provisioningState",
|
||||
flags={"read_only": True},
|
||||
|
@ -430,19 +421,20 @@ class List(AAZCommand):
|
|||
_ListHelper._build_schema_aggregate_route_read(ipv6_routes.Element)
|
||||
|
||||
connected_subnet_route_policy = cls._schema_on_200.value.Element.properties.connected_subnet_route_policy
|
||||
connected_subnet_route_policy.administrative_state = AAZStrType(
|
||||
serialized_name="administrativeState",
|
||||
flags={"read_only": True},
|
||||
connected_subnet_route_policy.export_route_policy = AAZObjectType(
|
||||
serialized_name="exportRoutePolicy",
|
||||
)
|
||||
connected_subnet_route_policy.export_route_policy_id = AAZStrType(
|
||||
serialized_name="exportRoutePolicyId",
|
||||
)
|
||||
|
||||
disabled_on_resources = cls._schema_on_200.value.Element.properties.disabled_on_resources
|
||||
disabled_on_resources.Element = AAZStrType()
|
||||
|
||||
option_b_disabled_on_resources = cls._schema_on_200.value.Element.properties.option_b_disabled_on_resources
|
||||
option_b_disabled_on_resources.Element = AAZStrType()
|
||||
export_route_policy = cls._schema_on_200.value.Element.properties.connected_subnet_route_policy.export_route_policy
|
||||
export_route_policy.export_ipv4_route_policy_id = AAZStrType(
|
||||
serialized_name="exportIpv4RoutePolicyId",
|
||||
)
|
||||
export_route_policy.export_ipv6_route_policy_id = AAZStrType(
|
||||
serialized_name="exportIpv6RoutePolicyId",
|
||||
)
|
||||
|
||||
system_data = cls._schema_on_200.value.Element.system_data
|
||||
system_data.created_at = AAZStrType(
|
||||
|
@ -484,7 +476,9 @@ class _ListHelper:
|
|||
cls._schema_aggregate_route_read = _schema_aggregate_route_read = AAZObjectType()
|
||||
|
||||
aggregate_route_read = _schema_aggregate_route_read
|
||||
aggregate_route_read.prefix = AAZStrType()
|
||||
aggregate_route_read.prefix = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
_schema.prefix = cls._schema_aggregate_route_read.prefix
|
||||
|
||||
|
|
|
@ -15,16 +15,16 @@ from azure.cli.core.aaz import *
|
|||
"networkfabric l3domain show",
|
||||
)
|
||||
class Show(AAZCommand):
|
||||
"""Show details of the provided L3 Isolation Domain resource.
|
||||
"""Show details of the provided L3 Isolation Domain resource
|
||||
|
||||
:example: Show the L3 Isolation Domain
|
||||
az networkfabric l3domain show --resource-group "example-rg" --resource-name "example-l3domain"
|
||||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-02-01-preview",
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/l3isolationdomains/{}", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/l3isolationdomains/{}", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -46,7 +46,7 @@ class Show(AAZCommand):
|
|||
_args_schema = cls._args_schema
|
||||
_args_schema.resource_name = AAZStrArg(
|
||||
options=["--resource-name"],
|
||||
help="Name of the L3 Isolation Domain",
|
||||
help="Name of the L3 Isolation Domain.",
|
||||
required=True,
|
||||
id_part="name",
|
||||
)
|
||||
|
@ -121,7 +121,7 @@ class Show(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
@ -164,7 +164,7 @@ class Show(AAZCommand):
|
|||
flags={"read_only": True},
|
||||
)
|
||||
_schema_on_200.properties = AAZObjectType(
|
||||
flags={"client_flatten": True},
|
||||
flags={"required": True, "client_flatten": True},
|
||||
)
|
||||
_schema_on_200.system_data = AAZObjectType(
|
||||
serialized_name="systemData",
|
||||
|
@ -184,22 +184,17 @@ class Show(AAZCommand):
|
|||
serialized_name="aggregateRouteConfiguration",
|
||||
)
|
||||
properties.annotation = AAZStrType()
|
||||
properties.configuration_state = AAZStrType(
|
||||
serialized_name="configurationState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.connected_subnet_route_policy = AAZObjectType(
|
||||
serialized_name="connectedSubnetRoutePolicy",
|
||||
)
|
||||
properties.description = AAZStrType()
|
||||
properties.disabled_on_resources = AAZListType(
|
||||
serialized_name="disabledOnResources",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.network_fabric_id = AAZStrType(
|
||||
serialized_name="networkFabricId",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.option_b_disabled_on_resources = AAZListType(
|
||||
serialized_name="optionBDisabledOnResources",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.provisioning_state = AAZStrType(
|
||||
serialized_name="provisioningState",
|
||||
flags={"read_only": True},
|
||||
|
@ -228,19 +223,20 @@ class Show(AAZCommand):
|
|||
_ShowHelper._build_schema_aggregate_route_read(ipv6_routes.Element)
|
||||
|
||||
connected_subnet_route_policy = cls._schema_on_200.properties.connected_subnet_route_policy
|
||||
connected_subnet_route_policy.administrative_state = AAZStrType(
|
||||
serialized_name="administrativeState",
|
||||
flags={"read_only": True},
|
||||
connected_subnet_route_policy.export_route_policy = AAZObjectType(
|
||||
serialized_name="exportRoutePolicy",
|
||||
)
|
||||
connected_subnet_route_policy.export_route_policy_id = AAZStrType(
|
||||
serialized_name="exportRoutePolicyId",
|
||||
)
|
||||
|
||||
disabled_on_resources = cls._schema_on_200.properties.disabled_on_resources
|
||||
disabled_on_resources.Element = AAZStrType()
|
||||
|
||||
option_b_disabled_on_resources = cls._schema_on_200.properties.option_b_disabled_on_resources
|
||||
option_b_disabled_on_resources.Element = AAZStrType()
|
||||
export_route_policy = cls._schema_on_200.properties.connected_subnet_route_policy.export_route_policy
|
||||
export_route_policy.export_ipv4_route_policy_id = AAZStrType(
|
||||
serialized_name="exportIpv4RoutePolicyId",
|
||||
)
|
||||
export_route_policy.export_ipv6_route_policy_id = AAZStrType(
|
||||
serialized_name="exportIpv6RoutePolicyId",
|
||||
)
|
||||
|
||||
system_data = cls._schema_on_200.system_data
|
||||
system_data.created_at = AAZStrType(
|
||||
|
@ -282,7 +278,9 @@ class _ShowHelper:
|
|||
cls._schema_aggregate_route_read = _schema_aggregate_route_read = AAZObjectType()
|
||||
|
||||
aggregate_route_read = _schema_aggregate_route_read
|
||||
aggregate_route_read.prefix = AAZStrType()
|
||||
aggregate_route_read.prefix = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
_schema.prefix = cls._schema_aggregate_route_read.prefix
|
||||
|
||||
|
|
|
@ -0,0 +1,473 @@
|
|||
# --------------------------------------------------------------------------------------------
|
||||
# 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 l3domain update",
|
||||
)
|
||||
class Update(AAZCommand):
|
||||
"""Update to update certain properties of the L3 Isolation Domain resource.
|
||||
|
||||
:example: Update the L3 Isolation Domain
|
||||
az networkfabric l3domain update --resource-group "example-rg" --resource-name "example-l3domain" --redistribute-connected-subnets "True" --redistribute-static-routes "True" --aggregate-route-configuration "{ipv4Routes:[{prefix:'10.0.0.1/28'},{prefix:'10.0.0.2/28'}],ipv6Routes:[{prefix:'2fff::/64'},{prefix:'2fff::/65'}]}" --connected-subnet-route-policy "{exportRoutePolicy:{exportIpv4RoutePolicyId:'/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/microsoft.managednetworkfabric/routePolicies/example-routepolicy'}}"
|
||||
|
||||
:example: Help text for sub parameters under the specific parent can be viewed by using the shorthand syntax '??'. See https://github.com/Azure/azure-cli/tree/dev/doc/shorthand_syntax.md for more about shorthand syntax.
|
||||
az networkfabric l3domain update --connected-subnet-route-policy ??
|
||||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/l3isolationdomains/{}", "2023-06-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 L3 Isolation Domain.",
|
||||
required=True,
|
||||
id_part="name",
|
||||
)
|
||||
_args_schema.resource_group = AAZResourceGroupNameArg(
|
||||
help="Name of the resource group",
|
||||
required=True,
|
||||
)
|
||||
|
||||
# define Arg Group "Body"
|
||||
|
||||
_args_schema = cls._args_schema
|
||||
_args_schema.tags = AAZDictArg(
|
||||
options=["--tags"],
|
||||
arg_group="Body",
|
||||
help="Resource tags",
|
||||
)
|
||||
|
||||
tags = cls._args_schema.tags
|
||||
tags.Element = AAZStrArg()
|
||||
|
||||
# define Arg Group "Properties"
|
||||
|
||||
_args_schema = cls._args_schema
|
||||
_args_schema.aggregate_route_configuration = AAZObjectArg(
|
||||
options=["--aggregate-route-configuration"],
|
||||
arg_group="Properties",
|
||||
help="Aggregate route configurations.",
|
||||
)
|
||||
_args_schema.annotation = AAZStrArg(
|
||||
options=["--annotation"],
|
||||
arg_group="Properties",
|
||||
help="Description for underlying resource.",
|
||||
)
|
||||
_args_schema.connected_subnet_route_policy = AAZObjectArg(
|
||||
options=["--connected-subnet-route-policy"],
|
||||
arg_group="Properties",
|
||||
help="Connected Subnet RoutePolicy.",
|
||||
)
|
||||
_args_schema.redistribute_connected_subnets = AAZStrArg(
|
||||
options=["--redistribute-connected-subnets"],
|
||||
arg_group="Properties",
|
||||
help="Advertise Connected Subnets. Default value is True. Example: True.",
|
||||
enum={"False": "False", "True": "True"},
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
_args_schema.redistribute_static_routes = AAZStrArg(
|
||||
options=["--redistribute-static-routes"],
|
||||
arg_group="Properties",
|
||||
help="Advertise Static Routes. Default value is False. Example: True.",
|
||||
enum={"False": "False", "True": "True"},
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
|
||||
aggregate_route_configuration = cls._args_schema.aggregate_route_configuration
|
||||
aggregate_route_configuration.ipv4_routes = AAZListArg(
|
||||
options=["ipv4-routes"],
|
||||
help="List of IPv4 Route prefixes.",
|
||||
)
|
||||
aggregate_route_configuration.ipv6_routes = AAZListArg(
|
||||
options=["ipv6-routes"],
|
||||
help="List of IPv6 Route prefixes.",
|
||||
)
|
||||
|
||||
ipv4_routes = cls._args_schema.aggregate_route_configuration.ipv4_routes
|
||||
ipv4_routes.Element = AAZObjectArg()
|
||||
cls._build_args_aggregate_route_update(ipv4_routes.Element)
|
||||
|
||||
ipv6_routes = cls._args_schema.aggregate_route_configuration.ipv6_routes
|
||||
ipv6_routes.Element = AAZObjectArg()
|
||||
cls._build_args_aggregate_route_update(ipv6_routes.Element)
|
||||
|
||||
connected_subnet_route_policy = cls._args_schema.connected_subnet_route_policy
|
||||
connected_subnet_route_policy.export_route_policy = AAZObjectArg(
|
||||
options=["export-route-policy"],
|
||||
help="Array of ARM Resource ID of the RoutePolicies.",
|
||||
)
|
||||
connected_subnet_route_policy.export_route_policy_id = AAZResourceIdArg(
|
||||
options=["export-route-policy-id"],
|
||||
help="ARM Resource ID of the Route Policy. This is used for the backward compatibility.",
|
||||
)
|
||||
|
||||
export_route_policy = cls._args_schema.connected_subnet_route_policy.export_route_policy
|
||||
export_route_policy.export_ipv4_route_policy_id = AAZResourceIdArg(
|
||||
options=["export-ipv4-route-policy-id"],
|
||||
help="ARM Resource ID of the RoutePolicy.",
|
||||
)
|
||||
export_route_policy.export_ipv6_route_policy_id = AAZResourceIdArg(
|
||||
options=["export-ipv6-route-policy-id"],
|
||||
help="ARM Resource ID of the RoutePolicy.",
|
||||
)
|
||||
return cls._args_schema
|
||||
|
||||
_args_aggregate_route_update = None
|
||||
|
||||
@classmethod
|
||||
def _build_args_aggregate_route_update(cls, _schema):
|
||||
if cls._args_aggregate_route_update is not None:
|
||||
_schema.prefix = cls._args_aggregate_route_update.prefix
|
||||
return
|
||||
|
||||
cls._args_aggregate_route_update = AAZObjectArg()
|
||||
|
||||
aggregate_route_update = cls._args_aggregate_route_update
|
||||
aggregate_route_update.prefix = AAZStrArg(
|
||||
options=["prefix"],
|
||||
help="Prefix of the aggregate Route.",
|
||||
required=True,
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
|
||||
_schema.prefix = cls._args_aggregate_route_update.prefix
|
||||
|
||||
def _execute_operations(self):
|
||||
self.pre_operations()
|
||||
yield self.L3IsolationDomainsUpdate(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 L3IsolationDomainsUpdate(AAZHttpOperation):
|
||||
CLIENT_TYPE = "MgmtClient"
|
||||
|
||||
def __call__(self, *args, **kwargs):
|
||||
request = self.make_request()
|
||||
session = self.client.send_request(request=request, stream=False, **kwargs)
|
||||
if session.http_response.status_code in [202]:
|
||||
return self.client.build_lro_polling(
|
||||
self.ctx.args.no_wait,
|
||||
session,
|
||||
self.on_200,
|
||||
self.on_error,
|
||||
lro_options={"final-state-via": "location"},
|
||||
path_format_arguments=self.url_parameters,
|
||||
)
|
||||
if session.http_response.status_code in [200]:
|
||||
return self.client.build_lro_polling(
|
||||
self.ctx.args.no_wait,
|
||||
session,
|
||||
self.on_200,
|
||||
self.on_error,
|
||||
lro_options={"final-state-via": "location"},
|
||||
path_format_arguments=self.url_parameters,
|
||||
)
|
||||
|
||||
return self.on_error(session.http_response)
|
||||
|
||||
@property
|
||||
def url(self):
|
||||
return self.client.format_url(
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}",
|
||||
**self.url_parameters
|
||||
)
|
||||
|
||||
@property
|
||||
def method(self):
|
||||
return "PATCH"
|
||||
|
||||
@property
|
||||
def error_format(self):
|
||||
return "MgmtErrorFormat"
|
||||
|
||||
@property
|
||||
def url_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_url_param(
|
||||
"l3IsolationDomainName", self.ctx.args.resource_name,
|
||||
required=True,
|
||||
),
|
||||
**self.serialize_url_param(
|
||||
"resourceGroupName", self.ctx.args.resource_group,
|
||||
required=True,
|
||||
),
|
||||
**self.serialize_url_param(
|
||||
"subscriptionId", self.ctx.subscription_id,
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
return parameters
|
||||
|
||||
@property
|
||||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
return parameters
|
||||
|
||||
@property
|
||||
def header_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_header_param(
|
||||
"Content-Type", "application/json",
|
||||
),
|
||||
**self.serialize_header_param(
|
||||
"Accept", "application/json",
|
||||
),
|
||||
}
|
||||
return parameters
|
||||
|
||||
@property
|
||||
def content(self):
|
||||
_content_value, _builder = self.new_content_builder(
|
||||
self.ctx.args,
|
||||
typ=AAZObjectType,
|
||||
typ_kwargs={"flags": {"required": True, "client_flatten": True}}
|
||||
)
|
||||
_builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
|
||||
_builder.set_prop("tags", AAZDictType, ".tags")
|
||||
|
||||
properties = _builder.get(".properties")
|
||||
if properties is not None:
|
||||
properties.set_prop("aggregateRouteConfiguration", AAZObjectType, ".aggregate_route_configuration")
|
||||
properties.set_prop("annotation", AAZStrType, ".annotation")
|
||||
properties.set_prop("connectedSubnetRoutePolicy", AAZObjectType, ".connected_subnet_route_policy")
|
||||
properties.set_prop("redistributeConnectedSubnets", AAZStrType, ".redistribute_connected_subnets")
|
||||
properties.set_prop("redistributeStaticRoutes", AAZStrType, ".redistribute_static_routes")
|
||||
|
||||
aggregate_route_configuration = _builder.get(".properties.aggregateRouteConfiguration")
|
||||
if aggregate_route_configuration is not None:
|
||||
aggregate_route_configuration.set_prop("ipv4Routes", AAZListType, ".ipv4_routes")
|
||||
aggregate_route_configuration.set_prop("ipv6Routes", AAZListType, ".ipv6_routes")
|
||||
|
||||
ipv4_routes = _builder.get(".properties.aggregateRouteConfiguration.ipv4Routes")
|
||||
if ipv4_routes is not None:
|
||||
_UpdateHelper._build_schema_aggregate_route_update(ipv4_routes.set_elements(AAZObjectType, "."))
|
||||
|
||||
ipv6_routes = _builder.get(".properties.aggregateRouteConfiguration.ipv6Routes")
|
||||
if ipv6_routes is not None:
|
||||
_UpdateHelper._build_schema_aggregate_route_update(ipv6_routes.set_elements(AAZObjectType, "."))
|
||||
|
||||
connected_subnet_route_policy = _builder.get(".properties.connectedSubnetRoutePolicy")
|
||||
if connected_subnet_route_policy is not None:
|
||||
connected_subnet_route_policy.set_prop("exportRoutePolicy", AAZObjectType, ".export_route_policy")
|
||||
connected_subnet_route_policy.set_prop("exportRoutePolicyId", AAZStrType, ".export_route_policy_id")
|
||||
|
||||
export_route_policy = _builder.get(".properties.connectedSubnetRoutePolicy.exportRoutePolicy")
|
||||
if export_route_policy is not None:
|
||||
export_route_policy.set_prop("exportIpv4RoutePolicyId", AAZStrType, ".export_ipv4_route_policy_id")
|
||||
export_route_policy.set_prop("exportIpv6RoutePolicyId", AAZStrType, ".export_ipv6_route_policy_id")
|
||||
|
||||
tags = _builder.get(".tags")
|
||||
if tags is not None:
|
||||
tags.set_elements(AAZStrType, ".")
|
||||
|
||||
return self.serialize_content(_content_value)
|
||||
|
||||
def on_200(self, session):
|
||||
data = self.deserialize_http_content(session)
|
||||
self.ctx.set_var(
|
||||
"instance",
|
||||
data,
|
||||
schema_builder=self._build_schema_on_200
|
||||
)
|
||||
|
||||
_schema_on_200 = None
|
||||
|
||||
@classmethod
|
||||
def _build_schema_on_200(cls):
|
||||
if cls._schema_on_200 is not None:
|
||||
return cls._schema_on_200
|
||||
|
||||
cls._schema_on_200 = AAZObjectType()
|
||||
|
||||
_schema_on_200 = cls._schema_on_200
|
||||
_schema_on_200.id = AAZStrType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_schema_on_200.location = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
_schema_on_200.name = AAZStrType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_schema_on_200.properties = AAZObjectType(
|
||||
flags={"required": True, "client_flatten": True},
|
||||
)
|
||||
_schema_on_200.system_data = AAZObjectType(
|
||||
serialized_name="systemData",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_schema_on_200.tags = AAZDictType()
|
||||
_schema_on_200.type = AAZStrType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
|
||||
properties = cls._schema_on_200.properties
|
||||
properties.administrative_state = AAZStrType(
|
||||
serialized_name="administrativeState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.aggregate_route_configuration = AAZObjectType(
|
||||
serialized_name="aggregateRouteConfiguration",
|
||||
)
|
||||
properties.annotation = AAZStrType()
|
||||
properties.configuration_state = AAZStrType(
|
||||
serialized_name="configurationState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.connected_subnet_route_policy = AAZObjectType(
|
||||
serialized_name="connectedSubnetRoutePolicy",
|
||||
)
|
||||
properties.network_fabric_id = AAZStrType(
|
||||
serialized_name="networkFabricId",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.provisioning_state = AAZStrType(
|
||||
serialized_name="provisioningState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.redistribute_connected_subnets = AAZStrType(
|
||||
serialized_name="redistributeConnectedSubnets",
|
||||
)
|
||||
properties.redistribute_static_routes = AAZStrType(
|
||||
serialized_name="redistributeStaticRoutes",
|
||||
)
|
||||
|
||||
aggregate_route_configuration = cls._schema_on_200.properties.aggregate_route_configuration
|
||||
aggregate_route_configuration.ipv4_routes = AAZListType(
|
||||
serialized_name="ipv4Routes",
|
||||
)
|
||||
aggregate_route_configuration.ipv6_routes = AAZListType(
|
||||
serialized_name="ipv6Routes",
|
||||
)
|
||||
|
||||
ipv4_routes = cls._schema_on_200.properties.aggregate_route_configuration.ipv4_routes
|
||||
ipv4_routes.Element = AAZObjectType()
|
||||
_UpdateHelper._build_schema_aggregate_route_read(ipv4_routes.Element)
|
||||
|
||||
ipv6_routes = cls._schema_on_200.properties.aggregate_route_configuration.ipv6_routes
|
||||
ipv6_routes.Element = AAZObjectType()
|
||||
_UpdateHelper._build_schema_aggregate_route_read(ipv6_routes.Element)
|
||||
|
||||
connected_subnet_route_policy = cls._schema_on_200.properties.connected_subnet_route_policy
|
||||
connected_subnet_route_policy.export_route_policy = AAZObjectType(
|
||||
serialized_name="exportRoutePolicy",
|
||||
)
|
||||
connected_subnet_route_policy.export_route_policy_id = AAZStrType(
|
||||
serialized_name="exportRoutePolicyId",
|
||||
)
|
||||
|
||||
export_route_policy = cls._schema_on_200.properties.connected_subnet_route_policy.export_route_policy
|
||||
export_route_policy.export_ipv4_route_policy_id = AAZStrType(
|
||||
serialized_name="exportIpv4RoutePolicyId",
|
||||
)
|
||||
export_route_policy.export_ipv6_route_policy_id = AAZStrType(
|
||||
serialized_name="exportIpv6RoutePolicyId",
|
||||
)
|
||||
|
||||
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 _UpdateHelper:
|
||||
"""Helper class for Update"""
|
||||
|
||||
@classmethod
|
||||
def _build_schema_aggregate_route_update(cls, _builder):
|
||||
if _builder is None:
|
||||
return
|
||||
_builder.set_prop("prefix", AAZStrType, ".prefix", typ_kwargs={"flags": {"required": True}})
|
||||
|
||||
_schema_aggregate_route_read = None
|
||||
|
||||
@classmethod
|
||||
def _build_schema_aggregate_route_read(cls, _schema):
|
||||
if cls._schema_aggregate_route_read is not None:
|
||||
_schema.prefix = cls._schema_aggregate_route_read.prefix
|
||||
return
|
||||
|
||||
cls._schema_aggregate_route_read = _schema_aggregate_route_read = AAZObjectType()
|
||||
|
||||
aggregate_route_read = _schema_aggregate_route_read
|
||||
aggregate_route_read.prefix = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
_schema.prefix = cls._schema_aggregate_route_read.prefix
|
||||
|
||||
|
||||
__all__ = ["Update"]
|
|
@ -22,9 +22,9 @@ class UpdateAdminState(AAZCommand):
|
|||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-02-01-preview",
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/l3isolationdomains/{}/updateadministrativestate", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/l3isolationdomains/{}/updateadministrativestate", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@ class UpdateAdminState(AAZCommand):
|
|||
|
||||
def _handler(self, command_args):
|
||||
super()._handler(command_args)
|
||||
return self.build_lro_poller(self._execute_operations, None)
|
||||
return self.build_lro_poller(self._execute_operations, self._output)
|
||||
|
||||
_args_schema = None
|
||||
|
||||
|
@ -47,7 +47,7 @@ class UpdateAdminState(AAZCommand):
|
|||
_args_schema = cls._args_schema
|
||||
_args_schema.resource_name = AAZStrArg(
|
||||
options=["--resource-name"],
|
||||
help="Name of the L3IsolationDomain",
|
||||
help="Name of the L3 Isolation Domain.",
|
||||
required=True,
|
||||
id_part="name",
|
||||
)
|
||||
|
@ -88,6 +88,10 @@ class UpdateAdminState(AAZCommand):
|
|||
def post_operations(self):
|
||||
pass
|
||||
|
||||
def _output(self, *args, **kwargs):
|
||||
result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True)
|
||||
return result
|
||||
|
||||
class L3IsolationDomainsUpdateAdministrativeState(AAZHttpOperation):
|
||||
CLIENT_TYPE = "MgmtClient"
|
||||
|
||||
|
@ -152,7 +156,7 @@ class UpdateAdminState(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
@ -164,6 +168,9 @@ class UpdateAdminState(AAZCommand):
|
|||
**self.serialize_header_param(
|
||||
"Content-Type", "application/json",
|
||||
),
|
||||
**self.serialize_header_param(
|
||||
"Accept", "application/json",
|
||||
),
|
||||
}
|
||||
return parameters
|
||||
|
||||
|
@ -184,11 +191,116 @@ class UpdateAdminState(AAZCommand):
|
|||
return self.serialize_content(_content_value)
|
||||
|
||||
def on_200(self, session):
|
||||
pass
|
||||
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()
|
||||
_UpdateAdminStateHelper._build_schema_common_post_action_response_for_device_update_read(cls._schema_on_200)
|
||||
|
||||
return cls._schema_on_200
|
||||
|
||||
|
||||
class _UpdateAdminStateHelper:
|
||||
"""Helper class for UpdateAdminState"""
|
||||
|
||||
_schema_common_post_action_response_for_device_update_read = None
|
||||
|
||||
@classmethod
|
||||
def _build_schema_common_post_action_response_for_device_update_read(cls, _schema):
|
||||
if cls._schema_common_post_action_response_for_device_update_read is not None:
|
||||
_schema.configuration_state = cls._schema_common_post_action_response_for_device_update_read.configuration_state
|
||||
_schema.error = cls._schema_common_post_action_response_for_device_update_read.error
|
||||
_schema.failed_devices = cls._schema_common_post_action_response_for_device_update_read.failed_devices
|
||||
_schema.successful_devices = cls._schema_common_post_action_response_for_device_update_read.successful_devices
|
||||
return
|
||||
|
||||
cls._schema_common_post_action_response_for_device_update_read = _schema_common_post_action_response_for_device_update_read = AAZObjectType()
|
||||
|
||||
common_post_action_response_for_device_update_read = _schema_common_post_action_response_for_device_update_read
|
||||
common_post_action_response_for_device_update_read.configuration_state = AAZStrType(
|
||||
serialized_name="configurationState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
common_post_action_response_for_device_update_read.error = AAZObjectType()
|
||||
cls._build_schema_error_detail_read(common_post_action_response_for_device_update_read.error)
|
||||
common_post_action_response_for_device_update_read.failed_devices = AAZListType(
|
||||
serialized_name="failedDevices",
|
||||
)
|
||||
common_post_action_response_for_device_update_read.successful_devices = AAZListType(
|
||||
serialized_name="successfulDevices",
|
||||
)
|
||||
|
||||
failed_devices = _schema_common_post_action_response_for_device_update_read.failed_devices
|
||||
failed_devices.Element = AAZStrType()
|
||||
|
||||
successful_devices = _schema_common_post_action_response_for_device_update_read.successful_devices
|
||||
successful_devices.Element = AAZStrType()
|
||||
|
||||
_schema.configuration_state = cls._schema_common_post_action_response_for_device_update_read.configuration_state
|
||||
_schema.error = cls._schema_common_post_action_response_for_device_update_read.error
|
||||
_schema.failed_devices = cls._schema_common_post_action_response_for_device_update_read.failed_devices
|
||||
_schema.successful_devices = cls._schema_common_post_action_response_for_device_update_read.successful_devices
|
||||
|
||||
_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.type = AAZStrType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
|
||||
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
|
||||
|
||||
|
||||
__all__ = ["UpdateAdminState"]
|
||||
|
|
|
@ -20,7 +20,7 @@ class Wait(AAZWaitCommand):
|
|||
|
||||
_aaz_info = {
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/l3isolationdomains/{}", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/l3isolationdomains/{}", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@ class Wait(AAZWaitCommand):
|
|||
_args_schema = cls._args_schema
|
||||
_args_schema.resource_name = AAZStrArg(
|
||||
options=["--resource-name"],
|
||||
help="Name of the L3 Isolation Domain",
|
||||
help="Name of the L3 Isolation Domain.",
|
||||
required=True,
|
||||
id_part="name",
|
||||
)
|
||||
|
@ -117,7 +117,7 @@ class Wait(AAZWaitCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
@ -160,7 +160,7 @@ class Wait(AAZWaitCommand):
|
|||
flags={"read_only": True},
|
||||
)
|
||||
_schema_on_200.properties = AAZObjectType(
|
||||
flags={"client_flatten": True},
|
||||
flags={"required": True, "client_flatten": True},
|
||||
)
|
||||
_schema_on_200.system_data = AAZObjectType(
|
||||
serialized_name="systemData",
|
||||
|
@ -180,22 +180,17 @@ class Wait(AAZWaitCommand):
|
|||
serialized_name="aggregateRouteConfiguration",
|
||||
)
|
||||
properties.annotation = AAZStrType()
|
||||
properties.configuration_state = AAZStrType(
|
||||
serialized_name="configurationState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.connected_subnet_route_policy = AAZObjectType(
|
||||
serialized_name="connectedSubnetRoutePolicy",
|
||||
)
|
||||
properties.description = AAZStrType()
|
||||
properties.disabled_on_resources = AAZListType(
|
||||
serialized_name="disabledOnResources",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.network_fabric_id = AAZStrType(
|
||||
serialized_name="networkFabricId",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.option_b_disabled_on_resources = AAZListType(
|
||||
serialized_name="optionBDisabledOnResources",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.provisioning_state = AAZStrType(
|
||||
serialized_name="provisioningState",
|
||||
flags={"read_only": True},
|
||||
|
@ -224,19 +219,20 @@ class Wait(AAZWaitCommand):
|
|||
_WaitHelper._build_schema_aggregate_route_read(ipv6_routes.Element)
|
||||
|
||||
connected_subnet_route_policy = cls._schema_on_200.properties.connected_subnet_route_policy
|
||||
connected_subnet_route_policy.administrative_state = AAZStrType(
|
||||
serialized_name="administrativeState",
|
||||
flags={"read_only": True},
|
||||
connected_subnet_route_policy.export_route_policy = AAZObjectType(
|
||||
serialized_name="exportRoutePolicy",
|
||||
)
|
||||
connected_subnet_route_policy.export_route_policy_id = AAZStrType(
|
||||
serialized_name="exportRoutePolicyId",
|
||||
)
|
||||
|
||||
disabled_on_resources = cls._schema_on_200.properties.disabled_on_resources
|
||||
disabled_on_resources.Element = AAZStrType()
|
||||
|
||||
option_b_disabled_on_resources = cls._schema_on_200.properties.option_b_disabled_on_resources
|
||||
option_b_disabled_on_resources.Element = AAZStrType()
|
||||
export_route_policy = cls._schema_on_200.properties.connected_subnet_route_policy.export_route_policy
|
||||
export_route_policy.export_ipv4_route_policy_id = AAZStrType(
|
||||
serialized_name="exportIpv4RoutePolicyId",
|
||||
)
|
||||
export_route_policy.export_ipv6_route_policy_id = AAZStrType(
|
||||
serialized_name="exportIpv6RoutePolicyId",
|
||||
)
|
||||
|
||||
system_data = cls._schema_on_200.system_data
|
||||
system_data.created_at = AAZStrType(
|
||||
|
@ -278,7 +274,9 @@ class _WaitHelper:
|
|||
cls._schema_aggregate_route_read = _schema_aggregate_route_read = AAZObjectType()
|
||||
|
||||
aggregate_route_read = _schema_aggregate_route_read
|
||||
aggregate_route_read.prefix = AAZStrType()
|
||||
aggregate_route_read.prefix = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
_schema.prefix = cls._schema_aggregate_route_read.prefix
|
||||
|
||||
|
|
|
@ -13,4 +13,5 @@ from ._create import *
|
|||
from ._delete import *
|
||||
from ._list import *
|
||||
from ._show import *
|
||||
from ._update import *
|
||||
from ._wait import *
|
||||
|
|
|
@ -15,19 +15,19 @@ from azure.cli.core.aaz import *
|
|||
"networkfabric nni create",
|
||||
)
|
||||
class Create(AAZCommand):
|
||||
"""Create a Network To Network Interconnect resource.
|
||||
"""Create a Network To Network Interconnect resource
|
||||
|
||||
:example: Create a Network To Network Interconnect
|
||||
az networkfabric nni create --resource-group "example-rg" --fabric "example-fabric" --resource-name "example-nni" --nni-type "CE" --is-management-type "True" --use-option-b "True" --layer2-configuration "{portCount:3,mtu:1500}" --layer3-configuration "{importRoutePolicyId:'importRoutePolicyId',exportRoutePolicyId:'exportRoutePolicyId',peerASN:28,vlanId:501,primaryIpv4Prefix:'172.31.0.0/31',secondaryIpv4Prefix:'172.31.0.20/31'}"
|
||||
az networkfabric nni create --resource-group "example-rg" --fabric "example-fabric" --resource-name "example-nni" --nni-type "CE" --is-management-type "True" --use-option-b "True" --import-route-policy "{importIpv4RoutePolicyId:'/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/microsoft.managednetworkfabric/routePolicies/example-routepolicy',importIpv6RoutePolicyId:'/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/microsoft.managednetworkfabric/routePolicies/example-routepolicy'}" --export-route-policy "{exportIpv4RoutePolicyId:'/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/microsoft.managednetworkfabric/routePolicies/example-routepolicy',exportIpv6RoutePolicyId:'/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/microsoft.managednetworkfabric/routePolicies/example-routepolicy'}" --layer2-configuration "{interfaces:['resourceId'],mtu:1500}" --option-b-layer3-configuration "{peerASN:28,vlanId:501,primaryIpv4Prefix:'172.31.0.0/31',secondaryIpv4Prefix:'172.31.0.20/31'}"
|
||||
|
||||
:example: Help text for sub parameters under the specific parent can be viewed by using the shorthand syntax '??'. See https://github.com/Azure/azure-cli/tree/dev/doc/shorthand_syntax.md for more about shorthand syntax.
|
||||
az networkfabric nni create --layer2-configuration ??
|
||||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-02-01-preview",
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkfabrics/{}/networktonetworkinterconnects/{}", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkfabrics/{}/networktonetworkinterconnects/{}", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@ class Create(AAZCommand):
|
|||
)
|
||||
_args_schema.resource_name = AAZStrArg(
|
||||
options=["--resource-name"],
|
||||
help="Name of the NetworkToNetworkInterconnect Name",
|
||||
help="Name of the Network to Network Interconnect.",
|
||||
required=True,
|
||||
)
|
||||
_args_schema.resource_group = AAZResourceGroupNameArg(
|
||||
|
@ -66,93 +66,209 @@ class Create(AAZCommand):
|
|||
# define Arg Group "Properties"
|
||||
|
||||
_args_schema = cls._args_schema
|
||||
_args_schema.egress_acl_id = AAZResourceIdArg(
|
||||
options=["--egress-acl-id"],
|
||||
arg_group="Properties",
|
||||
help="Egress Acl ARM resource ID.",
|
||||
)
|
||||
_args_schema.export_route_policy = AAZObjectArg(
|
||||
options=["--export-route-policy"],
|
||||
arg_group="Properties",
|
||||
help="Export Route Policy configuration.",
|
||||
)
|
||||
_args_schema.import_route_policy = AAZObjectArg(
|
||||
options=["--import-route-policy"],
|
||||
arg_group="Properties",
|
||||
help="Import Route Policy configuration.",
|
||||
)
|
||||
_args_schema.ingress_acl_id = AAZResourceIdArg(
|
||||
options=["--ingress-acl-id"],
|
||||
arg_group="Properties",
|
||||
help="Ingress Acl ARM resource ID.",
|
||||
)
|
||||
_args_schema.is_management_type = AAZStrArg(
|
||||
options=["--is-management-type"],
|
||||
arg_group="Properties",
|
||||
help="Configuration to use NNI for Infrastructure Management. Example: True/False.",
|
||||
help="Configuration to use NNI for Infrastructure Management. Default value is True. Example: True.",
|
||||
enum={"False": "False", "True": "True"},
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
_args_schema.layer2_configuration = AAZObjectArg(
|
||||
options=["--layer2-configuration"],
|
||||
arg_group="Properties",
|
||||
help="Common properties for Layer2Configuration.",
|
||||
)
|
||||
_args_schema.layer3_configuration = AAZObjectArg(
|
||||
options=["--layer3-configuration"],
|
||||
arg_group="Properties",
|
||||
help="Common properties for Layer3Configuration.",
|
||||
help="Common properties for Layer2 Configuration.",
|
||||
)
|
||||
_args_schema.nni_type = AAZStrArg(
|
||||
options=["--nni-type"],
|
||||
arg_group="Properties",
|
||||
help="Type of NNI used. Example: CE | NPB",
|
||||
help="Usage type of NNI. Default value is CE. Example: CE",
|
||||
enum={"CE": "CE", "NPB": "NPB"},
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
_args_schema.npb_static_route_configuration = AAZObjectArg(
|
||||
options=["--npb-static-route-configuration"],
|
||||
arg_group="Properties",
|
||||
help="NPB Static Route Configuration properties.",
|
||||
)
|
||||
_args_schema.option_b_layer3_configuration = AAZObjectArg(
|
||||
options=["--option-b-layer3-configuration"],
|
||||
arg_group="Properties",
|
||||
help="Common properties for Layer3Configuration.",
|
||||
)
|
||||
_args_schema.use_option_b = AAZStrArg(
|
||||
options=["--use-option-b"],
|
||||
arg_group="Properties",
|
||||
help="Parameter to configure option B for NNI. If set to True, Layer3 configuration is mandatory.",
|
||||
help="Selection of option B for NNI. Example: True",
|
||||
required=True,
|
||||
enum={"False": "False", "True": "True"},
|
||||
)
|
||||
|
||||
layer2_configuration = cls._args_schema.layer2_configuration
|
||||
layer2_configuration.mtu = AAZIntArg(
|
||||
options=["mtu"],
|
||||
help="MTU of the packets between PE & CE. The value is between 1500 to 9000. Default value is 1500",
|
||||
required=True,
|
||||
fmt=AAZIntArgFormat(
|
||||
maximum=9000,
|
||||
minimum=1500,
|
||||
),
|
||||
export_route_policy = cls._args_schema.export_route_policy
|
||||
export_route_policy.export_ipv4_route_policy_id = AAZResourceIdArg(
|
||||
options=["export-ipv4-route-policy-id"],
|
||||
help="Export IPv4 Route Policy Id.",
|
||||
)
|
||||
layer2_configuration.port_count = AAZIntArg(
|
||||
options=["port-count"],
|
||||
help="Number of ports connected between PE/CE. Maximum value depends on FabricSKU.",
|
||||
export_route_policy.export_ipv6_route_policy_id = AAZResourceIdArg(
|
||||
options=["export-ipv6-route-policy-id"],
|
||||
help="Export IPv6 Route Policy Id.",
|
||||
)
|
||||
|
||||
layer3_configuration = cls._args_schema.layer3_configuration
|
||||
layer3_configuration.export_route_policy_id = AAZStrArg(
|
||||
options=["export-route-policy-id"],
|
||||
help="exportRoutePolicyId",
|
||||
import_route_policy = cls._args_schema.import_route_policy
|
||||
import_route_policy.import_ipv4_route_policy_id = AAZResourceIdArg(
|
||||
options=["import-ipv4-route-policy-id"],
|
||||
help="Import IPv4 Route Policy Id.",
|
||||
)
|
||||
layer3_configuration.import_route_policy_id = AAZStrArg(
|
||||
options=["import-route-policy-id"],
|
||||
help="importRoutePolicyId",
|
||||
import_route_policy.import_ipv6_route_policy_id = AAZResourceIdArg(
|
||||
options=["import-ipv6-route-policy-id"],
|
||||
help="Import IPv6 Route Policy Id.",
|
||||
)
|
||||
layer3_configuration.peer_asn = AAZIntArg(
|
||||
options=["peer-asn"],
|
||||
help="ASN of PE devices for CE/PE connectivity. The value should be between 1 to 65535. Example : 28",
|
||||
|
||||
layer2_configuration = cls._args_schema.layer2_configuration
|
||||
layer2_configuration.interfaces = AAZListArg(
|
||||
options=["interfaces"],
|
||||
help="List of network device interfaces resource IDs.",
|
||||
)
|
||||
layer2_configuration.mtu = AAZIntArg(
|
||||
options=["mtu"],
|
||||
help="MTU of the packets between PE & CE. The value should be between 64 and 9200.",
|
||||
fmt=AAZIntArgFormat(
|
||||
maximum=65535,
|
||||
maximum=9200,
|
||||
minimum=64,
|
||||
),
|
||||
)
|
||||
|
||||
interfaces = cls._args_schema.layer2_configuration.interfaces
|
||||
interfaces.Element = AAZResourceIdArg()
|
||||
|
||||
npb_static_route_configuration = cls._args_schema.npb_static_route_configuration
|
||||
npb_static_route_configuration.bfd_configuration = AAZObjectArg(
|
||||
options=["bfd-configuration"],
|
||||
help="BFD Configuration properties.",
|
||||
)
|
||||
npb_static_route_configuration.ipv4_routes = AAZListArg(
|
||||
options=["ipv4-routes"],
|
||||
help="List of IPv4 Routes.",
|
||||
)
|
||||
npb_static_route_configuration.ipv6_routes = AAZListArg(
|
||||
options=["ipv6-routes"],
|
||||
help="List of IPv6 Routes.",
|
||||
)
|
||||
|
||||
bfd_configuration = cls._args_schema.npb_static_route_configuration.bfd_configuration
|
||||
bfd_configuration.interval_in_milli_seconds = AAZIntArg(
|
||||
options=["interval-in-milli-seconds"],
|
||||
help="Interval in milliseconds. Default value is 300. Example: 300.",
|
||||
)
|
||||
bfd_configuration.multiplier = AAZIntArg(
|
||||
options=["multiplier"],
|
||||
help="Multiplier for the Bfd Configuration. Default value is 5. Example: 5.",
|
||||
)
|
||||
|
||||
ipv4_routes = cls._args_schema.npb_static_route_configuration.ipv4_routes
|
||||
ipv4_routes.Element = AAZObjectArg()
|
||||
cls._build_args_static_route_properties_create(ipv4_routes.Element)
|
||||
|
||||
ipv6_routes = cls._args_schema.npb_static_route_configuration.ipv6_routes
|
||||
ipv6_routes.Element = AAZObjectArg()
|
||||
cls._build_args_static_route_properties_create(ipv6_routes.Element)
|
||||
|
||||
option_b_layer3_configuration = cls._args_schema.option_b_layer3_configuration
|
||||
option_b_layer3_configuration.peer_asn = AAZIntArg(
|
||||
options=["peer-asn"],
|
||||
help="ASN of PE devices for CE/PE connectivity. The value should be between 1 to 4294967295. Example: 28.",
|
||||
required=True,
|
||||
fmt=AAZIntArgFormat(
|
||||
maximum=4294967295,
|
||||
minimum=1,
|
||||
),
|
||||
)
|
||||
layer3_configuration.primary_ipv4_prefix = AAZStrArg(
|
||||
option_b_layer3_configuration.primary_ipv4_prefix = AAZStrArg(
|
||||
options=["primary-ipv4-prefix"],
|
||||
help="IPv4 Address Prefix of CE-PE interconnect links. Default value is 172.31.0.0/31.",
|
||||
help="IPv4 Address Prefix. Example: 172.31.0.0/31.",
|
||||
)
|
||||
layer3_configuration.primary_ipv6_prefix = AAZStrArg(
|
||||
option_b_layer3_configuration.primary_ipv6_prefix = AAZStrArg(
|
||||
options=["primary-ipv6-prefix"],
|
||||
help="IPv6 Address Prefix of CE-PE interconnect links. Default value is 3FFE:FFFF:0:CD30::a0/126.",
|
||||
help="IPv6 Address Prefix. Example: 3FFE:FFFF:0:CD30::a0/127.",
|
||||
)
|
||||
layer3_configuration.secondary_ipv4_prefix = AAZStrArg(
|
||||
option_b_layer3_configuration.secondary_ipv4_prefix = AAZStrArg(
|
||||
options=["secondary-ipv4-prefix"],
|
||||
help="Secondary IPv4 Address Prefix of CE-PE interconnect links. Default value is 172.31.0.20/31.",
|
||||
help="Secondary IPv4 Address Prefix. Example: 172.31.0.20/31.",
|
||||
)
|
||||
layer3_configuration.secondary_ipv6_prefix = AAZStrArg(
|
||||
option_b_layer3_configuration.secondary_ipv6_prefix = AAZStrArg(
|
||||
options=["secondary-ipv6-prefix"],
|
||||
help="Secondary IPv6 Address Prefix of CE-PE interconnect links. Default value is 3FFE:FFFF:0:CD30::a4/126.",
|
||||
help="Secondary IPv6 Address Prefix. Example: 3FFE:FFFF:0:CD30::a4/127.",
|
||||
)
|
||||
layer3_configuration.vlan_id = AAZIntArg(
|
||||
option_b_layer3_configuration.vlan_id = AAZIntArg(
|
||||
options=["vlan-id"],
|
||||
help="VLAN for CE/PE Layer 3 connectivity. The value should be between 501 to 4095. Example : 501",
|
||||
help="VLAN for CE/PE Layer 3 connectivity. The value should be between 100 to 4094. Example: 501.",
|
||||
required=True,
|
||||
fmt=AAZIntArgFormat(
|
||||
maximum=4095,
|
||||
minimum=501,
|
||||
maximum=4094,
|
||||
minimum=100,
|
||||
),
|
||||
)
|
||||
return cls._args_schema
|
||||
|
||||
_args_static_route_properties_create = None
|
||||
|
||||
@classmethod
|
||||
def _build_args_static_route_properties_create(cls, _schema):
|
||||
if cls._args_static_route_properties_create is not None:
|
||||
_schema.next_hop = cls._args_static_route_properties_create.next_hop
|
||||
_schema.prefix = cls._args_static_route_properties_create.prefix
|
||||
return
|
||||
|
||||
cls._args_static_route_properties_create = AAZObjectArg()
|
||||
|
||||
static_route_properties_create = cls._args_static_route_properties_create
|
||||
static_route_properties_create.next_hop = AAZListArg(
|
||||
options=["next-hop"],
|
||||
help="List of next hop addresses.",
|
||||
required=True,
|
||||
)
|
||||
static_route_properties_create.prefix = AAZStrArg(
|
||||
options=["prefix"],
|
||||
help="Prefix of the route.",
|
||||
required=True,
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
|
||||
next_hop = cls._args_static_route_properties_create.next_hop
|
||||
next_hop.Element = AAZStrArg(
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
|
||||
_schema.next_hop = cls._args_static_route_properties_create.next_hop
|
||||
_schema.prefix = cls._args_static_route_properties_create.prefix
|
||||
|
||||
def _execute_operations(self):
|
||||
self.pre_operations()
|
||||
yield self.NetworkToNetworkInterconnectsCreate(ctx=self.ctx)()
|
||||
|
@ -238,7 +354,7 @@ class Create(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
@ -263,31 +379,67 @@ class Create(AAZCommand):
|
|||
typ=AAZObjectType,
|
||||
typ_kwargs={"flags": {"required": True, "client_flatten": True}}
|
||||
)
|
||||
_builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
|
||||
_builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={"flags": {"required": True, "client_flatten": True}})
|
||||
|
||||
properties = _builder.get(".properties")
|
||||
if properties is not None:
|
||||
properties.set_prop("isManagementType", AAZStrType, ".is_management_type", typ_kwargs={"flags": {"required": True}})
|
||||
properties.set_prop("egressAclId", AAZStrType, ".egress_acl_id")
|
||||
properties.set_prop("exportRoutePolicy", AAZObjectType, ".export_route_policy")
|
||||
properties.set_prop("importRoutePolicy", AAZObjectType, ".import_route_policy")
|
||||
properties.set_prop("ingressAclId", AAZStrType, ".ingress_acl_id")
|
||||
properties.set_prop("isManagementType", AAZStrType, ".is_management_type")
|
||||
properties.set_prop("layer2Configuration", AAZObjectType, ".layer2_configuration")
|
||||
properties.set_prop("layer3Configuration", AAZObjectType, ".layer3_configuration")
|
||||
properties.set_prop("nniType", AAZStrType, ".nni_type")
|
||||
properties.set_prop("npbStaticRouteConfiguration", AAZObjectType, ".npb_static_route_configuration")
|
||||
properties.set_prop("optionBLayer3Configuration", AAZObjectType, ".option_b_layer3_configuration")
|
||||
properties.set_prop("useOptionB", AAZStrType, ".use_option_b", typ_kwargs={"flags": {"required": True}})
|
||||
|
||||
export_route_policy = _builder.get(".properties.exportRoutePolicy")
|
||||
if export_route_policy is not None:
|
||||
export_route_policy.set_prop("exportIpv4RoutePolicyId", AAZStrType, ".export_ipv4_route_policy_id")
|
||||
export_route_policy.set_prop("exportIpv6RoutePolicyId", AAZStrType, ".export_ipv6_route_policy_id")
|
||||
|
||||
import_route_policy = _builder.get(".properties.importRoutePolicy")
|
||||
if import_route_policy is not None:
|
||||
import_route_policy.set_prop("importIpv4RoutePolicyId", AAZStrType, ".import_ipv4_route_policy_id")
|
||||
import_route_policy.set_prop("importIpv6RoutePolicyId", AAZStrType, ".import_ipv6_route_policy_id")
|
||||
|
||||
layer2_configuration = _builder.get(".properties.layer2Configuration")
|
||||
if layer2_configuration is not None:
|
||||
layer2_configuration.set_prop("mtu", AAZIntType, ".mtu", typ_kwargs={"flags": {"required": True}})
|
||||
layer2_configuration.set_prop("portCount", AAZIntType, ".port_count")
|
||||
layer2_configuration.set_prop("interfaces", AAZListType, ".interfaces")
|
||||
layer2_configuration.set_prop("mtu", AAZIntType, ".mtu")
|
||||
|
||||
layer3_configuration = _builder.get(".properties.layer3Configuration")
|
||||
if layer3_configuration is not None:
|
||||
layer3_configuration.set_prop("exportRoutePolicyId", AAZStrType, ".export_route_policy_id")
|
||||
layer3_configuration.set_prop("importRoutePolicyId", AAZStrType, ".import_route_policy_id")
|
||||
layer3_configuration.set_prop("peerASN", AAZIntType, ".peer_asn")
|
||||
layer3_configuration.set_prop("primaryIpv4Prefix", AAZStrType, ".primary_ipv4_prefix")
|
||||
layer3_configuration.set_prop("primaryIpv6Prefix", AAZStrType, ".primary_ipv6_prefix")
|
||||
layer3_configuration.set_prop("secondaryIpv4Prefix", AAZStrType, ".secondary_ipv4_prefix")
|
||||
layer3_configuration.set_prop("secondaryIpv6Prefix", AAZStrType, ".secondary_ipv6_prefix")
|
||||
layer3_configuration.set_prop("vlanId", AAZIntType, ".vlan_id")
|
||||
interfaces = _builder.get(".properties.layer2Configuration.interfaces")
|
||||
if interfaces is not None:
|
||||
interfaces.set_elements(AAZStrType, ".")
|
||||
|
||||
npb_static_route_configuration = _builder.get(".properties.npbStaticRouteConfiguration")
|
||||
if npb_static_route_configuration is not None:
|
||||
npb_static_route_configuration.set_prop("bfdConfiguration", AAZObjectType, ".bfd_configuration")
|
||||
npb_static_route_configuration.set_prop("ipv4Routes", AAZListType, ".ipv4_routes")
|
||||
npb_static_route_configuration.set_prop("ipv6Routes", AAZListType, ".ipv6_routes")
|
||||
|
||||
bfd_configuration = _builder.get(".properties.npbStaticRouteConfiguration.bfdConfiguration")
|
||||
if bfd_configuration is not None:
|
||||
bfd_configuration.set_prop("intervalInMilliSeconds", AAZIntType, ".interval_in_milli_seconds")
|
||||
bfd_configuration.set_prop("multiplier", AAZIntType, ".multiplier")
|
||||
|
||||
ipv4_routes = _builder.get(".properties.npbStaticRouteConfiguration.ipv4Routes")
|
||||
if ipv4_routes is not None:
|
||||
_CreateHelper._build_schema_static_route_properties_create(ipv4_routes.set_elements(AAZObjectType, "."))
|
||||
|
||||
ipv6_routes = _builder.get(".properties.npbStaticRouteConfiguration.ipv6Routes")
|
||||
if ipv6_routes is not None:
|
||||
_CreateHelper._build_schema_static_route_properties_create(ipv6_routes.set_elements(AAZObjectType, "."))
|
||||
|
||||
option_b_layer3_configuration = _builder.get(".properties.optionBLayer3Configuration")
|
||||
if option_b_layer3_configuration is not None:
|
||||
option_b_layer3_configuration.set_prop("peerASN", AAZIntType, ".peer_asn", typ_kwargs={"flags": {"required": True}})
|
||||
option_b_layer3_configuration.set_prop("primaryIpv4Prefix", AAZStrType, ".primary_ipv4_prefix")
|
||||
option_b_layer3_configuration.set_prop("primaryIpv6Prefix", AAZStrType, ".primary_ipv6_prefix")
|
||||
option_b_layer3_configuration.set_prop("secondaryIpv4Prefix", AAZStrType, ".secondary_ipv4_prefix")
|
||||
option_b_layer3_configuration.set_prop("secondaryIpv6Prefix", AAZStrType, ".secondary_ipv6_prefix")
|
||||
option_b_layer3_configuration.set_prop("vlanId", AAZIntType, ".vlan_id", typ_kwargs={"flags": {"required": True}})
|
||||
|
||||
return self.serialize_content(_content_value)
|
||||
|
||||
|
@ -316,7 +468,7 @@ class Create(AAZCommand):
|
|||
flags={"read_only": True},
|
||||
)
|
||||
_schema_on_200_201.properties = AAZObjectType(
|
||||
flags={"client_flatten": True},
|
||||
flags={"required": True, "client_flatten": True},
|
||||
)
|
||||
_schema_on_200_201.system_data = AAZObjectType(
|
||||
serialized_name="systemData",
|
||||
|
@ -331,19 +483,37 @@ class Create(AAZCommand):
|
|||
serialized_name="administrativeState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.configuration_state = AAZStrType(
|
||||
serialized_name="configurationState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.egress_acl_id = AAZStrType(
|
||||
serialized_name="egressAclId",
|
||||
)
|
||||
properties.export_route_policy = AAZObjectType(
|
||||
serialized_name="exportRoutePolicy",
|
||||
)
|
||||
properties.import_route_policy = AAZObjectType(
|
||||
serialized_name="importRoutePolicy",
|
||||
)
|
||||
properties.ingress_acl_id = AAZStrType(
|
||||
serialized_name="ingressAclId",
|
||||
)
|
||||
properties.is_management_type = AAZStrType(
|
||||
serialized_name="isManagementType",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.layer2_configuration = AAZObjectType(
|
||||
serialized_name="layer2Configuration",
|
||||
)
|
||||
properties.layer3_configuration = AAZObjectType(
|
||||
serialized_name="layer3Configuration",
|
||||
)
|
||||
properties.nni_type = AAZStrType(
|
||||
serialized_name="nniType",
|
||||
)
|
||||
properties.npb_static_route_configuration = AAZObjectType(
|
||||
serialized_name="npbStaticRouteConfiguration",
|
||||
)
|
||||
properties.option_b_layer3_configuration = AAZObjectType(
|
||||
serialized_name="optionBLayer3Configuration",
|
||||
)
|
||||
properties.provisioning_state = AAZStrType(
|
||||
serialized_name="provisioningState",
|
||||
flags={"read_only": True},
|
||||
|
@ -353,48 +523,82 @@ class Create(AAZCommand):
|
|||
flags={"required": True},
|
||||
)
|
||||
|
||||
export_route_policy = cls._schema_on_200_201.properties.export_route_policy
|
||||
export_route_policy.export_ipv4_route_policy_id = AAZStrType(
|
||||
serialized_name="exportIpv4RoutePolicyId",
|
||||
)
|
||||
export_route_policy.export_ipv6_route_policy_id = AAZStrType(
|
||||
serialized_name="exportIpv6RoutePolicyId",
|
||||
)
|
||||
|
||||
import_route_policy = cls._schema_on_200_201.properties.import_route_policy
|
||||
import_route_policy.import_ipv4_route_policy_id = AAZStrType(
|
||||
serialized_name="importIpv4RoutePolicyId",
|
||||
)
|
||||
import_route_policy.import_ipv6_route_policy_id = AAZStrType(
|
||||
serialized_name="importIpv6RoutePolicyId",
|
||||
)
|
||||
|
||||
layer2_configuration = cls._schema_on_200_201.properties.layer2_configuration
|
||||
layer2_configuration.interfaces = AAZListType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
layer2_configuration.mtu = AAZIntType(
|
||||
flags={"required": True},
|
||||
)
|
||||
layer2_configuration.port_count = AAZIntType(
|
||||
serialized_name="portCount",
|
||||
)
|
||||
layer2_configuration.interfaces = AAZListType()
|
||||
layer2_configuration.mtu = AAZIntType()
|
||||
|
||||
interfaces = cls._schema_on_200_201.properties.layer2_configuration.interfaces
|
||||
interfaces.Element = AAZStrType()
|
||||
|
||||
layer3_configuration = cls._schema_on_200_201.properties.layer3_configuration
|
||||
layer3_configuration.export_route_policy_id = AAZStrType(
|
||||
serialized_name="exportRoutePolicyId",
|
||||
npb_static_route_configuration = cls._schema_on_200_201.properties.npb_static_route_configuration
|
||||
npb_static_route_configuration.bfd_configuration = AAZObjectType(
|
||||
serialized_name="bfdConfiguration",
|
||||
)
|
||||
layer3_configuration.fabric_asn = AAZIntType(
|
||||
npb_static_route_configuration.ipv4_routes = AAZListType(
|
||||
serialized_name="ipv4Routes",
|
||||
)
|
||||
npb_static_route_configuration.ipv6_routes = AAZListType(
|
||||
serialized_name="ipv6Routes",
|
||||
)
|
||||
|
||||
bfd_configuration = cls._schema_on_200_201.properties.npb_static_route_configuration.bfd_configuration
|
||||
bfd_configuration.administrative_state = AAZStrType(
|
||||
serialized_name="administrativeState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
bfd_configuration.interval_in_milli_seconds = AAZIntType(
|
||||
serialized_name="intervalInMilliSeconds",
|
||||
)
|
||||
bfd_configuration.multiplier = AAZIntType()
|
||||
|
||||
ipv4_routes = cls._schema_on_200_201.properties.npb_static_route_configuration.ipv4_routes
|
||||
ipv4_routes.Element = AAZObjectType()
|
||||
_CreateHelper._build_schema_static_route_properties_read(ipv4_routes.Element)
|
||||
|
||||
ipv6_routes = cls._schema_on_200_201.properties.npb_static_route_configuration.ipv6_routes
|
||||
ipv6_routes.Element = AAZObjectType()
|
||||
_CreateHelper._build_schema_static_route_properties_read(ipv6_routes.Element)
|
||||
|
||||
option_b_layer3_configuration = cls._schema_on_200_201.properties.option_b_layer3_configuration
|
||||
option_b_layer3_configuration.fabric_asn = AAZIntType(
|
||||
serialized_name="fabricASN",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
layer3_configuration.import_route_policy_id = AAZStrType(
|
||||
serialized_name="importRoutePolicyId",
|
||||
)
|
||||
layer3_configuration.peer_asn = AAZIntType(
|
||||
option_b_layer3_configuration.peer_asn = AAZIntType(
|
||||
serialized_name="peerASN",
|
||||
flags={"required": True},
|
||||
)
|
||||
layer3_configuration.primary_ipv4_prefix = AAZStrType(
|
||||
option_b_layer3_configuration.primary_ipv4_prefix = AAZStrType(
|
||||
serialized_name="primaryIpv4Prefix",
|
||||
)
|
||||
layer3_configuration.primary_ipv6_prefix = AAZStrType(
|
||||
option_b_layer3_configuration.primary_ipv6_prefix = AAZStrType(
|
||||
serialized_name="primaryIpv6Prefix",
|
||||
)
|
||||
layer3_configuration.secondary_ipv4_prefix = AAZStrType(
|
||||
option_b_layer3_configuration.secondary_ipv4_prefix = AAZStrType(
|
||||
serialized_name="secondaryIpv4Prefix",
|
||||
)
|
||||
layer3_configuration.secondary_ipv6_prefix = AAZStrType(
|
||||
option_b_layer3_configuration.secondary_ipv6_prefix = AAZStrType(
|
||||
serialized_name="secondaryIpv6Prefix",
|
||||
)
|
||||
layer3_configuration.vlan_id = AAZIntType(
|
||||
option_b_layer3_configuration.vlan_id = AAZIntType(
|
||||
serialized_name="vlanId",
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
system_data = cls._schema_on_200_201.system_data
|
||||
|
@ -423,5 +627,42 @@ class Create(AAZCommand):
|
|||
class _CreateHelper:
|
||||
"""Helper class for Create"""
|
||||
|
||||
@classmethod
|
||||
def _build_schema_static_route_properties_create(cls, _builder):
|
||||
if _builder is None:
|
||||
return
|
||||
_builder.set_prop("nextHop", AAZListType, ".next_hop", typ_kwargs={"flags": {"required": True}})
|
||||
_builder.set_prop("prefix", AAZStrType, ".prefix", typ_kwargs={"flags": {"required": True}})
|
||||
|
||||
next_hop = _builder.get(".nextHop")
|
||||
if next_hop is not None:
|
||||
next_hop.set_elements(AAZStrType, ".")
|
||||
|
||||
_schema_static_route_properties_read = None
|
||||
|
||||
@classmethod
|
||||
def _build_schema_static_route_properties_read(cls, _schema):
|
||||
if cls._schema_static_route_properties_read is not None:
|
||||
_schema.next_hop = cls._schema_static_route_properties_read.next_hop
|
||||
_schema.prefix = cls._schema_static_route_properties_read.prefix
|
||||
return
|
||||
|
||||
cls._schema_static_route_properties_read = _schema_static_route_properties_read = AAZObjectType()
|
||||
|
||||
static_route_properties_read = _schema_static_route_properties_read
|
||||
static_route_properties_read.next_hop = AAZListType(
|
||||
serialized_name="nextHop",
|
||||
flags={"required": True},
|
||||
)
|
||||
static_route_properties_read.prefix = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
next_hop = _schema_static_route_properties_read.next_hop
|
||||
next_hop.Element = AAZStrType()
|
||||
|
||||
_schema.next_hop = cls._schema_static_route_properties_read.next_hop
|
||||
_schema.prefix = cls._schema_static_route_properties_read.prefix
|
||||
|
||||
|
||||
__all__ = ["Create"]
|
||||
|
|
|
@ -15,16 +15,16 @@ from azure.cli.core.aaz import *
|
|||
"networkfabric nni delete",
|
||||
)
|
||||
class Delete(AAZCommand):
|
||||
"""Delete the Network To Network Interconnect resource.
|
||||
"""Delete the Network To Network Interconnect resource
|
||||
|
||||
:example: Delete the Network To Network Interconnect
|
||||
az networkfabric nni delete --resource-group "example-rg" --fabric "example-fabric" --resource-name "example-nni"
|
||||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-02-01-preview",
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkfabrics/{}/networktonetworkinterconnects/{}", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkfabrics/{}/networktonetworkinterconnects/{}", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -53,7 +53,7 @@ class Delete(AAZCommand):
|
|||
)
|
||||
_args_schema.resource_name = AAZStrArg(
|
||||
options=["--resource-name"],
|
||||
help="Name of the NetworkToNetworkInterconnect Name",
|
||||
help="Name of the Network to Network Interconnect.",
|
||||
required=True,
|
||||
id_part="child_name_1",
|
||||
)
|
||||
|
@ -153,7 +153,7 @@ class Delete(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
|
|
@ -15,16 +15,16 @@ from azure.cli.core.aaz import *
|
|||
"networkfabric nni list",
|
||||
)
|
||||
class List(AAZCommand):
|
||||
"""List all Network To Network Interconnects in the provided resource group.
|
||||
"""List all Network To Network Interconnects in the provided resource group
|
||||
|
||||
:example: List the Network To Network Interconnects for Resource Group
|
||||
az networkfabric nni list --resource-group "example-rg" --fabric "example-fabric"
|
||||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-02-01-preview",
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkfabrics/{}/networktonetworkinterconnects", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkfabrics/{}/networktonetworkinterconnects", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -56,7 +56,7 @@ class List(AAZCommand):
|
|||
|
||||
def _execute_operations(self):
|
||||
self.pre_operations()
|
||||
self.NetworkToNetworkInterconnectsList(ctx=self.ctx)()
|
||||
self.NetworkToNetworkInterconnectsListByNetworkFabric(ctx=self.ctx)()
|
||||
self.post_operations()
|
||||
|
||||
@register_callback
|
||||
|
@ -72,7 +72,7 @@ class List(AAZCommand):
|
|||
next_link = self.deserialize_output(self.ctx.vars.instance.next_link)
|
||||
return result, next_link
|
||||
|
||||
class NetworkToNetworkInterconnectsList(AAZHttpOperation):
|
||||
class NetworkToNetworkInterconnectsListByNetworkFabric(AAZHttpOperation):
|
||||
CLIENT_TYPE = "MgmtClient"
|
||||
|
||||
def __call__(self, *args, **kwargs):
|
||||
|
@ -120,7 +120,7 @@ class List(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
@ -169,7 +169,7 @@ class List(AAZCommand):
|
|||
flags={"read_only": True},
|
||||
)
|
||||
_element.properties = AAZObjectType(
|
||||
flags={"client_flatten": True},
|
||||
flags={"required": True, "client_flatten": True},
|
||||
)
|
||||
_element.system_data = AAZObjectType(
|
||||
serialized_name="systemData",
|
||||
|
@ -184,19 +184,37 @@ class List(AAZCommand):
|
|||
serialized_name="administrativeState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.configuration_state = AAZStrType(
|
||||
serialized_name="configurationState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.egress_acl_id = AAZStrType(
|
||||
serialized_name="egressAclId",
|
||||
)
|
||||
properties.export_route_policy = AAZObjectType(
|
||||
serialized_name="exportRoutePolicy",
|
||||
)
|
||||
properties.import_route_policy = AAZObjectType(
|
||||
serialized_name="importRoutePolicy",
|
||||
)
|
||||
properties.ingress_acl_id = AAZStrType(
|
||||
serialized_name="ingressAclId",
|
||||
)
|
||||
properties.is_management_type = AAZStrType(
|
||||
serialized_name="isManagementType",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.layer2_configuration = AAZObjectType(
|
||||
serialized_name="layer2Configuration",
|
||||
)
|
||||
properties.layer3_configuration = AAZObjectType(
|
||||
serialized_name="layer3Configuration",
|
||||
)
|
||||
properties.nni_type = AAZStrType(
|
||||
serialized_name="nniType",
|
||||
)
|
||||
properties.npb_static_route_configuration = AAZObjectType(
|
||||
serialized_name="npbStaticRouteConfiguration",
|
||||
)
|
||||
properties.option_b_layer3_configuration = AAZObjectType(
|
||||
serialized_name="optionBLayer3Configuration",
|
||||
)
|
||||
properties.provisioning_state = AAZStrType(
|
||||
serialized_name="provisioningState",
|
||||
flags={"read_only": True},
|
||||
|
@ -206,48 +224,82 @@ class List(AAZCommand):
|
|||
flags={"required": True},
|
||||
)
|
||||
|
||||
export_route_policy = cls._schema_on_200.value.Element.properties.export_route_policy
|
||||
export_route_policy.export_ipv4_route_policy_id = AAZStrType(
|
||||
serialized_name="exportIpv4RoutePolicyId",
|
||||
)
|
||||
export_route_policy.export_ipv6_route_policy_id = AAZStrType(
|
||||
serialized_name="exportIpv6RoutePolicyId",
|
||||
)
|
||||
|
||||
import_route_policy = cls._schema_on_200.value.Element.properties.import_route_policy
|
||||
import_route_policy.import_ipv4_route_policy_id = AAZStrType(
|
||||
serialized_name="importIpv4RoutePolicyId",
|
||||
)
|
||||
import_route_policy.import_ipv6_route_policy_id = AAZStrType(
|
||||
serialized_name="importIpv6RoutePolicyId",
|
||||
)
|
||||
|
||||
layer2_configuration = cls._schema_on_200.value.Element.properties.layer2_configuration
|
||||
layer2_configuration.interfaces = AAZListType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
layer2_configuration.mtu = AAZIntType(
|
||||
flags={"required": True},
|
||||
)
|
||||
layer2_configuration.port_count = AAZIntType(
|
||||
serialized_name="portCount",
|
||||
)
|
||||
layer2_configuration.interfaces = AAZListType()
|
||||
layer2_configuration.mtu = AAZIntType()
|
||||
|
||||
interfaces = cls._schema_on_200.value.Element.properties.layer2_configuration.interfaces
|
||||
interfaces.Element = AAZStrType()
|
||||
|
||||
layer3_configuration = cls._schema_on_200.value.Element.properties.layer3_configuration
|
||||
layer3_configuration.export_route_policy_id = AAZStrType(
|
||||
serialized_name="exportRoutePolicyId",
|
||||
npb_static_route_configuration = cls._schema_on_200.value.Element.properties.npb_static_route_configuration
|
||||
npb_static_route_configuration.bfd_configuration = AAZObjectType(
|
||||
serialized_name="bfdConfiguration",
|
||||
)
|
||||
layer3_configuration.fabric_asn = AAZIntType(
|
||||
npb_static_route_configuration.ipv4_routes = AAZListType(
|
||||
serialized_name="ipv4Routes",
|
||||
)
|
||||
npb_static_route_configuration.ipv6_routes = AAZListType(
|
||||
serialized_name="ipv6Routes",
|
||||
)
|
||||
|
||||
bfd_configuration = cls._schema_on_200.value.Element.properties.npb_static_route_configuration.bfd_configuration
|
||||
bfd_configuration.administrative_state = AAZStrType(
|
||||
serialized_name="administrativeState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
bfd_configuration.interval_in_milli_seconds = AAZIntType(
|
||||
serialized_name="intervalInMilliSeconds",
|
||||
)
|
||||
bfd_configuration.multiplier = AAZIntType()
|
||||
|
||||
ipv4_routes = cls._schema_on_200.value.Element.properties.npb_static_route_configuration.ipv4_routes
|
||||
ipv4_routes.Element = AAZObjectType()
|
||||
_ListHelper._build_schema_static_route_properties_read(ipv4_routes.Element)
|
||||
|
||||
ipv6_routes = cls._schema_on_200.value.Element.properties.npb_static_route_configuration.ipv6_routes
|
||||
ipv6_routes.Element = AAZObjectType()
|
||||
_ListHelper._build_schema_static_route_properties_read(ipv6_routes.Element)
|
||||
|
||||
option_b_layer3_configuration = cls._schema_on_200.value.Element.properties.option_b_layer3_configuration
|
||||
option_b_layer3_configuration.fabric_asn = AAZIntType(
|
||||
serialized_name="fabricASN",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
layer3_configuration.import_route_policy_id = AAZStrType(
|
||||
serialized_name="importRoutePolicyId",
|
||||
)
|
||||
layer3_configuration.peer_asn = AAZIntType(
|
||||
option_b_layer3_configuration.peer_asn = AAZIntType(
|
||||
serialized_name="peerASN",
|
||||
flags={"required": True},
|
||||
)
|
||||
layer3_configuration.primary_ipv4_prefix = AAZStrType(
|
||||
option_b_layer3_configuration.primary_ipv4_prefix = AAZStrType(
|
||||
serialized_name="primaryIpv4Prefix",
|
||||
)
|
||||
layer3_configuration.primary_ipv6_prefix = AAZStrType(
|
||||
option_b_layer3_configuration.primary_ipv6_prefix = AAZStrType(
|
||||
serialized_name="primaryIpv6Prefix",
|
||||
)
|
||||
layer3_configuration.secondary_ipv4_prefix = AAZStrType(
|
||||
option_b_layer3_configuration.secondary_ipv4_prefix = AAZStrType(
|
||||
serialized_name="secondaryIpv4Prefix",
|
||||
)
|
||||
layer3_configuration.secondary_ipv6_prefix = AAZStrType(
|
||||
option_b_layer3_configuration.secondary_ipv6_prefix = AAZStrType(
|
||||
serialized_name="secondaryIpv6Prefix",
|
||||
)
|
||||
layer3_configuration.vlan_id = AAZIntType(
|
||||
option_b_layer3_configuration.vlan_id = AAZIntType(
|
||||
serialized_name="vlanId",
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
system_data = cls._schema_on_200.value.Element.system_data
|
||||
|
@ -276,5 +328,31 @@ class List(AAZCommand):
|
|||
class _ListHelper:
|
||||
"""Helper class for List"""
|
||||
|
||||
_schema_static_route_properties_read = None
|
||||
|
||||
@classmethod
|
||||
def _build_schema_static_route_properties_read(cls, _schema):
|
||||
if cls._schema_static_route_properties_read is not None:
|
||||
_schema.next_hop = cls._schema_static_route_properties_read.next_hop
|
||||
_schema.prefix = cls._schema_static_route_properties_read.prefix
|
||||
return
|
||||
|
||||
cls._schema_static_route_properties_read = _schema_static_route_properties_read = AAZObjectType()
|
||||
|
||||
static_route_properties_read = _schema_static_route_properties_read
|
||||
static_route_properties_read.next_hop = AAZListType(
|
||||
serialized_name="nextHop",
|
||||
flags={"required": True},
|
||||
)
|
||||
static_route_properties_read.prefix = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
next_hop = _schema_static_route_properties_read.next_hop
|
||||
next_hop.Element = AAZStrType()
|
||||
|
||||
_schema.next_hop = cls._schema_static_route_properties_read.next_hop
|
||||
_schema.prefix = cls._schema_static_route_properties_read.prefix
|
||||
|
||||
|
||||
__all__ = ["List"]
|
||||
|
|
|
@ -15,16 +15,16 @@ from azure.cli.core.aaz import *
|
|||
"networkfabric nni show",
|
||||
)
|
||||
class Show(AAZCommand):
|
||||
"""Show details of the provided Network To Network Interconnect resource.
|
||||
"""Show details of the provided Network To Network Interconnect resource
|
||||
|
||||
:example: Show the Network To Network Interconnect
|
||||
az networkfabric nni show --resource-group "example-rg" --fabric "example-fabric" --resource-name "example-nni"
|
||||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-02-01-preview",
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkfabrics/{}/networktonetworkinterconnects/{}", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkfabrics/{}/networktonetworkinterconnects/{}", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,7 @@ class Show(AAZCommand):
|
|||
)
|
||||
_args_schema.resource_name = AAZStrArg(
|
||||
options=["--resource-name"],
|
||||
help="Name of the NetworkToNetworkInterconnect Name",
|
||||
help="Name of the Network to Network Interconnect.",
|
||||
required=True,
|
||||
id_part="child_name_1",
|
||||
)
|
||||
|
@ -131,7 +131,7 @@ class Show(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
@ -171,7 +171,7 @@ class Show(AAZCommand):
|
|||
flags={"read_only": True},
|
||||
)
|
||||
_schema_on_200.properties = AAZObjectType(
|
||||
flags={"client_flatten": True},
|
||||
flags={"required": True, "client_flatten": True},
|
||||
)
|
||||
_schema_on_200.system_data = AAZObjectType(
|
||||
serialized_name="systemData",
|
||||
|
@ -186,19 +186,37 @@ class Show(AAZCommand):
|
|||
serialized_name="administrativeState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.configuration_state = AAZStrType(
|
||||
serialized_name="configurationState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.egress_acl_id = AAZStrType(
|
||||
serialized_name="egressAclId",
|
||||
)
|
||||
properties.export_route_policy = AAZObjectType(
|
||||
serialized_name="exportRoutePolicy",
|
||||
)
|
||||
properties.import_route_policy = AAZObjectType(
|
||||
serialized_name="importRoutePolicy",
|
||||
)
|
||||
properties.ingress_acl_id = AAZStrType(
|
||||
serialized_name="ingressAclId",
|
||||
)
|
||||
properties.is_management_type = AAZStrType(
|
||||
serialized_name="isManagementType",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.layer2_configuration = AAZObjectType(
|
||||
serialized_name="layer2Configuration",
|
||||
)
|
||||
properties.layer3_configuration = AAZObjectType(
|
||||
serialized_name="layer3Configuration",
|
||||
)
|
||||
properties.nni_type = AAZStrType(
|
||||
serialized_name="nniType",
|
||||
)
|
||||
properties.npb_static_route_configuration = AAZObjectType(
|
||||
serialized_name="npbStaticRouteConfiguration",
|
||||
)
|
||||
properties.option_b_layer3_configuration = AAZObjectType(
|
||||
serialized_name="optionBLayer3Configuration",
|
||||
)
|
||||
properties.provisioning_state = AAZStrType(
|
||||
serialized_name="provisioningState",
|
||||
flags={"read_only": True},
|
||||
|
@ -208,48 +226,82 @@ class Show(AAZCommand):
|
|||
flags={"required": True},
|
||||
)
|
||||
|
||||
export_route_policy = cls._schema_on_200.properties.export_route_policy
|
||||
export_route_policy.export_ipv4_route_policy_id = AAZStrType(
|
||||
serialized_name="exportIpv4RoutePolicyId",
|
||||
)
|
||||
export_route_policy.export_ipv6_route_policy_id = AAZStrType(
|
||||
serialized_name="exportIpv6RoutePolicyId",
|
||||
)
|
||||
|
||||
import_route_policy = cls._schema_on_200.properties.import_route_policy
|
||||
import_route_policy.import_ipv4_route_policy_id = AAZStrType(
|
||||
serialized_name="importIpv4RoutePolicyId",
|
||||
)
|
||||
import_route_policy.import_ipv6_route_policy_id = AAZStrType(
|
||||
serialized_name="importIpv6RoutePolicyId",
|
||||
)
|
||||
|
||||
layer2_configuration = cls._schema_on_200.properties.layer2_configuration
|
||||
layer2_configuration.interfaces = AAZListType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
layer2_configuration.mtu = AAZIntType(
|
||||
flags={"required": True},
|
||||
)
|
||||
layer2_configuration.port_count = AAZIntType(
|
||||
serialized_name="portCount",
|
||||
)
|
||||
layer2_configuration.interfaces = AAZListType()
|
||||
layer2_configuration.mtu = AAZIntType()
|
||||
|
||||
interfaces = cls._schema_on_200.properties.layer2_configuration.interfaces
|
||||
interfaces.Element = AAZStrType()
|
||||
|
||||
layer3_configuration = cls._schema_on_200.properties.layer3_configuration
|
||||
layer3_configuration.export_route_policy_id = AAZStrType(
|
||||
serialized_name="exportRoutePolicyId",
|
||||
npb_static_route_configuration = cls._schema_on_200.properties.npb_static_route_configuration
|
||||
npb_static_route_configuration.bfd_configuration = AAZObjectType(
|
||||
serialized_name="bfdConfiguration",
|
||||
)
|
||||
layer3_configuration.fabric_asn = AAZIntType(
|
||||
npb_static_route_configuration.ipv4_routes = AAZListType(
|
||||
serialized_name="ipv4Routes",
|
||||
)
|
||||
npb_static_route_configuration.ipv6_routes = AAZListType(
|
||||
serialized_name="ipv6Routes",
|
||||
)
|
||||
|
||||
bfd_configuration = cls._schema_on_200.properties.npb_static_route_configuration.bfd_configuration
|
||||
bfd_configuration.administrative_state = AAZStrType(
|
||||
serialized_name="administrativeState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
bfd_configuration.interval_in_milli_seconds = AAZIntType(
|
||||
serialized_name="intervalInMilliSeconds",
|
||||
)
|
||||
bfd_configuration.multiplier = AAZIntType()
|
||||
|
||||
ipv4_routes = cls._schema_on_200.properties.npb_static_route_configuration.ipv4_routes
|
||||
ipv4_routes.Element = AAZObjectType()
|
||||
_ShowHelper._build_schema_static_route_properties_read(ipv4_routes.Element)
|
||||
|
||||
ipv6_routes = cls._schema_on_200.properties.npb_static_route_configuration.ipv6_routes
|
||||
ipv6_routes.Element = AAZObjectType()
|
||||
_ShowHelper._build_schema_static_route_properties_read(ipv6_routes.Element)
|
||||
|
||||
option_b_layer3_configuration = cls._schema_on_200.properties.option_b_layer3_configuration
|
||||
option_b_layer3_configuration.fabric_asn = AAZIntType(
|
||||
serialized_name="fabricASN",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
layer3_configuration.import_route_policy_id = AAZStrType(
|
||||
serialized_name="importRoutePolicyId",
|
||||
)
|
||||
layer3_configuration.peer_asn = AAZIntType(
|
||||
option_b_layer3_configuration.peer_asn = AAZIntType(
|
||||
serialized_name="peerASN",
|
||||
flags={"required": True},
|
||||
)
|
||||
layer3_configuration.primary_ipv4_prefix = AAZStrType(
|
||||
option_b_layer3_configuration.primary_ipv4_prefix = AAZStrType(
|
||||
serialized_name="primaryIpv4Prefix",
|
||||
)
|
||||
layer3_configuration.primary_ipv6_prefix = AAZStrType(
|
||||
option_b_layer3_configuration.primary_ipv6_prefix = AAZStrType(
|
||||
serialized_name="primaryIpv6Prefix",
|
||||
)
|
||||
layer3_configuration.secondary_ipv4_prefix = AAZStrType(
|
||||
option_b_layer3_configuration.secondary_ipv4_prefix = AAZStrType(
|
||||
serialized_name="secondaryIpv4Prefix",
|
||||
)
|
||||
layer3_configuration.secondary_ipv6_prefix = AAZStrType(
|
||||
option_b_layer3_configuration.secondary_ipv6_prefix = AAZStrType(
|
||||
serialized_name="secondaryIpv6Prefix",
|
||||
)
|
||||
layer3_configuration.vlan_id = AAZIntType(
|
||||
option_b_layer3_configuration.vlan_id = AAZIntType(
|
||||
serialized_name="vlanId",
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
system_data = cls._schema_on_200.system_data
|
||||
|
@ -278,5 +330,31 @@ class Show(AAZCommand):
|
|||
class _ShowHelper:
|
||||
"""Helper class for Show"""
|
||||
|
||||
_schema_static_route_properties_read = None
|
||||
|
||||
@classmethod
|
||||
def _build_schema_static_route_properties_read(cls, _schema):
|
||||
if cls._schema_static_route_properties_read is not None:
|
||||
_schema.next_hop = cls._schema_static_route_properties_read.next_hop
|
||||
_schema.prefix = cls._schema_static_route_properties_read.prefix
|
||||
return
|
||||
|
||||
cls._schema_static_route_properties_read = _schema_static_route_properties_read = AAZObjectType()
|
||||
|
||||
static_route_properties_read = _schema_static_route_properties_read
|
||||
static_route_properties_read.next_hop = AAZListType(
|
||||
serialized_name="nextHop",
|
||||
flags={"required": True},
|
||||
)
|
||||
static_route_properties_read.prefix = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
next_hop = _schema_static_route_properties_read.next_hop
|
||||
next_hop.Element = AAZStrType()
|
||||
|
||||
_schema.next_hop = cls._schema_static_route_properties_read.next_hop
|
||||
_schema.prefix = cls._schema_static_route_properties_read.prefix
|
||||
|
||||
|
||||
__all__ = ["Show"]
|
||||
|
|
|
@ -0,0 +1,640 @@
|
|||
# --------------------------------------------------------------------------------------------
|
||||
# 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 nni update",
|
||||
)
|
||||
class Update(AAZCommand):
|
||||
"""Update the Network to Network interconnect resource
|
||||
|
||||
:example: Update the Network To Network Interconnect
|
||||
az networkfabric nni update --resource-group "example-rg" --fabric "example-fabric" --resource-name "example-nni" --import-route-policy "{importIpv4RoutePolicyId:'/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/microsoft.managednetworkfabric/routePolicies/example-routepolicy',importIpv6RoutePolicyId:'/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/microsoft.managednetworkfabric/routePolicies/example-routepolicy'}" --export-route-policy "{exportIpv4RoutePolicyId:'/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/microsoft.managednetworkfabric/routePolicies/example-routepolicy',exportIpv6RoutePolicyId:'/subscriptions/xxxxx-xxxx-xxxx-xxxx-xxxxx/resourceGroups/example-rg/providers/microsoft.managednetworkfabric/routePolicies/example-routepolicy'}" --layer2-configuration "{interfaces:['resourceId'],mtu:1500}" --option-b-layer3-configuration "{peerASN:28,vlanId:501,primaryIpv4Prefix:'172.31.0.0/31',secondaryIpv4Prefix:'172.31.0.20/31'}"
|
||||
|
||||
:example: Help text for sub parameters under the specific parent can be viewed by using the shorthand syntax '??'. See https://github.com/Azure/azure-cli/tree/dev/doc/shorthand_syntax.md for more about shorthand syntax.
|
||||
az networkfabric nni update --layer2-configuration ??
|
||||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkfabrics/{}/networktonetworkinterconnects/{}", "2023-06-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.fabric_name = AAZStrArg(
|
||||
options=["--fabric", "--fabric-name"],
|
||||
help="Name of the Network Fabric.",
|
||||
required=True,
|
||||
id_part="name",
|
||||
)
|
||||
_args_schema.resource_name = AAZStrArg(
|
||||
options=["--resource-name"],
|
||||
help="Name of the Network to Network Interconnect.",
|
||||
required=True,
|
||||
id_part="child_name_1",
|
||||
)
|
||||
_args_schema.resource_group = AAZResourceGroupNameArg(
|
||||
help="Name of the resource group",
|
||||
required=True,
|
||||
)
|
||||
|
||||
# define Arg Group "Properties"
|
||||
|
||||
_args_schema = cls._args_schema
|
||||
_args_schema.egress_acl_id = AAZResourceIdArg(
|
||||
options=["--egress-acl-id"],
|
||||
arg_group="Properties",
|
||||
help="Egress Acl ARM resource ID.",
|
||||
)
|
||||
_args_schema.export_route_policy = AAZObjectArg(
|
||||
options=["--export-route-policy"],
|
||||
arg_group="Properties",
|
||||
help="Export Route Policy information",
|
||||
)
|
||||
_args_schema.import_route_policy = AAZObjectArg(
|
||||
options=["--import-route-policy"],
|
||||
arg_group="Properties",
|
||||
help="Import Route Policy information.",
|
||||
)
|
||||
_args_schema.ingress_acl_id = AAZResourceIdArg(
|
||||
options=["--ingress-acl-id"],
|
||||
arg_group="Properties",
|
||||
help="Ingress Acl ARM resource ID.",
|
||||
)
|
||||
_args_schema.layer2_configuration = AAZObjectArg(
|
||||
options=["--layer2-configuration"],
|
||||
arg_group="Properties",
|
||||
help="Common properties for Layer2Configuration.",
|
||||
)
|
||||
_args_schema.npb_static_route_configuration = AAZObjectArg(
|
||||
options=["--npb-static-route-configuration"],
|
||||
arg_group="Properties",
|
||||
help="NPB Static Route Configuration properties.",
|
||||
)
|
||||
_args_schema.option_b_layer3_configuration = AAZObjectArg(
|
||||
options=["--option-b-layer3-configuration"],
|
||||
arg_group="Properties",
|
||||
help="Common properties for Layer3Configuration.",
|
||||
)
|
||||
|
||||
export_route_policy = cls._args_schema.export_route_policy
|
||||
export_route_policy.export_ipv4_route_policy_id = AAZResourceIdArg(
|
||||
options=["export-ipv4-route-policy-id"],
|
||||
help="Export IPv4 Route Policy Id.",
|
||||
)
|
||||
export_route_policy.export_ipv6_route_policy_id = AAZResourceIdArg(
|
||||
options=["export-ipv6-route-policy-id"],
|
||||
help="Export IPv6 Route Policy Id.",
|
||||
)
|
||||
|
||||
import_route_policy = cls._args_schema.import_route_policy
|
||||
import_route_policy.import_ipv4_route_policy_id = AAZResourceIdArg(
|
||||
options=["import-ipv4-route-policy-id"],
|
||||
help="Import IPv4 Route Policy Id.",
|
||||
)
|
||||
import_route_policy.import_ipv6_route_policy_id = AAZResourceIdArg(
|
||||
options=["import-ipv6-route-policy-id"],
|
||||
help="Import IPv6 Route Policy Id.",
|
||||
)
|
||||
|
||||
layer2_configuration = cls._args_schema.layer2_configuration
|
||||
layer2_configuration.interfaces = AAZListArg(
|
||||
options=["interfaces"],
|
||||
help="List of network device interfaces resource IDs.",
|
||||
)
|
||||
layer2_configuration.mtu = AAZIntArg(
|
||||
options=["mtu"],
|
||||
help="MTU of the packets between PE & CE. The value should be between 64 and 9200.",
|
||||
fmt=AAZIntArgFormat(
|
||||
maximum=9200,
|
||||
minimum=64,
|
||||
),
|
||||
)
|
||||
|
||||
interfaces = cls._args_schema.layer2_configuration.interfaces
|
||||
interfaces.Element = AAZResourceIdArg()
|
||||
|
||||
npb_static_route_configuration = cls._args_schema.npb_static_route_configuration
|
||||
npb_static_route_configuration.bfd_configuration = AAZObjectArg(
|
||||
options=["bfd-configuration"],
|
||||
help="BFD Configuration properties.",
|
||||
)
|
||||
npb_static_route_configuration.ipv4_routes = AAZListArg(
|
||||
options=["ipv4-routes"],
|
||||
help="List of IPv4 Routes.",
|
||||
)
|
||||
npb_static_route_configuration.ipv6_routes = AAZListArg(
|
||||
options=["ipv6-routes"],
|
||||
help="List of IPv6 Routes.",
|
||||
)
|
||||
|
||||
bfd_configuration = cls._args_schema.npb_static_route_configuration.bfd_configuration
|
||||
bfd_configuration.interval_in_milli_seconds = AAZIntArg(
|
||||
options=["interval-in-milli-seconds"],
|
||||
help="Interval in milliseconds. Default value is 300. Example: 300.",
|
||||
)
|
||||
bfd_configuration.multiplier = AAZIntArg(
|
||||
options=["multiplier"],
|
||||
help="Multiplier for the Bfd Configuration. Default value is 5. Example: 5.",
|
||||
)
|
||||
|
||||
ipv4_routes = cls._args_schema.npb_static_route_configuration.ipv4_routes
|
||||
ipv4_routes.Element = AAZObjectArg()
|
||||
cls._build_args_static_route_properties_update(ipv4_routes.Element)
|
||||
|
||||
ipv6_routes = cls._args_schema.npb_static_route_configuration.ipv6_routes
|
||||
ipv6_routes.Element = AAZObjectArg()
|
||||
cls._build_args_static_route_properties_update(ipv6_routes.Element)
|
||||
|
||||
option_b_layer3_configuration = cls._args_schema.option_b_layer3_configuration
|
||||
option_b_layer3_configuration.peer_asn = AAZIntArg(
|
||||
options=["peer-asn"],
|
||||
help="ASN of PE devices for CE/PE connectivity. The value should be between 1 to 4294967295. Example: 28.",
|
||||
fmt=AAZIntArgFormat(
|
||||
maximum=4294967295,
|
||||
minimum=1,
|
||||
),
|
||||
)
|
||||
option_b_layer3_configuration.primary_ipv4_prefix = AAZStrArg(
|
||||
options=["primary-ipv4-prefix"],
|
||||
help="IPv4 Address Prefix. Example: 172.31.0.0/31.",
|
||||
)
|
||||
option_b_layer3_configuration.primary_ipv6_prefix = AAZStrArg(
|
||||
options=["primary-ipv6-prefix"],
|
||||
help="IPv6 Address Prefix. Example: 3FFE:FFFF:0:CD30::a0/127.",
|
||||
)
|
||||
option_b_layer3_configuration.secondary_ipv4_prefix = AAZStrArg(
|
||||
options=["secondary-ipv4-prefix"],
|
||||
help="Secondary IPv4 Address Prefix. Example: 172.31.0.20/31.",
|
||||
)
|
||||
option_b_layer3_configuration.secondary_ipv6_prefix = AAZStrArg(
|
||||
options=["secondary-ipv6-prefix"],
|
||||
help="Secondary IPv6 Address Prefix. Example: 3FFE:FFFF:0:CD30::a4/127.",
|
||||
)
|
||||
option_b_layer3_configuration.vlan_id = AAZIntArg(
|
||||
options=["vlan-id"],
|
||||
help="VLAN for CE/PE Layer 3 connectivity. The value should be between 100 to 4094. Example: 501.",
|
||||
fmt=AAZIntArgFormat(
|
||||
maximum=4094,
|
||||
minimum=100,
|
||||
),
|
||||
)
|
||||
return cls._args_schema
|
||||
|
||||
_args_static_route_properties_update = None
|
||||
|
||||
@classmethod
|
||||
def _build_args_static_route_properties_update(cls, _schema):
|
||||
if cls._args_static_route_properties_update is not None:
|
||||
_schema.next_hop = cls._args_static_route_properties_update.next_hop
|
||||
_schema.prefix = cls._args_static_route_properties_update.prefix
|
||||
return
|
||||
|
||||
cls._args_static_route_properties_update = AAZObjectArg()
|
||||
|
||||
static_route_properties_update = cls._args_static_route_properties_update
|
||||
static_route_properties_update.next_hop = AAZListArg(
|
||||
options=["next-hop"],
|
||||
help="List of next hop addresses.",
|
||||
required=True,
|
||||
)
|
||||
static_route_properties_update.prefix = AAZStrArg(
|
||||
options=["prefix"],
|
||||
help="Prefix of the route.",
|
||||
required=True,
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
|
||||
next_hop = cls._args_static_route_properties_update.next_hop
|
||||
next_hop.Element = AAZStrArg(
|
||||
fmt=AAZStrArgFormat(
|
||||
min_length=1,
|
||||
),
|
||||
)
|
||||
|
||||
_schema.next_hop = cls._args_static_route_properties_update.next_hop
|
||||
_schema.prefix = cls._args_static_route_properties_update.prefix
|
||||
|
||||
def _execute_operations(self):
|
||||
self.pre_operations()
|
||||
yield self.NetworkToNetworkInterconnectsUpdate(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 NetworkToNetworkInterconnectsUpdate(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}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}",
|
||||
**self.url_parameters
|
||||
)
|
||||
|
||||
@property
|
||||
def method(self):
|
||||
return "PATCH"
|
||||
|
||||
@property
|
||||
def error_format(self):
|
||||
return "MgmtErrorFormat"
|
||||
|
||||
@property
|
||||
def url_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_url_param(
|
||||
"networkFabricName", self.ctx.args.fabric_name,
|
||||
required=True,
|
||||
),
|
||||
**self.serialize_url_param(
|
||||
"networkToNetworkInterconnectName", self.ctx.args.resource_name,
|
||||
required=True,
|
||||
),
|
||||
**self.serialize_url_param(
|
||||
"resourceGroupName", self.ctx.args.resource_group,
|
||||
required=True,
|
||||
),
|
||||
**self.serialize_url_param(
|
||||
"subscriptionId", self.ctx.subscription_id,
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
return parameters
|
||||
|
||||
@property
|
||||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
return parameters
|
||||
|
||||
@property
|
||||
def header_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_header_param(
|
||||
"Content-Type", "application/json",
|
||||
),
|
||||
**self.serialize_header_param(
|
||||
"Accept", "application/json",
|
||||
),
|
||||
}
|
||||
return parameters
|
||||
|
||||
@property
|
||||
def content(self):
|
||||
_content_value, _builder = self.new_content_builder(
|
||||
self.ctx.args,
|
||||
typ=AAZObjectType,
|
||||
typ_kwargs={"flags": {"required": True, "client_flatten": True}}
|
||||
)
|
||||
_builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
|
||||
|
||||
properties = _builder.get(".properties")
|
||||
if properties is not None:
|
||||
properties.set_prop("egressAclId", AAZStrType, ".egress_acl_id")
|
||||
properties.set_prop("exportRoutePolicy", AAZObjectType, ".export_route_policy")
|
||||
properties.set_prop("importRoutePolicy", AAZObjectType, ".import_route_policy")
|
||||
properties.set_prop("ingressAclId", AAZStrType, ".ingress_acl_id")
|
||||
properties.set_prop("layer2Configuration", AAZObjectType, ".layer2_configuration")
|
||||
properties.set_prop("npbStaticRouteConfiguration", AAZObjectType, ".npb_static_route_configuration")
|
||||
properties.set_prop("optionBLayer3Configuration", AAZObjectType, ".option_b_layer3_configuration")
|
||||
|
||||
export_route_policy = _builder.get(".properties.exportRoutePolicy")
|
||||
if export_route_policy is not None:
|
||||
export_route_policy.set_prop("exportIpv4RoutePolicyId", AAZStrType, ".export_ipv4_route_policy_id")
|
||||
export_route_policy.set_prop("exportIpv6RoutePolicyId", AAZStrType, ".export_ipv6_route_policy_id")
|
||||
|
||||
import_route_policy = _builder.get(".properties.importRoutePolicy")
|
||||
if import_route_policy is not None:
|
||||
import_route_policy.set_prop("importIpv4RoutePolicyId", AAZStrType, ".import_ipv4_route_policy_id")
|
||||
import_route_policy.set_prop("importIpv6RoutePolicyId", AAZStrType, ".import_ipv6_route_policy_id")
|
||||
|
||||
layer2_configuration = _builder.get(".properties.layer2Configuration")
|
||||
if layer2_configuration is not None:
|
||||
layer2_configuration.set_prop("interfaces", AAZListType, ".interfaces")
|
||||
layer2_configuration.set_prop("mtu", AAZIntType, ".mtu")
|
||||
|
||||
interfaces = _builder.get(".properties.layer2Configuration.interfaces")
|
||||
if interfaces is not None:
|
||||
interfaces.set_elements(AAZStrType, ".")
|
||||
|
||||
npb_static_route_configuration = _builder.get(".properties.npbStaticRouteConfiguration")
|
||||
if npb_static_route_configuration is not None:
|
||||
npb_static_route_configuration.set_prop("bfdConfiguration", AAZObjectType, ".bfd_configuration")
|
||||
npb_static_route_configuration.set_prop("ipv4Routes", AAZListType, ".ipv4_routes")
|
||||
npb_static_route_configuration.set_prop("ipv6Routes", AAZListType, ".ipv6_routes")
|
||||
|
||||
bfd_configuration = _builder.get(".properties.npbStaticRouteConfiguration.bfdConfiguration")
|
||||
if bfd_configuration is not None:
|
||||
bfd_configuration.set_prop("intervalInMilliSeconds", AAZIntType, ".interval_in_milli_seconds")
|
||||
bfd_configuration.set_prop("multiplier", AAZIntType, ".multiplier")
|
||||
|
||||
ipv4_routes = _builder.get(".properties.npbStaticRouteConfiguration.ipv4Routes")
|
||||
if ipv4_routes is not None:
|
||||
_UpdateHelper._build_schema_static_route_properties_update(ipv4_routes.set_elements(AAZObjectType, "."))
|
||||
|
||||
ipv6_routes = _builder.get(".properties.npbStaticRouteConfiguration.ipv6Routes")
|
||||
if ipv6_routes is not None:
|
||||
_UpdateHelper._build_schema_static_route_properties_update(ipv6_routes.set_elements(AAZObjectType, "."))
|
||||
|
||||
option_b_layer3_configuration = _builder.get(".properties.optionBLayer3Configuration")
|
||||
if option_b_layer3_configuration is not None:
|
||||
option_b_layer3_configuration.set_prop("peerASN", AAZIntType, ".peer_asn")
|
||||
option_b_layer3_configuration.set_prop("primaryIpv4Prefix", AAZStrType, ".primary_ipv4_prefix")
|
||||
option_b_layer3_configuration.set_prop("primaryIpv6Prefix", AAZStrType, ".primary_ipv6_prefix")
|
||||
option_b_layer3_configuration.set_prop("secondaryIpv4Prefix", AAZStrType, ".secondary_ipv4_prefix")
|
||||
option_b_layer3_configuration.set_prop("secondaryIpv6Prefix", AAZStrType, ".secondary_ipv6_prefix")
|
||||
option_b_layer3_configuration.set_prop("vlanId", AAZIntType, ".vlan_id")
|
||||
|
||||
return self.serialize_content(_content_value)
|
||||
|
||||
def on_200(self, session):
|
||||
data = self.deserialize_http_content(session)
|
||||
self.ctx.set_var(
|
||||
"instance",
|
||||
data,
|
||||
schema_builder=self._build_schema_on_200
|
||||
)
|
||||
|
||||
_schema_on_200 = None
|
||||
|
||||
@classmethod
|
||||
def _build_schema_on_200(cls):
|
||||
if cls._schema_on_200 is not None:
|
||||
return cls._schema_on_200
|
||||
|
||||
cls._schema_on_200 = AAZObjectType()
|
||||
|
||||
_schema_on_200 = cls._schema_on_200
|
||||
_schema_on_200.id = AAZStrType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_schema_on_200.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.administrative_state = AAZStrType(
|
||||
serialized_name="administrativeState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.configuration_state = AAZStrType(
|
||||
serialized_name="configurationState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.egress_acl_id = AAZStrType(
|
||||
serialized_name="egressAclId",
|
||||
)
|
||||
properties.export_route_policy = AAZObjectType(
|
||||
serialized_name="exportRoutePolicy",
|
||||
)
|
||||
properties.import_route_policy = AAZObjectType(
|
||||
serialized_name="importRoutePolicy",
|
||||
)
|
||||
properties.ingress_acl_id = AAZStrType(
|
||||
serialized_name="ingressAclId",
|
||||
)
|
||||
properties.is_management_type = AAZStrType(
|
||||
serialized_name="isManagementType",
|
||||
)
|
||||
properties.layer2_configuration = AAZObjectType(
|
||||
serialized_name="layer2Configuration",
|
||||
)
|
||||
properties.nni_type = AAZStrType(
|
||||
serialized_name="nniType",
|
||||
)
|
||||
properties.npb_static_route_configuration = AAZObjectType(
|
||||
serialized_name="npbStaticRouteConfiguration",
|
||||
)
|
||||
properties.option_b_layer3_configuration = AAZObjectType(
|
||||
serialized_name="optionBLayer3Configuration",
|
||||
)
|
||||
properties.provisioning_state = AAZStrType(
|
||||
serialized_name="provisioningState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.use_option_b = AAZStrType(
|
||||
serialized_name="useOptionB",
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
export_route_policy = cls._schema_on_200.properties.export_route_policy
|
||||
export_route_policy.export_ipv4_route_policy_id = AAZStrType(
|
||||
serialized_name="exportIpv4RoutePolicyId",
|
||||
)
|
||||
export_route_policy.export_ipv6_route_policy_id = AAZStrType(
|
||||
serialized_name="exportIpv6RoutePolicyId",
|
||||
)
|
||||
|
||||
import_route_policy = cls._schema_on_200.properties.import_route_policy
|
||||
import_route_policy.import_ipv4_route_policy_id = AAZStrType(
|
||||
serialized_name="importIpv4RoutePolicyId",
|
||||
)
|
||||
import_route_policy.import_ipv6_route_policy_id = AAZStrType(
|
||||
serialized_name="importIpv6RoutePolicyId",
|
||||
)
|
||||
|
||||
layer2_configuration = cls._schema_on_200.properties.layer2_configuration
|
||||
layer2_configuration.interfaces = AAZListType()
|
||||
layer2_configuration.mtu = AAZIntType()
|
||||
|
||||
interfaces = cls._schema_on_200.properties.layer2_configuration.interfaces
|
||||
interfaces.Element = AAZStrType()
|
||||
|
||||
npb_static_route_configuration = cls._schema_on_200.properties.npb_static_route_configuration
|
||||
npb_static_route_configuration.bfd_configuration = AAZObjectType(
|
||||
serialized_name="bfdConfiguration",
|
||||
)
|
||||
npb_static_route_configuration.ipv4_routes = AAZListType(
|
||||
serialized_name="ipv4Routes",
|
||||
)
|
||||
npb_static_route_configuration.ipv6_routes = AAZListType(
|
||||
serialized_name="ipv6Routes",
|
||||
)
|
||||
|
||||
bfd_configuration = cls._schema_on_200.properties.npb_static_route_configuration.bfd_configuration
|
||||
bfd_configuration.administrative_state = AAZStrType(
|
||||
serialized_name="administrativeState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
bfd_configuration.interval_in_milli_seconds = AAZIntType(
|
||||
serialized_name="intervalInMilliSeconds",
|
||||
)
|
||||
bfd_configuration.multiplier = AAZIntType()
|
||||
|
||||
ipv4_routes = cls._schema_on_200.properties.npb_static_route_configuration.ipv4_routes
|
||||
ipv4_routes.Element = AAZObjectType()
|
||||
_UpdateHelper._build_schema_static_route_properties_read(ipv4_routes.Element)
|
||||
|
||||
ipv6_routes = cls._schema_on_200.properties.npb_static_route_configuration.ipv6_routes
|
||||
ipv6_routes.Element = AAZObjectType()
|
||||
_UpdateHelper._build_schema_static_route_properties_read(ipv6_routes.Element)
|
||||
|
||||
option_b_layer3_configuration = cls._schema_on_200.properties.option_b_layer3_configuration
|
||||
option_b_layer3_configuration.fabric_asn = AAZIntType(
|
||||
serialized_name="fabricASN",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
option_b_layer3_configuration.peer_asn = AAZIntType(
|
||||
serialized_name="peerASN",
|
||||
flags={"required": True},
|
||||
)
|
||||
option_b_layer3_configuration.primary_ipv4_prefix = AAZStrType(
|
||||
serialized_name="primaryIpv4Prefix",
|
||||
)
|
||||
option_b_layer3_configuration.primary_ipv6_prefix = AAZStrType(
|
||||
serialized_name="primaryIpv6Prefix",
|
||||
)
|
||||
option_b_layer3_configuration.secondary_ipv4_prefix = AAZStrType(
|
||||
serialized_name="secondaryIpv4Prefix",
|
||||
)
|
||||
option_b_layer3_configuration.secondary_ipv6_prefix = AAZStrType(
|
||||
serialized_name="secondaryIpv6Prefix",
|
||||
)
|
||||
option_b_layer3_configuration.vlan_id = AAZIntType(
|
||||
serialized_name="vlanId",
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
system_data = cls._schema_on_200.system_data
|
||||
system_data.created_at = AAZStrType(
|
||||
serialized_name="createdAt",
|
||||
)
|
||||
system_data.created_by = AAZStrType(
|
||||
serialized_name="createdBy",
|
||||
)
|
||||
system_data.created_by_type = AAZStrType(
|
||||
serialized_name="createdByType",
|
||||
)
|
||||
system_data.last_modified_at = AAZStrType(
|
||||
serialized_name="lastModifiedAt",
|
||||
)
|
||||
system_data.last_modified_by = AAZStrType(
|
||||
serialized_name="lastModifiedBy",
|
||||
)
|
||||
system_data.last_modified_by_type = AAZStrType(
|
||||
serialized_name="lastModifiedByType",
|
||||
)
|
||||
|
||||
return cls._schema_on_200
|
||||
|
||||
|
||||
class _UpdateHelper:
|
||||
"""Helper class for Update"""
|
||||
|
||||
@classmethod
|
||||
def _build_schema_static_route_properties_update(cls, _builder):
|
||||
if _builder is None:
|
||||
return
|
||||
_builder.set_prop("nextHop", AAZListType, ".next_hop", typ_kwargs={"flags": {"required": True}})
|
||||
_builder.set_prop("prefix", AAZStrType, ".prefix", typ_kwargs={"flags": {"required": True}})
|
||||
|
||||
next_hop = _builder.get(".nextHop")
|
||||
if next_hop is not None:
|
||||
next_hop.set_elements(AAZStrType, ".")
|
||||
|
||||
_schema_static_route_properties_read = None
|
||||
|
||||
@classmethod
|
||||
def _build_schema_static_route_properties_read(cls, _schema):
|
||||
if cls._schema_static_route_properties_read is not None:
|
||||
_schema.next_hop = cls._schema_static_route_properties_read.next_hop
|
||||
_schema.prefix = cls._schema_static_route_properties_read.prefix
|
||||
return
|
||||
|
||||
cls._schema_static_route_properties_read = _schema_static_route_properties_read = AAZObjectType()
|
||||
|
||||
static_route_properties_read = _schema_static_route_properties_read
|
||||
static_route_properties_read.next_hop = AAZListType(
|
||||
serialized_name="nextHop",
|
||||
flags={"required": True},
|
||||
)
|
||||
static_route_properties_read.prefix = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
next_hop = _schema_static_route_properties_read.next_hop
|
||||
next_hop.Element = AAZStrType()
|
||||
|
||||
_schema.next_hop = cls._schema_static_route_properties_read.next_hop
|
||||
_schema.prefix = cls._schema_static_route_properties_read.prefix
|
||||
|
||||
|
||||
__all__ = ["Update"]
|
|
@ -20,7 +20,7 @@ class Wait(AAZWaitCommand):
|
|||
|
||||
_aaz_info = {
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkfabrics/{}/networktonetworkinterconnects/{}", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkfabrics/{}/networktonetworkinterconnects/{}", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -48,7 +48,7 @@ class Wait(AAZWaitCommand):
|
|||
)
|
||||
_args_schema.resource_name = AAZStrArg(
|
||||
options=["--resource-name"],
|
||||
help="Name of the NetworkToNetworkInterconnect Name",
|
||||
help="Name of the Network to Network Interconnect.",
|
||||
required=True,
|
||||
id_part="child_name_1",
|
||||
)
|
||||
|
@ -127,7 +127,7 @@ class Wait(AAZWaitCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
@ -167,7 +167,7 @@ class Wait(AAZWaitCommand):
|
|||
flags={"read_only": True},
|
||||
)
|
||||
_schema_on_200.properties = AAZObjectType(
|
||||
flags={"client_flatten": True},
|
||||
flags={"required": True, "client_flatten": True},
|
||||
)
|
||||
_schema_on_200.system_data = AAZObjectType(
|
||||
serialized_name="systemData",
|
||||
|
@ -182,19 +182,37 @@ class Wait(AAZWaitCommand):
|
|||
serialized_name="administrativeState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.configuration_state = AAZStrType(
|
||||
serialized_name="configurationState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.egress_acl_id = AAZStrType(
|
||||
serialized_name="egressAclId",
|
||||
)
|
||||
properties.export_route_policy = AAZObjectType(
|
||||
serialized_name="exportRoutePolicy",
|
||||
)
|
||||
properties.import_route_policy = AAZObjectType(
|
||||
serialized_name="importRoutePolicy",
|
||||
)
|
||||
properties.ingress_acl_id = AAZStrType(
|
||||
serialized_name="ingressAclId",
|
||||
)
|
||||
properties.is_management_type = AAZStrType(
|
||||
serialized_name="isManagementType",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.layer2_configuration = AAZObjectType(
|
||||
serialized_name="layer2Configuration",
|
||||
)
|
||||
properties.layer3_configuration = AAZObjectType(
|
||||
serialized_name="layer3Configuration",
|
||||
)
|
||||
properties.nni_type = AAZStrType(
|
||||
serialized_name="nniType",
|
||||
)
|
||||
properties.npb_static_route_configuration = AAZObjectType(
|
||||
serialized_name="npbStaticRouteConfiguration",
|
||||
)
|
||||
properties.option_b_layer3_configuration = AAZObjectType(
|
||||
serialized_name="optionBLayer3Configuration",
|
||||
)
|
||||
properties.provisioning_state = AAZStrType(
|
||||
serialized_name="provisioningState",
|
||||
flags={"read_only": True},
|
||||
|
@ -204,48 +222,82 @@ class Wait(AAZWaitCommand):
|
|||
flags={"required": True},
|
||||
)
|
||||
|
||||
export_route_policy = cls._schema_on_200.properties.export_route_policy
|
||||
export_route_policy.export_ipv4_route_policy_id = AAZStrType(
|
||||
serialized_name="exportIpv4RoutePolicyId",
|
||||
)
|
||||
export_route_policy.export_ipv6_route_policy_id = AAZStrType(
|
||||
serialized_name="exportIpv6RoutePolicyId",
|
||||
)
|
||||
|
||||
import_route_policy = cls._schema_on_200.properties.import_route_policy
|
||||
import_route_policy.import_ipv4_route_policy_id = AAZStrType(
|
||||
serialized_name="importIpv4RoutePolicyId",
|
||||
)
|
||||
import_route_policy.import_ipv6_route_policy_id = AAZStrType(
|
||||
serialized_name="importIpv6RoutePolicyId",
|
||||
)
|
||||
|
||||
layer2_configuration = cls._schema_on_200.properties.layer2_configuration
|
||||
layer2_configuration.interfaces = AAZListType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
layer2_configuration.mtu = AAZIntType(
|
||||
flags={"required": True},
|
||||
)
|
||||
layer2_configuration.port_count = AAZIntType(
|
||||
serialized_name="portCount",
|
||||
)
|
||||
layer2_configuration.interfaces = AAZListType()
|
||||
layer2_configuration.mtu = AAZIntType()
|
||||
|
||||
interfaces = cls._schema_on_200.properties.layer2_configuration.interfaces
|
||||
interfaces.Element = AAZStrType()
|
||||
|
||||
layer3_configuration = cls._schema_on_200.properties.layer3_configuration
|
||||
layer3_configuration.export_route_policy_id = AAZStrType(
|
||||
serialized_name="exportRoutePolicyId",
|
||||
npb_static_route_configuration = cls._schema_on_200.properties.npb_static_route_configuration
|
||||
npb_static_route_configuration.bfd_configuration = AAZObjectType(
|
||||
serialized_name="bfdConfiguration",
|
||||
)
|
||||
layer3_configuration.fabric_asn = AAZIntType(
|
||||
npb_static_route_configuration.ipv4_routes = AAZListType(
|
||||
serialized_name="ipv4Routes",
|
||||
)
|
||||
npb_static_route_configuration.ipv6_routes = AAZListType(
|
||||
serialized_name="ipv6Routes",
|
||||
)
|
||||
|
||||
bfd_configuration = cls._schema_on_200.properties.npb_static_route_configuration.bfd_configuration
|
||||
bfd_configuration.administrative_state = AAZStrType(
|
||||
serialized_name="administrativeState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
bfd_configuration.interval_in_milli_seconds = AAZIntType(
|
||||
serialized_name="intervalInMilliSeconds",
|
||||
)
|
||||
bfd_configuration.multiplier = AAZIntType()
|
||||
|
||||
ipv4_routes = cls._schema_on_200.properties.npb_static_route_configuration.ipv4_routes
|
||||
ipv4_routes.Element = AAZObjectType()
|
||||
_WaitHelper._build_schema_static_route_properties_read(ipv4_routes.Element)
|
||||
|
||||
ipv6_routes = cls._schema_on_200.properties.npb_static_route_configuration.ipv6_routes
|
||||
ipv6_routes.Element = AAZObjectType()
|
||||
_WaitHelper._build_schema_static_route_properties_read(ipv6_routes.Element)
|
||||
|
||||
option_b_layer3_configuration = cls._schema_on_200.properties.option_b_layer3_configuration
|
||||
option_b_layer3_configuration.fabric_asn = AAZIntType(
|
||||
serialized_name="fabricASN",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
layer3_configuration.import_route_policy_id = AAZStrType(
|
||||
serialized_name="importRoutePolicyId",
|
||||
)
|
||||
layer3_configuration.peer_asn = AAZIntType(
|
||||
option_b_layer3_configuration.peer_asn = AAZIntType(
|
||||
serialized_name="peerASN",
|
||||
flags={"required": True},
|
||||
)
|
||||
layer3_configuration.primary_ipv4_prefix = AAZStrType(
|
||||
option_b_layer3_configuration.primary_ipv4_prefix = AAZStrType(
|
||||
serialized_name="primaryIpv4Prefix",
|
||||
)
|
||||
layer3_configuration.primary_ipv6_prefix = AAZStrType(
|
||||
option_b_layer3_configuration.primary_ipv6_prefix = AAZStrType(
|
||||
serialized_name="primaryIpv6Prefix",
|
||||
)
|
||||
layer3_configuration.secondary_ipv4_prefix = AAZStrType(
|
||||
option_b_layer3_configuration.secondary_ipv4_prefix = AAZStrType(
|
||||
serialized_name="secondaryIpv4Prefix",
|
||||
)
|
||||
layer3_configuration.secondary_ipv6_prefix = AAZStrType(
|
||||
option_b_layer3_configuration.secondary_ipv6_prefix = AAZStrType(
|
||||
serialized_name="secondaryIpv6Prefix",
|
||||
)
|
||||
layer3_configuration.vlan_id = AAZIntType(
|
||||
option_b_layer3_configuration.vlan_id = AAZIntType(
|
||||
serialized_name="vlanId",
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
system_data = cls._schema_on_200.system_data
|
||||
|
@ -274,5 +326,31 @@ class Wait(AAZWaitCommand):
|
|||
class _WaitHelper:
|
||||
"""Helper class for Wait"""
|
||||
|
||||
_schema_static_route_properties_read = None
|
||||
|
||||
@classmethod
|
||||
def _build_schema_static_route_properties_read(cls, _schema):
|
||||
if cls._schema_static_route_properties_read is not None:
|
||||
_schema.next_hop = cls._schema_static_route_properties_read.next_hop
|
||||
_schema.prefix = cls._schema_static_route_properties_read.prefix
|
||||
return
|
||||
|
||||
cls._schema_static_route_properties_read = _schema_static_route_properties_read = AAZObjectType()
|
||||
|
||||
static_route_properties_read = _schema_static_route_properties_read
|
||||
static_route_properties_read.next_hop = AAZListType(
|
||||
serialized_name="nextHop",
|
||||
flags={"required": True},
|
||||
)
|
||||
static_route_properties_read.prefix = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
|
||||
next_hop = _schema_static_route_properties_read.next_hop
|
||||
next_hop.Element = AAZStrType()
|
||||
|
||||
_schema.next_hop = cls._schema_static_route_properties_read.next_hop
|
||||
_schema.prefix = cls._schema_static_route_properties_read.prefix
|
||||
|
||||
|
||||
__all__ = ["Wait"]
|
||||
|
|
|
@ -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 npb",
|
||||
)
|
||||
class __CMDGroup(AAZCommandGroup):
|
||||
"""Manage Network Packet Broker Resource
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
__all__ = ["__CMDGroup"]
|
|
@ -0,0 +1,13 @@
|
|||
# --------------------------------------------------------------------------------------------
|
||||
# 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 *
|
|
@ -0,0 +1,419 @@
|
|||
# --------------------------------------------------------------------------------------------
|
||||
# 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 npb list",
|
||||
)
|
||||
class List(AAZCommand):
|
||||
"""List all Network Packet Brokers in the provided resource group or subscription
|
||||
|
||||
:example: List the Network Packet Broker for Resource group
|
||||
az networkfabric npb list --resource-group "example-rg"
|
||||
|
||||
:example: List the Network Packet Broker for Subscription
|
||||
az networkfabric npb list --subscription "<subscriptionId>"
|
||||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/providers/microsoft.managednetworkfabric/networkpacketbrokers", "2023-06-15"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkpacketbrokers", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
def _handler(self, command_args):
|
||||
super()._handler(command_args)
|
||||
return self.build_paging(self._execute_operations, self._output)
|
||||
|
||||
_args_schema = None
|
||||
|
||||
@classmethod
|
||||
def _build_arguments_schema(cls, *args, **kwargs):
|
||||
if cls._args_schema is not None:
|
||||
return cls._args_schema
|
||||
cls._args_schema = super()._build_arguments_schema(*args, **kwargs)
|
||||
|
||||
# define Arg Group ""
|
||||
|
||||
_args_schema = cls._args_schema
|
||||
_args_schema.resource_group = AAZResourceGroupNameArg(
|
||||
help="Name of the resource group",
|
||||
)
|
||||
return cls._args_schema
|
||||
|
||||
def _execute_operations(self):
|
||||
self.pre_operations()
|
||||
condition_0 = has_value(self.ctx.args.resource_group) and has_value(self.ctx.subscription_id)
|
||||
condition_1 = has_value(self.ctx.subscription_id) and has_value(self.ctx.args.resource_group) is not True
|
||||
if condition_0:
|
||||
self.NetworkPacketBrokersListByResourceGroup(ctx=self.ctx)()
|
||||
if condition_1:
|
||||
self.NetworkPacketBrokersListBySubscription(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 NetworkPacketBrokersListByResourceGroup(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/networkPacketBrokers",
|
||||
**self.url_parameters
|
||||
)
|
||||
|
||||
@property
|
||||
def method(self):
|
||||
return "GET"
|
||||
|
||||
@property
|
||||
def error_format(self):
|
||||
return "MgmtErrorFormat"
|
||||
|
||||
@property
|
||||
def url_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_url_param(
|
||||
"resourceGroupName", self.ctx.args.resource_group,
|
||||
required=True,
|
||||
),
|
||||
**self.serialize_url_param(
|
||||
"subscriptionId", self.ctx.subscription_id,
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
return parameters
|
||||
|
||||
@property
|
||||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-06-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()
|
||||
|
||||
value = cls._schema_on_200.value
|
||||
value.Element = AAZObjectType()
|
||||
|
||||
_element = cls._schema_on_200.value.Element
|
||||
_element.id = AAZStrType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_element.location = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
_element.name = AAZStrType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_element.properties = AAZObjectType(
|
||||
flags={"required": True, "client_flatten": True},
|
||||
)
|
||||
_element.system_data = AAZObjectType(
|
||||
serialized_name="systemData",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_element.tags = AAZDictType()
|
||||
_element.type = AAZStrType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
|
||||
properties = cls._schema_on_200.value.Element.properties
|
||||
properties.neighbor_group_ids = AAZListType(
|
||||
serialized_name="neighborGroupIds",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.network_device_ids = AAZListType(
|
||||
serialized_name="networkDeviceIds",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.network_fabric_id = AAZStrType(
|
||||
serialized_name="networkFabricId",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.network_tap_ids = AAZListType(
|
||||
serialized_name="networkTapIds",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.provisioning_state = AAZStrType(
|
||||
serialized_name="provisioningState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.source_interface_ids = AAZListType(
|
||||
serialized_name="sourceInterfaceIds",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
|
||||
neighbor_group_ids = cls._schema_on_200.value.Element.properties.neighbor_group_ids
|
||||
neighbor_group_ids.Element = AAZStrType()
|
||||
|
||||
network_device_ids = cls._schema_on_200.value.Element.properties.network_device_ids
|
||||
network_device_ids.Element = AAZStrType()
|
||||
|
||||
network_tap_ids = cls._schema_on_200.value.Element.properties.network_tap_ids
|
||||
network_tap_ids.Element = AAZStrType()
|
||||
|
||||
source_interface_ids = cls._schema_on_200.value.Element.properties.source_interface_ids
|
||||
source_interface_ids.Element = AAZStrType()
|
||||
|
||||
system_data = cls._schema_on_200.value.Element.system_data
|
||||
system_data.created_at = AAZStrType(
|
||||
serialized_name="createdAt",
|
||||
)
|
||||
system_data.created_by = AAZStrType(
|
||||
serialized_name="createdBy",
|
||||
)
|
||||
system_data.created_by_type = AAZStrType(
|
||||
serialized_name="createdByType",
|
||||
)
|
||||
system_data.last_modified_at = AAZStrType(
|
||||
serialized_name="lastModifiedAt",
|
||||
)
|
||||
system_data.last_modified_by = AAZStrType(
|
||||
serialized_name="lastModifiedBy",
|
||||
)
|
||||
system_data.last_modified_by_type = AAZStrType(
|
||||
serialized_name="lastModifiedByType",
|
||||
)
|
||||
|
||||
tags = cls._schema_on_200.value.Element.tags
|
||||
tags.Element = AAZStrType()
|
||||
|
||||
return cls._schema_on_200
|
||||
|
||||
class NetworkPacketBrokersListBySubscription(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/networkPacketBrokers",
|
||||
**self.url_parameters
|
||||
)
|
||||
|
||||
@property
|
||||
def method(self):
|
||||
return "GET"
|
||||
|
||||
@property
|
||||
def error_format(self):
|
||||
return "MgmtErrorFormat"
|
||||
|
||||
@property
|
||||
def url_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_url_param(
|
||||
"subscriptionId", self.ctx.subscription_id,
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
return parameters
|
||||
|
||||
@property
|
||||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-06-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()
|
||||
|
||||
value = cls._schema_on_200.value
|
||||
value.Element = AAZObjectType()
|
||||
|
||||
_element = cls._schema_on_200.value.Element
|
||||
_element.id = AAZStrType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_element.location = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
_element.name = AAZStrType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_element.properties = AAZObjectType(
|
||||
flags={"required": True, "client_flatten": True},
|
||||
)
|
||||
_element.system_data = AAZObjectType(
|
||||
serialized_name="systemData",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_element.tags = AAZDictType()
|
||||
_element.type = AAZStrType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
|
||||
properties = cls._schema_on_200.value.Element.properties
|
||||
properties.neighbor_group_ids = AAZListType(
|
||||
serialized_name="neighborGroupIds",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.network_device_ids = AAZListType(
|
||||
serialized_name="networkDeviceIds",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.network_fabric_id = AAZStrType(
|
||||
serialized_name="networkFabricId",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.network_tap_ids = AAZListType(
|
||||
serialized_name="networkTapIds",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.provisioning_state = AAZStrType(
|
||||
serialized_name="provisioningState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.source_interface_ids = AAZListType(
|
||||
serialized_name="sourceInterfaceIds",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
|
||||
neighbor_group_ids = cls._schema_on_200.value.Element.properties.neighbor_group_ids
|
||||
neighbor_group_ids.Element = AAZStrType()
|
||||
|
||||
network_device_ids = cls._schema_on_200.value.Element.properties.network_device_ids
|
||||
network_device_ids.Element = AAZStrType()
|
||||
|
||||
network_tap_ids = cls._schema_on_200.value.Element.properties.network_tap_ids
|
||||
network_tap_ids.Element = AAZStrType()
|
||||
|
||||
source_interface_ids = cls._schema_on_200.value.Element.properties.source_interface_ids
|
||||
source_interface_ids.Element = AAZStrType()
|
||||
|
||||
system_data = cls._schema_on_200.value.Element.system_data
|
||||
system_data.created_at = AAZStrType(
|
||||
serialized_name="createdAt",
|
||||
)
|
||||
system_data.created_by = AAZStrType(
|
||||
serialized_name="createdBy",
|
||||
)
|
||||
system_data.created_by_type = AAZStrType(
|
||||
serialized_name="createdByType",
|
||||
)
|
||||
system_data.last_modified_at = AAZStrType(
|
||||
serialized_name="lastModifiedAt",
|
||||
)
|
||||
system_data.last_modified_by = AAZStrType(
|
||||
serialized_name="lastModifiedBy",
|
||||
)
|
||||
system_data.last_modified_by_type = AAZStrType(
|
||||
serialized_name="lastModifiedByType",
|
||||
)
|
||||
|
||||
tags = cls._schema_on_200.value.Element.tags
|
||||
tags.Element = AAZStrType()
|
||||
|
||||
return cls._schema_on_200
|
||||
|
||||
|
||||
class _ListHelper:
|
||||
"""Helper class for List"""
|
||||
|
||||
|
||||
__all__ = ["List"]
|
|
@ -0,0 +1,246 @@
|
|||
# --------------------------------------------------------------------------------------------
|
||||
# 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 npb show",
|
||||
)
|
||||
class Show(AAZCommand):
|
||||
"""Show details of the provided Network Packet Broker resource
|
||||
|
||||
:example: Show the Network Packet Broker
|
||||
az networkfabric npb show --resource-group "example-rg" --resource-name "example-npb"
|
||||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkpacketbrokers/{}", "2023-06-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 Packet Broker.",
|
||||
required=True,
|
||||
id_part="name",
|
||||
)
|
||||
_args_schema.resource_group = AAZResourceGroupNameArg(
|
||||
help="Name of the resource group",
|
||||
required=True,
|
||||
)
|
||||
return cls._args_schema
|
||||
|
||||
def _execute_operations(self):
|
||||
self.pre_operations()
|
||||
self.NetworkPacketBrokersGet(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 NetworkPacketBrokersGet(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/networkPacketBrokers/{networkPacketBrokerName}",
|
||||
**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(
|
||||
"networkPacketBrokerName", self.ctx.args.resource_name,
|
||||
required=True,
|
||||
),
|
||||
**self.serialize_url_param(
|
||||
"resourceGroupName", self.ctx.args.resource_group,
|
||||
required=True,
|
||||
),
|
||||
**self.serialize_url_param(
|
||||
"subscriptionId", self.ctx.subscription_id,
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
return parameters
|
||||
|
||||
@property
|
||||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-06-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.location = AAZStrType(
|
||||
flags={"required": True},
|
||||
)
|
||||
_schema_on_200.name = AAZStrType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_schema_on_200.properties = AAZObjectType(
|
||||
flags={"required": True, "client_flatten": True},
|
||||
)
|
||||
_schema_on_200.system_data = AAZObjectType(
|
||||
serialized_name="systemData",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
_schema_on_200.tags = AAZDictType()
|
||||
_schema_on_200.type = AAZStrType(
|
||||
flags={"read_only": True},
|
||||
)
|
||||
|
||||
properties = cls._schema_on_200.properties
|
||||
properties.neighbor_group_ids = AAZListType(
|
||||
serialized_name="neighborGroupIds",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.network_device_ids = AAZListType(
|
||||
serialized_name="networkDeviceIds",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.network_fabric_id = AAZStrType(
|
||||
serialized_name="networkFabricId",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.network_tap_ids = AAZListType(
|
||||
serialized_name="networkTapIds",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.provisioning_state = AAZStrType(
|
||||
serialized_name="provisioningState",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
properties.source_interface_ids = AAZListType(
|
||||
serialized_name="sourceInterfaceIds",
|
||||
flags={"read_only": True},
|
||||
)
|
||||
|
||||
neighbor_group_ids = cls._schema_on_200.properties.neighbor_group_ids
|
||||
neighbor_group_ids.Element = AAZStrType()
|
||||
|
||||
network_device_ids = cls._schema_on_200.properties.network_device_ids
|
||||
network_device_ids.Element = AAZStrType()
|
||||
|
||||
network_tap_ids = cls._schema_on_200.properties.network_tap_ids
|
||||
network_tap_ids.Element = AAZStrType()
|
||||
|
||||
source_interface_ids = cls._schema_on_200.properties.source_interface_ids
|
||||
source_interface_ids.Element = AAZStrType()
|
||||
|
||||
system_data = cls._schema_on_200.system_data
|
||||
system_data.created_at = AAZStrType(
|
||||
serialized_name="createdAt",
|
||||
)
|
||||
system_data.created_by = AAZStrType(
|
||||
serialized_name="createdBy",
|
||||
)
|
||||
system_data.created_by_type = AAZStrType(
|
||||
serialized_name="createdByType",
|
||||
)
|
||||
system_data.last_modified_at = AAZStrType(
|
||||
serialized_name="lastModifiedAt",
|
||||
)
|
||||
system_data.last_modified_by = AAZStrType(
|
||||
serialized_name="lastModifiedBy",
|
||||
)
|
||||
system_data.last_modified_by_type = AAZStrType(
|
||||
serialized_name="lastModifiedByType",
|
||||
)
|
||||
|
||||
tags = cls._schema_on_200.tags
|
||||
tags.Element = AAZStrType()
|
||||
|
||||
return cls._schema_on_200
|
||||
|
||||
|
||||
class _ShowHelper:
|
||||
"""Helper class for Show"""
|
||||
|
||||
|
||||
__all__ = ["Show"]
|
|
@ -15,17 +15,20 @@ from azure.cli.core.aaz import *
|
|||
"networkfabric rack list",
|
||||
)
|
||||
class List(AAZCommand):
|
||||
"""List all Network Racks in the provided resource group or subscription.
|
||||
"""List all Network Racks in the provided resource group or subscription
|
||||
|
||||
:example: List the Network Racks for Resource Group.
|
||||
az networkfabric rack list --resource-group "example-rg"
|
||||
|
||||
:example: List the Network Racks for Subscription
|
||||
az networkfabric rack list --subscription "<subscriptionId>"
|
||||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-02-01-preview",
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/providers/microsoft.managednetworkfabric/networkracks", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkracks", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/providers/microsoft.managednetworkfabric/networkracks", "2023-06-15"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkracks", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -116,7 +119,7 @@ class List(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
@ -189,9 +192,8 @@ class List(AAZCommand):
|
|||
serialized_name="networkFabricId",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.network_rack_sku = AAZStrType(
|
||||
serialized_name="networkRackSku",
|
||||
flags={"required": True},
|
||||
properties.network_rack_type = AAZStrType(
|
||||
serialized_name="networkRackType",
|
||||
)
|
||||
properties.provisioning_state = AAZStrType(
|
||||
serialized_name="provisioningState",
|
||||
|
@ -266,7 +268,7 @@ class List(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
@ -339,9 +341,8 @@ class List(AAZCommand):
|
|||
serialized_name="networkFabricId",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.network_rack_sku = AAZStrType(
|
||||
serialized_name="networkRackSku",
|
||||
flags={"required": True},
|
||||
properties.network_rack_type = AAZStrType(
|
||||
serialized_name="networkRackType",
|
||||
)
|
||||
properties.provisioning_state = AAZStrType(
|
||||
serialized_name="provisioningState",
|
||||
|
|
|
@ -15,16 +15,16 @@ from azure.cli.core.aaz import *
|
|||
"networkfabric rack show",
|
||||
)
|
||||
class Show(AAZCommand):
|
||||
"""Show details of the provided Network Rack resource.
|
||||
"""Show details of the provided Network Rack resource
|
||||
|
||||
:example: Show the Network Rack
|
||||
az networkfabric rack show --resource-group "example-rg" --resource-name "example-rack"
|
||||
"""
|
||||
|
||||
_aaz_info = {
|
||||
"version": "2023-02-01-preview",
|
||||
"version": "2023-06-15",
|
||||
"resources": [
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkracks/{}", "2023-02-01-preview"],
|
||||
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.managednetworkfabric/networkracks/{}", "2023-06-15"],
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -46,7 +46,7 @@ class Show(AAZCommand):
|
|||
_args_schema = cls._args_schema
|
||||
_args_schema.resource_name = AAZStrArg(
|
||||
options=["--resource-name"],
|
||||
help="Name of the Network Rack",
|
||||
help="Name of the Network Rack.",
|
||||
required=True,
|
||||
id_part="name",
|
||||
)
|
||||
|
@ -121,7 +121,7 @@ class Show(AAZCommand):
|
|||
def query_parameters(self):
|
||||
parameters = {
|
||||
**self.serialize_query_param(
|
||||
"api-version", "2023-02-01-preview",
|
||||
"api-version", "2023-06-15",
|
||||
required=True,
|
||||
),
|
||||
}
|
||||
|
@ -185,9 +185,8 @@ class Show(AAZCommand):
|
|||
serialized_name="networkFabricId",
|
||||
flags={"required": True},
|
||||
)
|
||||
properties.network_rack_sku = AAZStrType(
|
||||
serialized_name="networkRackSku",
|
||||
flags={"required": True},
|
||||
properties.network_rack_type = AAZStrType(
|
||||
serialized_name="networkRackType",
|
||||
)
|
||||
properties.provisioning_state = AAZStrType(
|
||||
serialized_name="provisioningState",
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче