Hello my fellow cobblers :)

These little patches add the ability to use the "all" keyword for the
"cobbler buildiso --system=" command, also the usage text for this
command has been updated.
I hope the patch format is usable for you guys... (i used diff -u,
will setup a git repo later...)

Have a nice day!

Grtz,
Jorgen Maas
--- cobbler_cli.py	2011-05-13 13:40:55.000000000 +0200
+++ work_cli.py	2011-05-13 13:48:55.000000000 +0200
@@ -333,7 +333,7 @@
             defaultiso = os.path.join(os.getcwd(), "generated.iso")
             self.parser.add_option("--iso",      dest="iso",  default=defaultiso, help="(OPTIONAL) output ISO to this path")
             self.parser.add_option("--profiles", dest="profiles", help="(OPTIONAL) use these profiles only")
-            self.parser.add_option("--systems",  dest="systems",  help="(OPTIONAL) use these systems only")
+            self.parser.add_option("--systems",  dest="systems",  help="(OPTIONAL) use these systems only or use the 'all' keyword")
             self.parser.add_option("--tempdir",  dest="buildisodir",  help="(OPTIONAL) working directory")
             self.parser.add_option("--distro",   dest="distro",   help="(OPTIONAL) used with --standalone to create a distro-based ISO including all associated profiles/systems")
             self.parser.add_option("--standalone", dest="standalone", action="store_true", help="(OPTIONAL) creates a standalone ISO with all required distro files on it")
--- cobbler_action_buildiso.py	2011-05-13 08:19:22.000000000 +0200
+++ work_action_buildiso.py	2011-05-13 13:54:44.000000000 +0200
@@ -87,6 +87,13 @@
 
   
     def generate_netboot_iso(self,imagesdir,isolinuxdir,profiles=None,systems=None,exclude_dns=None):
+        if systems.lower() == "all":
+           systems = ""
+           for sys in self.api.systems():
+              systems = systems + sys.name + ","
+           if systems[-1] == ",":
+              systems = systems[0:-1]
+
         self.logger.info("copying kernels and initrds for profiles")
         # copy all images in included profiles to images dir
         for profile in self.api.profiles():
_______________________________________________
cobbler-devel mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/cobbler-devel

Reply via email to