ListResounces will only return the nodes a sliver has allocated
authorTony Mack <tmack@paris.CS.Princeton.EDU>
Tue, 27 Sep 2011 00:48:03 +0000 (20:48 -0400)
committerTony Mack <tmack@paris.CS.Princeton.EDU>
Tue, 27 Sep 2011 00:48:03 +0000 (20:48 -0400)
sfa/plc/aggregate.py

index 8f6335f..ef4705b 100644 (file)
@@ -105,10 +105,13 @@ class Aggregate:
             # only doing this becuase protogeni rspec needs
             # to advertise available initscripts 
             node['pl_initscripts'] = self.pl_initscripts
-            if not node['slice_ids_whitelist']:
+
+            if slice and node['node_id'] in slice['node_ids']:
                 valid_nodes.append(node)
             elif slice and slice['slice_id'] in node['slice_ids_whitelist']:
                 valid_nodes.append(node)
+            elif not slice and not node['slice_ids_whitelist']:
+                valid_nodes.append(node)
     
         rspec.add_nodes(valid_nodes)
         rspec.add_interfaces(self.interfaces.values())