[luci] validate_cluster_prop: fix trailing white-spaces
by Jan Pokorný
commit 036c77b81d56372b4dfac250fe38f22c7f3c97fb
Author: Jan Pokorný <jpokorny(a)redhat.com>
Date: Fri Apr 6 17:18:37 2012 +0200
validate_cluster_prop: fix trailing white-spaces
Signed-off-by: Jan Pokorný <jpokorny(a)redhat.com>
luci/validation/validate_cluster_prop.py | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/luci/validation/validate_cluster_prop.py b/luci/validation/validate_cluster_prop.py
index e79dd59..dead3bb 100644
--- a/luci/validation/validate_cluster_prop.py
+++ b/luci/validation/validate_cluster_prop.py
@@ -14,7 +14,7 @@ from luci.lib.ClusterConf.Heuristic import Heuristic
from luci.lib.ClusterConf.Method import Method
from luci.lib.ClusterConf.Logging import Logging
from luci.lib.ClusterConf.LoggingDaemon import LoggingDaemon
-from luci.lib.ClusterConf.Altname import Altname
+from luci.lib.ClusterConf.Altname import Altname
from luci.lib.db_helpers import create_cluster_obj, get_node_by_name, get_cluster_db_obj, create_user_db_obj
from luci.lib.ricci_communicator import RicciCommunicator
@@ -164,7 +164,7 @@ def validate_add_existing(**kw):
ricci_host = kw.get('node%d_riccihost' % i)
if not ricci_host:
- ricci_host = nodename
+ ricci_host = nodename
ricci_port = kw.get('node%d_port' % i)
if not ricci_port:
@@ -850,7 +850,7 @@ def validate_rm_config(model, **kw):
rm.delTransitionThrottling()
rm.setCentralProcessing(kw.get('central_processing') is not None)
-
+
return (len(errors) < 1, {'errors': errors})
def validate_dlm_config(model, **kw):
@@ -913,7 +913,7 @@ def validate_dlm_config(model, **kw):
dlm.setPlockOwnership(kw.get('plock_ownership') is not None)
dlm.setPlockDebug(kw.get('plock_debug') is not None)
dlm.setPlockRateLimit(kw.get('plock_rate_limit') is not None)
-
+
return (len(errors) < 1, {'errors': errors})
def validate_gfscontrold_config(model, **kw):
12 years, 1 month
[luci] drop monkey-patched support for repoze.who < 1.0.14
by Jan Pokorný
commit 6bd630c882f534e3439a82a346e1652d5c2221cc
Author: Jan Pokorný <jpokorny(a)redhat.com>
Date: Tue Apr 3 16:04:50 2012 +0200
drop monkey-patched support for repoze.who < 1.0.14
Signed-off-by: Jan Pokorný <jpokorny(a)redhat.com>
input_files/config.tmpl/config.tmpl.in | 2 +-
luci/initwrappers.py | 34 --------------------------------
2 files changed, 1 insertions(+), 35 deletions(-)
---
diff --git a/input_files/config.tmpl/config.tmpl.in b/input_files/config.tmpl/config.tmpl.in
index 5ed192f..2717ee7 100644
--- a/input_files/config.tmpl/config.tmpl.in
+++ b/input_files/config.tmpl/config.tmpl.in
@@ -190,7 +190,7 @@ post_login_url = /post_login
post_logout_url = /post_logout
[plugin:auth_tkt]
-use = @PKGNAME@.initwrappers:auth_tkt_make_plugin
+use = repoze.who.plugins.auth_tkt:make_plugin
secret = ${app_instance_secret}
timeout = %(who.auth_tkt_timeout)s
reissue_time = 60
diff --git a/luci/initwrappers.py b/luci/initwrappers.py
index 2f58cf1..a75aa46 100644
--- a/luci/initwrappers.py
+++ b/luci/initwrappers.py
@@ -74,37 +74,3 @@ def repoze_who_make_middleware_with_config(app,
)
return app
-
-
-# This is a workaround for problem, that repoze.who < 1.0.14 cannot handle
-# "timeout" and "reissue_time" (+ "userid_checker") parameters when passed
-# into make_plugin function of repoze.who.plugins.auth_tkt.
-#
-# The only remaining problem is that the session will not timeout after some
-# time of inactivity in case of repoze.who < 1.0.14.
-def auth_tkt_make_plugin(secret=None,
- secretfile=None,
- cookie_name='auth_tkt',
- secure=False,
- include_ip=False,
- timeout=None,
- reissue_time=None,
- userid_checker=None):
- # We can presume that this package and function exist (see setup.py).
- from repoze.who.plugins.auth_tkt import make_plugin
- try:
- return make_plugin(secret=secret,
- secretfile=secretfile,
- cookie_name=cookie_name,
- secure=secure,
- include_ip=include_ip,
- timeout=timeout,
- reissue_time=reissue_time,
- userid_checker=userid_checker)
- except TypeError:
- # Workaround for repoze.who < 1.0.14 case.
- return make_plugin(secret=secret,
- secretfile=secretfile,
- cookie_name=cookie_name,
- secure=secure,
- include_ip=include_ip)
12 years, 1 month