From: Sapan Bhatia Date: Sat, 14 Nov 2009 01:17:48 +0000 (+0000) Subject: (no commit message) X-Git-Tag: sfa-0.9-6~8 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=a4163b17b8d6eee02458b170ca1a080fc336bba9;p=sfa.git --- diff --git a/sfa/plc/nodes.py b/sfa/plc/nodes.py index 96eb84b1..6d3ce7c0 100644 --- a/sfa/plc/nodes.py +++ b/sfa/plc/nodes.py @@ -175,6 +175,7 @@ class Nodes(SimpleStorage): Get resource information from PLC """ + slicename = None # Get the required nodes if not hrn: nodes = self.api.plshell.GetNodes(self.api.plauth, {'peer_id': None}) @@ -192,7 +193,10 @@ class Nodes(SimpleStorage): # Filter out whitelisted nodes public_nodes = lambda n: n.has_key('slice_ids_whitelist') and not n['slice_ids_whitelist'] - nodes = filter(public_nodes, nodes) + + # ...only if they are not already assigned to this slice. + if (slicename): + nodes = filter(public_nodes, nodes) # Get all network interfaces interface_ids = []