def _get_connect_string(backend, user='openstack_citest', passwd='openstack_citest', database='openstack_citest'):
 if (backend == 'mysql'):
  backend = 'mysql+mysqldb'
 elif (backend == 'postgres'):
  backend = 'postgresql+psycopg2'
 return ('%(backend)s://%(user)s:%(passwd)s@localhost/%(database)s' % locals())

def _get_connect_string ( backend , user = 'openstack_citest' , passwd = 'openstack_citest' , database = 'openstack_citest' ) : if ( backend == 'mysql' ) : backend = 'mysql+mysqldb' elif ( backend == 'postgres' ) : backend = 'postgresql+psycopg2' return ( '%(backend)s://%(user)s:%(passwd)s@localhost/%(database)s' % locals ( ) )
try to get a connection with a very specific set of values .