(no commit message)
authorSapan Bhatia <sapanb@cs.princeton.edu>
Sat, 14 Nov 2009 01:17:48 +0000 (01:17 +0000)
committerSapan Bhatia <sapanb@cs.princeton.edu>
Sat, 14 Nov 2009 01:17:48 +0000 (01:17 +0000)
sfa/plc/nodes.py

index 96eb84b..6d3ce7c 100644 (file)
@@ -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 = []