NSX|P dns integration support
based on the v3 integration Change-Id: Ie726525c7b1cd4006b932b280634df27b192db4e
This commit is contained in:
parent
33a93d8473
commit
45046b75ff
@ -61,6 +61,7 @@ neutron.ipam_drivers =
|
||||
vmware_nsx.extension_drivers =
|
||||
vmware_nsxv_dns = vmware_nsx.extension_drivers.dns_integration:DNSExtensionDriverNSXv
|
||||
vmware_nsxv3_dns = vmware_nsx.extension_drivers.dns_integration:DNSExtensionDriverNSXv3
|
||||
vmware_nsxp_dns = vmware_nsx.extension_drivers.dns_integration:DNSExtensionDriverNSXp
|
||||
vmware_dvs_dns = vmware_nsx.extension_drivers.dns_integration:DNSExtensionDriverDVS
|
||||
vmware_nsx.neutron.nsxv.router_type_drivers =
|
||||
shared = vmware_nsx.plugins.nsx_v.drivers.shared_router_driver:RouterSharedDriver
|
||||
|
@ -29,6 +29,7 @@ from oslo_log import log as logging
|
||||
from neutron.services.externaldns import driver
|
||||
|
||||
from vmware_nsx.common import driver_api
|
||||
from vmware_nsx.plugins.nsx_p import availability_zones as nsxp_az
|
||||
from vmware_nsx.plugins.nsx_v3 import availability_zones as nsx_az
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
@ -322,6 +323,7 @@ class DNSExtensionDriverNSXv3(DNSExtensionDriver):
|
||||
def initialize(self):
|
||||
self._availability_zones = nsx_az.NsxV3AvailabilityZones()
|
||||
LOG.info("DNSExtensionDriverNSXv3 initialization complete")
|
||||
self.config_dns_domain = cfg.CONF.nsx_v3.dns_domain
|
||||
|
||||
def _get_network_and_az(self, network_id, context):
|
||||
if not context:
|
||||
@ -346,10 +348,10 @@ class DNSExtensionDriverNSXv3(DNSExtensionDriver):
|
||||
_dotted_domain(DNS_DOMAIN_DEFAULT)):
|
||||
dns_domain = az.dns_domain
|
||||
# Global nsx_v3 dns domain
|
||||
elif (cfg.CONF.nsx_v3.dns_domain and
|
||||
(_dotted_domain(cfg.CONF.nsx_v3.dns_domain) !=
|
||||
elif (self.config_dns_domain and
|
||||
(_dotted_domain(self.config_dns_domain) !=
|
||||
_dotted_domain(DNS_DOMAIN_DEFAULT))):
|
||||
dns_domain = cfg.CONF.nsx_v3.dns_domain
|
||||
dns_domain = self.config_dns_domain
|
||||
# Global neutron dns domain
|
||||
elif cfg.CONF.dns_domain:
|
||||
dns_domain = cfg.CONF.dns_domain
|
||||
@ -370,6 +372,14 @@ class DNSExtensionDriverNSXv3(DNSExtensionDriver):
|
||||
return False
|
||||
|
||||
|
||||
class DNSExtensionDriverNSXp(DNSExtensionDriverNSXv3):
|
||||
|
||||
def initialize(self):
|
||||
self._availability_zones = nsxp_az.NsxPAvailabilityZones()
|
||||
LOG.info("DNSExtensionDriverNSXp initialization complete")
|
||||
self.config_dns_domain = cfg.CONF.nsx_p.dns_domain
|
||||
|
||||
|
||||
class DNSExtensionDriverDVS(DNSExtensionDriver):
|
||||
|
||||
def initialize(self):
|
||||
|
Loading…
Reference in New Issue
Block a user