From c36f370c605981e438f7d7719feb0a237af7592e Mon Sep 17 00:00:00 2001 From: Cedric Davies Date: Fri, 31 May 2019 10:31:21 -0700 Subject: [PATCH] Add CreateFromJson POST operation to ScaleUnit (#5844) * Add CreateFromJson POST operation to ScaleUnit * Fix few minor review comments from Marta * Add missing DeploymentJsonPhysicalNodeParameters definition * Resolve code review commments. Fix IP address and put back clustername in the sample --- .../preview/2016-05-01/ScaleUnit.json | 139 +++++++++++++++++- .../examples/ScaleUnit/CreateFromJson.json | 34 +++++ 2 files changed, 170 insertions(+), 3 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..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 @@ -16,17 +16,17 @@ "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": { - "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,86 @@ "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" + } + } + } + }, + "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", + "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.", + "$ref": "#/definitions/NetworkDefinitionParameter" + }, + "storageNetwork": { + "description": "The information associated with the storage network that will be subdivided into subnets.", + "$ref": "#/definitions/NetworkDefinitionParameter" + }, + "netQosPriority": { + "description": "The network QOS priority setting.", + "type": "integer", + "format": "int32" + } + } } }, "parameters": { @@ -308,6 +431,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..28c29905b580 --- /dev/null +++ b/specification/azsadmin/resource-manager/fabric/Microsoft.Fabric.Admin/preview/2016-05-01/examples/ScaleUnit/CreateFromJson.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "api-version": "2016-05-01", + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "resourceGroupName": "System.local", + "location": "local", + "scaleUnit": "cluster", + "creationData": { + "clusterName": "cluster", + "physicalNodes": [{ + "name": "machine", + "bmcIPAddress": "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