Skip to content

Updating Package version for ExpressRoute Commandlets #1538

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jan 7, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 @@ -90,8 +90,8 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.4.1.1\lib\net40\Microsoft.WindowsAzure.Management.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Management.ExpressRoute, Version=0.9.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.ExpressRoute.0.18.12-preview\lib\net40\Microsoft.WindowsAzure.Management.ExpressRoute.dll</HintPath>
<Reference Include="Microsoft.WindowsAzure.Management.ExpressRoute">
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.ExpressRoute.0.18.14-preview\lib\net40\Microsoft.WindowsAzure.Management.ExpressRoute.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public class NewAzureDedicatedCircuitCommand : ExpressRouteBaseCmdlet

[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Circuit Billing Type")]
[ValidateSet("MeteredData", "UnlimitedData", IgnoreCase = true)]
public BillingType billingType { get; set; }
public BillingType BillingType { get; set; }


[Parameter(HelpMessage = "Do not confirm Azure Dedicated Circuit creation")]
Expand All @@ -59,7 +59,7 @@ public override void ExecuteCmdlet()
() =>
{
var circuit = ExpressRouteClient.NewAzureDedicatedCircuit(CircuitName, Bandwidth, Location,
ServiceProviderName, Sku, billingType);
ServiceProviderName, Sku, BillingType);
WriteVerboseWithTimestamp(Resources.NewAzureDedicatedCircuitSucceeded);
WriteObject(circuit);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,11 @@ public AzureDedicatedCircuit NewAzureDedicatedCircuit(string circuitName,
var result = Client.DedicatedCircuits.New(new DedicatedCircuitNewParameters()
{
Bandwidth = bandwidth,
BillingType = billingType,
CircuitName = circuitName,
Location = location,
ServiceProviderName = serviceProviderName,
Sku = sku,
BillingType = billingType
});

if (result.HttpStatusCode.Equals(HttpStatusCode.OK))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
<package id="Microsoft.Rest.ClientRuntime" version="1.8.2" targetFramework="net45" />
<package id="Microsoft.Rest.ClientRuntime.Azure.Authentication" version="0.11.0" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management" version="4.1.1" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.ExpressRoute" version="0.18.12-preview" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.ExpressRoute" version="0.18.14-preview" targetFramework="net45" />
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net45" />
</packages>
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.3.1\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Management.ExpressRoute, Version=0.9.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.ExpressRoute.0.18.12-preview\lib\net40\Microsoft.WindowsAzure.Management.ExpressRoute.dll</HintPath>
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.ExpressRoute.0.18.14-preview\lib\net40\Microsoft.WindowsAzure.Management.ExpressRoute.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Management.MediaServices">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public void NewAzureDedicatedCircuitSuccessful()
string serviceProviderName = "TestProvider";
string location = "us-west";
string serviceKey = "aa28cd19-b10a-41ff-981b-53c6bbf15ead";
BillingType billingType = BillingType.UnlimitedData;

MockCommandRuntime mockCommandRuntime = new MockCommandRuntime();
Mock<ExpressRouteManagementClient> client = InitExpressRouteManagementClient();
Expand All @@ -68,6 +69,7 @@ public void NewAzureDedicatedCircuitSuccessful()
{
CircuitName = circuitName,
Bandwidth = bandwidth,
BillingType = billingType.ToString(),
Location = location,
ServiceProviderName = serviceProviderName,
ServiceKey = serviceKey,
Expand Down Expand Up @@ -97,6 +99,7 @@ public void NewAzureDedicatedCircuitSuccessful()
{
CircuitName = circuitName,
Bandwidth = bandwidth,
BillingType = billingType,
Location = location,
ServiceProviderName = serviceProviderName,
CommandRuntime = mockCommandRuntime,
Expand All @@ -108,6 +111,7 @@ public void NewAzureDedicatedCircuitSuccessful()
// Assert
AzureDedicatedCircuit actual = mockCommandRuntime.OutputPipeline[0] as AzureDedicatedCircuit;
Assert.Equal<string>(expected.DedicatedCircuit.CircuitName, actual.CircuitName);
Assert.Equal<string>(expected.DedicatedCircuit.BillingType, actual.BillingType);
Assert.Equal<uint>(expected.DedicatedCircuit.Bandwidth, actual.Bandwidth);
Assert.Equal<string>(expected.DedicatedCircuit.Location, actual.Location);
Assert.Equal<string>(expected.DedicatedCircuit.ServiceProviderName, actual.ServiceProviderName);
Expand All @@ -127,6 +131,7 @@ public void GetAzureDedicatedCircuitSuccessful()
string serviceProviderName = "TestProvider";
string location = "us-west";
string serviceKey = "aa28cd19-b10a-41ff-981b-53c6bbf15ead";
BillingType billingType = BillingType.MeteredData;

MockCommandRuntime mockCommandRuntime = new MockCommandRuntime();
Mock<ExpressRouteManagementClient> client = InitExpressRouteManagementClient();
Expand All @@ -139,6 +144,7 @@ public void GetAzureDedicatedCircuitSuccessful()
{
CircuitName = circuitName,
Bandwidth = bandwidth,
BillingType = billingType.ToString(),
Location = location,
ServiceProviderName = serviceProviderName,
ServiceKey = serviceKey,
Expand All @@ -165,6 +171,7 @@ public void GetAzureDedicatedCircuitSuccessful()

// Assert
AzureDedicatedCircuit actual = mockCommandRuntime.OutputPipeline[0] as AzureDedicatedCircuit;
Assert.Equal<string>(expected.DedicatedCircuit.BillingType, actual.BillingType);
Assert.Equal<string>(expected.DedicatedCircuit.CircuitName, actual.CircuitName);
Assert.Equal<uint>(expected.DedicatedCircuit.Bandwidth, actual.Bandwidth);
Assert.Equal<string>(expected.DedicatedCircuit.Location, actual.Location);
Expand Down Expand Up @@ -219,20 +226,22 @@ public void ListAzureDedicatedCircuitSuccessful()
string serviceProviderName1 = "TestProvider";
string location1 = "us-west";
string serviceKey1 = "aa28cd19-b10a-41ff-981b-53c6bbf15ead";
BillingType billingType1 = BillingType.MeteredData;

string circuitName2 = "TestCircuit2";
uint bandwidth2 = 10;
string serviceProviderName2 = "TestProvider";
string location2 = "us-north";
string serviceKey2 = "bc28cd19-b10a-41ff-981b-53c6bbf15ead";
BillingType billingType2 = BillingType.UnlimitedData;

MockCommandRuntime mockCommandRuntime = new MockCommandRuntime();
Mock<ExpressRouteManagementClient> client = InitExpressRouteManagementClient();
var dcMock = new Mock<IDedicatedCircuitOperations>();

List<AzureDedicatedCircuit> dedicatedCircuits = new List<AzureDedicatedCircuit>(){
new AzureDedicatedCircuit(){ Bandwidth = bandwidth1, CircuitName = circuitName1, ServiceKey = serviceKey1, Location = location1, ServiceProviderName = serviceProviderName1, ServiceProviderProvisioningState = ProviderProvisioningState.NotProvisioned, Status = DedicatedCircuitState.Enabled},
new AzureDedicatedCircuit(){ Bandwidth = bandwidth2, CircuitName = circuitName2, ServiceKey = serviceKey2, Location = location2, ServiceProviderName = serviceProviderName2, ServiceProviderProvisioningState = ProviderProvisioningState.Provisioned, Status = DedicatedCircuitState.Enabled}
new AzureDedicatedCircuit(){ Bandwidth = bandwidth1, BillingType = billingType1.ToString(), CircuitName = circuitName1, ServiceKey = serviceKey1, Location = location1, ServiceProviderName = serviceProviderName1, ServiceProviderProvisioningState = ProviderProvisioningState.NotProvisioned, Status = DedicatedCircuitState.Enabled},
new AzureDedicatedCircuit(){ Bandwidth = bandwidth2, BillingType = billingType2.ToString(), CircuitName = circuitName2, ServiceKey = serviceKey2, Location = location2, ServiceProviderName = serviceProviderName2, ServiceProviderProvisioningState = ProviderProvisioningState.Provisioned, Status = DedicatedCircuitState.Enabled}
};

DedicatedCircuitListResponse expected =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="2.0.3" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management" version="4.1.1" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Compute" version="12.3.1" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.ExpressRoute" version="0.18.12-preview" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.ExpressRoute" version="0.18.14-preview" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.MediaServices" version="4.0.0" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.ServiceBus" version="0.17.0-preview" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Storage" version="5.1.1" targetFramework="net45" />
Expand Down