Talk:RO Northbound Interface

From OSM Public Wiki
Revision as of 09:11, 31 January 2017 by Berpec (talk | contribs) (→‎Version of the RO ?: new section)
Jump to: navigation, search

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.

On the other hand, the references to github above are outdated. RO code is available at OSM's RO repo at: https://osm.etsi.org/gerrit/#/admin/projects/osm/RO

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 ?