'Obtain project id by project name.'

def _get_project_id(self, name):

    if (self.keystone.version == 'v3'):
        project = self.keystone.projects.find(name=name)
    else:
        project = self.keystone.tenants.find(name=name)
    return project.id
