util: fix the functions "create_netns" and "setcap_netsys_admin".

This commit fixes 2 functions from util.py:
 - setcap_netsys_admin: removed "self" from the arguments.
 - create_netns: pass "run_dir" to Process and convert the arguments to
a list as the other methods in the file.

Change-Id: Ida4c6d6500be92b8d1f96e4e7a870e63bd329be9
Alejandro Leal Conejos 2021-06-15 17:57:55 +02:00
parent e3f6a3b527
commit dcc0b5577c
1 changed files with 2 additions and 2 deletions

View File

@ -102,7 +102,7 @@ def setcap_net_admin(binary, run_dir):
proc = Process(SETCAP_NET_ADMIN_BIN, run_dir, ['sudo', SETCAP_NET_ADMIN_BIN, binary])
def setcap_netsys_admin(self, binary, run_dir):
def setcap_netsys_admin(binary, run_dir):
This functionality requires specific setup on the host running
osmo-gsm-tester. See osmo-gsm-tester manual for more information.
@ -118,7 +118,7 @@ def create_netns(netns, run_dir):
from .process import Process
NETNS_SETUP_BIN = 'osmo-gsm-tester_netns_setup.sh'
proc = Process('create_netns', ('sudo', NETNS_SETUP_BIN, netns))
proc = Process('create_netns',run_dir, ['sudo', NETNS_SETUP_BIN, netns])
def move_iface_to_netns(ifname, netns, run_dir):