summaryrefslogtreecommitdiff
path: root/virt-install
diff options
context:
space:
mode:
authorCole Robinson <crobinso@redhat.com>2014-01-24 20:03:30 -0500
committerCole Robinson <crobinso@redhat.com>2014-01-25 17:20:29 -0500
commit927a7ef2659d9b087a41aa63ce227dc13bc2e91a (patch)
tree50e4e5e0ef45a56e23a283f670d0d2f4328d4f7b /virt-install
parented25983d14d0a95f384c4791c6c0dc5aac96ad22 (diff)
downloadvirt-manager-927a7ef2659d9b087a41aa63ce227dc13bc2e91a.tar.gz
cli: Add --metadata option
Can take name, description, uuid, and title (new). This deprecates the separate --description and --uuid element, but we won't require it for specifying a name with virt-install/virt-image since that's quite overkill. Allowing --name with this option is mostly for the benefit of virt-xml.
Diffstat (limited to 'virt-install')
-rwxr-xr-xvirt-install12
1 files changed, 6 insertions, 6 deletions
diff --git a/virt-install b/virt-install
index f26c4bdf..ca78d1ef 100755
--- a/virt-install
+++ b/virt-install
@@ -516,10 +516,11 @@ def build_guest_instance(conn, options, parsermap):
cli.get_name(guest, options.name)
- # Guest configuration
if options.uuid:
guest.uuid = options.uuid
- guest.description = options.description
+ # This might be difficult to convert into options.metadata
+ if options.description:
+ guest.description = options.description
# We don't want to auto-parse --disk, but we wanted it for earlier
# parameter introspection
@@ -882,12 +883,11 @@ def parse_args():
geng = parser.add_argument_group(_("General Options"))
geng.add_argument("-n", "--name",
help=_("Name of the guest instance"))
- geng.add_argument("-u", "--uuid", help=argparse.SUPPRESS)
cli.add_memory_option(geng, backcompat=True)
cli.vcpu_cli_options(geng)
- geng.add_argument("--description",
- help=_("Human readable description of the VM to store in "
- "the generated XML."))
+ cli.add_metadata_option(geng)
+ geng.add_argument("-u", "--uuid", help=argparse.SUPPRESS)
+ geng.add_argument("--description", help=argparse.SUPPRESS)
cli.add_guest_xml_options(geng)
insg = parser.add_argument_group(_("Installation Method Options"))