Use osc session management

This patch allows us to use the congressclient without keystone if
one does not want to deploy keystone. To do this:

$ openstack --debug  --os-token  foo  --os-url  http://10.33.78.225:1789/ \
	congress datasource list

Change-Id: Ia7a44a021bb96a99e729424bf7b52bfa4e16d8c4
This commit is contained in:
Aaron Rosen
2015-02-11 19:33:29 -08:00
parent 9b10aded83
commit 30784a6596

View File

@@ -14,8 +14,6 @@
import logging
import keystoneclient
from congressclient.common import utils
LOG = logging.getLogger(__name__)
@@ -34,13 +32,8 @@ def make_client(instance):
API_NAME,
instance._api_version[API_NAME],
API_VERSIONS)
auth = keystoneclient.auth.identity.v2.Password(
auth_url=instance._auth_url,
username=instance._username,
password=instance._password, tenant_name=instance._project_name)
session = keystoneclient.session.Session(auth=auth)
LOG.debug('instantiating congress client: %s', congress_client)
return congress_client(session=session,
return congress_client(session=instance.session,
auth=None,
interface='publicURL',
service_type='policy',