Create "A" type recordset using a list of IPs records
Test name: test_create_A_recordset_multiply_ips
Note: this patch is also fixes missing cleanups and adds
the existing constants to be used in code.
Change-Id: I0904803f7e3ac5635babfc82f409a0e38685c9fa
diff --git a/designate_tempest_plugin/data_utils.py b/designate_tempest_plugin/data_utils.py
index 2f61d97..c9d3f6d 100644
--- a/designate_tempest_plugin/data_utils.py
+++ b/designate_tempest_plugin/data_utils.py
@@ -141,10 +141,12 @@
'ttl': ttl}
-def rand_a_recordset(zone_name, ip=None, **kwargs):
- if ip is None:
- ip = rand_ip()
- return rand_recordset_data('A', zone_name, records=[ip], **kwargs)
+def rand_a_recordset(zone_name, ips=None, **kwargs):
+ if ips is None:
+ return rand_recordset_data(
+ 'A', zone_name, records=[rand_ip()], **kwargs)
+ else:
+ return rand_recordset_data('A', zone_name, records=ips, **kwargs)
def rand_aaaa_recordset(zone_name, ip=None, **kwargs):