summaryrefslogtreecommitdiffstats
path: root/cobbler/modules/cli_misc.py
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@redhat.com>2008-06-06 15:47:56 -0400
committerMichael DeHaan <mdehaan@redhat.com>2008-06-06 15:47:56 -0400
commitfcc1a69fd9e3507d6367495b4fb99624275ff36d (patch)
treeb9217ebad79b189e190efcea6c8b98ff1cc949cd /cobbler/modules/cli_misc.py
parent8d9b2573b1c1bd22b46bce4e34f5ee26e74210d0 (diff)
downloadcobbler-fcc1a69fd9e3507d6367495b4fb99624275ff36d.tar.gz
cobbler-fcc1a69fd9e3507d6367495b4fb99624275ff36d.tar.xz
cobbler-fcc1a69fd9e3507d6367495b4fb99624275ff36d.zip
cobbler aclsetup feature
Diffstat (limited to 'cobbler/modules/cli_misc.py')
-rw-r--r--cobbler/modules/cli_misc.py25
1 files changed, 24 insertions, 1 deletions
diff --git a/cobbler/modules/cli_misc.py b/cobbler/modules/cli_misc.py
index c72b11d9..35a6e49b 100644
--- a/cobbler/modules/cli_misc.py
+++ b/cobbler/modules/cli_misc.py
@@ -277,6 +277,29 @@ class ReplicateFunction(commands.CobblerFunction):
def run(self):
return self.api.replicate(cobbler_master = self.options.master)
+########################################################
+
+class AclFunction(commands.CobblerFunction):
+
+ def help_me(self):
+ return HELP_FORMAT % ("cobbler aclsetup","[ARGS|--help]")
+
+ def command_name(self):
+ return "aclsetup"
+
+ def add_options(self, p, args):
+ p.add_option("--adduser", dest="adduser", help="give acls to this user")
+ p.add_option("--addgroup", dest="addgroup", help="give acls to this group")
+ p.add_option("--removeuser", dest="removeuser", help="remove acls from this user")
+ p.add_option("--removegroup", dest="removegroup", help="remove acls from this group")
+
+ def run(self):
+ return self.api.acl_config(
+ self.options.adduser,
+ self.options.addgroup,
+ self.options.removeuser,
+ self.options.removegroup
+ )
########################################################
@@ -294,7 +317,7 @@ def cli_functions(api):
CheckFunction(api), ImportFunction(api), ReserializeFunction(api),
ListFunction(api), ReportFunction(api), StatusFunction(api),
SyncFunction(api), RepoSyncFunction(api), ValidateKsFunction(api),
- ReplicateFunction(api)
+ ReplicateFunction(api), AclFunction(api)
]
return []