Skip to content

huangpf PR: dev <- Azure:dev #570

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 7 commits into from
Jul 1, 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 @@ -169,7 +169,6 @@
<Compile Include="Commands\NewAzureApiManagement.cs" />
<Compile Include="Commands\RemoveAzureApiManagement.cs" />
<Compile Include="Commands\RestoreAzureApiManagement.cs" />
<Compile Include="CommonConstants.cs" />
<Compile Include="Models\PsApiManagement.cs" />
<Compile Include="Models\PsApiManagementHostnameCertificate.cs" />
<Compile Include="Models\PsApiManagementHostnameConfiguration.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ public class AddAzureApiManagementRegion : AzureApiManagementCmdletBase
HelpMessage = "Location of the new deployment region.")]

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

[Parameter(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ public class NewAzureApiManagementVirtualNetwork : AzureRMCmdlet
HelpMessage = "Location of the virtual network.")]

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

[Parameter(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ public class RemoveAzureApiManagementRegion : AzureApiManagementCmdletBase
Mandatory = true,
HelpMessage = "Location of the deployment region to remove.")]
[ValidateNotNullOrEmpty]
[ValidateSet(
"North Central US", "South Central US", "Central US", "West Europe", "North Europe", "West US", "East US",
"East US 2", "Japan East", "Japan West", "Brazil South", "Southeast Asia", "East Asia", "Australia East",
"Australia Southeast", IgnoreCase = false)]
public string Location { get; set; }

public override void ExecuteCmdlet()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,6 @@ public class UpdateAzureApiManagementDeployment : AzureApiManagementCmdletBase
ValueFromPipelineByPropertyName = true,
Mandatory = true,
HelpMessage = "Location of master API Management deployment region.")]
[ValidateSet(
"North Central US", "South Central US", "Central US", "West Europe", "North Europe", "West US", "East US",
"East US 2", "Japan East", "Japan West", "Brazil South", "Southeast Asia", "East Asia", "Australia East",
"Australia Southeast", IgnoreCase = false)]
public string Location { get; set; }

[Parameter(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ public class UpdateAzureApiManagementRegion : AzureApiManagementCmdletBase
HelpMessage = "Location of the deployment region to update.")]

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

[Parameter(
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -147,17 +147,6 @@ public PsApiManagementRegion AddRegion(
throw new ArgumentNullException("location");
}

if (!CommonConstants.ValidLocationsSet.Contains(location))
{
throw new ArgumentException(
string.Format(
Resources.InvalidLocation,
location,
string.Join(",", CommonConstants.ValidLocationsSet)
),
"location");
}

if (location.Equals(Location) || AdditionalRegions.Any(r => location.Equals(r.Location)))
{
throw new ArgumentException(string.Format(Resources.AddRegionExistsMessage, location), "location");
Expand All @@ -183,17 +172,6 @@ public bool RemoveRegion(string location)
throw new ArgumentNullException("location");
}

if (!CommonConstants.ValidLocationsSet.Contains(location))
{
throw new ArgumentException(
string.Format(
Resources.InvalidLocation,
location,
string.Join(",", CommonConstants.ValidLocationsSet)
),
"location");
}

if (location.Equals(Location))
{
throw new ArgumentException(
Expand All @@ -213,17 +191,6 @@ public void UpdateRegion(string location, PsApiManagementSku sku, int capacity,
throw new ArgumentNullException("location");
}

if (!CommonConstants.ValidLocationsSet.Contains(location))
{
throw new ArgumentException(
string.Format(
Resources.InvalidLocation,
location,
string.Join(",", CommonConstants.ValidLocationsSet)
),
"location");
}

var regionToUpdate = AdditionalRegions.FirstOrDefault(r => location.Equals(r.Location));
if (regionToUpdate != null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Resources\WebSite.param.dev.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<None Include="packages.config">
<SubType>Designer</SubType>
Expand Down
Loading