Issue#349: Software Update Grid Keeps Loading when Error Returns

Software update grid keeps loading on UI when server returns 500 error.
Instead, we shall remove the loading UI and add a message UI to let the
user know something is wrong, as well as add a button to allow the user
retry.

v1 -> v2:
  2a) Made message more user-friendly and informative
      (Aline's comment)

Signed-off-by: Hongliang Wang <hlwang@linux.vnet.ibm.com>
bug fix: Instantiate the apt-get manager when update the apt-get packages list

It is needed to always get the correct information from apt-get.
Otherwise, even after updating packages the same packages will be listed
to be updated as they are kept in the apt-get instance.

Signed-off-by: ShaoHe Feng <shaohef@linux.vnet.ibm.com>
Signed-off-by: Aline Manera <alinefm@br.ibm.com>
bug fix: Allow user specifies the repository name when adding a new YUM repo

The backend already supports the repo_name as an optional parameter while
creating a new YUM repo but the jsonschema and docs are not consistent with that.
Fix it.
Also insert repo_name under "config" as it is YUM specific information.

Signed-off-by: Aline Manera <alinefm@br.ibm.com>
bug fix: Display update progress on real time

When updating the system, the user should be able to see the progress to know
what is being done in the system.

stdout.read() will wait until get the completed output to return, ie, the user
will see the progress only when the update finishs.
So use stdout.readline() to read line by line and display the info to
the user.

Signed-off-by: Aline Manera <alinefm@br.ibm.com>
bug fix: Lock YUM operations

In addition to cherrypy lock - that avoids concurrent requests - we also
need to use the yum.doLock() to avoid different applications running
YUM, example, Kimchi and Package Kit.

Signed-off-by: Aline Manera <alinefm@br.ibm.com>
Show error message from debug report generation async task

If the process of generating a debug report in Kimchi fails while it
was executing (e.g. due to running out of disk space to generate the
report), the error message was not being shown in the Kimchi UI.
Basically src/kimchi/control/tasks.py was putting the error message
in a JSON field called message, while the UI was looking for the error
message in a field called reason. 'reason' is used in standard
exception json returned only.

Signed-off-by: Leonardo Garcia <lagarcia@br.ibm.com>
Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo@linux.vnet.ibm.com>
Optimize return code check.

Instead of doing two comparisons, make just one and make this check
faster.

Signed-off-by: Leonardo Garcia <lagarcia@br.ibm.com>
Bug fix: specify the class attribute when change pool state dot.

After we list the storage pools, it will change other element with the
same class attribute in other page.

Signed-off-by: ShaoHe Feng <shaohef@linux.vnet.ibm.com>
Signed-off-by: Hongliang Wang <hlwang@linux.vnet.ibm.com>
but fix: show the content of combobox and filterselect in storage add page

On firefox 27, the content of combobox and filterselect will hide.

a similar problem on issue.
https://github.com/kimchi-project/kimchi/issues/335

Signed-off-by: ShaoHe Feng <shaohef@linux.vnet.ibm.com>
Signed-off-by: Hongliang Wang <hlwang@linux.vnet.ibm.com>
Template: Check if the host supports Spice

On some architecture of hosts, such as ppc64 hosts, QEMU is not compiled
with Spice. So we'd like to disable Spice on these hosts. Unfortunately
even QEMU is not compiled with Spice, 'qemu --help' still prints Spice
related help. In this patch we use ldd to determine if QEMU is linked to
libspice-server.so, and provide this information through the
/config/capabilities URI. The front-end code then checks the capabilities
and add or remove Spice from the graphic options respectively.

Signed-off-by: Zhou Zheng Sheng <zhshzhou@linux.vnet.ibm.com>
Adds 'in_use' info to API.md

The network lookup function returns the new field "in_use". API.md was
not updated properly. This patch fixes this.

Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo@linux.vnet.ibm.com>
Update form.serializeObject method to handle deep object serialization

Previous form.serializeObject only handled single depth objects.
Updates accomodate arbitrary object depth.

Signed-off-by: Adam King <rak@linux.vnet.ibm.com>
Update grid widget to populate fields from deeply nested objects

Prior implementation of grid assumed all fields were defined as properties of
the top object with no nesting. The update facilitates use of nested objects.

Signed-off-by: Adam King <rak@linux.vnet.ibm.com>
Repository Management - Add i18n Strings

Add i18n translation strings for repository management.

Signed-off-by: Hongliang Wang <hlwang@linux.vnet.ibm.com>
Repository Management - Add API Support

Add API calling in kimchi.api.js.

Signed-off-by: Hongliang Wang <hlwang@linux.vnet.ibm.com>
Repository Management - Add Repository Support

Add repository.

Signed-off-by: Hongliang Wang <hlwang@linux.vnet.ibm.com>
Signed-off-by: Adam King <rak@linux.vnet.ibm.com>
Repository Management - Edit Repository Support

Edit repository support.

Signed-off-by: Hongliang Wang <hlwang@linux.vnet.ibm.com>
Signed-off-by: Adam King <rak@linux.vnet.ibm.com>
Repository Management - Integrate into Host Tab

Integrate add/enable/disalbe/edit/remove a repository feature into host tab.

Signed-off-by: Hongliang Wang <hlwang@linux.vnet.ibm.com>
Signed-off-by: Adam King <rak@linux.vnet.ibm.com>
Added help for repositories

Added help for yum and deb repositories to the host.dita file.

Signed-off-by: Kersten Richter <kersten@us.ibm.com>
Fibre Channel SCSI Storage Pool UI

add a new type of storage pool fibre channel scsi.
if this type of storage pool is selected,
send a request to get all host PCI devices,
then list them for user selection.

Signed-off-by: Yu Xin Huo <huoyuxin@linux.vnet.ibm.com>