85c41c2ce9
We want to default to running all tox environments under python 3, so set the basepython value in each environment. We do not want to specify a minor version number, because we do not want to have to update the file every time we upgrade python. We do not want to set the override once in testenv, because that breaks the more specific versions used in default environments like py35 and py36. Change-Id: Ia9a54b55f87cf6ab52dfc0952d2a8e23512d8020 Signed-off-by: Doug Hellmann <doug@doughellmann.com> |
||
---|---|---|
.gitignore | ||
.gitreview | ||
README.md | ||
interface.yaml | ||
requires.py | ||
test-requirements.txt | ||
tox.ini |
README.md
Overview
This interface layer handles the communication between the Ceph Monitor and a client that requires an admin key.
Usage
Requires
This interface layer will set the following states, as appropriate:
{relation_name}.available
The ceph client has been related to a provider. The following accessors will be available:
- key - The mds cephx key
- admin_key - The cephx admin key
- auth - Whether or not strict auth is supported
- mon_hosts - The public addresses list of the monitor cluster
Client example:
@when('ceph-mds.available')
def ceph_connected(ceph_info):
charm_ceph_conf = os.path.join(os.sep, 'etc', 'ceph', 'ceph.conf')
cephx_key = os.path.join(os.sep, 'etc', 'ceph', 'ceph.client.admin.keyring')
ceph_context = {
'auth_supported': ceph_client.auth,
'mon_hosts': ceph_client.mon_hosts,
}
with open(charm_ceph_conf, 'w') as cephconf:
cephconf.write(render_template('ceph.conf', ceph_context))
# Write out the cephx_key also
with open(cephx_key, 'w') as cephconf:
cephconf.write(ceph_client.key)