Shell: Upgrade to crash-1.3.0-beta15

This version comes with the option to specify multiple auth plugins. As
a result, I've selected a one-size-fits-all kind of value.

I also moved our crash.properties file to its own folder and updated the config
path in the main CRaSH command. Before that, CRaSH was picking up the config
file that is bundled in CRaSH jars.

Signed-off-by: Or Cohen <orc@fewbytes.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Shell: Fix GCE auth plugin

Nadav Har'El explains:

  According to https://developers.google.com/compute/docs/building-image you are
  expected to add

  169.254.169.254 metadata.google.internal metadata

  to /etc/hosts (in a Linux guest). It appears this IP address does *not* come
  from a name server, so Google will not be able to change it. So it should be
  safe to hard-code this IP address - as ugly as that is...

Signed-off-by: Or Cohen <orc@fewbytes.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Shell: Fix java cmd without parameters exception

Fixes #33.

Signed-off-by: Or Cohen <orc@fewbytes.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Merge github.com:amnonh/mgmt
httpserver: add missing stub for java_api::is_valid()

It is needed to build the host version.

Signed-off-by: Tomasz Grabiec <tgrabiec@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Move REST API spec to a separate project

REST API is defined using JSON files base on Swagger spec.
They are currently located at a dir under mgmt project.

This force anyone who wish to use the API specs to pull the entire mgmt project.
Users will need only the JSON files to build, for example a Ruby client.

This is the second patch of two, which will move mgmt/api to a new osv-rest-api repository.
The first patch added the files to the new repository
In this patch mgmt/api directory is replaced with a submodule.
In addition, Make file has been update to do 'git submodule update' in case the API sub module is not there.

Signed-off-by: Tzach Livyatan <tzach@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Http Server: Change the Swagger GUI to / instead of /ui

This patch is under the mgmt repository and it address:
https://github.com/cloudius-systems/mgmt/issues/39

When connecting to the http server, it is more common to connect to the
GUI as:
http://192.168.122.89:8000/

To support that the rule that matches the ui was moved to be the last
rule (with the lowest priority) and it is mapped to anything (i.e. the
empty string)

A rule was added to match the index.html in the root

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Shell: Deployed our build of crash to artifactory

This is a quick deploy/fix for the ^D bug that causes an infinite loop.

Signed-off-by: Or Cohen <orc@fewbytes.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Extract httpserver into separate module

The base OSv image does not contain shell, only httpserver. The latter
does not need OpenJDK, which bloats the image greatly (160M vs 16M).
This change extracts httpserver into a spearate module so that it can
be included alone, without pulling OpenJDK.
httpserver: add missing module.py

The file was omitted by mistake in 4a5e485768b58668c464ac115b1d610eb5e0e208

Signed-off-by: Tomasz Grabiec <tgrabiec@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
tests: fix pattern for os/version

Currently it fails for v0.06-rc3-27-g54808ec

Signed-off-by: Tomasz Grabiec <tgrabiec@cloudius-systems.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
Switch from gradle to maven

Maven is already used in the main OSv build, so it's kind of straight-forward
that it would be used here as well.

This patch:

* Converts the build tool from gradle to maven
* Adjusts the OSv module configurations to match
* Updates .gitignore
* Remove everything related to gradle

Reviewed-by: Tomasz Grabiec <tgrabiec@gmail.com>
Signed-off-by: Or Cohen <orc@fewbytes.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
httpserver: fix make rules for submodules

Current rules were causing submodules to be updated even if .git
directories existed.

Reported-by: Amnon Heiman <amnon@cloudius-systems.com>
Signed-off-by: Tomasz Grabiec <tgrabiec@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Shell: Improve `mkdir`

* Fix treating relative paths
* Add support for multiple paths
* Add option to auto create parent directories

Signed-off-by: Or Cohen <orc@fewbytes.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Shell: Add `cp` command

Currently supported flags:

* -R, -r, --recursive
* -t, --target-directory=DIRECTORY
* -T, --no-target-directory

Interactive not supported yet.

Closes #35.

Signed-off-by: Or Cohen <orc@fewbytes.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Shell: Fix `ls` permission denied message on empty folders

Signed-off-by: Or Cohen <orc@fewbytes.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Add httpserver build targets to gitignore

Signed-off-by: Or Cohen <orc@fewbytes.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Add sleep command

Add Sleep command

Signed-off-by: Pradeep K Surisetty <psuriset@linux.vnet.ibm.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Http Server: Use const for operation names

Operation names are used to mapped operation to path, it is now possible
to use a constant instead of a string. This will result in a compilation
failure instead of a run time failure.

For example instead of using "getFile" to locate the operation, it is
possible to use: file_json::getFile

If for some reason the operation name will changed, the compilation will
fail.

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
Http Server: Change file.cc to use constants over string

The code generation now produces constants for the operation name. The
file.cc was modified to use those constants.

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>