diff options
author | Michael DeHaan <mdehaan@redhat.com> | 2008-03-26 16:02:48 -0400 |
---|---|---|
committer | Michael DeHaan <mdehaan@redhat.com> | 2008-03-26 16:02:48 -0400 |
commit | 602591cae12323012693f49de3ba59516b40c3f5 (patch) | |
tree | f24231c3cb9badc6809f57b5de1d2080688a5aac /cobbler/modules/cli_distro.py | |
parent | a6a82750ac3cab01fbafdd689a7ea1f5f6dc0bf7 (diff) | |
download | third_party-cobbler-602591cae12323012693f49de3ba59516b40c3f5.tar.gz third_party-cobbler-602591cae12323012693f49de3ba59516b40c3f5.tar.xz third_party-cobbler-602591cae12323012693f49de3ba59516b40c3f5.zip |
Add a --owner to all the objects, plus associated API calls and backend stuff, for use with the (pending real soon now)
authz_ownership module. Also updated docs. Incidentally, self.settings.tftpboot is now utils.tftpboot_location() --
which is required because tftpboot moves around. Previously this was masked to still look like a settings variable
but I decided to remove the hack. All code using that location has been updated appropriately.
Diffstat (limited to 'cobbler/modules/cli_distro.py')
-rw-r--r-- | cobbler/modules/cli_distro.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cobbler/modules/cli_distro.py b/cobbler/modules/cli_distro.py index 35f5a4b..9e0637f 100644 --- a/cobbler/modules/cli_distro.py +++ b/cobbler/modules/cli_distro.py @@ -47,12 +47,15 @@ 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 +76,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) |