'Create a group_snapshot object.'

def _create_group_snapshot(self, group_id, volume_ids, size='0'):

    grpsnap = objects.GroupSnapshot(self.context)
    grpsnap.user_id = fake.USER_ID
    grpsnap.project_id = fake.PROJECT_ID
    grpsnap.group_id = group_id
    grpsnap.status = fields.GroupStatus.CREATING
    grpsnap.create()
    for volume_id in volume_ids:
        snaps = []
        snap = objects.Snapshot(context.get_admin_context())
        snap.volume_size = size
        snap.user_id = fake.USER_ID
        snap.project_id = fake.PROJECT_ID
        snap.volume_id = volume_id
        snap.status = fields.SnapshotStatus.AVAILABLE
        snap.group_snapshot_id = grpsnap.id
        snap.create()
        snaps.append(snap)
    return (grpsnap, snaps)
