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 networks Uuid List of network uuids
327 ============================ =============== ==============================================
331 ============================ =========== ==============================================
332 Name Type Description
333 ============================ =========== ==============================================
334 instance-id String Id of the instance
335 result Enumeration Result info
336 message String Output message
337 ============================ =========== ==============================================
339 .. http:post:: /create-instance
346 POST /create-instance HTTP/1.1
347 Accept: application/json
350 "provider-id": "f25ed9cb-de57-43d5-9b4a-a389a1397302",
352 "image": "ddffc6f5-5c86-4126-b0fb-2c71678633f8",
353 "flavor": "91bfdf57-863b-4b73-9d93-fc311894b902"
356 **Example response**:
361 Content-Type: application/json
364 "instance-id": "82572779-896b-493f-92f6-a63008868250",
366 "message": "created-instance request accepted"
372 Destroy an instance of resource utilization and release it back to the pool.
376 ============================ =============== ==============================================
377 Name Type Description
378 ============================ =============== ==============================================
379 instance-id String Id of the instance to be destroyed
380 ============================ =============== ==============================================
384 ============================ =========== ==============================================
385 Name Type Description
386 ============================ =========== ==============================================
387 result Enumeration Result info
388 message String Output message
389 ============================ =========== ==============================================
391 .. http:post:: /destroy-instance
398 POST /destroy-instance HTTP/1.1
399 Accept: application/json
402 "instance-id": "82572779-896b-493f-92f6-a63008868250"
405 **Example response**:
410 Content-Type: application/json
414 "message": "instance destroyed and resource released back to pool"
420 Decrease total capacity for the reservation system for a given time window.
424 ============================ =============== ==============================================
425 Name Type Description
426 ============================ =============== ==============================================
427 source String Id of the resource container
428 start DateTime Start/end defines the time window when total
429 capacity is decreased
431 capacity.cores int16 Decreased amount of cores
432 capacity.ram int32 Decreased amount of RAM
433 capacity.instances int16 Decreased amount of instances
434 capacity.addresses int32 Decreased amount of public IP addresses
435 ============================ =============== ==============================================
439 ============================ =========== ==============================================
440 Name Type Description
441 ============================ =========== ==============================================
442 pool-id String Id of the resource pool
443 result Enumeration Result info
444 message String Output message
445 ============================ =========== ==============================================
447 .. http:post:: /decrease-capacity
454 POST /decrease-capacity HTTP/1.1
455 Accept: application/json
458 "source": "ResourcePool:4085f0da-8030-4252-a0ff-c6f93870eb5f",
466 **Example response**:
471 Content-Type: application/json
474 "pool-id": "c63b2a41-bcc6-42f6-8254-89d633e1bd0b",
476 "message": "capacity decrease successful"
482 Increase total capacity for the reservation system for a given time window.
486 ============================ =============== ==============================================
487 Name Type Description
488 ============================ =============== ==============================================
489 source String Id of the resource container
490 start DateTime Start/end defines the time window when total
491 capacity is increased
493 capacity.cores int16 Increased amount of cores
494 capacity.ram int32 Increased amount of RAM
495 capacity.instances int16 Increased amount of instances
496 capacity.addresses int32 Increased amount of public IP addresses
497 ============================ =============== ==============================================
501 ============================ =========== ==============================================
502 Name Type Description
503 ============================ =========== ==============================================
504 pool-id String Id of the resource pool
505 result Enumeration Result info
506 message String Output message
507 ============================ =========== ==============================================
509 .. http:post:: /increase-capacity
516 POST /increase-capacity HTTP/1.1
517 Accept: application/json
520 "source": "ResourceProvider:f6f13fe3-0126-4c6d-a84f-15f1ab685c4f",
529 **Example response**:
534 Content-Type: application/json
537 "pool-id": "279217a4-7461-4176-bf9d-66770574ca6a",
539 "message": "capacity increase successful"
545 Query for capacity information about a specified resource collection.
549 ============================ ================== ==============================================
550 Name Type Description
551 ============================ ================== ==============================================
552 capacity Enumeration Return total or reserved or available or
553 usage capacity information
554 zone String Id to an availability zone
555 show-utilization Boolean Show capacity utilization
556 without ResourceCollection Excludes specified collection identifiers
558 elements.some ResourceElement Query for ResourceCollection(s) that contain
559 some or more of these element(s)
560 elements.every ResourceElement Query for ResourceCollection(s) that contain
561 all of these element(s)
562 window.start DateTime Matches entries that are within the specified
565 window.scope Enumeration Matches entries that start {and/or} end
566 within the time window
567 ============================ ================== ==============================================
571 ============================ =================== ================================
572 Name Type Description
573 ============================ =================== ================================
574 collections ResourceCollection List of matching collections
575 utilization CapacityUtilization Capacity utilization over time
576 ============================ =================== ================================
578 .. http:post:: /query-capacity
585 POST /query-capacity HTTP/1.1
586 Accept: application/json
589 "show-utilization": false
592 **Example response**:
597 Content-Type: application/json
601 "ResourcePool:279217a4-7461-4176-bf9d-66770574ca6a"