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
This commit is contained in:
Adit Sarfaty 2018-03-01 11:01:18 +02:00
parent 2a81af0b7f
commit 7b26f1a98f

View File

@ -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,