Is there a universal interface I can use?

Tilman Baumann tilman.baumann at canonical.com
Wed Nov 22 15:02:08 UTC 2017


I'm writing a reactive subordinate charm for cassandra.
I can not find a interface for cassandra. But that's ok, since I don't
really need a full blown database connection client.

Easy I thought and just re-used the juju-info interface for fun and profit.
requires:
  host-system:
    interface: juju-info
    scope: container
  database:
    interface: juju-info

And in the code
@when('database.available')
def db_changed(cassandra):
    for conv in cassandra.conversations():
        username = conv.get_remote('username')
        password = conv.get_remote('password')
...

However, that doesn't seem to work. Juju complains the relation doesn't
exist.
$ juju add-relation cassandra-backup:database cassandra:database
ERROR no relations found

So, is there a interface that I can (ab-)use in a similar way?

I don't  want to build a full blown cassandra interface and at it to the
list.

Cheers and thanks
 Tilman



More information about the Juju mailing list