get/set_remote deal with relation data sent over the wire. get/set_local never leave the unit in question and are simply there as a way to associate information locally with a given remote unit. Generally speaking, get/set_local aren't actually what you want, and I wouldn't recommend using them. As for their implementation, get/set_local are basically just calling charmhelpers.core.unitdata.kv().get/set with a key derived from the conversation (e.g., the relation name and remote unit name), which stores data in a local sqlite database.
On Wed, Jun 7, 2017 at 11:27 PM, fengxia <fx...@lenovo.com> wrote: > Hi Juju, > > provide and require are two ends of a pipe. If I use set_remote() from > provide, require side can use get_remote() to retrieve the exchanged data. > My question is, from require's prospective, shouldn't it be "get_local"? > > When provide set_remote or set_local, where is the data stored, and how > require knows to retrieve it? > > -- > Feng xia > Engineer > Lenovo USA > > Phone: 5088011794 > fx...@lenovo.com > > Lenovo.com > Twitter | Facebook | Instagram | Blogs | Forums > > > -- > Juju mailing list > Juju@lists.ubuntu.com > Modify settings or unsubscribe at: https://lists.ubuntu.com/mailm > an/listinfo/juju >
-- Juju mailing list Juju@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/juju