Talk: RO Northbound Interface: Difference between revisions
No edit summary |
No edit summary |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
== Is RO supporting json or yaml or both ? == | |||
Several entries on this page are not correct according to what we find in the code. | Several entries on this page are not correct according to what we find in the code. | ||
Line 39: | Line 41: | ||
Should a table explicit the compatibility of this page with each tag ? | Should a table explicit the compatibility of this page with each tag ? | ||
=== REPLY: === | |||
Documentation is for an old version. Latest versions (both master and v1.1) contains some new features. However new versions are backward compatible with the old version so that this documentation match current versions. |
Latest revision as of 13:41, 31 January 2017
Is RO supporting json or yaml or both ?
Several entries on this page are not correct according to what we find in the code.
For example :
On the wiki
POST /openmano/{tenant_id}/instances/{instance_id}/action take an action over a scenario instance. Actions can be {start,pause,resume,shutoff,shutdown,forceOff,rebuild,reboot,console} Params: Content-type: application/yaml
In the code we cand read httpserver.py
@bottle.route(url_base + '/<tenant_id>/instances/<instance_id>/action', method='POST') def http_post_instance_scenario_action(tenant_id, instance_id): [...] #parse input data http_content,_ = format_in( instance_scenario_action_schema )
And then openmano_schemas.py
instance_scenario_action_schema = { "title":"instance scenario action information schema", "$schema": "http://json-schema.org/draft-04/schema#",
The documentation states that yaml is expected but the code seem to expect a json.
Same problem for openmano/{tenant_id}/instances
REPLY:
Code admits both yaml and json based on HTTP header "Content-type:" application/yaml or application/json
"json-schema" is a python library to validate input and, in spite of its name, has no connection at all with json or yaml.
As a side note, for further comments in "talk" sections, please use the "Add topic" option (between "Edit" and "View history"), so that more than one topic can be included.
Version of the RO ?
There is several versions of the RO :https://osm.etsi.org/gitweb/?p=osm/RO.git;a=tags
Should a table explicit the compatibility of this page with each tag ?
REPLY:
Documentation is for an old version. Latest versions (both master and v1.1) contains some new features. However new versions are backward compatible with the old version so that this documentation match current versions.