git://git.onelab.eu
/
sfa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rspec.version.add_nodes take an extra arg to handle Request RSpec
[sfa.git]
/
sfa
/
rspecs
/
elements
/
versions
/
pgv2Node.py
diff --git
a/sfa/rspecs/elements/versions/pgv2Node.py
b/sfa/rspecs/elements/versions/pgv2Node.py
index
ee69f03
..
0a694ad
100644
(file)
--- a/
sfa/rspecs/elements/versions/pgv2Node.py
+++ b/
sfa/rspecs/elements/versions/pgv2Node.py
@@
-19,7
+19,7
@@
from sfa.rspecs.elements.attribute import Attribute
class PGv2Node:
@staticmethod
class PGv2Node:
@staticmethod
- def add_nodes(xml, nodes):
+ def add_nodes(xml, nodes
, rspec_content_type=None
):
node_elems = []
for node in nodes:
node_fields = ['component_manager_id', 'component_id', 'client_id', 'sliver_id', 'exclusive']
node_elems = []
for node in nodes:
node_fields = ['component_manager_id', 'component_id', 'client_id', 'sliver_id', 'exclusive']
@@
-70,6
+70,10
@@
class PGv2Node:
tag['name'] = tag.pop('tagname')
node_elem.add_instance('{%s}attribute' % xml.namespaces['planetlab'], tag, ['name', 'value'])
tag['name'] = tag.pop('tagname')
node_elem.add_instance('{%s}attribute' % xml.namespaces['planetlab'], tag, ['name', 'value'])
+ # add sliver tag in Request Rspec
+ if rspec_content_type == "request":
+ node_elem.add_instance('sliver', '', [])
+
return node_elems
return node_elems