LEFT | RIGHT |
(no file at all) | |
| 1 Implicit relations |
| 2 =================== |
| 3 |
| 4 Implicit relations allow for interested services to gather |
| 5 lifecycle-oriented events and data about other services without |
| 6 expecting or requiring any modifications on the part of the author of |
| 7 the other service's charm. |
| 8 |
| 9 Implicit relationships are named in the reserved the juju-* |
| 10 namespace. Both the relation name and interface names provided by juju |
| 11 are prefixed with `juju-`. Charms attempting to provide new |
| 12 relationships in this namespace will trigger an error. |
| 13 |
| 14 Juju currently provides one implicit relationship to all deployed |
| 15 services. |
| 16 |
| 17 `juju-info`, if specified would look like:: |
| 18 |
| 19 provides: |
| 20 juju-info: |
| 21 interface: juju-info |
| 22 |
| 23 The charm author should not declare the `juju-info` relation and is |
| 24 provided here only as an example. The `juju-info` relation is |
| 25 implicitly provided by all charms, and enables the requiring unit to |
| 26 obtain basic details about the related-to unit. The following settings |
| 27 will be implicitly provided by the remote unit in a relation through its |
| 28 `juju-info` relation :: |
| 29 |
| 30 private-address |
| 31 public-address |
| 32 |
| 33 |
| 34 Relationship resolution |
| 35 ----------------------- |
| 36 |
| 37 If **rsyslog** is a :doc:`subordinate charm<subordinate-services>` and |
| 38 requires a valid `scope: container` relationship in order to |
| 39 deploy. It can take advantage of optional support from the principal |
| 40 charm but in the event that the principal charm doesn't provide this |
| 41 support it will still require a `scope: container` relationship. In |
| 42 this event the logging charm author can take advantage of the implicit |
| 43 relationship offered by all charms, `juju-info`. :: |
| 44 |
| 45 requires: |
| 46 logging: |
| 47 interface: logging-directory |
| 48 scope: container |
| 49 juju-info: |
| 50 interface: juju-info |
| 51 scope: container |
| 52 |
| 53 The admin then issues the following :: |
| 54 |
| 55 juju add-relation wordpress rsyslog |
| 56 |
| 57 If the wordpress author doesn't provide the `logging-directory` |
| 58 interface juju will use the less-specific (in the sense that it likely |
| 59 provides less information) `juju-info` interface. |
| 60 |
| 61 juju always attempts to match user provided interfaces before looking |
| 62 for possible relationship matches in the `juju-*` namespace. |
LEFT | RIGHT |