schema: Allow objects registering their own schema types

Change-Id: I998c8674a55531909bfeac420064c3f238cea126
diff --git a/selftest/schema_test/schema_test.py b/selftest/schema_test/schema_test.py
index 3cf2799..bffa601 100755
--- a/selftest/schema_test/schema_test.py
+++ b/selftest/schema_test/schema_test.py
@@ -25,6 +25,13 @@
             li.append(f)
     return sorted(li)
 
+def test_validator(val):
+    return val in ('valid_value1', 'valid_value2')
+
+schema.register_schema_types({'test_type': test_validator,
+                              'another_type': lambda val: val == 'unique_val_ok'})
+
+
 print('==== Testing dynamically generated schemas ====')
 for f in get_case_list(_prep.script_dir):
     print('%s:' % f)