diff --git a/src/ResourceManager/Network/Commands.Network.Test/Commands.Network.Test.csproj b/src/ResourceManager/Network/Commands.Network.Test/Commands.Network.Test.csproj index 1bb198373f6b..6cd848ae4c9c 100644 --- a/src/ResourceManager/Network/Commands.Network.Test/Commands.Network.Test.csproj +++ b/src/ResourceManager/Network/Commands.Network.Test/Commands.Network.Test.csproj @@ -67,7 +67,7 @@ ..\..\..\packages\Microsoft.Azure.Management.Authorization.2.0.0\lib\net40\Microsoft.Azure.Management.Authorization.dll - ..\..\..\packages\Microsoft.Azure.Management.Network.3.0.2-preview\lib\net45\Microsoft.Azure.Management.Network.dll + ..\..\..\packages\Microsoft.Azure.Management.Network.3.0.3-preview\lib\net45\Microsoft.Azure.Management.Network.dll True @@ -219,6 +219,9 @@ Always + + PreserveNewest + Always diff --git a/src/ResourceManager/Network/Commands.Network.Test/ScenarioTests/ExpressRouteCircuitTests.cs b/src/ResourceManager/Network/Commands.Network.Test/ScenarioTests/ExpressRouteCircuitTests.cs index b046ff2deff2..a74a8d91db2d 100644 --- a/src/ResourceManager/Network/Commands.Network.Test/ScenarioTests/ExpressRouteCircuitTests.cs +++ b/src/ResourceManager/Network/Commands.Network.Test/ScenarioTests/ExpressRouteCircuitTests.cs @@ -32,5 +32,12 @@ public void TestExpressRouteCircuitPeeringCRUD() { NetworkResourcesController.NewInstance.RunPsTest("Test-ExpressRouteCircuitPeeringCRUD"); } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestExpressRouteCircuitAuthorizationCRUD() + { + NetworkResourcesController.NewInstance.RunPsTest("Test-ExpressRouteCircuitAuthorizationCRUD"); + } } } diff --git a/src/ResourceManager/Network/Commands.Network.Test/ScenarioTests/ExpressRouteCircuitTests.ps1 b/src/ResourceManager/Network/Commands.Network.Test/ScenarioTests/ExpressRouteCircuitTests.ps1 index b35604c40324..5100bddfea8e 100644 --- a/src/ResourceManager/Network/Commands.Network.Test/ScenarioTests/ExpressRouteCircuitTests.ps1 +++ b/src/ResourceManager/Network/Commands.Network.Test/ScenarioTests/ExpressRouteCircuitTests.ps1 @@ -191,4 +191,74 @@ function Test-ExpressRouteCircuitPeeringCRUD # Cleanup Clean-ResourceGroup $rgname } -} \ No newline at end of file +} + +<# +.SYNOPSIS +Tests ExpressRouteCircuitAuthorizationCRUD. +#> +function Test-ExpressRouteCircuitAuthorizationCRUD +{ + # Setup + $rgname = Get-ResourceGroupName + $circuitName = Get-ResourceName + $rglocation = Get-ProviderLocation ResourceManagement + $resourceTypeParent = "Microsoft.Network/expressRouteCircuits" + $location = Get-ProviderLocation $resourceTypeParent + $location = "brazilSouth" + $authorizationName = "testkey" + + try + { + # Create the resource group + $resourceGroup = New-AzureRmResourceGroup -Name $rgname -Location $rglocation + + # Create the ExpressRouteCircuit with authorization + $authorization = New-AzureRmExpressRouteCircuitAuthorization -Name $authorizationName + $circuit = New-AzureRmExpressRouteCircuit -Name $circuitName -Location $location -ResourceGroupName $rgname -SkuTier Standard -SkuFamily MeteredData -ServiceProviderName "equinix" -PeeringLocation "Silicon Valley" -BandwidthInMbps 1000 -Authorization $authorization + + #verification + Assert-AreEqual $rgName $circuit.ResourceGroupName + Assert-AreEqual $circuitName $circuit.Name + Assert-NotNull $circuit.Location + Assert-NotNull $circuit.Etag + Assert-AreEqual 1 @($circuit.Authorizations).Count + Assert-AreEqual "Standard_MeteredData" $circuit.Sku.Name + Assert-AreEqual "Standard" $circuit.Sku.Tier + Assert-AreEqual "MeteredData" $circuit.Sku.Family + Assert-AreEqual "equinix" $circuit.ServiceProviderProperties.ServiceProviderName + Assert-AreEqual "Silicon Valley" $circuit.ServiceProviderProperties.PeeringLocation + Assert-AreEqual "1000" $circuit.ServiceProviderProperties.BandwidthInMbps + + # Verify the authorization + Assert-AreEqual $authorizationName $circuit.Authorizations[0].Name + + + # get authorization + #$a = $circuit | Get-AzureRmExpressRouteCircuitAuthorization -Name $authorizationName + #Assert-AreEqual $authorizationName $a.Name + + # add a new authorization + #$circuit = Get-AzureRmExpressRouteCircuit -Name $circuitName -ResourceGroupName $rgname | Add-AzureRmExpressRouteCircuitAuthorization -Name "testkey2" | Set-AzureRmExpressRouteCircuit + + #$a = $circuit | Get-AzureRmExpressRouteCircuitAuthorization -Name "testkey2" + #Assert-AreEqual "testkey2" $a.Name + + + #$listAuthorization = $circuit | Get-AzureRmExpressRouteCircuitAuthorization + #Assert-AreEqual 2 @($listAuthorization).Count + + # Delete Circuit + $delete = Remove-AzureRmExpressRouteCircuit -ResourceGroupName $rgname -name $circuitName -PassThru -Force + Assert-AreEqual true $delete + + $list = Get-AzureRmExpressRouteCircuit -ResourceGroupName $rgname + Assert-AreEqual 0 @($list).Count + } + finally + { + # Cleanup + Clean-ResourceGroup $rgname + } +} + diff --git a/src/ResourceManager/Network/Commands.Network.Test/SessionRecords/Commands.Network.Test.ScenarioTests.ExpressRouteCircuitTests/TestExpressRouteCircuitAuthorizationCRUD.json b/src/ResourceManager/Network/Commands.Network.Test/SessionRecords/Commands.Network.Test.ScenarioTests.ExpressRouteCircuitTests/TestExpressRouteCircuitAuthorizationCRUD.json new file mode 100644 index 000000000000..9142b6264582 --- /dev/null +++ b/src/ResourceManager/Network/Commands.Network.Test/SessionRecords/Commands.Network.Test.ScenarioTests.ExpressRouteCircuitTests/TestExpressRouteCircuitAuthorizationCRUD.json @@ -0,0 +1,1132 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Network?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2NhNDkwNDItNzgyYS00Y2M5LTg5YjUtZWUxYjQ4N2ZlMTE1L3Byb3ZpZGVycy9NaWNyb3NvZnQuTmV0d29yaz9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Network\",\r\n \"namespace\": \"Microsoft.Network\",\r\n \"authorization\": {\r\n \"applicationId\": \"2cf9eb86-36b5-49dc-86ae-9a63135dfa8c\",\r\n \"roleDefinitionId\": \"13ba9ab4-19f0-4804-adc4-14ece36cc7a1\"\r\n },\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-06-15\",\r\n \"2015-05-01-preview\",\r\n \"2014-12-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"publicIPAddresses\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-06-15\",\r\n \"2015-05-01-preview\",\r\n \"2014-12-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"networkInterfaces\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-06-15\",\r\n \"2015-05-01-preview\",\r\n \"2014-12-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"loadBalancers\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-06-15\",\r\n \"2015-05-01-preview\",\r\n \"2014-12-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"networkSecurityGroups\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-06-15\",\r\n \"2015-05-01-preview\",\r\n \"2014-12-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"routeTables\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-06-15\",\r\n \"2015-05-01-preview\",\r\n \"2014-12-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualNetworkGateways\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-06-15\",\r\n \"2015-05-01-preview\",\r\n \"2014-12-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"localNetworkGateways\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-06-15\",\r\n \"2015-05-01-preview\",\r\n \"2014-12-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"connections\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-06-15\",\r\n \"2015-05-01-preview\",\r\n \"2014-12-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"applicationGateways\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-06-15\",\r\n \"2015-05-01-preview\",\r\n \"2014-12-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-06-15\",\r\n \"2015-05-01-preview\",\r\n \"2014-12-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-06-15\",\r\n \"2015-05-01-preview\",\r\n \"2014-12-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operationResults\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-06-15\",\r\n \"2015-05-01-preview\",\r\n \"2014-12-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/CheckDnsNameAvailability\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-06-15\",\r\n \"2015-05-01-preview\",\r\n \"2014-12-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/usages\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-06-15\",\r\n \"2015-05-01-preview\",\r\n \"2014-12-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-06-15\",\r\n \"2015-05-01-preview\",\r\n \"2014-12-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"expressRouteCircuits\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-06-15\",\r\n \"2015-05-01-preview\",\r\n \"2014-12-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"expressRouteServiceProviders\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-06-15\",\r\n \"2015-05-01-preview\",\r\n \"2014-12-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dnszones\",\r\n \"locations\": [\r\n \"global\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-05-04-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dnszones/A\",\r\n \"locations\": [\r\n \"global\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-05-04-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dnszones/AAAA\",\r\n \"locations\": [\r\n \"global\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-05-04-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dnszones/CNAME\",\r\n \"locations\": [\r\n \"global\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-05-04-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dnszones/PTR\",\r\n \"locations\": [\r\n \"global\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-05-04-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dnszones/MX\",\r\n \"locations\": [\r\n \"global\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-05-04-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dnszones/TXT\",\r\n \"locations\": [\r\n \"global\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-05-04-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dnszones/SRV\",\r\n \"locations\": [\r\n \"global\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-05-04-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"trafficmanagerprofiles\",\r\n \"locations\": [\r\n \"global\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-04-28-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkTrafficManagerNameAvailability\",\r\n \"locations\": [\r\n \"global\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-04-28-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "5479" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14998" + ], + "x-ms-request-id": [ + "d236705d-4e0f-4a34-8cd5-c2aff8549005" + ], + "x-ms-correlation-request-id": [ + "d236705d-4e0f-4a34-8cd5-c2aff8549005" + ], + "x-ms-routing-request-id": [ + "WESTUS:20151204T225244Z:d236705d-4e0f-4a34-8cd5-c2aff8549005" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 04 Dec 2015 22:52:44 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourcegroups/onesdk993?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2NhNDkwNDItNzgyYS00Y2M5LTg5YjUtZWUxYjQ4N2ZlMTE1L3Jlc291cmNlZ3JvdXBzL29uZXNkazk5Mz9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "101" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-failure-cause": [ + "gateway" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14997" + ], + "x-ms-request-id": [ + "d537cabf-b46e-496f-b484-3d5cc4853d58" + ], + "x-ms-correlation-request-id": [ + "d537cabf-b46e-496f-b484-3d5cc4853d58" + ], + "x-ms-routing-request-id": [ + "WESTUS:20151204T225244Z:d537cabf-b46e-496f-b484-3d5cc4853d58" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 04 Dec 2015 22:52:44 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourcegroups/onesdk993?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2NhNDkwNDItNzgyYS00Y2M5LTg5YjUtZWUxYjQ4N2ZlMTE1L3Jlc291cmNlZ3JvdXBzL29uZXNkazk5Mz9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14984" + ], + "x-ms-request-id": [ + "21ca4718-2d7f-4f63-82ac-5dc3d0a8cc42" + ], + "x-ms-correlation-request-id": [ + "21ca4718-2d7f-4f63-82ac-5dc3d0a8cc42" + ], + "x-ms-routing-request-id": [ + "WESTUS:20151204T225445Z:21ca4718-2d7f-4f63-82ac-5dc3d0a8cc42" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 04 Dec 2015 22:54:44 GMT" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourcegroups/onesdk993?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2NhNDkwNDItNzgyYS00Y2M5LTg5YjUtZWUxYjQ4N2ZlMTE1L3Jlc291cmNlZ3JvdXBzL29uZXNkazk5Mz9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "29" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/onesdk993\",\r\n \"name\": \"onesdk993\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "171" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "14a307dd-569d-445c-ae57-50d2db5dd9e6" + ], + "x-ms-correlation-request-id": [ + "14a307dd-569d-445c-ae57-50d2db5dd9e6" + ], + "x-ms-routing-request-id": [ + "WESTUS:20151204T225245Z:14a307dd-569d-445c-ae57-50d2db5dd9e6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 04 Dec 2015 22:52:44 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/onesdk993/resources?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2NhNDkwNDItNzgyYS00Y2M5LTg5YjUtZWUxYjQ4N2ZlMTE1L3Jlc291cmNlR3JvdXBzL29uZXNkazk5My9yZXNvdXJjZXM/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14996" + ], + "x-ms-request-id": [ + "27b916c7-671d-4004-a433-e1af4fae4590" + ], + "x-ms-correlation-request-id": [ + "27b916c7-671d-4004-a433-e1af4fae4590" + ], + "x-ms-routing-request-id": [ + "WESTUS:20151204T225245Z:27b916c7-671d-4004-a433-e1af4fae4590" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 04 Dec 2015 22:52:44 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/onesdk993/providers/Microsoft.Network/expressRouteCircuits/onesdk3944?api-version=2015-06-15", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2NhNDkwNDItNzgyYS00Y2M5LTg5YjUtZWUxYjQ4N2ZlMTE1L3Jlc291cmNlR3JvdXBzL29uZXNkazk5My9wcm92aWRlcnMvTWljcm9zb2Z0Lk5ldHdvcmsvZXhwcmVzc1JvdXRlQ2lyY3VpdHMvb25lc2RrMzk0ND9hcGktdmVyc2lvbj0yMDE1LTA2LTE1", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "4fc520ce-4517-4626-9dcd-46baa53fed39" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Network.NetworkManagementClient/3.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"The Resource 'Microsoft.Network/expressRouteCircuits/onesdk3944' under resource group 'onesdk993' was not found.\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "162" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-failure-cause": [ + "gateway" + ], + "x-ms-request-id": [ + "679ad00c-6787-4ca5-be59-4ce2d2ccec4b" + ], + "x-ms-correlation-request-id": [ + "679ad00c-6787-4ca5-be59-4ce2d2ccec4b" + ], + "x-ms-routing-request-id": [ + "WESTUS:20151204T225245Z:679ad00c-6787-4ca5-be59-4ce2d2ccec4b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 04 Dec 2015 22:52:45 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/onesdk993/providers/Microsoft.Network/expressRouteCircuits/onesdk3944?api-version=2015-06-15", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2NhNDkwNDItNzgyYS00Y2M5LTg5YjUtZWUxYjQ4N2ZlMTE1L3Jlc291cmNlR3JvdXBzL29uZXNkazk5My9wcm92aWRlcnMvTWljcm9zb2Z0Lk5ldHdvcmsvZXhwcmVzc1JvdXRlQ2lyY3VpdHMvb25lc2RrMzk0ND9hcGktdmVyc2lvbj0yMDE1LTA2LTE1", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Network.NetworkManagementClient/3.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk3944\",\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/onesdk993/providers/Microsoft.Network/expressRouteCircuits/onesdk3944\",\r\n \"etag\": \"W/\\\"6750e610-74fe-43d8-91a6-9d9812e2289b\\\"\",\r\n \"type\": \"Microsoft.Network/expressRouteCircuits\",\r\n \"location\": \"brazilsouth\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"18d37eea-b62f-4dc2-a922-d8e72ceb7179\",\r\n \"peerings\": [],\r\n \"authorizations\": [\r\n {\r\n \"name\": \"testkey\",\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/onesdk993/providers/Microsoft.Network/expressRouteCircuits/onesdk3944/authorizations/testkey\",\r\n \"etag\": \"W/\\\"6750e610-74fe-43d8-91a6-9d9812e2289b\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"authorizationKey\": \"3bf00ebd-760b-425b-aa5b-d4387744062b\",\r\n \"authorizationUseStatus\": \"Available\"\r\n }\r\n }\r\n ],\r\n \"serviceProviderProperties\": {\r\n \"serviceProviderName\": \"equinix\",\r\n \"peeringLocation\": \"Silicon Valley\",\r\n \"bandwidthInMbps\": 1000\r\n },\r\n \"circuitProvisioningState\": \"Enabled\",\r\n \"serviceKey\": \"960d4a8f-f266-4543-92e3-b9aaaf1f165b\",\r\n \"serviceProviderProvisioningState\": \"NotProvisioned\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_MeteredData\",\r\n \"tier\": \"Standard\",\r\n \"family\": \"MeteredData\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1414" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "921d6abd-2fac-4d62-8237-76d9cd6c32f7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14989" + ], + "x-ms-correlation-request-id": [ + "74edd120-470f-40c6-a266-98b75b9505bd" + ], + "x-ms-routing-request-id": [ + "WESTUS:20151204T225402Z:74edd120-470f-40c6-a266-98b75b9505bd" + ], + "Date": [ + "Fri, 04 Dec 2015 22:54:01 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/onesdk993/providers/Microsoft.Network/expressRouteCircuits/onesdk3944?api-version=2015-06-15", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2NhNDkwNDItNzgyYS00Y2M5LTg5YjUtZWUxYjQ4N2ZlMTE1L3Jlc291cmNlR3JvdXBzL29uZXNkazk5My9wcm92aWRlcnMvTWljcm9zb2Z0Lk5ldHdvcmsvZXhwcmVzc1JvdXRlQ2lyY3VpdHMvb25lc2RrMzk0ND9hcGktdmVyc2lvbj0yMDE1LTA2LTE1", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "94c36e6a-5ed1-4fef-be04-09ec45db77ec" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Network.NetworkManagementClient/3.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk3944\",\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/onesdk993/providers/Microsoft.Network/expressRouteCircuits/onesdk3944\",\r\n \"etag\": \"W/\\\"6750e610-74fe-43d8-91a6-9d9812e2289b\\\"\",\r\n \"type\": \"Microsoft.Network/expressRouteCircuits\",\r\n \"location\": \"brazilsouth\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"18d37eea-b62f-4dc2-a922-d8e72ceb7179\",\r\n \"peerings\": [],\r\n \"authorizations\": [\r\n {\r\n \"name\": \"testkey\",\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/onesdk993/providers/Microsoft.Network/expressRouteCircuits/onesdk3944/authorizations/testkey\",\r\n \"etag\": \"W/\\\"6750e610-74fe-43d8-91a6-9d9812e2289b\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"authorizationKey\": \"3bf00ebd-760b-425b-aa5b-d4387744062b\",\r\n \"authorizationUseStatus\": \"Available\"\r\n }\r\n }\r\n ],\r\n \"serviceProviderProperties\": {\r\n \"serviceProviderName\": \"equinix\",\r\n \"peeringLocation\": \"Silicon Valley\",\r\n \"bandwidthInMbps\": 1000\r\n },\r\n \"circuitProvisioningState\": \"Enabled\",\r\n \"serviceKey\": \"960d4a8f-f266-4543-92e3-b9aaaf1f165b\",\r\n \"serviceProviderProvisioningState\": \"NotProvisioned\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_MeteredData\",\r\n \"tier\": \"Standard\",\r\n \"family\": \"MeteredData\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1414" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "b271be33-2c6b-4af5-be95-29c8d737cc81" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14988" + ], + "x-ms-correlation-request-id": [ + "0afd40f0-9589-447f-b0f4-eefb0f999ef4" + ], + "x-ms-routing-request-id": [ + "WESTUS:20151204T225402Z:0afd40f0-9589-447f-b0f4-eefb0f999ef4" + ], + "Date": [ + "Fri, 04 Dec 2015 22:54:01 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/onesdk993/providers/Microsoft.Network/expressRouteCircuits/onesdk3944?api-version=2015-06-15", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2NhNDkwNDItNzgyYS00Y2M5LTg5YjUtZWUxYjQ4N2ZlMTE1L3Jlc291cmNlR3JvdXBzL29uZXNkazk5My9wcm92aWRlcnMvTWljcm9zb2Z0Lk5ldHdvcmsvZXhwcmVzc1JvdXRlQ2lyY3VpdHMvb25lc2RrMzk0ND9hcGktdmVyc2lvbj0yMDE1LTA2LTE1", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_MeteredData\",\r\n \"tier\": \"Standard\",\r\n \"family\": \"MeteredData\"\r\n },\r\n \"location\": \"brazilSouth\",\r\n \"properties\": {\r\n \"authorizations\": [\r\n {\r\n \"name\": \"testkey\"\r\n }\r\n ],\r\n \"peerings\": [],\r\n \"serviceProviderProperties\": {\r\n \"serviceProviderName\": \"equinix\",\r\n \"peeringLocation\": \"Silicon Valley\",\r\n \"bandwidthInMbps\": 1000\r\n }\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "425" + ], + "x-ms-client-request-id": [ + "fa841cce-a404-4698-b320-147e38fa37d4" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Network.NetworkManagementClient/3.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk3944\",\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/onesdk993/providers/Microsoft.Network/expressRouteCircuits/onesdk3944\",\r\n \"etag\": \"W/\\\"3da37023-e9b9-4e77-a008-6a3110707ba9\\\"\",\r\n \"type\": \"Microsoft.Network/expressRouteCircuits\",\r\n \"location\": \"brazilsouth\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"resourceGuid\": \"18d37eea-b62f-4dc2-a922-d8e72ceb7179\",\r\n \"peerings\": [],\r\n \"authorizations\": [\r\n {\r\n \"name\": \"testkey\",\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/onesdk993/providers/Microsoft.Network/expressRouteCircuits/onesdk3944/authorizations/testkey\",\r\n \"etag\": \"W/\\\"3da37023-e9b9-4e77-a008-6a3110707ba9\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"authorizationUseStatus\": \"Available\"\r\n }\r\n }\r\n ],\r\n \"serviceProviderProperties\": {\r\n \"serviceProviderName\": \"equinix\",\r\n \"peeringLocation\": \"Silicon Valley\",\r\n \"bandwidthInMbps\": 1000\r\n },\r\n \"circuitProvisioningState\": \"Disabled\",\r\n \"serviceKey\": \"00000000-0000-0000-0000-000000000000\",\r\n \"serviceProviderProvisioningState\": \"NotProvisioned\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_MeteredData\",\r\n \"tier\": \"Standard\",\r\n \"family\": \"MeteredData\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1342" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "10" + ], + "x-ms-request-id": [ + "06f376fb-19ec-45d4-bd41-f9d9ef558329" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Network/locations/brazilsouth/operations/06f376fb-19ec-45d4-bd41-f9d9ef558329?api-version=2015-06-15" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "35786901-7571-42d1-8b82-abb7f0aa5766" + ], + "x-ms-routing-request-id": [ + "WESTUS:20151204T225248Z:35786901-7571-42d1-8b82-abb7f0aa5766" + ], + "Date": [ + "Fri, 04 Dec 2015 22:52:48 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Network/locations/brazilsouth/operations/06f376fb-19ec-45d4-bd41-f9d9ef558329?api-version=2015-06-15", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2NhNDkwNDItNzgyYS00Y2M5LTg5YjUtZWUxYjQ4N2ZlMTE1L3Byb3ZpZGVycy9NaWNyb3NvZnQuTmV0d29yay9sb2NhdGlvbnMvYnJhemlsc291dGgvb3BlcmF0aW9ucy8wNmYzNzZmYi0xOWVjLTQ1ZDQtYmQ0MS1mOWQ5ZWY1NTgzMjk/YXBpLXZlcnNpb249MjAxNS0wNi0xNQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Network.NetworkManagementClient/3.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"status\": \"InProgress\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "30" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "9f2b5c43-6285-4d68-95aa-40262efb97d1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14992" + ], + "x-ms-correlation-request-id": [ + "680cda55-cdec-47a9-bc42-aec6955b9768" + ], + "x-ms-routing-request-id": [ + "WESTUS:20151204T225259Z:680cda55-cdec-47a9-bc42-aec6955b9768" + ], + "Date": [ + "Fri, 04 Dec 2015 22:52:58 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Network/locations/brazilsouth/operations/06f376fb-19ec-45d4-bd41-f9d9ef558329?api-version=2015-06-15", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2NhNDkwNDItNzgyYS00Y2M5LTg5YjUtZWUxYjQ4N2ZlMTE1L3Byb3ZpZGVycy9NaWNyb3NvZnQuTmV0d29yay9sb2NhdGlvbnMvYnJhemlsc291dGgvb3BlcmF0aW9ucy8wNmYzNzZmYi0xOWVjLTQ1ZDQtYmQ0MS1mOWQ5ZWY1NTgzMjk/YXBpLXZlcnNpb249MjAxNS0wNi0xNQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Network.NetworkManagementClient/3.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"status\": \"InProgress\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "30" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "8f4ec02a-eecf-4ff0-a159-d1c0a246ed6a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14991" + ], + "x-ms-correlation-request-id": [ + "7ab0863b-6c8a-4a59-8ebd-5fc539bfff5b" + ], + "x-ms-routing-request-id": [ + "WESTUS:20151204T225330Z:7ab0863b-6c8a-4a59-8ebd-5fc539bfff5b" + ], + "Date": [ + "Fri, 04 Dec 2015 22:53:29 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Network/locations/brazilsouth/operations/06f376fb-19ec-45d4-bd41-f9d9ef558329?api-version=2015-06-15", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2NhNDkwNDItNzgyYS00Y2M5LTg5YjUtZWUxYjQ4N2ZlMTE1L3Byb3ZpZGVycy9NaWNyb3NvZnQuTmV0d29yay9sb2NhdGlvbnMvYnJhemlsc291dGgvb3BlcmF0aW9ucy8wNmYzNzZmYi0xOWVjLTQ1ZDQtYmQ0MS1mOWQ5ZWY1NTgzMjk/YXBpLXZlcnNpb249MjAxNS0wNi0xNQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Network.NetworkManagementClient/3.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"status\": \"Succeeded\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "29" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "f97f9789-20e7-498e-8693-b65f9aa56716" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14990" + ], + "x-ms-correlation-request-id": [ + "98ac2ae9-9a32-4ef5-b818-919048f91372" + ], + "x-ms-routing-request-id": [ + "WESTUS:20151204T225401Z:98ac2ae9-9a32-4ef5-b818-919048f91372" + ], + "Date": [ + "Fri, 04 Dec 2015 22:54:00 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/onesdk993/providers/Microsoft.Network/expressRouteCircuits/onesdk3944?api-version=2015-06-15", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2NhNDkwNDItNzgyYS00Y2M5LTg5YjUtZWUxYjQ4N2ZlMTE1L3Jlc291cmNlR3JvdXBzL29uZXNkazk5My9wcm92aWRlcnMvTWljcm9zb2Z0Lk5ldHdvcmsvZXhwcmVzc1JvdXRlQ2lyY3VpdHMvb25lc2RrMzk0ND9hcGktdmVyc2lvbj0yMDE1LTA2LTE1", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b6bc0114-ef5e-4bf0-babb-16d0564eaf65" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Network.NetworkManagementClient/3.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "10" + ], + "x-ms-request-id": [ + "c01f4983-d929-44b1-b95e-f482bcfa3fab" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Network/locations/brazilsouth/operations/c01f4983-d929-44b1-b95e-f482bcfa3fab?api-version=2015-06-15" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Network/locations/brazilsouth/operationResults/c01f4983-d929-44b1-b95e-f482bcfa3fab?api-version=2015-06-15" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "7a2a97b2-e138-4f1a-866c-9814c250e20d" + ], + "x-ms-routing-request-id": [ + "WESTUS:20151204T225403Z:7a2a97b2-e138-4f1a-866c-9814c250e20d" + ], + "Date": [ + "Fri, 04 Dec 2015 22:54:02 GMT" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Network/locations/brazilsouth/operations/c01f4983-d929-44b1-b95e-f482bcfa3fab?api-version=2015-06-15", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2NhNDkwNDItNzgyYS00Y2M5LTg5YjUtZWUxYjQ4N2ZlMTE1L3Byb3ZpZGVycy9NaWNyb3NvZnQuTmV0d29yay9sb2NhdGlvbnMvYnJhemlsc291dGgvb3BlcmF0aW9ucy9jMDFmNDk4My1kOTI5LTQ0YjEtYjk1ZS1mNDgyYmNmYTNmYWI/YXBpLXZlcnNpb249MjAxNS0wNi0xNQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Network.NetworkManagementClient/3.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"status\": \"InProgress\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "30" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "b79596d0-17c2-4f47-8bd7-c5b77e47bd9f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14987" + ], + "x-ms-correlation-request-id": [ + "4d21762f-49f4-40b1-aba0-6122b982c73f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20151204T225414Z:4d21762f-49f4-40b1-aba0-6122b982c73f" + ], + "Date": [ + "Fri, 04 Dec 2015 22:54:13 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Network/locations/brazilsouth/operations/c01f4983-d929-44b1-b95e-f482bcfa3fab?api-version=2015-06-15", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2NhNDkwNDItNzgyYS00Y2M5LTg5YjUtZWUxYjQ4N2ZlMTE1L3Byb3ZpZGVycy9NaWNyb3NvZnQuTmV0d29yay9sb2NhdGlvbnMvYnJhemlsc291dGgvb3BlcmF0aW9ucy9jMDFmNDk4My1kOTI5LTQ0YjEtYjk1ZS1mNDgyYmNmYTNmYWI/YXBpLXZlcnNpb249MjAxNS0wNi0xNQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Network.NetworkManagementClient/3.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"status\": \"Succeeded\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "29" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "de3fc176-adb6-45d8-9f1c-92ac7bca9fd2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14986" + ], + "x-ms-correlation-request-id": [ + "38211b6d-f3c9-4062-bdf5-8975441d79d0" + ], + "x-ms-routing-request-id": [ + "WESTUS:20151204T225444Z:38211b6d-f3c9-4062-bdf5-8975441d79d0" + ], + "Date": [ + "Fri, 04 Dec 2015 22:54:44 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/onesdk993/providers/Microsoft.Network/expressRouteCircuits?api-version=2015-06-15", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2NhNDkwNDItNzgyYS00Y2M5LTg5YjUtZWUxYjQ4N2ZlMTE1L3Jlc291cmNlR3JvdXBzL29uZXNkazk5My9wcm92aWRlcnMvTWljcm9zb2Z0Lk5ldHdvcmsvZXhwcmVzc1JvdXRlQ2lyY3VpdHM/YXBpLXZlcnNpb249MjAxNS0wNi0xNQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "2e18b4ea-3948-4674-99ba-c89008045026" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Network.NetworkManagementClient/3.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14985" + ], + "x-ms-request-id": [ + "0de44353-3d53-4c7f-bbb2-33e23e4743a2" + ], + "x-ms-correlation-request-id": [ + "0de44353-3d53-4c7f-bbb2-33e23e4743a2" + ], + "x-ms-routing-request-id": [ + "WESTUS:20151204T225444Z:0de44353-3d53-4c7f-bbb2-33e23e4743a2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 04 Dec 2015 22:54:44 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourcegroups/onesdk993?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2NhNDkwNDItNzgyYS00Y2M5LTg5YjUtZWUxYjQ4N2ZlMTE1L3Jlc291cmNlZ3JvdXBzL29uZXNkazk5Mz9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-request-id": [ + "4ed60de8-b279-44d0-a93f-c4d497fe4188" + ], + "x-ms-correlation-request-id": [ + "4ed60de8-b279-44d0-a93f-c4d497fe4188" + ], + "x-ms-routing-request-id": [ + "WESTUS:20151204T225445Z:4ed60de8-b279-44d0-a93f-c4d497fe4188" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 04 Dec 2015 22:54:44 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5OTMtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2014-04-01-preview" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5OTMtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2NhNDkwNDItNzgyYS00Y2M5LTg5YjUtZWUxYjQ4N2ZlMTE1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczVPVE10VjBWVFZGVlRJaXdpYW05aVRHOWpZWFJwYjI0aU9pSjNaWE4wZFhNaWZRP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-04-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14983" + ], + "x-ms-request-id": [ + "c51a2f47-eb36-48f1-a2d6-84505eed3005" + ], + "x-ms-correlation-request-id": [ + "c51a2f47-eb36-48f1-a2d6-84505eed3005" + ], + "x-ms-routing-request-id": [ + "WESTUS:20151204T225445Z:c51a2f47-eb36-48f1-a2d6-84505eed3005" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 04 Dec 2015 22:54:44 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5OTMtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2014-04-01-preview" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5OTMtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2NhNDkwNDItNzgyYS00Y2M5LTg5YjUtZWUxYjQ4N2ZlMTE1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczVPVE10VjBWVFZGVlRJaXdpYW05aVRHOWpZWFJwYjI0aU9pSjNaWE4wZFhNaWZRP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-04-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14982" + ], + "x-ms-request-id": [ + "0920749d-650e-4544-ab2c-28dfc9ee4cfa" + ], + "x-ms-correlation-request-id": [ + "0920749d-650e-4544-ab2c-28dfc9ee4cfa" + ], + "x-ms-routing-request-id": [ + "WESTUS:20151204T225500Z:0920749d-650e-4544-ab2c-28dfc9ee4cfa" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 04 Dec 2015 22:55:00 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5OTMtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2014-04-01-preview" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5OTMtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2NhNDkwNDItNzgyYS00Y2M5LTg5YjUtZWUxYjQ4N2ZlMTE1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczVPVE10VjBWVFZGVlRJaXdpYW05aVRHOWpZWFJwYjI0aU9pSjNaWE4wZFhNaWZRP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-04-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14981" + ], + "x-ms-request-id": [ + "f054386f-86b6-4107-b0e4-782717c3e294" + ], + "x-ms-correlation-request-id": [ + "f054386f-86b6-4107-b0e4-782717c3e294" + ], + "x-ms-routing-request-id": [ + "WESTUS:20151204T225515Z:f054386f-86b6-4107-b0e4-782717c3e294" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 04 Dec 2015 22:55:15 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5OTMtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2014-04-01-preview" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5OTMtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2NhNDkwNDItNzgyYS00Y2M5LTg5YjUtZWUxYjQ4N2ZlMTE1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczVPVE10VjBWVFZGVlRJaXdpYW05aVRHOWpZWFJwYjI0aU9pSjNaWE4wZFhNaWZRP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-04-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14980" + ], + "x-ms-request-id": [ + "c1b64d82-e3da-414e-8518-8a294e4953d2" + ], + "x-ms-correlation-request-id": [ + "c1b64d82-e3da-414e-8518-8a294e4953d2" + ], + "x-ms-routing-request-id": [ + "WESTUS:20151204T225530Z:c1b64d82-e3da-414e-8518-8a294e4953d2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 04 Dec 2015 22:55:29 GMT" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-ExpressRouteCircuitAuthorizationCRUD": [ + "onesdk993", + "onesdk3944" + ] + }, + "Variables": { + "SubscriptionId": "3ca49042-782a-4cc9-89b5-ee1b487fe115" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Network/Commands.Network.Test/packages.config b/src/ResourceManager/Network/Commands.Network.Test/packages.config index c3542cf5ba88..583084830a21 100644 --- a/src/ResourceManager/Network/Commands.Network.Test/packages.config +++ b/src/ResourceManager/Network/Commands.Network.Test/packages.config @@ -7,7 +7,7 @@ - + diff --git a/src/ResourceManager/Network/Commands.Network/Commands.Network.csproj b/src/ResourceManager/Network/Commands.Network/Commands.Network.csproj index 02edbcdc056a..a004c40ef6e5 100644 --- a/src/ResourceManager/Network/Commands.Network/Commands.Network.csproj +++ b/src/ResourceManager/Network/Commands.Network/Commands.Network.csproj @@ -77,7 +77,7 @@ ..\..\..\packages\Microsoft.Azure.Management.Authorization.2.0.0\lib\net40\Microsoft.Azure.Management.Authorization.dll - ..\..\..\packages\Microsoft.Azure.Management.Network.3.0.2-preview\lib\net45\Microsoft.Azure.Management.Network.dll + ..\..\..\packages\Microsoft.Azure.Management.Network.3.0.3-preview\lib\net45\Microsoft.Azure.Management.Network.dll True @@ -230,6 +230,11 @@ + + + + + diff --git a/src/ResourceManager/Network/Commands.Network/Common/NetworkResourceManagerProfile.cs b/src/ResourceManager/Network/Commands.Network/Common/NetworkResourceManagerProfile.cs index 7b1fcf6c5f12..949804bd38f7 100644 --- a/src/ResourceManager/Network/Commands.Network/Common/NetworkResourceManagerProfile.cs +++ b/src/ResourceManager/Network/Commands.Network/Common/NetworkResourceManagerProfile.cs @@ -195,12 +195,14 @@ protected override void Configure() Mapper.CreateMap(); Mapper.CreateMap(); Mapper.CreateMap(); + Mapper.CreateMap(); // MNM to CNM Mapper.CreateMap(); Mapper.CreateMap(); Mapper.CreateMap(); Mapper.CreateMap(); + Mapper.CreateMap(); // ExpressRouteCircuitPeering // CNM to MNM @@ -220,6 +222,14 @@ protected override void Configure() Mapper.CreateMap(); Mapper.CreateMap(); + // ExoressRouteCircuitAuthorization + // CNM to MNM + Mapper.CreateMap(); + + // MNM to CNM + Mapper.CreateMap(); + + // Gateways // CNM to MNM Mapper.CreateMap(); diff --git a/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/Authorization/AddAzureExpressRouteCircuitAuthorizationCommand.cs b/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/Authorization/AddAzureExpressRouteCircuitAuthorizationCommand.cs new file mode 100644 index 000000000000..596679befb49 --- /dev/null +++ b/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/Authorization/AddAzureExpressRouteCircuitAuthorizationCommand.cs @@ -0,0 +1,56 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using System.Management.Automation; +using Microsoft.Azure.Commands.Network.Models; + + +namespace Microsoft.Azure.Commands.Network +{ + [Cmdlet(VerbsCommon.Add, "AzureRmExpressRouteCircuitAuthorization"), OutputType(typeof(PSExpressRouteCircuit))] + public class AddAzureExpressRouteCircuitAuthorizationCommand : AzureExpressRouteCircuitAuthorizationBase + { + [Parameter( + Mandatory = true, + HelpMessage = "The name of the Authorization")] + [ValidateNotNullOrEmpty] + public override string Name { get; set; } + + [Parameter( + Mandatory = true, + ValueFromPipeline = true, + HelpMessage = "The Circuit")] + public PSExpressRouteCircuit Circuit { get; set; } + + protected override void ProcessRecord() + { + base.ProcessRecord(); + var authorization = this.Circuit.Authorizations.SingleOrDefault(resource => string.Equals(resource.Name,this.Name, System.StringComparison.CurrentCultureIgnoreCase)); + + if (authorization != null) + { + throw new ArgumentException("Authorization with the specified name already exists"); + } + + authorization = new PSExpressRouteCircuitAuthorization(); + + authorization.Name = this.Name; + this.Circuit.Authorizations.Add(authorization); + + WriteObject(this.Circuit); + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/Authorization/AzureExpressRouteCircuitAuthorizationBase.cs b/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/Authorization/AzureExpressRouteCircuitAuthorizationBase.cs new file mode 100644 index 000000000000..1cc37205ef3d --- /dev/null +++ b/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/Authorization/AzureExpressRouteCircuitAuthorizationBase.cs @@ -0,0 +1,31 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using MNM = Microsoft.Azure.Management.Network.Models; + +namespace Microsoft.Azure.Commands.Network +{ + using System.Collections.Generic; + + public class AzureExpressRouteCircuitAuthorizationBase : NetworkBaseCmdlet + { + [Parameter( + Mandatory = false, + HelpMessage = "The name of the Authorization")] + [ValidateNotNullOrEmpty] + public virtual string Name { get; set; } + + } +} \ No newline at end of file diff --git a/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/Authorization/GetAzureExpressRouteCircuitAuthorizationCommand.cs b/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/Authorization/GetAzureExpressRouteCircuitAuthorizationCommand.cs new file mode 100644 index 000000000000..5900d8a237c3 --- /dev/null +++ b/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/Authorization/GetAzureExpressRouteCircuitAuthorizationCommand.cs @@ -0,0 +1,58 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Linq; +using System.Management.Automation; +using Microsoft.Azure.Commands.Network.Models; + +namespace Microsoft.Azure.Commands.Network +{ + [Cmdlet(VerbsCommon.Get, "AzureRmExpressRouteCircuitAuthorization"), OutputType(typeof(PSExpressRouteCircuitAuthorization))] + public class GetAzureExpressRouteCircuitAuthorizationCommand : NetworkBaseCmdlet + { + [Parameter( + Mandatory = false, + HelpMessage = "The name of the Authorization")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter( + Mandatory = true, + ValueFromPipeline = true, + HelpMessage = "The Circuit")] + public PSExpressRouteCircuit Circuit { get; set; } + + protected override void ProcessRecord() + { + base.ProcessRecord(); + if (!string.IsNullOrEmpty(this.Name)) + { + var authorization = + this.Circuit.Authorizations.First( + resource => + string.Equals( + resource.Name, + this.Name, + System.StringComparison.CurrentCultureIgnoreCase)); + + WriteObject(authorization); + } + else + { + var authorizations = this.Circuit.Authorizations; + WriteObject(authorizations, true); + } + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/Authorization/NewAzureExpressRouteCircuitAuthorizationCommand.cs b/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/Authorization/NewAzureExpressRouteCircuitAuthorizationCommand.cs new file mode 100644 index 000000000000..9eeb3ebac2d2 --- /dev/null +++ b/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/Authorization/NewAzureExpressRouteCircuitAuthorizationCommand.cs @@ -0,0 +1,42 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using System.Management.Automation; +using Microsoft.Azure.Commands.Network.Models; + +namespace Microsoft.Azure.Commands.Network +{ + [Cmdlet(VerbsCommon.New, "AzureRmExpressRouteCircuitAuthorization"), OutputType(typeof(PSExpressRouteCircuitAuthorization))] + public class NewAzureExpressRouteCircuitAuthorizationCommand : AzureExpressRouteCircuitAuthorizationBase + { + [Parameter( + Mandatory = true, + HelpMessage = "The name of the Authorization")] + [ValidateNotNullOrEmpty] + public override string Name { get; set; } + + protected override void ProcessRecord() + { + base.ProcessRecord(); + + var authorization = new PSExpressRouteCircuitAuthorization(); + + authorization.Name = this.Name; + + WriteObject(authorization); + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/Authorization/RemoveAzureExpressRouteCircuitAuthorizationCommand.cs b/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/Authorization/RemoveAzureExpressRouteCircuitAuthorizationCommand.cs new file mode 100644 index 000000000000..14e128426bc7 --- /dev/null +++ b/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/Authorization/RemoveAzureExpressRouteCircuitAuthorizationCommand.cs @@ -0,0 +1,50 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Linq; +using System.Management.Automation; +using Microsoft.Azure.Commands.Network.Models; + +namespace Microsoft.Azure.Commands.Network +{ + [Cmdlet(VerbsCommon.Remove, "AzureRmExpressRouteCircuitAuthorization"), OutputType(typeof(PSExpressRouteCircuit))] + public class RemoveAzureExpressRouteCircuitAuthorizationCommand : NetworkBaseCmdlet + { + [Parameter( + Mandatory = false, + HelpMessage = "The name of the Authorization")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter( + Mandatory = true, + ValueFromPipeline = true, + HelpMessage = "The Circuit")] + public PSExpressRouteCircuit Circuit { get; set; } + + protected override void ProcessRecord() + { + base.ProcessRecord(); + + var authorization = this.Circuit.Authorizations.SingleOrDefault(resource => string.Equals(resource.Name, this.Name, System.StringComparison.CurrentCultureIgnoreCase)); + + if (authorization != null) + { + this.Circuit.Authorizations.Remove(authorization); + } + + WriteObject(this.Circuit); + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/NewAzureExpressRouteCircuitCommand.cs b/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/NewAzureExpressRouteCircuitCommand.cs index 0985876a8d54..580d3ea225f4 100644 --- a/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/NewAzureExpressRouteCircuitCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/NewAzureExpressRouteCircuitCommand.cs @@ -89,6 +89,12 @@ public class NewAzureExpressRouteCircuitCommand : ExpressRouteCircuitBaseCmdlet [ValidateNotNullOrEmpty] public List Peering { get; set; } + [Parameter( + Mandatory = false, + ValueFromPipelineByPropertyName = true)] + [ValidateNotNullOrEmpty] + public List Authorization { get; set; } + [Parameter( Mandatory = false, ValueFromPipelineByPropertyName = true, @@ -150,7 +156,9 @@ private PSExpressRouteCircuit CreateExpressRouteCircuit() circuit.Peerings = new List(); circuit.Peerings = this.Peering; - + circuit.Authorizations = new List(); + circuit.Authorizations = this.Authorization; + // Map to the sdk object var circuitModel = Mapper.Map(circuit); circuitModel.Tags = TagsConversionHelper.CreateTagDictionary(this.Tag, validate: true); 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 9d3809ad45f5..1bb3ae82eb8d 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 @@ -1016,6 +1016,10 @@ PeeringsText + + + AuthorizationsText + @@ -1133,5 +1137,43 @@ + + Microsoft.Azure.Commands.Network.Models.PSExpressRouteCircuitAuthorization + + Microsoft.Azure.Commands.Network.Models.PSExpressRouteCircuitAuthorization + + + + + + + + Name + + + + Id + + + + Etag + + + + AuthorizationKey + + + + AuthorizationUseStatus + + + + ProvisioningState + + + + + + diff --git a/src/ResourceManager/Network/Commands.Network/Models/PSExpressRouteCircuit.cs b/src/ResourceManager/Network/Commands.Network/Models/PSExpressRouteCircuit.cs index 7010e73af77d..6a0fce8d26db 100644 --- a/src/ResourceManager/Network/Commands.Network/Models/PSExpressRouteCircuit.cs +++ b/src/ResourceManager/Network/Commands.Network/Models/PSExpressRouteCircuit.cs @@ -26,6 +26,8 @@ public class PSExpressRouteCircuit : PSTopLevelResource public List Peerings { get; set; } + public List Authorizations { get; set; } + public string ServiceKey { get; set; } public string ServiceProviderNotes { get; set; } @@ -53,5 +55,11 @@ public string PeeringsText { get { return JsonConvert.SerializeObject(Peerings, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } } + + [JsonIgnore] + public string AuthorizationsText + { + get { return JsonConvert.SerializeObject(Authorizations, Formatting.Indented); } + } } } diff --git a/src/ResourceManager/Network/Commands.Network/Models/PSVirtualNetworkGatewayConnection.cs b/src/ResourceManager/Network/Commands.Network/Models/PSVirtualNetworkGatewayConnection.cs index 9192062f20bb..0e8771099fa9 100644 --- a/src/ResourceManager/Network/Commands.Network/Models/PSVirtualNetworkGatewayConnection.cs +++ b/src/ResourceManager/Network/Commands.Network/Models/PSVirtualNetworkGatewayConnection.cs @@ -18,6 +18,7 @@ namespace Microsoft.Azure.Commands.Network.Models public class PSVirtualNetworkGatewayConnection : PSTopLevelResource { + public string AuthorizationKey { get; set; } public PSVirtualNetworkGateway VirtualNetworkGateway1 { get; set; } public PSVirtualNetworkGateway VirtualNetworkGateway2 { get; set; } @@ -38,6 +39,8 @@ public class PSVirtualNetworkGatewayConnection : PSTopLevelResource public ulong IngressBytesTransferred { get; set; } + public string ProvisioningState { get; set; } + [JsonIgnore] public string VirtualNetworkGateway1Text { diff --git a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGatewayConnection/NewAzureVirtualNetworkGatewayConnectionCommand.cs b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGatewayConnection/NewAzureVirtualNetworkGatewayConnectionCommand.cs index 0a14762e2341..992ed85e08b3 100644 --- a/src/ResourceManager/Network/Commands.Network/VirtualNetworkGatewayConnection/NewAzureVirtualNetworkGatewayConnectionCommand.cs +++ b/src/ResourceManager/Network/Commands.Network/VirtualNetworkGatewayConnection/NewAzureVirtualNetworkGatewayConnectionCommand.cs @@ -49,6 +49,13 @@ public class NewAzureVirtualNetworkGatewayConnectionCommand : VirtualNetworkGate [ValidateNotNullOrEmpty] public string Location { get; set; } + [Parameter( + Mandatory = false, + ValueFromPipelineByPropertyName = true, + HelpMessage = "AuthorizationKey.")] + [ValidateNotNullOrEmpty] + public string AuthorizationKey { get; set; } + [Parameter( Mandatory = true, ValueFromPipelineByPropertyName = true, @@ -152,6 +159,11 @@ private PSVirtualNetworkGatewayConnection CreateVirtualNetworkGatewayConnection( vnetGatewayConnection.ConnectionType = this.ConnectionType; vnetGatewayConnection.RoutingWeight = this.RoutingWeight; vnetGatewayConnection.SharedKey = this.SharedKey; + if (!string.IsNullOrEmpty(this.AuthorizationKey)) + { + vnetGatewayConnection.AuthorizationKey = this.AuthorizationKey; + } + if (string.Equals(ParameterSetName, Microsoft.Azure.Commands.Network.Properties.Resources.SetByResource)) { diff --git a/src/ResourceManager/Network/Commands.Network/packages.config b/src/ResourceManager/Network/Commands.Network/packages.config index d6af9946278f..dc990e2c0e8a 100644 --- a/src/ResourceManager/Network/Commands.Network/packages.config +++ b/src/ResourceManager/Network/Commands.Network/packages.config @@ -9,7 +9,7 @@ - + diff --git a/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/Commands.ExpressRoute.csproj b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/Commands.ExpressRoute.csproj index 00e192ba5fc0..30dabfe8c164 100644 --- a/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/Commands.ExpressRoute.csproj +++ b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/Commands.ExpressRoute.csproj @@ -91,7 +91,7 @@ ..\..\..\packages\Microsoft.WindowsAzure.Management.4.1.1\lib\net40\Microsoft.WindowsAzure.Management.dll - ..\..\..\packages\Microsoft.WindowsAzure.Management.ExpressRoute.0.18.4-preview\lib\net40\Microsoft.WindowsAzure.Management.ExpressRoute.dll + ..\..\..\packages\Microsoft.WindowsAzure.Management.ExpressRoute.0.18.12-preview\lib\net40\Microsoft.WindowsAzure.Management.ExpressRoute.dll True @@ -144,6 +144,10 @@ + + + + diff --git a/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/DedicatedCircuitStats/GetAzureDedicatedCircuitPeeringArpInfo.cs b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/DedicatedCircuitStats/GetAzureDedicatedCircuitPeeringArpInfo.cs new file mode 100644 index 000000000000..afcd780665e3 --- /dev/null +++ b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/DedicatedCircuitStats/GetAzureDedicatedCircuitPeeringArpInfo.cs @@ -0,0 +1,45 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.WindowsAzure.Management.ExpressRoute.Models; +using System; + +namespace Microsoft.WindowsAzure.Commands.ExpressRoute +{ + [Cmdlet(VerbsCommon.Get, "AzureDedicatedCircuitPeeringArpInfo"), OutputType(typeof(string), typeof(IEnumerable))] + public class GetAzureDedicatedCircuitPeeringArpInfoCommand : ExpressRouteBaseCmdlet + { + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "Service Key representing the Dedicated Circuit")] + public Guid ServiceKey { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "Bgp Peering Access Type: Public or Private or Microsoft")] + public BgpPeeringAccessType AccessType { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "Device Path: Primary or Secondary")] + public DevicePath BgpPeeringDevicePath { get; set; } + + public override void ExecuteCmdlet() + { + var arpInfo = ExpressRouteClient.GetAzureDedicatedCircuitPeeringArpInfo(ServiceKey, AccessType, BgpPeeringDevicePath); + Console.WriteLine(arpInfo); + WriteObject(arpInfo); + } + } +} diff --git a/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/DedicatedCircuitStats/GetAzureDedicatedCircuitPeeringRouteTableInfo.cs b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/DedicatedCircuitStats/GetAzureDedicatedCircuitPeeringRouteTableInfo.cs new file mode 100644 index 000000000000..75b9ef9ec422 --- /dev/null +++ b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/DedicatedCircuitStats/GetAzureDedicatedCircuitPeeringRouteTableInfo.cs @@ -0,0 +1,45 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.WindowsAzure.Management.ExpressRoute.Models; +using System; + +namespace Microsoft.WindowsAzure.Commands.ExpressRoute +{ + [Cmdlet(VerbsCommon.Get, "AzureDedicatedCircuitPeeringRouteTableInfo"), OutputType(typeof(AzureDedicatedCircuitPeeringRouteTableInfo), typeof(IEnumerable))] + public class GetAzureDedicatedCircuitPeeringRouteTableInfoCommand : ExpressRouteBaseCmdlet + { + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "Service Key representing the Dedicated Circuit")] + public Guid ServiceKey { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "Bgp Peering Access Type: Public or Private or Microsoft")] + public BgpPeeringAccessType AccessType { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "Device Path: Primary or Secondary")] + public DevicePath BgpPeeringDevicePath { get; set; } + + public override void ExecuteCmdlet() + { + var arpInfo = ExpressRouteClient.GetAzureDedicatedCircuitPeeringRouteTableInfo(ServiceKey, AccessType, BgpPeeringDevicePath); + WriteObject(arpInfo); + } + } + +} diff --git a/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/DedicatedCircuitStats/GetAzureDedicatedCircuitPeeringRouteTableSummary.cs b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/DedicatedCircuitStats/GetAzureDedicatedCircuitPeeringRouteTableSummary.cs new file mode 100644 index 000000000000..82b0c08ad20a --- /dev/null +++ b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/DedicatedCircuitStats/GetAzureDedicatedCircuitPeeringRouteTableSummary.cs @@ -0,0 +1,44 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.WindowsAzure.Management.ExpressRoute.Models; +using System; + +namespace Microsoft.WindowsAzure.Commands.ExpressRoute +{ + [Cmdlet(VerbsCommon.Get, "AzureDedicatedCircuitPeeringRouteTableSummary"), OutputType(typeof(AzureDedicatedCircuitPeeringRouteTableSummary), typeof(IEnumerable))] + public class GetAzureDedicatedCircuitPeeringRouteTableSummaryCommand : ExpressRouteBaseCmdlet + { + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "Service Key representing the Dedicated Circuit")] + public Guid ServiceKey { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "Bgp Peering Access Type: Public or Private or Microsoft")] + public BgpPeeringAccessType AccessType { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "Device Path: Primary or Secondary")] + public DevicePath BgpPeeringDevicePath { get; set; } + + public override void ExecuteCmdlet() + { + var arpInfo = ExpressRouteClient.GetAzureDedicatedCircuitPeeringRouteTableSummary(ServiceKey, AccessType, BgpPeeringDevicePath); + WriteObject(arpInfo); + } + } +} diff --git a/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/DedicatedCircuitStats/GetAzureDedicatedCircuitStats.cs b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/DedicatedCircuitStats/GetAzureDedicatedCircuitStats.cs new file mode 100644 index 000000000000..aabe5e4a78e6 --- /dev/null +++ b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/DedicatedCircuitStats/GetAzureDedicatedCircuitStats.cs @@ -0,0 +1,83 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System.ComponentModel; +using System.Management.Automation; +using Microsoft.WindowsAzure.Management.ExpressRoute.Models; +using System; +using System.Collections.Generic; + +namespace Microsoft.WindowsAzure.Commands.ExpressRoute +{ + [Cmdlet(VerbsCommon.Get, "AzureDedicatedCircuitStats"), OutputType(typeof(AzureDedicatedCircuitPeeringStats), typeof(IEnumerable))] + public class GetAzureDedicatedCircuitPeeringStatsCommand : ExpressRouteBaseCmdlet + { + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "Service Key representing the Dedicated Circuit")] + public Guid ServiceKey { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "Bgp Peering Access Type: Public or Private or Microsoft")] + public string AccessType { get; set; } + + + public override void ExecuteCmdlet() + { + if(string.IsNullOrEmpty(AccessType)) + { + AzureDedicatedCircuitStats stats = new AzureDedicatedCircuitStats + { + PrimaryBytesIn = (ulong)0, + PrimaryBytesOut = (ulong)0, + SecondaryBytesIn = (ulong)0, + SecondaryBytesOut = (ulong)0 + }; + AzureBgpPeering peering= ExpressRouteClient.GetAzureBGPPeering(ServiceKey, BgpPeeringAccessType.Private); + if (peering != null) + { + stats = compute(stats, ServiceKey, BgpPeeringAccessType.Private); + } + peering = ExpressRouteClient.GetAzureBGPPeering(ServiceKey, BgpPeeringAccessType.Public); + if (peering != null) + { + stats = compute(stats, ServiceKey, BgpPeeringAccessType.Public); + } + peering = ExpressRouteClient.GetAzureBGPPeering(ServiceKey, BgpPeeringAccessType.Microsoft); + if (peering != null) + { + stats = compute(stats, ServiceKey, BgpPeeringAccessType.Microsoft); + } + WriteObject(stats); + + } + BgpPeeringAccessType type; + if (BgpPeeringAccessType.TryParse(AccessType, out type)) + { + var stats = ExpressRouteClient.GetAzureDedicatedCircuitStatsInfo(ServiceKey, type); + WriteObject(stats); + } + } + + private AzureDedicatedCircuitStats compute(AzureDedicatedCircuitStats stats, Guid key, BgpPeeringAccessType type) + { + var tempstats = ExpressRouteClient.GetAzureDedicatedCircuitStatsInfo(key,type); + stats.PrimaryBytesIn += tempstats.PrimaryBytesIn; + stats.PrimaryBytesOut += tempstats.PrimaryBytesOut; + stats.SecondaryBytesIn += tempstats.SecondaryBytesIn; + stats.SecondaryBytesOut += tempstats.SecondaryBytesOut; + return stats; + } + } +} diff --git a/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/ExpressRouteClient.cs b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/ExpressRouteClient.cs index 343b021c134c..be1b0b00903d 100644 --- a/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/ExpressRouteClient.cs +++ b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/ExpressRouteClient.cs @@ -55,6 +55,25 @@ public ExpressRouteClient(ExpressRouteManagementClient client) Client = client; } + public string GetAzureDedicatedCircuitPeeringArpInfo(Guid serviceKey, BgpPeeringAccessType accessType, DevicePath devicePath) + { + return Client.DedicatedCircuitPeeringArpInfo.Get(serviceKey.ToString(), accessType, devicePath).Data.ToString(); + } + + public string GetAzureDedicatedCircuitPeeringRouteTableInfo(Guid serviceKey, BgpPeeringAccessType accessType, DevicePath devicePath) + { + return Client.DedicatedCircuitPeeringRouteTableInfo.Get(serviceKey.ToString(), accessType, devicePath).Data.ToString(); + } + + public string GetAzureDedicatedCircuitPeeringRouteTableSummary(Guid serviceKey, BgpPeeringAccessType accessType, DevicePath devicePath) + { + return Client.DedicatedCircuitPeeringRouteTableSummary.Get(serviceKey.ToString(), accessType, devicePath).Data.ToString(); + } + + public AzureDedicatedCircuitStats GetAzureDedicatedCircuitStatsInfo(Guid serviceKey, BgpPeeringAccessType accessType) + { + return Client.DedicatedCircuitStats.Get(serviceKey.ToString(), accessType).DedicatedCircuitStats; + } public AzureBgpPeering GetAzureBGPPeering(Guid serviceKey, BgpPeeringAccessType accessType) { return Client.BorderGatewayProtocolPeerings.Get(serviceKey.ToString(), accessType).BgpPeering; diff --git a/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/packages.config b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/packages.config index 26b62ce52e2d..8dc79046e9e0 100644 --- a/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/packages.config +++ b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/packages.config @@ -13,6 +13,6 @@ - + \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/Commands.Test.csproj b/src/ServiceManagement/Services/Commands.Test/Commands.Test.csproj index b036b1d47e62..dd16e8533ca1 100644 --- a/src/ServiceManagement/Services/Commands.Test/Commands.Test.csproj +++ b/src/ServiceManagement/Services/Commands.Test/Commands.Test.csproj @@ -135,7 +135,7 @@ ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.3.1\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll - ..\..\..\packages\Microsoft.WindowsAzure.Management.ExpressRoute.0.18.4-preview\lib\net40\Microsoft.WindowsAzure.Management.ExpressRoute.dll + ..\..\..\packages\Microsoft.WindowsAzure.Management.ExpressRoute.0.18.12-preview\lib\net40\Microsoft.WindowsAzure.Management.ExpressRoute.dll True diff --git a/src/ServiceManagement/Services/Commands.Test/packages.config b/src/ServiceManagement/Services/Commands.Test/packages.config index d130b9169dd7..b799440dcbd3 100644 --- a/src/ServiceManagement/Services/Commands.Test/packages.config +++ b/src/ServiceManagement/Services/Commands.Test/packages.config @@ -21,7 +21,7 @@ - +