Finding out the service name from within a hook

Christopher Glass tribaal at gmail.com
Mon Oct 20 11:55:46 UTC 2014


Y's unit name should be accessible through "$JUJU_REMOTE_UNIT" from
X's relation-joined hook.
See http://juju-docs.readthedocs.org/en/latest/internals/unit-agent-hooks.html

Hope this helps!

- Chris

On Mon, Oct 20, 2014 at 2:52 PM, Andreas Hasenack <andreas at canonical.com> wrote:
> Hi,
>
> let's say I have two services, called X and Y, and they established a
> relation.
>
> From within a relation joined or changed hook, how can I find out the
> service names? For example, when running -joined on X, how can I find out
> Y's name?
>
>
> --
> Juju mailing list
> Juju at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/juju
>



More information about the Juju mailing list