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:
f9abd41
)
- call GetNodes
author
Tony Mack
<tmack@cs.princeton.edu>
Tue, 16 Jan 2007 23:03:21 +0000
(23:03 +0000)
committer
Tony Mack
<tmack@cs.princeton.edu>
Tue, 16 Jan 2007 23:03:21 +0000
(23:03 +0000)
PLC/Methods/SliceNodesList.py
patch
|
blob
|
history
diff --git
a/PLC/Methods/SliceNodesList.py
b/PLC/Methods/SliceNodesList.py
index
fd61b65
..
0c44f66
100644
(file)
--- a/
PLC/Methods/SliceNodesList.py
+++ b/
PLC/Methods/SliceNodesList.py
@@
-5,10
+5,11
@@
from PLC.Auth import Auth
from PLC.Slices import Slice, Slices
from PLC.Nodes import Node, Nodes
from PLC.Methods.GetSlices import GetSlices
from PLC.Slices import Slice, Slices
from PLC.Nodes import Node, Nodes
from PLC.Methods.GetSlices import GetSlices
+from PLC.Methods.GetNodes import GetNodes
-class SliceNodesList(GetSlices):
+class SliceNodesList(GetSlices
, GetNodes
):
"""
"""
- Deprecated. Can be implemented with GetSlices.
+ Deprecated. Can be implemented with GetSlices
and GetNodes
.
"""
"""
@@
-26,8
+27,11
@@
class SliceNodesList(GetSlices):
def call(self, auth, slice_name):
slices = GetSlices.call(self, auth, [slice_name])
def call(self, auth, slice_name):
slices = GetSlices.call(self, auth, [slice_name])
+ if not slices:
+ return []
+
slice = slices[0]
slice = slices[0]
- nodes =
Nodes(self.api
, slice['node_ids'])
+ nodes =
GetNodes.call(self, auth
, slice['node_ids'])
if not nodes:
return []
if not nodes:
return []