'Get project id from request url if present or empty string
otherwise'

def _get_project_id(self, request):

    project_id = request.environ['nova.context'].project_id
    if (project_id in request.url):
        return project_id
    return ''
