コード例 #1
0
ファイル: proxy.py プロジェクト: kahowell/insights-rbac
 def _get_proxy_service(self):  # pylint: disable=no-self-use
     """Get proxy service host and port info from environment."""
     proxy_conn_info = {
         PROTOCOL:
         ENVIRONMENT.get_value("PRINCIPAL_PROXY_SERVICE_PROTOCOL",
                               default="https"),
         HOST:
         ENVIRONMENT.get_value("PRINCIPAL_PROXY_SERVICE_HOST",
                               default="localhost"),
         PORT:
         ENVIRONMENT.get_value("PRINCIPAL_PROXY_SERVICE_PORT",
                               default="443"),
         PATH:
         ENVIRONMENT.get_value("PRINCIPAL_PROXY_SERVICE_PATH",
                               default="/r/insights-services"),
         SOURCE_CERT:
         ENVIRONMENT.bool("PRINCIPAL_PROXY_SERVICE_SOURCE_CERT",
                          default=False),
         SSL_VERIFY:
         ENVIRONMENT.bool("PRINCIPAL_PROXY_SERVICE_SSL_VERIFY",
                          default=True),
         USER_ENV:
         ENVIRONMENT.get_value("PRINCIPAL_PROXY_USER_ENV", default="env"),
         CLIENT_ID:
         ENVIRONMENT.get_value("PRINCIPAL_PROXY_CLIENT_ID",
                               default="client_id"),
         API_TOKEN:
         ENVIRONMENT.get_value("PRINCIPAL_PROXY_API_TOKEN",
                               default="token"),
     }
     return proxy_conn_info
コード例 #2
0
 def _get_proxy_service(self):  # pylint: disable=no-self-use
     """Get proxy service host and port info from environment."""
     proxy_conn_info = {
         PROTOCOL:
         ENVIRONMENT.get_value('PRINCIPAL_PROXY_SERVICE_PROTOCOL',
                               default='https'),
         HOST:
         ENVIRONMENT.get_value('PRINCIPAL_PROXY_SERVICE_HOST',
                               default='localhost'),
         PORT:
         ENVIRONMENT.get_value('PRINCIPAL_PROXY_SERVICE_PORT',
                               default='443'),
         PATH:
         ENVIRONMENT.get_value('PRINCIPAL_PROXY_SERVICE_PATH',
                               default='/r/insights-services'),
         SOURCE_CERT:
         ENVIRONMENT.bool('PRINCIPAL_PROXY_SERVICE_SOURCE_CERT',
                          default=False),
         SSL_VERIFY:
         ENVIRONMENT.bool('PRINCIPAL_PROXY_SERVICE_SSL_VERIFY',
                          default=True),
         USER_ENV:
         ENVIRONMENT.get_value('PRINCIPAL_PROXY_USER_ENV', default='env'),
         CLIENT_ID:
         ENVIRONMENT.get_value('PRINCIPAL_PROXY_CLIENT_ID',
                               default='client_id'),
         API_TOKEN:
         ENVIRONMENT.get_value('PRINCIPAL_PROXY_API_TOKEN', default='token')
     }
     return proxy_conn_info