From c5e5127b4991493cd9cd9674664e957d8ffecad2 Mon Sep 17 00:00:00 2001 From: Stephen Soltesz Date: Fri, 15 May 2009 19:48:00 +0000 Subject: [PATCH] more convenience functions to create an api interface as a user or node. --- monitor/wrapper/plc.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/monitor/wrapper/plc.py b/monitor/wrapper/plc.py index 8f70c1f..6dc5a28 100644 --- a/monitor/wrapper/plc.py +++ b/monitor/wrapper/plc.py @@ -146,6 +146,13 @@ def getAuthAPI(): def getCachedAuthAPI(): return CachedPLC(auth.auth, auth.server) +def getSessionAPI(session, server): + nodeauth = Auth(session=session) + return PLC(nodeauth.auth, server) +def getUserAPI(username, password, server): + auth = Auth(username,password) + return PLC(auth.auth, server) + def getTechEmails(loginbase): """ For the given site, return all user email addresses that have the 'tech' role. -- 2.43.0