Merge branch 'geni-v2' of ssh://larabi@git.onelab.eu/git/sfa.git into geni-v2
authorMohamed Larabi <mohamed.larabi@inria.fr>
Thu, 1 Aug 2013 12:32:31 +0000 (14:32 +0200)
committerMohamed Larabi <mohamed.larabi@inria.fr>
Thu, 1 Aug 2013 12:32:31 +0000 (14:32 +0200)
1  2 
sfa/rspecs/elements/versions/iotlabv1Node.py

@@@ -1,7 -1,11 +1,11 @@@
+ """
+ This file describes what the propreties of an iotlab nodes are, if an iotlab
+ rspec is asked. If additionnal node properties have to be defined and exposed
+ to the user, it should be done here.
+ """
  from sfa.util.xrn import Xrn
  from sfa.util.xml import XpathFilter
 -from sfa.rspecs.elements.node import Node
 +from sfa.rspecs.elements.node import NodeElement
  from sfa.rspecs.elements.sliver import Sliver
  from sfa.rspecs.elements.location import Location
  from sfa.rspecs.elements.hardware_type import HardwareType
@@@ -157,9 -216,23 +216,23 @@@ class Iotlabv1Node
  
      @staticmethod
      def get_node_objs(node_elems):
+         """
+         Get information on the nodes on the xml. Gets the attributes in the
+         Rspec.
+         :param node_elems: xml node elements
+         :type node_elems: xml xpath return type
+         :returns: a list of nodes where a sliver is defined with their
+             properties
+         :rtype: list of dict
+         .. seealso:: get_nodes_with_slivers, get_nodes
+         """
          nodes = []
          for node_elem in node_elems:
 -            node = Node(node_elem.attrib, node_elem)
 +            node = NodeElement(node_elem.attrib, node_elem)
              nodes.append(node)
              if 'component_id' in node_elem.attrib:
                  node['authority_id'] = \