Bug 1212680 - RFE: virt-inspector xpath query should output a neat format of the query element
Summary: RFE: virt-inspector xpath query should output a neat format of the query element
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: libguestfs
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-04-17 05:09 UTC by Hu Zhang
Modified: 2016-05-16 04:25 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-04-30 08:23:47 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Hu Zhang 2015-04-17 05:09:06 UTC
Description of problem:
virt-inspector xpath query should output a neat format of the query element.

This problem also exist in RHEL6.7 and RHEL7.1. 


Version-Release number of selected component (if applicable):
libguestfs-tools-c-1.29.33-1.fc22.x86_64


How reproducible:
100%


Steps to Reproduce:
1. Prepare a guest image, such as Fedora20
2. Run the following command: 
# virt-inspector -a Fedora-20.raw |virt-inspector --xpath '//mountpoints'
<mountpoints>
          <mountpoint dev="/dev/fedora_dhcp-66-103-65/root">/</mountpoint>
          <mountpoint dev="/dev/sda1">/boot</mountpoint>
        </mountpoints>


Actual results:
As above


Expected results:
<mountpoints>
          <mountpoint dev="/dev/fedora_dhcp-66-103-65/root">/</mountpoint>
          <mountpoint dev="/dev/sda1">/boot</mountpoint>
</mountpoints>


Additional info:
The output format is also not neat when query other elements, such as: filesystem, operatingsystem, etc.

Comment 1 Richard W.M. Jones 2015-04-17 09:15:34 UTC
There's probably a libxml2 flag we can use to format the output better.
However the current output is correct.


Note You need to log in before you can comment on or make changes to this bug.