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