-
Notifications
You must be signed in to change notification settings - Fork 4k
Domain name label with randomness for New-AzureRMVM and VMSS. #5399
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
Domain name label with randomness for New-AzureRMVM and VMSS. #5399
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
do | ||
{ | ||
domainNameLabel.Value = (name + '-' + Guid.NewGuid().ToString().Substring(0, 6)).ToLower(); | ||
} while ((await networkClient.CheckDnsNameAvailabilityAsync(location, domainNameLabel.Value)).Available != true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of != true
, just throw a !
out front?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is bool?
so I would like to have explicit syntax.
Ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please file an issue to add domain name label validation to existing VM tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test for simple vm parameter set is failing in the on-demand runbecause it needs to be re-recorded.
Also, please mark this as a check-in test
Description
Domain name randomness.
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
Testing Guidelines
Cmdlet Signature Guidelines
ShouldProcess
and haveSupportShouldProcess=true
specified in the cmdlet attribute. You can find more information onShouldProcess
here.OutputType
attribute if any output is produced - if the cmdlet produces no output, it should implement aPassThru
parameter.Cmdlet Parameter Guidelines