-
- # TODO: use the methods from sfa-trunk
- def rspec_get_networks(self, rspec_string):
- rspec = RSpec (rspec_string)
- return rspec.rspec.xpath("./network[@name]/@name")
- def rspec_get_xml_nodes_from_network(self, rspec_string, network):
- rspec = RSpec (rspec_string)
- return rspec.rspec.xpath("./network[@name='%s']/site/node" % network)
- def rspec_get_sliver_nodes_from_network(self, 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):
- 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)
+ def readSliceRSpec(self):
+ rspec_file = os.path.expanduser("~/.sfi/%s.rspec" % config.getSlice())
+ xml = open(rspec_file).read()
+ return xml