Commit 3b40a9ba authored by Federico Sismondi's avatar Federico Sismondi
Browse files

Small update to discovering pilot entities

parent 74545400
......@@ -16,7 +16,6 @@ logger = logging.getLogger()
URL_BASE = 'http://{}:1026'.format(os.getenv('ORION_HOST'))
# http headers
headers = {
'Fiware-Service': None,
......@@ -25,7 +24,8 @@ headers = {
entities_map = {
'carouge': [],
'braila': [],
'alicante': []
'alicante': [],
'wtp_lab': [],
}
for pilot in entities_map.keys():
......@@ -41,7 +41,7 @@ for pilot in entities_map.keys():
print(r.reason)
print(r.json())
else:
print('Entities updated (HTTP response is 2xx)')
print('Request ok (HTTP response is 2xx)')
for entity in r.json():
entities_map[pilot].append(entity['id'])
......@@ -49,5 +49,6 @@ for pilot in entities_map.keys():
except StopIteration:
pass
pprint(entities_map)
for k,v in entities_map.items():
print("{}: ".format(k))
pprint(v)
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