Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you will need to re-record tests for this


# get Circuit
$getCircuit = Get-AzureRmExpressRouteCircuit -Name $circuitName -ResourceGroupName $rgname
Expand All @@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/ResourceManager/Network/Commands.Network/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,15 @@
## 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
- Remove-AzureRmPublicIpPrefix
- 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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@ public class NewAzureExpressRouteCircuitCommand : ExpressRouteCircuitBaseCmdlet
[ValidateNotNullOrEmpty]
public bool? AllowClassicOperations { get; set; }

[Parameter(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should ensure the new parameter is covered in one of your tests

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've updated an existing test to test this flag.

Mandatory = false,
ValueFromPipelineByPropertyName = true)]
[ValidateNotNullOrEmpty]
public SwitchParameter AllowGlobalReach { get; set; }

[Parameter(
Mandatory = false,
Expand Down Expand Up @@ -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<MNM.ExpressRouteCircuit>(circuit);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2416,6 +2416,10 @@
<Label>GatewayManagerEtag</Label>
<PropertyName>GatewayManagerEtag</PropertyName>
</ListItem>
<ListItem>
<Label>AllowGlobalReach</Label>
<PropertyName>AllowGlobalReach</PropertyName>
</ListItem>
</ListItems>
</ListEntry>
</ListEntries>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ public class PSExpressRouteCircuit : PSTopLevelResource

public string GatewayManagerEtag { get; set; }

public bool AllowGlobalReach { get; set; }

[JsonIgnore]
public string SkuText
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ New-AzureRmExpressRouteCircuit -Name <String> -ResourceGroupName <String> -Locat
-BandwidthInMbps <Int32>
[-Peering <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSPeering]>]
[-Authorization <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSExpressRouteCircuitAuthorization]>]
[-AllowClassicOperations <Boolean>] [-Tag <Hashtable>] [-Force] [-AsJob]
[-AllowClassicOperations <Boolean>] [-AllowGlobalReach <Boolean>] [-Tag <Hashtable>] [-Force] [-AsJob]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
```

Expand All @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2006,6 +2006,10 @@
<Label>GatewayManagerEtag</Label>
<PropertyName>GatewayManagerEtag</PropertyName>
</ListItem>
<ListItem>
<Label>AllowGlobalReach</Label>
<PropertyName>AllowGlobalReach</PropertyName>
</ListItem>
</ListItems>
</ListEntry>
</ListEntries>
Expand Down