@@ -39,17 +39,23 @@ def load_arguments(self, _):
3939
4040 (Access , ApplicationGatewayFirewallMode , ApplicationGatewayProtocol , ApplicationGatewayRedirectType ,
4141 ApplicationGatewayRequestRoutingRuleType , ApplicationGatewaySkuName , AuthenticationMethod , Direction ,
42- ExpressRouteCircuitPeeringType , ExpressRouteCircuitSkuFamily , ExpressRouteCircuitSkuTier , IPAllocationMethod ,
42+ ExpressRouteCircuitSkuFamily , ExpressRouteCircuitSkuTier , IPAllocationMethod ,
4343 IPVersion , LoadBalancerSkuName , LoadDistribution , ProbeProtocol , ProcessorArchitecture , Protocol , PublicIPAddressSkuName ,
4444 RouteNextHopType , SecurityRuleAccess , SecurityRuleProtocol , SecurityRuleDirection , TransportProtocol ,
4545 VirtualNetworkGatewaySkuName , VirtualNetworkGatewayType , VpnClientProtocol , VpnType , ZoneType ) = self .get_models (
4646 'Access' , 'ApplicationGatewayFirewallMode' , 'ApplicationGatewayProtocol' , 'ApplicationGatewayRedirectType' ,
4747 'ApplicationGatewayRequestRoutingRuleType' , 'ApplicationGatewaySkuName' , 'AuthenticationMethod' , 'Direction' ,
48- 'ExpressRouteCircuitPeeringType' , ' ExpressRouteCircuitSkuFamily' , 'ExpressRouteCircuitSkuTier' , 'IPAllocationMethod' ,
48+ 'ExpressRouteCircuitSkuFamily' , 'ExpressRouteCircuitSkuTier' , 'IPAllocationMethod' ,
4949 'IPVersion' , 'LoadBalancerSkuName' , 'LoadDistribution' , 'ProbeProtocol' , 'ProcessorArchitecture' , 'Protocol' , 'PublicIPAddressSkuName' ,
5050 'RouteNextHopType' , 'SecurityRuleAccess' , 'SecurityRuleProtocol' , 'SecurityRuleDirection' , 'TransportProtocol' ,
5151 'VirtualNetworkGatewaySkuName' , 'VirtualNetworkGatewayType' , 'VpnClientProtocol' , 'VpnType' , 'ZoneType' )
5252
53+ if self .supported_api_version (min_api = '2018-02-01' ):
54+ ExpressRoutePeeringType = self .get_models ('ExpressRoutePeeringType' )
55+ else :
56+ # for Stack compatibility
57+ ExpressRoutePeeringType = self .get_models ('ExpressRouteCircuitPeeringType' )
58+
5359 default_existing = 'If only one exists, omit to use as default.'
5460
5561 # taken from Xplat. No enums in SDK
@@ -436,7 +442,7 @@ def load_arguments(self, _):
436442 c .argument ('vlan_id' , help = 'Identifier used to identify the customer.' )
437443 c .argument ('circuit_name' , circuit_name_type )
438444 c .argument ('peering_name' , name_arg_type , id_part = 'child_name_1' )
439- c .argument ('peering_type' , validator = validate_peering_type , arg_type = get_enum_type (ExpressRouteCircuitPeeringType ), help = 'BGP peering type for the circuit.' )
445+ c .argument ('peering_type' , validator = validate_peering_type , arg_type = get_enum_type (ExpressRoutePeeringType ), help = 'BGP peering type for the circuit.' )
440446 c .argument ('sku_family' , arg_type = get_enum_type (ExpressRouteCircuitSkuFamily ))
441447 c .argument ('sku_tier' , arg_type = get_enum_type (ExpressRouteCircuitSkuTier ))
442448 c .argument ('primary_peer_address_prefix' , options_list = ['--primary-peer-subnet' ], help = '/30 subnet used to configure IP addresses for primary interface.' )
0 commit comments