<s> """<STR_LIT>""" <EOL> import logging <EOL> from functionaltests . base import BaseTestCase <EOL> from functionaltests . common import config <EOL> from barbicanclient import client <EOL> from keystoneclient . auth import identity <EOL> from keystoneclient import session <EOL> CONF = config . get_config ( ) <EOL> class TestCase ( BaseTestCase ) : <EOL> def setUp ( self ) : <EOL> self . LOG . info ( '<STR_LIT>' , self . _testMethodName ) <EOL> super ( TestCase , self ) . setUp ( ) <EOL> if '<STR_LIT>' in CONF . identity . auth_version : <EOL> self . auth = identity . v2 . Password ( <EOL> auth_url = CONF . identity . uri , <EOL> username = CONF . keymanager . username , <EOL> password = CONF . keymanager . password , <EOL> tenant_name = CONF . keymanager . project_name ) <EOL> else : <EOL> self . auth = identity . v3 . Password ( <EOL> auth_url = CONF . identity . uri_v3 , <EOL> username = CONF . keymanager . username , <EOL> user_domain_name = CONF . identity . domain_name , <EOL> password = CONF . keymanager . password , <EOL> project_name = CONF . keymanager . project_name , <EOL> project_domain_name = CONF . keymanager . project_domain_name ) <EOL> self . sess = session . Session ( auth = self . auth ) <EOL> self . barbicanclient = client . Client ( <EOL> endpoint = CONF . keymanager . url , <EOL> project_id = CONF . keymanager . project_id , <EOL> session = self . sess ) </s>
