pl: set exclusive property in RSpec according to node type
authorMohamed Larabi <mohamed.larabi@inria.fr>
Wed, 29 May 2013 13:52:54 +0000 (15:52 +0200)
committerMohamed Larabi <mohamed.larabi@inria.fr>
Wed, 29 May 2013 13:52:54 +0000 (15:52 +0200)
sfa/planetlab/plaggregate.py

index d85043e..fc4bb49 100644 (file)
@@ -203,7 +203,13 @@ class PlAggregate:
             rspec_node['available'] = 'true'
         else:
             rspec_node['available'] = 'false'
-        rspec_node['exclusive'] = 'false'
+
+        #distinguish between Shared and Reservable nodes
+        if node['node_type'] == 'reservable':
+            rspec_node['exclusive'] = 'true'
+        else:
+            rspec_node['exclusive'] = 'false'
+
         rspec_node['hardware_types'] = [HardwareType({'name': 'plab-pc'}),
                                         HardwareType({'name': 'pc'})]
         # only doing this because protogeni rspec needs