I am implementing two charms to relate to one another, I have a tmux session now in one of the two charms, and I am trying to explore how to check in update-status incase Charm 1 can update some of it’s relation-set data… however…
I cannot figure out what I am supposed to do, to query the relation when outside the relation hooks
relation-get prints the value of a unit’s relation setting, specified by key.
If no key is given, or if the key is “-”, all keys and values will be printed.
While that’s mostly straightforward, the “if not key is given” bit definitely seems misleading, as the - is obviously required. It would be nice if that requirement were dropped and the tool would notice if you don’t specify a key and not assume that the unit name is the key.
I printed the output of relation-get --help for the very reason that it is not showing any dashes … and so I never knew to add one until I went to a random github gist … or am I just blind and there is a dash somewhere ?
All I see pertinent to this was the
relation-get [options] <key> <unit id>
no single dashes are present there, or maybe I am just misinterpreting what <key> is ?