-
+ """
+ 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
@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'] = \