NSXv DNS integration

Complete NSXv integration with openstack/designate

Change-Id: I8b66fcc438c600bb736551acd2f3afa41714d40d
This commit is contained in:
Kobi Samoray 2018-01-31 17:19:06 +02:00
parent 4d7f8894ad
commit 2b39fb3487
2 changed files with 24 additions and 0 deletions

View File

@ -311,6 +311,11 @@ class DNSExtensionDriverNSXv(DNSExtensionDriver):
dns_driver = _get_dns_driver() dns_driver = _get_dns_driver()
if not dns_driver: if not dns_driver:
return True return True
provider_type = network.get('provider:network_type')
if not provider_type:
return True
if network['router:external']: if network['router:external']:
return True return True
return False return False

View File

@ -1937,6 +1937,9 @@ class NsxVPluginV2(addr_pair_db.AllowedAddressPairsMixin,
port_model = self._get_port(context, port_data['id']) port_model = self._get_port(context, port_data['id'])
resource_extend.apply_funcs('ports', port_data, port_model) resource_extend.apply_funcs('ports', port_data, port_model)
self._remove_provider_security_groups_from_list(port_data) self._remove_provider_security_groups_from_list(port_data)
kwargs = {'context': context, 'port': neutron_db}
registry.notify(resources.PORT, events.AFTER_CREATE, self, **kwargs)
return port_data return port_data
def _make_port_dict(self, port, fields=None, def _make_port_dict(self, port, fields=None,
@ -2382,6 +2385,14 @@ class NsxVPluginV2(addr_pair_db.AllowedAddressPairsMixin,
except Exception as e: except Exception as e:
LOG.error("Unable to update mac learning for port %s, " LOG.error("Unable to update mac learning for port %s, "
"reason: %s", id, e) "reason: %s", id, e)
kwargs = {
'context': context,
'port': ret_port,
'mac_address_updated': False,
'original_port': original_port,
}
registry.notify(resources.PORT, events.AFTER_UPDATE, self, **kwargs)
return ret_port return ret_port
def _extend_get_port_dict_qos(self, context, port): def _extend_get_port_dict_qos(self, context, port):
@ -2397,6 +2408,14 @@ class NsxVPluginV2(addr_pair_db.AllowedAddressPairsMixin,
def delete_port(self, context, id, l3_port_check=True, def delete_port(self, context, id, l3_port_check=True,
nw_gw_port_check=True, force_delete_dhcp=False, nw_gw_port_check=True, force_delete_dhcp=False,
allow_delete_internal=False): allow_delete_internal=False):
kwargs = {
'context': context,
'port_check': l3_port_check,
'port_id': id,
}
# Send delete port notification to any interested service plugin
registry.notify(resources.PORT, events.BEFORE_DELETE, self, **kwargs)
neutron_db_port = self.get_port(context, id) neutron_db_port = self.get_port(context, id)
device_id = neutron_db_port['device_id'] device_id = neutron_db_port['device_id']
is_compute_port = self._is_compute_port(neutron_db_port) is_compute_port = self._is_compute_port(neutron_db_port)