Skip to content

Commit 5241065

Browse files
Migrate Compute from generation to main (#25422)
* Move Compute to main * Update ChangeLog.md * Create BreakingChangeIssues.csv --------- Co-authored-by: NoriZC <[email protected]>
1 parent 1e7af8e commit 5241065

File tree

357 files changed

+7036
-1699
lines changed

Some content is hidden

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

357 files changed

+7036
-1699
lines changed

src/Compute/Compute.Autorest/Az.Compute.format.ps1xml

Lines changed: 100 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@
102102
</TableControl>
103103
</View>
104104
<View>
105-
<Name>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ErrorDetail</Name>
105+
<Name>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api50.ErrorDetail</Name>
106106
<ViewSelectedBy>
107-
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ErrorDetail</TypeName>
107+
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api50.ErrorDetail</TypeName>
108108
</ViewSelectedBy>
109109
<TableControl>
110110
<TableHeaders>
@@ -136,9 +136,9 @@
136136
</TableControl>
137137
</View>
138138
<View>
139-
<Name>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ProxyResource</Name>
139+
<Name>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api50.ProxyResource</Name>
140140
<ViewSelectedBy>
141-
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ProxyResource</TypeName>
141+
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api50.ProxyResource</TypeName>
142142
</ViewSelectedBy>
143143
<TableControl>
144144
<TableHeaders>
@@ -194,9 +194,9 @@
194194
</TableControl>
195195
</View>
196196
<View>
197-
<Name>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ResourceAutoGenerated2</Name>
197+
<Name>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api50.ResourceAutoGenerated2</Name>
198198
<ViewSelectedBy>
199-
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.ResourceAutoGenerated2</TypeName>
199+
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api50.ResourceAutoGenerated2</TypeName>
200200
</ViewSelectedBy>
201201
<TableControl>
202202
<TableHeaders>
@@ -216,9 +216,9 @@
216216
</TableControl>
217217
</View>
218218
<View>
219-
<Name>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.SystemData</Name>
219+
<Name>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api50.SystemData</Name>
220220
<ViewSelectedBy>
221-
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api40.SystemData</TypeName>
221+
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api50.SystemData</TypeName>
222222
</ViewSelectedBy>
223223
<TableControl>
224224
<TableHeaders>
@@ -268,9 +268,9 @@
268268
</TableControl>
269269
</View>
270270
<View>
271-
<Name>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ComputeDiagnosticBase</Name>
271+
<Name>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240601Preview.ComputeDiagnosticBase</Name>
272272
<ViewSelectedBy>
273-
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ComputeDiagnosticBase</TypeName>
273+
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240601Preview.ComputeDiagnosticBase</TypeName>
274274
</ViewSelectedBy>
275275
<TableControl>
276276
<TableHeaders>
@@ -326,9 +326,9 @@
326326
</TableControl>
327327
</View>
328328
<View>
329-
<Name>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ComputeDiagnosticsList</Name>
329+
<Name>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240601Preview.ComputeDiagnosticsList</Name>
330330
<ViewSelectedBy>
331-
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ComputeDiagnosticsList</TypeName>
331+
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240601Preview.ComputeDiagnosticsList</TypeName>
332332
</ViewSelectedBy>
333333
<TableControl>
334334
<TableHeaders>
@@ -348,9 +348,9 @@
348348
</TableControl>
349349
</View>
350350
<View>
351-
<Name>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ComputeDiagnosticsOperationResult</Name>
351+
<Name>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240601Preview.ComputeDiagnosticsOperationResult</Name>
352352
<ViewSelectedBy>
353-
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ComputeDiagnosticsOperationResult</TypeName>
353+
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240601Preview.ComputeDiagnosticsOperationResult</TypeName>
354354
</ViewSelectedBy>
355355
<TableControl>
356356
<TableHeaders>
@@ -388,9 +388,9 @@
388388
</TableControl>
389389
</View>
390390
<View>
391-
<Name>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.DiagnosticProperties</Name>
391+
<Name>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240601Preview.DiagnosticProperties</Name>
392392
<ViewSelectedBy>
393-
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.DiagnosticProperties</TypeName>
393+
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240601Preview.DiagnosticProperties</TypeName>
394394
</ViewSelectedBy>
395395
<TableControl>
396396
<TableHeaders>
@@ -410,9 +410,9 @@
410410
</TableControl>
411411
</View>
412412
<View>
413-
<Name>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ErrorDetailAutoGenerated</Name>
413+
<Name>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240601Preview.ErrorDetailAutoGenerated</Name>
414414
<ViewSelectedBy>
415-
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ErrorDetailAutoGenerated</TypeName>
415+
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240601Preview.ErrorDetailAutoGenerated</TypeName>
416416
</ViewSelectedBy>
417417
<TableControl>
418418
<TableHeaders>
@@ -444,9 +444,9 @@
444444
</TableControl>
445445
</View>
446446
<View>
447-
<Name>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.PlacementScore</Name>
447+
<Name>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240601Preview.PlacementScore</Name>
448448
<ViewSelectedBy>
449-
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.PlacementScore</TypeName>
449+
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240601Preview.PlacementScore</TypeName>
450450
</ViewSelectedBy>
451451
<TableControl>
452452
<TableHeaders>
@@ -490,9 +490,9 @@
490490
</TableControl>
491491
</View>
492492
<View>
493-
<Name>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ResourceSize</Name>
493+
<Name>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240601Preview.ResourceSize</Name>
494494
<ViewSelectedBy>
495-
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.ResourceSize</TypeName>
495+
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240601Preview.ResourceSize</TypeName>
496496
</ViewSelectedBy>
497497
<TableControl>
498498
<TableHeaders>
@@ -512,9 +512,9 @@
512512
</TableControl>
513513
</View>
514514
<View>
515-
<Name>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.RunDiskInspectionInput</Name>
515+
<Name>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240601Preview.RunDiskInspectionInput</Name>
516516
<ViewSelectedBy>
517-
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.RunDiskInspectionInput</TypeName>
517+
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240601Preview.RunDiskInspectionInput</TypeName>
518518
</ViewSelectedBy>
519519
<TableControl>
520520
<TableHeaders>
@@ -546,9 +546,9 @@
546546
</TableControl>
547547
</View>
548548
<View>
549-
<Name>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.SpotPlacementRecommenderInput</Name>
549+
<Name>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240601Preview.SpotPlacementRecommenderInput</Name>
550550
<ViewSelectedBy>
551-
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.SpotPlacementRecommenderInput</TypeName>
551+
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240601Preview.SpotPlacementRecommenderInput</TypeName>
552552
</ViewSelectedBy>
553553
<TableControl>
554554
<TableHeaders>
@@ -580,9 +580,9 @@
580580
</TableControl>
581581
</View>
582582
<View>
583-
<Name>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.SpotPlacementRecommenderResponse</Name>
583+
<Name>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240601Preview.SpotPlacementRecommenderResponse</Name>
584584
<ViewSelectedBy>
585-
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.SpotPlacementRecommenderResponse</TypeName>
585+
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240601Preview.SpotPlacementRecommenderResponse</TypeName>
586586
</ViewSelectedBy>
587587
<TableControl>
588588
<TableHeaders>
@@ -614,9 +614,77 @@
614614
</TableControl>
615615
</View>
616616
<View>
617-
<Name>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.StorageConfigurationInput</Name>
617+
<Name>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240601Preview.SpotPlacementScoresInput</Name>
618618
<ViewSelectedBy>
619-
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.StorageConfigurationInput</TypeName>
619+
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240601Preview.SpotPlacementScoresInput</TypeName>
620+
</ViewSelectedBy>
621+
<TableControl>
622+
<TableHeaders>
623+
<TableColumnHeader>
624+
<Label>AvailabilityZone</Label>
625+
</TableColumnHeader>
626+
<TableColumnHeader>
627+
<Label>DesiredCount</Label>
628+
</TableColumnHeader>
629+
<TableColumnHeader>
630+
<Label>DesiredLocation</Label>
631+
</TableColumnHeader>
632+
</TableHeaders>
633+
<TableRowEntries>
634+
<TableRowEntry>
635+
<TableColumnItems>
636+
<TableColumnItem>
637+
<PropertyName>AvailabilityZone</PropertyName>
638+
</TableColumnItem>
639+
<TableColumnItem>
640+
<PropertyName>DesiredCount</PropertyName>
641+
</TableColumnItem>
642+
<TableColumnItem>
643+
<PropertyName>DesiredLocation</PropertyName>
644+
</TableColumnItem>
645+
</TableColumnItems>
646+
</TableRowEntry>
647+
</TableRowEntries>
648+
</TableControl>
649+
</View>
650+
<View>
651+
<Name>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240601Preview.SpotPlacementScoresResponse</Name>
652+
<ViewSelectedBy>
653+
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240601Preview.SpotPlacementScoresResponse</TypeName>
654+
</ViewSelectedBy>
655+
<TableControl>
656+
<TableHeaders>
657+
<TableColumnHeader>
658+
<Label>AvailabilityZone</Label>
659+
</TableColumnHeader>
660+
<TableColumnHeader>
661+
<Label>DesiredCount</Label>
662+
</TableColumnHeader>
663+
<TableColumnHeader>
664+
<Label>DesiredLocation</Label>
665+
</TableColumnHeader>
666+
</TableHeaders>
667+
<TableRowEntries>
668+
<TableRowEntry>
669+
<TableColumnItems>
670+
<TableColumnItem>
671+
<PropertyName>AvailabilityZone</PropertyName>
672+
</TableColumnItem>
673+
<TableColumnItem>
674+
<PropertyName>DesiredCount</PropertyName>
675+
</TableColumnItem>
676+
<TableColumnItem>
677+
<PropertyName>DesiredLocation</PropertyName>
678+
</TableColumnItem>
679+
</TableColumnItems>
680+
</TableRowEntry>
681+
</TableRowEntries>
682+
</TableControl>
683+
</View>
684+
<View>
685+
<Name>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240601Preview.StorageConfigurationInput</Name>
686+
<ViewSelectedBy>
687+
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240601Preview.StorageConfigurationInput</TypeName>
620688
</ViewSelectedBy>
621689
<TableControl>
622690
<TableHeaders>
@@ -636,9 +704,9 @@
636704
</TableControl>
637705
</View>
638706
<View>
639-
<Name>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.StorageConfigurationResponse</Name>
707+
<Name>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240601Preview.StorageConfigurationResponse</Name>
640708
<ViewSelectedBy>
641-
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240301Preview.StorageConfigurationResponse</TypeName>
709+
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20240601Preview.StorageConfigurationResponse</TypeName>
642710
</ViewSelectedBy>
643711
<TableControl>
644712
<TableHeaders>

src/Compute/Compute.Autorest/Az.Compute.psd1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
DotNetFrameworkVersion = '4.7.2'
1212
RequiredAssemblies = './bin/Az.Compute.private.dll'
1313
FormatsToProcess = './Az.Compute.format.ps1xml'
14-
FunctionsToExport = 'Get-AzGalleryApplication', 'Get-AzGalleryApplicationVersion', 'Invoke-AzSpotPlacementRecommender', 'New-AzGalleryApplication', 'New-AzGalleryApplicationVersion', 'Remove-AzGalleryApplication', 'Remove-AzGalleryApplicationVersion', 'Remove-AzVMRunCommand', 'Remove-AzVmssVMRunCommand', 'Set-AzVMRunCommand', 'Set-AzVmssVMRunCommand', 'Update-AzGalleryApplication', 'Update-AzGalleryApplicationVersion', '*'
15-
AliasesToExport = '*'
14+
FunctionsToExport = 'Get-AzGalleryApplication', 'Get-AzGalleryApplicationVersion', 'Invoke-AzSpotPlacementScore', 'New-AzGalleryApplication', 'New-AzGalleryApplicationVersion', 'Remove-AzGalleryApplication', 'Remove-AzGalleryApplicationVersion', 'Remove-AzVMRunCommand', 'Remove-AzVmssVMRunCommand', 'Set-AzVMRunCommand', 'Set-AzVmssVMRunCommand', 'Update-AzGalleryApplication', 'Update-AzGalleryApplicationVersion', '*'
15+
AliasesToExport = 'Invoke-AzSpotPlacementRecommender', '*'
1616
PrivateData = @{
1717
PSData = @{
1818
Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'Compute'

src/Compute/Compute.Autorest/README.md

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ For information on how to develop for `Az.Compute`, see [how-to.md](how-to.md).
2626
### AutoRest Configuration
2727
> see https://aka.ms/autorest
2828
``` yaml
29-
commit: 77c47a7fba8d8b900595966b81d6bb92a0308370
29+
commit: 6f498e0646e1bb978b8b6f8b4e701938dd79df2b
3030
require:
3131
# readme.azure.noprofile.md is the common configuration file
3232
- $(this-folder)/../../readme.azure.noprofile.md
@@ -35,7 +35,7 @@ input-file:
3535
- $(repo)/specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2022-01-03/gallery.json
3636
- $(repo)/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2023-07-01/runCommand.json
3737
- $(repo)/specification/compute/resource-manager/Microsoft.Compute/common-types/v1/common.json
38-
- $(repo)/specification/compute/resource-manager/Microsoft.Compute/DiagnosticRP/preview/2024-03-01-preview/diagnostic.json
38+
- $(repo)/specification/compute/resource-manager/Microsoft.Compute/DiagnosticRP/preview/2024-06-01-preview/diagnostic.json
3939
# If the swagger has not been put in the repo, you may uncomment the following line and refer to it locally
4040
module-version: 0.3.0
4141
# Normally, title is the service name
@@ -233,7 +233,7 @@ directive:
233233
subject: VMRunCommand|VmssVMRunCommand
234234
verb: Get
235235
remove: true
236-
### Remove All Diagnostic cmdlets aside from Invoke Spot Placement Recommender - generate ONLY SpotPlacementRecommender cmdlets
236+
### Remove All Diagnostic cmdlets aside from Invoke Spot Placement Recommender - generate ONLY SpotPlacementScore cmdlets
237237
- where:
238238
verb: Get
239239
subject: Diagnostic
@@ -262,4 +262,23 @@ directive:
262262
verb: Get
263263
subject: SpotPlacementRecommender
264264
remove: true
265+
- where:
266+
verb: Get
267+
subject: SpotPlacementScore
268+
remove: true
269+
270+
## Add Alias for Invoke-AzSpotPlacementScore
271+
- where:
272+
verb: Invoke
273+
subject: SpotPlacementRecommender
274+
remove: true
275+
- where:
276+
verb: Invoke
277+
subject: SpotPlacementScore
278+
set:
279+
alias: Invoke-AzSpotPlacementRecommender
280+
- where:
281+
parameter-name: SpotPlacementScoresInput
282+
set:
283+
alias: SpotPlacementRecommenderInput
265284
```

src/Compute/Compute.Autorest/UX/Microsoft.Compute/locations.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
{
22
"resourceType": "locations",
3-
"apiVersion": "2024-03-01-preview",
3+
"apiVersion": "2024-06-01-preview",
44
"learnMore": {
55
"url": "https://learn.microsoft.com/powershell/module/az.compute"
66
},
77
"commands": [
88
{
9-
"name": "Invoke-AzSpotPlacementRecommender",
9+
"name": "Invoke-AzSpotPlacementScore",
1010
"description": "Generates placement scores for Spot VM skus.",
11-
"path": "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/diagnostics/spotPlacementRecommender/generate",
11+
"path": "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/placementScores/spot/generate",
1212
"help": {
1313
"learnMore": {
14-
"url": "https://learn.microsoft.com/powershell/module/az.compute/invoke-azspotplacementrecommender"
14+
"url": "https://learn.microsoft.com/powershell/module/az.compute/invoke-azspotplacementscore"
1515
},
1616
"parameterSets": [
1717
{

src/Compute/Compute.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]$Isolated, [switch]$Run, [switch]$Test, [switch]$Docs, [switch]$Pack, [switch]$Code, [switch]$Release, [switch]$Debugger, [switch]$NoDocs)
15+
param([switch]$Isolated, [switch]$Run, [switch]$Test, [switch]$Docs, [switch]$Pack, [switch]$Code, [switch]$Release, [switch]$Debugger, [switch]$NoDocs, [Switch]$DisableAfterBuildTasks)
1616
$ErrorActionPreference = 'Stop'
1717

1818
if($PSEdition -ne 'Core') {
@@ -169,4 +169,14 @@ if (Test-Path (Join-Path $PSScriptRoot 'generate-portal-ux.ps1'))
169169
. (Join-Path $PSScriptRoot 'generate-portal-ux.ps1')
170170
}
171171

172+
if (-not $DisableAfterBuildTasks){
173+
$afterBuildTasksPath = Join-Path $PSScriptRoot ''
174+
$afterBuildTasksArgs = ConvertFrom-Json 'true' -AsHashtable
175+
if(Test-Path -Path $afterBuildTasksPath -PathType leaf){
176+
Write-Host -ForegroundColor Green 'Running after build tasks...'
177+
. $afterBuildTasksPath @afterBuildTasksArgs
178+
}
179+
}
180+
181+
172182
Write-Host -ForegroundColor Green '-------------Done-------------'

0 commit comments

Comments
 (0)