Skip to content

Commit 6f6e73b

Browse files
author
Avijit Gupta
committed
Changes according to feedback
1 parent 79aec34 commit 6f6e73b

File tree

7 files changed

+32
-34
lines changed

7 files changed

+32
-34
lines changed

src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/VirtualIPTests.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public void Cleanup()
6262
Utilities.ExecuteAndLog(() => CleanupService(serviceName), "Delete service");
6363
}
6464

65-
[TestMethod(), Priority(0), TestProperty("Feature", "IaaS"), TestCategory(Category.Network), Owner("avgupt"),
65+
[TestMethod(), Priority(0), TestProperty("Feature", "IaaS"), TestCategory(Category.Preview), Owner("avgupt"),
6666
Description(
6767
"Test the cmdlets (Add-AzureVirtualIP, Add-AzureEndpoint, Remove-AzureEndpoint, Get-AzureDeployment,Remove-AzureVirtualIP)"
6868
)]
@@ -133,6 +133,10 @@ public void TestVirtualIPLifecycle()
133133
deployment = vmPowershellCmdlets.GetAzureDeployment(serviceName, DeploymentSlotType.Production);
134134
retrievedVip = deployment.VirtualIPs.FirstOrDefault(vip => string.Equals(vip.Name, vipName));
135135
Assert.IsNull(retrievedVip);
136+
cleanupIfPassed = false;
137+
138+
vmPowershellCmdlets.RemoveAzureDeployment(serviceName, "Production", true);
139+
pass = true;
136140
}
137141
catch (Exception ex)
138142
{

src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Endpoints/AddAzureEndpoint.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,7 @@ public class AddAzureEndpoint : VirtualMachineConfigurationCmdletBase
100100

101101
[Parameter(HelpMessage = "The Virtual IP Name of the Virtual IP on which the endpoint is to be added.")]
102102
[ValidateNotNullOrEmpty]
103-
public string VirtualIPName
104-
{
105-
get;
106-
set;
107-
}
103+
public string VirtualIPName { get; set;}
108104

109105
internal void ExecuteCommand()
110106
{

src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Endpoints/SetAzureEndpoint.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ internal void ExecuteCommand()
163163
{
164164
endpoint.LoadBalancerDistribution = this.LoadBalancerDistribution;
165165
}
166+
166167
if (this.ParameterSpecified("VirtualIPName"))
167168
{
168169
endpoint.VirtualIPName = this.VirtualIPName;

src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Endpoints/SetAzureLoadBalancedEndpoint.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,7 @@ public class SetAzureLoadBalancedEndpoint : IaaSDeploymentManagementCmdletBase
9191

9292
[Parameter(HelpMessage = "The Virtual IP Name of the Virtual IP on which the endpoint is to be added.")]
9393
[ValidateNotNullOrEmpty]
94-
public string VirtualIPName
95-
{
96-
get;
97-
set;
98-
}
94+
public string VirtualIPName { get; set; }
9995

10096
protected override void ExecuteCommand()
10197
{

src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/AddAzureVirtualIP.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ public class AddAzureVirtualIP : ServiceManagementBaseCmdlet
2626
{
2727
[Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = false)]
2828
[ValidateNotNullOrEmpty]
29-
public string VirtualIPName { get; set; }
29+
public string ServiceName { get; set; }
3030

3131
[Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = false)]
3232
[ValidateNotNullOrEmpty]
33-
public string ServiceName { get; set; }
33+
public string VirtualIPName { get; set; }
3434

3535
public override void ExecuteCmdlet()
3636
{

src/ServiceManagement/Compute/Commands.ServiceManagement/Model/ReservedIPContext.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
// ----------------------------------------------------------------------------------
1414

1515

16-
using AutoMapper.Impl;
1716
using Microsoft.WindowsAzure.Commands.Utilities.Common;
1817

1918
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Model

src/ServiceManagement/Compute/Commands.ServiceManagement/RemoveAzureVirtualIP.cs

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,38 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Text;
5-
using System.Threading.Tasks;
1+
// ----------------------------------------------------------------------------------
2+
//
3+
// Copyright Microsoft Corporation
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
// Unless required by applicable law or agreed to in writing, software
9+
// distributed under the License is distributed on an "AS IS" BASIS,
10+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
// See the License for the specific language governing permissions and
12+
// limitations under the License.
13+
// ----------------------------------------------------------------------------------
14+
using System.Management.Automation;
15+
using Microsoft.WindowsAzure.Commands.Utilities.Common;
16+
using Microsoft.WindowsAzure.Management.Network;
17+
using Microsoft.WindowsAzure.Management.Compute;
18+
using Microsoft.WindowsAzure.Management.Compute.Models;
19+
using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties;
620

721
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS
822
{
9-
using System.Management.Automation;
10-
using Microsoft.WindowsAzure.Commands.Utilities.Common;
11-
using Microsoft.WindowsAzure.Management.Network;
12-
using Microsoft.WindowsAzure.Management.Compute;
13-
using Microsoft.WindowsAzure.Management.Compute.Models;
14-
using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties;
15-
16-
1723
[Cmdlet(VerbsCommon.Remove, "AzureVirtualIP"), OutputType(typeof(ManagementOperationContext))]
1824
public class RemoveAzureVirtualIP : ServiceManagementBaseCmdlet
1925
{
2026
[Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = false)]
2127
[ValidateNotNullOrEmpty]
22-
public string VirtualIPName { get; set; }
28+
public string ServiceName { get; set; }
2329

2430
[Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = false)]
2531
[ValidateNotNullOrEmpty]
26-
public string ServiceName { get; set; }
32+
public string VirtualIPName { get; set; }
2733

2834
[Parameter(Position = 2, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Do not confirm removal of Virtual IP")]
29-
public SwitchParameter Force
30-
{
31-
get;
32-
set;
33-
}
35+
public SwitchParameter Force { get; set; }
3436

3537
public override void ExecuteCmdlet()
3638
{

0 commit comments

Comments
 (0)