diff options
author | AlaiaL <alejandro.leal@srs.io> | 2021-05-10 17:57:05 +0200 |
---|---|---|
committer | Alejandro Leal Conejos <alejandro.leal@srs.io> | 2021-06-11 08:26:58 +0200 |
commit | 18cd26f58d06d4469fa6e8f2e9a0beb59f13c641 (patch) | |
tree | 801f6848a88aaa6644a0389bec655809dd836c85 | |
parent | d1ca06d9ac86112beee44c848e3cdde154b4a417 (diff) |
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
-rw-r--r-- | src/osmo_gsm_tester/obj/enb_srs.py | 8 |
1 files changed, 8 insertions, 0 deletions
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 @@ def on_register_schemas(): 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 @@ class srsENB(enb.eNodeB, srslte_common): 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())) |