fish: Allow -d UUID (specify libvirt domains by UUID).
authorRichard W.M. Jones <rjones@redhat.com>
Fri, 6 May 2011 16:23:00 +0000 (12:23 -0400)
committerRichard W.M. Jones <rjones@redhat.com>
Fri, 6 May 2011 17:04:19 +0000 (13:04 -0400)
This applies in all the commands which use the common C option parsing
code, ie:

* guestfish
* guestmount
* virt-cat
* virt-df
* virt-filesystems
* virt-inspector
* virt-ls
* virt-rescue

TODO
cat/virt-cat.pod
cat/virt-filesystems.pod
cat/virt-ls.pod
df/virt-df.pod
fish/guestfish.pod
fish/virt.c
fuse/guestmount.pod
inspector/virt-inspector.pod
rescue/virt-rescue.pod

diff --git a/TODO b/TODO
index 9364e12..6579629 100644 (file)
--- a/TODO
+++ b/TODO
@@ -432,11 +432,6 @@ guestfish drive letters
 There should be an option to mount all Windows drives as separate
 paths, like C: => /c/, D: => /d/ etc.
 
 There should be an option to mount all Windows drives as separate
 paths, like C: => /c/, D: => /d/ etc.
 
-Select machines by UUID
------------------------
-
-guestfish -u UUID <or> guestfish -d UUID
-
 More inspection features
 ------------------------
 
 More inspection features
 ------------------------
 
index 4ec9a0b..af8b8f4 100755 (executable)
@@ -92,7 +92,8 @@ not used at all.
 
 =item B<--domain> guest
 
 
 =item B<--domain> guest
 
-Add all the disks from the named libvirt guest.
+Add all the disks from the named libvirt guest.  Domain UUIDs can be
+used instead of names.
 
 =item B<--echo-keys>
 
 
 =item B<--echo-keys>
 
index fac139b..3ba925f 100755 (executable)
@@ -142,7 +142,8 @@ read L</NOTE ABOUT CSV FORMAT> below.
 
 =item B<--domain> guest
 
 
 =item B<--domain> guest
 
-Add all the disks from the named libvirt guest.
+Add all the disks from the named libvirt guest.  Domain UUIDs can be
+used instead of names.
 
 =item B<--echo-keys>
 
 
 =item B<--echo-keys>
 
index 1ba7417..dc3093a 100755 (executable)
@@ -92,7 +92,8 @@ not used at all.
 
 =item B<--domain> guest
 
 
 =item B<--domain> guest
 
-Add all the disks from the named libvirt guest.
+Add all the disks from the named libvirt guest.  Domain UUIDs can be
+used instead of names.
 
 =item B<--echo-keys>
 
 
 =item B<--echo-keys>
 
index d05596a..e9f416c 100755 (executable)
@@ -89,7 +89,8 @@ not used at all.
 
 =item B<--domain> guest
 
 
 =item B<--domain> guest
 
-Add all the disks from the named libvirt guest.
+Add all the disks from the named libvirt guest.  Domain UUIDs can be
+used instead of names.
 
 =item B<--format=raw|qcow2|..>
 
 
 =item B<--format=raw|qcow2|..>
 
index 94deb9c..77bf0ca 100644 (file)
@@ -199,6 +199,8 @@ Add disks from the named libvirt domain.  If the I<--ro> option is
 also used, then any libvirt domain can be used.  However in write
 mode, only libvirt domains which are shut down can be named here.
 
 also used, then any libvirt domain can be used.  However in write
 mode, only libvirt domains which are shut down can be named here.
 
+Domain UUIDs can be used instead of names.
+
 Using this flag is mostly equivalent to using the C<add-domain> command,
 with C<readonly:true> if the I<--ro> flag was given, and
 with C<format:...> if the I<--format:...> flag was given.
 Using this flag is mostly equivalent to using the C<add-domain> command,
 with C<readonly:true> if the I<--ro> flag was given, and
 with C<format:...> if the I<--format:...> flag was given.
index b14cee2..486f098 100644 (file)
@@ -48,5 +48,8 @@ add_libvirt_drives (const char *guest)
     optargs.live = 1;
   }
 
     optargs.live = 1;
   }
 
+  optargs.bitmask |= GUESTFS_ADD_DOMAIN_ALLOWUUID_BITMASK;
+  optargs.allowuuid = 1;
+
   return guestfs_add_domain_argv (g, guest, &optargs);
 }
   return guestfs_add_domain_argv (g, guest, &optargs);
 }
index 9fbefcf..6a2f39b 100644 (file)
@@ -93,6 +93,8 @@ Add disks from the named libvirt domain.  If the I<--ro> option is
 also used, then any libvirt domain can be used.  However in write
 mode, only libvirt domains which are shut down can be named here.
 
 also used, then any libvirt domain can be used.  However in write
 mode, only libvirt domains which are shut down can be named here.
 
+Domain UUIDs can be used instead of names.
+
 =item B<--dir-cache-timeout N>
 
 Set the readdir cache timeout to I<N> seconds, the default being 60
 =item B<--dir-cache-timeout N>
 
 Set the readdir cache timeout to I<N> seconds, the default being 60
index 225e3f6..2192b39 100755 (executable)
@@ -86,7 +86,8 @@ then libvirt is not used at all.
 
 =item B<--domain> guest
 
 
 =item B<--domain> guest
 
-Add all the disks from the named libvirt guest.
+Add all the disks from the named libvirt guest.  Domain UUIDs can be
+used instead of names.
 
 =item B<--echo-keys>
 
 
 =item B<--echo-keys>
 
index f56acd0..81a24cf 100755 (executable)
@@ -118,7 +118,8 @@ not used at all.
 
 =item B<--domain> guest
 
 
 =item B<--domain> guest
 
-Add all the disks from the named libvirt guest.
+Add all the disks from the named libvirt guest.  Domain UUIDs can be
+used instead of names.
 
 =item B<--format=raw|qcow2|..>
 
 
 =item B<--format=raw|qcow2|..>