From 2907e736d6af4961ec9e399e17cbed5aeb388c65 Mon Sep 17 00:00:00 2001 From: Cedric Davies Date: Thu, 2 May 2019 12:43:36 -0700 Subject: [PATCH 1/4] Add CreateFromJson POST operation to ScaleUnit --- .../preview/2016-05-01/ScaleUnit.json | 122 +++++++++++++++++- .../examples/ScaleUnit/CreateFromJson.json | 33 +++++ 2 files changed, 153 insertions(+), 2 deletions(-) create mode 100644 specification/azsadmin/resource-manager/fabric/Microsoft.Fabric.Admin/preview/2016-05-01/examples/ScaleUnit/CreateFromJson.json diff --git a/specification/azsadmin/resource-manager/fabric/Microsoft.Fabric.Admin/preview/2016-05-01/ScaleUnit.json b/specification/azsadmin/resource-manager/fabric/Microsoft.Fabric.Admin/preview/2016-05-01/ScaleUnit.json index 4db15ee95309..c7924daa1445 100644 --- a/specification/azsadmin/resource-manager/fabric/Microsoft.Fabric.Admin/preview/2016-05-01/ScaleUnit.json +++ b/specification/azsadmin/resource-manager/fabric/Microsoft.Fabric.Admin/preview/2016-05-01/ScaleUnit.json @@ -19,14 +19,14 @@ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Fabric.Admin/fabricLocations/{location}/scaleUnits/{scaleUnit}/ScaleOut": { "post": { "x-ms-examples": { - "Add a new scale unit.": { + "Scales out a scale unit.": { "$ref": "./examples/ScaleUnit/ScaleOut.json" } }, "tags": [ "ScaleUnits" ], - "description": "Add a new scale unit.", + "description": "Scales out a scale unit.", "operationId": "ScaleUnits_ScaleOut", "parameters": [ { @@ -59,6 +59,49 @@ "x-ms-long-running-operation": true } }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Fabric.Admin/fabricLocations/{location}/scaleUnits/{scaleUnit}/createFromJson": { + "post": { + "x-ms-examples": { + "Add a new scale unit.": { + "$ref": "./examples/ScaleUnit/CreateFromJson.json" + } + }, + "tags": [ + "ScaleUnits" + ], + "description": "Add a new scale unit.", + "operationId": "ScaleUnits_CreateFromJson", + "parameters": [ + { + "$ref": "Fabric.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "Fabric.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "Fabric.json#/parameters/LocationParameter" + }, + { + "$ref": "#/parameters/ScaleUnitParameter" + }, + { + "$ref": "#/parameters/CreateFromJsonScaleUnitParametersInBody" + }, + { + "$ref": "Fabric.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK" + }, + "202": { + "description": "ACCEPTED" + } + }, + "x-ms-long-running-operation": true + } + }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Fabric.Admin/fabricLocations/{location}/scaleUnits/{scaleUnit}": { "get": { "x-ms-examples": { @@ -288,6 +331,71 @@ "type": "boolean" } } + }, + "NetworkDefinitionParameter": { + "description": "A definition of the network received from a new cluster operation.", + "type": "object", + "properties": { + "subnet": { + "description": "The subnet IP mask in the example format 10.0.0.0/25.", + "type": "array", + "items": { + "type": "string" + } + }, + "vlanId": { + "description": "The Vlan ID of the subnet.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "CreateFromJsonScaleUnitParametersList": { + "description": "A list of input data that allows for creating the new scale unit.", + "type": "object", + "properties": { + "clusterName": { + "description": "Cluster name for the new scale unit.", + "type": "string" + }, + "physicalNodes": { + "description": "List of nodes in the scale unit.", + "type": "array", + "items": { + "$ref": "#/definitions/DeploymentJsonPhysicalNodeParameters" + } + }, + "torSwitchBgpAsn": { + "description": "The ASN for the cluster's rack TOR.", + "type": "string" + }, + "softwareBgpAsn": { + "description": "The software ASN for the cluster's rack.", + "type": "string" + }, + "torSwitchBgpPeerIp": { + "description": "The list of IP addresses used for TOR communication.", + "type": "array", + "items": { + "type": "string" + } + }, + "infrastructureNetwork": { + "description": "The information associated with the infrastructure network that will be subdivided into subnets.", + "type": "#/definitions/NetworkDefinitionParameter" + }, + "storageNetwork": { + "description": "The information associated with the storage network that will be subdivided into subnets.", + "type": "#/definitions/NetworkDefinitionParameter" + }, + "netQosPriority": { + "description": "The network QOS priority setting.", + "type": "integer", + "format": "int32" + } + } } }, "parameters": { @@ -308,6 +416,16 @@ "$ref": "#/definitions/ScaleOutScaleUnitParametersList" }, "x-ms-parameter-location": "method" + }, + "CreateFromJsonScaleUnitParametersInBody": { + "name": "creationData", + "description": "A list of input data that allows for creating the new scale unit.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreateFromJsonScaleUnitParametersList" + }, + "x-ms-parameter-location": "method" } }, "securityDefinitions": { diff --git a/specification/azsadmin/resource-manager/fabric/Microsoft.Fabric.Admin/preview/2016-05-01/examples/ScaleUnit/CreateFromJson.json b/specification/azsadmin/resource-manager/fabric/Microsoft.Fabric.Admin/preview/2016-05-01/examples/ScaleUnit/CreateFromJson.json new file mode 100644 index 000000000000..452ceee6e2b5 --- /dev/null +++ b/specification/azsadmin/resource-manager/fabric/Microsoft.Fabric.Admin/preview/2016-05-01/examples/ScaleUnit/CreateFromJson.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "api-version": "2016-05-01", + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "resourceGroupName": "System.local", + "location": "local", + "creationData": { + "clusterName": "cluster", + "physicalNodes": [{ + "name": "machine", + "bmcIPv4Address": "192.0.0.1" + }], + "torSwitchBgpAsn": "64703", + "softwareBgpAsn": "64703", + "torSwitchBgpPeerIp": [ + "10.0.0.1" + ], + "InfrastructureNetwork": { + "Subnet": ["10.0.0.1/24"], + "VlanId": ["0"] + }, + "StorageNetwork": { + "Subnet": ["10.0.0.1/24"], + "VlanId": ["0"] + }, + "NetQosPriority": 1 + } + }, + "responses": { + "200": {}, + "202": {} + } +} \ No newline at end of file From b12d8e569b53b83872097ff1b4e262e0363dc364 Mon Sep 17 00:00:00 2001 From: Cedric Davies Date: Thu, 9 May 2019 15:23:07 -0700 Subject: [PATCH 2/4] Fix few minor review comments from Marta --- .../Microsoft.Fabric.Admin/preview/2016-05-01/ScaleUnit.json | 2 +- .../preview/2016-05-01/examples/ScaleUnit/CreateFromJson.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/azsadmin/resource-manager/fabric/Microsoft.Fabric.Admin/preview/2016-05-01/ScaleUnit.json b/specification/azsadmin/resource-manager/fabric/Microsoft.Fabric.Admin/preview/2016-05-01/ScaleUnit.json index c7924daa1445..17ab0cd5e3fb 100644 --- a/specification/azsadmin/resource-manager/fabric/Microsoft.Fabric.Admin/preview/2016-05-01/ScaleUnit.json +++ b/specification/azsadmin/resource-manager/fabric/Microsoft.Fabric.Admin/preview/2016-05-01/ScaleUnit.json @@ -16,7 +16,7 @@ "application/json" ], "paths": { - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Fabric.Admin/fabricLocations/{location}/scaleUnits/{scaleUnit}/ScaleOut": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Fabric.Admin/fabricLocations/{location}/scaleUnits/{scaleUnit}/scaleOut": { "post": { "x-ms-examples": { "Scales out a scale unit.": { diff --git a/specification/azsadmin/resource-manager/fabric/Microsoft.Fabric.Admin/preview/2016-05-01/examples/ScaleUnit/CreateFromJson.json b/specification/azsadmin/resource-manager/fabric/Microsoft.Fabric.Admin/preview/2016-05-01/examples/ScaleUnit/CreateFromJson.json index 452ceee6e2b5..e8628d3afd83 100644 --- a/specification/azsadmin/resource-manager/fabric/Microsoft.Fabric.Admin/preview/2016-05-01/examples/ScaleUnit/CreateFromJson.json +++ b/specification/azsadmin/resource-manager/fabric/Microsoft.Fabric.Admin/preview/2016-05-01/examples/ScaleUnit/CreateFromJson.json @@ -4,8 +4,8 @@ "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", "resourceGroupName": "System.local", "location": "local", + "scaleUnit": "S-Cluster", "creationData": { - "clusterName": "cluster", "physicalNodes": [{ "name": "machine", "bmcIPv4Address": "192.0.0.1" From acd28c5e87b6022d1b5b9fc0ea772782ffb16edd Mon Sep 17 00:00:00 2001 From: Cedric Davies Date: Fri, 10 May 2019 14:13:48 -0700 Subject: [PATCH 3/4] Add missing DeploymentJsonPhysicalNodeParameters definition --- .../preview/2016-05-01/ScaleUnit.json | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/specification/azsadmin/resource-manager/fabric/Microsoft.Fabric.Admin/preview/2016-05-01/ScaleUnit.json b/specification/azsadmin/resource-manager/fabric/Microsoft.Fabric.Admin/preview/2016-05-01/ScaleUnit.json index 17ab0cd5e3fb..05ffb72c81d6 100644 --- a/specification/azsadmin/resource-manager/fabric/Microsoft.Fabric.Admin/preview/2016-05-01/ScaleUnit.json +++ b/specification/azsadmin/resource-manager/fabric/Microsoft.Fabric.Admin/preview/2016-05-01/ScaleUnit.json @@ -352,6 +352,21 @@ } } }, + "DeploymentJsonPhysicalNodeParameters": { + "description": "Description of a bare metal node used for scale unit scale out operations.", + "type": "object", + "properties": { + "bmcIpAddress": { + "x-ms-client-name": "BMCIPAddress", + "description": "BMC address of the physical machine.", + "type": "string" + }, + "name": { + "description": "Computer name of the physical machine.", + "type": "string" + } + } + }, "CreateFromJsonScaleUnitParametersList": { "description": "A list of input data that allows for creating the new scale unit.", "type": "object", @@ -384,11 +399,11 @@ }, "infrastructureNetwork": { "description": "The information associated with the infrastructure network that will be subdivided into subnets.", - "type": "#/definitions/NetworkDefinitionParameter" + "$ref": "#/definitions/NetworkDefinitionParameter" }, "storageNetwork": { "description": "The information associated with the storage network that will be subdivided into subnets.", - "type": "#/definitions/NetworkDefinitionParameter" + "$ref": "#/definitions/NetworkDefinitionParameter" }, "netQosPriority": { "description": "The network QOS priority setting.", From c1a958a5f44edfe16148fd7142f9282a8c1f56d5 Mon Sep 17 00:00:00 2001 From: Cedric Davies Date: Fri, 17 May 2019 14:09:31 -0700 Subject: [PATCH 4/4] Resolve code review commments. Fix IP address and put back clustername in the sample --- .../2016-05-01/examples/ScaleUnit/CreateFromJson.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/specification/azsadmin/resource-manager/fabric/Microsoft.Fabric.Admin/preview/2016-05-01/examples/ScaleUnit/CreateFromJson.json b/specification/azsadmin/resource-manager/fabric/Microsoft.Fabric.Admin/preview/2016-05-01/examples/ScaleUnit/CreateFromJson.json index e8628d3afd83..28c29905b580 100644 --- a/specification/azsadmin/resource-manager/fabric/Microsoft.Fabric.Admin/preview/2016-05-01/examples/ScaleUnit/CreateFromJson.json +++ b/specification/azsadmin/resource-manager/fabric/Microsoft.Fabric.Admin/preview/2016-05-01/examples/ScaleUnit/CreateFromJson.json @@ -4,11 +4,12 @@ "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", "resourceGroupName": "System.local", "location": "local", - "scaleUnit": "S-Cluster", + "scaleUnit": "cluster", "creationData": { + "clusterName": "cluster", "physicalNodes": [{ "name": "machine", - "bmcIPv4Address": "192.0.0.1" + "bmcIPAddress": "192.0.0.1" }], "torSwitchBgpAsn": "64703", "softwareBgpAsn": "64703",