git://git.onelab.eu
/
sfa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
13c0919
)
fix xpath queries
author
Tony Mack
<tmack@paris.CS.Princeton.EDU>
Mon, 2 May 2011 20:28:37 +0000
(16:28 -0400)
committer
Tony Mack
<tmack@paris.CS.Princeton.EDU>
Mon, 2 May 2011 20:28:37 +0000
(16:28 -0400)
sfa/rspecs/pg_rspec.py
patch
|
blob
|
history
diff --git
a/sfa/rspecs/pg_rspec.py
b/sfa/rspecs/pg_rspec.py
index
a9cf102
..
109c2cf
100755
(executable)
--- a/
sfa/rspecs/pg_rspec.py
+++ b/
sfa/rspecs/pg_rspec.py
@@
-26,7
+26,7
@@
class PGRSpec(RSpec):
return network
def get_networks(self):
return network
def get_networks(self):
- networks = self.xml.xpath('//rspecv2:node[@component_manager_uuid]/@component_manager_uuid')
+ networks = self.xml.xpath('//rspecv2:node[@component_manager_uuid]/@component_manager_uuid'
, namespaces=self.namespaces
)
return set(networks)
def get_node_elements(self):
return set(networks)
def get_node_elements(self):
@@
-38,9
+38,9
@@
class PGRSpec(RSpec):
def get_nodes_with_slivers(self, network=None):
if network:
def get_nodes_with_slivers(self, network=None):
if network:
- return self.xml.xpath('//
node[@component_manager_uu
id="%s"][sliver_type]/@component_name' % network, namespaces=self.namespaces)
+ return self.xml.xpath('//
rspecv2:node[@component_manager_
id="%s"][sliver_type]/@component_name' % network, namespaces=self.namespaces)
else:
else:
- return self.xml.xpath('//
node[
sliver_type]/@component_name', namespaces=self.namespaces)
+ return self.xml.xpath('//
rspecv2:node[rspecv2:
sliver_type]/@component_name', namespaces=self.namespaces)
def get_nodes_without_slivers(self, network=None):
pass
def get_nodes_without_slivers(self, network=None):
pass
@@
-82,7
+82,7
@@
class PGRSpec(RSpec):
for hostname in hostnames:
if hostname in nodes_with_slivers:
continue
for hostname in hostnames:
if hostname in nodes_with_slivers:
continue
- nodes = self.xml.xpath('//node[@component_name="%s"]' % hostname, namespaces=self.namespaces)
+ nodes = self.xml.xpath('//
rspecv2:
node[@component_name="%s"]' % hostname, namespaces=self.namespaces)
if nodes:
node = nodes[0]
node.set('client_id', hostname)
if nodes:
node = nodes[0]
node.set('client_id', hostname)