diff --git a/src/ResourceManager/Network/Commands.Network.Test/ScenarioTests/ExpressRouteCircuitTests.ps1 b/src/ResourceManager/Network/Commands.Network.Test/ScenarioTests/ExpressRouteCircuitTests.ps1 index 0314c6c9a9b8..74155b819eee 100644 --- a/src/ResourceManager/Network/Commands.Network.Test/ScenarioTests/ExpressRouteCircuitTests.ps1 +++ b/src/ResourceManager/Network/Commands.Network.Test/ScenarioTests/ExpressRouteCircuitTests.ps1 @@ -154,7 +154,7 @@ function Test-ExpressRouteCircuitCRUD $resourceGroup = New-AzureRmResourceGroup -Name $rgname -Location $rglocation # Create the ExpressRouteCircuit - $circuit = New-AzureRmExpressRouteCircuit -Name $circuitName -Location $location -ResourceGroupName $rgname -SkuTier Standard -SkuFamily MeteredData -ServiceProviderName "equinix" -PeeringLocation "Silicon Valley" -BandwidthInMbps 500; + $circuit = New-AzureRmExpressRouteCircuit -Name $circuitName -Location $location -ResourceGroupName $rgname -SkuTier Standard -SkuFamily MeteredData -ServiceProviderName "equinix" -PeeringLocation "Silicon Valley" -BandwidthInMbps 500 -AllowGlobalReach; # get Circuit $getCircuit = Get-AzureRmExpressRouteCircuit -Name $circuitName -ResourceGroupName $rgname @@ -171,6 +171,7 @@ function Test-ExpressRouteCircuitCRUD Assert-AreEqual "equinix" $getCircuit.ServiceProviderProperties.ServiceProviderName Assert-AreEqual "Silicon Valley" $getCircuit.ServiceProviderProperties.PeeringLocation Assert-AreEqual "500" $getCircuit.ServiceProviderProperties.BandwidthInMbps + Assert-AreEqual $True $getCircuit.AllowGlobalReach # list $list = Get-AzureRmExpressRouteCircuit -ResourceGroupName $rgname diff --git a/src/ResourceManager/Network/Commands.Network/ChangeLog.md b/src/ResourceManager/Network/Commands.Network/ChangeLog.md index 092f250720b9..75307d1969a3 100644 --- a/src/ResourceManager/Network/Commands.Network/ChangeLog.md +++ b/src/ResourceManager/Network/Commands.Network/ChangeLog.md @@ -21,6 +21,7 @@ ## Current Release * Added example for Set-AzureRmLocalNetworkGateway * Added examples and descriptions for Add-AzureRmVirtualNetworkGatewayIpConfig, Get-AzureRmVirtualNetworkGatewayConnectionSharedKey and New-AzureRmVirtualNetworkGatewayConnection +* Added AllowGlobalReach flag in New-AzureExpressRouteCircuit to enable/disable Global reach feature * Added PublicIpPrefix Functionality. New cmdlets added - New-AzureRmPublicIpPrefix - Get-AzureRmPublicIpPrefix @@ -28,6 +29,7 @@ - Set-AzureRmPublicIpPrefix * Added service endpoint policies cmdlets + ## Version 6.4.1 * Updated all help files to include full parameter types and correct input/output types. * Added examples for LoadBalancerInboundNatPoolConfig cmdlets. diff --git a/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/NewAzureExpressRouteCircuitCommand.cs b/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/NewAzureExpressRouteCircuitCommand.cs index 1921be352bda..6d53ca5d226e 100644 --- a/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/NewAzureExpressRouteCircuitCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/NewAzureExpressRouteCircuitCommand.cs @@ -103,6 +103,11 @@ public class NewAzureExpressRouteCircuitCommand : ExpressRouteCircuitBaseCmdlet [ValidateNotNullOrEmpty] public bool? AllowClassicOperations { get; set; } + [Parameter( + Mandatory = false, + ValueFromPipelineByPropertyName = true)] + [ValidateNotNullOrEmpty] + public SwitchParameter AllowGlobalReach { get; set; } [Parameter( Mandatory = false, @@ -165,6 +170,7 @@ private PSExpressRouteCircuit CreateExpressRouteCircuit() circuit.Peerings = this.Peering; circuit.Authorizations = this.Authorization; circuit.AllowClassicOperations = this.AllowClassicOperations; + circuit.AllowGlobalReach = this.AllowGlobalReach.IsPresent; // Map to the sdk object var circuitModel = NetworkResourceManagerProfile.Mapper.Map(circuit); diff --git a/src/ResourceManager/Network/Commands.Network/Microsoft.Azure.Commands.Network.format.ps1xml b/src/ResourceManager/Network/Commands.Network/Microsoft.Azure.Commands.Network.format.ps1xml index 6ab17c2a6388..491b3b94de20 100644 --- a/src/ResourceManager/Network/Commands.Network/Microsoft.Azure.Commands.Network.format.ps1xml +++ b/src/ResourceManager/Network/Commands.Network/Microsoft.Azure.Commands.Network.format.ps1xml @@ -2416,6 +2416,10 @@ GatewayManagerEtag + + + AllowGlobalReach + diff --git a/src/ResourceManager/Network/Commands.Network/Models/PSExpressRouteCircuit.cs b/src/ResourceManager/Network/Commands.Network/Models/PSExpressRouteCircuit.cs index 19b9d52f073f..3d0f6a298a1b 100644 --- a/src/ResourceManager/Network/Commands.Network/Models/PSExpressRouteCircuit.cs +++ b/src/ResourceManager/Network/Commands.Network/Models/PSExpressRouteCircuit.cs @@ -41,6 +41,8 @@ public class PSExpressRouteCircuit : PSTopLevelResource public string GatewayManagerEtag { get; set; } + public bool AllowGlobalReach { get; set; } + [JsonIgnore] public string SkuText { diff --git a/src/ResourceManager/Network/Commands.Network/help/New-AzureRmExpressRouteCircuit.md b/src/ResourceManager/Network/Commands.Network/help/New-AzureRmExpressRouteCircuit.md index 80280cce1329..3ba2367c2b33 100644 --- a/src/ResourceManager/Network/Commands.Network/help/New-AzureRmExpressRouteCircuit.md +++ b/src/ResourceManager/Network/Commands.Network/help/New-AzureRmExpressRouteCircuit.md @@ -19,7 +19,7 @@ New-AzureRmExpressRouteCircuit -Name -ResourceGroupName -Locat -BandwidthInMbps [-Peering ] [-Authorization ] - [-AllowClassicOperations ] [-Tag ] [-Force] [-AsJob] + [-AllowClassicOperations ] [-AllowGlobalReach ] [-Tag ] [-Force] [-AsJob] [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` @@ -45,6 +45,21 @@ New-AzureRmExpressRouteCircuit @parameters ## PARAMETERS +### -AllowGlobalReach +The use of this parameter allows you to enable Global Reach on the circuit. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -AllowClassicOperations The use of this parameter allows you to use the classic Azure PowerShell cmdlets to manage the circuit. diff --git a/src/ResourceManager/Network/Stack/Commands.Network/Microsoft.Azure.Commands.Network.format.ps1xml b/src/ResourceManager/Network/Stack/Commands.Network/Microsoft.Azure.Commands.Network.format.ps1xml index 51516af208d1..48e018236d9c 100644 --- a/src/ResourceManager/Network/Stack/Commands.Network/Microsoft.Azure.Commands.Network.format.ps1xml +++ b/src/ResourceManager/Network/Stack/Commands.Network/Microsoft.Azure.Commands.Network.format.ps1xml @@ -2006,6 +2006,10 @@ GatewayManagerEtag + + + AllowGlobalReach +