Skip to content

Commit 1fbae63

Browse files
author
Hao Chen
committed
Merge pull request Azure#1538 from nupurkot/dev
Updating Package version for ExpressRoute Commandlets
2 parents 8b0a715 + b2799dc commit 1fbae63

File tree

7 files changed

+19
-10
lines changed

7 files changed

+19
-10
lines changed

src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/Commands.ExpressRoute.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@
9090
<SpecificVersion>False</SpecificVersion>
9191
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.4.1.1\lib\net40\Microsoft.WindowsAzure.Management.dll</HintPath>
9292
</Reference>
93-
<Reference Include="Microsoft.WindowsAzure.Management.ExpressRoute, Version=0.9.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
94-
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.ExpressRoute.0.18.12-preview\lib\net40\Microsoft.WindowsAzure.Management.ExpressRoute.dll</HintPath>
93+
<Reference Include="Microsoft.WindowsAzure.Management.ExpressRoute">
94+
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.ExpressRoute.0.18.14-preview\lib\net40\Microsoft.WindowsAzure.Management.ExpressRoute.dll</HintPath>
9595
<Private>True</Private>
9696
</Reference>
9797
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">

src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/DedicatedCircuits/NewAzureDedicatedCircuit.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public class NewAzureDedicatedCircuitCommand : ExpressRouteBaseCmdlet
4343

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

4848

4949
[Parameter(HelpMessage = "Do not confirm Azure Dedicated Circuit creation")]
@@ -59,7 +59,7 @@ public override void ExecuteCmdlet()
5959
() =>
6060
{
6161
var circuit = ExpressRouteClient.NewAzureDedicatedCircuit(CircuitName, Bandwidth, Location,
62-
ServiceProviderName, Sku, billingType);
62+
ServiceProviderName, Sku, BillingType);
6363
WriteVerboseWithTimestamp(Resources.NewAzureDedicatedCircuitSucceeded);
6464
WriteObject(circuit);
6565
});

src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/ExpressRouteClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,11 @@ public AzureDedicatedCircuit NewAzureDedicatedCircuit(string circuitName,
145145
var result = Client.DedicatedCircuits.New(new DedicatedCircuitNewParameters()
146146
{
147147
Bandwidth = bandwidth,
148+
BillingType = billingType,
148149
CircuitName = circuitName,
149150
Location = location,
150151
ServiceProviderName = serviceProviderName,
151152
Sku = sku,
152-
BillingType = billingType
153153
});
154154

155155
if (result.HttpStatusCode.Equals(HttpStatusCode.OK))

src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@
1313
<package id="Microsoft.Rest.ClientRuntime" version="1.8.2" targetFramework="net45" />
1414
<package id="Microsoft.Rest.ClientRuntime.Azure.Authentication" version="0.11.0" targetFramework="net45" />
1515
<package id="Microsoft.WindowsAzure.Management" version="4.1.1" targetFramework="net45" />
16-
<package id="Microsoft.WindowsAzure.Management.ExpressRoute" version="0.18.12-preview" targetFramework="net45" />
16+
<package id="Microsoft.WindowsAzure.Management.ExpressRoute" version="0.18.14-preview" targetFramework="net45" />
1717
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net45" />
1818
</packages>

src/ServiceManagement/Services/Commands.Test/Commands.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@
135135
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.3.1\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
136136
</Reference>
137137
<Reference Include="Microsoft.WindowsAzure.Management.ExpressRoute, Version=0.9.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
138-
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.ExpressRoute.0.18.12-preview\lib\net40\Microsoft.WindowsAzure.Management.ExpressRoute.dll</HintPath>
138+
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.ExpressRoute.0.18.14-preview\lib\net40\Microsoft.WindowsAzure.Management.ExpressRoute.dll</HintPath>
139139
<Private>True</Private>
140140
</Reference>
141141
<Reference Include="Microsoft.WindowsAzure.Management.MediaServices">

src/ServiceManagement/Services/Commands.Test/ExpressRoute/AzureDedicatedCircuitTests.cs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ public void NewAzureDedicatedCircuitSuccessful()
5656
string serviceProviderName = "TestProvider";
5757
string location = "us-west";
5858
string serviceKey = "aa28cd19-b10a-41ff-981b-53c6bbf15ead";
59+
BillingType billingType = BillingType.UnlimitedData;
5960

6061
MockCommandRuntime mockCommandRuntime = new MockCommandRuntime();
6162
Mock<ExpressRouteManagementClient> client = InitExpressRouteManagementClient();
@@ -68,6 +69,7 @@ public void NewAzureDedicatedCircuitSuccessful()
6869
{
6970
CircuitName = circuitName,
7071
Bandwidth = bandwidth,
72+
BillingType = billingType.ToString(),
7173
Location = location,
7274
ServiceProviderName = serviceProviderName,
7375
ServiceKey = serviceKey,
@@ -97,6 +99,7 @@ public void NewAzureDedicatedCircuitSuccessful()
9799
{
98100
CircuitName = circuitName,
99101
Bandwidth = bandwidth,
102+
BillingType = billingType,
100103
Location = location,
101104
ServiceProviderName = serviceProviderName,
102105
CommandRuntime = mockCommandRuntime,
@@ -108,6 +111,7 @@ public void NewAzureDedicatedCircuitSuccessful()
108111
// Assert
109112
AzureDedicatedCircuit actual = mockCommandRuntime.OutputPipeline[0] as AzureDedicatedCircuit;
110113
Assert.Equal<string>(expected.DedicatedCircuit.CircuitName, actual.CircuitName);
114+
Assert.Equal<string>(expected.DedicatedCircuit.BillingType, actual.BillingType);
111115
Assert.Equal<uint>(expected.DedicatedCircuit.Bandwidth, actual.Bandwidth);
112116
Assert.Equal<string>(expected.DedicatedCircuit.Location, actual.Location);
113117
Assert.Equal<string>(expected.DedicatedCircuit.ServiceProviderName, actual.ServiceProviderName);
@@ -127,6 +131,7 @@ public void GetAzureDedicatedCircuitSuccessful()
127131
string serviceProviderName = "TestProvider";
128132
string location = "us-west";
129133
string serviceKey = "aa28cd19-b10a-41ff-981b-53c6bbf15ead";
134+
BillingType billingType = BillingType.MeteredData;
130135

131136
MockCommandRuntime mockCommandRuntime = new MockCommandRuntime();
132137
Mock<ExpressRouteManagementClient> client = InitExpressRouteManagementClient();
@@ -139,6 +144,7 @@ public void GetAzureDedicatedCircuitSuccessful()
139144
{
140145
CircuitName = circuitName,
141146
Bandwidth = bandwidth,
147+
BillingType = billingType.ToString(),
142148
Location = location,
143149
ServiceProviderName = serviceProviderName,
144150
ServiceKey = serviceKey,
@@ -165,6 +171,7 @@ public void GetAzureDedicatedCircuitSuccessful()
165171

166172
// Assert
167173
AzureDedicatedCircuit actual = mockCommandRuntime.OutputPipeline[0] as AzureDedicatedCircuit;
174+
Assert.Equal<string>(expected.DedicatedCircuit.BillingType, actual.BillingType);
168175
Assert.Equal<string>(expected.DedicatedCircuit.CircuitName, actual.CircuitName);
169176
Assert.Equal<uint>(expected.DedicatedCircuit.Bandwidth, actual.Bandwidth);
170177
Assert.Equal<string>(expected.DedicatedCircuit.Location, actual.Location);
@@ -219,20 +226,22 @@ public void ListAzureDedicatedCircuitSuccessful()
219226
string serviceProviderName1 = "TestProvider";
220227
string location1 = "us-west";
221228
string serviceKey1 = "aa28cd19-b10a-41ff-981b-53c6bbf15ead";
229+
BillingType billingType1 = BillingType.MeteredData;
222230

223231
string circuitName2 = "TestCircuit2";
224232
uint bandwidth2 = 10;
225233
string serviceProviderName2 = "TestProvider";
226234
string location2 = "us-north";
227235
string serviceKey2 = "bc28cd19-b10a-41ff-981b-53c6bbf15ead";
236+
BillingType billingType2 = BillingType.UnlimitedData;
228237

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

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

238247
DedicatedCircuitListResponse expected =

src/ServiceManagement/Services/Commands.Test/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="2.0.3" targetFramework="net45" />
2222
<package id="Microsoft.WindowsAzure.Management" version="4.1.1" targetFramework="net45" />
2323
<package id="Microsoft.WindowsAzure.Management.Compute" version="12.3.1" targetFramework="net45" />
24-
<package id="Microsoft.WindowsAzure.Management.ExpressRoute" version="0.18.12-preview" targetFramework="net45" />
24+
<package id="Microsoft.WindowsAzure.Management.ExpressRoute" version="0.18.14-preview" targetFramework="net45" />
2525
<package id="Microsoft.WindowsAzure.Management.MediaServices" version="4.0.0" targetFramework="net45" />
2626
<package id="Microsoft.WindowsAzure.Management.ServiceBus" version="0.17.0-preview" targetFramework="net45" />
2727
<package id="Microsoft.WindowsAzure.Management.Storage" version="5.1.1" targetFramework="net45" />

0 commit comments

Comments
 (0)