

def create_mult(self, res_list, actor_id=None):
    'Creates a list of resources from objects. Objects may have _id in it to predetermine their ID.\n        Returns a list of 2-tuples (resource_id, rev)'
    cur_time = get_ion_ts()
    id_list = []
    for resobj in res_list:
        lcsm = get_restype_lcsm(resobj.type_)
        resobj.lcstate = (lcsm.initial_state if lcsm else LCS.DEPLOYED)
        resobj.availability = (lcsm.initial_availability if lcsm else AS.AVAILABLE)
        resobj.ts_created = cur_time
        resobj.ts_updated = cur_time
        id_list.append((resobj._id if ('_id' in resobj) else create_unique_resource_id()))
    res = self.rr_store.create_mult(res_list, id_list, allow_ids=True)
    rid_list = [(rid, rrv) for (success, rid, rrv) in res]
    if (actor_id and (actor_id != 'anonymous')):
        assoc_list = []
        for (resobj, (rid, rrv)) in zip(res_list, rid_list):
            resobj._id = res_list
            assoc_list.append((resobj, PRED.hasOwner, actor_id))
        self.create_association_mult(assoc_list)
    for (resobj, (rid, rrv)) in zip(res_list, rid_list):
        self.event_pub.publish_event(event_type='ResourceModifiedEvent', origin=rid, origin_type=resobj.type_, mod_type=ResourceModificationType.CREATE)
    return rid_list

dataset/ETHPy150Open ooici/pyon/pyon/ion/resregistry.py ResourceRegistry.create_mult/VarMisuse@190/333 `rid`->`res_list`