Remove hardcoded host 43/18143/1
authorThomas Duval <thomas.duval@orange.com>
Mon, 8 Aug 2016 11:52:04 +0000 (13:52 +0200)
committerThomas Duval <thomas.duval@orange.com>
Mon, 8 Aug 2016 11:52:04 +0000 (13:52 +0200)
Change-Id: Id058e674190fe7e728d79a276145aac27661f365

keystone-moon/keystone/contrib/moon/controllers.py

index b4413db..d3f1bfa 100644 (file)
@@ -860,6 +860,7 @@ class MoonAuth(controller.V3Controller):
                 return project
 
     def get_token(self, context, **kw):
+        master_url = CONF.moon.master
         data_auth = {
             "auth": {
                 "identity": {
@@ -894,7 +895,7 @@ class MoonAuth(controller.V3Controller):
                         "title": "UnScopedToken"
                     }}
 
-        req = requests.post("http://localhost:5000/v3/auth/tokens",
+        req = requests.post("{}/v3/auth/tokens".format(master_url),
                             json=data_auth,
                             headers={"Content-Type": "application/json"}
                             )