Updated Set-AzExpressRouteGateway to allow either one of -MinScaleUnits and -MaxScaleUnits#14145
Closed
nimaller wants to merge 1 commit intoAzure:masterfrom
Closed
Updated Set-AzExpressRouteGateway to allow either one of -MinScaleUnits and -MaxScaleUnits#14145nimaller wants to merge 1 commit intoAzure:masterfrom
-MinScaleUnits and -MaxScaleUnits#14145nimaller wants to merge 1 commit intoAzure:masterfrom
Conversation
-MinScaleUnits and -MaxScaleUnits
VeryEarly
reviewed
Feb 7, 2021
| [Parameter( | ||
| Mandatory = false, | ||
| HelpMessage = "Min for the scale units for this ExpressRouteGateway.")] | ||
| [ValidateRange(1, 100)] |
Collaborator
There was a problem hiding this comment.
this is a breaking change
Contributor
Author
There was a problem hiding this comment.
We are already validating bounds in NRP, so this will just fail the call earlier.
VeryEarly
reviewed
Feb 7, 2021
VeryEarly
reviewed
Feb 7, 2021
| } | ||
|
|
||
| if (this.MinScaleUnits > 0 && this.MaxScaleUnits > 0) | ||
| if (this.MinScaleUnits > 0 || this.MaxScaleUnits > 0) |
Collaborator
There was a problem hiding this comment.
if one of these parameters was not present, can you please confirm whether line 128/129 still work?
Contributor
Author
There was a problem hiding this comment.
Yes, it will set the parameter to 0, which is the expected behavior.
Collaborator
|
please target your PR against network-november branch |
Contributor
|
/azp run |
Contributor
|
Azure Pipelines successfully started running 3 pipeline(s). |
Contributor
|
/azp run |
Contributor
|
Azure Pipelines successfully started running 3 pipeline(s). |
Merged
8 tasks
Contributor
Author
|
New PR: #14150 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Currently, when using set-azexpressroutegateway, users can specify min scale units or max scale units, and the request will succeed but the values will be ignored. This PR fixes it by validating the range in min and max scale units, and allowing only one of them to be specified.
Checklist
CONTRIBUTING.mdChangeLog.mdfile(s) has been updated:ChangeLog.mdfile can be found atsrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md## Upcoming Releaseheader -- no new version header should be added