Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
6e23e89
Merge branch 'master' of https://github.com/Azure/azure-sdk-for-net
dihan0604 Nov 9, 2015
d7d9037
Merge branch 'master' of https://github.com/Azure/azure-sdk-for-net
dihan0604 Nov 11, 2015
c06cec6
Merge branch 'master' of https://github.com/Azure/azure-sdk-for-net
dihan0604 Nov 18, 2015
3164b32
Merge branch 'master' of https://github.com/Azure/azure-sdk-for-net
dihan0604 Nov 19, 2015
9d9d5ff
Merge branch 'master' of https://github.com/Azure/azure-sdk-for-net
dihan0604 Nov 23, 2015
bc8f649
PS for stats API
dihan0604 Nov 23, 2015
b5cbf85
Update version
dihan0604 Nov 23, 2015
79ef107
Revert "PS for stats API"
dihan0604 Nov 23, 2015
9c198a6
PS for Stats API
dihan0604 Nov 24, 2015
ebbf3cb
Merge branch 'master' of https://github.com/Azure/azure-sdk-for-net
dihan0604 Nov 30, 2015
a54d6a3
Add missing files
dihan0604 Nov 30, 2015
09f3cef
Update parameter name to device path and upgrade version
dihan0604 Nov 30, 2015
2b48bb6
Merge branch 'master' of https://github.com/Azure/azure-sdk-for-net
dihan0604 Dec 2, 2015
aa7542c
Rename stats API
dihan0604 Dec 2, 2015
54c4c17
Add test
dihan0604 Dec 2, 2015
0d1a3fc
Add test record for stats API
dihan0604 Dec 3, 2015
4dcd5db
minor fix
dihan0604 Dec 3, 2015
034e1f4
update version
dihan0604 Dec 3, 2015
f59718f
add missing file
dihan0604 Dec 3, 2015
fcd2660
update version
dihan0604 Dec 3, 2015
2525e1f
Add list call for stats API
dihan0604 Dec 3, 2015
2b5ad89
test
dihan0604 Dec 3, 2015
2f41c90
add missing file
dihan0604 Dec 3, 2015
da9a38b
test
dihan0604 Dec 3, 2015
9200722
Update Stats API
dihan0604 Dec 3, 2015
99055e3
Revert Network dll version since nothing changed
dihan0604 Dec 3, 2015
94f28f3
Update doc
dihan0604 Dec 3, 2015
9d224dd
Merge branch 'master' of https://github.com/Azure/azure-sdk-for-net
dihan0604 Dec 3, 2015
4d9d030
Merge branch 'master' of https://github.com/Azure/azure-sdk-for-net
dihan0604 Dec 4, 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
@@ -0,0 +1,54 @@
namespace Microsoft.WindowsAzure.Management.ExpressRoute.Testing
{
using System;
using System.Linq;
using System.Net;
using Azure.Management.ExpressRoute.Testing;
using Azure.Test;
using ExpressRoute;
using ExpressRoute.Models;
using Hyak.Common;
using Management;
using Xunit;

public class DedicatedCircuitPeeringStatsOperationTests : ExpressRouteTestBase
{
[Fact(Skip = "TODO: we have a prod bug which will cause this fail, will re-record after fix that")]
public void CanNotGetPeeringStatsIfPeeringNotExist()
{
using (var undoContext = UndoContext.Current)
{
undoContext.Start();
var expressRouteClient = GetCustomerExpressRouteManagementClient();
var provider = expressRouteClient.DedicatedCircuitServiceProviders.List().Single(p => p.Name.Equals(GetProviderName(), StringComparison.CurrentCultureIgnoreCase));
var location = provider.DedicatedCircuitLocations.Split(',').First();
var bandwidth = provider.DedicatedCircuitBandwidths.First().Bandwidth;
var circuitName = TestUtilities.GenerateName("circuit");
var newCircuitParams = new DedicatedCircuitNewParameters()
{
Bandwidth = bandwidth,
CircuitName = circuitName,
Location = location,
ServiceProviderName = provider.Name
};
var newResponse = expressRouteClient.DedicatedCircuits.New(newCircuitParams);
TestUtilities.ValidateOperationResponse(newResponse);
Guid serviceKey;
Assert.True(Guid.TryParse(newResponse.Data, out serviceKey));

DedicatedCircuitStatsGetResponse response;
string expectedException = "Can not find any subinterface for peering type 'Private' for circuit '" + serviceKey + "'";
var exception = Assert.Throws<CloudException>(() => response = expressRouteClient.DedicatedCircuitStats.Get(serviceKey.ToString(), BgpPeeringAccessType.Private));
Assert.True(exception.Error.Message.Contains(expectedException));

ExpressRouteOperationStatusResponse statusResponse;
exception = Assert.Throws<CloudException>(() => statusResponse = expressRouteClient.DedicatedCircuitPeeringArpInfo.Get(serviceKey.ToString(), BgpPeeringAccessType.Private, DevicePath.Primary));
exception = Assert.Throws<CloudException>(() => statusResponse = expressRouteClient.DedicatedCircuitPeeringRouteTableInfo.Get(serviceKey.ToString(), BgpPeeringAccessType.Private, DevicePath.Primary));
exception = Assert.Throws<CloudException>(() => statusResponse = expressRouteClient.DedicatedCircuitPeeringRouteTableSummary.Get(serviceKey.ToString(), BgpPeeringAccessType.Private, DevicePath.Primary));



}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,16 @@
<Compile Include="BgpPeeringOperationTests.cs" />
<Compile Include="CrossConnectionOperationTests.cs" />
<Compile Include="DedicatedCircuitOperationTests.cs" />
<Compile Include="DedicatedCircuitPeeringStatsOperationTests.cs" />
<Compile Include="ExpressRouteTestBase.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="TestUtilities\ExpressRouteManagementClientUndoHandlers.cs" />
<Compile Include="TestUtilities\UndoContextDiscoveryExtensions.cs" />
</ItemGroup>
<ItemGroup>
<None Include="SessionRecords\Microsoft.WindowsAzure.Management.ExpressRoute.Testing.DedicatedCircuitPeeringStatsOperationTests\CanNotGetPeeringStatsIfPeeringNotExist.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.WindowsAzure.Management.ExpressRoute.Testing.BgpPeeringTests\CanCreateGetUpdateAndRemovePrivateAndPublicPeerings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"Entries": [
{
"RequestUri": "/6418ec2a-e390-424d-a490-1fee167c5a7a/services/networking/dedicatedcircuits/serviceproviders?api-version=1.0",
"EncodedRequestUri": "LzY0MThlYzJhLWUzOTAtNDI0ZC1hNDkwLTFmZWUxNjdjNWE3YS9zZXJ2aWNlcy9uZXR3b3JraW5nL2RlZGljYXRlZGNpcmN1aXRzL3NlcnZpY2Vwcm92aWRlcnM/YXBpLXZlcnNpb249MS4w",
"RequestMethod": "GET",
"RequestBody": "",
"RequestHeaders": {
"x-ms-version": [
"2011-10-01"
],
"User-Agent": [
"Microsoft.WindowsAzure.Management.ExpressRoute.ExpressRouteManagementClient/0.9.0.0"
]
},
"ResponseBody": "<DedicatedCircuitServiceProviders xmlns=\"http://schemas.microsoft.com/windowsazure\" xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\">\r\n <DedicatedCircuitServiceProvider>\r\n <DedicatedCircuitBandwidths>\r\n <DedicatedCircuitBandwidth>\r\n <Bandwidth>200</Bandwidth>\r\n <Label>200Mbps</Label>\r\n </DedicatedCircuitBandwidth>\r\n <DedicatedCircuitBandwidth>\r\n <Bandwidth>500</Bandwidth>\r\n <Label>500Mbps</Label>\r\n </DedicatedCircuitBandwidth>\r\n <DedicatedCircuitBandwidth>\r\n <Bandwidth>1000</Bandwidth>\r\n <Label>1Gbps</Label>\r\n </DedicatedCircuitBandwidth>\r\n <DedicatedCircuitBandwidth>\r\n <Bandwidth>10000</Bandwidth>\r\n <Label>10Gbps</Label>\r\n </DedicatedCircuitBandwidth>\r\n </DedicatedCircuitBandwidths>\r\n <DedicatedCircuitLocations>Boydton 1 DC</DedicatedCircuitLocations>\r\n <Encapsulation>None</Encapsulation>\r\n <Name>BVTAzureIXP01</Name>\r\n <Type>IXP</Type>\r\n </DedicatedCircuitServiceProvider>\r\n <DedicatedCircuitServiceProvider>\r\n <DedicatedCircuitBandwidths>\r\n <DedicatedCircuitBandwidth>\r\n <Bandwidth>1</Bandwidth>\r\n <Label>1Mbps</Label>\r\n </DedicatedCircuitBandwidth>\r\n <DedicatedCircuitBandwidth>\r\n <Bandwidth>50</Bandwidth>\r\n <Label>50Mbps</Label>\r\n </DedicatedCircuitBandwidth>\r\n <DedicatedCircuitBandwidth>\r\n <Bandwidth>100</Bandwidth>\r\n <Label>100Mbps</Label>\r\n </DedicatedCircuitBandwidth>\r\n <DedicatedCircuitBandwidth>\r\n <Bandwidth>500</Bandwidth>\r\n <Label>500Mbps</Label>\r\n </DedicatedCircuitBandwidth>\r\n <DedicatedCircuitBandwidth>\r\n <Bandwidth>1000</Bandwidth>\r\n <Label>1Gbps</Label>\r\n </DedicatedCircuitBandwidth>\r\n </DedicatedCircuitBandwidths>\r\n <DedicatedCircuitLocations>Boydton 1 DC,Des Moines 2 DC,USWest</DedicatedCircuitLocations>\r\n <Encapsulation>None</Encapsulation>\r\n <Name>BVTAzureTelco01</Name>\r\n <Type>Telco</Type>\r\n </DedicatedCircuitServiceProvider>\r\n <DedicatedCircuitServiceProvider>\r\n <DedicatedCircuitBandwidths>\r\n <DedicatedCircuitBandwidth>\r\n <Bandwidth>200</Bandwidth>\r\n <Label>200Mbps</Label>\r\n </DedicatedCircuitBandwidth>\r\n <DedicatedCircuitBandwidth>\r\n <Bandwidth>500</Bandwidth>\r\n <Label>500Mbps</Label>\r\n </DedicatedCircuitBandwidth>\r\n <DedicatedCircuitBandwidth>\r\n <Bandwidth>1000</Bandwidth>\r\n <Label>1Gbps</Label>\r\n </DedicatedCircuitBandwidth>\r\n <DedicatedCircuitBandwidth>\r\n <Bandwidth>10000</Bandwidth>\r\n <Label>10Gbps</Label>\r\n </DedicatedCircuitBandwidth>\r\n </DedicatedCircuitBandwidths>\r\n <DedicatedCircuitLocations>Boydton 1 DC,Des Moines 2 DC,USWest</DedicatedCircuitLocations>\r\n <Encapsulation>None</Encapsulation>\r\n <Name>BVTCustomerIXP01</Name>\r\n <Type>IXP</Type>\r\n </DedicatedCircuitServiceProvider>\r\n <DedicatedCircuitServiceProvider>\r\n <DedicatedCircuitBandwidths>\r\n <DedicatedCircuitBandwidth>\r\n <Bandwidth>1</Bandwidth>\r\n <Label>1Mbps</Label>\r\n </DedicatedCircuitBandwidth>\r\n <DedicatedCircuitBandwidth>\r\n <Bandwidth>50</Bandwidth>\r\n <Label>50Mbps</Label>\r\n </DedicatedCircuitBandwidth>\r\n <DedicatedCircuitBandwidth>\r\n <Bandwidth>100</Bandwidth>\r\n <Label>100Mbps</Label>\r\n </DedicatedCircuitBandwidth>\r\n <DedicatedCircuitBandwidth>\r\n <Bandwidth>500</Bandwidth>\r\n <Label>500Mbps</Label>\r\n </DedicatedCircuitBandwidth>\r\n <DedicatedCircuitBandwidth>\r\n <Bandwidth>1000</Bandwidth>\r\n <Label>1Gbps</Label>\r\n </DedicatedCircuitBandwidth>\r\n </DedicatedCircuitBandwidths>\r\n <DedicatedCircuitLocations>Boydton 1 DC,Des Moines 2 DC,USWest</DedicatedCircuitLocations>\r\n <Encapsulation>None</Encapsulation>\r\n <Name>BVTCustomerTelco01</Name>\r\n <Type>Telco</Type>\r\n </DedicatedCircuitServiceProvider>\r\n <DedicatedCircuitServiceProvider>\r\n <DedicatedCircuitBandwidths>\r\n <DedicatedCircuitBandwidth>\r\n <Bandwidth>200</Bandwidth>\r\n <Label>BVTTestServiceProvider1-label-1</Label>\r\n </DedicatedCircuitBandwidth>\r\n <DedicatedCircuitBandwidth>\r\n <Bandwidth>10</Bandwidth>\r\n <Label>BVTTestServiceProvider1-label-10</Label>\r\n </DedicatedCircuitBandwidth>\r\n </DedicatedCircuitBandwidths>\r\n <DedicatedCircuitLocations>Location1,Location2</DedicatedCircuitLocations>\r\n <Encapsulation>None</Encapsulation>\r\n <Name>BVTTestServiceProvider1</Name>\r\n <Type>Telco</Type>\r\n </DedicatedCircuitServiceProvider>\r\n <DedicatedCircuitServiceProvider>\r\n <DedicatedCircuitBandwidths>\r\n <DedicatedCircuitBandwidth>\r\n <Bandwidth>200</Bandwidth>\r\n <Label>BVTTestServiceProvider2-label-1</Label>\r\n </DedicatedCircuitBandwidth>\r\n <DedicatedCircuitBandwidth>\r\n <Bandwidth>10</Bandwidth>\r\n <Label>BVTTestServiceProvider2-label-10</Label>\r\n </DedicatedCircuitBandwidth>\r\n </DedicatedCircuitBandwidths>\r\n <DedicatedCircuitLocations>Location1,Location2</DedicatedCircuitLocations>\r\n <Encapsulation>None</Encapsulation>\r\n <Name>BVTTestServiceProvider2</Name>\r\n <Type>IXP</Type>\r\n </DedicatedCircuitServiceProvider>\r\n <DedicatedCircuitServiceProvider>\r\n <DedicatedCircuitBandwidths>\r\n <DedicatedCircuitBandwidth>\r\n <Bandwidth>128</Bandwidth>\r\n <Label>256</Label>\r\n </DedicatedCircuitBandwidth>\r\n </DedicatedCircuitBandwidths>\r\n <DedicatedCircuitLocations>\"Columbia1 DC\"</DedicatedCircuitLocations>\r\n <Encapsulation>None</Encapsulation>\r\n <Name>MSIT</Name>\r\n <Type>Telco</Type>\r\n </DedicatedCircuitServiceProvider>\r\n</DedicatedCircuitServiceProviders>",
"ResponseHeaders": {
"Content-Length": [
"4608"
],
"Content-Type": [
"application/xml; charset=utf-8"
],
"x-ms-request-id": [
"30d3dd1cd859792db52884b09969eae3"
],
"Cache-Control": [
"no-cache"
],
"Date": [
"Thu, 03 Dec 2015 20:17:41 GMT"
],
"Server": [
"1.0.6198.280",
"(rd_rdfe_stable.151023-1048)",
"Microsoft-HTTPAPI/2.0"
]
},
"StatusCode": 200
}
],
"Names": {
"CanNotGetPeeringStatsIfPeeringNotExist": [
"circuit5612"
]
},
"Variables": {
"SubscriptionId": "6418ec2a-e390-424d-a490-1fee167c5a7a",
"TEST_PROVIDER_NAME": "BVTAzureIXP01"
}
}
Loading