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

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

alealcon gerrit-no-reply at lists.osmocom.org
Tue Jun 15 15:59:08 UTC 2021


alealcon has uploaded this change for review. ( 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(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/78/24678/1

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-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210615/e9bfa4ef/attachment.htm>


More information about the gerrit-log mailing list