-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Add PS CmdLets for Express Route Circuit Connection Resource #6094
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
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 3781c9a
add files for help commands
dedhar ef35195
add documentation for circuit connection commands
dedhar 3458020
add more documentation
dedhar 5451714
add some more documentation
dedhar d446e3d
add example title
dedhar 1b79660
Merge branch 'preview' into preview
0e6b17a
add examples for add and remove cmds
dedhar 65e8eda
Merge branch 'preview' of https://github.com/Azure/azure-powershell i…
dedhar 50cf007
Merge branch 'preview' of https://github.com/dedhar/azure-powershell …
dedhar e1ffc4d
fix change log for circuit connection commands
dedhar 2226f48
start adding test for circuit connection
dedhar ce13fe7
update session record for circuit connection
dedhar d496aa8
add circuit connection crud json file to session records
dedhar ba9f357
verify playback mode
dedhar 48ebf19
remove support for set and new commands for circuit connection
dedhar f64b4b8
Support piping on all circuit connection commands
dedhar a00ff31
Merge branch 'preview' of https://github.com/Azure/azure-powershell i…
dedhar fc74f4d
Merge branch 'preview' of https://github.com/Azure/azure-powershell i…
dedhar 75003e9
revert changes to common.ps1
dedhar 47922c6
address vladimir comments
dedhar d30030b
add support to set command to allow piping
dedhar 6c98abc
removing writing to peer to fix return type
dedhar 8efe523
Merge branch 'preview' of https://github.com/Azure/azure-powershell i…
dedhar d7886cb
revert change to set circuit command
dedhar 6fd43e2
Merge branch 'preview' of https://github.com/Azure/azure-powershell i…
dedhar f30eff0
remove value from pipeline by property name from all circuit connecit…
dedhar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -540,3 +540,59 @@ function Test-ExpressRouteCircuitAuthorizationCRUD | |
| } | ||
| } | ||
|
|
||
| <# | ||
| .SYNOPSIS | ||
| Tests ExpressRouteCircuitConnectionCRUD. | ||
| #> | ||
| function Test-ExpressRouteCircuitConnectionCRUD | ||
| { | ||
| $circuitName = "dedharcktpeer" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why do you need the test if you skip it?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
| } | ||
| } | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.