Generate schemas dynamically from pieces provided by each object class

This way we benefit from:
* knowing which attributes are used/required by each object class and
  subclass
* Having validation function definitions near the class going to use them

Change-Id: I8fd6773c51d19405a585977af4ed72cad2b21db1
diff --git a/src/osmo_gsm_tester/obj/run_node.py b/src/osmo_gsm_tester/obj/run_node.py
index e9f43a1..26c85df 100644
--- a/src/osmo_gsm_tester/obj/run_node.py
+++ b/src/osmo_gsm_tester/obj/run_node.py
@@ -18,6 +18,17 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 from ..core import log
+from ..core import schema
+
+def on_register_schemas():
+    resource_schema = {
+        'run_type': schema.STR,
+        'run_addr': schema.IPV4,
+        'ssh_user': schema.STR,
+        'ssh_addr': schema.IPV4,
+        }
+    schema.register_resource_schema('run_node', resource_schema)
+
 
 class RunNode(log.Origin):