def add_actor(self, actor, node_id, cb=None):
        _log.debug("Add actor %s id %s" % (actor, node_id))
        data = {"name": actor.name, "type": actor._type, "node_id": node_id}
        inports = []
        for p in actor.inports.values():
            port = {"id": p.id, "name": p.name}
            inports.append(port)
            self.add_port(p, node_id, actor.id, "in")
        data["inports"] = inports
        outports = []
        for p in actor.outports.values():
            port = {"id": p.id, "name": p.name}
            outports.append(port)
            self.add_port(p, node_id, actor.id, "out")
        data["outports"] = outports
        data["is_shadow"] = isinstance(actor, ShadowActor)
        self.set(prefix="actor-", key=actor.id, value=data, cb=cb)
Add actor and its ports to storage
dataset/ETHPy150Open EricssonResearch/calvin-base/calvin/runtime/north/storage.py/Storage.add_actor