Skip to content

Commit fb2fec6

Browse files
authored
Revert "Migrate HdInsightOnAks from generation to main (#25611)" (#25684)
This reverts commit 6981fa4.
1 parent 923aab5 commit fb2fec6

File tree

458 files changed

+11278
-54605
lines changed

Some content is hidden

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

458 files changed

+11278
-54605
lines changed

src/HdInsightOnAks/HdInsightOnAks.Autorest/Az.HdInsightOnAks.format.ps1xml

Lines changed: 42 additions & 1464 deletions
Large diffs are not rendered by default.

src/HdInsightOnAks/HdInsightOnAks.Autorest/Az.HdInsightOnAks.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
DotNetFrameworkVersion = '4.7.2'
1212
RequiredAssemblies = './bin/Az.HdInsightOnAks.private.dll'
1313
FormatsToProcess = './Az.HdInsightOnAks.format.ps1xml'
14-
FunctionsToExport = 'Get-AzHdInsightOnAksAvailableClusterPoolVersion', 'Get-AzHdInsightOnAksAvailableClusterVersion', 'Get-AzHdInsightOnAksCluster', 'Get-AzHdInsightOnAksClusterAvailableUpgrade', 'Get-AzHdInsightOnAksClusterInstanceView', 'Get-AzHdInsightOnAksClusterJob', 'Get-AzHdInsightOnAksClusterLibrary', 'Get-AzHdInsightOnAksClusterPool', 'Get-AzHdInsightOnAksClusterPoolAvailableUpgrade', 'Get-AzHdInsightOnAksClusterPoolUpgradeHistory', 'Get-AzHdInsightOnAksClusterServiceConfig', 'Get-AzHdInsightOnAksClusterUpgradeHistory', 'Invoke-AzHdInsightOnAksManageClusterLibrary', 'New-AzHdInsightOnAksCluster', 'New-AzHdInsightOnAksClusterConfigFileObject', 'New-AzHdInsightOnAksClusterHotfixUpgradeObject', 'New-AzHdInsightOnAksClusterMavenLibraryObject', 'New-AzHdInsightOnAksClusterPool', 'New-AzHdInsightOnAksClusterPoolAksPatchVersionUpgradeObject', 'New-AzHdInsightOnAksClusterPyPiLibraryObject', 'New-AzHdInsightOnAksClusterServiceConfigObject', 'New-AzHdInsightOnAksClusterServiceConfigsProfileObject', 'New-AzHdInsightOnAksFlinkJobObject', 'New-AzHdInsightOnAksManagedIdentityObject', 'New-AzHdInsightOnAksNodeProfileObject', 'New-AzHdInsightOnAksSecretReferenceObject', 'New-AzHdInsightOnAksTrinoHiveCatalogObject', 'Remove-AzHdInsightOnAksCluster', 'Remove-AzHdInsightOnAksClusterPool', 'Resize-AzHdInsightOnAksCluster', 'Set-AzHdInsightOnAksClusterPool', 'Start-AzHdInsightOnAksClusterJob', 'Test-AzHdInsightOnAksLocationNameAvailability', 'Update-AzHdInsightOnAksCluster', 'Update-AzHdInsightOnAksClusterPoolTag', 'Upgrade-AzHdInsightOnAksCluster', 'Upgrade-AzHdInsightOnAksClusterManualRollback', 'Upgrade-AzHdInsightOnAksClusterPool'
14+
FunctionsToExport = 'Get-AzHdInsightOnAksAvailableClusterPoolVersion', 'Get-AzHdInsightOnAksAvailableClusterVersion', 'Get-AzHdInsightOnAksCluster', 'Get-AzHdInsightOnAksClusterAvailableUpgrade', 'Get-AzHdInsightOnAksClusterInstanceView', 'Get-AzHdInsightOnAksClusterJob', 'Get-AzHdInsightOnAksClusterPool', 'Get-AzHdInsightOnAksClusterPoolAvailableUpgrade', 'Get-AzHdInsightOnAksClusterServiceConfig', 'New-AzHdInsightOnAksCluster', 'New-AzHdInsightOnAksClusterConfigFileObject', 'New-AzHdInsightOnAksClusterHotfixUpgradeObject', 'New-AzHdInsightOnAksClusterPool', 'New-AzHdInsightOnAksClusterPoolAKSUpgradeObject', 'New-AzHdInsightOnAksClusterServiceConfigObject', 'New-AzHdInsightOnAksClusterServiceConfigsProfileObject', 'New-AzHdInsightOnAksFlinkJobObject', 'New-AzHdInsightOnAksNodeProfileObject', 'New-AzHdInsightOnAksSecretReferenceObject', 'New-AzHdInsightOnAksTrinoHiveCatalogObject', 'Remove-AzHdInsightOnAksCluster', 'Remove-AzHdInsightOnAksClusterPool', 'Resize-AzHdInsightOnAksCluster', 'Set-AzHdInsightOnAksClusterPool', 'Start-AzHdInsightOnAksClusterJob', 'Test-AzHdInsightOnAksLocationNameAvailability', 'Update-AzHdInsightOnAksCluster', 'Update-AzHdInsightOnAksClusterPool', 'Update-AzHdInsightOnAksClusterPoolTag'
1515
PrivateData = @{
1616
PSData = @{
1717
Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'HdInsightOnAks'

src/HdInsightOnAks/HdInsightOnAks.Autorest/README.md

Lines changed: 3 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ In this directory, run AutoRest:
4646
### General settings
4747
> Values
4848
``` yaml
49-
tag: package-preview-2024-05
50-
commit: c766bb559e93067acf5a852e63f7edcee75a2f5b
49+
tag: package-preview-2023-11
50+
commit: 754d31188c080f20b8155acdf8b8fbd77dace467
5151
require:
5252
- $(this-folder)/../../readme.azure.noprofile.md
5353
- $(repo)/specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/readme.md
@@ -71,25 +71,6 @@ default-exclude-tableview-properties: true
7171
``` yaml
7272
identity-correction-for-post: true
7373
directive:
74-
- model-cmdlet:
75-
- model-name: ManagedIdentitySpec
76-
cmdlet-name: New-AzHdInsightOnAksManagedIdentityObject
77-
- model-name: ClusterHotfixUpgradeProperties
78-
cmdlet-name: New-AzHdInsightOnAksClusterHotfixUpgradeObject
79-
- model-name: ClusterPoolAksPatchVersionUpgradeProperties
80-
cmdlet-name: New-AzHdInsightOnAksClusterPoolAksPatchVersionUpgradeObject
81-
- model-name: NodeProfile
82-
cmdlet-name: New-AzHdInsightOnAksNodeProfileObject
83-
- model-name: SecretReference
84-
cmdlet-name: New-AzHdInsightOnAksSecretReferenceObject
85-
- model-name: HiveCatalogOption
86-
cmdlet-name: New-AzHdInsightOnAksTrinoHiveCatalogObject
87-
- model-name: ClusterConfigFile
88-
cmdlet-name: New-AzHdInsightOnAksClusterConfigFileObject
89-
- model-name: ClusterServiceConfig
90-
cmdlet-name: New-AzHdInsightOnAksClusterServiceConfigObject
91-
- model-name: ClusterServiceConfigsProfile
92-
cmdlet-name: New-AzHdInsightOnAksClusterServiceConfigsProfileObject
9374
- from: swagger-document
9475
where: $.paths..responses.202
9576
transform: delete $.headers
@@ -141,17 +122,7 @@ directive:
141122
model-name: ClusterVersion
142123
property-name: PropertiesClusterVersion
143124
set:
144-
property-name: ClusterVersionValue
145-
- where:
146-
model-name: SecretReference
147-
property-name: KeyVaultObjectName
148-
set:
149-
property-name: SecretName
150-
- where:
151-
model-name: ClusterServiceConfig
152-
property-name: Component
153-
set:
154-
property-name: ComponentName
125+
property-name: ClusterVersionValue
155126
# the below is cmdlet part
156127
- where:
157128
verb: New|Set
@@ -338,11 +309,5 @@ directive:
338309
set:
339310
parameter-name: FlinkHiveCatalogDbUserName
340311
# The below customize the output model
341-
- where:
342-
verb: Update
343-
subject: [Cluster|ClusterPool]
344-
variant: [Upgrade|UpgradeExpanded|UpgradeViaIdentity|UpgradeViaIdentityExpanded|UpgradeViaJsonFilePath|UpgradeViaJsonString]
345-
set:
346-
verb: Upgrade
347312

348313
```

src/HdInsightOnAks/HdInsightOnAks.Autorest/UX/Microsoft.HDInsight/clusterpools-clusters.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"resourceType": "clusterpools/clusters",
3-
"apiVersion": "2024-05-01-preview",
3+
"apiVersion": "2023-11-01-preview",
44
"learnMore": {
55
"url": "https://learn.microsoft.com/powershell/module/az.hdinsightonaks"
66
},

src/HdInsightOnAks/HdInsightOnAks.Autorest/UX/Microsoft.HDInsight/clusterpools.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"resourceType": "clusterpools",
3-
"apiVersion": "2024-05-01-preview",
3+
"apiVersion": "2023-11-01-preview",
44
"learnMore": {
55
"url": "https://learn.microsoft.com/powershell/module/az.hdinsightonaks"
66
},

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

Lines changed: 2 additions & 12 deletions
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, [Switch]$DisableAfterBuildTasks)
15+
param([switch]$NotIsolated, [switch]$Run, [switch]$Test, [switch]$Docs, [switch]$Pack, [switch]$Code, [switch]$Release, [switch]$Debugger, [switch]$NoDocs, [switch]$UX)
1616
$ErrorActionPreference = 'Stop'
1717

1818
if($PSEdition -ne 'Core') {
@@ -130,7 +130,7 @@ $examplesFolder = Join-Path $PSScriptRoot 'examples'
130130
$null = New-Item -ItemType Directory -Force -Path $examplesFolder
131131

132132
Write-Host -ForegroundColor Green 'Creating cmdlets for specified models...'
133-
$modelCmdlets = @(@{modelName="ManagedIdentitySpec"; cmdletName="New-AzHdInsightOnAksManagedIdentityObject"}, @{modelName="ClusterHotfixUpgradeProperties"; cmdletName="New-AzHdInsightOnAksClusterHotfixUpgradeObject"}, @{modelName="ClusterPoolAksPatchVersionUpgradeProperties"; cmdletName="New-AzHdInsightOnAksClusterPoolAksPatchVersionUpgradeObject"}, @{modelName="NodeProfile"; cmdletName="New-AzHdInsightOnAksNodeProfileObject"}, @{modelName="SecretReference"; cmdletName="New-AzHdInsightOnAksSecretReferenceObject"}, @{modelName="HiveCatalogOption"; cmdletName="New-AzHdInsightOnAksTrinoHiveCatalogObject"}, @{modelName="ClusterConfigFile"; cmdletName="New-AzHdInsightOnAksClusterConfigFileObject"}, @{modelName="ClusterServiceConfig"; cmdletName="New-AzHdInsightOnAksClusterServiceConfigObject"}, @{modelName="ClusterServiceConfigsProfile"; cmdletName="New-AzHdInsightOnAksClusterServiceConfigsProfileObject"})
133+
$modelCmdlets = @()
134134
$modelCmdletFolder = Join-Path (Join-Path $PSScriptRoot './custom') 'autogen-model-cmdlets'
135135
if (Test-Path $modelCmdletFolder) {
136136
$null = Remove-Item -Force -Recurse -Path $modelCmdletFolder
@@ -177,14 +177,4 @@ 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-
190180
Write-Host -ForegroundColor Green '-------------Done-------------'
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# ----------------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
# Code generated by Microsoft (R) AutoRest Code Generator.
5+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
6+
# ----------------------------------------------------------------------------------
7+
8+
<#
9+
.Synopsis
10+
Create cluster config file.
11+
.Description
12+
Create cluster config file.
13+
.Example
14+
$coreSiteConfigFile=New-AzHDInsightAksClusterConfigFile -FileName "core-site.xml" -Value @{"fs.defaultFS"="abfs://testcontainer@$teststorage.dfs.core.windows.net"}
15+
16+
.Inputs
17+
System.Collections.HashTable
18+
.Outputs
19+
Microsoft.Azure.PowerShell.Cmdlets.HdInsightOnAks.Models.IClusterConfigFile
20+
.Notes
21+
22+
.Link
23+
https://learn.microsoft.com/powershell/module/az.hdinsightonaks/New-AzHdInsightOnAksClusterConfigFileObject
24+
#>
25+
function New-AzHdInsightOnAksClusterConfigFileObject {
26+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.HdInsightOnAks.Models.IClusterConfigFile])]
27+
[CmdletBinding(DefaultParameterSetName = 'Create', PositionalBinding = $false)]
28+
param(
29+
[Parameter(ParameterSetName = 'Create', Mandatory)]
30+
[Alias('Name')]
31+
[System.String]
32+
# The name of the config file.
33+
${FileName},
34+
35+
[Parameter(ParameterSetName = 'Create', Mandatory)]
36+
[System.Collections.HashTable]
37+
# List of key value pairs where key represents a valid service configuration name and value represents the value of the config.
38+
${Value}
39+
)
40+
41+
process {
42+
try {
43+
$configFileValue = New-Object Microsoft.Azure.PowerShell.Cmdlets.HdInsightOnAks.Models.ClusterConfigFileValues
44+
45+
foreach ($item in $Value.GetEnumerator()) {
46+
$configFileValue.Add($item.Name, $item.Value)
47+
}
48+
49+
$configFile = New-Object Microsoft.Azure.PowerShell.Cmdlets.HdInsightOnAks.Models.ClusterConfigFile -Property @{FileName = $FileName; Value = $configFileValue }
50+
return $configFile
51+
}
52+
catch {
53+
54+
throw
55+
}
56+
57+
finally {
58+
59+
}
60+
}
61+
}
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# ----------------------------------------------------------------------------------
2+
#
3+
# Copyright Microsoft Corporation
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
# Unless required by applicable law or agreed to in writing, software
9+
# distributed under the License is distributed on an "AS IS" BASIS,
10+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
# See the License for the specific language governing permissions and
12+
# limitations under the License.
13+
# ----------------------------------------------------------------------------------
14+
15+
<#
16+
.Synopsis
17+
Create an object to hold the cluster upgrade parameters.
18+
.Description
19+
Create an object to hold the cluster upgrade parameters.
20+
21+
.Outputs
22+
Microsoft.Azure.PowerShell.Cmdlets.HdInsightOnAks.Models.ClusterUpgrade
23+
.Link
24+
https://learn.microsoft.com/powershell/module/az.hdinsightonaks/New-AzHdInsightOnAksClusterHotfixUpgradeObject
25+
#>
26+
function New-AzHdInsightOnAksClusterHotfixUpgradeObject {
27+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.HdInsightOnAks.Models.IClusterUpgrade])]
28+
[CmdletBinding(DefaultParameterSetName = 'Create', PositionalBinding = $false)]
29+
param(
30+
[Parameter(ParameterSetName = 'Create')]
31+
[System.String]
32+
# Name of component to be upgraded.
33+
${ComponentName},
34+
35+
[Parameter(ParameterSetName = 'Create')]
36+
[System.String]
37+
# Target build number of component to be upgraded.
38+
${TargetBuildNumber},
39+
40+
[Parameter(ParameterSetName = 'Create')]
41+
[System.String]
42+
# Target cluster version of component to be upgraded.
43+
${TargetClusterVersion},
44+
45+
[Parameter(ParameterSetName = 'Create')]
46+
[System.String]
47+
# Target OSS version of component to be upgraded.
48+
${TargetOssVersion}
49+
)
50+
process {
51+
try {
52+
$hotfixProperty = New-Object Microsoft.Azure.PowerShell.Cmdlets.HdInsightOnAks.Models.ClusterHotfixUpgradeProperties -Property `
53+
@{ComponentName = $ComponentName;
54+
TargetBuildNumber = $TargetBuildNumber;
55+
TargetClusterVersion = $TargetClusterVersion;
56+
TargetOssVersion = $TargetOssVersion;
57+
}
58+
59+
$hotfixObject = New-Object Microsoft.Azure.PowerShell.Cmdlets.HdInsightOnAks.Models.ClusterUpgrade -Property `
60+
@{Property = $hotfixProperty }
61+
62+
return $hotfixObject
63+
}
64+
catch {
65+
throw
66+
}
67+
}
68+
}

src/HdInsightOnAks/HdInsightOnAks.Autorest/custom/New-AzHdInsightOnAksClusterMavenLibraryObject.ps1

Lines changed: 0 additions & 70 deletions
This file was deleted.
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# ----------------------------------------------------------------------------------
2+
#
3+
# Copyright Microsoft Corporation
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
# Unless required by applicable law or agreed to in writing, software
9+
# distributed under the License is distributed on an "AS IS" BASIS,
10+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
# See the License for the specific language governing permissions and
12+
# limitations under the License.
13+
# ----------------------------------------------------------------------------------
14+
15+
<#
16+
.Synopsis
17+
Create an object to hold the cluster pool upgrade parameters.
18+
.Description
19+
Create an object to hold the cluster pool upgrade parameters.
20+
21+
.Outputs
22+
Microsoft.Azure.PowerShell.Cmdlets.HdInsightOnAks.Models.ClusterPoolUpgrade
23+
.Link
24+
https://learn.microsoft.com/powershell/module/az.hdinsightonaks/New-AzHdInsightOnAksClusterPoolAKSUpgradeObject
25+
#>
26+
function New-AzHdInsightOnAksClusterPoolAKSUpgradeObject {
27+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.HdInsightOnAks.Models.IClusterPoolUpgrade])]
28+
[CmdletBinding(DefaultParameterSetName = 'Create', PositionalBinding = $false)]
29+
param(
30+
[Parameter(ParameterSetName = 'Create')]
31+
[System.String]
32+
# Target AKS version. When it's not set, latest version will be used. When upgradeClusterPool is true and upgradeAllClusterNodes is false, target version should be greater or equal to current version. When upgradeClusterPool is false and upgradeAllClusterNodes is true, target version should be equal to AKS version of cluster pool.
33+
${TargetAksVersion},
34+
35+
[Parameter(ParameterSetName = 'Create')]
36+
[System.String]
37+
# whether upgrade all clusters' nodes. If it's true, upgradeClusterPool should be false.
38+
${UpgradeAllClusterNode},
39+
40+
[Parameter(ParameterSetName = 'Create')]
41+
[System.String]
42+
# whether upgrade cluster pool or not. If it's true, upgradeAllClusterNodes should be false.
43+
${UpgradeClusterPool}
44+
)
45+
process {
46+
try {
47+
$aksPatchProperty = New-Object Microsoft.Azure.PowerShell.Cmdlets.HdInsightOnAks.Models.ClusterPoolAksPatchVersionUpgradeProperties -Property `
48+
@{TargetAksVersion = $TargetAksVersion;
49+
UpgradeAllClusterNode = $UpgradeAllClusterNode;
50+
UpgradeClusterPool = $UpgradeClusterPool;
51+
}
52+
53+
$AKSPatchatchObject = New-Object Microsoft.Azure.PowerShell.Cmdlets.HdInsightOnAks.Models.ClusterPoolUpgrade -Property `
54+
@{Property = $aksPatchProperty }
55+
56+
return $AKSPatchatchObject
57+
}
58+
catch {
59+
throw
60+
}
61+
}
62+
}

0 commit comments

Comments
 (0)