cli: Separate URL constructing code

This construction code will be used in testing to mock API requests.

Signed-off-by: Or Cohen <orc@fewbytes.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
cli: Add testing module and test command function

Signed-off-by: Or Cohen <orc@fewbytes.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
cli: Add -T,--test flag to test commands

Running the CLI with -T (--test) providing a command name will run the tests
for the requested command. Also, set console size to 24x80 to enable
an expected consistent output formatting.

Signed-off-by: Or Cohen <orc@fewbytes.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
cli: Enable mocking of OSv API for testing

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

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

Fix dmesg to be testable (replace print()).

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

Fix cat to be testable (replace print())

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

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

Fix date to make it testable (replace print())

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

Make df testable (replace print())

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

Make free testable (replace print())

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

Also: Fix mkdir. ;-)

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

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

Make ls testable (replace print())

Signed-off-by: Or Cohen <orc@fewbytes.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
setup.py: install p11-kit package

Build failure fixed by this patch:

make[2]: Entering directory '/mnt/jenkins/workspace/cassandra-ec2-perf/modules/ca-certificates'
mkdir -p build/etc/pki/ca-trust/extracted/openssl
  CC tests/tst-bsd-kthread.so
mkdir -p build/etc/pki/ca-trust/extracted/pem
mkdir -p build/etc/pki/ca-trust/extracted/java
p11-kit extract --format=openssl-bundle --filter=certificates --overwrite build/etc/pki/ca-trust/extracted/openssl/ca-bundle.trust.crt
make[2]: p11-kit: Command not found
Makefile:5: recipe for target 'module' failed
make[2]: *** [module] Error 127
make[2]: Leaving directory '/mnt/jenkins/workspace/cassandra-ec2-perf/modules/ca-certificates'

Reviewed-by: Tomasz Grabiec <tgrabiec@gmail.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Instruct people to use scripts/setup.py for Fedora prerequisites

The scripts/setup.py script is there for installing prerequisites. It's
known to work on Fedora so drop the duplicate list of prerequisite
packages from README.md and just tell people to use scripts/setup.py.

We really should do the same thing for other operating systems as well
but that should be done by people who have access to them.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Add patch to Fedora prerequisite packages

This patch add patch to the Fedora prerequisite packages
patch is used as part of the build of applications, for example Cassandra

Signed-off-by: Tzach Livyatan <tzach@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Lua: Don't parallel LuaRocks installations

Some LuaRocks mirrors are limiting the amount of allowed connections, this will
cause the build to fail when make installs these in parallel.

Reported-by: William Dauchy <william@gandi.net>
Signed-off-by: Or Cohen <orc@fewbytes.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>