'Create a group object.'

def _create_group(self, ctxt=None, name='test_group', description='this    is    a    test    group', group_type_id=fake.GROUP_TYPE_ID, volume_type_ids=[fake.VOLUME_TYPE_ID], availability_zone='az1', host='fakehost', status=fields.GroupStatus.CREATING, replication_status=fields.ReplicationStatus.DISABLED, **kwargs):

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