From b44aa397f744f2424910f27d4fae653689d6ed57 Mon Sep 17 00:00:00 2001 From: Lei Ni Date: Wed, 7 Dec 2022 16:58:19 +0800 Subject: [PATCH 01/11] add appconfig control-plane scenarios --- .../stable/2022-05-01/scenarios/basic.yaml | 117 ++++++++++++++++++ .../resource-manager/readme.test.md | 9 ++ 2 files changed, 126 insertions(+) create mode 100644 specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2022-05-01/scenarios/basic.yaml create mode 100644 specification/appconfiguration/resource-manager/readme.test.md diff --git a/specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2022-05-01/scenarios/basic.yaml b/specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2022-05-01/scenarios/basic.yaml new file mode 100644 index 000000000000..82d85002140b --- /dev/null +++ b/specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2022-05-01/scenarios/basic.yaml @@ -0,0 +1,117 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/documentation/api-scenario/references/v1.2/schema.json +scope: ResourceGroup +variables: + configStoreName: + type: string + prefix: configstor + privateEndpointConnectionName: + type: string + prefix: privateend + keyValueName: + type: string + prefix: keyvaluena + groupName: configurationStores + +prepareSteps: + - step: createVirtualNetwork + operationId: VirtualNetworks_CreateOrUpdate + readmeTag: ../../../../../../network/resource-manager/readme.md + parameters: + virtualNetworkName: $(configStoreName)-vnet + parameters: + location: $(location) + properties: + addressSpace: + addressPrefixes: + - 10.0.0.0/16 + subnets: + - name: subnet-1 + properties: + addressPrefix: 10.0.0.0/24 + outputVariables: + subnetId: + type: string + fromResponse: /properties/subnets/0/id + + - step: createPublicIPAddress + operationId: PublicIPAddresses_CreateOrUpdate + readmeTag: ../../../../../../network/resource-manager/readme.md + parameters: + publicIpAddressName: $(configStoreName)-ip + parameters: + location: $(location) + +scenarios: + - steps: + - step: Operations_List + operationId: Operations_List + - step: Operations_CheckNameAvailability + exampleFile: ../examples/CheckNameAvailable.json + - step: Operations_RegionalCheckNameAvailability + exampleFile: ../examples/RegionalCheckNameAvailable.json + - step: ConfigurationStores_Create + exampleFile: ../examples/ConfigurationStoresCreate.json + outputVariables: + configurationStoreId: + type: string + fromResponse: /id + - step: ConfigurationStores_List + exampleFile: ../examples/ConfigurationStoresList.json + - step: ConfigurationStores_ListByResourceGroup + exampleFile: ../examples/ConfigurationStoresListByResourceGroup.json + - step: ConfigurationStores_ListDeleted + exampleFile: ../examples/DeletedConfigurationStoresList.json + - step: ConfigurationStores_Get + exampleFile: ../examples/ConfigurationStoresGet.json + - step: ConfigurationStores_Update + exampleFile: ../examples/ConfigurationStoresUpdate.json + - step: ConfigurationStores_ListKeys + exampleFile: ../examples/ConfigurationStoresListKeys.json + outputVariables: + keyId: + fromResponse: /value/0/id + - step: ConfigurationStores_RegenerateKey + exampleFile: ../examples/ConfigurationStoresRegenerateKey.json + requestUpdate: + - replace: /regenerateKeyParameters/id + value: $(keyId) + - step: KeyValues_CreateOrUpdate + exampleFile: ../examples/ConfigurationStoresCreateKeyValue.json + - step: KeyValues_Get + exampleFile: ../examples/ConfigurationStoresGetKeyValue.json + - step: createPrivateEndpoints + operationId: PrivateEndpoints_CreateOrUpdate + readmeTag: ../../../../../../network/resource-manager/readme.md + parameters: + privateEndpointName: $(privateEndpointConnectionName)-endpoint + parameters: + location: $(location) + properties: + subnet: + id: $(subnetId) + privateLinkServiceConnections: + - name: $(privateEndpointConnectionName) + properties: + privateLinkServiceId: $(configurationStoreId) + groupIds: + - $(groupName) + - step: PrivateEndpointConnections_Update + exampleFile: ../examples/ConfigurationStoresCreatePrivateEndpointConnection.json + - step: PrivateEndpointConnections_ListByConfigurationStore + exampleFile: ../examples/ConfigurationStoresListPrivateEndpointConnections.json + - step: PrivateEndpointConnections_Get + exampleFile: ../examples/ConfigurationStoresGetPrivateEndpointConnection.json + - step: PrivateLinkResources_ListByConfigurationStore + exampleFile: ../examples/PrivateLinkResourcesListByConfigurationStore.json + - step: PrivateLinkResources_Get + exampleFile: ../examples/PrivateLinkResourceGet.json + - step: PrivateEndpointConnections_Delete + exampleFile: ../examples/ConfigurationStoresDeletePrivateEndpointConnection.json + - step: KeyValues_Delete + exampleFile: ../examples/ConfigurationStoresDeleteKeyValue.json + - step: ConfigurationStores_Delete + exampleFile: ../examples/ConfigurationStoresDelete.json + - step: ConfigurationStores_GetDeleted + exampleFile: ../examples/DeletedConfigurationStoresGet.json + - step: ConfigurationStores_PurgeDeleted + exampleFile: ../examples/DeletedConfigurationStoresPurge.json diff --git a/specification/appconfiguration/resource-manager/readme.test.md b/specification/appconfiguration/resource-manager/readme.test.md new file mode 100644 index 000000000000..90a8611ba14c --- /dev/null +++ b/specification/appconfiguration/resource-manager/readme.test.md @@ -0,0 +1,9 @@ +### Tag: package-2022-05-01 + +These settings apply only when `--tag=package-2022-05-01` is specified on the command line. + +``` yaml $(tag) == 'package-2022-05-01' +test-resources: + - Microsoft.AppConfiguration/stable/2022-05-01/scenarios/basic.yaml + +``` From a8e28a12169f4206e53bbaf32974b715be2015cd Mon Sep 17 00:00:00 2001 From: Lei Ni Date: Wed, 7 Dec 2022 17:00:37 +0800 Subject: [PATCH 02/11] touch swagger --- .../stable/2022-05-01/appconfiguration.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2022-05-01/appconfiguration.json b/specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2022-05-01/appconfiguration.json index 74ec35ab49d4..c154d6faa678 100644 --- a/specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2022-05-01/appconfiguration.json +++ b/specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2022-05-01/appconfiguration.json @@ -2,7 +2,7 @@ "swagger": "2.0", "info": { "version": "2022-05-01", - "title": "AppConfigurationManagementClient" + "title": "AppConfigurationManagementClient test" }, "host": "management.azure.com", "schemes": [ From fc46d47ee97bc2b7bc16f22473d377ca2496e84e Mon Sep 17 00:00:00 2001 From: Lei Ni Date: Tue, 13 Dec 2022 18:11:51 +0800 Subject: [PATCH 03/11] push tag successfully --- .gitignore | 1 + specification/appconfiguration/resource-manager/assets.json | 5 +++++ 2 files changed, 6 insertions(+) create mode 100644 specification/appconfiguration/resource-manager/assets.json diff --git a/.gitignore b/.gitignore index 0b1ac32ad897..65df220d9739 100644 --- a/.gitignore +++ b/.gitignore @@ -112,6 +112,7 @@ warnings.txt # API Test outputs .apitest +.assets *.js *.d.ts diff --git a/specification/appconfiguration/resource-manager/assets.json b/specification/appconfiguration/resource-manager/assets.json new file mode 100644 index 000000000000..67716e0205eb --- /dev/null +++ b/specification/appconfiguration/resource-manager/assets.json @@ -0,0 +1,5 @@ +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "", + "TagPrefix": "apitest/appconfiguration/management" +} From c16ca110ef2cdb69452a80b0363b59e260151347 Mon Sep 17 00:00:00 2001 From: Lei Ni Date: Tue, 13 Dec 2022 18:25:01 +0800 Subject: [PATCH 04/11] check in tag --- specification/appconfiguration/resource-manager/assets.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/specification/appconfiguration/resource-manager/assets.json b/specification/appconfiguration/resource-manager/assets.json index 67716e0205eb..c45b065c6ca8 100644 --- a/specification/appconfiguration/resource-manager/assets.json +++ b/specification/appconfiguration/resource-manager/assets.json @@ -1,5 +1,6 @@ { "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "", - "TagPrefix": "apitest/appconfiguration/management" + "TagPrefix": "apitest/appconfiguration/management", + "Tag": "apitest/appconfiguration/management_7aa7e42901" } From fdb0eccca4f27489e403d172868974c89ed6d885 Mon Sep 17 00:00:00 2001 From: Lei Ni Date: Tue, 13 Dec 2022 19:21:17 +0800 Subject: [PATCH 05/11] move assets.json to scenarios folder --- .../stable/2022-05-01/scenarios}/assets.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename specification/appconfiguration/resource-manager/{ => Microsoft.AppConfiguration/stable/2022-05-01/scenarios}/assets.json (69%) diff --git a/specification/appconfiguration/resource-manager/assets.json b/specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2022-05-01/scenarios/assets.json similarity index 69% rename from specification/appconfiguration/resource-manager/assets.json rename to specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2022-05-01/scenarios/assets.json index c45b065c6ca8..3f02200dbe20 100644 --- a/specification/appconfiguration/resource-manager/assets.json +++ b/specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2022-05-01/scenarios/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "", "TagPrefix": "apitest/appconfiguration/management", - "Tag": "apitest/appconfiguration/management_7aa7e42901" + "Tag": "apitest/appconfiguration/management_007d8e94a2" } From e34004d28c09b89bba18923164f1a88d39c7da5c Mon Sep 17 00:00:00 2001 From: Lei Ni Date: Tue, 13 Dec 2022 19:25:56 +0800 Subject: [PATCH 06/11] update tag --- .../stable/2022-05-01/scenarios/assets.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2022-05-01/scenarios/assets.json b/specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2022-05-01/scenarios/assets.json index 3f02200dbe20..815cd066cf36 100644 --- a/specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2022-05-01/scenarios/assets.json +++ b/specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2022-05-01/scenarios/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "", "TagPrefix": "apitest/appconfiguration/management", - "Tag": "apitest/appconfiguration/management_007d8e94a2" + "Tag": "apitest/appconfiguration/management_74b7147839" } From 15ac061621aac4632758aeebd6194c35f207fab9 Mon Sep 17 00:00:00 2001 From: Lei Ni Date: Mon, 19 Dec 2022 14:30:56 +0800 Subject: [PATCH 07/11] add appconfig data-plane scenarios --- .../stable/1.0/scenarios/basic.yaml | 42 ++++++++++++++++ .../appconfiguration/data-plane/liveness.yaml | 50 +++++++++++++++++++ .../data-plane/readme.test.md | 8 +++ 3 files changed, 100 insertions(+) create mode 100644 specification/appconfiguration/data-plane/Microsoft.AppConfiguration/stable/1.0/scenarios/basic.yaml create mode 100644 specification/appconfiguration/data-plane/liveness.yaml create mode 100644 specification/appconfiguration/data-plane/readme.test.md diff --git a/specification/appconfiguration/data-plane/Microsoft.AppConfiguration/stable/1.0/scenarios/basic.yaml b/specification/appconfiguration/data-plane/Microsoft.AppConfiguration/stable/1.0/scenarios/basic.yaml new file mode 100644 index 000000000000..11a4cad23321 --- /dev/null +++ b/specification/appconfiguration/data-plane/Microsoft.AppConfiguration/stable/1.0/scenarios/basic.yaml @@ -0,0 +1,42 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/documentation/api-scenario/references/v1.2/schema.json +scope: ../../../../liveness.yaml + +authentication: + type: AADToken + scope: https://azconfig.io/.default + +variables: + key: + type: string + prefix: key + +scenarios: + - steps: + - step: PutKeyValue + exampleFile: ../examples/PutKeyValue.json + - step: PutLock + exampleFile: ../examples/PutLock.json + - step: GetKeys + exampleFile: ../examples/GetKeys.json + - step: CheckKeys + exampleFile: ../examples/CheckKeys.json + - step: GetKeyValues + exampleFile: ../examples/GetKeyValues.json + - step: CheckKeyValues + exampleFile: ../examples/CheckKeyValues.json + - step: DeleteKeyValue + exampleFile: ../examples/DeleteKeyValue.json + - step: GetKeyValue + exampleFile: ../examples/GetKeyValue.json + - step: CheckKeyValue + exampleFile: ../examples/CheckKeyValue.json + - step: GetLabels + exampleFile: ../examples/GetLabels.json + - step: CheckLabels + exampleFile: ../examples/CheckLabels.json + - step: DeleteLock + exampleFile: ../examples/DeleteLock.json + - step: GetRevisions + exampleFile: ../examples/GetRevisions.json + - step: CheckRevisions + exampleFile: ../examples/CheckRevisions.json diff --git a/specification/appconfiguration/data-plane/liveness.yaml b/specification/appconfiguration/data-plane/liveness.yaml new file mode 100644 index 000000000000..4f4d6e14f0e8 --- /dev/null +++ b/specification/appconfiguration/data-plane/liveness.yaml @@ -0,0 +1,50 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/documentation/api-scenario/references/v1.2/schema.json + +scope: ResourceGroup +variables: + configStoreName: + type: string + prefix: configstor + +prepareSteps: + - step: Operations_CheckNameAvailability + operationId: Operations_CheckNameAvailability + readmeTag: ../resource-manager/readme.md + parameters: + checkNameAvailabilityParameters: + name: $(configStoreName) + type: Microsoft.AppConfiguration/configurationStores + - step: ConfigurationStores_Create + operationId: ConfigurationStores_Create + readmeTag: ../resource-manager/readme.md + parameters: + configStoreCreationParameters: + location: $(location) + sku: + name: Standard + tags: + myTag: myTagValue + - step: ConfigurationStores_Get + operationId: ConfigurationStores_Get + readmeTag: ../resource-manager/readme.md + outputVariables: + endpoint: + type: string + fromResponse: /properties/endpoint + configStoreId: + type: string + fromResponse: /id + - step: assignRole + roleAssignment: + scope: $(configStoreId) + principalId: $(object_id) + principalType: ServicePrincipal + roleName: App Configuration Data Owner + +scenarios: + - scenario: liveness + authentication: + type: AADToken + scope: https://azconfig.io/.default + steps: + - operationId: CheckKeys \ No newline at end of file diff --git a/specification/appconfiguration/data-plane/readme.test.md b/specification/appconfiguration/data-plane/readme.test.md new file mode 100644 index 000000000000..a48b651c2825 --- /dev/null +++ b/specification/appconfiguration/data-plane/readme.test.md @@ -0,0 +1,8 @@ +### Tag: package-1-0 + +These settings apply only when `--tag=package-1-0` is specified on the command line. + +``` yaml $(tag) == 'package-1-0' +test-resources: + - Microsoft.AppConfiguration/stable/1.0/scenarios/basic.yaml +``` From 994c67d57d0a3f0c4145f0d316c6546d0d4acf2d Mon Sep 17 00:00:00 2001 From: Lei Ni Date: Tue, 20 Dec 2022 10:18:11 +0800 Subject: [PATCH 08/11] push data-plane apitest recording --- .../stable/1.0/scenarios/assets.json | 6 ++++++ .../stable/1.0/scenarios/basic.yaml | 2 +- .../stable/1.0/scenarios}/liveness.yaml | 6 +++--- 3 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 specification/appconfiguration/data-plane/Microsoft.AppConfiguration/stable/1.0/scenarios/assets.json rename specification/appconfiguration/data-plane/{ => Microsoft.AppConfiguration/stable/1.0/scenarios}/liveness.yaml (88%) diff --git a/specification/appconfiguration/data-plane/Microsoft.AppConfiguration/stable/1.0/scenarios/assets.json b/specification/appconfiguration/data-plane/Microsoft.AppConfiguration/stable/1.0/scenarios/assets.json new file mode 100644 index 000000000000..45599bca6495 --- /dev/null +++ b/specification/appconfiguration/data-plane/Microsoft.AppConfiguration/stable/1.0/scenarios/assets.json @@ -0,0 +1,6 @@ +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "", + "TagPrefix": "apitest/appconfiguration/dataplane", + "Tag": "apitest/appconfiguration/dataplane_606b648576" +} diff --git a/specification/appconfiguration/data-plane/Microsoft.AppConfiguration/stable/1.0/scenarios/basic.yaml b/specification/appconfiguration/data-plane/Microsoft.AppConfiguration/stable/1.0/scenarios/basic.yaml index 11a4cad23321..9e5115e267fc 100644 --- a/specification/appconfiguration/data-plane/Microsoft.AppConfiguration/stable/1.0/scenarios/basic.yaml +++ b/specification/appconfiguration/data-plane/Microsoft.AppConfiguration/stable/1.0/scenarios/basic.yaml @@ -1,5 +1,5 @@ # yaml-language-server: $schema=https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/documentation/api-scenario/references/v1.2/schema.json -scope: ../../../../liveness.yaml +scope: ./liveness.yaml authentication: type: AADToken diff --git a/specification/appconfiguration/data-plane/liveness.yaml b/specification/appconfiguration/data-plane/Microsoft.AppConfiguration/stable/1.0/scenarios/liveness.yaml similarity index 88% rename from specification/appconfiguration/data-plane/liveness.yaml rename to specification/appconfiguration/data-plane/Microsoft.AppConfiguration/stable/1.0/scenarios/liveness.yaml index 4f4d6e14f0e8..142a5660ce7c 100644 --- a/specification/appconfiguration/data-plane/liveness.yaml +++ b/specification/appconfiguration/data-plane/Microsoft.AppConfiguration/stable/1.0/scenarios/liveness.yaml @@ -9,14 +9,14 @@ variables: prepareSteps: - step: Operations_CheckNameAvailability operationId: Operations_CheckNameAvailability - readmeTag: ../resource-manager/readme.md + readmeTag: ../../../../../resource-manager/readme.md parameters: checkNameAvailabilityParameters: name: $(configStoreName) type: Microsoft.AppConfiguration/configurationStores - step: ConfigurationStores_Create operationId: ConfigurationStores_Create - readmeTag: ../resource-manager/readme.md + readmeTag: ../../../../../resource-manager/readme.md parameters: configStoreCreationParameters: location: $(location) @@ -26,7 +26,7 @@ prepareSteps: myTag: myTagValue - step: ConfigurationStores_Get operationId: ConfigurationStores_Get - readmeTag: ../resource-manager/readme.md + readmeTag: ../../../../../resource-manager/readme.md outputVariables: endpoint: type: string From 0444b0fbb198e6558c4c646737e921657f2c6a81 Mon Sep 17 00:00:00 2001 From: Lei Ni Date: Tue, 20 Dec 2022 10:47:31 +0800 Subject: [PATCH 09/11] update mgmt recording --- .../stable/2022-05-01/scenarios/assets.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2022-05-01/scenarios/assets.json b/specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2022-05-01/scenarios/assets.json index 815cd066cf36..fb150f11c35d 100644 --- a/specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2022-05-01/scenarios/assets.json +++ b/specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2022-05-01/scenarios/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "", "TagPrefix": "apitest/appconfiguration/management", - "Tag": "apitest/appconfiguration/management_74b7147839" + "Tag": "apitest/appconfiguration/management_164ac7ad8e" } From 3378122419906936d376b53ed105bba80176fcce Mon Sep 17 00:00:00 2001 From: Lei Ni Date: Tue, 20 Dec 2022 10:50:04 +0800 Subject: [PATCH 10/11] restore swagger --- .../stable/2022-05-01/appconfiguration.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2022-05-01/appconfiguration.json b/specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2022-05-01/appconfiguration.json index c154d6faa678..74ec35ab49d4 100644 --- a/specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2022-05-01/appconfiguration.json +++ b/specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2022-05-01/appconfiguration.json @@ -2,7 +2,7 @@ "swagger": "2.0", "info": { "version": "2022-05-01", - "title": "AppConfigurationManagementClient test" + "title": "AppConfigurationManagementClient" }, "host": "management.azure.com", "schemes": [ From 3dd3a3aa589a5eb1175300a5b52a68240ad67a64 Mon Sep 17 00:00:00 2001 From: Lei Ni Date: Tue, 20 Dec 2022 11:41:21 +0800 Subject: [PATCH 11/11] update recording --- .../Microsoft.AppConfiguration/stable/1.0/scenarios/assets.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/appconfiguration/data-plane/Microsoft.AppConfiguration/stable/1.0/scenarios/assets.json b/specification/appconfiguration/data-plane/Microsoft.AppConfiguration/stable/1.0/scenarios/assets.json index 45599bca6495..bd20cc736173 100644 --- a/specification/appconfiguration/data-plane/Microsoft.AppConfiguration/stable/1.0/scenarios/assets.json +++ b/specification/appconfiguration/data-plane/Microsoft.AppConfiguration/stable/1.0/scenarios/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "", "TagPrefix": "apitest/appconfiguration/dataplane", - "Tag": "apitest/appconfiguration/dataplane_606b648576" + "Tag": "apitest/appconfiguration/dataplane_7a9e215e2e" }