From 771438b1d7af4a0a923d86db44f54fc4b51377ec Mon Sep 17 00:00:00 2001 From: Robert Latta <robert.latta@geant.org> Date: Fri, 30 Oct 2020 15:21:34 +0000 Subject: [PATCH] non-functional change --- inventory_provider/routes/testing.py | 1 + inventory_provider/tasks/ims_worker.py | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/inventory_provider/routes/testing.py b/inventory_provider/routes/testing.py index ae169363..29893be2 100644 --- a/inventory_provider/routes/testing.py +++ b/inventory_provider/routes/testing.py @@ -26,6 +26,7 @@ def update_interfaces_to_services_ims(): ims_worker.update_interfaces_to_services_ims.delay(use_current=True) return Response('OK') + @routes.route("update-circuit-hierarchy-ims", methods=['GET', 'POST']) def update_circuit_hierarchy_ims(): ims_worker.update_circuit_hierarchy_ims.delay(use_current=True) diff --git a/inventory_provider/tasks/ims_worker.py b/inventory_provider/tasks/ims_worker.py index 1da774f6..41907eea 100644 --- a/inventory_provider/tasks/ims_worker.py +++ b/inventory_provider/tasks/ims_worker.py @@ -32,11 +32,10 @@ def update_interfaces_to_services_ims(self, use_current=False): ds = IMS(c['api'], c['username'], c['password']) for service in ims_data.get_interface_services(ds): - equipment_interface = '%s:%s' % ( - service['equipment'], service['interface_name']) + equipment_interface = \ + f'{service["equipment"]}:{service["interface_name"]}' interface_services[equipment_interface].append(service) - if use_current: r = get_current_redis(InventoryTask.config) # scan with bigger batches, to mitigate network latency effects -- GitLab