class IotlabPosition(Element):
- fields = ['posx', 'posy','posz']
+ fields = ['x', 'y','z']
class IotlabLocation(Location):
fields = list(Location.fields)
network_elem.set('login', unicode(iotlab_network_dict['login']))
@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
#'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
@staticmethod
- def get_nodes(xml, filter={}):
+ def get_nodes(xml, filter=None):
+ if filter is None: filter={}
xpath = '//node%s | //default:node%s' % (XpathFilter.xpath(filter), \
XpathFilter.xpath(filter))
node_elems = xml.xpath(xpath)
return Iotlabv1Node.get_node_objs(node_elems)
@staticmethod
- def get_nodes_with_slivers(xml, sliver_filter={}):
+ def get_nodes_with_slivers(xml, sliver_filter=None):
+ if sliver_filter is None: sliver_filter={}
xpath = '//node[count(sliver)>0] | \
//default:node[count(default:sliver) > 0]'