Skip to content

Commit 5a71bc9

Browse files
azure-pipelines[bot]azure-powershell-botdolauli
authored
Migrate StackHCIVM from generation to main (#26009)
* Move StackHCIVM to main * Update ChangeLog.md for stackhcivm --------- Co-authored-by: azure-powershell-bot <[email protected]> Co-authored-by: Xiaogang <[email protected]>
1 parent f7f6764 commit 5a71bc9

File tree

60 files changed

+3977
-5529
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+3977
-5529
lines changed

src/StackHCIVM/StackHCIVM.Autorest/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ In this directory, run AutoRest:
5454
commit: 812f964651d5f1f7148b54ed2cc35cb97be12523
5555
require:
5656
- $(this-folder)/../../readme.azure.noprofile.md
57-
repo: azure-rest-api-specs
5857

5958
input-file:
6059
- $(repo)/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/common.json
@@ -71,6 +70,8 @@ module-version: 0.1.0
7170
title: StackHCIVM
7271
service-name: StackHCIVM
7372
subject-prefix: $(service-name)
73+
disable-transform-identity-type: true
74+
flatten-userassignedidentity: false
7475

7576
inlining-threshold: 50
7677
resourcegroup-append: true

src/StackHCIVM/StackHCIVM.Autorest/build-module.ps1

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
1313
# is regenerated.
1414
# ----------------------------------------------------------------------------------
15-
param([switch]$NotIsolated, [switch]$Run, [switch]$Test, [switch]$Docs, [switch]$Pack, [switch]$Code, [switch]$Release, [switch]$Debugger, [switch]$NoDocs, [switch]$UX)
15+
param([switch]$NotIsolated, [switch]$Run, [switch]$Test, [switch]$Docs, [switch]$Pack, [switch]$Code, [switch]$Release, [switch]$Debugger, [switch]$NoDocs, [switch]$UX, [Switch]$DisableAfterBuildTasks)
1616
$ErrorActionPreference = 'Stop'
1717

1818
if($PSEdition -ne 'Core') {
@@ -177,4 +177,14 @@ if (Test-Path (Join-Path $PSScriptRoot 'generate-portal-ux.ps1'))
177177
. (Join-Path $PSScriptRoot 'generate-portal-ux.ps1')
178178
}
179179

180+
if (-not $DisableAfterBuildTasks){
181+
$afterBuildTasksPath = Join-Path $PSScriptRoot ''
182+
$afterBuildTasksArgs = ConvertFrom-Json 'true' -AsHashtable
183+
if(Test-Path -Path $afterBuildTasksPath -PathType leaf){
184+
Write-Host -ForegroundColor Green 'Running after build tasks...'
185+
. $afterBuildTasksPath @afterBuildTasksArgs
186+
}
187+
}
188+
189+
180190
Write-Host -ForegroundColor Green '-------------Done-------------'

src/StackHCIVM/StackHCIVM.Autorest/custom/New-AzStackHCIVMVirtualMachine_New.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ function New-AzStackHCIVMVirtualMachine {
551551
}
552552
if (-not $ProvisionVMConfigAgent){
553553
$null = $PSBoundParameters.Remove("WindowConfigurationProvisionVMConfigAgent")
554-
$PSBoundParameters.Add("WindowConfigurationProvisionVMConfigAgent", $true)
554+
$PSBoundParameters.Add("WindowConfigurationProvisionVMConfigAgent", $false)
555555
}
556556
$null = $PSBoundParameters.Remove("ProvisionVMAgent")
557557
$null = $PSBoundParameters.Remove("ProvisionVMConfigAgent")

src/StackHCIVM/StackHCIVM.Autorest/examples/New-AzStackHCIVMVirtualMachine.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This command creates a virtual machine from a gallery image.
1212

1313
### Example 2: Create a Virtual Machine with a Disk.
1414
```powershell
15-
New-AzStackHCIVMVirtualMachine -Name "testVm" -OsType "Linux" -OsDiskName "testOsDisk" -VmSize "Standard_K8S_v1" -AdminUsername "localadmin" -ComputerName "testVm" -ResourceGroupName "test-rg" -CustomLocationId "/subscriptions/{subscriptionID}/resourcegroups/{resourceGroupName}/providers/microsoft.extendedlocation/customlocations/{customLocationName}" -Location "eastus"
15+
New-AzStackHCIVMVirtualMachine -Name "testVm" -OsType "Linux" -OsDiskName "testOsDisk10" -VmSize "Standard_K8S_v1" -AdminUsername "localadmin" -ComputerName "testVm" -ResourceGroupName "test-rg" -CustomLocationId "/subscriptions/{subscriptionID}/resourcegroups/{resourceGroupName}/providers/microsoft.extendedlocation/customlocations/{customLocationName}" -Location "eastus"
1616
```
1717
```output
1818
Name ResourceGroupName

src/StackHCIVM/StackHCIVM.Autorest/exports/New-AzStackHCIVMVirtualMachine.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Please note some properties can be set only during virtual machine creation.
2424
.Example
2525
New-AzStackHCIVMVirtualMachine -Name "testVm" -OsType "Linux" -ImageName "testImage" -VmSize "Standard_K8S_v1" -AdminUsername "localadmin" -ComputerName "testVm" -ResourceGroupName "test-rg" -CustomLocationId "/subscriptions/{subscriptionID}/resourcegroups/{resourceGroupName}/providers/microsoft.extendedlocation/customlocations/{customLocationName}" -Location "eastus"
2626
.Example
27-
New-AzStackHCIVMVirtualMachine -Name "testVm" -OsType "Linux" -OsDiskName "testOsDisk" -VmSize "Standard_K8S_v1" -AdminUsername "localadmin" -ComputerName "testVm" -ResourceGroupName "test-rg" -CustomLocationId "/subscriptions/{subscriptionID}/resourcegroups/{resourceGroupName}/providers/microsoft.extendedlocation/customlocations/{customLocationName}" -Location "eastus"
27+
New-AzStackHCIVMVirtualMachine -Name "testVm" -OsType "Linux" -OsDiskName "testOsDisk10" -VmSize "Standard_K8S_v1" -AdminUsername "localadmin" -ComputerName "testVm" -ResourceGroupName "test-rg" -CustomLocationId "/subscriptions/{subscriptionID}/resourcegroups/{resourceGroupName}/providers/microsoft.extendedlocation/customlocations/{customLocationName}" -Location "eastus"
2828
2929
.Outputs
3030
Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IVirtualMachineInstance

src/StackHCIVM/StackHCIVM.Autorest/exports/ProxyCmdletDefinitions.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3935,7 +3935,7 @@ Please note some properties can be set only during virtual machine creation.
39353935
.Example
39363936
New-AzStackHCIVMVirtualMachine -Name "testVm" -OsType "Linux" -ImageName "testImage" -VmSize "Standard_K8S_v1" -AdminUsername "localadmin" -ComputerName "testVm" -ResourceGroupName "test-rg" -CustomLocationId "/subscriptions/{subscriptionID}/resourcegroups/{resourceGroupName}/providers/microsoft.extendedlocation/customlocations/{customLocationName}" -Location "eastus"
39373937
.Example
3938-
New-AzStackHCIVMVirtualMachine -Name "testVm" -OsType "Linux" -OsDiskName "testOsDisk" -VmSize "Standard_K8S_v1" -AdminUsername "localadmin" -ComputerName "testVm" -ResourceGroupName "test-rg" -CustomLocationId "/subscriptions/{subscriptionID}/resourcegroups/{resourceGroupName}/providers/microsoft.extendedlocation/customlocations/{customLocationName}" -Location "eastus"
3938+
New-AzStackHCIVMVirtualMachine -Name "testVm" -OsType "Linux" -OsDiskName "testOsDisk10" -VmSize "Standard_K8S_v1" -AdminUsername "localadmin" -ComputerName "testVm" -ResourceGroupName "test-rg" -CustomLocationId "/subscriptions/{subscriptionID}/resourcegroups/{resourceGroupName}/providers/microsoft.extendedlocation/customlocations/{customLocationName}" -Location "eastus"
39393939
39403940
.Outputs
39413941
Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IVirtualMachineInstance

0 commit comments

Comments
 (0)