From 7b26f1a98f2289fe678d067bf8c0f2214b1f27e5 Mon Sep 17 00:00:00 2001
From: Adit Sarfaty <asarfaty@vmware.com>
Date: Thu, 1 Mar 2018 11:01:18 +0200
Subject: [PATCH] NSX-V3: Fix AZ retrieving for DHCP profile

When getting the AZ of a network for its DHCP profile, we need to
use the az-by-id api, so that the hints data is initialized correctly

Change-Id: I47525564af3622899b4f9ea1284207ec5c007679
---
 vmware_nsx/plugins/nsx_v3/plugin.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vmware_nsx/plugins/nsx_v3/plugin.py b/vmware_nsx/plugins/nsx_v3/plugin.py
index 71e367047c..f0e07f4dc6 100644
--- a/vmware_nsx/plugins/nsx_v3/plugin.py
+++ b/vmware_nsx/plugins/nsx_v3/plugin.py
@@ -1372,7 +1372,7 @@ class NsxV3Plugin(agentschedulers_db.AZDhcpAgentSchedulerDbMixin,
         existing_ports = super(NsxV3Plugin, self).get_ports(
             context, filters={'network_id': [network['id']],
                               'fixed_ips': {'subnet_id': [subnet['id']]}})
-        az = self.get_network_az(network)
+        az = self.get_network_az_by_net_id(context, network['id'])
         port_data = {
             "name": "",
             "admin_state_up": True,