Skip to content

Commit 1fbcbac

Browse files
Migrate StackHCI from generation to main (#22393)
* Move StackHCI to main * Update ChangeLog.md --------- Co-authored-by: NanxiangLiu <[email protected]>
1 parent f8606da commit 1fbcbac

File tree

322 files changed

+17953
-3705
lines changed

Some content is hidden

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

322 files changed

+17953
-3705
lines changed

src/StackHCI/Az.StackHCI.format.ps1xml

Lines changed: 438 additions & 64 deletions
Large diffs are not rendered by default.

src/StackHCI/Az.StackHCI.psd1

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# Generated by: Microsoft Corporation
55
#
6-
# Generated on: 2023/5/22
6+
# Generated on: 7/24/2023
77
#
88

99
@{
@@ -76,6 +76,8 @@ FunctionsToExport = 'Add-AzStackHCIVMAttestation', 'Disable-AzStackHCIAttestatio
7676
'Get-AzStackHCIRemoteSupportAccess',
7777
'Get-AzStackHCIRemoteSupportSessionHistory',
7878
'Get-AzStackHCIVMAttestation', 'Install-AzStackHCIRemoteSupport',
79+
'Invoke-AzStackHciConsentAndInstallDefaultExtensions',
80+
'Invoke-AzStackHciExtendClusterSoftwareAssuranceBenefit',
7981
'New-AzStackHciArcSetting', 'New-AzStackHciCluster',
8082
'New-AzStackHciExtension', 'Register-AzStackHCI',
8183
'Remove-AzStackHciArcSetting', 'Remove-AzStackHciCluster',
@@ -119,13 +121,7 @@ PrivateData = @{
119121
# IconUri = ''
120122

121123
# ReleaseNotes of this module
122-
ReleaseNotes = '* Made Region parameter mandatory in ''Register-AzStackHCI'' cmdlet.
123-
* Removed EnableAzureArcServer parameter from ''Register-AzStackHCI'' cmdlet.
124-
* Removed ''Test-AzStackHCIConnection'' cmdlet. Customers can use ''Invoke-AzStackHciConnectivityValidation'' from AzStackHCI.EnvironmentChecker module for enhanced connectivity verification tests.
125-
* Added support for Managed Service identity (MSI) in Azure China Cloud.
126-
* Added support for Mandatory extensions, for OS versions starting 23H2.
127-
* Added parameter validations for ''Register-AzStackHCI'' cmdlet.
128-
* Improved Error logging in Registration and Unregistration.'
124+
# ReleaseNotes = ''
129125

130126
# Prerelease string of this module
131127
# Prerelease = ''

src/StackHCI/ChangeLog.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@
1818
- Additional information about change #1
1919
-->
2020
## Upcoming Release
21-
21+
* Updated to api-version 2023-03-01.
22+
* Cmdlets added:
23+
- Invoke-AzStackHciExtendClusterSoftwareAssuranceBenefit : Enable Software Assurance for a cluster
24+
- Invoke-AzStackHciConsentAndInstallDefaultExtensions : Consent to installing default extensions on the cluster
2225
## Version 2.0.0
2326
* Made Region parameter mandatory in `Register-AzStackHCI` cmdlet.
2427
* Removed EnableAzureArcServer parameter from `Register-AzStackHCI` cmdlet.

src/StackHCI/README.md

Lines changed: 60 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@ In this directory, run AutoRest:
4747
> see https://aka.ms/autorest
4848
4949
``` yaml
50-
branch: ad5110c7ba2113d5f77946338231f45ac4d09c82
50+
branch: 5758cc23b0022e403d876662d9799f02c9bba3e6
5151
require:
5252
- $(this-folder)/../readme.azure.noprofile.md
5353
# lock the commit
5454
input-file:
55-
- $(repo)/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-05-01/arcSettings.json
56-
- $(repo)/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-05-01/clusters.json
57-
- $(repo)/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-05-01/extensions.json
55+
- $(repo)/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2023-03-01/arcSettings.json
56+
- $(repo)/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2023-03-01/clusters.json
57+
- $(repo)/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2023-03-01/extensions.json
5858

5959
module-version: 1.1.0
6060
title: StackHCI
@@ -66,6 +66,12 @@ inlining-threshold: 50
6666
resourcegroup-append: true
6767

6868
directive:
69+
# Rename function
70+
- where:
71+
verb: Invoke
72+
subject: AndArcSetting
73+
set:
74+
subject: ConsentAndInstallDefaultExtensions
6975
# Remove the unexpanded parameter set
7076
- where:
7177
variant: ^Create$|^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$
@@ -109,6 +115,27 @@ directive:
109115
set:
110116
default:
111117
script: '"default"'
118+
- where:
119+
verb: Invoke
120+
subject: ConsentAndInstallDefaultExtensions
121+
parameter-name: ArcSettingName
122+
hide: true
123+
set:
124+
default:
125+
script: '"default"'
126+
# Set Enable by default
127+
- where:
128+
verb: Invoke
129+
subject: ExtendClusterSoftwareAssuranceBenefit
130+
parameter-name: SoftwareAssuranceIntent
131+
set:
132+
default:
133+
script: '"Enable"'
134+
# Remove Initialize-AzStackHCIArcSettingDisableProcess
135+
- where:
136+
verb: Initialize
137+
subject: ArcSettingDisableProcess
138+
remove: true
112139
# Update ExtensionParameters.settings
113140
- from: swagger-document
114141
where: $.definitions.ExtensionParameters.properties.settings
@@ -117,4 +144,33 @@ directive:
117144
- from: swagger-document
118145
where: $.definitions.ExtensionParameters.properties.protectedSettings
119146
transform: $["additionalProperties"] = true
147+
# format tables for models
148+
- where:
149+
model-name: Cluster
150+
set:
151+
format-table:
152+
properties:
153+
- Location
154+
- Name
155+
- ResourceGroupName
156+
labels:
157+
ResourceGroupName: Resource Group
158+
- where:
159+
model-name: ArcSetting
160+
set:
161+
format-table:
162+
properties:
163+
- ResourceGroupName
164+
- AggregateState
165+
labels:
166+
ResourceGroupName: Resource Group
167+
- where:
168+
model-name: Extension
169+
set:
170+
format-table:
171+
properties:
172+
- Name
173+
- ResourceGroupName
174+
labels:
175+
ResourceGroupName: Resource Group
120176
```

src/StackHCI/StackHCI.sln

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@ Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio Version 17
44
VisualStudioVersion = 17.0.31903.59
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Accounts", "..\Accounts\Accounts\Accounts.csproj", "{531EDF39-894A-4878-B806-B35C82BADA2B}"
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Accounts", "..\Accounts\Accounts\Accounts.csproj", "{DCD8A12E-B41A-41FD-AB69-0A18D86980D7}"
77
EndProject
8-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AssemblyLoading", "..\Accounts\AssemblyLoading\AssemblyLoading.csproj", "{8BCFDDE6-DA76-4A39-8560-350D783D1579}"
8+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AssemblyLoading", "..\Accounts\AssemblyLoading\AssemblyLoading.csproj", "{9E6BBA8F-8B71-439E-98EB-38ED360B6BA7}"
99
EndProject
10-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication", "..\Accounts\Authentication\Authentication.csproj", "{6ED3CEE5-E2E5-4ACD-9788-455F1709FA7A}"
10+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication", "..\Accounts\Authentication\Authentication.csproj", "{78941DBD-57C5-48C8-B4B9-7B73709F1AE4}"
1111
EndProject
12-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication.ResourceManager", "..\Accounts\Authentication.ResourceManager\Authentication.ResourceManager.csproj", "{B5DC3173-5FB8-44FF-A66D-401C38FA5293}"
12+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication.ResourceManager", "..\Accounts\Authentication.ResourceManager\Authentication.ResourceManager.csproj", "{971ACFA1-3154-4FD2-BF5A-16AD9FBBD681}"
1313
EndProject
14-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AuthenticationAssemblyLoadContext", "..\Accounts\AuthenticationAssemblyLoadContext\AuthenticationAssemblyLoadContext.csproj", "{D2024203-2C55-4A11-AF48-9F83D3ED6133}"
14+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AuthenticationAssemblyLoadContext", "..\Accounts\AuthenticationAssemblyLoadContext\AuthenticationAssemblyLoadContext.csproj", "{7FF59606-3FA3-462E-AD78-209E93A57364}"
1515
EndProject
16-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authenticators", "..\Accounts\Authenticators\Authenticators.csproj", "{D286E80D-7146-4EFD-8487-4EED618ED601}"
16+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authenticators", "..\Accounts\Authenticators\Authenticators.csproj", "{840FEB91-36C0-4966-B64E-70BA1400E163}"
1717
EndProject
18-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.StackHCI", "Az.StackHCI.csproj", "{6599214B-B0E0-44C4-9B8B-ED56D03C2D21}"
18+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.StackHCI", "Az.StackHCI.csproj", "{84B79F07-2D74-40B0-AE90-82A090771AE8}"
1919
EndProject
2020
Global
2121
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -26,33 +26,33 @@ Global
2626
HideSolutionNode = FALSE
2727
EndGlobalSection
2828
GlobalSection(ProjectConfigurationPlatforms) = postSolution
29-
{531EDF39-894A-4878-B806-B35C82BADA2B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
30-
{531EDF39-894A-4878-B806-B35C82BADA2B}.Debug|Any CPU.Build.0 = Debug|Any CPU
31-
{531EDF39-894A-4878-B806-B35C82BADA2B}.Release|Any CPU.ActiveCfg = Release|Any CPU
32-
{531EDF39-894A-4878-B806-B35C82BADA2B}.Release|Any CPU.Build.0 = Release|Any CPU
33-
{8BCFDDE6-DA76-4A39-8560-350D783D1579}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
34-
{8BCFDDE6-DA76-4A39-8560-350D783D1579}.Debug|Any CPU.Build.0 = Debug|Any CPU
35-
{8BCFDDE6-DA76-4A39-8560-350D783D1579}.Release|Any CPU.ActiveCfg = Release|Any CPU
36-
{8BCFDDE6-DA76-4A39-8560-350D783D1579}.Release|Any CPU.Build.0 = Release|Any CPU
37-
{6ED3CEE5-E2E5-4ACD-9788-455F1709FA7A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
38-
{6ED3CEE5-E2E5-4ACD-9788-455F1709FA7A}.Debug|Any CPU.Build.0 = Debug|Any CPU
39-
{6ED3CEE5-E2E5-4ACD-9788-455F1709FA7A}.Release|Any CPU.ActiveCfg = Release|Any CPU
40-
{6ED3CEE5-E2E5-4ACD-9788-455F1709FA7A}.Release|Any CPU.Build.0 = Release|Any CPU
41-
{B5DC3173-5FB8-44FF-A66D-401C38FA5293}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
42-
{B5DC3173-5FB8-44FF-A66D-401C38FA5293}.Debug|Any CPU.Build.0 = Debug|Any CPU
43-
{B5DC3173-5FB8-44FF-A66D-401C38FA5293}.Release|Any CPU.ActiveCfg = Release|Any CPU
44-
{B5DC3173-5FB8-44FF-A66D-401C38FA5293}.Release|Any CPU.Build.0 = Release|Any CPU
45-
{D2024203-2C55-4A11-AF48-9F83D3ED6133}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
46-
{D2024203-2C55-4A11-AF48-9F83D3ED6133}.Debug|Any CPU.Build.0 = Debug|Any CPU
47-
{D2024203-2C55-4A11-AF48-9F83D3ED6133}.Release|Any CPU.ActiveCfg = Release|Any CPU
48-
{D2024203-2C55-4A11-AF48-9F83D3ED6133}.Release|Any CPU.Build.0 = Release|Any CPU
49-
{D286E80D-7146-4EFD-8487-4EED618ED601}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
50-
{D286E80D-7146-4EFD-8487-4EED618ED601}.Debug|Any CPU.Build.0 = Debug|Any CPU
51-
{D286E80D-7146-4EFD-8487-4EED618ED601}.Release|Any CPU.ActiveCfg = Release|Any CPU
52-
{D286E80D-7146-4EFD-8487-4EED618ED601}.Release|Any CPU.Build.0 = Release|Any CPU
53-
{6599214B-B0E0-44C4-9B8B-ED56D03C2D21}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
54-
{6599214B-B0E0-44C4-9B8B-ED56D03C2D21}.Debug|Any CPU.Build.0 = Debug|Any CPU
55-
{6599214B-B0E0-44C4-9B8B-ED56D03C2D21}.Release|Any CPU.ActiveCfg = Release|Any CPU
56-
{6599214B-B0E0-44C4-9B8B-ED56D03C2D21}.Release|Any CPU.Build.0 = Release|Any CPU
29+
{DCD8A12E-B41A-41FD-AB69-0A18D86980D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
30+
{DCD8A12E-B41A-41FD-AB69-0A18D86980D7}.Debug|Any CPU.Build.0 = Debug|Any CPU
31+
{DCD8A12E-B41A-41FD-AB69-0A18D86980D7}.Release|Any CPU.ActiveCfg = Release|Any CPU
32+
{DCD8A12E-B41A-41FD-AB69-0A18D86980D7}.Release|Any CPU.Build.0 = Release|Any CPU
33+
{9E6BBA8F-8B71-439E-98EB-38ED360B6BA7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
34+
{9E6BBA8F-8B71-439E-98EB-38ED360B6BA7}.Debug|Any CPU.Build.0 = Debug|Any CPU
35+
{9E6BBA8F-8B71-439E-98EB-38ED360B6BA7}.Release|Any CPU.ActiveCfg = Release|Any CPU
36+
{9E6BBA8F-8B71-439E-98EB-38ED360B6BA7}.Release|Any CPU.Build.0 = Release|Any CPU
37+
{78941DBD-57C5-48C8-B4B9-7B73709F1AE4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
38+
{78941DBD-57C5-48C8-B4B9-7B73709F1AE4}.Debug|Any CPU.Build.0 = Debug|Any CPU
39+
{78941DBD-57C5-48C8-B4B9-7B73709F1AE4}.Release|Any CPU.ActiveCfg = Release|Any CPU
40+
{78941DBD-57C5-48C8-B4B9-7B73709F1AE4}.Release|Any CPU.Build.0 = Release|Any CPU
41+
{971ACFA1-3154-4FD2-BF5A-16AD9FBBD681}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
42+
{971ACFA1-3154-4FD2-BF5A-16AD9FBBD681}.Debug|Any CPU.Build.0 = Debug|Any CPU
43+
{971ACFA1-3154-4FD2-BF5A-16AD9FBBD681}.Release|Any CPU.ActiveCfg = Release|Any CPU
44+
{971ACFA1-3154-4FD2-BF5A-16AD9FBBD681}.Release|Any CPU.Build.0 = Release|Any CPU
45+
{7FF59606-3FA3-462E-AD78-209E93A57364}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
46+
{7FF59606-3FA3-462E-AD78-209E93A57364}.Debug|Any CPU.Build.0 = Debug|Any CPU
47+
{7FF59606-3FA3-462E-AD78-209E93A57364}.Release|Any CPU.ActiveCfg = Release|Any CPU
48+
{7FF59606-3FA3-462E-AD78-209E93A57364}.Release|Any CPU.Build.0 = Release|Any CPU
49+
{840FEB91-36C0-4966-B64E-70BA1400E163}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
50+
{840FEB91-36C0-4966-B64E-70BA1400E163}.Debug|Any CPU.Build.0 = Debug|Any CPU
51+
{840FEB91-36C0-4966-B64E-70BA1400E163}.Release|Any CPU.ActiveCfg = Release|Any CPU
52+
{840FEB91-36C0-4966-B64E-70BA1400E163}.Release|Any CPU.Build.0 = Release|Any CPU
53+
{84B79F07-2D74-40B0-AE90-82A090771AE8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
54+
{84B79F07-2D74-40B0-AE90-82A090771AE8}.Debug|Any CPU.Build.0 = Debug|Any CPU
55+
{84B79F07-2D74-40B0-AE90-82A090771AE8}.Release|Any CPU.ActiveCfg = Release|Any CPU
56+
{84B79F07-2D74-40B0-AE90-82A090771AE8}.Release|Any CPU.Build.0 = Release|Any CPU
5757
EndGlobalSection
5858
EndGlobal

src/StackHCI/examples/Get-AzStackHciArcSetting.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ Get-AzStackHciArcSetting -ResourceGroupName test-rg -ClusterName myCluster
44
```
55

66
```output
7-
Name ResourceGroupName
8-
---- -----------------
9-
default test-rg
7+
Resource Group AggregateState
8+
-------------- --------------
9+
test-rg Connected
1010
```
1111

1212
Gets arcSettings in a cluster. To see the details use : "Write-Host( $arcSettings | Format-List | Out-String)"

src/StackHCI/examples/Get-AzStackHciCluster.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Get-AzStackHciCluster -ResourceGroupName test-rg
44
```
55

66
```output
7-
Location Name ResourceGroupName
7+
Location Name Resource Group
88
-------- ---- -----------------
99
eastus myCluster3 test-rg
1010
eastus myCluster test-rg
@@ -19,7 +19,7 @@ Get-AzStackHciCluster -ResourceGroupName test-rg -ClusterName myCluster
1919
```
2020

2121
```output
22-
Location Name ResourceGroupName
22+
Location Name Resource Group
2323
-------- ---- -----------------
2424
eastus myCluster test-rg
2525
```

src/StackHCI/examples/Get-AzStackHciExtension.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Get-AzStackHciExtension -ResourceGroupName test-rg -ClusterName myCluster -ArcSe
44
```
55

66
```output
7-
Name ResourceGroupName
7+
Name Resource Group
88
---- -----------------
99
MicrosoftMonitoringAgent test-rg
1010
```
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
### Example 1:
2+
```powershell
3+
Invoke-AzStackHciConsentAndInstallDefaultExtensions -ResourceGroupName "test-rg" -ClusterName "test-clus"
4+
```
5+
6+
```output
7+
Resource Group AggregateState
8+
-------------- --------------
9+
test-rg Connected
10+
11+
```
12+
13+
Consent for installation of default extensions. ArcSettings resource is returned.
14+
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
### Example 1:
2+
```powershell
3+
Invoke-AzStackHciExtendClusterSoftwareAssuranceBenefit -ClusterName "test-clus" -ResourceGroupName "test-rg"
4+
```
5+
6+
```output
7+
```
8+
9+
Enable Software Assurance on a cluster, by default the intent is "enable".
10+
11+
### Example 2:
12+
```powershell
13+
Invoke-AzStackHciExtendClusterSoftwareAssuranceBenefit -ClusterName "test-clus" -ResourceGroupName "test-rg" -SoftwareAssuranceIntent "Disable"
14+
```
15+
16+
```output
17+
```
18+
19+
Disable Software Assurance on a cluster.
20+
21+

0 commit comments

Comments
 (0)