Skip to content

Commit

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

* Update ChangeLog.md

* Update SignatureIssues.csv

---------

Co-authored-by: Yabo Hu <[email protected]>
  • Loading branch information
azure-powershell-bot and VeryEarly authored Jul 23, 2024
1 parent d26c1bc commit 6981fa4
Show file tree
Hide file tree
Showing 458 changed files with 55,014 additions and 11,687 deletions.
1,496 changes: 1,459 additions & 37 deletions src/HdInsightOnAks/HdInsightOnAks.Autorest/Az.HdInsightOnAks.format.ps1xml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
DotNetFrameworkVersion = '4.7.2'
RequiredAssemblies = './bin/Az.HdInsightOnAks.private.dll'
FormatsToProcess = './Az.HdInsightOnAks.format.ps1xml'
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'
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'
PrivateData = @{
PSData = @{
Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'HdInsightOnAks'
Expand Down
41 changes: 38 additions & 3 deletions src/HdInsightOnAks/HdInsightOnAks.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ In this directory, run AutoRest:
### General settings
> Values
``` yaml
tag: package-preview-2023-11
commit: 754d31188c080f20b8155acdf8b8fbd77dace467
tag: package-preview-2024-05
commit: c766bb559e93067acf5a852e63f7edcee75a2f5b
require:
- $(this-folder)/../../readme.azure.noprofile.md
- $(repo)/specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/readme.md
Expand All @@ -71,6 +71,25 @@ default-exclude-tableview-properties: true
``` yaml
identity-correction-for-post: true
directive:
- model-cmdlet:
- model-name: ManagedIdentitySpec
cmdlet-name: New-AzHdInsightOnAksManagedIdentityObject
- model-name: ClusterHotfixUpgradeProperties
cmdlet-name: New-AzHdInsightOnAksClusterHotfixUpgradeObject
- model-name: ClusterPoolAksPatchVersionUpgradeProperties
cmdlet-name: New-AzHdInsightOnAksClusterPoolAksPatchVersionUpgradeObject
- model-name: NodeProfile
cmdlet-name: New-AzHdInsightOnAksNodeProfileObject
- model-name: SecretReference
cmdlet-name: New-AzHdInsightOnAksSecretReferenceObject
- model-name: HiveCatalogOption
cmdlet-name: New-AzHdInsightOnAksTrinoHiveCatalogObject
- model-name: ClusterConfigFile
cmdlet-name: New-AzHdInsightOnAksClusterConfigFileObject
- model-name: ClusterServiceConfig
cmdlet-name: New-AzHdInsightOnAksClusterServiceConfigObject
- model-name: ClusterServiceConfigsProfile
cmdlet-name: New-AzHdInsightOnAksClusterServiceConfigsProfileObject
- from: swagger-document
where: $.paths..responses.202
transform: delete $.headers
Expand Down Expand Up @@ -122,7 +141,17 @@ directive:
model-name: ClusterVersion
property-name: PropertiesClusterVersion
set:
property-name: ClusterVersionValue
property-name: ClusterVersionValue
- where:
model-name: SecretReference
property-name: KeyVaultObjectName
set:
property-name: SecretName
- where:
model-name: ClusterServiceConfig
property-name: Component
set:
property-name: ComponentName
# the below is cmdlet part
- where:
verb: New|Set
Expand Down Expand Up @@ -309,5 +338,11 @@ directive:
set:
parameter-name: FlinkHiveCatalogDbUserName
# The below customize the output model
- where:
verb: Update
subject: [Cluster|ClusterPool]
variant: [Upgrade|UpgradeExpanded|UpgradeViaIdentity|UpgradeViaIdentityExpanded|UpgradeViaJsonFilePath|UpgradeViaJsonString]
set:
verb: Upgrade

```
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "clusterpools/clusters",
"apiVersion": "2023-11-01-preview",
"apiVersion": "2024-05-01-preview",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.hdinsightonaks"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "clusterpools",
"apiVersion": "2023-11-01-preview",
"apiVersion": "2024-05-01-preview",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.hdinsightonaks"
},
Expand Down
14 changes: 12 additions & 2 deletions src/HdInsightOnAks/HdInsightOnAks.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 @@ -130,7 +130,7 @@ $examplesFolder = Join-Path $PSScriptRoot 'examples'
$null = New-Item -ItemType Directory -Force -Path $examplesFolder

Write-Host -ForegroundColor Green 'Creating cmdlets for specified models...'
$modelCmdlets = @()
$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"})
$modelCmdletFolder = Join-Path (Join-Path $PSScriptRoot './custom') 'autogen-model-cmdlets'
if (Test-Path $modelCmdletFolder) {
$null = Remove-Item -Force -Recurse -Path $modelCmdletFolder
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-------------'

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@

# ----------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
# is regenerated.
# ----------------------------------------------------------------------------------

<#
.Synopsis
Create an in-memory object for MavenLibraryProperties.
.Description
Create an in-memory object for MavenLibraryProperties.
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.HdInsightOnAks.Models.MavenLibraryProperties
.Link
https://learn.microsoft.com/powershell/module/Az.HdInsightOnAks/new-azhdinsightonaksclustermavenlibraryobject
#>
function New-AzHdInsightOnAksClusterMavenLibraryObject {
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.HdInsightOnAks.Models.IClusterLibrary')]
[CmdletBinding(PositionalBinding=$false)]
Param(

[Parameter(Mandatory, HelpMessage="GroupId of the Maven package.")]
[string]
$GroupId,
[Parameter(Mandatory, HelpMessage="ArtifactId of the Maven package.")]
[string]
$Name,
[Parameter(HelpMessage="Version of the Maven package.")]
[string]
$Version,
[Parameter(HelpMessage="Remark of the latest library management operation.")]
[string]
$Remark
)

process {
$Object = [Microsoft.Azure.PowerShell.Cmdlets.HdInsightOnAks.Models.MavenLibraryProperties]::New()

if ($PSBoundParameters.ContainsKey('GroupId')) {
$Object.GroupId = $GroupId
}
if ($PSBoundParameters.ContainsKey('Name')) {
$Object.Name = $Name
}
if ($PSBoundParameters.ContainsKey('Version')) {
$Object.Version = $Version
}
if ($PSBoundParameters.ContainsKey('Remark')) {
$Object.Remark = $Remark
}

$LibraryObj = [Microsoft.Azure.PowerShell.Cmdlets.HdInsightOnAks.Models.ClusterLibrary]::New()

$LibraryObj.Property = $Object

return $LibraryObj
}
}

This file was deleted.

Loading

0 comments on commit 6981fa4

Please sign in to comment.