Skip to content

Commit

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

* Upgraded managed identity parameters for CustomLocation

* Updated example issue exception for managed identity

* Updated example issue exception of Get-AzConnectedKubernetes and Get-AzKubernetesExtension

---------

Co-authored-by: JoyerJin <116236375+JoyerJin@users.noreply.github.com>
  • Loading branch information
azure-powershell-bot and JoyerJin authored May 11, 2024
1 parent abaa452 commit 90f8082
Show file tree
Hide file tree
Showing 45 changed files with 2,209 additions and 3,712 deletions.
18 changes: 9 additions & 9 deletions src/CustomLocation/CustomLocation.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ input-file:
module-version: 0.1.0
title: CustomLocation
subject-prefix: $(service-name)
disable-transform-identity-type: true
flatten-userassignedidentity: false

identity-correction-for-post: true

Expand All @@ -62,7 +60,6 @@ directive:
}
}
}
- from: swagger-document
where: $.definitions.customLocationProperties.properties.provisioningState
transform: >-
Expand All @@ -88,8 +85,16 @@ directive:
where: $
transform: return $.replace(/\{resourceName\}\/enabledResourceTypes/g, "{resourceName}/enabledresourcetypes")

- from: swagger-document
where: $.definitions.customLocation
transform: $['required'] = ['properties']

- from: swagger-document
where: $.definitions.customLocationProperties
transform: $['required'] = ['clusterExtensionIds', 'hostResourceId', 'namespace']

- where:
variant: ^(Create|Update).*(?<!Expanded|JsonFilePath|JsonString)$
variant: ^(Create|Update)(?!.*?(Expanded|JsonFilePath|JsonString))
remove: true
- where:
subject: CustomLocation
Expand All @@ -115,11 +120,6 @@ directive:
subject: CustomLocationOperation
hide: true

- where:
verb: New|Update
subject: CustomLocation
hide: true

- where:
subject: ^CustomLocation$|^CustomLocationEnabledResourceType$
parameter-name: ResourceName
Expand Down
12 changes: 11 additions & 1 deletion src/CustomLocation/CustomLocation.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-------------'

This file was deleted.

Loading

0 comments on commit 90f8082

Please sign in to comment.