'Try to return a placement group by name.
If the group is not found, attempt to create it.'

def get_or_create_placement_group(self, name):

    try:
        return self.get_placement_group(name)
    except exception.PlacementGroupDoesNotExist:
        pg = self.create_placement_group(name)
        return pg
