Host reboot and shutdown backend implementation

This patch includes the functions to enable reboot and shutdown of a
Kimchi host. It also enables the Rest API, and includes POST actions
documentation in docs/API.md. Shutdown and reboot are only allowed
if there are not vms running.

Signed-off-by: Adriano Botega <abotega@linux.vnet.ibm.com>
Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo@linux.vnet.ibm.com>
Json schema for templates

This patch adds the template json schema to API.json. The schema is
going to be used for data validation.

Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo@linux.vnet.ibm.com>
Enable template data verification against json schema

This patch enables data verification against json schema. The verified
data comes from template edit UI, when the user tries to update one
of his templates.

Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo@linux.vnet.ibm.com>
Fix test cases according to new Templates Schema validation

This patch modifies the test cases in order to work with new json
schema validation and API returns. CDROM is now required and model
test became obsolete.

Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo@linux.vnet.ibm.com>
change the unit of host disk and net IO rate from kb/s to B/s

Now UI calls changetoProperUnit to get the proper unit.
This patch just changes the unit of host disk and net IO rate.

And the unit is B/s
ref: http://en.wikipedia.org/wiki/Bit_rate.

Signed-off-by: ShaoHe Feng <shaohef@linux.vnet.ibm.com>
Issue #235: changetoProperUnit Returns Wrong Result

1) I expect 0.12B for the following call:
  kimchi.changetoProperUnit(0.123456789, 2);

  though it returns 0.123456789B.

  This patch fixes this issue.

2) Added a parameter base to support network I/O rate
    (1000 instead of 1024).

Signed-off-by: Hongliang Wang <hlwang@linux.vnet.ibm.com>
UI: Host Monitoring

Includes following features:
a) View system basic information;
b) Monitor host dynamic data including:
   CPU, Memory, Disk I/O, Network I/O.
c) Generate/Remove/Download SOS report;
d) Stop/Restart/Connect To host.

Signed-off-by: Hongliang Wang <hlwang@linux.vnet.ibm.com>
Concatenate ISO URL correctly with port number

When downloading a remote ISO, the remote URL uses the port number, which
is a Python int variable. When concatenating that value with a string,
an error occurs ("TypeError: coercing to Unicode: need string or buffer,
int found").

Convert the int value to string before concatenating it with the final
URL string.

Signed-off-by: Crístian Viana <vianac@linux.vnet.ibm.com>
Add dependency of nfs client

Add missing nfs pool dependency for nfs client.

Signed-off-by: Royce Lv <lvroyce@linux.vnet.ibm.com>
Template: Enable update Disk size and CDROM path (UI)

This patch modifies the UI in order to allow change the first disk
size and the cdrom path

Signed-off-by: zhoumeina <zhoumein@linux.vnet.ibm.com>
Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo@linux.vnet.ibm.com>
Add pseudo iso_gen for deep scan test

Add iso_gen so that deep scan can be tested with pseudo iso.

Signed-off-by: Royce Lv <lvroyce@linux.vnet.ibm.com>
ISSUE #236: Fix break of deep scanning

XML change breaks deep scanning, reorginze and fix it.

Signed-off-by: Royce Lv <lvroyce@linux.vnet.ibm.com>
Add deep scan test

Add deep scan test to make sure deep scan will get result.

Signed-off-by: Royce Lv <lvroyce@linux.vnet.ibm.com>
PEP8 cleanup for server.py

This patch make server.py PEP8 clean.

Signed-off-by: Mark Wu <wudxw@linux.vnet.ibm.com>
Logical StoragePool: adding disks.py module

This module contains functions to retrieve partition's data from
the host, using commands such as lsblk and blkid.

Signed-off-by: Daniel Henrique Barboza <danielhb@linux.vnet.ibm.com>
Logical StoragePool: changes in model and mockmodel

Adding methods to support the new resource and models implemented in controller.py.

Signed-off-by: Daniel Henrique Barboza <danielhb@linux.vnet.ibm.com>
Logical StoragePool: changes in controller.py

Adding a new Collection type (Partitions) and a new Resource type (Partition).

Signed-off-by: Daniel Henrique Barboza <danielhb@linux.vnet.ibm.com>
Logical StoragePool: changes in API.md

Updating the storagepool_xml API and adding the API for /host/partitions.

Signed-off-by: Daniel Henrique Barboza <danielhb@linux.vnet.ibm.com>