Users now can use the pool wizard for adding virtual machines running under libvirt and QEMU.
To use wizard in the VM mode, use option -v or --virtual. The option is compatible with -p and --pool-dir option
Signed-off-by: Jiri Prochazka jprochaz@redhat.com --- lnst-pool-wizard | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/lnst-pool-wizard b/lnst-pool-wizard index 9da8911..a1ed03f 100755 --- a/lnst-pool-wizard +++ b/lnst-pool-wizard @@ -29,6 +29,7 @@ def help(retval=0): " -i, --interactive start wizard in interactive mode (this "\ "is default mode)\n"\ " -n, --noninteractive start wizard in noninteractive mode\n"\ + " -v, --virtual start wizard in mode for VMs\n"\ "Examples:\n"\ " lnst-pool-wizard --interactive\n"\ " lnst-pool-wizard --noninteractive 192.168.122.2\n"\ @@ -41,8 +42,8 @@ def main(): try: opts, args = getopt.getopt( sys.argv[1:], - "hinp:", - ["help", "interactive", "noninteractive", "pool_dir="] + "hinvp:", + ["help", "interactive", "noninteractive", "virtual", "pool_dir="] ) except getopt.GetoptError as err: sys.stderr.write(str(err)) @@ -63,6 +64,8 @@ def main(): else: hostlist = args mode = "noninteractive" + elif opt in ("-v", "--virtual"): + mode = "virtual" elif opt in ("-p", "--pool_dir"): if not arg: sys.stderr.write("No pool directory specified\n") @@ -75,6 +78,8 @@ def main():
if mode == "noninteractive": w.noninteractive(hostlist, pool_dir) + elif mode == "virtual": + w.virtual(pool_dir) else: w.interactive(pool_dir)