[sandbox PATCH 08/11] Image: Add run args

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commandline parameters for running a template
---
 virt-sandbox-image/virt-sandbox-image.py | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/virt-sandbox-image/virt-sandbox-image.py b/virt-sandbox-image/virt-sandbox-image.py
index c320105..81b825c 100644
--- a/virt-sandbox-image/virt-sandbox-image.py
+++ b/virt-sandbox-image/virt-sandbox-image.py
@@ -164,6 +164,18 @@ def gen_create_args(subparser):
                         help=_("format format for image"))
     parser.set_defaults(func=create)
 
+def gen_run_args(subparser):
+    parser = subparser.add_parser("run",
+                                  help=_("Run a already built image"))
+    requires_name(parser)
+    requires_source(parser)
+    requires_driver(parser)
+    parser.add_argument("imagepath",
+                        help=_("path for image"))
+    parser.add_argument("-c","--command",
+                        help=_("Igniter command for image"))
+    parser.set_defaults(func=run)
+
 if __name__ == '__main__':
     parser = argparse.ArgumentParser(description='Sandbox Container Image Tool')
 
@@ -171,6 +183,7 @@ if __name__ == '__main__':
     gen_download_args(subparser)
     gen_delete_args(subparser)
     gen_create_args(subparser)
+    gen_run_args(subparser)
 
     try:
         args = parser.parse_args()
-- 
2.1.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]