Skip to content

[Do not merge] [Test] Tsp gen SRP swagger migration test #28314

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Storage/Storage.Autorest/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
[assembly: System.CLSCompliantAttribute(false)]


12 changes: 5 additions & 7 deletions src/Storage/Storage.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ require:
# readme.azure.noprofile.md is the common configuration file
- $(this-folder)/../../readme.azure.noprofile.md
input-file:
- $(repo)/specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/storage.json
- $(repo)/specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/file.json
- $(repo)/specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/storageTaskAssignments.json
- https://github.com/blueww/azure-rest-api-specs/blob/ec65b60fa0dc4ff769722bdb46e4c494d035cf56/specification/storage/resource-manager/Microsoft.Storage/stable/2025-01-01/openapi.json

# For new RP, the version is 0.1.0
module-version: 5.9.1
Expand Down Expand Up @@ -111,7 +109,7 @@ directive:
set:
property-name: StorageAccountLimitMaxProvisionedIops
- where:
subject: ^StorageAccount$|^StorageAccountKey$|^StorageAccountProperty$|^StorageAccountSas$|^StorageAccountServiceSas$|BlobInventoryPolicy$|^DeletedAccount$|^EncryptionScope$|^LocalUser$|^LocalUserKey$|^ManagementPolicy$|^ObjectReplicationPolicy$|^Sku$|^Usage$|^LocalUserPassword$|^AccountUserDelegationKey$|^AbortStorageAccountHierarchicalNamespaceMigration$|^HierarchicalStorageAccountNamespaceMigration$|^StorageAccountBlobRange$|^StorageAccountUserDelegationKey$|^StorageAccountNameAvailability$|^FileShare$|^FileServiceProperty$|^FileService$
subject: .*NetworkSecurityPerimeter.*|.*Blob.*|.*Table.*|.*Queue.*|^StorageAccount$|^StorageAccountKey$|^StorageAccountProperty$|^StorageAccountSas$|^StorageAccountServiceSas$|BlobInventoryPolicy$|^DeletedAccount$|^EncryptionScope$|^LocalUser$|^LocalUserKey$|^ManagementPolicy$|^ObjectReplicationPolicy$|^Sku$|^Usage$|^LocalUserPassword$|^AccountUserDelegationKey$|^AbortStorageAccountHierarchicalNamespaceMigration$|^HierarchicalStorageAccountNamespaceMigration$|^StorageAccountBlobRange$|^StorageAccountUserDelegationKey$|^StorageAccountNameAvailability$|^FileShare$|^FileServiceProperty$|^FileService$
remove: true
- where:
parameter-name: ParameterEndBy
Expand Down Expand Up @@ -153,16 +151,16 @@ directive:
property-name: ParameterStartOn
set:
property-name: StartOn
- from: storageTaskAssignments.json
- from: openapi.json
where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/reports"].get
transform: >
$["operationId"] = "StorageTaskAssignmentInstancesReport_List"
# Renaming the operationId to StorageTaskAssignmentInstancesReport_Get, but the operation actually lists all the reports under a specific storage task assignment.
- from: storageTaskAssignments.json
- from: openapi.json
where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/storageTaskAssignments/{storageTaskAssignmentName}/reports"].get
transform: >
$["operationId"] = "StorageTaskAssignmentInstancesReport_Get"
- from: storageTaskAssignments.json
- from: openapi.json
where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/storageTaskAssignments/{storageTaskAssignmentName}/reports"].get
transform: >
$["operationId"] = "StorageTaskAssignmentInstancesReport_Get"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "storageAccounts/accountMigrations",
"apiVersion": "2024-01-01",
"apiVersion": "2025-01-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.storage"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "storageAccounts/storageTaskAssignments",
"apiVersion": "2024-01-01",
"apiVersion": "2025-01-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.storage"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"resourceType": "storageAccounts/fileServices/usages",
"apiVersion": "2024-01-01",
"resourceType": "storageAccounts",
"apiVersion": "2025-01-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.storage"
},
"commands": [
{
"name": "Get-AzStorageFileServiceUsage",
"description": "Gets the usage of file service in storage account including account limits, file share limits and constants used in recommendations and bursting formula.",
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/{FileServicesName}/usages/{fileServiceUsagesName}",
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/usages/default",
"help": {
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.storage/get-azstoragefileserviceusage"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ Accept wildcard characters: False
```

### -ResourceGroupName
The name of the resource group within the user's subscription.
The name of the resource group.
The name is case insensitive.

```yaml
Expand All @@ -114,6 +114,7 @@ Accept wildcard characters: False

### -SubscriptionId
The ID of the target subscription.
The value must be an UUID.

```yaml
Type: System.String[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ Accept wildcard characters: False
```

### -ResourceGroupName
The name of the resource group within the user's subscription.
The name of the resource group.
The name is case insensitive.

```yaml
Expand Down Expand Up @@ -156,6 +156,7 @@ Accept wildcard characters: False

### -SubscriptionId
The ID of the target subscription.
The value must be an UUID.

```yaml
Type: System.String[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ Accept wildcard characters: False

### -SubscriptionId
The ID of the target subscription.
The value must be an UUID.

```yaml
Type: System.String[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ Accept wildcard characters: False

### -SubscriptionId
The ID of the target subscription.
The value must be an UUID.

```yaml
Type: System.String[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ Accept wildcard characters: False

### -StartOn
When to start task execution.
This is a required field when ExecutionTrigger.properties.type is 'RunOnce'; this property should not be present when ExecutionTrigger.properties.type is 'OnSchedule'
This is an optional field when ExecutionTrigger.properties.type is 'RunOnce'; this property should not be present when ExecutionTrigger.properties.type is 'OnSchedule'

```yaml
Type: System.DateTime
Expand All @@ -339,6 +339,7 @@ Accept wildcard characters: False

### -SubscriptionId
The ID of the target subscription.
The value must be an UUID.

```yaml
Type: System.String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ Accept wildcard characters: False

### -SubscriptionId
The ID of the target subscription.
The value must be an UUID.

```yaml
Type: System.String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@ Accept wildcard characters: False

### -SubscriptionId
The ID of the target subscription.
The value must be an UUID.

```yaml
Type: System.String
Expand Down
2 changes: 1 addition & 1 deletion src/Storage/Storage.Autorest/generate-info.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"generate_Id": "fb909859-db8b-495e-a620-7452062a22ad"
"generate_Id": "d98afa48-a27a-4bf4-888a-714985cbda95"
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"Get-AzStorageAccountMigration+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/testaccountmigrationrg/providers/Microsoft.Storage/storageAccounts/testaccountmigration111/accountMigrations/default?api-version=2024-01-01+1": {
"Get-AzStorageAccountMigration+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/testaccountmigrationrg/providers/Microsoft.Storage/storageAccounts/testaccountmigration111/accountMigrations/default?api-version=2025-01-01+1": {
"Request": {
"Method": "GET",
"RequestUri": "https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/testaccountmigrationrg/providers/Microsoft.Storage/storageAccounts/testaccountmigration111/accountMigrations/default?api-version=2024-01-01",
"RequestUri": "https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/testaccountmigrationrg/providers/Microsoft.Storage/storageAccounts/testaccountmigration111/accountMigrations/default?api-version=2025-01-01",
"Content": null,
"isContentBase64": false,
"Headers": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"Get-AzStorageFileServiceUsage+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/testaccountmigrationrg/providers/Microsoft.Storage/storageAccounts/pshtestaccountpv2/fileServices/default/usages/default?api-version=2024-01-01+1": {
"Get-AzStorageFileServiceUsage+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/testaccountmigrationrg/providers/Microsoft.Storage/storageAccounts/pshtestaccountpv2/fileServices/default/usages/default?api-version=2025-01-01+1": {
"Request": {
"Method": "GET",
"RequestUri": "https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/testaccountmigrationrg/providers/Microsoft.Storage/storageAccounts/pshtestaccountpv2/fileServices/default/usages/default?api-version=2024-01-01",
"RequestUri": "https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/testaccountmigrationrg/providers/Microsoft.Storage/storageAccounts/pshtestaccountpv2/fileServices/default/usages/default?api-version=2025-01-01",
"Content": null,
"isContentBase64": false,
"Headers": {
Expand Down
Loading
Loading