diff options
author | Jose Lausuch <jose.lausuch@ericsson.com> | 2017-02-21 11:52:34 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-02-21 11:52:34 +0000 |
commit | 88c250214b1b340db72e7e1799883330aeee37fa (patch) | |
tree | 5d785f6d280caf186e75415257898fc636135e70 | |
parent | a2567392d367889f2fd2bb464ce8b05bce12eb0c (diff) | |
parent | fa9e51776151df5ce23d56671ea05501e0cefb04 (diff) |
Merge "Fix dump_ovs_flows crashing when no nodes are passed"
-rw-r--r-- | modules/opnfv/utils/ovs_logger.py | 16 |
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) |