Merge "[Designate] Fix for different format of nameserver"

This commit is contained in:
Zuul 2018-09-19 12:54:53 +00:00 committed by Gerrit Code Review
commit 9fcd051a96

View File

@ -371,7 +371,10 @@ class TestZonesScenario(TestZonesV2Ops):
if record is None: if record is None:
raise Exception('fip is missing in the recordset') raise Exception('fip is missing in the recordset')
my_resolver = dns.resolver.Resolver() my_resolver = dns.resolver.Resolver()
if type(CONF.dns.nameservers) is list:
nameserver = CONF.dns.nameservers[0][:-3] nameserver = CONF.dns.nameservers[0][:-3]
else:
nameserver = CONF.dns.nameservers.split(":")[0]
my_resolver.nameservers = [nameserver] my_resolver.nameservers = [nameserver]
#wait for status to change from pending to active #wait for status to change from pending to active
time.sleep(const.ZONE_WAIT_TIME) time.sleep(const.ZONE_WAIT_TIME)
@ -412,7 +415,10 @@ class TestZonesScenario(TestZonesV2Ops):
if record is None: if record is None:
raise Exception('fip is missing in the recordset') raise Exception('fip is missing in the recordset')
my_resolver = dns.resolver.Resolver() my_resolver = dns.resolver.Resolver()
if type(CONF.dns.nameservers) is list:
nameserver = CONF.dns.nameservers[0][:-3] nameserver = CONF.dns.nameservers[0][:-3]
else:
nameserver = CONF.dns.nameservers.split(":")[0]
my_resolver.nameservers = [nameserver] my_resolver.nameservers = [nameserver]
#wait for status to change from pending to active #wait for status to change from pending to active
time.sleep(const.ZONE_WAIT_TIME) time.sleep(const.ZONE_WAIT_TIME)