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

testing without preceding '.'

parent bdfcdfdc
No related branches found
No related tags found
No related merge requests found
......@@ -135,7 +135,7 @@ def get_peer_state_info(hostname, community):
yield {
'local': local.exploded,
'remote': remote.exploded,
'oid': ifc['oid'][1:],
'oid': ifc['oid'],
'value': ifc['value'],
}
......@@ -216,12 +216,18 @@ def get(
if __name__ == '__main__':
# for x in get_peer_state_oids('mx1.kau.lt.geant.net', '0pBiFbD'):
import json
# for x in get_peer_state_info('mx1.kau.lt.geant.net', '0pBiFbD'):
# print(x)
oids = [x['oid'] for x in get_peer_state_info('mx1.kau.lt.geant.net', '0pBiFbD')]
oids = list(oids)
peerings = get_peer_state_info('mx1.kau.lt.geant.net', '0pBiFbD')
# print(json.dumps(list(peerings), indent=2, sort_keys=True))
oids = [x['oid'] for x in peerings]
print(oids)
data = dict()
for i in range(0, len(oids), 3):
print('*' * 20)
for x in get('mx1.kau.lt.geant.net', '0pBiFbD', oids[i:i+3]).items():
print(x)
data.update(get('mx1.kau.lt.geant.net', '0pBiFbD', oids[i:i+3]))
print(json.dumps(data, indent=2))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment