VM OrchestrationMode: PlatformFaultDomainCount in New-AzVmss and VmssId in New-AzVm#12871
VM OrchestrationMode: PlatformFaultDomainCount in New-AzVmss and VmssId in New-AzVm#12871
Conversation
src/Compute/Compute/Generated/VirtualMachineScaleSet/Config/NewAzureRmVmssConfigCommand.cs
Outdated
Show resolved
Hide resolved
|
@Sandido could you rebase to latest the master to suppress the test timeout? |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
| $vm = new-azvm -resourcegroupname $rgname -location $loc -name $vmname -credential $cred -domainnamelabel $domainName -vmssid $VmssWithoutVmProfile.id | ||
|
|
||
| Assert-AreEqual $VmssWithoutVmProfile.id $vm.virtualmachinescaleset.id | ||
|
|
There was a problem hiding this comment.
is there a way to view the instance view of vmss to see this vm added to the vmss?
There was a problem hiding this comment.
@grizzlytheodore , No. This functionality does not exist in PS and CLI due to how the feature is setup on the server side.
| [Parameter(ParameterSetName = SimpleParameterSet, Mandatory = false, | ||
| ValueFromPipelineByPropertyName = true, | ||
| HelpMessage = "Fault Domain count for each placement group.")] | ||
| public int? PlatformFaultDomainCount { get; set; } |
There was a problem hiding this comment.
i believe '?' is not necessary here to be able to pass this parameter as null. Should behave the same when the variable type is 'int', check 'maxprice' parameter. I
There was a problem hiding this comment.
@grizzlytheodore , having the parameter as the nullable int type (int?) removes the need to cast it as a nullable int in the resourceGroup.CreateVirtualMachineScaleSetConfig() call.
MaxPrice does have this cast (double?), so having the parameter int? removes the need for this cast.
There was a problem hiding this comment.
@Sandido I see. I think it's better to stay consistent on where the parameter is being casted as a nullable variable. Not only in this cmdlet, the variables are casted as a nullable variable in CreateVirtualMachineScaleSetConfig(), but other cmdlets follow the similar structure where '?' is left out at the parameter declaration, and later is casted as nullable when it is being checked with isParameter() method.
There was a problem hiding this comment.
@grizzlytheodore , I changed it as you suggested.
| [Parameter(ParameterSetName = SimpleParameterSet, Mandatory = false)] | ||
| [Parameter(ParameterSetName = DiskFileParameterSet, Mandatory = false)] | ||
| public string VmssId { get; set; } | ||
|
|
There was a problem hiding this comment.
should we add vmssId parameter to new-azvmConfig?
There was a problem hiding this comment.
@grizzlytheodore , it is already there, the -vmssId parameter.
Description
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