Skip to content

Remove Default sku setting from NewAzureVirtualNetworkGateway commandlet #6314

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 2 commits into from
May 30, 2018
Merged

Conversation

ritwikbasu
Copy link
Contributor

@ritwikbasu ritwikbasu commented May 26, 2018

Description

Checklist

vnetGateway.Sku.Name = MNM.VirtualNetworkGatewaySkuTier.Basic;
}
// If gateway sku param value is not passed, - Let NRP make the decision, just pass it as null here
vnetGateway.Sku = null;
Copy link
Contributor

@praries880 praries880 May 29, 2018

Choose a reason for hiding this comment

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

@ritwikbasu @markcowl

I would expect this change to break this test.

Looking at the PS test code

The test tries to create a new gateway and the cmdlet call does not specify a SKU.

Heres the link in the test recording PUT request where the Sku is not null.

With the new code change I would expect to see the SKU to be null in the request which should have flagged the test as a failure (since the recording does not match what went on the wire)...

@ritwikbasu
I would recommend that even though the test did not fail, we re-record the test as it does not reflect the new behavior.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@praries880 - This does not break that test since NRP assigns the same SKU when the SKU is null. The idea of this change is to allow NRP to make the decision instead of Powershell assigning a default sku. I will push an additional test case where the SKU is null.

None of the flows are broken, neither has any logic changed. As mentioned, even if the Sku is set as null in the request, NRP would still assign the same default sku, hence the test would still work.

Copy link
Contributor

Choose a reason for hiding this comment

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

@ritwikbasu
The request's body will change based on the current change. Nothing is broken, but the Json representing what went over the wire is wrong. How much time/effort does it take to re-record the current test?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@praries880 - The test is being re-recorded. Should be done in the next couple of hours.

Copy link
Contributor

Choose a reason for hiding this comment

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

@ritwikbasu Thanks :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added re-recorded test case.

@praries880
Copy link
Contributor

@MikhailTryakhov can you look at this PR?

@maddieclayton
Copy link
Contributor

maddieclayton commented May 29, 2018

@ritwikbasu Please also open a PR targeting this branch: https://github.com/Azure/azure-powershell/tree/Network_preview. We will do the out of band release from here.

Copy link
Contributor

@MikhailTryakhov MikhailTryakhov left a comment

Choose a reason for hiding this comment

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

please merge to preview, it's okay this time

@maddieclayton maddieclayton changed the base branch from preview to release-6.2.0 May 29, 2018 23:06
@maddieclayton
Copy link
Contributor

maddieclayton commented May 30, 2018

@maddieclayton maddieclayton merged commit c0fb1f9 into Azure:release-6.2.0 May 30, 2018
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