Skip to content

Commit 9450fb7

Browse files
Pan-QiJoyerJinjaskisin
authored
migrate workloads sapVirtualInstance to autorest v4 (#28275)
Co-authored-by: JoyerJin <116236375+JoyerJin@users.noreply.github.com> Co-authored-by: Jaskirat Singh <108129510+jaskisin@users.noreply.github.com>
1 parent 58eb658 commit 9450fb7

File tree

94 files changed

+71870
-74368
lines changed

Some content is hidden

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

94 files changed

+71870
-74368
lines changed

src/Workloads/SapVirtualInstance.Autorest/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")]
2121
[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")]
2222
[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - SapVirtualInstance")]
23-
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0")]
24-
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0")]
23+
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.1")]
24+
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.1")]
2525
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
2626
[assembly: System.CLSCompliantAttribute(false)]

src/Workloads/SapVirtualInstance.Autorest/README.md

Lines changed: 17 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -44,39 +44,22 @@ root-module-name: $(prefix).Workloads
4444
title: SapVirtualInstance
4545
subject-prefix: Workloads
4646
namespace: Microsoft.Azure.PowerShell.Cmdlets.Workloads.SapVirtualInstance
47-
resourcegroup-append: true
48-
identity-correction-for-post: true
49-
nested-object-to-string: true
50-
#add-api-version-in-model-namespace: true
5147
inlining-threshold: 100
5248

53-
# For new modules, please avoid setting 3.x using the use-extension method and instead, use 4.x as the default option
54-
use-extension:
55-
"@autorest/powershell": "3.x"
49+
flatten-userassignedidentity: false
50+
disable-transform-identity-type: true
5651

5752
directive:
5853
- where:
59-
verb: New
60-
subject: ^SapApplicationServerInstance$
61-
remove: true
62-
63-
- where:
64-
verb: Stop
65-
subject: ^SapApplicationServerInstance$
66-
variant: ^Stop$|^StopViaIdentity$
54+
variant: ^(Stop|Update)(?!.*?(Expanded|JsonFilePath|JsonString))
6755
remove: true
6856

6957
- where:
70-
verb: Update
71-
subject: ^SapApplicationServerInstance$
72-
variant: ^Update$|^UpdateViaIdentity$
73-
remove: true
74-
75-
- where:
76-
verb: Remove
77-
subject: ^SapApplicationServerInstance$
58+
verb: New|Remove
59+
subject: ^SapApplicationServerInstance$|^SapCentralServerInstance$|^SapDatabaseInstance$
7860
remove: true
7961

62+
#SapApplicationInstance
8063
- where:
8164
subject: SapApplicationServerInstance
8265
set:
@@ -89,28 +72,6 @@ directive:
8972
parameter-name: Name
9073

9174
# SapCentralInstance
92-
- where:
93-
verb: New
94-
subject: ^SapCentralServerInstance$
95-
remove: true
96-
97-
- where:
98-
verb: Stop
99-
subject: ^SapCentralServerInstance$
100-
variant: ^Stop$|^StopViaIdentity$
101-
remove: true
102-
103-
- where:
104-
verb: Update
105-
subject: ^SapCentralServerInstance$
106-
variant: ^Update$|^UpdateViaIdentity$
107-
remove: true
108-
109-
- where:
110-
verb: Remove
111-
subject: ^SapCentralServerInstance$
112-
remove: true
113-
11475
- where:
11576
subject: SapCentralServerInstance
11677
parameter-name: CentralInstanceName
@@ -124,28 +85,6 @@ directive:
12485
subject: SapCentralInstance
12586

12687
# SapDatabaseInstance
127-
- where:
128-
verb: New
129-
subject: ^SapDatabaseInstance$
130-
remove: true
131-
132-
- where:
133-
verb: Stop
134-
subject: ^SapDatabaseInstance$
135-
variant: ^Stop$|^StopViaIdentity$
136-
remove: true
137-
138-
- where:
139-
verb: Update
140-
subject: ^SapDatabaseInstance$
141-
variant: ^Update$|^UpdateViaIdentity$
142-
remove: true
143-
144-
- where:
145-
verb: Remove
146-
subject: ^SapDatabaseInstance$
147-
remove: true
148-
14988
- where:
15089
subject: SapDatabaseInstance
15190
parameter-name: DatabaseInstanceName
@@ -156,7 +95,7 @@ directive:
15695
- where:
15796
verb: New
15897
subject: ^SapVirtualInstance$
159-
variant: ^Create$|^CreateViaIdentity$|^CreateViaIdentityExpanded$
98+
variant: ^(Create)(?!.*?(Expanded|JsonFilePath|JsonString))|^CreateViaIdentityExpanded$
16099
remove: true
161100

162101
- where:
@@ -166,28 +105,15 @@ directive:
166105
hide: true
167106

168107
- where:
169-
verb: Stop
170108
subject: ^SapVirtualInstance$
171-
variant: ^Stop$|^StopViaIdentity$
172-
remove: true
173-
174-
- where:
175-
verb: Update
176-
subject: ^SapVirtualInstance$
177-
variant: ^Update$|^UpdateViaIdentity$
178-
remove: true
179-
180-
- where:
181-
subject: ^SapVirtualInstance$
182-
parameter-name: IdentityUserAssignedIdentity
109+
parameter-name: ManagedResourceGroupConfigurationName
183110
set:
184-
parameter-name: UserAssignedIdentity
111+
parameter-name: ManagedResourceGroupName
185112

186113
- where:
114+
verb: Update
187115
subject: ^SapVirtualInstance$
188-
parameter-name: ManagedResourceGroupConfigurationName
189-
set:
190-
parameter-name: ManagedResourceGroupName
116+
hide: true
191117

192118
# SapAvailabilityZoneDetail
193119
- where:
@@ -430,43 +356,22 @@ directive:
430356
# Result shoule be in SingleServerRecommendationResult and ThreeTierRecommendationResult
431357
- from: source-file-csharp
432358
where: $
433-
transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20231001Preview.ISapSizingRecommendationResult Property', 'public Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api20240901.ISapSizingRecommendationResult Property');
359+
transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.ISapSizingRecommendationResult Property', 'public Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.ISapSizingRecommendationResult Property');
434360

435361
# remove System Data in module Monitor, ProviderInstance, SapApplicationServerInstance, SapCentralServerInstance, SapDatabaseInstance, SapLandscapeMonitor, SapVirtualInstance
436362
- from: SapApplicationServerInstance.cs
437363
where: $
438-
transform: $ = $.replace('public Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api30.ISystemData SystemData', 'internal Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api50.ISystemData SystemData');
364+
transform: $ = $.replace('public Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.ISystemData SystemData', 'internal Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.ISystemData SystemData');
439365
- from: SapCentralServerInstance.cs
440366
where: $
441-
transform: $ = $.replace('public Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api30.ISystemData SystemData', 'internal Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api50.ISystemData SystemData');
367+
transform: $ = $.replace('public Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.ISystemData SystemData', 'internal Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.ISystemData SystemData');
442368
- from: SapDatabaseInstance.cs
443369
where: $
444-
transform: $ = $.replace('public Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api30.ISystemData SystemData', 'internal Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api50.ISystemData SystemData');
370+
transform: $ = $.replace('public Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.ISystemData SystemData', 'internal Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.ISystemData SystemData');
445371
- from: SapLandscapeMonitor.cs
446372
where: $
447-
transform: $ = $.replace('public Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api30.ISystemData SystemData', 'internal Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api50.ISystemData SystemData');
373+
transform: $ = $.replace('public Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.ISystemData SystemData', 'internal Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.ISystemData SystemData');
448374
- from: SapVirtualInstance.cs
449375
where: $
450-
transform: $ = $.replace('public Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api30.ISystemData SystemData', 'internal Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api50.ISystemData SystemData');
451-
452-
- where:
453-
verb: Get|Start|Stop|Update
454-
subject: SapApplicationInstance|SapCentralInstance|SapDatabaseInstance|SapVirtualInstance
455-
set:
456-
preview-announcement:
457-
preview-message: "*****************************************************************************************\\r\\n* This cmdlet will undergo a breaking change in Az v15.0.0, to be released on November 19th 2025. *\\r\\n* At least one change applies to this cmdlet. *\\r\\n* See all possible breaking changes at https://go.microsoft.com/fwlink/?linkid=2333486 *\\r\\n**************************************************************************************************"
458-
459-
- where:
460-
verb: Invoke
461-
subject: SapDiskConfiguration|SapSizingRecommendation|SapSupportedSku
462-
set:
463-
preview-announcement:
464-
preview-message: "*****************************************************************************************\\r\\n* This cmdlet will undergo a breaking change in Az v15.0.0, to be released on November 19th 2025. *\\r\\n* At least one change applies to this cmdlet. *\\r\\n* See all possible breaking changes at https://go.microsoft.com/fwlink/?linkid=2333486 *\\r\\n**************************************************************************************************"
465-
466-
- where:
467-
verb: New
468-
subject: SapVirtualInstance
469-
set:
470-
preview-announcement:
471-
preview-message: "*****************************************************************************************\\r\\n* This cmdlet will undergo a breaking change in Az v15.0.0, to be released on November 19th 2025. *\\r\\n* At least one change applies to this cmdlet. *\\r\\n* See all possible breaking changes at https://go.microsoft.com/fwlink/?linkid=2333486 *\\r\\n**************************************************************************************************"
376+
transform: $ = $.replace('public Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.ISystemData SystemData', 'internal Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.ISystemData SystemData');
472377
```

src/Workloads/SapVirtualInstance.Autorest/UX/Microsoft.Workloads/locations.json

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

src/Workloads/SapVirtualInstance.Autorest/UX/Microsoft.Workloads/sapVirtualInstances-applicationInstances.json

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -47,49 +47,6 @@
4747
]
4848
}
4949
]
50-
},
51-
{
52-
"name": "Start-AzWorkloadsSapApplicationInstance",
53-
"description": "Starts the SAP Application Server Instance.",
54-
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName}/start",
55-
"help": {
56-
"learnMore": {
57-
"url": "https://learn.microsoft.com/powershell/module/az.workloads/start-azworkloadssapapplicationinstance"
58-
},
59-
"parameterSets": [
60-
{
61-
"parameters": [
62-
"-Name <String>",
63-
"-ResourceGroupName <String>",
64-
"-SapVirtualInstanceName <String>",
65-
"[-SubscriptionId <String>]"
66-
]
67-
}
68-
]
69-
},
70-
"examples": [
71-
{
72-
"description": "Starts the SAP Application Server Instance.",
73-
"parameters": [
74-
{
75-
"name": "-Name",
76-
"value": "[Path.applicationInstanceName]"
77-
},
78-
{
79-
"name": "-ResourceGroupName",
80-
"value": "[Path.resourceGroupName]"
81-
},
82-
{
83-
"name": "-SapVirtualInstanceName",
84-
"value": "[Path.sapVirtualInstanceName]"
85-
},
86-
{
87-
"name": "-SubscriptionId",
88-
"value": "[Path.subscriptionId]"
89-
}
90-
]
91-
}
92-
]
9350
}
9451
]
9552
}

0 commit comments

Comments
 (0)