from sfa.util.plxrn import hostname_to_urn
from sfa.util.config import Config
-
class PGRSpec(RSpec):
header = '<?xml version="1.0"?>\n'
template = """<rspec xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.protogeni.net/resources/rspec/0.2" xsi:schemaLocation="http://www.protogeni.net/resources/rspec/0.2 http://www.protogeni.net/resources/rspec/0.2/ad.xsd"></rspec>"""
for hostname in hostnames:
if hostname in nodes_with_slivers:
continue
- nodes = self.xml.xpath('//rspecv2:node[@component_name="%s"]' % hostname, namespaces=self.namespaces)
+ nodes = self.xml.xpath('//rspecv2:node[@component_name="%s"] | //node[@component_name="%s"]' % (hostname, hostname), namespaces=self.namespaces)
if nodes:
node = nodes[0]
node.set('client_id', hostname)