Resources¶
Author: | Carlo Impagliazzo |
---|---|
Organization: | CRS4 |
Version: | 0.4.6 |
Date: | 23/01/2015 |
License: | GPL2 License |
General notes¶
This is the REST API for orchestrator project, briefly called only the orchestrator for the latter use. The orchestrator deals with several cloud providers using a LibCloud layer, it is able to respond in RESTful with Flask. The orchestrator is intended to be used in conjunction with Cistern project, the brain, where all decisions are taken and where recipes are cooked.
This project is funded by:
PIA - Pacchetti Integrati di Agevolazioni “Industria, Artigianato e Servizi” ( Annualita’ 2010) Programmazione Unitaria 2007/2013 P.O. FESR 2007/2013 Regione Autonoma Sardegna
URL template¶
The URLs all follow pattern:
/api/<version>/<resource>/<optional cloud_name>
Optional arguments are passed using a data json stream in the request.
Authentication¶
Authentication by token is implemented but actually not used
- More information about how to use it here:
Data formatting¶
Only JSON is supported. The is reflected by an HTTP header of Content-Type: application/json. As per rfc4627, JSON is always encoded Unicode with a default encoding of UTF-8. So it is fine to include non-ASCII in the messages.
For maximum compatibility, normalize to http://unicode.org/reports/tr15 (Unicode Normalization Form C) (NFC) before UTF-8 encoding.
Error handling¶
Errors are indicated using standard HTTP error codes. Additional information is usually included in the returned JSON. Specific meanings for the error codes are given below.
Tools used¶
This documentation use 2 tools to test and report codes:
- http ( httpie, from pip repository )
- curl
Testing¶
There is a test coverage to verify a proper behaviour of the middleware
To run tests:
cd tests python test_rest.py python test_cloud.py