Skip to content

Fix VcfLicense support in New-AzVMwarePrivateCloud - #29907

Open
anaarias-msft wants to merge 7 commits into
Azure:mainfrom
anaarias-msft:anaarias/vcfLicenseFix
Open

Fix VcfLicense support in New-AzVMwarePrivateCloud#29907
anaarias-msft wants to merge 7 commits into
Azure:mainfrom
anaarias-msft:anaarias/vcfLicenseFix

Conversation

@anaarias-msft

Copy link
Copy Markdown
Contributor

The New-AzVMwareVcf5LicenseObject helper cmdlet and the -VcfLicense parameter on New-AzVMwarePrivateCloud were missing from the 0.9.1 package. Export the helper cmdlet in the module manifest and refresh generated docs, examples, and tests so the VCF license can be set during private cloud provisioning.

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

The New-AzVMwareVcf5LicenseObject helper cmdlet and the -VcfLicense
parameter on New-AzVMwarePrivateCloud were missing from the 0.9.1
package. Export the helper cmdlet in the module manifest and refresh
generated docs, examples, and tests so the VCF license can be set
during private cloud provisioning.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1199a263-a5d2-4bc2-a022-4337b3b86283
Copilot AI review requested due to automatic review settings July 27, 2026 18:23
@azure-pipelines

Copy link
Copy Markdown
Contributor
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@a0x1ab

a0x1ab commented Jul 27, 2026

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Contributor
Azure Pipelines:
Successfully started running 3 pipeline(s).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 restores end-user support for setting a VMware Cloud Foundation (VCF) license during private cloud provisioning by ensuring the New-AzVMwareVcf5LicenseObject helper cmdlet is exported and the -VcfLicense parameter is represented across generated help, examples, and tests for New-AzVMwarePrivateCloud (and related update cmdlets).

Changes:

  • Exported New-AzVMwareVcf5LicenseObject from the Az.VMware module manifest so it ships in the module package.
  • Refreshed generated reference help/docs and examples to include -VcfLicense and the new helper cmdlet page.
  • Added/updated tests to validate -VcfLicense parameter exposure and request-body serialization.

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/VMware/VMware/help/Update-AzVMwarePrivateCloud.md Help update to include -VcfLicense and parameter documentation.
src/VMware/VMware/help/New-AzVMwareVcf5LicenseObject.md New help page for the VCF5 license helper cmdlet.
src/VMware/VMware/help/New-AzVMwarePureStoragePolicy.md Updated example/formatting for Pure Storage policy cmdlet help.
src/VMware/VMware/help/New-AzVMwarePrivateCloud.md Help update to include -VcfLicense for private cloud creation.
src/VMware/VMware/help/Az.VMware.md Module help index updated to list the new helper cmdlet help page.
src/VMware/VMware/ChangeLog.md Changelog entry documenting the missing-export fix.
src/VMware/VMware/Az.VMware.psd1 Manifest updated to export New-AzVMwareVcf5LicenseObject and refresh generated metadata.
src/VMware/VMware.sln Solution project GUID refreshed for the generated Az.VMware project entry.
src/VMware/VMware.Autorest/test/New-AzVMwareVcf5LicenseObject.Tests.ps1 New test scaffold for the helper cmdlet.
src/VMware/VMware.Autorest/test/New-AzVMWarePrivateCloud.Tests.ps1 Tests added to validate -VcfLicense parameter exposure and JSON serialization (plus optional live interception).
src/VMware/VMware.Autorest/generate-info.json Updated AutoRest generate ID.
src/VMware/VMware.Autorest/examples/New-AzVMwareVcf5LicenseObject.md New example markdown for the helper cmdlet.
src/VMware/VMware.Autorest/docs/Update-AzVMwarePrivateCloud.md Generated docs updated to include -VcfLicense.
src/VMware/VMware.Autorest/docs/New-AzVMwareVcf5LicenseObject.md Generated docs added for the helper cmdlet.
src/VMware/VMware.Autorest/docs/New-AzVMwarePureStoragePolicy.md Generated docs updated for Pure Storage policy example/formatting.
src/VMware/VMware.Autorest/docs/New-AzVMwarePrivateCloud.md Generated docs updated to include -VcfLicense.
src/VMware/VMware.Autorest/docs/Az.VMware.md Generated docs index updated to list the helper cmdlet.
src/VMware/VMware.Autorest/custom/autogen-model-cmdlets/New-AzVMwareVcf5LicenseObject.ps1 Helper cmdlet implementation/help updated to match regenerated surface.

Comment thread src/VMware/VMware/help/Update-AzVMwarePrivateCloud.md Outdated
Comment thread src/VMware/VMware/ChangeLog.md
Comment thread src/VMware/VMware/help/New-AzVMwareVcf5LicenseObject.md
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 27, 2026 18:50
@a0x1ab

a0x1ab commented Jul 27, 2026

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Contributor
Azure Pipelines:
Successfully started running 3 pipeline(s).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 18 out of 18 changed files in this pull request and generated 4 comments.

Comment on lines +21 to +25
It 'exposes the -VcfLicense parameter of type IVcfLicense' {
$param = (Get-Command New-AzVMwarePrivateCloud).Parameters['VcfLicense']
$param | Should -Not -BeNullOrEmpty
$param.ParameterType.Name | Should -Be 'IVcfLicense'
}
Comment on lines 95 to 100
'New-AzVMwarePureStoragePolicy',
'New-AzVMwareScriptSecureStringExecutionParameterObject',
'New-AzVMwareScriptStringExecutionParameterObject',
'New-AzVMwareVcf5LicenseObject',
'New-AzVMwareVmHostPlacementPolicyPropertyObject',
'New-AzVMwareVMPlacementPolicyPropertyObject',
Comment thread src/VMware/VMware.sln
Comment on lines 22 to 25
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "VMware.Autorest", "VMware.Autorest", "{64C5BAE6-3EC5-BC18-8524-598A68BB706A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.VMware", "..\..\generated\VMware\VMware.Autorest\Az.VMware.csproj", "{E3790CB5-0701-4E03-850C-8A253F9E2394}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.VMware", "..\..\generated\VMware\VMware.Autorest\Az.VMware.csproj", "{40A23464-6373-47CD-8EC6-879FD93DEE2D}"
EndProject
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 27, 2026 19:19
@a0x1ab

a0x1ab commented Jul 27, 2026

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Contributor
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

The project GUID for Az.VMware is randomly reassigned by build-module.ps1
on each regeneration. Restoring the original GUID to avoid needless diff
and merge conflicts, per PR review feedback.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1199a263-a5d2-4bc2-a022-4337b3b86283

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 18 out of 18 changed files in this pull request and generated 4 comments.


### Example 1: Create an in-memory object for Vcf5License.
```powershell
New-AzVMwareVcf5LicenseObject -Core 16 -EndDate (Get-Date "2027-01-01") -LicenseKey (ConvertTo-SecureString "12345-12345-12345-12345-12345" -AsPlainText -Force) -BroadcomSiteId "site123" -BroadcomContractNumber "contract123"

### Example 1: Create an in-memory object for Vcf5License.
```powershell
New-AzVMwareVcf5LicenseObject -Core 16 -EndDate (Get-Date "2027-01-01") -LicenseKey (ConvertTo-SecureString "12345-12345-12345-12345-12345" -AsPlainText -Force) -BroadcomSiteId "site123" -BroadcomContractNumber "contract123"
@@ -0,0 +1,12 @@
### Example 1: Create an in-memory object for Vcf5License.
```powershell
New-AzVMwareVcf5LicenseObject -Core 16 -EndDate (Get-Date "2027-01-01") -LicenseKey (ConvertTo-SecureString "12345-12345-12345-12345-12345" -AsPlainText -Force) -BroadcomSiteId "site123" -BroadcomContractNumber "contract123"

```yaml
Type: System.Nullable`1[[System.Boolean, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]
Type: System.Nullable`1[[System.Boolean, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]
Copilot AI review requested due to automatic review settings July 27, 2026 19:27
@a0x1ab

a0x1ab commented Jul 27, 2026

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Contributor
Azure Pipelines:
Successfully started running 3 pipeline(s).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 17 out of 17 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (1)

src/VMware/VMware/ChangeLog.md:22

  • The Upcoming Release entry should be written from the user perspective and expand the VCF acronym on first use in this section. As written, it reads like internal packaging metadata rather than a user-facing release note.
* Fixed `New-AzVMwareVcf5LicenseObject` and the `-VcfLicense` parameter on `New-AzVMwarePrivateCloud` not being available in the `0.9.1` package
    - The cmdlet and parameter are now correctly generated and exported by the module

Comment on lines +507 to +509
### -VcfLicense
The private cloud license

Comment on lines +505 to +507
### -VcfLicense
The private cloud license

The generate_Id was randomly regenerated by a local build-module.ps1 run.
Bumping it made CI treat VMware.Autorest as outdated and attempt a full
AutoRest regeneration of generated/VMware in the security-tools pipeline,
which fails. Restoring the id to match generated/ (as on main) so no
regen is triggered, consistent with PR Azure#29765.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1199a263-a5d2-4bc2-a022-4337b3b86283
Copilot AI review requested due to automatic review settings July 27, 2026 20:30
@a0x1ab

a0x1ab commented Jul 27, 2026

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Contributor
Azure Pipelines:
Successfully started running 3 pipeline(s).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 16 out of 16 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (3)

src/VMware/VMware.Autorest/custom/autogen-model-cmdlets/New-AzVMwareVcf5LicenseObject.ps1:21

  • The comment-based help .Description duplicates the .Synopsis and no longer explains how this object is intended to be used (e.g., passed to New-AzVMwarePrivateCloud via -VcfLicense). This makes Get-Help New-AzVMwareVcf5LicenseObject less informative than the rest of the module help.
.Description
Create an in-memory object for Vcf5License.

src/VMware/VMware/help/Update-AzVMwarePrivateCloud.md:506

  • Parameter description for -VcfLicense is overly generic (“The private cloud license”). Aligning it with the New-AzVMwarePrivateCloud help would make it clearer that this expects a VMware Cloud Foundation (VCF) license object.
**src/VMware/VMware.Autorest/docs/Update-AzVMwarePrivateCloud.md:508**
* Parameter description for -VcfLicense is overly generic (“The private cloud license”). Aligning it with the user-facing help improves clarity and keeps regenerated docs consistent.

anaarias-msft and others added 2 commits July 29, 2026 14:09
Restore the generate_Id bump that a prior commit reverted. CI's
Get-OutdatedSubModule compares src/VMware/VMware.Autorest/generate-info.json
against generated/VMware/VMware.Autorest/generate-info.json; when the ids
match, CI skips AutoRest regeneration and builds the stale committed
generated/ tree, which lacks the Vcf5License model and the -VcfLicense
parameter. As a result New-AzVMwareVcf5LicenseObject and the -VcfLicense
parameter were absent, failing the Analyze and Test checks on both
powershell-core and windows-powershell.

Bumping the id marks the submodule as outdated so CI regenerates from the
2025-09-01 spec (which defines vcfLicense/Vcf5License), restoring the
feature. This matches the state of commit c2201d6 whose builds passed all
powershell-core and windows-powershell checks.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6e1a51c4-2ab2-4c9e-9975-7d62f37ccfa7
The New-AzVMwareVcf5LicenseObject example used a hardcoded sample value
'12345-12345-12345-12345-12345' for -LicenseKey. That value matches
CredScan's Microsoft product-key rule (five groups of five alphanumerics),
producing one new credential finding in the changed docs/examples/help
files. PostAnalysis in the security-tools pipeline breaks the build on any
new CredScan hit, which is the sole remaining security-tools failure.

Replace it with the non-key-shaped placeholder 'YOUR-LICENSE-KEY' in the
example source and its generated docs/help copies so no credential-shaped
value is present, resolving the finding without a CredScan suppression.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6e1a51c4-2ab2-4c9e-9975-7d62f37ccfa7
Copilot AI review requested due to automatic review settings July 29, 2026 18:24
@a0x1ab

a0x1ab commented Jul 29, 2026

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Contributor
Azure Pipelines:
Successfully started running 3 pipeline(s).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 17 out of 17 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (7)

src/VMware/VMware.Autorest/docs/Update-AzVMwarePrivateCloud.md:506

  • The -VcfLicense parameter description is overly generic. Please make it explicit that this is the VMware Cloud Foundation (VCF) license for the private cloud (consistent with New-AzVMwarePrivateCloud help).
The private cloud license

src/VMware/VMware/help/Update-AzVMwarePrivateCloud.md:508

  • The -VcfLicense parameter description is overly generic. In user-facing reference help, it should explicitly describe that this is the VMware Cloud Foundation (VCF) license being applied to the private cloud.
The private cloud license

src/VMware/VMware.Autorest/docs/Update-AzVMwarePrivateCloud.md:124

  • This generated doc line includes an assembly-qualified type name with a System.Private.CoreLib version, which is noisy and inconsistent with the published help content (src/VMware/VMware/help/Update-AzVMwarePrivateCloud.md shows a simplified type). Consider normalizing it to the simplified type format to avoid confusing users.
Type: System.Nullable`1[[System.Boolean, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]

src/VMware/VMware/help/New-AzVMwareVcf5LicenseObject.md:28

  • The example uses (Get-Date "2027-01-01"), which produces a local DateTime, but the parameter description says the value should be UTC. Update the example to construct a UTC DateTime to match the parameter contract.
New-AzVMwareVcf5LicenseObject -Core 16 -EndDate (Get-Date "2027-01-01") -LicenseKey (ConvertTo-SecureString "YOUR-LICENSE-KEY" -AsPlainText -Force) -BroadcomSiteId "site123" -BroadcomContractNumber "contract123"

src/VMware/VMware.Autorest/docs/New-AzVMwareVcf5LicenseObject.md:27

  • The example uses (Get-Date "2027-01-01"), which produces a local DateTime, but the EndDate parameter is documented as UTC. Update the example to create a UTC DateTime.
New-AzVMwareVcf5LicenseObject -Core 16 -EndDate (Get-Date "2027-01-01") -LicenseKey (ConvertTo-SecureString "YOUR-LICENSE-KEY" -AsPlainText -Force) -BroadcomSiteId "site123" -BroadcomContractNumber "contract123"

src/VMware/VMware.Autorest/examples/New-AzVMwareVcf5LicenseObject.md:3

  • The example uses (Get-Date "2027-01-01"), which produces a local DateTime, but EndDate is documented as UTC. Update the example to construct a UTC DateTime.
New-AzVMwareVcf5LicenseObject -Core 16 -EndDate (Get-Date "2027-01-01") -LicenseKey (ConvertTo-SecureString "YOUR-LICENSE-KEY" -AsPlainText -Force) -BroadcomSiteId "site123" -BroadcomContractNumber "contract123"

src/VMware/VMware/ChangeLog.md:21

  • In ChangeLog.md entries, less-obvious acronyms should be expanded on first use within the release section. This new Upcoming Release bullet mentions VcfLicense but doesn’t expand VCF (VMware Cloud Foundation).
* Fixed `New-AzVMwareVcf5LicenseObject` and the `-VcfLicense` parameter on `New-AzVMwarePrivateCloud` not being available in the `0.9.1` package

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.

3 participants