Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/Compute/Compute.Test/ScenarioTests/StrategiesVmssTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,5 +137,19 @@ public void SimpleNewVmssSkipExtOverprovision()
{
TestRunner.RunTestScript("Test-SimpleNewVmssSkipExtOverprovision");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestSimpleNewVmssWithHighSpeedInterconnectPlacement()
{
TestRunner.RunTestScript("Test-SimpleNewVmssWithHighSpeedInterconnectPlacement");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestVmssConfigWithHighSpeedInterconnectPlacement()
{
TestRunner.RunTestScript("Test-VmssConfigWithHighSpeedInterconnectPlacement");
}
}
}
57 changes: 57 additions & 0 deletions src/Compute/Compute.Test/ScenarioTests/StrategiesVmssTests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -551,3 +551,60 @@ function Test-SimpleNewVmssSkipExtOverprovision
Clean-ResourceGroup $vmssname
}
}

<#
.SYNOPSIS
Test Simple Parameter Set for New Vmss with HighSpeedInterconnectPlacement.
#>
function Test-SimpleNewVmssWithHighSpeedInterconnectPlacement
{
# Setup
$vmssname = Get-ResourceName

try
{
$username = "admin01"
$password = Get-PasswordForVM | ConvertTo-SecureString -AsPlainText -Force
$cred = new-object -typename System.Management.Automation.PSCredential -argumentlist $username, $password
[string]$domainNameLabel = "$vmssname$vmssname".tolower();
$stnd = "Standard";

# Test with HighSpeedInterconnectPlacement set to "Trunk"
New-AzVmss -Name $vmssname -Location "westus2" -Credential $cred -DomainNameLabel $domainNameLabel -SecurityType $stnd `
-HighSpeedInterconnectPlacement "Trunk";
$vmss = Get-AzVmss -ResourceGroupName $vmssname -Name $vmssname;
Assert-AreEqual "Trunk" $vmss.HighSpeedInterconnectPlacement;
}
finally
{
# Cleanup
Clean-ResourceGroup $vmssname
}
}

<#
.SYNOPSIS
Test New-AzVmssConfig with HighSpeedInterconnectPlacement.
#>
function Test-VmssConfigWithHighSpeedInterconnectPlacement
{
# Setup
$rgname = Get-ResourceName
$loc = "westus2";

try
{
# Test with HighSpeedInterconnectPlacement set to "None"
$vmssConfig = New-AzVmssConfig -Location $loc -HighSpeedInterconnectPlacement "None";
Assert-AreEqual "None" $vmssConfig.HighSpeedInterconnectPlacement;

# Test with HighSpeedInterconnectPlacement set to "Trunk"
$vmssConfig2 = New-AzVmssConfig -Location $loc -HighSpeedInterconnectPlacement "Trunk";
Assert-AreEqual "Trunk" $vmssConfig2.HighSpeedInterconnectPlacement;
}
finally
{
# Cleanup
Clean-ResourceGroup $rgname
}
}
1 change: 1 addition & 0 deletions src/Compute/Compute/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
* Updated Azure.Core from 1.45.0 to 1.47.3
* Added `-EnableAutomaticUpgrade` and `-TreatFailureAsDeploymentFailure` parameters (Bool) to `New-AzVmGalleryApplication` and `New-AzVmssGalleryApplication` cmdlets.
* Added `-EnableAutomaticUpgrade` and `-TreatFailureAsDeploymentFailure` parameters (Switch) to `Add-AzVmGalleryApplication` and `Add-AzVmssGalleryApplication` cmdlets.
* Added `-HighSpeedInterconnectPlacement` parameter to `New-AzVmss` and `New-AzVmssConfig` cmdlets to enable or opt out of Infiniband network interconnect between RDMA VM (Virtual Machine) sizes.

## Version 10.5.0
* Added `-Redeploy` switch parameter for `Update-AzHost` cmdlet to enable dedicated host redeployment.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,13 @@ public partial class NewAzureRmVmssConfigCommand : Microsoft.Azure.Commands.Reso
[PSArgumentCompleter("CreateBeforeDelete")]
public string AutomaticZoneRebalanceBehavior { get; set; }

[Parameter(
Mandatory = false,
ValueFromPipelineByPropertyName = true,
HelpMessage = "The HighSpeedInterconnectPlacement property allows customers to enable or opt out of Infiniband network interconnect between RDMA VM sizes. Possible values are: 'None', 'Trunk'.")]
[PSArgumentCompleter("None", "Trunk")]
public string HighSpeedInterconnectPlacement { get; set; }

protected override void ProcessRecord()
{
if (ShouldProcess("VirtualMachineScaleSet", "New"))
Expand Down Expand Up @@ -1145,7 +1152,8 @@ private void Run()
SpotRestorePolicy = this.IsParameterBound(c => c.EnableSpotRestore) ? new SpotRestorePolicy(true, this.SpotRestoreTimeout) : null,
PriorityMixPolicy = vPriorityMixPolicy,
SkuProfile = vSkuProfile,
ResiliencyPolicy = vResiliencyPolicy
ResiliencyPolicy = vResiliencyPolicy,
HighSpeedInterconnectPlacement = this.IsParameterBound(c => c.HighSpeedInterconnectPlacement) ? this.HighSpeedInterconnectPlacement : null
};

WriteObject(vVirtualMachineScaleSet);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,14 @@ public partial class NewAzureRmVmss : ComputeAutomationBaseCmdlet
HelpMessage = "Specify whether to implicitly install the ProxyAgent Extension. This option is currently applicable only for Linux Os.")]
public SwitchParameter AddProxyAgentExtension { get; set; }

[Parameter(
Mandatory = false,
ValueFromPipelineByPropertyName = true,
ParameterSetName = SimpleParameterSet,
HelpMessage = "The HighSpeedInterconnectPlacement property allows customers to enable or opt out of Infiniband network interconnect between RDMA VM sizes. Possible values are: 'None', 'Trunk'.")]
[PSArgumentCompleter("None", "Trunk")]
public string HighSpeedInterconnectPlacement { get; set; }

private void ConfigureSecuritySettings()
{
if (SecurityType?.ToLower() == SecurityTypes.TrustedLaunch ||
Expand Down Expand Up @@ -560,7 +568,8 @@ private async Task<ResourceConfig<VirtualMachineScaleSet>> SimpleParameterSetNor
securityPostureId: _cmdlet.SecurityPostureId,
securityPostureExcludeExtension: _cmdlet.SecurityPostureExcludeExtension,
enableProxyAgent: _cmdlet.EnableProxyAgent ? true : (bool?)null,
addProxyAgentExtension: _cmdlet.AddProxyAgentExtension.IsPresent ? true : (bool?)null
addProxyAgentExtension: _cmdlet.AddProxyAgentExtension.IsPresent ? true : (bool?)null,
highSpeedInterconnectPlacement: _cmdlet.HighSpeedInterconnectPlacement
);
}

Expand Down Expand Up @@ -701,7 +710,8 @@ private async Task<ResourceConfig<VirtualMachineScaleSet>> SimpleParameterSetOrc
securityPostureId: _cmdlet.SecurityPostureId,
securityPostureExcludeExtension: _cmdlet.SecurityPostureExcludeExtension,
enableProxyAgent: _cmdlet.EnableProxyAgent ? true : (bool?)null,
addProxyAgentExtension: _cmdlet.AddProxyAgentExtension.IsPresent ? true : (bool?)null
addProxyAgentExtension: _cmdlet.AddProxyAgentExtension.IsPresent ? true : (bool?)null,
highSpeedInterconnectPlacement: _cmdlet.HighSpeedInterconnectPlacement
);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ internal static ResourceConfig<VirtualMachineScaleSet> CreateVirtualMachineScale
string securityPostureId = null,
string[] securityPostureExcludeExtension = null,
bool? enableProxyAgent = null,
bool? addProxyAgentExtension = null
bool? addProxyAgentExtension = null,
string highSpeedInterconnectPlacement = null
)
=> Strategy.CreateResourceConfig(
resourceGroup: resourceGroup,
Expand Down Expand Up @@ -201,7 +202,8 @@ internal static ResourceConfig<VirtualMachineScaleSet> CreateVirtualMachineScale
AllocationStrategy = skuProfileAllocationStrategy
},
DoNotRunExtensionsOnOverprovisionedVMs = doNotRunExtensionsOnOverprovisionedVMs ? true : (bool?)null,
OrchestrationMode = orchestrationMode
OrchestrationMode = orchestrationMode,
HighSpeedInterconnectPlacement = highSpeedInterconnectPlacement
};
if (auxAuthHeader != null)
{
Expand Down Expand Up @@ -254,7 +256,8 @@ internal static ResourceConfig<VirtualMachineScaleSet> CreateVirtualMachineScale
string securityPostureId = null,
string[] securityPostureExcludeExtension = null,
bool? enableProxyAgent = null,
bool? addProxyAgentExtension = null
bool? addProxyAgentExtension = null,
string highSpeedInterconnectPlacement = null
)
=> Strategy.CreateResourceConfig(
resourceGroup: resourceGroup,
Expand Down Expand Up @@ -353,7 +356,8 @@ internal static ResourceConfig<VirtualMachineScaleSet> CreateVirtualMachineScale
AllocationStrategy = skuProfileAllocationStrategy
},
DoNotRunExtensionsOnOverprovisionedVMs = doNotRunExtensionsOnOverprovisionedVMs ? true : (bool?)null,
OrchestrationMode = orchestrationMode
OrchestrationMode = orchestrationMode,
HighSpeedInterconnectPlacement = highSpeedInterconnectPlacement
};
if (auxAuthHeader != null)
{
Expand Down