Hi,

I'm writing a layered reactive-python charm which uses a peer relation
to know all units of the same application.

However I don't seem to find a way to convince charm build to create the
./hook/ files for this relation for me.

If I do my metadata.yaml like this and include the interface in
layers.yaml then I get the hook files and the interface layer code gets
pulled in.
metadata.yaml
peers:
  foobar:
    interface: ceph


If I don't specify a interface or use my own name, then the hooks won't
be created. So my @hook handlers in the reactive code never see it.

What is the general best practice for providing peer relations of a own
type in a layered charm?

I suppose there is no reason why I can't put the code in a class based
off RelationBase like interface layers usually do? The code entry point
seems to the @hook decorators around the methods. I don't need to create
instances or anything like that, right?

Cheers and Thanks
 Tilman

-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju

Reply via email to