From 15d0c604dddaeb6471e3f1f4529b60e32b479582 Mon Sep 17 00:00:00 2001 From: Dimitrios Markou Date: Thu, 26 Oct 2017 10:13:29 +0300 Subject: Execute ovs-logger cmds with sudo In some installers we execute commands as ordinary users and that causes problems when we need superuser priviledges. Change-Id: I84786e63995990e9d68803ed50879b086b0bd4af Signed-off-by: Dimitrios Markou --- modules/opnfv/utils/ovs_logger.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/opnfv') diff --git a/modules/opnfv/utils/ovs_logger.py b/modules/opnfv/utils/ovs_logger.py index eb070e3bd..2107bdc35 100644 --- a/modules/opnfv/utils/ovs_logger.py +++ b/modules/opnfv/utils/ovs_logger.py @@ -70,7 +70,7 @@ class OVSLogger(object): def ofctl_dump_flows(self, ssh_conn, br='br-int', choose_table=None, timestamp=None): try: - cmd = 'ovs-ofctl -OOpenFlow13 dump-flows {0}'.format(br) + cmd = 'sudo ovs-ofctl -OOpenFlow13 dump-flows {0}'.format(br) if choose_table is not None: cmd = '{0} table={1}'.format(cmd, choose_table) output = self.__remote_cmd(ssh_conn, cmd) @@ -85,7 +85,7 @@ class OVSLogger(object): def vsctl_show(self, ssh_conn, timestamp=None): try: - cmd = 'ovs-vsctl show' + cmd = 'sudo ovs-vsctl show' output = self.__remote_cmd(ssh_conn, cmd) operation = 'vsctl_show' host = self.__ssh_host(ssh_conn) -- cgit 1.2.3-korg