Change in osmo-gsm-tester[master]: srs-enb: sets the remote directory to the given one.

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/.

pespin gerrit-no-reply at lists.osmocom.org
Fri Jun 11 11:49:10 UTC 2021


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

Change subject: srs-enb: sets the remote directory to the given one.
......................................................................

srs-enb: sets the remote directory to the given one.

Sets the remote directory for fapi to the given in the variable 'remote_dir' in the reource schema.

Change-Id: I77a56835a4054b86d1d3f7da823a013b3370f767
---
M src/osmo_gsm_tester/obj/enb_srs.py
1 file changed, 8 insertions(+), 0 deletions(-)

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



diff --git a/src/osmo_gsm_tester/obj/enb_srs.py b/src/osmo_gsm_tester/obj/enb_srs.py
index 025960c..69aa095 100644
--- a/src/osmo_gsm_tester/obj/enb_srs.py
+++ b/src/osmo_gsm_tester/obj/enb_srs.py
@@ -32,6 +32,7 @@
     resource_schema = {
         'prerun_scripts[]': schema.STR,
         'postrun_scripts[]': schema.STR,
+        'remote_dir': schema.STR
         }
     schema.register_resource_schema('enb', resource_schema)
 
@@ -290,6 +291,13 @@
         if not self._run_node.is_local():
             self.rem_host = remote.RemoteHost(self.run_dir, self._run_node.ssh_user(), self._run_node.ssh_addr())
             remote_prefix_dir = util.Dir(srsENB.REMOTE_DIR)
+
+            # Modify the default remote directory if it is provided by the configuration.
+            remote_path = self._conf.get('remote_dir', None)
+            if remote_path:
+                remote_prefix_dir = util.Dir(remote_path)
+                self.log(f'Setting the remote dir to: {remote_path}')
+
             self.remote_inst = util.Dir(remote_prefix_dir.child(os.path.basename(str(self.inst))))
             self.remote_run_dir = util.Dir(remote_prefix_dir.child(self.name()))
 

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/24282
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: I77a56835a4054b86d1d3f7da823a013b3370f767
Gerrit-Change-Number: 24282
Gerrit-PatchSet: 3
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/20210611/b2af9a26/attachment.htm>


More information about the gerrit-log mailing list