canonical / charm-relation-interfaces

https://canonical.github.io/charm-relation-interfaces/
Apache License 2.0
16 stars 48 forks source link

[wip] facade charm #152

Open PietroPasotti opened 5 months ago

PietroPasotti commented 5 months ago

This PR adds a facade charm to this repository. The facade charm is a 'universal prorgrammable relation interface mocking charm'.

Charmcraft.yaml is dynamically generated, and to help people remember that they should regenerate it on each use, it's generated by tox -e pack and deleted afterwards.

The idea is:

Purpose:

See it in action: https://github.com/canonical/tempo-k8s-operator/pull/127/files#diff-0b4ff0c5a367926f20bde3d63ac17e8a1b14a6459e6a05e2ec6a0e2c654c1e3c

PietroPasotti commented 4 months ago

I think it would help to see how this code is used to properly evaluate this idea.

Here you go: https://github.com/canonical/tempo-k8s-operator/pull/127/files#diff-0b4ff0c5a367926f20bde3d63ac17e8a1b14a6459e6a05e2ec6a0e2c654c1e3c

PietroPasotti commented 4 months ago

it's somewhat similar to https://github.com/canonical/any-charm but less focused on programming the charm itself and more focus on the interfaces