rspec.version.add_nodes take an extra arg to handle Request RSpec
[sfa.git] / sfa / rspecs / elements / versions / iotlabv1Node.py
index 4abfdf2..df3dc6c 100644 (file)
@@ -54,7 +54,21 @@ class Iotlabv1Node:
 
 
     @staticmethod
-    def add_nodes(xml, nodes):
+    def add_nodes(xml, nodes, rspec_content_type=None):
+        """Adds the nodes to the xml.
+
+        Adds the nodes as well as dedicated iotlab fields to the node xml
+        element.
+
+        :param xml: the xml being constructed.
+        :type xml: xml
+        :param nodes: list of node dict
+        :type nodes: list
+        :returns: a list of node elements.
+        :rtype: list
+
+        """
+>>>>>>> f7d277c... rspec.version.add_nodes take an extra arg to handle Request RSpec
         #Add network item in the xml
         network_elems = xml.xpath('//network')
         if len(network_elems) > 0:
@@ -134,6 +148,11 @@ class Iotlabv1Node:
                                                     #'value': initscript['name']})
 
                     Iotlabv1Sliver.add_slivers(node_elem, slivers)
+            
+            # add sliver tag in Request Rspec
+            if rspec_content_type == "request":
+                node_elem.add_instance('sliver', '', [])
+
         return node_elems