Skip to content

Commit bb6f4c4

Browse files
docs: use noun relation instead of noun integration
1 parent d3311f4 commit bb6f4c4

17 files changed

+36
-36
lines changed

docs/explanation/charm-relation-interfaces.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33

44
> See also: {ref}`manage-interfaces`
55
6-
[`charm-relation-interfaces`](https://github.com/canonical/charm-relation-interfaces) is a repository containing specifications, databag schemas and interface tests for Juju relation interfaces. In other words, it is the source of truth for data and behavior of providers and requirers of integrations.
6+
[`charm-relation-interfaces`](https://github.com/canonical/charm-relation-interfaces) is a repository containing specifications, databag schemas and interface tests for Juju relation interfaces. In other words, it is the source of truth for data and behavior of providers and requirers of relations.
77

8-
The purpose of this project is to provide uniformity in the landscape of all possible integrations and promote charm interoperability.
8+
The purpose of this project is to provide uniformity in the landscape of all possible relations and promote charm interoperability.
99

10-
Juju interfaces are untyped, which means that for juju to think two charms can be integrated all it looks at is whether the interface names of the two endpoints you're trying to connect are the same string. But it might be that the two charms have different, incompatible implementations of two different integrations that happen to have the same name.
10+
Juju interfaces are untyped, which means that for juju to think two charms can be integrated all it looks at is whether the interface names of the two endpoints you're trying to connect are the same string. But it might be that the two charms have different, incompatible implementations of two different relations that happen to have the same name.
1111

12-
In order to prevent two separate charms from rolling their own integration with the same name, and prevent a sprawl of many subtly different interfaces with similar semantics and similar purposes, we introduced `charm-relation-interfaces`.
12+
In order to prevent two separate charms from rolling their own relation with the same name, and prevent a sprawl of many subtly different interfaces with similar semantics and similar purposes, we introduced `charm-relation-interfaces`.
1313

1414
## Using `charm-relation-interfaces`
1515

@@ -37,7 +37,7 @@ For each interface, the charm-relation-interfaces repository hosts:
3737

3838

3939
## Charm relation interfaces in Charmhub
40-
In the future, Charmhub will have a searchable collection of integration interfaces.
40+
In the future, Charmhub will have a searchable collection of relation interfaces.
4141
Charmhub will, for all charms using the interface, verify that they implement it correctly (regardless of whether they use the 'official' implementation or they roll their own) in order to give the charm a happy checkmark on `charmhub.io`. In order to do that it will need to fetch the specification (from `charm-relation-interfaces`) *and* the charm repo, because we can't know what implementation they are using: we need the source code.
4242

4343

docs/explanation/interface-tests.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Interface tests are tests that verify the compliance of a charm with an interface specification.
66
Interface specifications, stored in {ref}`charm-relation-interfaces <charm-relation-interfaces>`, are contract definitions that mandate how a charm should behave when integrated with another charm over a registered interface.
77

8-
Interface tests will allow `charmhub` to validate the integrations of a charm and verify that your charm indeeed supports "the" `ingress` interface and not just an interface called "ingress", which happens to be the same name as "the official `ingress` interface v2" as registered in charm-relation-interfaces (see [here](https://github.com/canonical/charm-relation-interfaces/tree/main/interfaces/ingress/v2)).
8+
Interface tests will allow `charmhub` to validate the relations of a charm and verify that your charm indeeed supports "the" `ingress` interface and not just an interface called "ingress", which happens to be the same name as "the official `ingress` interface v2" as registered in charm-relation-interfaces (see [here](https://github.com/canonical/charm-relation-interfaces/tree/main/interfaces/ingress/v2)).
99

1010
Also, they allow alternative implementations of an interface to validate themselves against the contractual specification stored in charm-relation-interfaces, and they help verify compliance with multiple versions of an interface.
1111

docs/explanation/testing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Integration tests typically take significantly longer to run than unit tests.
5858
**Coverage.**
5959

6060
* Charm actions
61-
* Charm integrations
61+
* Charm relations
6262
* Charm configurations
6363
* That the workload is up and running, and responsive
6464
* Upgrade sequence

docs/howto/get-started-with-charm-testing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ The "inputs" of a charm run are therefore:
6464
- integration (relation) data
6565
- stored state
6666

67-
Only the event context is guaranteed to be present. The other input sources are optional, but typically a charm will have at least some config and a few integrations adding to its inputs.
67+
Only the event context is guaranteed to be present. The other input sources are optional, but typically a charm will have at least some config and a few relations adding to its inputs.
6868

6969
The charm code executes and typically produces side-effects aimed at its workload (for example: it writes files to a disk, runs commands on a system, or reconfigures a process) or at other charms it integrates with (for example: it writes relation data). We call this 'operating' a workload, and that is what a charm is meant to do. The ways in which a charm operates can be roughly categorised as:
7070

docs/howto/manage-libraries.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ def test_my_object_data(context, endpoint, n_relations):
220220

221221
Fetch the library.
222222

223-
In your `src/charm.py`, observe the custom events it puts at your disposal. For example, a database library may have provided a `database_relation_ready` event -- a high-level wrapper around the relevant `juju` relation events -- so you use it to manage the database integration in your charm as below:
223+
In your `src/charm.py`, observe the custom events it puts at your disposal. For example, a database library may have provided a `database_relation_ready` event -- a high-level wrapper around the relevant `juju` relation events -- so you use it to manage the database relation in your charm as below:
224224

225225
```python
226226

docs/howto/manage-relations.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# How to manage relations
33
> See first: {external+juju:ref}`Juju | Relation <relation>`, {external+juju:ref}`Juju | Manage relations <manage-relations>`, {external+charmcraft:ref}`Charmcraft | Manage relations <manage-relations>`
44
5-
To add integration capabilities to a charm, you’ll have to define the relation in your charm’s charmcraft.yaml file and then add relation event handlers in your charm’s `src/charm.py` file.
5+
To add relation capabilities to a charm, you’ll have to define the relation in your charm’s charmcraft.yaml file and then add relation event handlers in your charm’s `src/charm.py` file.
66

77
## Implement the feature
88

@@ -65,7 +65,7 @@ Other than this, implement a subordinate relation in the same way as any other r
6565

6666
#### Using a charm library
6767

68-
For most integrations, you will now want to progress with using the charm library recommended by the charm that you are integrating with. Read the documentation for the other charm on Charmhub and follow the instructions, which will typically involve adding a requirer object in your charm’s `__init__` and then observing custom events.
68+
For most relations, you will now want to progress with using the charm library recommended by the charm that you are integrating with. Read the documentation for the other charm on Charmhub and follow the instructions, which will typically involve adding a requirer object in your charm’s `__init__` and then observing custom events.
6969

7070
In most cases, the charm library will handle observing the Juju relation events, and your charm will only need to interact with the library’s custom API. Come back to this guide when you are ready to add tests.
7171

docs/howto/write-integration-tests-for-a-charm.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ For `oci-images` you can reference an image registry.
132132

133133
### Test a relation
134134

135-
To test an integration between two applications, you can just integrate them through
135+
To test a relation between two applications, you can just integrate them through
136136
the model. Both applications have to be deployed beforehand.
137137

138138
```

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ The library provides:
2424
- {ref}`ops_testing`, the recommended API for unit testing charms
2525
- {ref}`ops_testing_harness`, the deprecated API for unit testing charms
2626

27-
You can structure your charm however you like, but with the `ops` library, you get a framework that promotes consistency and readability by following best practices. It also helps you organise your code better by separating different aspects of the charm, such as managing the application's state, handling integrations with other services, and making the charm easier to test.
27+
You can structure your charm however you like, but with the `ops` library, you get a framework that promotes consistency and readability by following best practices. It also helps you organise your code better by separating different aspects of the charm, such as managing the application's state, handling integrating with other services, and making the charm easier to test.
2828

2929

3030
---------

docs/reference/ops-testing.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Juju state all at once, define the Juju context against which to test the charm,
1111
and fire a single event on the charm to execute its logic. The tests can then
1212
assert that the Juju state has changed as expected.
1313

14-
A very simple test, where the charm has no config, no integrations, the unit
14+
A very simple test, where the charm has no config, no relations, the unit
1515
is the leader, and has a `start` handler that sets the status to active might
1616
look like this:
1717

@@ -38,8 +38,8 @@ Writing these tests should nudge you into thinking of a charm as a black-box
3838
'input to output' function. The inputs are:
3939

4040
- Event: why am I, the charm, being executed
41-
- State: am I the leader? what is my integration data? what is my config?
42-
- Context: what integrations can I have? what containers can I have?
41+
- State: am I the leader? what is my relation data? what is my config?
42+
- Context: what relations can I have? what containers can I have?
4343

4444
The output is another `State`: the state after
4545
the charm has interacted with the mocked Juju model.

docs/tutorial/from-zero-to-hero-write-your-first-kubernetes-charm/integrate-your-charm-with-postgresql.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Well done, you've got everything you need to set up a database relation!
4747
## Define the charm relation interface
4848

4949
<!--
50-
Charm integration interfaces are described in the `charmcraft.yaml` file. To connect to the PostgreSQL charm, we will need to find out the name of the interface that PostgreSQL exposes so other charms can connect to it and then update our `charmcraft.yaml` file.
50+
Charm relation interfaces are described in the `charmcraft.yaml` file. To connect to the PostgreSQL charm, we will need to find out the name of the interface that PostgreSQL exposes so other charms can connect to it and then update our `charmcraft.yaml` file.
5151
-->
5252

5353
Now, time to define the charm relation interface.
@@ -243,12 +243,12 @@ def _on_database_created(self, event: DatabaseCreatedEvent) -> None:
243243
self._update_layer_and_restart()
244244
```
245245

246-
The diagram below illustrates the workflow for the case where the database integration exists and for the case where it does not:
246+
The diagram below illustrates the workflow for the case where the database relation exists and for the case where it does not:
247247

248248
![Integrate your charm with PostgreSQL](../../resources/integrate_your_charm_with_postgresql.png)
249249

250250

251-
## Update the unit status to reflect the integration state
251+
## Update the unit status to reflect the relation state
252252

253253
Now that the charm is getting more complex, there are many more cases where the unit status needs to be set. It's often convenient to do this in a more declarative fashion, which is where the collect-status event can be used.
254254

@@ -322,7 +322,7 @@ Now, integrate our charm with the newly deployed `postgresql-k8s` charm:
322322
juju integrate postgresql-k8s demo-api-charm
323323
```
324324

325-
> Read more: [Integration](https://juju.is/docs/olm/integration), [`juju integrate`](https://juju.is/docs/olm/juju-integrate)
325+
> Read more: [Relation (integration)](https://canonical-juju.readthedocs-hosted.com/en/latest/user/reference/relation/), [`juju integrate`](https://canonical-juju.readthedocs-hosted.com/en/latest/user/reference/juju-cli/list-of-juju-cli-commands/integrate/)
326326

327327

328328
Finally, run:
@@ -379,7 +379,7 @@ This should produce something similar to the output below (of course, with the n
379379
{"names":{"1":"maksim","2":"simon"}}
380380
```
381381

382-
Congratulations, your integration with PostgreSQL is functional!
382+
Congratulations, your relation with PostgreSQL is functional!
383383

384384
## Review the final code
385385

docs/tutorial/from-zero-to-hero-write-your-first-kubernetes-charm/observe-your-charm-with-cos-lite.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Note: When you rebuild your charm with `charmcraft pack`, Charmcraft will copy t
6767

6868
### Define the Prometheus relation interface
6969

70-
In your `charmcraft.yaml` file, before the `peers` block, add a `provides` endpoint with relation name `metrics-endpoint` and interface name `prometheus_scrape`, as below. This declares that your charm can offer services to other charms over the `prometheus-scrape` interface. In short, that your charm is open to integrations with, for example, the official Prometheus charm. (Note: `metrics-endpoint` is the default relation name recommended by the `prometheus_scrape` interface library.)
70+
In your `charmcraft.yaml` file, before the `peers` block, add a `provides` endpoint with relation name `metrics-endpoint` and interface name `prometheus_scrape`, as below. This declares that your charm can offer services to other charms over the `prometheus-scrape` interface. In short, that your charm is open to integrating with, for example, the official Prometheus charm. (Note: `metrics-endpoint` is the default relation name recommended by the `prometheus_scrape` interface library.)
7171

7272
```yaml
7373
provides:
@@ -139,7 +139,7 @@ Note: When you rebuild your charm with `charmcraft pack`, Charmcraft will copy t
139139

140140
### Define the Loki relation interface
141141

142-
In your `charmcraft.yaml` file, beneath your existing `requires` endpoint, add another `requires` endpoint with relation name `log-proxy` and interface name `loki_push_api`. This declares that your charm can optionally make use of services from other charms over the `loki_push_api` interface. In short, that your charm is open to integrations with, for example, the official Loki charm. (Note: `log-proxy` is the default relation name recommended by the `loki_push_api` interface library.)
142+
In your `charmcraft.yaml` file, beneath your existing `requires` endpoint, add another `requires` endpoint with relation name `log-proxy` and interface name `loki_push_api`. This declares that your charm can optionally make use of services from other charms over the `loki_push_api` interface. In short, that your charm is open to integrating with, for example, the official Loki charm. (Note: `log-proxy` is the default relation name recommended by the `loki_push_api` interface library.)
143143

144144

145145
```yaml
@@ -203,7 +203,7 @@ Note: The `grafana_dashboard` library also depends on the [`juju_topology`](htt
203203

204204
### Define the Grafana relation interface
205205

206-
In your `charmcraft.yaml` file, add another `provides` endpoint with relation name `grafana-dashboard` and interface name `grafana_dashboard`, as below. This declares that your charm can offer services to other charms over the `grafana-dashboard` interface. In short, that your charm is open to integrations with, for example, the official Grafana charm. (Note: Here `grafana-dashboard` endpoint is the default relation name recommended by the `grafana_dashboard` library.)
206+
In your `charmcraft.yaml` file, add another `provides` endpoint with relation name `grafana-dashboard` and interface name `grafana_dashboard`, as below. This declares that your charm can offer services to other charms over the `grafana-dashboard` interface. In short, that your charm is open to integrating with, for example, the official Grafana charm. (Note: Here `grafana-dashboard` endpoint is the default relation name recommended by the `grafana_dashboard` library.)
207207

208208
```yaml
209209
provides:
@@ -287,9 +287,9 @@ juju deploy cos-lite --trust
287287
```
288288

289289

290-
### Expose the application integration endpoints
290+
### Expose the application relation endpoints
291291

292-
Once all the COS Lite applications are deployed and settled down (you can monitor this by using `juju status --watch 2s`), expose the integration points you are interested in for your charm -- `loki:logging`, `grafana-dashboard`, and `metrics-endpoint` -- as below.
292+
Once all the COS Lite applications are deployed and settled down (you can monitor this by using `juju status --watch 2s`), expose the relation points you are interested in for your charm -- `loki:logging`, `grafana-dashboard`, and `metrics-endpoint` -- as below.
293293

294294
```text
295295
juju offer prometheus:metrics-endpoint

ops/charm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ def restore(self, snapshot: Dict[str, Any]):
550550
class RelationCreatedEvent(RelationEvent):
551551
"""Event triggered when a new relation is created.
552552
553-
This is triggered when a new integration with another app is added in Juju. This
553+
This is triggered when a new relation with another app is added in Juju. This
554554
can occur before units for those applications have started. All existing
555555
relations will trigger `RelationCreatedEvent` before :class:`~ops.StartEvent` is
556556
emitted.

ops/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ def get_relation(
253253
given application has more than one relation on a given endpoint.
254254
255255
Raises:
256-
TooManyRelatedAppsError: is raised if there is more than one integration with the
256+
TooManyRelatedAppsError: is raised if there is more than one relation with the
257257
supplied relation_name and no relation_id was supplied
258258
"""
259259
return self.relations._get_unique(relation_name, relation_id)

testing/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ remote_unit_2_is_joining_event = ctx.on.relation_joined(relation, remote_unit=2)
414414

415415
## Networks
416416

417-
Simplifying a bit the Juju "spaces" model, each integration endpoint a charm defines in its metadata is associated with a network. Regardless of whether there is a living relation over that endpoint, that is.
417+
Simplifying a bit the Juju "spaces" model, each relation endpoint a charm defines in its metadata is associated with a network. Regardless of whether there is a living relation over that endpoint, that is.
418418

419419
If your charm has a relation `"foo"` (defined in its metadata), then the charm will be able at runtime to do `self.model.get_binding("foo").network`.
420420
The network you'll get by doing so is heavily defaulted (see `state.Network`) and good for most use-cases because the charm should typically not be concerned about what IP it gets.

testing/src/scenario/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
2121
Writing these tests should nudge you into thinking of a charm as a black-box
2222
input->output function. The input is the union of an `Event` (why am I, charm,
23-
being executed), a `State` (am I leader? what is my integration data? what is my
24-
config?...) and the charm's execution `Context` (what integrations can I have?
23+
being executed), a `State` (am I leader? what is my relation data? what is my
24+
config?...) and the charm's execution `Context` (what relations can I have?
2525
what containers can I have?...). The output is another `State`: the state after
2626
the charm has had a chance to interact with the mocked Juju model and affect the
2727
state.
@@ -49,7 +49,7 @@
4949
assertions on APIs and state internal to it.
5050
5151
The most basic scenario is one in which all is defaulted and barely any data is
52-
available. The charm has no config, no integrations, no leadership, and its
52+
available. The charm has no config, no relations, no leadership, and its
5353
status is `unknown`. With that, we can write the simplest possible test:
5454
5555
.. code-block:: python

testing/src/scenario/_consistency_checker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ def check_network_consistency(
534534
endpoints = {endpoint for endpoint, _ in all_relations}
535535
if collisions := endpoints.intersection(meta_bindings):
536536
errors.append(
537-
f"Extra bindings and integration endpoints cannot share the same name: {collisions}.",
537+
f"Extra bindings and relation endpoints cannot share the same name: {collisions}.",
538538
)
539539

540540
return Results(errors, [])

0 commit comments

Comments
 (0)