Skip to content

Commit

Permalink
Migrate StackHCIVM from generation to main (#26009)
Browse files Browse the repository at this point in the history
* Move StackHCIVM to main

* Update ChangeLog.md for stackhcivm

---------

Co-authored-by: azure-powershell-bot <[email protected]>
Co-authored-by: Xiaogang <[email protected]>
  • Loading branch information
3 people authored Sep 4, 2024
1 parent f7f6764 commit 5a71bc9
Show file tree
Hide file tree
Showing 60 changed files with 3,977 additions and 5,529 deletions.
3 changes: 2 additions & 1 deletion src/StackHCIVM/StackHCIVM.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ In this directory, run AutoRest:
commit: 812f964651d5f1f7148b54ed2cc35cb97be12523
require:
- $(this-folder)/../../readme.azure.noprofile.md
repo: azure-rest-api-specs

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

inlining-threshold: 50
resourcegroup-append: true
Expand Down
12 changes: 11 additions & 1 deletion src/StackHCIVM/StackHCIVM.Autorest/build-module.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
# is regenerated.
# ----------------------------------------------------------------------------------
param([switch]$NotIsolated, [switch]$Run, [switch]$Test, [switch]$Docs, [switch]$Pack, [switch]$Code, [switch]$Release, [switch]$Debugger, [switch]$NoDocs, [switch]$UX)
param([switch]$NotIsolated, [switch]$Run, [switch]$Test, [switch]$Docs, [switch]$Pack, [switch]$Code, [switch]$Release, [switch]$Debugger, [switch]$NoDocs, [switch]$UX, [Switch]$DisableAfterBuildTasks)
$ErrorActionPreference = 'Stop'

if($PSEdition -ne 'Core') {
Expand Down Expand Up @@ -177,4 +177,14 @@ if (Test-Path (Join-Path $PSScriptRoot 'generate-portal-ux.ps1'))
. (Join-Path $PSScriptRoot 'generate-portal-ux.ps1')
}

if (-not $DisableAfterBuildTasks){
$afterBuildTasksPath = Join-Path $PSScriptRoot ''
$afterBuildTasksArgs = ConvertFrom-Json 'true' -AsHashtable
if(Test-Path -Path $afterBuildTasksPath -PathType leaf){
Write-Host -ForegroundColor Green 'Running after build tasks...'
. $afterBuildTasksPath @afterBuildTasksArgs
}
}


Write-Host -ForegroundColor Green '-------------Done-------------'
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ function New-AzStackHCIVMVirtualMachine {
}
if (-not $ProvisionVMConfigAgent){
$null = $PSBoundParameters.Remove("WindowConfigurationProvisionVMConfigAgent")
$PSBoundParameters.Add("WindowConfigurationProvisionVMConfigAgent", $true)
$PSBoundParameters.Add("WindowConfigurationProvisionVMConfigAgent", $false)
}
$null = $PSBoundParameters.Remove("ProvisionVMAgent")
$null = $PSBoundParameters.Remove("ProvisionVMConfigAgent")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This command creates a virtual machine from a gallery image.

### Example 2: Create a Virtual Machine with a Disk.
```powershell
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"
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"
```
```output
Name ResourceGroupName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Please note some properties can be set only during virtual machine creation.
.Example
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"
.Example
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"
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"
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IVirtualMachineInstance
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3935,7 +3935,7 @@ Please note some properties can be set only during virtual machine creation.
.Example
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"
.Example
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"
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"
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IVirtualMachineInstance
Expand Down
Loading

0 comments on commit 5a71bc9

Please sign in to comment.