Skip to content

Commit

Permalink
Create a new resource workload for hpcworkbench resource provider (#4625
Browse files Browse the repository at this point in the history
)

* Added new resource workload

* Updated consortium tags and definitions

* Resolved pr comments

* Updated sku definition

* updated workload properties

* fixed validation error

* Fixed consortium properties

* Added cli access type in consortium

* fixed consortium.json

* Resolved comments

* Fixed validation error

* Removed location from examples

* fixed model validation error

* Removed List by ResourceGroup and List by Subscription for workload
  • Loading branch information
sabherwalshruti authored Sep 22, 2021
1 parent c0568ea commit 9498354
Show file tree
Hide file tree
Showing 9 changed files with 815 additions and 185 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,21 +80,21 @@
"in": "body",
"description": "Parameters supplied to the create or update consortium operation.",
"schema": {
"$ref": "./hpcworkbench.json#/definitions/Consortium"
"$ref": "#/definitions/Consortium"
}
}
],
"responses": {
"200": {
"description": "Update successful. The operation returns the resulting Consortium resource.",
"schema": {
"$ref": "./hpcworkbench.json#/definitions/Consortium"
"$ref": "#/definitions/Consortium"
}
},
"201": {
"description": "Create successful. The operation returns the resulting Consortium resource.",
"schema": {
"$ref": "./hpcworkbench.json#/definitions/Consortium"
"$ref": "#/definitions/Consortium"
}
},
"default": {
Expand Down Expand Up @@ -168,21 +168,21 @@
"in": "body",
"description": "Parameters supplied to the create or update consortium operation.",
"schema": {
"$ref": "./hpcworkbench.json#/definitions/Consortium"
"$ref": "#/definitions/Consortium"
}
}
],
"responses": {
"200": {
"description": "Update successful. The operation returns the resulting Consortium resource.",
"schema": {
"$ref": "./hpcworkbench.json#/definitions/Consortium"
"$ref": "#/definitions/Consortium"
}
},
"201": {
"description": "Create successful. The operation returns the resulting Consortium resource.",
"schema": {
"$ref": "./hpcworkbench.json#/definitions/Consortium"
"$ref": "#/definitions/Consortium"
}
},
"default": {
Expand Down Expand Up @@ -248,7 +248,7 @@
"200": {
"description": "Request is successful. The operation returns the specified consortium.",
"schema": {
"$ref": "./hpcworkbench.json#/definitions/Consortium"
"$ref": "#/definitions/Consortium"
}
},
"default": {
Expand Down Expand Up @@ -314,7 +314,7 @@
"200": {
"description": "The operation is completed successfully",
"schema": {
"$ref": "./hpcworkbench.json#/definitions/Consortium"
"$ref": "#/definitions/Consortium"
}
},
"204": {
Expand Down Expand Up @@ -378,7 +378,7 @@
"200": {
"description": "Request is successful. The operation returns the list of all consortiums",
"schema": {
"$ref": "./hpcworkbench.json#/definitions/ConsortiumPageableList"
"$ref": "#/definitions/ConsortiumPageableList"
}
},
"default": {
Expand Down Expand Up @@ -435,7 +435,7 @@
"200": {
"description": "Request is successful. The operation returns the list of all consortiums",
"schema": {
"$ref": "./hpcworkbench.json#/definitions/ConsortiumPageableList"
"$ref": "#/definitions/ConsortiumPageableList"
}
},
"default": {
Expand Down Expand Up @@ -485,7 +485,7 @@
"200": {
"description": "Request is successful. The operation returns the list of all consortiums",
"schema": {
"$ref": "./hpcworkbench.json#/definitions/ConsortiumPageableList"
"$ref": "#/definitions/ConsortiumPageableList"
}
},
"default": {
Expand Down Expand Up @@ -513,5 +513,192 @@
}
}
}
},
"definitions": {
"RemoteDesktop": {
"type": "object",
"description": "Remote Desktop properties.",
"properties": {
"etx": {
"$ref": "#/definitions/Etx",
"description": "The etx object."
}
}
},
"Etx": {
"type": "object",
"properties": {
"connectionNodeCount": {
"type": "integer",
"format": "int32",
"description": "The connection node count."
},
"licenseActivated": {
"description": "The license activated.",
"type": "boolean"
}
},
"description": "Etx properties."
},
"AccessConfiguration": {
"type": "object",
"description": "Access configuration properties.",
"properties": {
"accessType": {
"description": "Gets or sets the AccessType.",
"type": "string",
"readOnly": true,
"enum": [
"CLI",
"GUI"
],
"x-ms-enum": {
"name": "AccessType",
"modelAsString": true
}
},
"gatewayType": {
"description": "Gets or sets the GatewayType.",
"type": "string",
"readOnly": true,
"enum": [
"ExpressRoute",
"None",
"Vpn"
],
"x-ms-enum": {
"name": "GatewayType",
"modelAsString": true
}
},
"gatewayVnetId": {
"type": "string",
"description": "Gets or sets the GatewayVnetId."
},
"accessUrl": {
"type": "string",
"description": "Gets or sets the AccessUrl."
},
"ipAddress": {
"type": "string",
"description": "Gets or sets the IpAddress."
}
}
},
"ConsortiumPageableList": {
"description": "Microsoft.Sdw.Core.ResourceMetadata.PageableList implementation specific to pageable lists of Microsoft.Sdw.Core.ResourceMetadata.AzureResource`1.",
"type": "object",
"properties": {
"nextLink": {
"description": "Gets or sets the URL (link) to the next result set.",
"type": "string"
},
"value": {
"description": "Gets or sets the values to emit from this list.",
"type": "array",
"items": {
"$ref": "#/definitions/Consortium"
}
}
}
},
"ConsortiumPropertiesFormat": {
"type": "object",
"properties": {
"sku": {
"description": "Gets or sets the SKU.",
"type": "string"
},
"kind": {
"description": "Gets or sets the Kind.",
"type": "string"
},
"managedBy": {
"description": "Gets or sets the Managed By value.",
"type": "string"
},
"zones": {
"description": "Gets or sets the Zones.",
"type": "array",
"items": {
"type": "string"
}
},
"plan": {
"description": "Gets or sets the Plan.",
"type": "object",
"additionalProperties": {}
},
"identity": {
"description": "Gets or sets the Identity.",
"type": "object",
"additionalProperties": {}
},
"vmSize": {
"description": "Gets or sets the VmSize.",
"type": "string"
},
"allowedPublicIps": {
"description": "Gets or sets the AllowedPublicIps.",
"type": "array",
"items": {
"type": "string"
}
},
"userInterfaceMode": {
"description": "Gets or sets the UserInterfaceMode.",
"type": "string"
},
"accessType": {
"description": "Gets or sets the Access Type.",
"type": "string",
"readOnly": true,
"enum": [
"CLI",
"GUI"
],
"x-ms-enum": {
"name": "AccessType",
"modelAsString": true
}
},
"accessConfigurations": {
"type": "object",
"items": {
"$ref": "#/definitions/AccessConfiguration"
},
"description": "Gets or sets the Access Configuration."
},
"remoteDesktop": {
"type": "object",
"items": {
"$ref": "#/definitions/RemoteDesktop"
},
"description": "Gets or sets the Remote Desktop."
},
"provisioningState": {
"$ref": "./hpcworkbench.json#/definitions/ProvisioningState",
"description": "Gets the status of the consortium at the time the operation was called"
}
},
"description": "Consortium properties."
},
"Consortium": {
"description": "Consortium resource",
"type": "object",
"x-ms-azure-resource": true,
"properties": {
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/ConsortiumPropertiesFormat",
"description": "Consortium properties."
}
},
"allOf": [
{
"$ref": "./hpcworkbench.json#/definitions/Resource"
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"parameters": {
"subscriptionId": "d9f252e3-8046-4707-bfbd-e5b9e6011e07",
"resourceGroup": "resourceGroup",
"api-version": "2021-03-01-preview",
"instanceName": "test-instance",
"chamberName": "test-chamber",
"workloadName": "test-workload",
"workload": {
"properties": {
"location": "Central US",
"properties": {
"vmSize": "Standard_HC44rs",
"edaType": "Common"
}
}
}
},
"responses": {
"200": {
"body": {
"name": "test-workload",
"id": "/subscriptions/d9f252e3-8046-4707-bfbd-e5b9e6011e07/resourceGroups/resourceGroup/providers/Microsoft.HpcWorkbench/instances/test-instance/chambers/test-chamber/workloads/test-workload",
"type": "Microsoft.HpcWorkbench/instances/chambers/workloads",
"properties": {
"provisioningState": "Succeeded",
"vmSize": "Standard_D4d_v4",
"edaType": "Common"
}
}
},
"201": {
"body": {
"name": "test-workload",
"id": "/subscriptions/d9f252e3-8046-4707-bfbd-e5b9e6011e07/resourceGroups/resourceGroup/providers/Microsoft.HpcWorkbench/instances/test-instance/chambers/test-chamber/workloads/test-workload",
"type": "Microsoft.HpcWorkbench/instances/chambers/workloads",
"properties": {
"provisioningState": "Succeeded",
"vmSize": "Standard_D4d_v4",
"edaType": "Common"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"parameters": {
"subscriptionId": "d9f252e3-8046-4707-bfbd-e5b9e6011e07",
"resourceGroup": "resourceGroup",
"api-version": "2021-03-01-preview",
"instanceName": "test-instance",
"chamberName": "test-chamber",
"workloadName": "test-workload"
},
"responses": {
"200": {
"body": {}
},
"204": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"parameters": {
"subscriptionId": "d9f252e3-8046-4707-bfbd-e5b9e6011e07",
"resourceGroup": "resourceGroup",
"api-version": "2021-03-01-preview",
"instanceName": "test-instance",
"chamberName": "test-chamber",
"workloadName": "test-workload"
},
"responses": {
"200": {
"body": {
"name": "test-workload",
"id": "/subscriptions/d9f252e3-8046-4707-bfbd-e5b9e6011e07/resourceGroups/resourceGroup/providers/Microsoft.HpcWorkbench/instances/test-instance/chambers/test-chamber/workloads/test-workload",
"type": "Microsoft.HpcWorkbench/instances/chambers/workloads",
"properties": {
"provisioningState": "Succeeded",
"vmSize": "Standard_D4d_v4",
"edaType": "Common"
}
}
}
}
}
Loading

0 comments on commit 9498354

Please sign in to comment.