diff options
author | Michael DeHaan <mdehaan@redhat.com> | 2008-05-01 17:50:15 -0400 |
---|---|---|
committer | Michael DeHaan <mdehaan@redhat.com> | 2008-05-01 17:50:15 -0400 |
commit | 97a4085adb0d83efd1008614b2b7da5546016ea6 (patch) | |
tree | 71415df6a21fca093abed7b11e018f9d62babc05 /cobbler/modules | |
parent | 964b3328298dba0d8ea500e3349f5aa650344c20 (diff) | |
download | third_party-cobbler-97a4085adb0d83efd1008614b2b7da5546016ea6.tar.gz third_party-cobbler-97a4085adb0d83efd1008614b2b7da5546016ea6.tar.xz third_party-cobbler-97a4085adb0d83efd1008614b2b7da5546016ea6.zip |
Working on adding a "cobbler buildiso" command to generate non-live CD's. Menu does not work yet, but getting there.
Also made registration check for duplicate macs, but needs testing.
Diffstat (limited to 'cobbler/modules')
-rw-r--r-- | cobbler/modules/cli_misc.py | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/cobbler/modules/cli_misc.py b/cobbler/modules/cli_misc.py index af2f6b2..6ca14a2 100644 --- a/cobbler/modules/cli_misc.py +++ b/cobbler/modules/cli_misc.py @@ -184,11 +184,6 @@ class ReportFunction(commands.CobblerFunction): self.reporting_print_sorted(self.api.repos()) return True -## FIXME: add legacy command translator to keep things simple -## cobbler system report foo --> cobbler report --what=systems --name=foo -## cobbler system report --> cobbler report --what=systems -## ditto for "cobbler list" - ######################################################## class StatusFunction(commands.CobblerFunction): @@ -245,6 +240,28 @@ class ValidateKsFunction(commands.CobblerFunction): return self.api.validateks() ######################################################## + +class BuildIsoFunction(commands.CobblerFunction): + + def add_options(self,p,args): + p.add_option("--iso", dest="isoname", help="(OPTIONAL) output ISO to this path") + p.add_option("--profiles", dest="profiles", help="(OPTIONAL) use these profiles only") + p.add_option("--tempdir", dest="tempdir", help="(OPTIONAL) working directory") + + def help_me(self): + return HELP_FORMAT % ("cobbler buildiso","") + + def command_name(self): + return "buildiso" + + def run(self): + return self.api.build_iso( + iso=self.options.isoname, + profiles=self.options.profiles, + tempdir=self.options.tempdir + ) + +######################################################## # MODULE HOOKS def register(): @@ -255,6 +272,7 @@ def register(): def cli_functions(api): return [ + BuildIsoFunction(api), CheckFunction(api), ImportFunction(api), ReserializeFunction(api), ListFunction(api), ReportFunction(api), StatusFunction(api), SyncFunction(api), RepoSyncFunction(api), ValidateKsFunction(api) |