From: Mohamed Larabi Date: Thu, 1 Aug 2013 12:32:31 +0000 (+0200) Subject: Merge branch 'geni-v2' of ssh://larabi@git.onelab.eu/git/sfa.git into geni-v2 X-Git-Tag: sfa-2.1-27~35^2~1 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=5fa43ca7cb4ba506640d860c1028eae4778d4e30;p=sfa.git Merge branch 'geni-v2' of ssh://larabi@git.onelab.eu/git/sfa.git into geni-v2 --- 5fa43ca7cb4ba506640d860c1028eae4778d4e30 diff --cc sfa/rspecs/elements/versions/iotlabv1Node.py index 8681108c,af3d0d4c..392c48f3 --- a/sfa/rspecs/elements/versions/iotlabv1Node.py +++ b/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'] = \