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
changes/78/24678/1
Alejandro Leal Conejos 1 year ago
parent e3f6a3b527
commit dcc0b5577c
  1. 4
      src/osmo_gsm_tester/core/util.py

@ -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])
proc.launch_sync()
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])
proc.launch_sync()
def move_iface_to_netns(ifname, netns, run_dir):

Loading…
Cancel
Save