Migrate the recordset validation functional test
This migrates the recordset validation test from designate to the
tempest plugin.
Change-Id: I4ae2dd980c1ad0547f360a9dc07f97a46146fd18
diff --git a/designate_tempest_plugin/data_utils.py b/designate_tempest_plugin/data_utils.py
index 7600542..46c8165 100644
--- a/designate_tempest_plugin/data_utils.py
+++ b/designate_tempest_plugin/data_utils.py
@@ -246,3 +246,16 @@
def rand_tsig_scope():
scope = ["ZONE", "POOL"]
return random.choice(scope)
+
+
+def make_rand_recordset(zone_name, record_type):
+ """Create a rand recordset by type
+ This essentially just dispatches to the relevant random recordset
+ creation functions.
+
+ :param str zone_name: The zone name the recordset applies to
+ :param str record_type: The type of recordset (ie A, MX, NS, etc...)
+ """
+
+ func = globals()["rand_{}_recordset".format(record_type.lower())]
+ return func(zone_name)