Adds auth_endpoint configutation option for pyrax

Change-Id: Ifc2d85397784010d17c4377e65674b4587893cc9
This commit is contained in:
Obulpathi
2014-12-10 09:45:35 -05:00
parent 776df7f176
commit 7ae747460e
2 changed files with 5 additions and 0 deletions

View File

@@ -81,6 +81,7 @@ shard_prefix = "cdn"
url = "poppycdn.net"
# You email associated with DNS, for notifications
email = "your@email.com"
auth_endpoint = ""
[drivers:provider:fastly]
apikey = "MYAPIKEY"

View File

@@ -37,6 +37,8 @@ RACKSPACE_OPTIONS = [
help='The url for customers to CNAME to'),
cfg.StrOpt('email', help='The email to be provided to Rackspace DNS for'
'creating subdomains'),
cfg.StrOpt('auth_endpoint', default='',
help='Authentication end point for DNS'),
]
RACKSPACE_GROUP = 'drivers:dns:rackspace'
@@ -52,6 +54,8 @@ class DNSProvider(base.Driver):
self._conf.register_opts(RACKSPACE_OPTIONS, group=RACKSPACE_GROUP)
self.rackdns_conf = self._conf[RACKSPACE_GROUP]
if self.rackdns_conf.auth_endpoint:
pyrax.set_setting("auth_endpoint", self.rackdns_conf.auth_endpoint)
pyrax.set_setting("identity_type", "rackspace")
pyrax.set_credentials(self.rackdns_conf.username,
self.rackdns_conf.api_key)