Skip to content

Commit 90f8082

Browse files
Migrate CustomLocation from generation to main (#24889)
* 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 <[email protected]>
1 parent abaa452 commit 90f8082

File tree

45 files changed

+2209
-3712
lines changed

Some content is hidden

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

45 files changed

+2209
-3712
lines changed

src/CustomLocation/CustomLocation.Autorest/README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ input-file:
3636
module-version: 0.1.0
3737
title: CustomLocation
3838
subject-prefix: $(service-name)
39-
disable-transform-identity-type: true
40-
flatten-userassignedidentity: false
4139

4240
identity-correction-for-post: true
4341

@@ -62,7 +60,6 @@ directive:
6260
}
6361
}
6462
}
65-
6663
- from: swagger-document
6764
where: $.definitions.customLocationProperties.properties.provisioningState
6865
transform: >-
@@ -88,8 +85,16 @@ directive:
8885
where: $
8986
transform: return $.replace(/\{resourceName\}\/enabledResourceTypes/g, "{resourceName}/enabledresourcetypes")
9087

88+
- from: swagger-document
89+
where: $.definitions.customLocation
90+
transform: $['required'] = ['properties']
91+
92+
- from: swagger-document
93+
where: $.definitions.customLocationProperties
94+
transform: $['required'] = ['clusterExtensionIds', 'hostResourceId', 'namespace']
95+
9196
- where:
92-
variant: ^(Create|Update).*(?<!Expanded|JsonFilePath|JsonString)$
97+
variant: ^(Create|Update)(?!.*?(Expanded|JsonFilePath|JsonString))
9398
remove: true
9499
- where:
95100
subject: CustomLocation
@@ -115,11 +120,6 @@ directive:
115120
subject: CustomLocationOperation
116121
hide: true
117122

118-
- where:
119-
verb: New|Update
120-
subject: CustomLocation
121-
hide: true
122-
123123
- where:
124124
subject: ^CustomLocation$|^CustomLocationEnabledResourceType$
125125
parameter-name: ResourceName

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

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

1818
if($PSEdition -ne 'Core') {
@@ -177,4 +177,14 @@ 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+
180190
Write-Host -ForegroundColor Green '-------------Done-------------'

src/CustomLocation/CustomLocation.Autorest/custom/New-AzCustomLocation.ps1

Lines changed: 0 additions & 206 deletions
This file was deleted.

0 commit comments

Comments
 (0)