Tilman Baumann
2017-11-22 15:02:08 UTC
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
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
--
Juju mailing list
***@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/ma
Juju mailing list
***@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/ma