Skip to content

Commit

Permalink
Add CreateFromJson POST operation to ScaleUnit (#5844)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
cednation authored and tjprescott committed May 31, 2019
1 parent 85ca88d commit c36f370
Show file tree
Hide file tree
Showing 2 changed files with 170 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
{
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -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": {
Expand All @@ -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": {
Expand Down
Original file line number Diff line number Diff line change
@@ -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": {}
}
}

0 comments on commit c36f370

Please sign in to comment.