From 1ae58d7b103bead4f09f735b837efa3d55b08736 Mon Sep 17 00:00:00 2001 From: yayogev Date: Sun, 13 Aug 2017 12:28:43 +0300 Subject: US2853 fix creation of switch-switch_pnic, remove switch-host_pnic Change-Id: Ife6f0f7a007a1c792359f56b91eb033fcfd4400a Signed-off-by: yayogev --- app/discover/find_links_for_pnics.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/discover/find_links_for_pnics.py b/app/discover/find_links_for_pnics.py index 3ca6b7e..372ff39 100644 --- a/app/discover/find_links_for_pnics.py +++ b/app/discover/find_links_for_pnics.py @@ -27,7 +27,6 @@ class FindLinksForPnics(FindLinks): for pnic in pnics: self.add_pnic_network_links(pnic) self.add_host_pnic_to_switch_pnic_link(pnic) - self.add_switch_to_pnic_link(pnic) self.log.info("adding links of type: switch_pnic-switch_pnic, " "switch-switch_pnic") @@ -116,7 +115,7 @@ class FindLinksForPnics(FindLinks): switch=leaf_pnic['switch']) def add_switch_to_pnic_link(self, pnic): - switch = self.inv.get_by_id(self.get_env(), pnic['id']) + switch = self.inv.get_by_id(self.get_env(), pnic['parent_id']) if not switch: return source = switch["_id"] -- cgit 1.2.3-korg