Add the exclusive tag to nitos nodes in order to show that they are reservables and...
[sfa.git] / sfa / rspecs / elements / versions / nitosv1Node.py
index 2d45d0a..0154214 100644 (file)
@@ -16,7 +16,6 @@ from sfa.rspecs.elements.versions.nitosv1Sliver import NITOSv1Sliver
 from sfa.rspecs.elements.versions.nitosv1PLTag import NITOSv1PLTag
 from sfa.rspecs.elements.versions.pgv2Services import PGv2Services
 
-from sfa.nitos.nitosxrn import xrn_to_hostname
 
 class NITOSv1Node:
 
@@ -44,7 +43,7 @@ class NITOSv1Node:
 
             # set component_name attribute and  hostname element
             if 'component_id' in node and node['component_id']:
-                component_name = xrn_to_hostname(node['component_id'])
+                component_name = Xrn(xrn=node['component_id']).get_leaf()
                 node_elem.set('component_name', component_name)
                 hostname_elem = node_elem.add_element('hostname')
                 hostname_elem.set_text(component_name)
@@ -63,6 +62,9 @@ class NITOSv1Node:
             if position_3d:
                 node_elem.add_instance('position_3d', position_3d, Position3D.fields)
 
+            # all nitos nodes are exculsive
+            exclusive_elem = node_elem.add_element('exclusive')
+            exclusive_elem.set_text('TRUE')
 
             # add granularity of the reservation system
             granularity = node.get('granularity')['grain']