cli: Small fixes in lib/osv_api

* Removed global declarations from create_socket() and osv_schema().
* Removed BODY from HTTP request.
* Fix renderer to support recent changes to API definitions.

Signed-off-by: Or Cohen <orc@fewbytes.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
cli: Various fixes and improvements to osv command

Fix output to use io.stdout instead of print(), handle APIs with named
path parameters better, add help for specfic API with parameters.

Closes #422.

Signed-off-by: Or Cohen <orc@fewbytes.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
cli: Rename osv command to api

Signed-off-by: Or Cohen <orc@fewbytes.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
cli: Fix test for ls

Previous patch had squelched whitespaces.

Signed-off-by: Or Cohen <orc@fewbytes.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
scripts, modules: massive cleaning of unused import

Signed-off-by: William Dauchy <william@gandi.net>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
modules: BaseException is not meant to be directly inherited

see https://docs.python.org/2/library/exceptions.html#exceptions.BaseException

Cc: Tomasz Grabiec <tgrabiec@cloudius-systems.com>
Signed-off-by: William Dauchy <william@gandi.net>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>