Bug 1140547
Summary: | virt-builder option '--format' don't work well | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Lingfei Kong <lkong> |
Component: | libguestfs | Assignee: | Richard W.M. Jones <rjones> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | low | Docs Contact: | |
Priority: | low | ||
Version: | 7.1 | CC: | leiwang, mbooth, ptoscano, wshi |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | libguestfs-1.27.43-1.1.el7 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-03-05 13:44:29 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Lingfei Kong
2014-09-11 08:30:22 UTC
The option is --list-format (not --list --format). eg: $ virt-builder -l --list-format json { "version": 1, "sources": [ { "key": "/etc/xdg/virt-builder/repos.d/libguestfs.gpg", "uri": "http://libguestfs.org/download/builder/index.asc" }, { "uri": "http://file.rdu.redhat.com/~rjones/builder/index.asc" } ], [etc] However I agree that we probably should reject the '--format' option when the mode is '--list'. (In reply to Richard W.M. Jones from comment #2) > The option is --list-format (not --list --format). eg: > Thanks for your quickly response, i checked the man page, found the following lines: --list --format format --list --long List available templates. It is possible to choose with --format the output format for the list templates: short The default format, prints only the template identifier and, next to it, its short description. long Prints a textual list with the details of the available sources, followed by the details of the available templates. json Prints a JSON object with the details of the available sources and the details of the available templates. The "version" key in the main object represents the "compatibility version", and it is bumped every time the resulting JSON output is incompatible with the previous versions (for example the structure has changed, or non-optional keys are no more present). Maybe the man page should change '--list --format format' to '--list --list-format format' I've fixed the incorrect documentation in the manual page and added an extra error message if people use --list + --format: https://github.com/libguestfs/libguestfs/commit/de3614e0ff67f5a85625946f35af296080cbb6b8 Verify with libguestfs-1.28.1-1.2.el7 Steps to verify: 1. #virt-builder --list --list-format json { "version": 1, "sources": [ { "uri": "file:///var/run/guestfs-autotest/images/index.asc" } ], "templates": [ { "os-version": "RHEL_7u0_Server", "full-name": "RHEL_7u0_Server", "arch": "x86_64", "size": 8589934592, "notes": { "C": "RHEL_7u0_Server" }, "hidden": false } ] } 2. #virt-builder --list --format short virt-builder: virt-builder --list: use '--list-format', not '--format'. 3. Check man page of virt-builder, the man page have changed to the right format: -l --list --list --list-format format --list --long List available templates. It is possible to choose with --list-format the output format for the list templates: short The default format, prints only the template identifier and, next to it, its short description. ....... According to step 1, step 2, step 3, this bug is fixed. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2015-0303.html |