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">\n
-</rspec>
-"""
+ 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>"""
namespaces = {'rspecv2':'http://www.protogeni.net/resources/rspec/0.2',
'xsi': 'http://www.w3.org/2001/XMLSchema-instance'
}
node_tag = etree.SubElement(self.xml, 'node')
if 'network' in node:
- node_tag.set('component_manager_id', network)
+ node_tag.set('component_manager_id', node['network'])
if 'urn' in node:
node_tag.set('component_id', node['urn'])
if 'hostname' in node:
location_tag = etree.SubElement(node_tag, 'location', location="US")
if 'site' in node:
if 'longitude' in node['site']:
- location_tag.set('longitude', site['longitude'])
+ location_tag.set('longitude', str(node['site']['longitude']))
if 'latitude' in node['site']:
- location_tag.set('latitude', site['latitude'])
+ location_tag.set('latitude', str(node['site']['latitude']))
#if 'interfaces' in node: