put attribute tag (that carries PL node tag) into planetlab namespace
authorMohamed Larabi <mohamed.larabi@inria.fr>
Wed, 18 Sep 2013 18:08:05 +0000 (20:08 +0200)
committerMohamed Larabi <mohamed.larabi@inria.fr>
Wed, 18 Sep 2013 18:11:38 +0000 (20:11 +0200)
sfa/rspecs/elements/versions/pgv2Node.py

index 5db9ba9..45bbfe3 100644 (file)
@@ -69,7 +69,7 @@ class PGv2Node:
             if tags:
                for tag in tags:
                     tag['name'] = tag.pop('tagname')
-                    node_elem.add_instance('attribute', tag, ['name', 'value'])
+                    node_elem.add_instance('{%s}attribute' % xml.namespaces['planetlab'], tag, ['name', 'value'])
 
         return node_elems
 
@@ -127,7 +127,7 @@ class PGv2Node:
                     node['boot_state'] = 'disabled' 
 
             # get node tags
-            tag_elems = node_elem.xpath('./default:attribute | ./attribute')
+            tag_elems = node_elem.xpath('./planetlab:attribute | ./attribute')
             node['tags'] = []
             if len(tag_elems) > 0:
                 for tag_elem in tag_elems: