1 ANNEX C: Supported APIS
2 =======================
7 Register a new resource provider (e.g. OpenStack) into reservation system.
11 ============================ =========== ==============================================
13 ============================ =========== ==============================================
14 provider-type Enumeration Name of the resource provider
15 endpoint URI Targer URL end point for the resource provider
16 username String User name
17 password String Password
18 region String Specified region for the provider
19 tenant.id String Id of the tenant
20 tenant.name String Name of the tenant
21 ============================ =========== ==============================================
25 ============================ =========== ==============================================
27 ============================ =========== ==============================================
28 provider-id String Id of the new resource provider
29 result Enumeration Result info
30 ============================ =========== ==============================================
32 .. http:post:: /add-provider
39 POST /add-provider HTTP/1.1
40 Accept: application/json
43 "provider-type": "openstack",
44 "endpoint": "http://10.0.2.15:5000/v2.0/tokens",
45 "username": "promise_user",
57 Content-Type: application/json
60 "provider-id": "f25ed9cb-de57-43d5-9b4a-a389a1397302",
67 Make a request to the reservation system to reserve resources.
71 ============================ =============== ==============================================
73 ============================ =============== ==============================================
74 zone String Id to an availability zone
75 start DateTime Timestamp when the consumption of reserved
77 end DateTime Timestamp when the consumption of reserved
79 capacity.cores int16 Amount of cores to be reserved
80 capacity.ram int32 Amount of RAM to be reserved
81 capacity.instances int16 Amount of instances to be reserved
82 capacity.addresses int32 Amount of public IP addresses to be reserved
83 elements ResourceElement List of pre-existing resource elements
85 ============================ =============== ==============================================
89 ============================ =========== ==============================================
91 ============================ =========== ==============================================
92 reservation-id String Id of the reservation
93 result Enumeration Result info
94 message String Output message
95 ============================ =========== ==============================================
97 .. http:post:: /create-reservation
104 POST /create-reservation HTTP/1.1
105 Accept: application/json
114 "start": "2016-02-02T00:00:00Z",
115 "end": "2016-02-03T00:00:00Z"
118 **Example response**:
123 Content-Type: application/json
126 "reservation-id": "269b2944-9efc-41e0-b067-6898221e8619",
128 "message": "reservation request accepted"
134 Update reservation details for an existing reservation.
138 ============================ =============== ==============================================
139 Name Type Description
140 ============================ =============== ==============================================
141 reservation-id String Id of the reservation to be updated
142 zone String Id to an availability zone
143 start DateTime Updated timestamp when the consumption of
144 reserved resources can begin
145 end DateTime Updated timestamp when the consumption of
146 reserved resources should end
147 capacity.cores int16 Updated amount of cores to be reserved
148 capacity.ram int32 Updated amount of RAM to be reserved
149 capacity.instances int16 Updated amount of instances to be reserved
150 capacity.addresses int32 Updated amount of public IP addresses
152 elements ResourceElement Updated list of pre-existing resource elements
154 ============================ =============== ==============================================
158 ============================ =========== ==============================================
159 Name Type Description
160 ============================ =========== ==============================================
161 result Enumeration Result info
162 message String Output message
163 ============================ =========== ==============================================
165 .. http:post:: /update-reservation
172 POST /update-reservation HTTP/1.1
173 Accept: application/json
176 "reservation-id": "269b2944-9efv-41e0-b067-6898221e8619",
185 **Example response**:
190 Content-Type: application/json
194 "message": "reservation update successful"
200 Cancel the reservation.
204 ============================ =============== ==============================================
205 Name Type Description
206 ============================ =============== ==============================================
207 reservation-id String Id of the reservation to be canceled
208 ============================ =============== ==============================================
212 ============================ =========== ==============================================
213 Name Type Description
214 ============================ =========== ==============================================
215 result Enumeration Result info
216 message String Output message
217 ============================ =========== ==============================================
219 .. http:post:: /cancel-reservation
226 POST /cancel-reservation HTTP/1.1
227 Accept: application/json
230 "reservation-id": "269b2944-9efv-41e0-b067-6898221e8619"
233 **Example response**:
238 Content-Type: application/json
242 "message": "reservation canceled"
248 Query the reservation system to return matching reservation(s).
252 ============================ ================== ==============================================
253 Name Type Description
254 ============================ ================== ==============================================
255 zone String Id to an availability zone
256 show-utilization Boolean Show capacity utilization
257 without ResourceCollection Excludes specified collection identifiers
259 elements.some ResourceElement Query for ResourceCollection(s) that contain
260 some or more of these element(s)
261 elements.every ResourceElement Query for ResourceCollection(s) that contain
262 all of these element(s)
263 window.start DateTime Matches entries that are within the specified
266 wndow.scope Enumeration Matches entries that start {and/or} end
267 within the time window
268 ============================ ================== ==============================================
272 ============================ =================== ================================
273 Name Type Description
274 ============================ =================== ================================
275 reservations ResourceReservation List of matching reservations
276 utilization CapacityUtilization Capacity utilization over time
277 ============================ =================== ================================
279 .. http:post:: /query-reservation
286 POST /query-reservation HTTP/1.1
287 Accept: application/json
290 "show-utilization": false,
292 "start": "2016-02-01T00:00:00Z",
293 "end": "2016-02-04T00:00:00Z"
297 **Example response**:
302 Content-Type: application/json
306 "269b2944-9efv-41e0-b067-6898221e8619"
314 Create an instance of specified resource(s) utilizing capacity from the pool.
318 ============================ =============== ==============================================
319 Name Type Description
320 ============================ =============== ==============================================
321 provider-id String Id of the resource provider
322 reservation-id String Id of the resource reservation
323 name String Name of the instance
324 image String Id of the image
325 flavor String Id of the flavor
326 ============================ =============== ==============================================
330 ============================ =========== ==============================================
331 Name Type Description
332 ============================ =========== ==============================================
333 instance-id String Id of the instance
334 result Enumeration Result info
335 message String Output message
336 ============================ =========== ==============================================
338 .. http:post:: /create-instance
345 POST /create-instance HTTP/1.1
346 Accept: application/json
349 "provider-id": "f25ed9cb-de57-43d5-9b4a-a389a1397302",
351 "image": "ddffc6f5-5c86-4126-b0fb-2c71678633f8",
352 "flavor": "91bfdf57-863b-4b73-9d93-fc311894b902"
355 **Example response**:
360 Content-Type: application/json
363 "instance-id": "82572779-896b-493f-92f6-a63008868250",
365 "message": "created-instance request accepted"
371 Destroy an instance of resource utilization and release it back to the pool.
375 ============================ =============== ==============================================
376 Name Type Description
377 ============================ =============== ==============================================
378 instance-id String Id of the instance to be destroyed
379 ============================ =============== ==============================================
383 ============================ =========== ==============================================
384 Name Type Description
385 ============================ =========== ==============================================
386 result Enumeration Result info
387 message String Output message
388 ============================ =========== ==============================================
390 .. http:post:: /destroy-instance
397 POST /destroy-instance HTTP/1.1
398 Accept: application/json
401 "instance-id": "82572779-896b-493f-92f6-a63008868250"
404 **Example response**:
409 Content-Type: application/json
413 "message": "instance destroyed and resource released back to pool"
419 Decrease total capacity for the reservation system for a given time window.
423 ============================ =============== ==============================================
424 Name Type Description
425 ============================ =============== ==============================================
426 source String Id of the resource container
427 start DateTime Start/end defines the time window when total
428 capacity is decreased
430 capacity.cores int16 Decreased amount of cores
431 capacity.ram int32 Decreased amount of RAM
432 capacity.instances int16 Decreased amount of instances
433 capacity.addresses int32 Decreased amount of public IP addresses
434 ============================ =============== ==============================================
438 ============================ =========== ==============================================
439 Name Type Description
440 ============================ =========== ==============================================
441 pool-id String Id of the resource pool
442 result Enumeration Result info
443 message String Output message
444 ============================ =========== ==============================================
446 .. http:post:: /decrease-capacity
453 POST /decrease-capacity HTTP/1.1
454 Accept: application/json
457 "source": "ResourcePool:4085f0da-8030-4252-a0ff-c6f93870eb5f",
465 **Example response**:
470 Content-Type: application/json
473 "pool-id": "c63b2a41-bcc6-42f6-8254-89d633e1bd0b",
475 "message": "capacity decrease successful"
481 Increase total capacity for the reservation system for a given time window.
485 ============================ =============== ==============================================
486 Name Type Description
487 ============================ =============== ==============================================
488 source String Id of the resource container
489 start DateTime Start/end defines the time window when total
490 capacity is increased
492 capacity.cores int16 Increased amount of cores
493 capacity.ram int32 Increased amount of RAM
494 capacity.instances int16 Increased amount of instances
495 capacity.addresses int32 Increased amount of public IP addresses
496 ============================ =============== ==============================================
500 ============================ =========== ==============================================
501 Name Type Description
502 ============================ =========== ==============================================
503 pool-id String Id of the resource pool
504 result Enumeration Result info
505 message String Output message
506 ============================ =========== ==============================================
508 .. http:post:: /increase-capacity
515 POST /increase-capacity HTTP/1.1
516 Accept: application/json
519 "source": "ResourceProvider:f6f13fe3-0126-4c6d-a84f-15f1ab685c4f",
528 **Example response**:
533 Content-Type: application/json
536 "pool-id": "279217a4-7461-4176-bf9d-66770574ca6a",
538 "message": "capacity increase successful"
544 Query for capacity information about a specified resource collection.
548 ============================ ================== ==============================================
549 Name Type Description
550 ============================ ================== ==============================================
551 capacity Enumeration Return total or reserved or available or
552 usage capacity information
553 zone String Id to an availability zone
554 show-utilization Boolean Show capacity utilization
555 without ResourceCollection Excludes specified collection identifiers
557 elements.some ResourceElement Query for ResourceCollection(s) that contain
558 some or more of these element(s)
559 elements.every ResourceElement Query for ResourceCollection(s) that contain
560 all of these element(s)
561 window.start DateTime Matches entries that are within the specified
564 window.scope Enumeration Matches entries that start {and/or} end
565 within the time window
566 ============================ ================== ==============================================
570 ============================ =================== ================================
571 Name Type Description
572 ============================ =================== ================================
573 collections ResourceCollection List of matching collections
574 utilization CapacityUtilization Capacity utilization over time
575 ============================ =================== ================================
577 .. http:post:: /query-capacity
584 POST /query-capacity HTTP/1.1
585 Accept: application/json
588 "show-utilization": false
591 **Example response**:
596 Content-Type: application/json
600 "ResourcePool:279217a4-7461-4176-bf9d-66770574ca6a"