{
"zoneId": "12345",
- "resourceDescriptor": [
- {
- "computeResourceTypeId": "vcInstances"
- }
- ],
- "threshold": [
- {
+ "computeResourceTypeId": "vcInstances",
+ "threshold": {
+ "thresholdType" : "absoluteValue",
+ "threshold": {
"capacity_info": "available",
"condition": "lt",
"value": 5
- }
- ]
- }
+ }
+ }
+ }
**Example response**:
"capacityChangeSubscriptionId": "abcdef-ghijkl-123456789"
}
- :statuscode 400: resourceDescriptor is missing
+ :statuscode 400: computeResourceTypeId is missing
-Query Compute Capacity
-""""""""""""""""""""""
+Query Compute Capacity for a defined resource type
+""""""""""""""""""""""""""""""""""""""""""""""""""
Request to find out about available, reserved, total and allocated compute
capacity.
{
"zoneId": "12345",
- "resourceDescriptor": {
- "computeResourceTypeId": "vcInstances"
- },
+ "computeResourceTypeId": "vcInstances",
"timePeriod": {
"startTime": "2015-09-21T00:00:00Z",
"stopTime": "2015-09-21T00:05:30Z"
:query limit: Default is 10.
:statuscode 404: resource zone unknown
+
+Query Compute Capacity with required attributes
+"""""""""""""""""""""""""""""""""""""""""""""""
+Request to find out available compute capacity with given characteristics
+
+.. http:get:: /capacity/compute/query
+ :noindex:
+
+ **Example request**:
+
+ .. sourcecode:: http
+
+ GET /capacity/compute/query HTTP/1.1
+ Accept: application/json
+
+ {
+ "zoneId": "12345",
+ "resourceCriteria": {
+ "virtualCPU": {
+ "cpuArchitecture": "x86",
+ "numVirtualCpu": 8
+ }
+ },
+ "attributeSelector": "available",
+ "timePeriod": {
+ "startTime": "2015-09-21T00:00:00Z",
+ "stopTime": "2015-09-21T00:05:30Z"
+ }
+ }
+
+ **Example response**:
+
+ .. sourcecode:: http
+
+ HTTP/1.1 200 OK
+ Content-Type: application/json
+
+ {
+ "zoneId": "12345",
+ "lastUpdate": "2015-09-21T00:03:20Z",
+ "capacityInformation": {
+ "available": 50
+ }
+ }
+
+ :query limit: Default is 10.
+ :statuscode 404: resource zone unknown
+
Notify Compute Capacity Change Event
""""""""""""""""""""""""""""""""""""
}
}
-and/or virtualized containers
+or virtualization containers
.. http:post:: reservation/compute/create
:noindex:
"numaEnabled": "False",
"virtualMemSize": 16
},
- "virtualStorage": {
+ "storageAttributes": {
"typeOfStorage": "volume",
"sizeOfStorage": 16
}
"virtualizationContainerReserved": [
{
"containerId": "myContainer",
- "containerFlavor": {
- "flavorId": "myFlavor",
- "virtualCpu": {
- "numVirtualCpu": 2,
- "cpuArchitecture": "x86"
- },
- "virtualMemory": {
- "numaEnabled": "False",
- "virtualMemSize": 16
- },
- "virtualStorage": {
- "typeOfStorage": "volume",
- "sizeOfStorage": 16
- }
+ "flavorId": "myFlavor",
+ "virtualCpu": {
+ "numVirtualCpu": 2,
+ "cpuArchitecture": "x86"
+ },
+ "virtualMemory": {
+ "numaEnabled": "False",
+ "virtualMemSize": 16
+ },
+ "virtualDisks": {
+ "storageId": "myStorage",
+ "flavourId": "myStorageFlavour",
+ "typeOfStorage": "volume",
+ "sizeOfStorage": 16,
+ "operationalState": "enabled"
}
}
]
Content-Type: application/json
{
- "reservationData":
+ "queryResult":
{
"startTime": "2015-09-21T01:00:00Z",
"reservationStatus": "active",
.. http:delete:: /reservation/compute/(reservation_id)
:noindex:
+ **Example response**:
+
+ .. sourcecode:: http
+
+ HTTP/1.1 200
+ Content-Type: application/json
+
+ {
+ "reservationId": "xxxx-yyyy-zzzz",
+ }
+
+
+Subscribe Resource Reservation Change Event
+"""""""""""""""""""""""""""""""""""""""""""
+
+Subscription from Consumer to VIM to be notified about changes
+related to a reservation or to the resources associated to it.
+
+.. http:post:: /reservation/subscribe
+ :noindex:
+
+ **Example request**:
+
+ .. sourcecode:: http
+
+ POST /reservation/subscribe HTTP/1.1
+ Accept: application/json
+
+ {
+ "inputFilter": [
+ {
+ "reservationId": "xxxx-yyyy-zzzz",
+ }
+ ]
+ }
+
+ **Example response**:
+
+ .. sourcecode:: http
+
+ HTTP/1.1 201 CREATED
+ Content-Type: application/json
+
+ {
+ "created": "2015-09-21T00:00:00Z",
+ "reservationChangeSubscriptionId": "abcdef-ghijkl-123456789"
+ }
+
+ :statuscode 400: inputFilter is missing
+
+
+Notify Resource Reservation Change Event
+""""""""""""""""""""""""""""""""""""""""
+
+Notification about changes in a compute resource reservation
+
+.. http:post:: /capacity/compute/notification
+ :noindex:
+
+ **Example notification**:
+
+ .. sourcecode:: http
+
+ Content-Type: application/json
+
+ {
+ "changeId": "aaaaaa-btgxxx-987654321",
+ "reservationId": "xxxx-yyyy-zzzz",
+ "vimId": "vim-CX-03"
+ "changeType": "Reservation time change"
+ "changedReservationData": {
+ "endTime": "2015-10-14TT16:00:00Z",
+ }
+ }
+
+
+
Virtualised Network Resources
-----------------------------
Accept: application/json
{
- "resourceDescriptor": [
- {
- "networkResourceTypeId": "publicIps"
- }
- ],
- "threshold": [
- {
- "capacity_info": "available",
- "condition": "lt",
- "value": 5
- }
- ]
+ "networkResourceTypeId": "publicIps",
+ "threshold": {
+ "thresholdType": "absoluteValue",
+ "threshold": {
+ "capacity_info": "available",
+ "condition": "lt",
+ "value": 5
+ }
+ }
}
**Example response**:
Accept: application/json
{
- "resourceDescriptor": {
- "networkResourceTypeId": "publicIps"
- },
+ "networkResourceTypeId": "publicIps",
"timePeriod": {
"startTime": "2015-09-28T00:00:00Z",
"stopTime": "2015-09-28T00:05:30Z"
"startTime": "2015-09-28T01:00:00Z",
"reservationStatus": "initialized",
"reservationId": "wwww-xxxx-yyyy",
- "networkReserved": {
- "publicIps": [
- "10.2.91.60",
- "10.2.91.61"
- ]
- }
+ "publicIps": [
+ "10.2.91.60",
+ "10.2.91.61"
+ ]
}
}
Content-Type: application/json
{
- "reservationData": {
+ "queryResult": {
"startTime": "2015-09-28T01:00:00Z",
"reservationStatus": "active",
"reservationId": "wwww-xxxx-yyyy",
- "networkReserved": "publicIps": [
+ "publicIps": [
"10.2.91.60",
"10.2.91.61"
]
"startTime": "2015-09-21T16:00:00Z",
"reservationStatus": "active",
"reservationId": "wwww-xxxx-yyyy",
- "networkReserved": {
- "publicIps": [
- "10.2.91.60",
- "10.2.91.61"
- ]
- }
+ "publicIps": [
+ "10.2.91.60",
+ "10.2.91.61"
+ ]
}
}
Request to terminate a network resource reservation
.. http:delete:: /reservation/network/(reservation_id)
- :noindex:
+ :noindex:
+ **Example response**:
-Virtualised Storage Resources
+ .. sourcecode:: http
+
+ HTTP/1.1 200
+ Content-Type: application/json
+ {
+ "reservationId": "xxxx-yyyy-zzzz",
+ }
+
+Virtualised Storage Resources
-----------------------------
Storage Capacity Management
Accept: application/json
{
- "resourceDescriptor": [
- {
- "storageResourceTypeId": "volumes"
+ "storageResourceTypeId": "volumes",
+ "threshold": {
+ "thresholdType": "absoluteValue",
+ "threshold": {
+ "capacity_info": "available",
+ "condition": "lt",
+ "value": 3
}
- ],
- "threshold": [
- {
- "capacity_info": "available",
- "condition": "lt",
- "value": 3
- }
- ]
+ }
}
**Example response**:
"capacityChangeSubscriptionId": "cdefgh-ijklmn-345678901"
}
-Query Storage Capacity
-""""""""""""""""""""""
+Query Storage Capacity for a defined resource type
+""""""""""""""""""""""""""""""""""""""""""""""""""
Request to find out about available, reserved, total and allocated storage
capacity.
Accept: application/json
{
- "resourceDescriptor": {
- "storageResourceTypeId": "volumes"
- },
+ "storageResourceTypeId": "volumes",
"timePeriod": {
"startTime": "2015-09-28T12:00:00Z",
"stopTime": "2015-09-28T12:04:45Z"
}
}
+Query Storage Capacity with required attributes
+"""""""""""""""""""""""""""""""""""""""""""""""
+
+Request to find out available capacity.
+
+.. http:get:: /capacity/storage/query
+ :noindex:
+
+ **Example request**:
+
+ .. sourcecode:: http
+
+ GET /capacity/storage/query HTTP/1.1
+ Accept: application/json
+
+ {
+ "resourceCriteria": {
+ "typeOfStorage" : "volume",
+ "sizeOfStorage" : 200,
+ "rdmaSupported" : "True",
+ },
+ "attributeSelector": "available",
+ "timePeriod": {
+ "startTime": "2015-09-28T12:00:00Z",
+ "stopTime": "2015-09-28T12:04:45Z"
+ }
+ }
+
+ **Example response**:
+
+ .. sourcecode:: http
+
+ HTTP/1.1 200 OK
+ Content-Type: application/json
+
+ {
+ "lastUpdate": "2015-09-28T12:01:35Z",
+ "capacityInformation": {
+ "available": 2
+ }
+ }
+
Notify Storage Capacity Change Event
""""""""""""""""""""""""""""""""""""
Content-Type: application/json
{
- "reservationData": {
+ "queryResult": {
"startTime": "2015-09-28T13:00:00Z",
"reservationStatus": "active",
"reservationId": "vvvv-wwww-xxxx",
Request to terminate a storage resource reservation
.. http:delete:: /reservation/storage/(reservation_id)
- :noindex:
+ :noindex:
+
+ **Example response**:
+
+ .. sourcecode:: http
+
+ HTTP/1.1 200
+ Content-Type: application/json
+
+ {
+ "reservationId": "xxxx-yyyy-zzzz",
+ }