From: yayogev Date: Sun, 13 Aug 2017 09:28:43 +0000 (+0300) Subject: US2853 fix creation of switch-switch_pnic, remove switch-host_pnic X-Git-Tag: opnfv-5.1.RC1~86 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=1ae58d7b103bead4f09f735b837efa3d55b08736;p=calipso.git US2853 fix creation of switch-switch_pnic, remove switch-host_pnic Change-Id: Ife6f0f7a007a1c792359f56b91eb033fcfd4400a Signed-off-by: yayogev --- 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"]