def _get_client(self):
     creds = func_base.credentials()
     session_params = {}
     ks_session = session.Session.construct(session_params)
     ks_discover = discover.Discover(session=ks_session,
                                     auth_url=creds['auth_url'])
     # At the moment, we use keystone v2 API
     v2_auth_url = ks_discover.url_for('2.0')
     return v2_client.Client(username=creds['username'],
                             password=creds['password'],
                             tenant_name=creds['project_name'],
                             auth_url=v2_auth_url)
    def _setup_creds(self):
        creds = func_base.credentials()
        cloud_config = func_base.get_cloud_config()

        # We're getting a session so we can find the v2 url via KSA
        keystone_auth = cloud_config.get_auth()
        (verify, cert) = cloud_config.get_requests_verify_args()

        ks_session = session.Session(
            auth=keystone_auth, verify=verify, cert=cert)

        # for the old HTTPClient, we use keystone v2 API, regardless of
        # whether v3 also exists or is configured
        v2_auth_url = keystone_auth.get_endpoint(
            ks_session, interface=ksa_plugin.AUTH_INTERFACE, version=(2, 0))
        return v2_auth_url, creds
Example #3
0
    def _setup_creds(self):
        creds = func_base.credentials()
        cloud_config = func_base.get_cloud_config()

        # We're getting a session so we can find the v2 url via KSA
        keystone_auth = cloud_config.get_auth()
        (verify, cert) = cloud_config.get_requests_verify_args()

        ks_session = session.Session(
            auth=keystone_auth, verify=verify, cert=cert)

        # for the old HTTPClient, we use keystone v2 API, regardless of
        # whether v3 also exists or is configured
        v2_auth_url = keystone_auth.get_endpoint(
            ks_session, interface=ksa_plugin.AUTH_INTERFACE, version=(2, 0))
        return v2_auth_url, creds
Example #4
0
 def _get_client(self):
     creds = func_base.credentials()
     return v2_client.Client(username=creds['username'],
                             password=creds['password'],
                             tenant_name=creds['tenant_name'],
                             auth_url=creds['auth_url'])
 def _get_client(self):
     creds = func_base.credentials()
     return v2_client.Client(username=creds['username'],
                             password=creds['password'],
                             tenant_name=creds['tenant_name'],
                             auth_url=creds['auth_url'])