git://git.onelab.eu
/
plcapi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
052eae1
)
fix bug that happen when node is the caller
author
Tony Mack
<tmack@cs.princeton.edu>
Fri, 11 Jan 2008 18:12:53 +0000
(18:12 +0000)
committer
Tony Mack
<tmack@cs.princeton.edu>
Fri, 11 Jan 2008 18:12:53 +0000
(18:12 +0000)
PLC/Methods/GetNodes.py
patch
|
blob
|
history
diff --git
a/PLC/Methods/GetNodes.py
b/PLC/Methods/GetNodes.py
index
8e2931a
..
f4b577d
100644
(file)
--- a/
PLC/Methods/GetNodes.py
+++ b/
PLC/Methods/GetNodes.py
@@
-49,9
+49,13
@@
class GetNodes(Method):
'admin' not in self.caller['roles']:
slice_ids = set()
site_ids = set()
+
if self.caller:
slice_ids.update(self.caller['slice_ids'])
- site_ids.update(self.caller['site_ids'])
+ if isinstance(self.caller, Node):
+ site_ids.update([self.caller['site_id']])
+ else:
+ site_ids.update(self.caller['site_ids'])
# if node has whitelist, only return it if users is at
# the same site or user has a slice on the whitelist