X-Git-Url: http://git.onelab.eu/?p=monitor.git;a=blobdiff_plain;f=monitor%2Fwrapper%2Fplc.py;h=6dc5a286dfee30692415ec0575e5da00a3d63ab9;hp=8f70c1f6c0bf654e9a8e0daa0dd3649d69f272b7;hb=c5e5127b4991493cd9cd9674664e957d8ffecad2;hpb=9b360f2de6da94fbc492b48ae0277892bddf7aa9 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.