diff options
author | Dimitrios Markou <mardim@intracom-telecom.com> | 2017-09-21 12:43:35 +0300 |
---|---|---|
committer | Dimitrios Markou <mardim@intracom-telecom.com> | 2017-09-26 19:45:01 +0300 |
commit | 3311d07da605c4469d82a878053ce83f6a86406e (patch) | |
tree | 51fa6bf4c7a5fc8ce82ee2f780130e8de6fe991a /opnfv/utils | |
parent | 7ea71686055dc42aec6bc38213ea7d09e3690dad (diff) |
Make the ovs_logger installer independentstable/euphrates
The ovs_logger library was too tightly connected
to the Fuel installer.
This patch make the aforementioned library
installer independent
Change-Id: I39115067393b8d4baf66c23baf2d9c130e4668bd
Signed-off-by: Dimitrios Markou <mardim@intracom-telecom.com>
Diffstat (limited to 'opnfv/utils')
-rw-r--r-- | opnfv/utils/ovs_logger.py | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/opnfv/utils/ovs_logger.py b/opnfv/utils/ovs_logger.py index 7777a9a..eb070e3 100644 --- a/opnfv/utils/ovs_logger.py +++ b/opnfv/utils/ovs_logger.py @@ -27,11 +27,10 @@ class OVSLogger(object): if not os.path.exists(dirpath): os.makedirs(dirpath) - def __ssh_host(self, ssh_conn, host_prefix='10.20.0'): + def __ssh_host(self, ssh_conn): try: - _, stdout, _ = ssh_conn.exec_command('hostname -I') - hosts = stdout.readline().strip().split(' ') - found_host = [h for h in hosts if h.startswith(host_prefix)][0] + _, stdout, _ = ssh_conn.exec_command('hostname') + found_host = stdout.readline() return found_host except Exception as e: logger.error(e) @@ -98,10 +97,18 @@ class OVSLogger(object): def dump_ovs_logs(self, controller_clients, compute_clients, related_error=None, timestamp=None): + """ + delete controller_clients argument because + that was producing an error in XCI installer. + + For more information see: + TODO: https://jira.opnfv.org/browse/RELENG-314 + """ + del controller_clients if timestamp is None: timestamp = time.strftime("%Y%m%d-%H%M%S") - - clients = controller_clients + compute_clients + # clients = controller_clients + compute_clients + clients = compute_clients for client in clients: self.ofctl_dump_flows(client, timestamp=timestamp) self.vsctl_show(client, timestamp=timestamp) |