aboutsummaryrefslogtreecommitdiffstats
path: root/app/discover/fetchers/cli/cli_fetch_vservice_vnics.py
diff options
context:
space:
mode:
authorKoren Lev <korenlev@gmail.com>2017-09-29 01:38:18 +0300
committerKoren Lev <korenlev@gmail.com>2017-09-29 01:38:18 +0300
commitd32f75145676bacefde0d08a14680a5984623451 (patch)
tree4b5eaf1107e6973b1eac636309a99c83074acbfc /app/discover/fetchers/cli/cli_fetch_vservice_vnics.py
parent0c5426cd309d720db1e30641e43d311ee0b751b0 (diff)
release 1.0 calipso for opnfv apex
Change-Id: I3e63cd27c5f4d3756e67a07c749863a68e84dde2 Signed-off-by: Koren Lev <korenlev@gmail.com>
Diffstat (limited to 'app/discover/fetchers/cli/cli_fetch_vservice_vnics.py')
-rw-r--r--app/discover/fetchers/cli/cli_fetch_vservice_vnics.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/discover/fetchers/cli/cli_fetch_vservice_vnics.py b/app/discover/fetchers/cli/cli_fetch_vservice_vnics.py
index d10d99e..239ecd7 100644
--- a/app/discover/fetchers/cli/cli_fetch_vservice_vnics.py
+++ b/app/discover/fetchers/cli/cli_fetch_vservice_vnics.py
@@ -42,7 +42,7 @@ class CliFetchVserviceVnics(CliAccess):
return []
if "Network" not in host["host_type"]:
return []
- lines = self.run_fetch_lines("ip netns", host_id)
+ lines = self.run_fetch_lines("ip netns list", host_id)
ret = []
for l in [l for l in lines
if l.startswith("qdhcp") or l.startswith("qrouter")]:
@@ -68,7 +68,7 @@ class CliFetchVserviceVnics(CliAccess):
current = None
else:
line_remainder = matches.group(2)
- vservice_id = host + "-" + service
+ master_parent_id = "{}-{}".format(host, service)
current = {
"id": host + "-" + name,
"type": "vnic",
@@ -76,9 +76,9 @@ class CliFetchVserviceVnics(CliAccess):
"host": host,
"name": name,
"master_parent_type": "vservice",
- "master_parent_id": vservice_id,
+ "master_parent_id": master_parent_id,
"parent_type": "vnics_folder",
- "parent_id": vservice_id + "-vnics",
+ "parent_id": "{}-vnics".format(master_parent_id),
"parent_text": "vNICs",
"lines": []
}