Skip to content

Ritwikbpreview - Expose new SKUs for VPN gateways #4039

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 5 commits into from
Jun 4, 2017
Merged

Ritwikbpreview - Expose new SKUs for VPN gateways #4039

merged 5 commits into from
Jun 4, 2017

Conversation

ritwikbasu
Copy link
Contributor

@ritwikbasu ritwikbasu commented May 26, 2017

Description


This checklist is used to make sure that common guidelines for a pull request are followed. You can find a more complete discussion of PowerShell cmdlet best practices here.

General Guidelines

  • [Y] Title of the pull request is clear and informative.
  • [Y] There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.
  • [Y] The pull request does not introduce breaking changes (unless a major version change occurs in the assembly and module).

Testing Guidelines

  • [Y] Pull request includes test coverage for the included changes.
  • [Y] PowerShell scripts used in tests should do any necessary setup as part of the test or suite setup, and should not use hard-coded values for locations or existing resources.

Cmdlet Signature Guidelines

  • [N/A] New cmdlets that make changes or have side effects should implement ShouldProcess and have SupportShouldProcess=true specified in the cmdlet attribute. You can find more information on ShouldProcess here.
  • [Y] Cmdlet specifies OutputType attribute if any output is produced - if the cmdlet produces no output, it should implement a PassThru parameter.

Cmdlet Parameter Guidelines

  • [Y] Parameter types should not expose types from the management library - complex parameter types should be defined in the module.
  • [Y] Complex parameter types are discouraged - a parameter type should be simple types as often as possible. If complex types are used, they should be shallow and easily creatable from a constructor or another cmdlet.
  • [Y] Cmdlet parameter sets should be mutually exclusive - each parameter set must have at least one mandatory parameter not in other parameter sets.

@msftclas
Copy link

@ritwikbasu,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot

@azuresdkci
Copy link

Can one of the admins verify this patch?

@@ -72,7 +72,7 @@
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Rest.ClientRuntime, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.2.3.5\lib\net45\Microsoft.Rest.ClientRuntime.dll</HintPath>
<HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.2.3.6\lib\net45\Microsoft.Rest.ClientRuntime.dll</HintPath>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use version 2.3.8

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed - I just imported the latest version of azure sdk, and this was added automatically.

@@ -201,6 +201,7 @@
<None Include="..\..\Common\Commands.ScenarioTests.ResourceManager.Common\AzureRM.Storage.ps1">
<Link>ScenarioTests\AzureRM.Storage.ps1</Link>
</None>
<None Include="app.config" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed.

@@ -216,9 +219,25 @@ private PSVirtualNetworkGateway CreateVirtualNetworkGateway()
}
}

if (this.EnableActiveActiveFeature.IsPresent && !vnetGateway.Sku.Tier.Equals(MNM.VirtualNetworkGatewaySkuTier.HighPerformance))
if (this.EnableActiveActiveFeature.IsPresent
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests for these changes? Also, please update the Changelog.md for Network to reflect the changes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are covered by the existing tests - since this change is just adding new enums to already existing objects. There is no business logic change here.

Updated changelog md for network to reflect this.

@markcowl markcowl removed their assignment May 27, 2017
@markcowl
Copy link
Member

@DeepakRajendranMsft Please add this one to the review list as well

Incorating review comments
@@ -90,7 +90,7 @@
<HintPath>..\..\..\packages\Microsoft.Data.Services.Client.5.6.4\lib\net40\Microsoft.Data.Services.Client.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Rest.ClientRuntime, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.2.3.5\lib\net45\Microsoft.Rest.ClientRuntime.dll</HintPath>
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.2.3.6\lib\net45\Microsoft.Rest.ClientRuntime.dll</HintPath>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have used 2.3.8 everywhere. why in network project alone, we use 2.3.6?

If possible, we should use 2.3.6 everywhere

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has already been changed in the latest commit.

{
throw new ArgumentException("Virtual Network Gateway Sku should be " + MNM.VirtualNetworkGatewaySkuTier.HighPerformance + " when Active-Active feature flag is set to True.");
throw new ArgumentException("Virtual Network Gateway Sku should be " + MNM.VirtualNetworkGatewaySkuTier.Basic + " when VpnType is PolicyBased.");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should not have any validations here. the server should handle all validations

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

&& !vnetGateway.Sku.Tier.Equals(MNM.VirtualNetworkGatewaySkuTier.VpnGw2)
&& !vnetGateway.Sku.Tier.Equals(MNM.VirtualNetworkGatewaySkuTier.VpnGw3))
{
string errorMessage = string.Format(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dont have any validations here. make sure the user can see the server error message

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

{
throw new ArgumentException("Virtual Network Gateway Sku should be " + MNM.VirtualNetworkGatewaySkuTier.HighPerformance + " when Active-Active feature is already enabled on gateway.");
throw new ArgumentException("Cannot resize gateway from V1 gateway sizes (Default/Standard/HighPerformance) to V2 gateway sizes (VpnGw1/VpnGw2/VpnGw3)");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

similar comment: please dont have any server side validations on PS.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed


if (activeActiveSkuCriteria)
{
throw new ArgumentException("Virtual Network Gateway Sku should be " + MNM.VirtualNetworkGatewaySkuTier.HighPerformance + " when Active-Active feature flag is set to True.");
string errorMessage = string.Format(
"Virtual Network Gateway Sku should be one of {0}/{1}/{2}/{3} when Active-Active feature flag is set to True.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

similar comment on error message

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

@@ -18,7 +18,7 @@
<package id="Microsoft.Data.OData" version="5.6.4" targetFramework="net45" />
<package id="Microsoft.Data.Services.Client" version="5.6.4" targetFramework="net45" />
<package id="Microsoft.Net.Http" version="2.2.28" targetFramework="net45" />
<package id="Microsoft.Rest.ClientRuntime" version="2.3.5" targetFramework="net45" />
<package id="Microsoft.Rest.ClientRuntime" version="2.3.8" targetFramework="net452" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why net452 and not just net45?

would 2.3.6 use just net45? if thats the case, lets use 2.3.6 instead

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was auto changed when pulling latest nuget - so leaving it in.

@DeepakRajendranMsft
Copy link
Contributor

@markcowl @ritwikbasu i have added my comments

Remove server side validations from PS
@cormacpayne
Copy link
Member

@DeepakRajendranMsft any other comments?

@ritwikbasu
Copy link
Contributor Author

Hello - can you please let me know if there are any other comments/suggestions?

@markcowl
Copy link
Member

markcowl commented Jun 4, 2017

@azuresdkci add to whitelist

@markcowl markcowl changed the base branch from preview to release-4.1.0 June 4, 2017 00:30
@markcowl markcowl dismissed DeepakRajendranMsft’s stale review June 4, 2017 00:30

All comments resolved

@markcowl
Copy link
Member

markcowl commented Jun 4, 2017

@markcowl markcowl merged commit 0295f92 into Azure:release-4.1.0 Jun 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants