Change in osmo-gsm-tester[master]: run_node: add label to RunNode class

srs_andre gerrit-no-reply at lists.osmocom.org
Fri Mar 12 12:13:01 UTC 2021


srs_andre has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/23347 )


Change subject: run_node: add label to RunNode class
......................................................................

run_node: add label to RunNode class

this allows specifying a label on each run node that can be used
to filter/select specific nodes.

Change-Id: Ib6a977007f56d6ff9ff029aaf049a75fb5d5e1dd
---
M src/osmo_gsm_tester/obj/run_node.py
1 file changed, 8 insertions(+), 3 deletions(-)



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

diff --git a/src/osmo_gsm_tester/obj/run_node.py b/src/osmo_gsm_tester/obj/run_node.py
index 72879a7..676c262 100644
--- a/src/osmo_gsm_tester/obj/run_node.py
+++ b/src/osmo_gsm_tester/obj/run_node.py
@@ -30,13 +30,14 @@
     T_LOCAL = 'local'
     T_REM_SSH = 'ssh'
 
-    def __init__(self, type=None, run_addr=None, ssh_user=None, ssh_addr=None, run_label=None, ssh_port=None, adb_serial_id=None):
+    def __init__(self, type=None, run_addr=None, ssh_user=None, ssh_addr=None, run_label=None, label=None, ssh_port=None, adb_serial_id=None):
         super().__init__(log.C_RUN, 'runnode')
         self._type = type
         self._run_addr = run_addr
         self._ssh_user = ssh_user
         self._ssh_addr = ssh_addr
         self._run_label = run_label
+        self._label = label
         self._ssh_port = ssh_port
         self._adb_serial_id = adb_serial_id
         if not self._type:
@@ -57,8 +58,8 @@
     def from_conf(cls, conf):
         return cls(conf.get('run_type', None), conf.get('run_addr', None),
                    conf.get('ssh_user', None), conf.get('ssh_addr', None),
-                   conf.get('run_label', None), conf.get('ssh_port', None),
-                   conf.get('adb_serial_id', None))
+                   conf.get('run_label', None), conf.get('label', None),
+                   conf.get('ssh_port', None), conf.get('adb_serial_id', None))
 
     @classmethod
     def schema(cls):
@@ -68,6 +69,7 @@
             'ssh_user': schema.STR,
             'ssh_addr': schema.IPV4,
             'run_label': schema.STR,
+            'label': schema.STR,
             'ssh_port': schema.STR,
             'adb_serial_id': schema.STR,
             }
@@ -94,6 +96,9 @@
     def run_label(self):
         return self._run_label
 
+    def label(self):
+        return self._label
+
     def ssh_port(self):
         return self._ssh_port
 

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/23347
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: Ib6a977007f56d6ff9ff029aaf049a75fb5d5e1dd
Gerrit-Change-Number: 23347
Gerrit-PatchSet: 1
Gerrit-Owner: srs_andre <andre at softwareradiosystems.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210312/b826dab0/attachment.htm>


More information about the gerrit-log mailing list