diff options
author | Koren Lev <korenlev@gmail.com> | 2017-09-29 01:38:18 +0300 |
---|---|---|
committer | Yaron Yogev <yaronyogev@gmail.com> | 2017-10-03 09:46:58 +0000 |
commit | d0adff06bed72f9a0edd7adccfa6a1111784bc8b (patch) | |
tree | 4b5eaf1107e6973b1eac636309a99c83074acbfc /app/discover/events/event_subnet_update.py | |
parent | fbbaf20912c79bd99a5c3696850d70c11965f56b (diff) |
release 1.0 calipso for opnfv apex
Change-Id: I3e63cd27c5f4d3756e67a07c749863a68e84dde2
Signed-off-by: Koren Lev <korenlev@gmail.com>
(cherry picked from commit d32f75145676bacefde0d08a14680a5984623451)
Diffstat (limited to 'app/discover/events/event_subnet_update.py')
-rw-r--r-- | app/discover/events/event_subnet_update.py | 5 |
1 files changed, 3 insertions, 2 deletions
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(). \ |