Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
32a7fce
Add support for circuit connection product code
dedhar May 1, 2018
3781c9a
add files for help commands
dedhar May 1, 2018
ef35195
add documentation for circuit connection commands
dedhar May 1, 2018
3458020
add more documentation
dedhar May 2, 2018
5451714
add some more documentation
dedhar May 2, 2018
d446e3d
add example title
dedhar May 2, 2018
1b79660
Merge branch 'preview' into preview
May 2, 2018
0e6b17a
add examples for add and remove cmds
dedhar May 2, 2018
65e8eda
Merge branch 'preview' of https://github.com/Azure/azure-powershell i…
dedhar May 2, 2018
50cf007
Merge branch 'preview' of https://github.com/dedhar/azure-powershell …
dedhar May 2, 2018
e1ffc4d
fix change log for circuit connection commands
dedhar May 2, 2018
2226f48
start adding test for circuit connection
dedhar May 3, 2018
ce13fe7
update session record for circuit connection
dedhar May 4, 2018
d496aa8
add circuit connection crud json file to session records
dedhar May 4, 2018
ba9f357
verify playback mode
dedhar May 4, 2018
48ebf19
remove support for set and new commands for circuit connection
dedhar May 8, 2018
f64b4b8
Support piping on all circuit connection commands
dedhar May 8, 2018
a00ff31
Merge branch 'preview' of https://github.com/Azure/azure-powershell i…
dedhar May 8, 2018
fc74f4d
Merge branch 'preview' of https://github.com/Azure/azure-powershell i…
dedhar May 8, 2018
75003e9
revert changes to common.ps1
dedhar May 8, 2018
47922c6
address vladimir comments
dedhar May 9, 2018
d30030b
add support to set command to allow piping
dedhar May 9, 2018
6c98abc
removing writing to peer to fix return type
dedhar May 9, 2018
8efe523
Merge branch 'preview' of https://github.com/Azure/azure-powershell i…
dedhar May 9, 2018
d7886cb
revert change to set circuit command
dedhar May 10, 2018
6fd43e2
Merge branch 'preview' of https://github.com/Azure/azure-powershell i…
dedhar May 10, 2018
f30eff0
remove value from pipeline by property name from all circuit connecit…
dedhar May 10, 2018
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
5 changes: 4 additions & 1 deletion src/ResourceManager/Network/AzureRM.Network.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,10 @@ CmdletsToExport = 'Add-AzureRmApplicationGatewayAuthenticationCertificate',
'New-AzureRmPublicIpTag',
'New-AzureRmDdosProtectionPlan',
'Get-AzureRmDdosProtectionPlan',
'Remove-AzureRmDdosProtectionPlan'
'Remove-AzureRmDdosProtectionPlan',
'Add-AzureRmExpressRouteCircuitConnectionConfig',
'Get-AzureRmExpressRouteCircuitConnectionConfig',
'Remove-AzureRmExpressRouteCircuitConnectionConfig'

# Variables to export from this module
# VariablesToExport = @()
Expand Down
6 changes: 6 additions & 0 deletions src/ResourceManager/Network/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@
* Bump up Network SDK version from 18.0.0-preview to 19.0.0-preview

## Version 6.0.0
* Added cmdlet to add a new circuit connection to an existing express route circuit.
- Add-AzureRmExpressRouteCircuitConnectionConfig
* Added cmdlet to remove a circuit connection from an existing express route circuit.
- Remove-AzureRmExpressRouteCircuitConnectionConfig
* Added cmdlet to retrieve a circuit connection
- Get-AzureRmExpressRouteCircuitConnectionConfig
* Bump up network sdk version from 17.0.0.preview to 18.0.0.preview
* Rerecord all network tests with latest sdk version* Set minimum dependency of module to PowerShell 5.0
* Add support for DDoS protection plan resource
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@
<None Include="SessionRecords\Commands.Network.Test.ScenarioTests.ExpressRouteCircuitTests\TestExpressRouteBgpServiceCommunitiesGet.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Commands.Network.Test.ScenarioTests.ExpressRouteCircuitTests\TestExpressRouteCircuitConnectionCRUD.json" />
<None Include="SessionRecords\Commands.Network.Test.ScenarioTests.LoadBalancerTests\TestLoadBalancerCRUDInternalHighlyAvailableBasicSku.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,27 +62,25 @@ function Get-ProviderLocation($provider)
{
$type = $provider.Substring($namespace.Length + 1)
$location = Get-AzureRmResourceProvider -ProviderNamespace $namespace | where {$_.ResourceTypes[0].ResourceTypeName -eq $type}

if ($location -eq $null)
{
return "West US"
}
else
{
if($location.Locations[0] -eq "West US")
{
return $location.Locations[1]
}
else
{
return $location.Locations[0]
if($location.Locations[0] -eq "West US")
{
return $location.Locations[1]
}
}
}

else
{
return $location.Locations[0]
}
}
}
return "West US"
}

return "WestUS"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,12 @@ public void TestExpressRouteRouteFilterCRUD()
{
NetworkResourcesController.NewInstance.RunPsTest("Test-ExpressRouteRouteFilters");
}

[Fact(Skip = "Express Route Circuits need to be manually provisioned by Service Providers and the whole setup can't be automated.")]
[Trait(Category.AcceptanceType, Category.CheckIn)]
Copy link
Contributor

Choose a reason for hiding this comment

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

why include the test and skip it right away?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Today to enable Azure Private Peering on an Express Route Circuit, a service provider needs to mark the Circuit as provisioned which is a manual step. we are planning to add a check in backend server code to skip this check so that PS tests can be automated. The fix is merged but yet to be rolled. Once the change is rolled we will fix the test for Circuit Connection.

public void TestExpressRouteCircuitConnectionCRUD()
{
NetworkResourcesController.NewInstance.RunPsTest("Test-ExpressRouteCircuitConnectionCRUD");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -540,3 +540,59 @@ function Test-ExpressRouteCircuitAuthorizationCRUD
}
}

<#
.SYNOPSIS
Tests ExpressRouteCircuitConnectionCRUD.
#>
function Test-ExpressRouteCircuitConnectionCRUD
{
$circuitName = "dedharcktpeer"
Copy link
Contributor

Choose a reason for hiding this comment

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

why do you need the test if you skip it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Adding a test for future reference so that we fix the test case once the backend code is released.

$groupName = "dedharpspeer"
$peerCircuitId = "/subscriptions/99c33776-9f4e-4e58-abe8-9263db1b9c6e/resourceGroups/dedharpsinit/providers/Microsoft.Network/expressRouteCircuits/dedhar-cktinit/peerings/AzurePrivatePeering"
$addressPrefix = "60.0.0.0/29"
$authorizationKey = "aaf441cf-4409-48ee-8e2d-a39cc7e428a8"
$connectionName = "transit"

try
{
#Get Express Route Circuit Resource
$ckt = Get-AzureRmExpressRouteCircuit -Name $circuitName -ResourceGroupName $groupName
$ckt

#Create the circuit connection Resource
Add-AzureRmExpressRouteCircuitConnectionConfig -Name $connectionName -ExpressRouteCircuit $ckt -PeerExpressRouteCircuitPeering $peerCircuitId -AddressPrefix $addressPrefix -AuthorizationKey $authorizationKey

#Set on Express Route Circuit
Set-AzureRmExpressRouteCircuit -ExpressRouteCircuit $ckt

#Get Express Route Circuit Resource
$ckt = Get-AzureRmExpressRouteCircuit -Name $circuitName -ResourceGroupName $groupName
$ckt

#Verify Circuit Connection fields
Assert-AreEqual "transit" $ckt.Peerings[0].Connections[0].Name
Assert-AreEqual "Succeeded" $ckt.Peerings[0].Connections[0].ProvisioningState
Assert-AreEqual "Connected" $ckt.Peerings[0].Connections[0].CircuitConnectionStatus

#Get Express Route Circuit Resource
$ckt = Get-AzureRmExpressRouteCircuit -Name $circuitName -ResourceGroupName $groupName

#Delete the circuit connection Resource
Remove-AzureRmExpressRouteCircuitConnectionConfig -Name $connectionName -ExpressRouteCircuit $ckt

#Set on Express Route Circuit
Set-AzureRmExpressRouteCircuit -ExpressRouteCircuit $ckt

#Get Express Route Circuit Resource
$ckt = Get-AzureRmExpressRouteCircuit -Name $circuitName -ResourceGroupName $groupName
$ckt

#Verify Circuit Connection does not exist
Assert-AreEqual 0 $ckt.Peerings[0].Connections.Count
}
finally
{
#Cleanup
}
}

Loading