git://git.onelab.eu
/
sfa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a617e32
)
remove debugging output. also, we no loger use sa and ma types
author
Tony Mack
<tmack@cs.princeton.edu>
Fri, 11 Sep 2009 20:15:26 +0000
(20:15 +0000)
committer
Tony Mack
<tmack@cs.princeton.edu>
Fri, 11 Sep 2009 20:15:26 +0000
(20:15 +0000)
sfa/plc/api.py
patch
|
blob
|
history
diff --git
a/sfa/plc/api.py
b/sfa/plc/api.py
index
1eda00c
..
cf311e2
100644
(file)
--- a/
sfa/plc/api.py
+++ b/
sfa/plc/api.py
@@
-128,14
+128,15
@@
class GeniAPI:
'AuthMethod': 'password',
'AuthString': self.config.SFA_PLC_PASSWORD}
try:
'AuthMethod': 'password',
'AuthString': self.config.SFA_PLC_PASSWORD}
try:
+ self.plshell_type = 'direct'
import PLC.Shell
shell = PLC.Shell.Shell(globals = globals())
shell.AuthCheck(self.plauth)
return shell
except ImportError:
import PLC.Shell
shell = PLC.Shell.Shell(globals = globals())
shell.AuthCheck(self.plauth)
return shell
except ImportError:
+ self.plshell_type = 'xmlrpc'
# connect via xmlrpc
url = self.config.SFA_PLC_URL
# connect via xmlrpc
url = self.config.SFA_PLC_URL
-
shell = xmlrpclib.Server(url, verbose = 0, allow_none = True)
shell.AuthCheck(self.plauth)
return shell
shell = xmlrpclib.Server(url, verbose = 0, allow_none = True)
shell.AuthCheck(self.plauth)
return shell
@@
-309,7
+310,7
@@
class GeniAPI:
record.update({})
return
record.update({})
return
- if (type in ["authority"
, "sa", "ma"
]):
+ if (type in ["authority"]):
pl_res = self.plshell.GetSites(self.plauth, [pointer])
elif (type == "slice"):
pl_res = self.plshell.GetSlices(self.plauth, [pointer])
pl_res = self.plshell.GetSites(self.plauth, [pointer])
elif (type == "slice"):
pl_res = self.plshell.GetSlices(self.plauth, [pointer])
@@
-450,13
+451,11
@@
class GeniAPI:
# add people who are in the new list, but not the oldList
for personId in newIdList:
if not (personId in oldIdList):
# add people who are in the new list, but not the oldList
for personId in newIdList:
if not (personId in oldIdList):
- print "adding id", personId, "to", record.get_name()
addFunc(self.plauth, personId, containerId)
# remove people who are in the old list, but not the new list
for personId in oldIdList:
if not (personId in newIdList):
addFunc(self.plauth, personId, containerId)
# remove people who are in the old list, but not the new list
for personId in oldIdList:
if not (personId in newIdList):
- print "removing id", personId, "from", record.get_name()
delFunc(self.plauth, personId, containerId)
def update_membership(self, oldRecord, record):
delFunc(self.plauth, personId, containerId)
def update_membership(self, oldRecord, record):