Add support for interface and service
Change-Id: I79af53c779e7b31e943cd3d3b3e3e446bce59707
This commit is contained in:
parent
e84810500f
commit
ad6bb2221c
@ -54,11 +54,17 @@ class BaseDesignateClient(RestClient):
|
||||
|
||||
def __init__(self, with_token=True):
|
||||
no_cert_check = cfg.CONF.testconfig.disable_ssl_certificate_validation
|
||||
|
||||
interface = cfg.CONF.designate.interface
|
||||
if not interface.endswith('URL'):
|
||||
interface += "URL"
|
||||
|
||||
super(BaseDesignateClient, self).__init__(
|
||||
auth_provider=self.get_auth_provider(with_token),
|
||||
service='dns',
|
||||
service=cfg.CONF.designate.service,
|
||||
region=cfg.CONF.identity.region,
|
||||
disable_ssl_certificate_validation=no_cert_check,
|
||||
endpoint_type=interface
|
||||
)
|
||||
|
||||
def get_auth_provider(self, with_token=True):
|
||||
|
@ -64,7 +64,9 @@ cfg.CONF.register_opts([
|
||||
], group='noauth')
|
||||
|
||||
cfg.CONF.register_opts([
|
||||
cfg.ListOpt('nameservers', default=["127.0.0.1:53"])
|
||||
cfg.ListOpt('nameservers', default=["127.0.0.1:53"]),
|
||||
cfg.StrOpt('interface', default='public'),
|
||||
cfg.StrOpt('service', default='dns')
|
||||
], group="designate")
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user