From a4163b17b8d6eee02458b170ca1a080fc336bba9 Mon Sep 17 00:00:00 2001 From: Sapan Bhatia Date: Sat, 14 Nov 2009 01:17:48 +0000 Subject: [PATCH] --- sfa/plc/nodes.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 = [] -- 2.47.0