Skip to content

Commit 9d5d9d9

Browse files
authored
Merge pull request #570 from Azure/dev
huangpf PR: dev <- Azure:dev
2 parents e78fd91 + 4628bef commit 9d5d9d9

File tree

14 files changed

+279
-340
lines changed

14 files changed

+279
-340
lines changed

src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands.ApiManagement.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,6 @@
169169
<Compile Include="Commands\NewAzureApiManagement.cs" />
170170
<Compile Include="Commands\RemoveAzureApiManagement.cs" />
171171
<Compile Include="Commands\RestoreAzureApiManagement.cs" />
172-
<Compile Include="CommonConstants.cs" />
173172
<Compile Include="Models\PsApiManagement.cs" />
174173
<Compile Include="Models\PsApiManagementHostnameCertificate.cs" />
175174
<Compile Include="Models\PsApiManagementHostnameConfiguration.cs" />

src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/AddAzureApiManagementRegion.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,6 @@ public class AddAzureApiManagementRegion : AzureApiManagementCmdletBase
3434
HelpMessage = "Location of the new deployment region.")]
3535

3636
[ValidateNotNullOrEmpty]
37-
[ValidateSet(
38-
"North Central US", "South Central US", "Central US", "West Europe", "North Europe", "West US", "East US",
39-
"East US 2", "Japan East", "Japan West", "Brazil South", "Southeast Asia", "East Asia", "Australia East",
40-
"Australia Southeast", IgnoreCase = false)]
4137
public string Location { get; set; }
4238

4339
[Parameter(

src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/NewAzureApiManagementVirtualNetwork.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@ public class NewAzureApiManagementVirtualNetwork : AzureRMCmdlet
2929
HelpMessage = "Location of the virtual network.")]
3030

3131
[ValidateNotNullOrEmpty]
32-
[ValidateSet(
33-
"North Central US", "South Central US", "Central US", "West Europe", "North Europe", "West US", "East US",
34-
"East US 2", "Japan East", "Japan West", "Brazil South", "Southeast Asia", "East Asia", "Australia East",
35-
"Australia Southeast", IgnoreCase = false)]
3632
public string Location { get; set; }
3733

3834
[Parameter(

src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/RemoveAzureApiManagementRegion.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ public class RemoveAzureApiManagementRegion : AzureApiManagementCmdletBase
3232
Mandatory = true,
3333
HelpMessage = "Location of the deployment region to remove.")]
3434
[ValidateNotNullOrEmpty]
35-
[ValidateSet(
36-
"North Central US", "South Central US", "Central US", "West Europe", "North Europe", "West US", "East US",
37-
"East US 2", "Japan East", "Japan West", "Brazil South", "Southeast Asia", "East Asia", "Australia East",
38-
"Australia Southeast", IgnoreCase = false)]
3935
public string Location { get; set; }
4036

4137
public override void ExecuteCmdlet()

src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/UpdateAzureApiManagementDeployment.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,6 @@ public class UpdateAzureApiManagementDeployment : AzureApiManagementCmdletBase
5353
ValueFromPipelineByPropertyName = true,
5454
Mandatory = true,
5555
HelpMessage = "Location of master API Management deployment region.")]
56-
[ValidateSet(
57-
"North Central US", "South Central US", "Central US", "West Europe", "North Europe", "West US", "East US",
58-
"East US 2", "Japan East", "Japan West", "Brazil South", "Southeast Asia", "East Asia", "Australia East",
59-
"Australia Southeast", IgnoreCase = false)]
6056
public string Location { get; set; }
6157

6258
[Parameter(

src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/UpdateAzureApiManagementRegion.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,6 @@ public class UpdateAzureApiManagementRegion : AzureApiManagementCmdletBase
3434
HelpMessage = "Location of the deployment region to update.")]
3535

3636
[ValidateNotNullOrEmpty]
37-
[ValidateSet(
38-
"North Central US", "South Central US", "Central US", "West Europe", "North Europe", "West US", "East US",
39-
"East US 2", "Japan East", "Japan West", "Brazil South", "Southeast Asia", "East Asia", "Australia East",
40-
"Australia Southeast", IgnoreCase = false)]
4137
public string Location { get; set; }
4238

4339
[Parameter(

src/ResourceManager/ApiManagement/Commands.ApiManagement/CommonConstants.cs

Lines changed: 0 additions & 25 deletions
This file was deleted.

src/ResourceManager/ApiManagement/Commands.ApiManagement/Models/PsApiManagement.cs

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -147,17 +147,6 @@ public PsApiManagementRegion AddRegion(
147147
throw new ArgumentNullException("location");
148148
}
149149

150-
if (!CommonConstants.ValidLocationsSet.Contains(location))
151-
{
152-
throw new ArgumentException(
153-
string.Format(
154-
Resources.InvalidLocation,
155-
location,
156-
string.Join(",", CommonConstants.ValidLocationsSet)
157-
),
158-
"location");
159-
}
160-
161150
if (location.Equals(Location) || AdditionalRegions.Any(r => location.Equals(r.Location)))
162151
{
163152
throw new ArgumentException(string.Format(Resources.AddRegionExistsMessage, location), "location");
@@ -183,17 +172,6 @@ public bool RemoveRegion(string location)
183172
throw new ArgumentNullException("location");
184173
}
185174

186-
if (!CommonConstants.ValidLocationsSet.Contains(location))
187-
{
188-
throw new ArgumentException(
189-
string.Format(
190-
Resources.InvalidLocation,
191-
location,
192-
string.Join(",", CommonConstants.ValidLocationsSet)
193-
),
194-
"location");
195-
}
196-
197175
if (location.Equals(Location))
198176
{
199177
throw new ArgumentException(
@@ -213,17 +191,6 @@ public void UpdateRegion(string location, PsApiManagementSku sku, int capacity,
213191
throw new ArgumentNullException("location");
214192
}
215193

216-
if (!CommonConstants.ValidLocationsSet.Contains(location))
217-
{
218-
throw new ArgumentException(
219-
string.Format(
220-
Resources.InvalidLocation,
221-
location,
222-
string.Join(",", CommonConstants.ValidLocationsSet)
223-
),
224-
"location");
225-
}
226-
227194
var regionToUpdate = AdditionalRegions.FirstOrDefault(r => location.Equals(r.Location));
228195
if (regionToUpdate != null)
229196
{

src/ResourceManager/Resources/Commands.Resources.Test/Commands.Resources.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@
294294
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
295295
</Content>
296296
<Content Include="Resources\WebSite.param.dev.json">
297-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
297+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
298298
</Content>
299299
<None Include="packages.config">
300300
<SubType>Designer</SubType>

0 commit comments

Comments
 (0)