From 9464b28c3d189bf7bdd71b9b0c0a84d350d4a4f6 Mon Sep 17 00:00:00 2001 From: Deepthi Kandavara Jayarama Date: Fri, 17 Aug 2018 18:45:18 +0000 Subject: [PATCH] [Designate] Fix for different format of nameserver nameserver mentioned in tempest.conf is a list in vio and string for devstack Change-Id: Idc0fa3e26794ff7971786c3075132cb3d1fbdd27 --- .../tests/scenario/test_designate.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/vmware_nsx_tempest_plugin/tests/scenario/test_designate.py b/vmware_nsx_tempest_plugin/tests/scenario/test_designate.py index ae631a2..d445cd2 100644 --- a/vmware_nsx_tempest_plugin/tests/scenario/test_designate.py +++ b/vmware_nsx_tempest_plugin/tests/scenario/test_designate.py @@ -371,7 +371,10 @@ class TestZonesScenario(TestZonesV2Ops): if record is None: raise Exception('fip is missing in the recordset') my_resolver = dns.resolver.Resolver() - nameserver = CONF.dns.nameservers[0][:-3] + if type(CONF.dns.nameservers) is list: + nameserver = CONF.dns.nameservers[0][:-3] + else: + nameserver = CONF.dns.nameservers.split(":")[0] my_resolver.nameservers = [nameserver] #wait for status to change from pending to active time.sleep(const.ZONE_WAIT_TIME) @@ -412,7 +415,10 @@ class TestZonesScenario(TestZonesV2Ops): if record is None: raise Exception('fip is missing in the recordset') my_resolver = dns.resolver.Resolver() - nameserver = CONF.dns.nameservers[0][:-3] + if type(CONF.dns.nameservers) is list: + nameserver = CONF.dns.nameservers[0][:-3] + else: + nameserver = CONF.dns.nameservers.split(":")[0] my_resolver.nameservers = [nameserver] #wait for status to change from pending to active time.sleep(const.ZONE_WAIT_TIME)