From: Jordan Augé Date: Tue, 24 Sep 2013 13:47:39 +0000 (+0200) Subject: rspecs/iotlab: fixed missing position element during RSpec parsing X-Git-Tag: sfa-3.0-2~22 X-Git-Url: http://git.onelab.eu/?p=sfa.git;a=commitdiff_plain;h=1031a9aec6d988b04b379e02d36374f141337963 rspecs/iotlab: fixed missing position element during RSpec parsing --- diff --git a/sfa/rspecs/elements/versions/iotlabv1Node.py b/sfa/rspecs/elements/versions/iotlabv1Node.py index 9ad13419..4abfdf29 100644 --- a/sfa/rspecs/elements/versions/iotlabv1Node.py +++ b/sfa/rspecs/elements/versions/iotlabv1Node.py @@ -184,6 +184,12 @@ class Iotlabv1Node: node['interfaces'] = [iface_elem.get_instance(Interface) \ for iface_elem in iface_elems] + # get position + position_elems = node_elem.xpath('./default:position | ./position') + if position_elems: + position_elem = position_elems[0] + node['position'] = position_elem.get_instance(IotlabPosition) + # get services #node['services'] = PGv2Services.get_services(node_elem)