Skip to content

Conversation

@audreyttt
Copy link
Member

Description

Mandatory Checklist

  • SHOULD update ChangeLog.md file(s) appropriately
    • Update src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.
      • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header in the past tense.
    • Should not change ChangeLog.md if no new release is required, such as fixing test case only.
  • SHOULD regenerate markdown help files if there is cmdlet API change. Instruction
  • SHOULD have proper test coverage for changes in pull request.
  • SHOULD NOT adjust version of module manually in pull request

Copilot AI review requested due to automatic review settings December 18, 2025 18:24
@azure-client-tools-bot-prd
Copy link

Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request adds support for the High Speed Interconnect Placement property to Virtual Machine Scale Set (VMSS) commands in the Azure PowerShell Compute module. The feature allows users to specify high-speed interconnect placement settings when creating or updating VMSS resources.

Key Changes:

  • Added -HighSpeedInterconnectPlacement parameter to three VMSS cmdlets: New-AzVmss, New-AzVmssConfig, and Update-AzVmss
  • Implemented backend support in strategy and method classes to properly handle and propagate the new parameter
  • Added comprehensive test coverage with a new test function

Reviewed changes

Copilot reviewed 8 out of 12 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/Compute/Compute/help/Update-AzVmss.md Updated help documentation to include the new -HighSpeedInterconnectPlacement parameter
src/Compute/Compute/help/New-AzVmssConfig.md Added parameter documentation for -HighSpeedInterconnectPlacement in VMSS configuration cmdlet
src/Compute/Compute/help/New-AzVmss.md Documented the new parameter in the VMSS creation cmdlet help
src/Compute/Compute/Strategies/ComputeRp/VirtualMachineScaleSetStrategy.cs Extended strategy methods to accept and apply highSpeedInterconnectPlacement parameter
src/Compute/Compute/Manual/VirtualMachineScaleSetCreateOrUpdateMethod.cs Added parameter definition with PSArgumentCompleter and wired it through to the strategy layer
src/Compute/Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetUpdateMethod.cs Added parameter to the Update-AzVmss cmdlet implementation
src/Compute/Compute/Generated/VirtualMachineScaleSet/Config/NewAzureRmVmssConfigCommand.cs Implemented parameter in config command and set property in VMSS object creation
src/Compute/Compute/Generated/Models/PSVirtualMachineScaleSet.cs Added HighSpeedInterconnectPlacement property to the PowerShell model object
src/Compute/Compute/ChangeLog.md Added changelog entry documenting the new parameter addition
src/Compute/Compute.Test/ScenarioTests/VirtualMachineScaleSetTests.ps1 Implemented comprehensive test function covering parameter usage across different scenarios
src/Compute/Compute.Test/ScenarioTests/VirtualMachineScaleSetTests.cs Registered new test method for execution

Copilot AI review requested due to automatic review settings December 25, 2025 06:06
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 12 changed files in this pull request and generated 4 comments.

Comment on lines +484 to +489
[Parameter(
Mandatory = false,
ValueFromPipelineByPropertyName = true,
HelpMessage = "Specifies the high speed interconnect placement for the virtual machine scale set.")]
[PSArgumentCompleter("None", "Trunk")]
public string HighSpeedInterconnectPlacement { get; set; }
Copy link

Copilot AI Dec 25, 2025

Choose a reason for hiding this comment

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

The HighSpeedInterconnectPlacement parameter is declared but not implemented in either the BuildPatchObject or BuildPutObject methods. You need to add logic similar to other parameters to actually set this property on the VirtualMachineScaleSet or VirtualMachineScaleSetUpdate objects.

For BuildPatchObject (used when VirtualMachineScaleSet is null), add:

if (this.IsParameterBound(c => c.HighSpeedInterconnectPlacement))
{
    if (this.VirtualMachineScaleSetUpdate == null)
    {
        this.VirtualMachineScaleSetUpdate = new VirtualMachineScaleSetUpdate();
    }
    this.VirtualMachineScaleSetUpdate.HighSpeedInterconnectPlacement = this.HighSpeedInterconnectPlacement;
}

For BuildPutObject (used when VirtualMachineScaleSet is provided), add:

if (this.IsParameterBound(c => c.HighSpeedInterconnectPlacement))
{
    this.VirtualMachineScaleSet.HighSpeedInterconnectPlacement = this.HighSpeedInterconnectPlacement;
}

Copilot uses AI. Check for mistakes.
.SYNOPSIS
Test creating a VMSS with HighSpeedInterconnectPlacement set
#>
function Test-VirtualMachineScaleSetHighSpeedInterconnectPlacement
Copy link

Copilot AI Dec 25, 2025

Choose a reason for hiding this comment

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

There is trailing whitespace at the end of this line after the function name. Please remove it.

Suggested change
function Test-VirtualMachineScaleSetHighSpeedInterconnectPlacement
function Test-VirtualMachineScaleSetHighSpeedInterconnectPlacement

Copilot uses AI. Check for mistakes.
# Setup
$rgname = Get-ComputeTestResourceName;
$loc = "westus2";

Copy link

Copilot AI Dec 25, 2025

Choose a reason for hiding this comment

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

There is trailing whitespace at the end of this line. Please remove it.

Copilot uses AI. Check for mistakes.
$domainNameLabel1 = "d1" + $rgname;
$subnetName = 'subnet' + $rgname;
$vnetName = 'vnet' + $rgname;

Copy link

Copilot AI Dec 25, 2025

Choose a reason for hiding this comment

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

There is trailing whitespace at the end of this line. Please remove it.

Suggested change

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant