From b149386ba07a3c82474c3cc156a85c0745c2fa2e Mon Sep 17 00:00:00 2001 From: Chen Shou Date: Thu, 27 Jul 2017 11:50:14 -0700 Subject: [PATCH 1/5] Make ContainerInstance a standalone SDK --- .../compute/resource-manager/readme.md | 10 --- .../2017-08-01-preview/containerInstance.json | 0 .../ContainerGroupsCreateOrUpdate.json | 0 .../examples/ContainerGroupsDelete.json | 0 .../examples/ContainerGroupsGet.json | 0 .../examples/ContainerGroupsList.json | 0 .../examples/ContainerGroupsListAll.json | 0 .../examples/ContainerLogsList.json | 0 .../resource-manager/readme.md | 72 +++++++++++++++++++ 9 files changed, 72 insertions(+), 10 deletions(-) rename specification/{compute => containerinstance}/resource-manager/Microsoft.ContainerInstance/2017-08-01-preview/containerInstance.json (100%) rename specification/{compute => containerinstance}/resource-manager/Microsoft.ContainerInstance/2017-08-01-preview/examples/ContainerGroupsCreateOrUpdate.json (100%) rename specification/{compute => containerinstance}/resource-manager/Microsoft.ContainerInstance/2017-08-01-preview/examples/ContainerGroupsDelete.json (100%) rename specification/{compute => containerinstance}/resource-manager/Microsoft.ContainerInstance/2017-08-01-preview/examples/ContainerGroupsGet.json (100%) rename specification/{compute => containerinstance}/resource-manager/Microsoft.ContainerInstance/2017-08-01-preview/examples/ContainerGroupsList.json (100%) rename specification/{compute => containerinstance}/resource-manager/Microsoft.ContainerInstance/2017-08-01-preview/examples/ContainerGroupsListAll.json (100%) rename specification/{compute => containerinstance}/resource-manager/Microsoft.ContainerInstance/2017-08-01-preview/examples/ContainerLogsList.json (100%) create mode 100644 specification/containerinstance/resource-manager/readme.md diff --git a/specification/compute/resource-manager/readme.md b/specification/compute/resource-manager/readme.md index c9297cd3b8fc..ead32fce76af 100644 --- a/specification/compute/resource-manager/readme.md +++ b/specification/compute/resource-manager/readme.md @@ -61,16 +61,6 @@ input-file: - Microsoft.Compute/2017-03-30/runCommands.json ``` -### Tag: package-container-instance-2017-08-preview - -These settings apply only when `--tag=package-container-instance-2017-08-preview` is specified on the command line. - -``` yaml $(tag) == 'package-container-instance-2017-08-preview' -input-file: -- Microsoft.ContainerInstance/2017-08-01-preview/containerInstance.json -``` - - ### Tag: package-container-service-2017-01 These settings apply only when `--tag=package-container-service-2017-01` is specified on the command line. diff --git a/specification/compute/resource-manager/Microsoft.ContainerInstance/2017-08-01-preview/containerInstance.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/2017-08-01-preview/containerInstance.json similarity index 100% rename from specification/compute/resource-manager/Microsoft.ContainerInstance/2017-08-01-preview/containerInstance.json rename to specification/containerinstance/resource-manager/Microsoft.ContainerInstance/2017-08-01-preview/containerInstance.json diff --git a/specification/compute/resource-manager/Microsoft.ContainerInstance/2017-08-01-preview/examples/ContainerGroupsCreateOrUpdate.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/2017-08-01-preview/examples/ContainerGroupsCreateOrUpdate.json similarity index 100% rename from specification/compute/resource-manager/Microsoft.ContainerInstance/2017-08-01-preview/examples/ContainerGroupsCreateOrUpdate.json rename to specification/containerinstance/resource-manager/Microsoft.ContainerInstance/2017-08-01-preview/examples/ContainerGroupsCreateOrUpdate.json diff --git a/specification/compute/resource-manager/Microsoft.ContainerInstance/2017-08-01-preview/examples/ContainerGroupsDelete.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/2017-08-01-preview/examples/ContainerGroupsDelete.json similarity index 100% rename from specification/compute/resource-manager/Microsoft.ContainerInstance/2017-08-01-preview/examples/ContainerGroupsDelete.json rename to specification/containerinstance/resource-manager/Microsoft.ContainerInstance/2017-08-01-preview/examples/ContainerGroupsDelete.json diff --git a/specification/compute/resource-manager/Microsoft.ContainerInstance/2017-08-01-preview/examples/ContainerGroupsGet.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/2017-08-01-preview/examples/ContainerGroupsGet.json similarity index 100% rename from specification/compute/resource-manager/Microsoft.ContainerInstance/2017-08-01-preview/examples/ContainerGroupsGet.json rename to specification/containerinstance/resource-manager/Microsoft.ContainerInstance/2017-08-01-preview/examples/ContainerGroupsGet.json diff --git a/specification/compute/resource-manager/Microsoft.ContainerInstance/2017-08-01-preview/examples/ContainerGroupsList.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/2017-08-01-preview/examples/ContainerGroupsList.json similarity index 100% rename from specification/compute/resource-manager/Microsoft.ContainerInstance/2017-08-01-preview/examples/ContainerGroupsList.json rename to specification/containerinstance/resource-manager/Microsoft.ContainerInstance/2017-08-01-preview/examples/ContainerGroupsList.json diff --git a/specification/compute/resource-manager/Microsoft.ContainerInstance/2017-08-01-preview/examples/ContainerGroupsListAll.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/2017-08-01-preview/examples/ContainerGroupsListAll.json similarity index 100% rename from specification/compute/resource-manager/Microsoft.ContainerInstance/2017-08-01-preview/examples/ContainerGroupsListAll.json rename to specification/containerinstance/resource-manager/Microsoft.ContainerInstance/2017-08-01-preview/examples/ContainerGroupsListAll.json diff --git a/specification/compute/resource-manager/Microsoft.ContainerInstance/2017-08-01-preview/examples/ContainerLogsList.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/2017-08-01-preview/examples/ContainerLogsList.json similarity index 100% rename from specification/compute/resource-manager/Microsoft.ContainerInstance/2017-08-01-preview/examples/ContainerLogsList.json rename to specification/containerinstance/resource-manager/Microsoft.ContainerInstance/2017-08-01-preview/examples/ContainerLogsList.json diff --git a/specification/containerinstance/resource-manager/readme.md b/specification/containerinstance/resource-manager/readme.md new file mode 100644 index 000000000000..1b6d75264712 --- /dev/null +++ b/specification/containerinstance/resource-manager/readme.md @@ -0,0 +1,72 @@ +# ContainerInstance + +> see https://aka.ms/autorest + +This is the AutoRest configuration file for ContainerInstance. + + + +--- +## Getting Started +To build the SDK for ContainerInstance, simply [Install AutoRest](https://aka.ms/autorest/install) and in this folder, run: + +> `autorest` + +To see additional help and options, run: + +> `autorest --help` +--- + +## Configuration + + + +### Basic Information +These are the global settings for the ContainerInstance API. + +``` yaml +openapi-type: arm +tag: package-2017-08-preview +``` + + +### Tag: package-container-instance-2017-08-preview + +These settings apply only when `--tag=package-container-instance-2017-08-preview` is specified on the command line. + +``` yaml $(tag) == 'package-container-instance-2017-08-preview' +input-file: +- Microsoft.ContainerInstance/2017-08-01-preview/containerInstance.json +``` + + +--- +# Code Generation + +## C# + +These settings apply only when `--csharp` is specified on the command line. +Please also specify `--csharp-sdks-folder=`. + +``` yaml $(csharp) +csharp: + azure-arm: true + license-header: MICROSOFT_MIT_NO_VERSION + namespace: Microsoft.Azure.Management.ContainerInstance + payload-flattening-threshold: 1 + output-folder: $(csharp-sdks-folder)/ContainerInstance/Management.ContainerInstance/Generated + clear-output-folder: true +``` + + +## Python + +These settings apply only when `--python` is specified on the command line. + +``` yaml $(python) +python: + # override the default output folder + output-folder: $(output-folder)/python + license-header: MICROSOFT_MIT_NO_VERSION + payload-flattening-threshold: 2 +``` From 69ab673f3351029271e1d466f2615d7cb63a4440 Mon Sep 17 00:00:00 2001 From: Chen Shou Date: Thu, 27 Jul 2017 12:38:02 -0700 Subject: [PATCH 2/5] added namespace for python package --- specification/containerinstance/resource-manager/readme.md | 1 + 1 file changed, 1 insertion(+) diff --git a/specification/containerinstance/resource-manager/readme.md b/specification/containerinstance/resource-manager/readme.md index 1b6d75264712..8e90e104a155 100644 --- a/specification/containerinstance/resource-manager/readme.md +++ b/specification/containerinstance/resource-manager/readme.md @@ -66,6 +66,7 @@ These settings apply only when `--python` is specified on the command line. ``` yaml $(python) python: # override the default output folder + namespace: azure.mgmt.containerinstance output-folder: $(output-folder)/python license-header: MICROSOFT_MIT_NO_VERSION payload-flattening-threshold: 2 From 4073adc96746a611abe953443925d027972591d1 Mon Sep 17 00:00:00 2001 From: Chen Shou Date: Thu, 27 Jul 2017 12:41:32 -0700 Subject: [PATCH 3/5] corrected the tags in readme --- specification/containerinstance/resource-manager/readme.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/containerinstance/resource-manager/readme.md b/specification/containerinstance/resource-manager/readme.md index 8e90e104a155..9a0cee3c5a6a 100644 --- a/specification/containerinstance/resource-manager/readme.md +++ b/specification/containerinstance/resource-manager/readme.md @@ -30,11 +30,11 @@ tag: package-2017-08-preview ``` -### Tag: package-container-instance-2017-08-preview +### Tag: package-2017-08-preview -These settings apply only when `--tag=package-container-instance-2017-08-preview` is specified on the command line. +These settings apply only when `--tag=package-2017-08-preview` is specified on the command line. -``` yaml $(tag) == 'package-container-instance-2017-08-preview' +``` yaml $(tag) == 'package-2017-08-preview' input-file: - Microsoft.ContainerInstance/2017-08-01-preview/containerInstance.json ``` From dd1b3f3d090c21d4e835de87c038b309f2af392e Mon Sep 17 00:00:00 2001 From: Chen Shou Date: Thu, 27 Jul 2017 12:49:19 -0700 Subject: [PATCH 4/5] adjusted containerInstance swagger title --- .../2017-08-01-preview/containerInstance.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/2017-08-01-preview/containerInstance.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/2017-08-01-preview/containerInstance.json index 8f84576c8600..965957f86a50 100644 --- a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/2017-08-01-preview/containerInstance.json +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/2017-08-01-preview/containerInstance.json @@ -2,7 +2,7 @@ "swagger": "2.0", "info": { "version": "2017-08-01-preview", - "title": "Microsoft Container Instance Management Client" + "title": "ContainerInstanceManagementClient" }, "host": "management.azure.com", "schemes": [ From aa1318f285e19990ffc5ef3bca90fc0a12edbc79 Mon Sep 17 00:00:00 2001 From: Chen Shou Date: Thu, 27 Jul 2017 13:54:43 -0700 Subject: [PATCH 5/5] adjusted api naming --- .../2017-08-01-preview/containerInstance.json | 14 +++++++------- .../examples/ContainerGroupsList.json | 1 - ...son => ContainerGroupsListByResourceGroup.json} | 1 + 3 files changed, 8 insertions(+), 8 deletions(-) rename specification/containerinstance/resource-manager/Microsoft.ContainerInstance/2017-08-01-preview/examples/{ContainerGroupsListAll.json => ContainerGroupsListByResourceGroup.json} (98%) diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/2017-08-01-preview/containerInstance.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/2017-08-01-preview/containerInstance.json index 965957f86a50..aad99c489883 100644 --- a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/2017-08-01-preview/containerInstance.json +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/2017-08-01-preview/containerInstance.json @@ -35,10 +35,10 @@ "paths": { "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/containerGroups": { "get": { - "operationId": "ContainerGroups_ListAll", + "operationId": "ContainerGroups_List", "x-ms-examples": { - "ContainerGroupsListAll": { - "$ref": "./examples/ContainerGroupsListAll.json" + "ContainerGroupsList": { + "$ref": "./examples/ContainerGroupsList.json" } }, "description": "Get the list of container groups in a given subscription.", @@ -65,10 +65,10 @@ }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups": { "get": { - "operationId": "ContainerGroups_List", + "operationId": "ContainerGroups_ListByResourceGroup", "x-ms-examples": { - "ContainerGroupsList": { - "$ref": "./examples/ContainerGroupsList.json" + "ContainerGroupsListByResourceGroup": { + "$ref": "./examples/ContainerGroupsListByResourceGroup.json" } }, "description": "Get the list of container groups in a given resource group.", @@ -278,7 +278,7 @@ "name": "tail", "in": "query", "description": "Only show this number of log lines. If not provided, all available logs are shown.", - "type": "string" + "type": "integer" } ], "responses": { diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/2017-08-01-preview/examples/ContainerGroupsList.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/2017-08-01-preview/examples/ContainerGroupsList.json index 52b5ed829051..2a4304aa0d37 100644 --- a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/2017-08-01-preview/examples/ContainerGroupsList.json +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/2017-08-01-preview/examples/ContainerGroupsList.json @@ -1,7 +1,6 @@ { "parameters": { "subscriptionId": "subid", - "resourceGroupName": "demo", "api-version": "2017-08-01-preview" }, "responses": { diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/2017-08-01-preview/examples/ContainerGroupsListAll.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/2017-08-01-preview/examples/ContainerGroupsListByResourceGroup.json similarity index 98% rename from specification/containerinstance/resource-manager/Microsoft.ContainerInstance/2017-08-01-preview/examples/ContainerGroupsListAll.json rename to specification/containerinstance/resource-manager/Microsoft.ContainerInstance/2017-08-01-preview/examples/ContainerGroupsListByResourceGroup.json index 2a4304aa0d37..52b5ed829051 100644 --- a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/2017-08-01-preview/examples/ContainerGroupsListAll.json +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/2017-08-01-preview/examples/ContainerGroupsListByResourceGroup.json @@ -1,6 +1,7 @@ { "parameters": { "subscriptionId": "subid", + "resourceGroupName": "demo", "api-version": "2017-08-01-preview" }, "responses": {