'Create a consistency group object.'

def _create_consistencygroup(self, ctxt=None, name='test_consistencygroup', description='this    is    a    test    consistency    group', group_type_id=fake.GROUP_TYPE_ID, volume_type_ids=[fake.VOLUME_TYPE_ID], availability_zone='az1', host='fakehost', status=fields.ConsistencyGroupStatus.CREATING, **kwargs):

    ctxt = (ctxt or self.ctxt)
    consistencygroup = objects.Group(ctxt)
    consistencygroup.user_id = fake.USER_ID
    consistencygroup.project_id = fake.PROJECT_ID
    consistencygroup.availability_zone = availability_zone
    consistencygroup.name = name
    consistencygroup.description = description
    consistencygroup.group_type_id = group_type_id
    consistencygroup.volume_type_ids = volume_type_ids
    consistencygroup.host = host
    consistencygroup.status = status
    consistencygroup.update(kwargs)
    consistencygroup.create()
    return consistencygroup
