virsh: update dumpxml to return CmdResult object

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
libvirt: adapt calling of virsh.dumpxml to new @return of CmdResult object.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
virt: Ignore exception detail if debug is False

For now, when use virsh.domain_exists() or vm.exists()
to check a guest, if it's not exist, there will be some
exception details printed in log, this may confuse users,
this will make them think there is an error happened.

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
Merge pull request #982 from liyangfnst/exist

virt: Ignore exception detail if debug is False
guest-os: Add rhel64 ppc config

Adds the configuration file for rhel64 guest os.
Helps the config parser to use the only RHEL.6.4.ppc64 filter.
Need to validate the unattattend install through this ks file.

Signed-off-by: Satheesh Rajendran <sathnaga@linux.vnet.ibm.com>
Reviewed-by: Mike Qiu <qiudayu@linux.vnet.ibm.com>
virt: docstring fix

docstring fix for the param in virt tests

Signed-off-by: Mike Qiu <qiudayu@linux.vnet.ibm.com>
libvirt: fix virsh_vcpupin test.

Since the output of virsh vcpupin command is changed, we need
to update the parsing function for it.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
libvirt-virsh: update vcpupin function.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
utils_test: Add two utils functions into utils_test.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
libvirt-tests: update virsh vcpupin test.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
libvirt.tests.vcpupin: Fix testcase name for virsh commands&pep8.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
virsh_capabilities: Find the qemu-kvm in os PATH

Rather than assume qemu-kvm is found in /usr/libexec use the utils_misc.
find_command method to locate "qemu-kvm". If not found, then raise an error
Merge pull request #959 from jferlan/virsh_capabilities

virsh_capabilities: Find the qemu-kvm in os PATH
virt-libvirt: New libvirt_xml accessor generators

* Small behavior fix on XMLElementText
* XMLElementBool: Treat "flag" elements as boolean values for presense
* XMLElementNest: Allows "nesting" an arbitrary LibvirtXMLBase subclass
                  then rerooting it's XML under a parent element
* XMLElementList: Represent duplicate child elements (valid in XML) as
                  if it were a list, with values marshaled to/from XML
                  and opaque values.
* Added unittests for all three

Signed-off-by: Chris Evich <cevich@redhat.com>
virt-libvirt: Remove disused VM methods

Signed-off-by: Chris Evich <cevich@redhat.com>
virt-libvirt: Fixup some unittest whitespace

Signed-off-by: Chris Evich <cevich@redhat.com>
virt-libvirt: Implement libvirt_xml.devices.disk

Signed-off-by: Chris Evich <cevich@redhat.com>
virt-libvirt: Rename address device property

Signed-off-by: Chris Evich <cevich@redhat.com>
virt-libvirt: XMLAttribute accessor behavior fix

All other "get" accessors raise xcepts.LibvirtXMLNotFoundError when
their data doesn't exist.  If this returns None, then caller may
mistake the value as None, when there is no value.

Signed-off-by: Chris Evich <cevich@redhat.com>
virt: Fix broken restore() functionality

* The backup/restore logic inherrited by xml_utils.XMLTreeFile
  is backwards from the perspective of a caller.
* xml_utils.XMLTreeFile must re-parse the tree after restoring
  from the backup.
* Provide restore() convenience method so test code doesn't
  need to access xmltreefile attribute directly.

Signed-off-by: Chris Evich <cevich@redhat.com>