def get_keystone_session(env):
    """Return a keystone session."""
    from keystoneclient.auth.identity import v2
    from keystoneclient.session import Session
    auth = v2.Password(auth_url=env['OS_AUTH_URL'], username=env[
        'OS_USERNAME'], password=env['OS_PASSWORD'], tenant_name=env[
        'OS_TENANT_NAME'])
    return Session(auth=auth)
