From d32f75145676bacefde0d08a14680a5984623451 Mon Sep 17 00:00:00 2001 From: Koren Lev Date: Fri, 29 Sep 2017 01:38:18 +0300 Subject: release 1.0 calipso for opnfv apex Change-Id: I3e63cd27c5f4d3756e67a07c749863a68e84dde2 Signed-off-by: Koren Lev --- app/discover/events/event_subnet_update.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'app/discover/events/event_subnet_update.py') diff --git a/app/discover/events/event_subnet_update.py b/app/discover/events/event_subnet_update.py index 3529f0d..59b0afb 100644 --- a/app/discover/events/event_subnet_update.py +++ b/app/discover/events/event_subnet_update.py @@ -23,6 +23,7 @@ class EventSubnetUpdate(EventBase): def handle(self, env, notification): # check for network document. subnet = notification['payload']['subnet'] + project_id = notification['_context_project_id'] project = notification['_context_project_name'] host_id = notification['publisher_id'].replace('network.', '', 1) subnet_id = subnet['id'] @@ -47,10 +48,10 @@ class EventSubnetUpdate(EventBase): network_document['name']) # make sure that self.regions is not empty. - if len(ApiAccess.regions) == 0: + if not ApiAccess.regions: fetcher = ApiFetchRegions() fetcher.set_env(env) - fetcher.get(None) + fetcher.get(project_id) self.log.info("add port binding to DHCP server.") port_id = DbFetchPort(). \ -- cgit 1.2.3-korg