aboutsummaryrefslogtreecommitdiffstats
path: root/app/discover/find_links_for_oteps.py
diff options
context:
space:
mode:
authorYaron Yogev <yaronyogev@gmail.com>2017-08-10 15:42:41 +0300
committerYaron Yogev <yaronyogev@gmail.com>2017-08-10 15:42:41 +0300
commit72b7b6c157c643549006fea1eb4f7348581cb9a4 (patch)
treedfca00f51dbbc7b04aad9d29ead1f214da19777e /app/discover/find_links_for_oteps.py
parentaad40dd5763265a4efcbfce248f6e8d2788ae7b5 (diff)
US2853 add switch-switch links
Change-Id: I5e27d33f32dc1dfe930cb692cd98604cf437855b Signed-off-by: Yaron Yogev <yaronyogev@gmail.com>
Diffstat (limited to 'app/discover/find_links_for_oteps.py')
-rw-r--r--app/discover/find_links_for_oteps.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/app/discover/find_links_for_oteps.py b/app/discover/find_links_for_oteps.py
index 84373a4..a9cc149 100644
--- a/app/discover/find_links_for_oteps.py
+++ b/app/discover/find_links_for_oteps.py
@@ -36,9 +36,10 @@ class FindLinksForOteps(FindLinks):
link_name = vedge["name"] + "-otep"
state = "up" # TBD
link_weight = 0 # TBD
- self.create_link(self.get_env(), vedge["host"],
+ self.create_link(self.get_env(),
source, source_id, target, target_id,
- link_type, link_name, state, link_weight)
+ link_type, link_name, state, link_weight,
+ host=vedge["host"])
def add_otep_vconnector_link(self, otep):
if "vconnector" not in otep:
@@ -59,9 +60,10 @@ class FindLinksForOteps(FindLinks):
link_name = otep["name"] + "-" + otep["vconnector"]
state = "up" # TBD
link_weight = 0 # TBD
- self.create_link(self.get_env(), otep["host"],
+ self.create_link(self.get_env(),
source, source_id, target, target_id,
- link_type, link_name, state, link_weight)
+ link_type, link_name, state, link_weight,
+ host=otep["host"])
def add_otep_pnic_link(self, otep):
pnic = self.inv.find_items({
@@ -80,6 +82,7 @@ class FindLinksForOteps(FindLinks):
link_name = otep["host"] + "pnic" + pnic["name"]
state = "up" # TBD
link_weight = 0 # TBD
- self.create_link(self.get_env(), otep["host"],
+ self.create_link(self.get_env(),
source, source_id, target, target_id,
- link_type, link_name, state, link_weight)
+ link_type, link_name, state, link_weight,
+ host=otep["host"])