Forráskód Böngészése

HUE-6513 [optimizer] Rename config property to auth_key_id

Romain Rigaux 8 éve
szülő
commit
a966c48

+ 1 - 1
desktop/conf.dist/hue.ini

@@ -1636,7 +1636,7 @@
     ## hostname=navoptapi.optimizer.cloudera.com
 
     # The name of the key of the service.
-    ## auth_key=e0819f3a-1e6f-4904-be69-5b704bacd1245
+    ## auth_key_id=e0819f3a-1e6f-4904-be69-5b704bacd1245
 
     # The private part of the key associated with the auth_key.
     ## auth_key_secret='-----BEGIN PRIVATE KEY....'

+ 1 - 1
desktop/conf/pseudo-distributed.ini.tmpl

@@ -1640,7 +1640,7 @@
     ## hostname=navoptapi.optimizer.cloudera.com
 
     # The name of the key of the service.
-    ## auth_key=e0819f3a-1e6f-4904-be69-5b704bacd1245
+    ## auth_key_id=e0819f3a-1e6f-4904-be69-5b704bacd1245
 
     # The private part of the key associated with the auth_key.
     ## auth_key_secret='-----BEGIN PRIVATE KEY....'

+ 3 - 3
desktop/libs/metadata/src/metadata/conf.py

@@ -49,7 +49,7 @@ def get_optimizer_url():
   return OPTIMIZER.HOSTNAME.get() and OPTIMIZER.HOSTNAME.get().strip('/')
 
 def has_optimizer():
-  return bool(OPTIMIZER.AUTH_KEY.get())
+  return bool(OPTIMIZER.AUTH_KEY_ID.get())
 
 
 def get_navigator_url():
@@ -77,8 +77,8 @@ OPTIMIZER = ConfigSection(
       help=_t('Hostname to Optimizer API or compatible service.'),
       default='navoptapi.optimizer.cloudera.com'),
 
-    AUTH_KEY=Config(
-      key="auth_key",
+    AUTH_KEY_ID=Config(
+      key="auth_key_id",
       help=_t("The name of the key of the service."),
       private=False,
       default=None),

+ 1 - 1
desktop/libs/metadata/src/metadata/optimizer_client.py

@@ -87,7 +87,7 @@ class OptimizerApi(object):
   def __init__(self, user, api_url=None, auth_key=None, auth_key_secret=None, tenant_id=None):
     self.user = user
     self._api_url = (api_url or get_optimizer_url()).strip('/')
-    self._auth_key = auth_key if auth_key else OPTIMIZER.AUTH_KEY.get()
+    self._auth_key = auth_key if auth_key else OPTIMIZER.AUTH_KEY_ID.get()
     self._auth_key_secret = auth_key_secret if auth_key_secret else (OPTIMIZER.AUTH_KEY_SECRET.get() and OPTIMIZER.AUTH_KEY_SECRET.get().replace('\\n', '\n'))
 
     self._api = ApiLib("navopt", self._api_url, self._auth_key, self._auth_key_secret)