Skip to content
Snippets Groups Projects
Commit fcfce474 authored by Erik Reid's avatar Erik Reid
Browse files

pep8

parent 955d2948
No related branches found
No related tags found
No related merge requests found
......@@ -152,8 +152,8 @@ def get_juniper_link_info(source_equipment, interface):
result['services'] = json.loads(services.decode('utf=8'))
for s in result['services']:
top_level_services.extend(get_top_level_services(s['id'], r))
l = [_location_from_service_dict(s) for s in result['services']]
result['locations'] += l
result['locations'] += [
_location_from_service_dict(s) for s in result['services']]
ifc_info = r.get(
'netconf-interfaces:%s:%s' % (source_equipment, interface))
......@@ -265,7 +265,6 @@ def find_interfaces(address):
yield ifc
def find_interfaces_and_services(address_str):
"""
......@@ -342,8 +341,8 @@ def peer_info(address):
if interfaces:
result['interfaces'] = interfaces
for i in interfaces:
l = [_location_from_service_dict(s) for s in i['services']]
result['locations'] += l
result['locations'] += [
_location_from_service_dict(s) for s in i['services']]
result['locations'] = _unique_dicts_from_list(result['locations'])
result = json.dumps(result)
......@@ -384,8 +383,8 @@ def get_trap_metadata(source_equipment, interface, circuit_id):
top_level_services.extend(tls)
if top_level_services:
result['related-services'] = top_level_services
l = [_location_from_service_dict(s) for s in result['services']]
result['locations'] += l
result['locations'] += [
_location_from_service_dict(s) for s in result['services']]
gl = r.get('opsdb:geant_lambdas:%s' % circuit_id.lower())
if gl:
......
......@@ -386,7 +386,7 @@ def test_coriant_info(
'abbreviation': '999'
}
}
})
})
rv = client.get(
'/classifier/coriant-info/{equipment}/{entity}'.format(
......@@ -408,8 +408,12 @@ def test_coriant_info(
'E': equipment,
'CID': card_id,
'P': port_number,
'a': {'equipment name': 'abc', 'pop': {'name': 'zzz', 'abbreviation': '123'}},
'b': {'equipment name': 'ddd', 'pop': {'name': 'aaa', 'abbreviation': '999'}}
'a': {
'equipment name': 'abc',
'pop': {'name': 'zzz', 'abbreviation': '123'}},
'b': {
'equipment name': 'ddd',
'pop': {'name': 'aaa', 'abbreviation': '999'}}
},
'locations': [{
'a': {'equipment': 'abc', 'name': 'zzz', 'abbreviation': '123'},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment