Fix the exception caused by IE8

This is a patch for issue 47. The user will get a exception when IE8
is used to access Kimchi.  Here, a patch is provided to avoid the
exception and the user can see the Kimchi web interfaces

Signed-off-by: Shu Ming <shuming@linux.vnet.ibm.com>
bug fix: kimchi supports to show VM with Chinese name

encode the vm's name as UTF-8

libvirt already supports Chinese name.
libvirt says:
virDomainGetXMLDesc:
* Returns a 0 terminated UTF-8 encoded XML instance, or NULL in case of error.
*         the caller must free() the returned value.

virt-manager can also show VM with Chinese name.

bug: https://github.com/kimchi-project/kimchi/issues/54

Signed-off-by: ShaoHe Feng <shaohef@linux.vnet.ibm.com>
bug: fix list vm name in unicode for mockmodel

mockmodel vm names have not converted in unicode, fix it.
Issue:https://github.com/kimchi-project/kimchi/issues/42

Signed-off-by: Royce Lv <lvroyce@linux.vnet.ibm.com>
Reviewed-by: Aline Manera <alinefm@br.ibm.com>
template: add rhel to osinfo

rhel iso was probed to be unknown distro and this is misleading,
add rhel distro information to osinfo

Signed-off-by: Royce Lv <lvroyce@linux.vnet.ibm.com>
Issue #59: Make the popup menu entirely visible in browser

In the guest list page, when some VM line is at the bottom of the
browser, and the user clicks "actions" button, the popup menu may
go out of the viewport or just show a part. We need to make sure
the whole body of the menu is in the viewport.
    In this patch, we did a check to the popup menu and scroll it
into browser viewport.
    Worked in IE9+, Chrome, Firefox 17.0.1, and Safari.

Signed-off-by: Hongliang Wang <hlwang@linux.vnet.ibm.com>
issue60: Avoid using default database file in test

Default database file maybe created by root usr,
making running test suite with unpriviledged usr raise error,
make testcases use their own temp database file instead.
REF:
https://github.com/kimchi-project/kimchi/issues/60

Signed-off-by: Royce Lv <lvroyce@linux.vnet.ibm.com>
issue34: add handling invalid iso file

Invalid iso file includes non-existent path, iso can't be probed by its volume id,
wrong iso format,non-bootable iso.
we will deny wrong format iso, non-bootable iso or file does not exist,
for iso we can't decide it's distro and version,
generate template with default setting.

Signed-off-by: Royce Lv <lvroyce@linux.vnet.ibm.com>
fix bug: xmlutils get node context by context attribute

doc: http://www.xmlsoft.org/python.html
content : returns the content of the node, it is based on
          xmlNodeGetContent() and hence is recursive.
parent, children, last, next, prev, doc, properties:
        pointing to the associated element in the tree,
        those may return None in case no such link exists.

ref: http://www.xml.com/lpt/a/1211
for the ref, we should use context instead of str

bug: https://github.com/kimchi-project/kimchi/issues/69

Signed-off-by: ShaoHe Feng <shaohef@linux.vnet.ibm.com>
Signed-off-by: Bing Bu Cao <mars@linux.vnet.ibm.com>
Use #unicode instead of #encoding in Cheetah templates

In Cheetah 2.4.1, the #encoding declaration must be in the beginning of the
template file or it is ignored.
The #unicode declaration can be done in any part of the file in Cheetah 2.4.1
or newer.
So use #unicode instead of #encoding to avoid restricting the declaration
position.
The #unicode and #encoding only differ in the type of text output - #unicode
returns unicode text and #enconding returns string text.

Signed-off-by: Aline Manera <alinefm@br.ibm.com>
Remove 'path' which should not be specified when creating volume

In volume XML, <path> element provides the location at which the volume can be accessed on the local filesystem, as an absolute path.
This is a readonly attribute, so shouldn't be specified when creating a volume.

Signed-off-by: Bing Bu Cao <mars@linux.vnet.ibm.com>
Asynctask: add logging to async task

Error in async tasks are difficult to track without the stack and log.
Add logging to it.

Signed-off-by: Royce Lv <lvroyce@linux.vnet.ibm.com>
build: Add basic autotools infrastructure


Signed-off-by: Adam Litke <agl@linux.vnet.ibm.com>
build: Distribute and install files

Add Makefile.am files throughout the tree to ensure automake traverses
the source and distributes and installs the appropriate files.


Signed-off-by: Adam Litke <agl@linux.vnet.ibm.com>
build: Add gettext i18n support


Signed-off-by: Adam Litke <agl@linux.vnet.ibm.com>
build: Add support for building distro packages


Signed-off-by: Adam Litke <agl@linux.vnet.ibm.com>
build: remove old distutils build files


Signed-off-by: Adam Litke <agl@linux.vnet.ibm.com>