From 1df10a88cd8b36be8b9b4d47c49dd9e7d1d12bc0 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Mon, 26 Jul 2010 17:54:38 -0400 Subject: Add support for client failover to the ipa command-line. This adds a new global option to the ipa command, -f/--no-fallback. If this is included then just the server configured in /etc/ipa/default.conf is used. Otherwise that is tried first then all servers in DNS with the ldap SRV record are tried. Create a new Local() Command class for local-only commands. The help command is one of these. It shouldn't need a remote connection to execute. ticket #15 --- ipalib/frontend.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'ipalib/frontend.py') diff --git a/ipalib/frontend.py b/ipalib/frontend.py index 1c4fea8cb..e505f5354 100644 --- a/ipalib/frontend.py +++ b/ipalib/frontend.py @@ -930,6 +930,21 @@ class LocalOrRemote(Command): return self.execute(*args, **options) +class Local(Command): + """ + A command that is explicitly executed locally. + + This is for commands that makes sense to execute only locally + such as the help command. + """ + + def run(self, *args, **options): + """ + Dispatch to forward() onlly. + """ + return self.forward(*args, **options) + + class Object(HasParam): backend = None methods = None -- cgit