Add support for interface and service

Change-Id: I79af53c779e7b31e943cd3d3b3e3e446bce59707
This commit is contained in:
Endre Karlson 2015-11-12 14:24:12 +01:00
parent e84810500f
commit ad6bb2221c
2 changed files with 10 additions and 2 deletions

View File

@ -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):

View File

@ -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")