Skip to content

fix default parameter for Placement Feature in New-AzVM #27858

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

Merged
merged 1 commit into from
May 28, 2025

Conversation

grizzlytheodore
Copy link
Member

@grizzlytheodore grizzlytheodore commented May 27, 2025

Description

addressing bug found: #27855

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

Copy link

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

@grizzlytheodore grizzlytheodore marked this pull request as ready for review May 27, 2025 23:55
@Copilot Copilot AI review requested due to automatic review settings May 27, 2025 23:55
Copy link
Contributor

@Copilot 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 PR ensures that the new Placement property on the VM model is populated in the DefaultExecuteCmdlet method of New-AzVM.

  • Added Placement = this.VM.Placement to the VM object initializer.
  • Adjusted trailing comma on the previous line for proper formatting.
Comments suppressed due to low confidence (2)

src/Compute/Compute/VirtualMachine/Operation/NewAzureVMCommand.cs:1165

  • There are no existing tests covering the new Placement mapping. Please add unit or integration tests to verify that the Placement parameter is correctly passed through to the VM model.
Placement = this.VM.Placement

src/Compute/Compute/VirtualMachine/Operation/NewAzureVMCommand.cs:1165

  • Remember to update the ChangeLog.md under src/Compute/Compute/ChangeLog.md with a note about the new Placement feature and regenerate the markdown help files so the new parameter appears in the public docs.
Placement = this.VM.Placement

@msJinLei
Copy link
Contributor

LGTM

@msJinLei msJinLei changed the base branch from main to release-2025-06-03 May 28, 2025 03:35
@msJinLei msJinLei enabled auto-merge (squash) May 28, 2025 03:35
@msJinLei msJinLei merged commit 69eeb42 into release-2025-06-03 May 28, 2025
12 checks passed
@grizzlytheodore grizzlytheodore deleted the feature/cplat-placementBug branch May 28, 2025 17:25
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.

2 participants