-
Notifications
You must be signed in to change notification settings - Fork 4.1k
[PS] Migrate StackHCI module to autorest v4 #28363
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
base: main
Are you sure you want to change the base?
Changes from all commits
4514105
f289848
6a12ab3
f11aa8c
068ed8c
5ce07b9
434314d
b103610
1672376
5a8235a
6111311
f61772b
d734c9e
8ba8719
9f480ad
d284f07
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -66,12 +66,6 @@ subject-prefix: $(service-name) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| inlining-threshold: 50 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| resourcegroup-append: true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # For new modules, please avoid setting 3.x using the use-extension method and instead, use 4.x as the default option | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| use-extension: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "@autorest/powershell": "3.x" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| directive: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Rename function | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - where: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -80,14 +74,24 @@ directive: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| set: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| subject: ConsentAndInstallDefaultExtension | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Remove the unexpanded parameter set | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Generate Create variant for "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/createArcIdentity" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - where: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| subject: ArcSetting$|Cluster|DeploymentSetting|EdgeDevice|Extension|SecuritySetting|Update$|UpdateRun|UpdateSummary | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| variant: ^(Create|Update)(?!.*?(Expanded|JsonFilePath|JsonString))|^CreateViaIdentityExpanded$ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| remove: true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - where: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| variant: ^Create$|^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| subject: ExtendClusterSoftwareAssuranceBenefit | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| variant: ^(Extend)(?!.*?(Expanded|JsonFilePath|JsonString)) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| remove: true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
76
to
+85
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - where: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| subject: EdgeDevice | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| variant: ^(Validate)(?!.*?(Expanded|JsonFilePath|JsonString)) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| remove: true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - where: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| verb: Set | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| subject: Workspace | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| remove: true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Remove Update-AzStackHciExtension | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Remove Update-AzStackHciExtension | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - where: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| verb: Update | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| subject: Extension | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -112,11 +116,11 @@ directive: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| verb: New | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| subject: ArcSettingPassword | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| remove: true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Remove Update-AzStackHciArcSetting | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Remove Update (Get-Put) commands and use set cmdlets. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - where: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| verb: Update | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| subject: ArcSetting | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| remove: true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| subject: ArcSetting|DeploymentSetting|EdgeDevice|SecuritySetting|Update$|UpdateRun|UpdateSummary | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| remove: true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Hide aadClientId from Update-AzStackHCICluster | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - where: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| verb: Update | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -208,6 +212,24 @@ directive: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - ResourceGroupName | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| labels: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ResourceGroupName: Resource Group | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - from: source-file-csharp | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| where: $ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| transform: $ = $.replace(/"Get the get run for a specified update"/g, '"Get the Update run for a specified update"'); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - from: source-file-csharp | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| where: $ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| transform: $ = $.replace(/"Get all get summaries under the HCI cluster"/g, '"Get all Update summaries under the HCI cluster"'); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - from: source-file-csharp | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| where: $ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| transform: $ = $.replace(/"Delete specified delete Run"/g, '"Delete specified Update Run"'); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - from: source-file-csharp | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| where: $ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| transform: $ = $.replace(/"Delete delete Summaries"/g, '"Delete Update Summaries"'); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - from: source-file-csharp | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| where: $ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| transform: $ = $.replace(/"Put put runs for a specified update"/g, '"Put Update runs for a specified update"'); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
214
to
+229
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ResourceGroupName: Resource Group | |
| - from: source-file-csharp | |
| where: $ | |
| transform: $ = $.replace(/"Get the get run for a specified update"/g, '"Get the Update run for a specified update"'); | |
| - from: source-file-csharp | |
| where: $ | |
| transform: $ = $.replace(/"Get all get summaries under the HCI cluster"/g, '"Get all Update summaries under the HCI cluster"'); | |
| - from: source-file-csharp | |
| where: $ | |
| transform: $ = $.replace(/"Delete specified delete Run"/g, '"Delete specified Update Run"'); | |
| - from: source-file-csharp | |
| where: $ | |
| transform: $ = $.replace(/"Delete delete Summaries"/g, '"Delete Update Summaries"'); | |
| - from: source-file-csharp | |
| where: $ | |
| transform: $ = $.replace(/"Put put runs for a specified update"/g, '"Put Update runs for a specified update"'); | |
| ResourceGroupName: Resource Group | |
| # Correct a duplicated verb in the generated operation description for update runs. | |
| # Safe to remove when the upstream spec or generator no longer emits "Get the get run for a specified update". | |
| - from: source-file-csharp | |
| where: $ | |
| transform: $ = $.replace(/"Get the get run for a specified update"/g, '"Get the Update run for a specified update"'); | |
| # Correct a duplicated verb in the generated operation description for update summaries. | |
| # Safe to remove when the upstream spec or generator no longer emits "Get all get summaries under the HCI cluster". | |
| - from: source-file-csharp | |
| where: $ | |
| transform: $ = $.replace(/"Get all get summaries under the HCI cluster"/g, '"Get all Update summaries under the HCI cluster"'); | |
| # Correct a duplicated verb in the generated delete description for update runs. | |
| # Safe to remove when the upstream spec or generator no longer emits "Delete specified delete Run". | |
| - from: source-file-csharp | |
| where: $ | |
| transform: $ = $.replace(/"Delete specified delete Run"/g, '"Delete specified Update Run"'); | |
| # Correct a duplicated verb in the generated delete description for update summaries. | |
| # Safe to remove when the upstream spec or generator no longer emits "Delete delete Summaries". | |
| - from: source-file-csharp | |
| where: $ | |
| transform: $ = $.replace(/"Delete delete Summaries"/g, '"Delete Update Summaries"'); | |
| # Correct a duplicated verb in the generated create/update description for update runs. | |
| # Safe to remove when the upstream spec or generator no longer emits "Put put runs for a specified update". | |
| - from: source-file-csharp | |
| where: $ | |
| transform: $ = $.replace(/"Put put runs for a specified update"/g, '"Put Update runs for a specified update"'); | |
| # Correct a duplicated verb in the generated create/update description for update summaries. | |
| # Safe to remove when the upstream spec or generator no longer emits "Put put summaries under the HCI cluster". |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,6 +1,6 @@ | ||||||
| --- | ||||||
| Module Name: Az.StackHCI | ||||||
| Module Guid: ed069c15-afdb-4020-9677-d3db308109f7 | ||||||
| Module Guid: a5fe8ba1-f96d-48b0-b683-2c52599b2b00 | ||||||
| Download Help Link: https://learn.microsoft.com/powershell/module/az.stackhci | ||||||
| Help Version: 1.0.0.0 | ||||||
| Locale: en-US | ||||||
|
|
@@ -80,6 +80,9 @@ Apply Update | |||||
| ### [New-AzStackHciArcSetting](New-AzStackHciArcSetting.md) | ||||||
| Create ArcSetting for HCI cluster. | ||||||
|
|
||||||
| ### [New-AzStackHciArcSettingIdentity](New-AzStackHciArcSettingIdentity.md) | ||||||
| Create Aad identity for arc settings. | ||||||
|
|
||||||
| ### [New-AzStackHciCluster](New-AzStackHciCluster.md) | ||||||
| Create an HCI cluster. | ||||||
|
|
||||||
|
|
@@ -135,13 +138,13 @@ Remove-AzStackHCIVMAttestation removes guests from AzureStack HCI IMDS Attestati | |||||
| Set-AzStackHCI modifies resource properties of the Microsoft.AzureStackHCI cloud resource representing the on-premises cluster to enable or disable features. | ||||||
|
|
||||||
| ### [Set-AzStackHciDeploymentSetting](Set-AzStackHciDeploymentSetting.md) | ||||||
| Create a DeploymentSetting | ||||||
| Update a DeploymentSetting | ||||||
|
|
||||||
| ### [Set-AzStackHciEdgeDevice](Set-AzStackHciEdgeDevice.md) | ||||||
| Create a EdgeDevice | ||||||
| Update a EdgeDevice | ||||||
|
||||||
| Update a EdgeDevice | |
| Update an edge device |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment says "Generate Create variant" but the directive is removing variants (
remove: true). Please adjust the comment to accurately describe why these variants are being removed/kept (Expanded/Json*), so future maintainers understand the intent.