Change in osmo-gsm-tester[master]: util: fix the functions "create_netns" and "setcap_netsys_admin".

pespin gerrit-no-reply at lists.osmocom.org
Tue Jun 15 16:47:28 UTC 2021


pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/24678 )

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

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
---
M src/osmo_gsm_tester/core/util.py
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, approved



diff --git a/src/osmo_gsm_tester/core/util.py b/src/osmo_gsm_tester/core/util.py
index 691b489..5ca6ad9 100644
--- a/src/osmo_gsm_tester/core/util.py
+++ b/src/osmo_gsm_tester/core/util.py
@@ -102,7 +102,7 @@
     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 @@
     '''
     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):

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/24678
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Change-Id: Ida4c6d6500be92b8d1f96e4e7a870e63bd329be9
Gerrit-Change-Number: 24678
Gerrit-PatchSet: 1
Gerrit-Owner: alealcon <alejandro.leal at srs.io>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210615/827ddfd6/attachment.htm>


More information about the gerrit-log mailing list