1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
4 ANNEX C: Supported APIS
5 =======================
10 Register a new resource provider (e.g. OpenStack) into reservation system.
14 ============================ =========== ==============================================
16 ============================ =========== ==============================================
17 provider-type Enumeration Name of the resource provider
18 endpoint URI Targer URL end point for the resource provider
19 username String User name
20 password String Password
21 region String Specified region for the provider
22 tenant.id String Id of the tenant
23 tenant.name String Name of the tenant
24 ============================ =========== ==============================================
28 ============================ =========== ==============================================
30 ============================ =========== ==============================================
31 provider-id String Id of the new resource provider
32 result Enumeration Result info
33 ============================ =========== ==============================================
35 .. http:post:: /add-provider
42 POST /add-provider HTTP/1.1
43 Accept: application/json
46 "provider-type": "openstack",
47 "endpoint": "http://10.0.2.15:5000/v2.0/tokens",
48 "username": "promise_user",
60 Content-Type: application/json
63 "provider-id": "f25ed9cb-de57-43d5-9b4a-a389a1397302",
70 Make a request to the reservation system to reserve resources.
74 ============================ =============== ==============================================
76 ============================ =============== ==============================================
77 zone String Id to an availability zone
78 start DateTime Timestamp when the consumption of reserved
80 end DateTime Timestamp when the consumption of reserved
82 capacity.cores int16 Amount of cores to be reserved
83 capacity.ram int32 Amount of RAM to be reserved
84 capacity.instances int16 Amount of instances to be reserved
85 capacity.addresses int32 Amount of public IP addresses to be reserved
86 elements ResourceElement List of pre-existing resource elements
88 ============================ =============== ==============================================
92 ============================ =========== ==============================================
94 ============================ =========== ==============================================
95 reservation-id String Id of the reservation
96 result Enumeration Result info
97 message String Output message
98 ============================ =========== ==============================================
100 .. http:post:: /create-reservation
107 POST /create-reservation HTTP/1.1
108 Accept: application/json
117 "start": "2016-02-02T00:00:00Z",
118 "end": "2016-02-03T00:00:00Z"
121 **Example response**:
126 Content-Type: application/json
129 "reservation-id": "269b2944-9efc-41e0-b067-6898221e8619",
131 "message": "reservation request accepted"
137 Update reservation details for an existing reservation.
141 ============================ =============== ==============================================
142 Name Type Description
143 ============================ =============== ==============================================
144 reservation-id String Id of the reservation to be updated
145 zone String Id to an availability zone
146 start DateTime Updated timestamp when the consumption of
147 reserved resources can begin
148 end DateTime Updated timestamp when the consumption of
149 reserved resources should end
150 capacity.cores int16 Updated amount of cores to be reserved
151 capacity.ram int32 Updated amount of RAM to be reserved
152 capacity.instances int16 Updated amount of instances to be reserved
153 capacity.addresses int32 Updated amount of public IP addresses
155 elements ResourceElement Updated list of pre-existing resource elements
157 ============================ =============== ==============================================
161 ============================ =========== ==============================================
162 Name Type Description
163 ============================ =========== ==============================================
164 result Enumeration Result info
165 message String Output message
166 ============================ =========== ==============================================
168 .. http:post:: /update-reservation
175 POST /update-reservation HTTP/1.1
176 Accept: application/json
179 "reservation-id": "269b2944-9efv-41e0-b067-6898221e8619",
188 **Example response**:
193 Content-Type: application/json
197 "message": "reservation update successful"
203 Cancel the reservation.
207 ============================ =============== ==============================================
208 Name Type Description
209 ============================ =============== ==============================================
210 reservation-id String Id of the reservation to be canceled
211 ============================ =============== ==============================================
215 ============================ =========== ==============================================
216 Name Type Description
217 ============================ =========== ==============================================
218 result Enumeration Result info
219 message String Output message
220 ============================ =========== ==============================================
222 .. http:post:: /cancel-reservation
229 POST /cancel-reservation HTTP/1.1
230 Accept: application/json
233 "reservation-id": "269b2944-9efv-41e0-b067-6898221e8619"
236 **Example response**:
241 Content-Type: application/json
245 "message": "reservation canceled"
251 Query the reservation system to return matching reservation(s).
255 ============================ ================== ==============================================
256 Name Type Description
257 ============================ ================== ==============================================
258 zone String Id to an availability zone
259 show-utilization Boolean Show capacity utilization
260 without ResourceCollection Excludes specified collection identifiers
262 elements.some ResourceElement Query for ResourceCollection(s) that contain
263 some or more of these element(s)
264 elements.every ResourceElement Query for ResourceCollection(s) that contain
265 all of these element(s)
266 window.start DateTime Matches entries that are within the specified
269 wndow.scope Enumeration Matches entries that start {and/or} end
270 within the time window
271 ============================ ================== ==============================================
275 ============================ =================== ================================
276 Name Type Description
277 ============================ =================== ================================
278 reservations ResourceReservation List of matching reservations
279 utilization CapacityUtilization Capacity utilization over time
280 ============================ =================== ================================
282 .. http:post:: /query-reservation
289 POST /query-reservation HTTP/1.1
290 Accept: application/json
293 "show-utilization": false,
295 "start": "2016-02-01T00:00:00Z",
296 "end": "2016-02-04T00:00:00Z"
300 **Example response**:
305 Content-Type: application/json
309 "269b2944-9efv-41e0-b067-6898221e8619"
317 Create an instance of specified resource(s) utilizing capacity from the pool.
321 ============================ =============== ==============================================
322 Name Type Description
323 ============================ =============== ==============================================
324 provider-id String Id of the resource provider
325 reservation-id String Id of the resource reservation
326 name String Name of the instance
327 image String Id of the image
328 flavor String Id of the flavor
329 networks Uuid List of network uuids
330 ============================ =============== ==============================================
334 ============================ =========== ==============================================
335 Name Type Description
336 ============================ =========== ==============================================
337 instance-id String Id of the instance
338 result Enumeration Result info
339 message String Output message
340 ============================ =========== ==============================================
342 .. http:post:: /create-instance
349 POST /create-instance HTTP/1.1
350 Accept: application/json
353 "provider-id": "f25ed9cb-de57-43d5-9b4a-a389a1397302",
355 "image": "ddffc6f5-5c86-4126-b0fb-2c71678633f8",
356 "flavor": "91bfdf57-863b-4b73-9d93-fc311894b902"
359 **Example response**:
364 Content-Type: application/json
367 "instance-id": "82572779-896b-493f-92f6-a63008868250",
369 "message": "created-instance request accepted"
375 Destroy an instance of resource utilization and release it back to the pool.
379 ============================ =============== ==============================================
380 Name Type Description
381 ============================ =============== ==============================================
382 instance-id String Id of the instance to be destroyed
383 ============================ =============== ==============================================
387 ============================ =========== ==============================================
388 Name Type Description
389 ============================ =========== ==============================================
390 result Enumeration Result info
391 message String Output message
392 ============================ =========== ==============================================
394 .. http:post:: /destroy-instance
401 POST /destroy-instance HTTP/1.1
402 Accept: application/json
405 "instance-id": "82572779-896b-493f-92f6-a63008868250"
408 **Example response**:
413 Content-Type: application/json
417 "message": "instance destroyed and resource released back to pool"
423 Decrease total capacity for the reservation system for a given time window.
427 ============================ =============== ==============================================
428 Name Type Description
429 ============================ =============== ==============================================
430 source String Id of the resource container
431 start DateTime Start/end defines the time window when total
432 capacity is decreased
434 capacity.cores int16 Decreased amount of cores
435 capacity.ram int32 Decreased amount of RAM
436 capacity.instances int16 Decreased amount of instances
437 capacity.addresses int32 Decreased amount of public IP addresses
438 ============================ =============== ==============================================
442 ============================ =========== ==============================================
443 Name Type Description
444 ============================ =========== ==============================================
445 pool-id String Id of the resource pool
446 result Enumeration Result info
447 message String Output message
448 ============================ =========== ==============================================
450 .. http:post:: /decrease-capacity
457 POST /decrease-capacity HTTP/1.1
458 Accept: application/json
461 "source": "ResourcePool:4085f0da-8030-4252-a0ff-c6f93870eb5f",
469 **Example response**:
474 Content-Type: application/json
477 "pool-id": "c63b2a41-bcc6-42f6-8254-89d633e1bd0b",
479 "message": "capacity decrease successful"
485 Increase total capacity for the reservation system for a given time window.
489 ============================ =============== ==============================================
490 Name Type Description
491 ============================ =============== ==============================================
492 source String Id of the resource container
493 start DateTime Start/end defines the time window when total
494 capacity is increased
496 capacity.cores int16 Increased amount of cores
497 capacity.ram int32 Increased amount of RAM
498 capacity.instances int16 Increased amount of instances
499 capacity.addresses int32 Increased amount of public IP addresses
500 ============================ =============== ==============================================
504 ============================ =========== ==============================================
505 Name Type Description
506 ============================ =========== ==============================================
507 pool-id String Id of the resource pool
508 result Enumeration Result info
509 message String Output message
510 ============================ =========== ==============================================
512 .. http:post:: /increase-capacity
519 POST /increase-capacity HTTP/1.1
520 Accept: application/json
523 "source": "ResourceProvider:f6f13fe3-0126-4c6d-a84f-15f1ab685c4f",
532 **Example response**:
537 Content-Type: application/json
540 "pool-id": "279217a4-7461-4176-bf9d-66770574ca6a",
542 "message": "capacity increase successful"
548 Query for capacity information about a specified resource collection.
552 ============================ ================== ==============================================
553 Name Type Description
554 ============================ ================== ==============================================
555 capacity Enumeration Return total or reserved or available or
556 usage capacity information
557 zone String Id to an availability zone
558 show-utilization Boolean Show capacity utilization
559 without ResourceCollection Excludes specified collection identifiers
561 elements.some ResourceElement Query for ResourceCollection(s) that contain
562 some or more of these element(s)
563 elements.every ResourceElement Query for ResourceCollection(s) that contain
564 all of these element(s)
565 window.start DateTime Matches entries that are within the specified
568 window.scope Enumeration Matches entries that start {and/or} end
569 within the time window
570 ============================ ================== ==============================================
574 ============================ =================== ================================
575 Name Type Description
576 ============================ =================== ================================
577 collections ResourceCollection List of matching collections
578 utilization CapacityUtilization Capacity utilization over time
579 ============================ =================== ================================
581 .. http:post:: /query-capacity
588 POST /query-capacity HTTP/1.1
589 Accept: application/json
592 "show-utilization": false
595 **Example response**:
600 Content-Type: application/json
604 "ResourcePool:279217a4-7461-4176-bf9d-66770574ca6a"