summaryrefslogtreecommitdiffstats
path: root/cobbler/modules/cli_distro.py
diff options
context:
space:
mode:
Diffstat (limited to 'cobbler/modules/cli_distro.py')
-rw-r--r--cobbler/modules/cli_distro.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/cobbler/modules/cli_distro.py b/cobbler/modules/cli_distro.py
index 35f5a4b..8c7b70f 100644
--- a/cobbler/modules/cli_distro.py
+++ b/cobbler/modules/cli_distro.py
@@ -40,6 +40,9 @@ class DistroFunction(commands.CobblerFunction):
if not self.matches_args(args,["remove","report","list"]):
p.add_option("--arch", dest="arch", help="ex: x86, x86_64, ia64")
p.add_option("--breed", dest="breed", help="ex: redhat, debian, suse")
+ if self.matches_args(args,["add"]):
+ p.add_option("--clobber", dest="clobber", help="allow add to overwrite existing objects", action="store_true")
+ if not self.matches_args(args,["remove","report","list"]):
p.add_option("--initrd", dest="initrd", help="absolute path to initrd.img (REQUIRED)")
p.add_option("--kernel", dest="kernel", help="absolute path to vmlinuz (REQUIRED)")
p.add_option("--kopts", dest="kopts", help="ex: 'noipv6'")
@@ -47,12 +50,16 @@ class DistroFunction(commands.CobblerFunction):
p.add_option("--name", dest="name", help="ex: 'RHEL-5-i386' (REQUIRED)")
+
+
if self.matches_args(args,["copy","rename"]):
p.add_option("--newname", dest="newname", help="for copy/rename commands")
if not self.matches_args(args,["remove","report","list"]):
p.add_option("--no-sync", action="store_true", dest="nosync", help="suppress sync for speed")
if not self.matches_args(args,["report","list"]):
p.add_option("--no-triggers", action="store_true", dest="notriggers", help="suppress trigger execution")
+ if not self.matches_args(args,["remove","report","list"]):
+ p.add_option("--owners", dest="owners", help="specify owners for authz_ownership module")
if self.matches_args(args,["remove"]):
p.add_option("--recursive", action="store_true", dest="recursive", help="also delete child objects")
@@ -73,6 +80,8 @@ class DistroFunction(commands.CobblerFunction):
obj.set_ksmeta(self.options.ksmeta)
if self.options.breed:
obj.set_breed(self.options.breed)
+ if self.options.owners:
+ obj.set_owners(self.options.owners)
return self.object_manipulator_finish(obj, self.api.distros, self.options)