Skip to content

Commit

Permalink
readme files for storageimportexport (Azure#8893)
Browse files Browse the repository at this point in the history
* readme files for storageimportexport

* flattening job parameters

* fixed examples and test scenario

* normalizing examples
  • Loading branch information
Zim Kalinowski authored and 00Kai0 committed Oct 12, 2020
1 parent 8892117 commit 9b63a5e
Show file tree
Hide file tree
Showing 10 changed files with 104 additions and 40 deletions.
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -78,16 +78,16 @@
],
"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"
}
},
"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",
Expand Down Expand Up @@ -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"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"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": {
"body": {
"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",
Expand Down Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"parameters": {
"api-version": "2016-11-01",
"subscriptionId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
"subscriptionId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
},
"responses": {
"200": {
"body": {
"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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
@@ -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": "",
Expand All @@ -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",
Expand Down Expand Up @@ -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"
}
Expand Down
17 changes: 17 additions & 0 deletions specification/storageimportexport/resource-manager/readme.az.md
Original file line number Diff line number Diff line change
@@ -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
```
20 changes: 20 additions & 0 deletions specification/storageimportexport/resource-manager/readme.cli.md
Original file line number Diff line number Diff line change
@@ -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
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
## Python

These settings apply only when `--python` is specified on the command line.
Please also specify `--python-sdks-folder=<path to the root directory of your azure-sdk-for-python clone>`.
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
```

0 comments on commit 9b63a5e

Please sign in to comment.