'Create a consistency group.
If cg_snap_id or cg_id are specified then volume_type_id,
availability_zone, and host will be taken from the source Consistency
Group.'

def create(self, cg_snap_id=None, cg_id=None):

    if self.obj_attr_is_set('id'):
        raise exception.ObjectActionError(action='create', reason=_('already_created'))
    updates = self.cinder_obj_get_changes()
    if ('cgsnapshots' in updates):
        raise exception.ObjectActionError(action='create', reason=_('cgsnapshots    assigned'))
    if ('volumes' in updates):
        raise exception.ObjectActionError(action='create', reason=_('volumes    assigned'))
    if ('cluster' in updates):
        raise exception.ObjectActionError(action='create', reason=_('cluster    assigned'))
    db_consistencygroups = db.consistencygroup_create(self._context, updates, cg_snap_id, cg_id)
    self._from_db_object(self._context, self, db_consistencygroups)
