From 9b63a5ec251077861e5c98665a9381a176f1159d Mon Sep 17 00:00:00 2001 From: Zim Kalinowski Date: Thu, 2 Apr 2020 07:27:53 +0200 Subject: [PATCH] readme files for storageimportexport (#8893) * readme files for storageimportexport * flattening job parameters * fixed examples and test scenario * normalizing examples --- .../stable/2016-11-01/examples/CreateJob.json | 20 +++++++------- .../stable/2016-11-01/examples/DeleteJob.json | 12 ++++----- .../stable/2016-11-01/examples/GetJob.json | 12 ++++----- .../examples/ListBitLockerKeys.json | 6 ++--- .../examples/ListJobsInResourceGroup.json | 8 +++--- .../examples/ListJobsInSubscription.json | 10 +++---- .../stable/2016-11-01/examples/UpdateJob.json | 12 ++++----- .../resource-manager/readme.az.md | 17 ++++++++++++ .../resource-manager/readme.cli.md | 20 ++++++++++++++ .../resource-manager/readme.python.md | 27 +++++++++++++++++++ 10 files changed, 104 insertions(+), 40 deletions(-) create mode 100644 specification/storageimportexport/resource-manager/readme.az.md create mode 100644 specification/storageimportexport/resource-manager/readme.cli.md create mode 100644 specification/storageimportexport/resource-manager/readme.python.md diff --git a/specification/storageimportexport/resource-manager/Microsoft.ImportExport/stable/2016-11-01/examples/CreateJob.json b/specification/storageimportexport/resource-manager/Microsoft.ImportExport/stable/2016-11-01/examples/CreateJob.json index f9d11ac2df19..9dea85818798 100644 --- a/specification/storageimportexport/resource-manager/Microsoft.ImportExport/stable/2016-11-01/examples/CreateJob.json +++ b/specification/storageimportexport/resource-manager/Microsoft.ImportExport/stable/2016-11-01/examples/CreateJob.json @@ -1,13 +1,13 @@ { "parameters": { "api-version": "2016-11-01", - "subscriptionId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", - "resourceGroupName": "Default-Storage-WestUS", - "jobName": "test-by1-import", + "subscriptionId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + "resourceGroupName": "myResourceGroup", + "jobName": "myJob", "body": { "location": "West US", "properties": { - "storageAccountId": "/subscriptions/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/test", + "storageAccountId": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.ClassicStorage/storageAccounts/test", "jobType": "Import", "returnAddress": { "recipientName": "Tets", @@ -39,7 +39,7 @@ "200": { "body": { "properties": { - "storageAccountId": "/subscriptions/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/test", + "storageAccountId": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.ClassicStorage/storageAccounts/test", "jobType": "Import", "returnAddress": { "recipientName": "Tets", @@ -78,8 +78,8 @@ ], "provisioningState": "Succeeded" }, - "id": "/subscriptions/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ImportExport/jobs/test", - "name": "test-by1-import", + "id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.ImportExport/jobs/myJob", + "name": "myJob", "type": "Microsoft.ImportExport/jobs", "location": "West US" } @@ -87,7 +87,7 @@ "201": { "body": { "properties": { - "storageAccountId": "/subscriptions/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/test", + "storageAccountId": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.ClassicStorage/storageAccounts/test", "jobType": "Import", "returnAddress": { "recipientName": "Tets", @@ -126,8 +126,8 @@ ], "provisioningState": "Succeeded" }, - "id": "/subscriptions/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ImportExport/jobs/test", - "name": "test-by1-import", + "id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.ImportExport/jobs/myJob", + "name": "myJob", "type": "Microsoft.ImportExport/jobs", "location": "West US" } diff --git a/specification/storageimportexport/resource-manager/Microsoft.ImportExport/stable/2016-11-01/examples/DeleteJob.json b/specification/storageimportexport/resource-manager/Microsoft.ImportExport/stable/2016-11-01/examples/DeleteJob.json index 37b2b754c6bc..2b69050a8f49 100644 --- a/specification/storageimportexport/resource-manager/Microsoft.ImportExport/stable/2016-11-01/examples/DeleteJob.json +++ b/specification/storageimportexport/resource-manager/Microsoft.ImportExport/stable/2016-11-01/examples/DeleteJob.json @@ -1,14 +1,14 @@ { "parameters": { "api-version": "2016-11-01", - "subscriptionId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", - "resourceGroupName": "Default-Storage-WestUS", - "jobName": "test-by1-import" + "subscriptionId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + "resourceGroupName": "myResourceGroup", + "jobName": "myJob" }, "responses": { "200": { "properties": { - "storageAccountId": "/subscriptions/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/test", + "storageAccountId": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.ClassicStorage/storageAccounts/test", "jobType": "Import", "returnAddress": { "recipientName": "Tets", @@ -47,8 +47,8 @@ ], "provisioningState": "Succeeded" }, - "id": "/subscriptions/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ImportExport/jobs/test", - "name": "test-by1-import", + "id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.ImportExport/jobs/test", + "name": "myJob", "type": "Microsoft.ImportExport/jobs", "location": "West US" } diff --git a/specification/storageimportexport/resource-manager/Microsoft.ImportExport/stable/2016-11-01/examples/GetJob.json b/specification/storageimportexport/resource-manager/Microsoft.ImportExport/stable/2016-11-01/examples/GetJob.json index 148beb2dc74c..f18299e4c3c0 100644 --- a/specification/storageimportexport/resource-manager/Microsoft.ImportExport/stable/2016-11-01/examples/GetJob.json +++ b/specification/storageimportexport/resource-manager/Microsoft.ImportExport/stable/2016-11-01/examples/GetJob.json @@ -1,15 +1,15 @@ { "parameters": { "api-version": "2016-11-01", - "subscriptionId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", - "resourceGroupName": "Default-Storage-WestUS", - "jobName": "test-by1-import" + "subscriptionId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + "resourceGroupName": "myResourceGroup", + "jobName": "myJob" }, "responses": { "200": { "body": { "properties": { - "storageAccountId": "/subscriptions/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/test", + "storageAccountId": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.ClassicStorage/storageAccounts/test", "jobType": "Import", "returnAddress": { "recipientName": "Tets", @@ -48,8 +48,8 @@ ], "provisioningState": "Succeeded" }, - "id": "/subscriptions/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ImportExport/jobs/test", - "name": "test-by1-import", + "id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.ImportExport/jobs/test", + "name": "myJob", "type": "Microsoft.ImportExport/jobs", "location": "West US" } diff --git a/specification/storageimportexport/resource-manager/Microsoft.ImportExport/stable/2016-11-01/examples/ListBitLockerKeys.json b/specification/storageimportexport/resource-manager/Microsoft.ImportExport/stable/2016-11-01/examples/ListBitLockerKeys.json index 38c483bbbdad..35e9355fe822 100644 --- a/specification/storageimportexport/resource-manager/Microsoft.ImportExport/stable/2016-11-01/examples/ListBitLockerKeys.json +++ b/specification/storageimportexport/resource-manager/Microsoft.ImportExport/stable/2016-11-01/examples/ListBitLockerKeys.json @@ -1,9 +1,9 @@ { "parameters": { "api-version": "2016-11-01", - "subscriptionId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", - "resourceGroupName": "Default-Storage-WestUS", - "jobName": "test-by1-import" + "subscriptionId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + "resourceGroupName": "myResourceGroup", + "jobName": "myJob" }, "responses": { "200": { diff --git a/specification/storageimportexport/resource-manager/Microsoft.ImportExport/stable/2016-11-01/examples/ListJobsInResourceGroup.json b/specification/storageimportexport/resource-manager/Microsoft.ImportExport/stable/2016-11-01/examples/ListJobsInResourceGroup.json index 706514e82e46..f6f10d44d4d2 100644 --- a/specification/storageimportexport/resource-manager/Microsoft.ImportExport/stable/2016-11-01/examples/ListJobsInResourceGroup.json +++ b/specification/storageimportexport/resource-manager/Microsoft.ImportExport/stable/2016-11-01/examples/ListJobsInResourceGroup.json @@ -1,8 +1,8 @@ { "parameters": { "api-version": "2016-11-01", - "subscriptionId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", - "resourceGroupName": "Default-Storage-WestUS" + "subscriptionId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + "resourceGroupName": "myResourceGroup" }, "responses": { "200": { @@ -10,7 +10,7 @@ "value": [ { "properties": { - "storageAccountId": "/subscriptions/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/xtprodtestwu", + "storageAccountId": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.ClassicStorage/storageAccounts/xtprodtestwu", "jobType": "Import", "returnAddress": { "recipientName": "La", @@ -46,7 +46,7 @@ "state": "Received", "provisioningState": "Succeeded" }, - "id": "/subscriptions/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ImportExport/jobs/test-by1-ssd-2", + "id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.ImportExport/jobs/test-by1-ssd-2", "name": "test-by1-ssd-2", "type": "Microsoft.ImportExport/jobs", "location": "West US" diff --git a/specification/storageimportexport/resource-manager/Microsoft.ImportExport/stable/2016-11-01/examples/ListJobsInSubscription.json b/specification/storageimportexport/resource-manager/Microsoft.ImportExport/stable/2016-11-01/examples/ListJobsInSubscription.json index 6d7de1d7d00e..5f15bc48c88b 100644 --- a/specification/storageimportexport/resource-manager/Microsoft.ImportExport/stable/2016-11-01/examples/ListJobsInSubscription.json +++ b/specification/storageimportexport/resource-manager/Microsoft.ImportExport/stable/2016-11-01/examples/ListJobsInSubscription.json @@ -1,7 +1,7 @@ { "parameters": { "api-version": "2016-11-01", - "subscriptionId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" + "subscriptionId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" }, "responses": { "200": { @@ -9,7 +9,7 @@ "value": [ { "properties": { - "storageAccountId": "/subscriptions/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/resourceGroups/testrg/providers/Microsoft.Storage/storageAccounts/xtprodtestarmos2", + "storageAccountId": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/testrg/providers/Microsoft.Storage/storageAccounts/xtprodtestarmos2", "jobType": "Import", "returnAddress": { "recipientName": "La", @@ -53,14 +53,14 @@ ], "provisioningState": "Succeeded" }, - "id": "/subscriptions/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/resourceGroups/testrg/providers/Microsoft.ImportExport/jobs/test-bn1-import-cpu100-01", + "id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/testrg/providers/Microsoft.ImportExport/jobs/test-bn1-import-cpu100-01", "name": "test-bn1-import-cpu100-01", "type": "Microsoft.ImportExport/jobs", "location": "East US 2" }, { "properties": { - "storageAccountId": "/subscriptions/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/resourceGroups/testrg/providers/Microsoft.Storage/storageAccounts/xtprodtestarmos2", + "storageAccountId": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/testrg/providers/Microsoft.Storage/storageAccounts/xtprodtestarmos2", "jobType": "Import", "returnAddress": { "recipientName": "La", @@ -109,7 +109,7 @@ ], "provisioningState": "Succeeded" }, - "id": "/subscriptions/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/resourceGroups/testrg/providers/Microsoft.ImportExport/jobs/test-bn1-import-cpu100-02", + "id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/testrg/providers/Microsoft.ImportExport/jobs/test-bn1-import-cpu100-02", "name": "test-bn1-import-cpu100-02", "type": "Microsoft.ImportExport/jobs", "location": "East US 2" diff --git a/specification/storageimportexport/resource-manager/Microsoft.ImportExport/stable/2016-11-01/examples/UpdateJob.json b/specification/storageimportexport/resource-manager/Microsoft.ImportExport/stable/2016-11-01/examples/UpdateJob.json index fbd80906abc7..2b930e957008 100644 --- a/specification/storageimportexport/resource-manager/Microsoft.ImportExport/stable/2016-11-01/examples/UpdateJob.json +++ b/specification/storageimportexport/resource-manager/Microsoft.ImportExport/stable/2016-11-01/examples/UpdateJob.json @@ -1,9 +1,9 @@ { "parameters": { "api-version": "2016-11-01", - "subscriptionId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", - "resourceGroupName": "Default-Storage-WestUS", - "jobName": "test-by1-import", + "subscriptionId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + "resourceGroupName": "myResourceGroup", + "jobName": "myJob", "body": { "properties": { "state": "", @@ -16,7 +16,7 @@ "200": { "body": { "properties": { - "storageAccountId": "/subscriptions/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/test", + "storageAccountId": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.ClassicStorage/storageAccounts/test", "jobType": "Import", "returnAddress": { "recipientName": "Tets", @@ -55,8 +55,8 @@ ], "provisioningState": "Succeeded" }, - "id": "/subscriptions/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ImportExport/jobs/test-by1-import", - "name": "test-by1-import", + "id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.ImportExport/jobs/myJob", + "name": "myJob", "type": "Microsoft.ImportExport/jobs", "location": "West US" } diff --git a/specification/storageimportexport/resource-manager/readme.az.md b/specification/storageimportexport/resource-manager/readme.az.md new file mode 100644 index 000000000000..c5e60e905f7f --- /dev/null +++ b/specification/storageimportexport/resource-manager/readme.az.md @@ -0,0 +1,17 @@ +## Azure CLI + +These settings apply only when `--az` is specified on the command line. + +``` yaml $(az) +az: + extensions: storageimportexport + package-name: azure-mgmt-storageimportexport + namespace: azure.mgmt.storageimportexport +python-sdk-output-folder: "$(output-folder)/src/storageimportexport/azext_storageimportexport/vendored_sdks/storageimportexport" +cli: + cli-directive: + - where: + type: 'PutJobParameters' + prop: 'properties' + flatten: true +``` diff --git a/specification/storageimportexport/resource-manager/readme.cli.md b/specification/storageimportexport/resource-manager/readme.cli.md new file mode 100644 index 000000000000..94c1be9eda47 --- /dev/null +++ b/specification/storageimportexport/resource-manager/readme.cli.md @@ -0,0 +1,20 @@ +## CLI + +These settings apply only when `--cli` is specified on the command line. + +``` yaml $(cli) +cli: + cli-name: storageimportexport + namespace: azure.mgmt.storageimportexport + package-name: azure-mgmt-storageimportexport + test-scenario: + - name: /Jobs/put/Create job + - name: /Jobs/get/Get job + - name: /Locations/get/Get locations + - name: /BitLockerKeys/post/List BitLocker Keys for drives in a job + - name: /Jobs/get/List jobs in a resource group + - name: /Jobs/get/List jobs in a subscription + - name: /Locations/get/List locations + - name: /Jobs/patch/Update job + - name: /Jobs/delete/Delete job +``` diff --git a/specification/storageimportexport/resource-manager/readme.python.md b/specification/storageimportexport/resource-manager/readme.python.md new file mode 100644 index 000000000000..5cd84499782f --- /dev/null +++ b/specification/storageimportexport/resource-manager/readme.python.md @@ -0,0 +1,27 @@ +## Python + +These settings apply only when `--python` is specified on the command line. +Please also specify `--python-sdks-folder=`. +Use `--python-mode=update` if you already have a setup.py and just want to update the code itself. + +``` yaml $(python) +python-mode: create +python: + azure-arm: true + license-header: MICROSOFT_MIT_NO_VERSION + payload-flattening-threshold: 2 + namespace: azure.mgmt.storageimportexport + package-name: azure-mgmt-storageimportexport + clear-output-folder: true + package-version: 0.1.0 +``` +``` yaml $(python) && $(python-mode) == 'update' +python: + no-namespace-folders: true + output-folder: $(python-sdks-folder)/storageimportexport/azure-mgmt-storageimportexport/azure/mgmt/storageimportexport +``` +``` yaml $(python) && $(python-mode) == 'create' +python: + basic-setup-py: true + output-folder: $(python-sdks-folder)/storageimportexport/azure-mgmt-storageimportexport +```