From 9c189e303b076ed6ed3f2e7849565dc8b728bad3 Mon Sep 17 00:00:00 2001 From: Kobi Samoray Date: Thu, 13 May 2021 15:50:59 +0300 Subject: [PATCH] NSXV: retrieve DNS IPs from subnet correctly subnet['dns_nameservers'] is a list of strings, not dictionaries. Change-Id: I929f5ab4d1eb3d538b9e50d08d13554575eab99b --- vmware_nsx/plugins/nsx_v/vshield/edge_utils.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/vmware_nsx/plugins/nsx_v/vshield/edge_utils.py b/vmware_nsx/plugins/nsx_v/vshield/edge_utils.py index 6792d6312e..f54806ff11 100644 --- a/vmware_nsx/plugins/nsx_v/vshield/edge_utils.py +++ b/vmware_nsx/plugins/nsx_v/vshield/edge_utils.py @@ -1032,8 +1032,7 @@ class EdgeManager(object): # Set gateway for static binding static_config['defaultGateway'] = subnet['gateway_ip'] # set primary and secondary dns - name_servers = [dns['address'] - for dns in subnet['dns_nameservers']] + name_servers = subnet['dns_nameservers'] # if no nameservers have been configured then use the ones # defined in the configuration name_servers = name_servers or cfg.CONF.nsxv.nameservers