From d0adff06bed72f9a0edd7adccfa6a1111784bc8b 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 (cherry picked from commit d32f75145676bacefde0d08a14680a5984623451) --- app/discover/link_finders/find_links_for_pnics.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'app/discover/link_finders/find_links_for_pnics.py') diff --git a/app/discover/link_finders/find_links_for_pnics.py b/app/discover/link_finders/find_links_for_pnics.py index 1f02426..94eba7b 100644 --- a/app/discover/link_finders/find_links_for_pnics.py +++ b/app/discover/link_finders/find_links_for_pnics.py @@ -41,6 +41,18 @@ class FindLinksForPnics(FindLinks): def add_pnic_network_links(self, pnic): host = pnic["host"] + if self.configuration.get_env_config()['type_drivers'] == "vlan": + # take this pnic only if we can find matching vedge-pnic links + matches = self.inv.find({ + "environment": self.get_env(), + "link_type": "vedge-host_pnic", + "host": host, + "target_id": pnic["id"]}, + projection={"_id": 1}, + collection="links", + get_single=True) + if not matches: + return # find ports for that host, and fetch just the network ID ports = self.inv.find_items({ "environment": self.get_env(), -- cgit 1.2.3-korg