Issue # 303 The password of iSCSI Authentication should be masked

Changed the input field type from text to password so the browsers will mask the contents.

Signed-off-by: Adam King <rak@linux.vnet.ibm.com>
Fix tests: restore the monkey patch after testing Paths

To test path vars,  we monkey patched the method get_prefix of
Paths, but not restored.  Because of it, the other test cases, like
test_plugin, fail to pass.  This patch restores the change on teardown.

Reported-by: Zhou Zheng Sheng <zhshzhou@linux.vnet.ibm.com>
Signed-off-by: Mark Wu <wudxw@linux.vnet.ibm.com>
Fix screenshots and debug reports paths.

The definitions of the screenshots and debug reports paths in Cherrypy
config were pointing to a relative path that, when concatenated with the
root path defined in the [/] section, were not mapping to the correct path
when Kimchi is installed through its RPM package.

This fix removes the use of the root path in the [/] config section and
specifies the absolute path for all resources. That way we can easily
handle running Kimchi directly from the git source tree or after a
package installation --- in the later case the paths will not always be
relative to the same root path, but will rather be spread in the file system
according to the unix file system standard.

Signed-off-by: Leonardo Garcia <lagarcia@br.ibm.com>
run_command: log error messages using higher log level when return code is non-zero

run_command logs stdout and stderr output using the "debug" level. In
this patch, if returncode is non-zero, it logs stderr output using the
"error" level. It's helpful for diagnosing underlying command errors.

Signed-off-by: Zhou Zheng Sheng <zhshzhou@linux.vnet.ibm.com>
Authors cleanup

Removed authors references from any type of code files and moved to
AUTHORS file

Signed-off-by: Paulo Vital <pvital@linux.vnet.ibm.com>
bug fix: Make URI parameter is not None before encoding it

The following error is raised when the user tried to reboot the host
system:

Request Headers:
  AUTHORIZATION: Basic YWxpbmVmbTowaG5lKjI4ZGljSA==
  Content-Length: 2
  HOST: localhost:8000
  Remote-Addr: 127.0.0.1
  ACCEPT: application/json
  USER-AGENT: curl/7.27.0
  Content-Type: application/json
[25/Feb/2014:14:05:28] HTTP Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/cherrypy/_cprequest.py", line 656, in respond
    response.body = self.handler()
  File "/usr/lib/python2.7/dist-packages/cherrypy/lib/encoding.py", line 188, in __call__
    self.body = self.oldhandler(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/cherrypy/_cpdispatch.py", line 34, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/home/alinefm/kimchi/src/kimchi/control/base.py", line 79, in wrapper
    for arg in self.model_args])
AttributeError: 'NoneType' object has no attribute 'encode'

It is because /host resource has no parameter and fails to encode() the
None value.
So fix it by verifying the parameter is not None in order to make the
encode() call.

Signed-off-by: Aline Manera <alinefm@br.ibm.com>
issue #242: Do not allow user deactivate/delete storage pool used by a template

Make a integrity verification when user try to deactivate or delete a pool.
If pool is used by a template it should not be deactivated or deleted to
avoid problems while using the template.
Also update the po files as new messages are added to alert the user.

Signed-off-by: Aline Manera <alinefm@br.ibm.com>
Set default combo box style to storage pool type list

While creating a new storage pool the supported types are listed in a
combo box which does not have the default style used in Kimchi.
Fix it.

Signed-off-by: Aline Manera <alinefm@br.ibm.com>
bug fix: check all Red Hat distributions for yum package management

There are several Red Hat distributions.
use startswith("red hat") to check this is a Red Hat distributions.

Signed-off-by: ShaoHe Feng <shaohef@linux.vnet.ibm.com>
Have a meaningful description for the exception test #81

This is what the case trys to test if  a faked
exception can be caught properly by the task thread.
So a meaningful description is added to avoid confusing
Add another way to download the debugreport file in the test

Two urls are provided to download the files and we need test both
Fix Add Network window

VLans and Interfaces must only be available for selection if network
type Bridge is selected. This restriction was not implemented in the UI.
This patch fixes this problem.

Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo@linux.vnet.ibm.com>
Fix vm start UI error return message

This patch fixed the UI error return message and also fix the button
name used in the JS function.

Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo@linux.vnet.ibm.com>
Fix VM stop error messages handling (backend/UI)

The UI was not able to catch the error messages sent from backend when a
user tried to stop a VM. This patch fixes the processes and also change
the 'stop' backend function, then exceptions from "get_vm" are send to
frontend.

Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo@linux.vnet.ibm.com>
Fix VM reset (UI) error messages hnadling

This patch fixes the UI in order to show properly the messages sent by
backend when usert tries to reset a running VM. Error messages are
basically sent from vm 'stop' and 'start' functions.

Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo@linux.vnet.ibm.com>
Fix VM delete error message handling (UI/Backend)

This patch fixes delete confirmation window, changes backend in order to
raise proper exception and fixes the ui to catch the right message from
backend.

Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo@linux.vnet.ibm.com>
Delete unsed _vm_exists funtion

Due to the new error messaging handling the function _vm_exists is not
necessary anymore and moved OperationFailed exception to get_vm function,
where makes more sence.

Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo@linux.vnet.ibm.com>
Fix Kimchi vm tests according to new messages sent from backend

With new backend messaging system, when a VM is not found the backend
raises an exception which was breaking Rollback functions. This patch
fixes this problem.

Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo@linux.vnet.ibm.com>
Can not create a VM from a template with disks['volume'] parameters. #181

The latest code have removed disks["volume"] from API.json, but API.md
was not updated accordingly. The in-consistence between API.json and
API.md should be corrected first. Then, the invalid code in
VMTemplate.validate_integrity() should also be cleaned.
Issue 299 Inactive storage pools are listed while editing template

Omit any inactive pools from the template edit pool selection list.

Signed-off-by: Adam King <rak@linux.vnet.ibm.com>