X-Git-Url: http://git.onelab.eu/?p=sface.git;a=blobdiff_plain;f=sface%2Fsfahelper.py;h=9e2a1b93dff07e1bc518500f5fe2fb7cfb76aa1d;hp=53cf35164fd0d03d1009d398173ce14a3f202453;hb=7d7fc902c4b3a8df291292da526018dea66d20fd;hpb=ec32b764aaea2419c6e43cca236aa7f91e5b6de1 diff --git a/sface/sfahelper.py b/sface/sfahelper.py index 53cf351..9e2a1b9 100644 --- a/sface/sfahelper.py +++ b/sface/sfahelper.py @@ -6,22 +6,22 @@ from sfa.util.rspecHelper import RSpec # TODO: already merged in sfa-trunk. Use the one there -def rspec_get_networks(self, rspec_string): +def rspec_get_networks(rspec_string): rspec = RSpec (rspec_string) return rspec.rspec.xpath("./network[@name]/@name") # TODO: already merged in sfa-trunk. Use the one there -def rspec_get_xml_nodes_from_network(self, rspec_string, network): +def rspec_get_nodes_from_network(rspec_string, network): rspec = RSpec (rspec_string) - return rspec.rspec.xpath("./network[@name='%s']/site/node" % network) + return rspec.rspec.xpath("./network[@name='%s']/site/node/hostname/text()" % network) -def rspec_get_sliver_nodes_from_network(self, rspec_string, network): +def rspec_get_sliver_nodes_from_network(rspec_string, network): rspec = RSpec (rspec_string) return rspec.rspec.xpath("./network[@name='%s']/site/node[sliver]/hostname/text()" % network) -def rspec_get_other_nodes_from_network(self, rspec_string, network): +def rspec_get_other_nodes_from_network(rspec_string, network): rspec = RSpec (rspec_string) # xxx todo - could not find the xpath syntax for 'does not have the sliver attribute' return rspec.rspec.xpath("./network[@name='%s']/site/node[~sliver]/hostname/text()" % network)