Note
This is Work in Progress.
A compute flavor includes information about number of virtual CPUs, size of virtual memory, size of virtual storage, and virtual network interfaces [NFVIFA005].
Subscription from Consumer to VIM to be notified about compute capacity changes
POST
/capacity/compute/subscribe
Example request:
POST /capacity/compute/subscribe HTTP/1.1
Accept: application/json
{
"zoneId": "12345",
"computeResourceTypeId": "vcInstances",
"threshold": {
"thresholdType" : "absoluteValue",
"threshold": {
"capacity_info": "available",
"condition": "lt",
"value": 5
}
}
}
Example response:
HTTP/1.1 201 CREATED
Content-Type: application/json
{
"created": "2015-09-21T00:00:00Z",
"capacityChangeSubscriptionId": "abcdef-ghijkl-123456789"
}
Status Codes: |
|
---|
Request to find out about available, reserved, total and allocated compute capacity.
GET
/capacity/compute/query
Example request:
GET /capacity/compute/query HTTP/1.1
Accept: application/json
{
"zoneId": "12345",
"computeResourceTypeId": "vcInstances",
"timePeriod": {
"startTime": "2015-09-21T00:00:00Z",
"stopTime": "2015-09-21T00:05:30Z"
}
}
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
{
"zoneId": "12345",
"lastUpdate": "2015-09-21T00:03:20Z",
"capacityInformation": {
"available": 4,
"reserved": 17,
"total": 50,
"allocated": 29
}
}
Query Parameters: | |
---|---|
|
|
Status Codes: |
|
Request to find out available compute capacity with given characteristics
GET
/capacity/compute/query
Example request:
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:
HTTP/1.1 200 OK
Content-Type: application/json
{
"zoneId": "12345",
"lastUpdate": "2015-09-21T00:03:20Z",
"capacityInformation": {
"available": 50
}
}
Query Parameters: | |
---|---|
|
|
Status Codes: |
|
Notification about compute capacity changes
POST
/capacity/compute/notification
Example notification:
Content-Type: application/json
{
"zoneId": "12345",
"notificationId": "zyxwvu-tsrqpo-987654321",
"capacityChangeTime": "2015-09-21T00:03:20Z",
"resourceDescriptor": {
"computeResourceTypeId": "vcInstances"
},
"capacityInformation": {
"available": 4,
"reserved": 17,
"total": 50,
"allocated": 29
}
}
Request the reservation of compute resource capacity
POST
/reservation/compute/create
Example request:
POST /reservation/compute/create HTTP/1.1
Accept: application/json
{
"startTime": "2015-09-21T01:00:00Z",
"computePoolReservation": {
"numCpuCores": 20,
"numVcInstances": 5,
"virtualMemSize": 10
}
}
Example response:
HTTP/1.1 201 CREATED
Content-Type: application/json
{
"reservationData": {
"startTime": "2015-09-21T01:00:00Z",
"reservationStatus": "initialized",
"reservationId": "xxxx-yyyy-zzzz",
"computePoolReserved": {
"numCpuCores": 20,
"numVcInstances": 5,
"virtualMemSize": 10,
"zoneId": "23456"
}
}
}
or virtualization containers
POST
reservation/compute/create
Example request:
POST /reservation/compute/create HTTP/1.1
Accept: application/json
{
"startTime": "2015-10-05T15:00:00Z",
"virtualizationContainerReservation": [
{
"containerId": "myContainer",
"containerFlavor": {
"flavorId": "myFlavor",
"virtualCpu": {
"numVirtualCpu": 2,
"cpuArchitecture": "x86"
},
"virtualMemory": {
"numaEnabled": "False",
"virtualMemSize": 16
},
"storageAttributes": {
"typeOfStorage": "volume",
"sizeOfStorage": 16
}
}
}
]
}
Example response:
HTTP/1.1 201 CREATED
Content-Type: application/json
{
"reservationData": {
"startTime": "2015-10-05T15:00:00Z",
"reservationId": "aaaa-bbbb-cccc",
"reservationStatus": "initialized",
"virtualizationContainerReserved": [
{
"containerId": "myContainer",
"flavorId": "myFlavor",
"virtualCpu": {
"numVirtualCpu": 2,
"cpuArchitecture": "x86"
},
"virtualMemory": {
"numaEnabled": "False",
"virtualMemSize": 16
},
"virtualDisks": {
"storageId": "myStorage",
"flavourId": "myStorageFlavour",
"typeOfStorage": "volume",
"sizeOfStorage": 16,
"operationalState": "enabled"
}
}
]
}
}
Request to find out about reserved compute resources that the consumer has access to.
GET
/reservation/compute/query
Example request:
GET /reservation/compute/query HTTP/1.1
Accept: application/json
{
"queryReservationFilter": [
{
"reservationId": "xxxx-yyyy-zzzz"
}
]
}
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
{
"queryResult":
{
"startTime": "2015-09-21T01:00:00Z",
"reservationStatus": "active",
"reservationId": "xxxx-yyyy-zzzz",
"computePoolReserved":
{
"numCpuCores": 20,
"numVcInstances": 5,
"virtualMemSize": 10,
"zoneId": "23456"
}
}
}
Status Codes: |
|
---|
Request to update compute resource reservation
POST
/reservation/compute/update
Example request:
POST /reservation/compute/update HTTP/1.1
Accept: application/json
{
"startTime": "2015-09-14T16:00:00Z",
"reservationId": "xxxx-yyyy-zzzz"
}
Example response:
HTTP/1.1 201 CREATED
Content-Type: application/json
{
"reservationData": {
"startTime": "2015-09-14TT16:00:00Z",
"reservationStatus": "active",
"reservationId": "xxxx-yyyy-zzzz",
"computePoolReserved": {
"numCpuCores": 20,
"numVcInstances": 5,
"virtualMemSize": 10,
"zoneId": "23456"
}
}
}
Request to terminate a compute resource reservation
DELETE
/reservation/compute/
(reservation_id)Example response:
HTTP/1.1 200
Content-Type: application/json
{
"reservationId": "xxxx-yyyy-zzzz",
}
Subscription from Consumer to VIM to be notified about changes related to a reservation or to the resources associated to it.
POST
/reservation/subscribe
Example request:
POST /reservation/subscribe HTTP/1.1
Accept: application/json
{
"inputFilter": [
{
"reservationId": "xxxx-yyyy-zzzz",
}
]
}
Example response:
HTTP/1.1 201 CREATED
Content-Type: application/json
{
"created": "2015-09-21T00:00:00Z",
"reservationChangeSubscriptionId": "abcdef-ghijkl-123456789"
}
Status Codes: |
|
---|
Notification about changes in a compute resource reservation
POST
/capacity/compute/notification
Example notification:
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",
}
}
Susbcription from Consumer to VIM to be notified about network capacity changes
POST
/capacity/network/subscribe
Example request:
POST /capacity/network/subscribe HTTP/1.1
Accept: application/json
{
"networkResourceTypeId": "publicIps",
"threshold": {
"thresholdType": "absoluteValue",
"threshold": {
"capacity_info": "available",
"condition": "lt",
"value": 5
}
}
}
Example response:
HTTP/1.1 201 CREATED
Content-Type: application/json
{
"created": "2015-09-28T00:00:00Z",
"capacityChangeSubscriptionId": "bcdefg-hijklm-234567890"
}
Request to find out about available, reserved, total and allocated network capacity.
GET
/capacity/network/query
Example request:
GET /capacity/network/query HTTP/1.1
Accept: application/json
{
"networkResourceTypeId": "publicIps",
"timePeriod": {
"startTime": "2015-09-28T00:00:00Z",
"stopTime": "2015-09-28T00:05:30Z"
}
}
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
{
"lastUpdate": "2015-09-28T00:02:10Z",
"capacityInformation": {
"available": 4,
"reserved": 10,
"total": 64,
"allocated": 50
}
}
Notification about network capacity changes
POST
/capacity/network/notification
Example notification:
Content-Type: application/json
{
"notificationId": "yxwvut-srqpon-876543210",
"capacityChangeTime": "2015-09-28T00:02:10Z",
"resourceDescriptor": {
"networkResourceTypeId": "publicIps"
},
"capacityInformation": {
"available": 4,
"reserved": 10,
"total": 64,
"allocated": 50
}
}
Request the reservation of network resource capacity and/or virtual networks, network ports
POST
/reservation/network/create
Example request:
POST /reservation/network/create HTTP/1.1
Accept: application/json
{
"startTime": "2015-09-28T01:00:00Z",
"networkReservation": {
"numPublicIps": 2
}
}
Example response:
HTTP/1.1 201 CREATED
Content-Type: application/json
{
"reservationData": {
"startTime": "2015-09-28T01:00:00Z",
"reservationStatus": "initialized",
"reservationId": "wwww-xxxx-yyyy",
"publicIps": [
"10.2.91.60",
"10.2.91.61"
]
}
}
Request to find out about reserved network resources that the consumer has access to.
GET
/reservation/network/query
Example request:
GET /reservation/network/query HTTP/1.1
Accept: application/json
{
"queryReservationFilter": [
{
"reservationId": "wwww-xxxx-yyyy"
}
]
}
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
{
"queryResult": {
"startTime": "2015-09-28T01:00:00Z",
"reservationStatus": "active",
"reservationId": "wwww-xxxx-yyyy",
"publicIps": [
"10.2.91.60",
"10.2.91.61"
]
}
}
Request to update network resource reservation
POST
/reservation/network/update
Example request:
POST /reservation/network/update HTTP/1.1
Accept: application/json
{
"startTime": "2015-09-21T16:00:00Z",
"reservationId": "wwww-xxxx-yyyy"
}
Example response:
HTTP/1.1 201 CREATED
Content-Type: application/json
{
"reservationData": {
"startTime": "2015-09-21T16:00:00Z",
"reservationStatus": "active",
"reservationId": "wwww-xxxx-yyyy",
"publicIps": [
"10.2.91.60",
"10.2.91.61"
]
}
}
Request to terminate a network resource reservation
DELETE
/reservation/network/
(reservation_id)Example response:
HTTP/1.1 200
Content-Type: application/json
{
"reservationId": "xxxx-yyyy-zzzz",
}
Subscription from Consumer to VIM to be notified about storage capacity changes
POST
/capacity/storage/subscribe
Example request:
POST /capacity/storage/subscribe HTTP/1.1
Accept: application/json
{
"storageResourceTypeId": "volumes",
"threshold": {
"thresholdType": "absoluteValue",
"threshold": {
"capacity_info": "available",
"condition": "lt",
"value": 3
}
}
}
Example response:
HTTP/1.1 201 CREATED
Content-Type: application/json
{
"created": "2015-09-28T12:00:00Z",
"capacityChangeSubscriptionId": "cdefgh-ijklmn-345678901"
}
Request to find out about available, reserved, total and allocated storage capacity.
GET
/capacity/storage/query
Example request:
GET /capacity/storage/query HTTP/1.1
Accept: application/json
{
"storageResourceTypeId": "volumes",
"timePeriod": {
"startTime": "2015-09-28T12:00:00Z",
"stopTime": "2015-09-28T12:04:45Z"
}
}
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
{
"lastUpdate": "2015-09-28T12:01:35Z",
"capacityInformation": {
"available": 2,
"reserved": 4,
"total": 10,
"allocated": 4
}
}
Request to find out available capacity.
GET
/capacity/storage/query
Example request:
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:
HTTP/1.1 200 OK
Content-Type: application/json
{
"lastUpdate": "2015-09-28T12:01:35Z",
"capacityInformation": {
"available": 2
}
}
Notification about storage capacity changes
POST
/capacity/storage/notification
Example notification:
Content-Type: application/json
{
"notificationId": "xwvuts-rqponm-765432109",
"capacityChangeTime": "2015-09-28T12:01:35Z",
"resourceDescriptor": {
"storageResourceTypeId": "volumes"
},
"capacityInformation": {
"available": 2,
"reserved": 4,
"total": 10,
"allocated": 4
}
}
Request the reservation of storage resource capacity
POST
/reservation/storage/create
Example request:
POST /reservation/storage/create HTTP/1.1
Accept: application/json
{
"startTime": "2015-09-28T13:00:00Z",
"storagePoolReservation": {
"storageSize": 10,
"numSnapshots": 3,
"numVolumes": 2
}
}
Example response:
HTTP/1.1 201 CREATED
Content-Type: application/json
{
"reservationData": {
"startTime": "2015-09-28T13:00:00Z",
"reservationStatus": "initialized",
"reservationId": "vvvv-wwww-xxxx",
"storagePoolReserved": {
"storageSize": 10,
"numSnapshots": 3,
"numVolumes": 2
}
}
}
Request to find out about reserved storage resources that the consumer has access to.
GET
/reservation/storage/query
Example request:
GET /reservation/storage/query HTTP/1.1
Accept: application/json
{
"queryReservationFilter": [
{
"reservationId": "vvvv-wwww-xxxx"
}
]
}
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
{
"queryResult": {
"startTime": "2015-09-28T13:00:00Z",
"reservationStatus": "active",
"reservationId": "vvvv-wwww-xxxx",
"storagePoolReserved": {
"storageSize": 10,
"numSnapshots": 3,
"numVolumes": 2
}
}
}
Request to update storage resource reservation
POST
/reservation/storage/update
Example request:
POST /reservation/storage/update HTTP/1.1
Accept: application/json
{
"startTime": "2015-09-20T23:00:00Z",
"reservationId": "vvvv-wwww-xxxx"
}
Example response:
HTTP/1.1 201 CREATED
Content-Type: application/json
{
"reservationData": {
"startTime": "2015-09-20T23:00:00Z",
"reservationStatus": "active",
"reservationId": "vvvv-wwww-xxxx",
"storagePoolReserved": {
"storageSize": 10,
"numSnapshots": 3,
"numVolumes": 2
}
}
}
Request to terminate a storage resource reservation
DELETE
/reservation/storage/
(reservation_id)Example response:
HTTP/1.1 200
Content-Type: application/json
{
"reservationId": "xxxx-yyyy-zzzz",
}