diff options
author | 2017-10-10 18:08:39 +0300 | |
---|---|---|
committer | 2017-10-10 15:11:31 +0000 | |
commit | 33802c45e4bc24c1e78f6b46cf968306cee2d4da (patch) | |
tree | cd56ab878d8c5aadff49f3c5c89cf265f64e664d /app/discover/fetchers/db | |
parent | 87e9e89e07b751b64e9684f02928acb3467489c4 (diff) |
release 1.1 for euphrates
Change-Id: Iddc0e0148db7c72458b7fcdfcb7664e4aa609be0
Signed-off-by: Koren Lev <korenlev@gmail.com>
(cherry picked from commit 5c6eb170878cefa12f717a62c31f7228d440e61e)
Diffstat (limited to 'app/discover/fetchers/db')
-rw-r--r-- | app/discover/fetchers/db/db_fetch_oteps.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/app/discover/fetchers/db/db_fetch_oteps.py b/app/discover/fetchers/db/db_fetch_oteps.py index f7eb8bd..85376ed 100644 --- a/app/discover/fetchers/db/db_fetch_oteps.py +++ b/app/discover/fetchers/db/db_fetch_oteps.py @@ -63,21 +63,23 @@ class DbFetchOteps(DbAccess, CliAccess, metaclass=Singleton): return results # find matching vConnector by tunneling_ip of vEdge - # look for that IP address in ifconfig for the host + # look for that IP address in 'ip address show' output for the host def get_vconnector(self, doc, host_id, vedge): tunneling_ip = vedge["configurations"]["tunneling_ip"] - ifconfig_lines = self.run_fetch_lines("ifconfig", host_id) + output_lines = self.run_fetch_lines("ip address show", host_id) interface = None - ip_string = " " * 10 + "inet addr:" + tunneling_ip + " " + ip_string = " inet {}/".format(tunneling_ip) vconnector = None - for l in ifconfig_lines: + for l in output_lines: if l.startswith(" "): if interface and l.startswith(ip_string): vconnector = interface break else: if " " in l: - interface = l[:l.index(" ")] + # line format is like this: + # <interface number>: <interface name>: .... + interface = l.split(":")[1].strip() if vconnector: doc["vconnector"] = vconnector |