From: Nicolas Turro Date: Wed, 28 Mar 2012 14:08:55 +0000 (+0200) Subject: In get_nodes_and_links function, the 'boot_state' tag of node in a rspec is set to... X-Git-Tag: sfa-2.1-24~3^2~190 X-Git-Url: http://git.onelab.eu/?p=sfa.git;a=commitdiff_plain;h=ace4a403aeda781941545208b3c961a7bd702fe4 In get_nodes_and_links function, the 'boot_state' tag of node in a rspec is set to 'Reserved' if the node is involved in a running oar job. NT --- diff --git a/sfa/senslab/slabaggregate.py b/sfa/senslab/slabaggregate.py index 7063f664..7737aabc 100644 --- a/sfa/senslab/slabaggregate.py +++ b/sfa/senslab/slabaggregate.py @@ -190,7 +190,7 @@ class SlabAggregate: #node_tags = self.get_node_tags(tags_filter) #links = self.get_links(sites_dict, nodes_dict, interfaces) - + reserved_nodes=self.driver.GetReservedNodes() rspec_nodes = [] for node in nodes: # skip whitelisted nodes @@ -209,6 +209,8 @@ class SlabAggregate: # do not include boot state ( element) in the manifest rspec if not slice: rspec_node['boot_state'] = node['boot_state'] + if node['hostname'] in reserved_nodes: + rspec_node['boot_state'] = "Reserved" rspec_node['exclusive'] = 'true' rspec_node['hardware_types'] = [HardwareType({'name': 'slab-sensor'})] # only doing this because protogeni rspec needs