示例#1
0
    def _get_client(self):
        cloud_config = func_base.get_cloud_config()
        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)
        return v2_client.Client(session=ks_session)
    def _get_client(self):
        cloud_config = func_base.get_cloud_config()
        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)
        return v2_client.Client(session=ks_session)
    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
示例#4
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