httpserver: register /env API

Signed-off-by: Tomasz Grabiec <tgrabiec@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
httpserver: tests: do not ignore request failures

Currently curl() would return '' in case of HTTP or network errors.

Becasuse of this the test 'test_env' was passing even though the
server returned 404 for GET /env/test-param?val=TEST request.

Other test cases could have also incorrectly pass because of this.

Signed-off-by: Tomasz Grabiec <tgrabiec@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
mgmt: update to latest

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
arch: factor out parse_cmdline

Aside from the code that locates the string - in x64, the code that actually
parses the command line is always the same for both our architectures. Factor
it out.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
CC: Claudio Fontana <claudio.fontana@huawei.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
inspect the current command line

This patch adds a function that allow us to determine which is the current
command line in use. If parse_cmdline is called more than once, it has the duty
of updating that string.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
commands: add method to save a command line to disk

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
create an exception for code 500

The same way we handle 400 through a custom exception, handling error code 500
this way saves a lot of typing.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
os: add an api to modify the command line

When we add support for runtime instalation and provisioning, we would like to
have some way to edit the command line currently being executed. I'm exposing
this through the REST api.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>