Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
b796518
#5038091 Add AuthorizationKey parameter in virtualnetworkgatewayconne…
dihan0604 Nov 4, 2015
c7ddff5
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
dihan0604 Nov 9, 2015
ffc29c3
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
dihan0604 Nov 11, 2015
151e3aa
#4321482 PS for ER Authorization
dihan0604 Nov 12, 2015
e989b39
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
dihan0604 Nov 12, 2015
37ea2cc
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
dihan0604 Nov 17, 2015
2c01a81
fix typo
dihan0604 Nov 17, 2015
903de67
Add testing for authorization APIs
dihan0604 Nov 25, 2015
33164a5
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
dihan0604 Nov 29, 2015
252c72f
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
dihan0604 Nov 29, 2015
74ead18
Add recorded tests
dihan0604 Nov 30, 2015
65e4504
Merge branch 'dev' of https://github.com/dihan0604/azure-powershell i…
dihan0604 Nov 30, 2015
a736a0c
upgrade network version in test
dihan0604 Nov 30, 2015
0e862f5
Re-record test
dihan0604 Nov 30, 2015
3e4c31c
Update test record
dihan0604 Nov 30, 2015
e03e23b
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
dihan0604 Dec 2, 2015
fe652ea
ER stats API PS for RDFE
dihan0604 Dec 2, 2015
3637d82
update APIs and Versions
dihan0604 Dec 4, 2015
44502c9
fix merge conflict
dihan0604 Dec 4, 2015
4866cf1
update pacakge
dihan0604 Dec 4, 2015
524ab10
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
dihan0604 Dec 4, 2015
041c21b
Update Auth test
dihan0604 Dec 4, 2015
2e5a292
Add extra parameter in connection API
dihan0604 Dec 5, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Authorization.2.0.0\lib\net40\Microsoft.Azure.Management.Authorization.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.Management.Network">
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Network.3.0.2-preview\lib\net45\Microsoft.Azure.Management.Network.dll</HintPath>
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Network.3.0.3-preview\lib\net45\Microsoft.Azure.Management.Network.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Azure.ResourceManager">
Expand Down Expand Up @@ -219,6 +219,9 @@
<None Include="SessionRecords\Commands.Network.Test.ScenarioTests.ApplicationGatewayTests\TestApplicationGatewayCRUD.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Commands.Network.Test.ScenarioTests.ExpressRouteCircuitTests\TestExpressRouteCircuitAuthorizationCRUD.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Commands.Network.Test.ScenarioTests.ExpressRouteCircuitTests\TestExpressRouteCircuitCRUD.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -191,4 +191,74 @@ function Test-ExpressRouteCircuitPeeringCRUD
# Cleanup
Clean-ResourceGroup $rgname
}
}
}

<#
.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
}
}

Loading