Commit 0792a233 authored by Loic Baron's avatar Loic Baron
Browse files

fix: omf parser get_location

parent 8539b9d9
Pipeline #2133 passed with stage
......@@ -63,11 +63,8 @@ class Omf(SfaParser):
for element in list(node):
if 'hardware_type' in element.tag:
resource['hardware_types'].append(element.attrib['name'])
if 'location' in element.tag:
resource['location'] = element.attrib
else:
resource['location'] = self.get_location(node.attrib['component_id'])
if 'available' in element.tag:
resource['available'] = element.attrib['now']
......@@ -75,7 +72,10 @@ class Omf(SfaParser):
if 'services' in element.tag:
login = element.find('{http://www.geni.net/resources/rspec/3}login')
resource['services'].append({'login':login.attrib})
if 'location' not in resource or resource['location'] is None:
resource['location'] = self.get_location(node.attrib['component_id'])
if len(resource['hardware_types']) == 0:
resource['hardware_types'].append('PC-Icarus')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment