summaryrefslogtreecommitdiffstats
path: root/modules/opnfv
diff options
context:
space:
mode:
authorJose Lausuch <jose.lausuch@ericsson.com>2017-02-21 11:52:34 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-02-21 11:52:34 +0000
commit88c250214b1b340db72e7e1799883330aeee37fa (patch)
tree5d785f6d280caf186e75415257898fc636135e70 /modules/opnfv
parenta2567392d367889f2fd2bb464ce8b05bce12eb0c (diff)
parentfa9e51776151df5ce23d56671ea05501e0cefb04 (diff)
Merge "Fix dump_ovs_flows crashing when no nodes are passed"
Diffstat (limited to 'modules/opnfv')
-rw-r--r--modules/opnfv/utils/ovs_logger.py16
1 files changed, 5 insertions, 11 deletions
diff --git a/modules/opnfv/utils/ovs_logger.py b/modules/opnfv/utils/ovs_logger.py
index d650eb9ab..7777a9a16 100644
--- a/modules/opnfv/utils/ovs_logger.py
+++ b/modules/opnfv/utils/ovs_logger.py
@@ -101,19 +101,13 @@ class OVSLogger(object):
if timestamp is None:
timestamp = time.strftime("%Y%m%d-%H%M%S")
- for controller_client in controller_clients:
- self.ofctl_dump_flows(controller_client,
- timestamp=timestamp)
- self.vsctl_show(controller_client,
- timestamp=timestamp)
-
- for compute_client in compute_clients:
- self.ofctl_dump_flows(compute_client,
- timestamp=timestamp)
- self.vsctl_show(compute_client,
- timestamp=timestamp)
+ clients = controller_clients + compute_clients
+ for client in clients:
+ self.ofctl_dump_flows(client, timestamp=timestamp)
+ self.vsctl_show(client, timestamp=timestamp)
if related_error is not None:
dumpdir = os.path.join(self.ovs_dir, timestamp)
+ self.__mkdir_p(dumpdir)
with open(os.path.join(dumpdir, 'error'), 'w') as f:
f.write(related_error)