OpenStackCharm.states_to_check() needs to handle 'odd' interfaces

Bug #1662463 reported by Alex Kavanagh on 2017-02-07
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

charms.openstack makes an assumption that all interfaces (relations) use to states:

 * {relation-name}.connected
 * {relation-name}.available

These are used to indicate whether the relation is 'complete' and thus whether the workload status should be 'waiting' or 'active' (based on a combination of all of the events).

Whilst it is possible, at a charm level, to override the OpenStackCharm.states_to_check() function to handle interfaces that don't follow this naming convention, it would be useful to provide a modification system in charms.openstack that a charm can use to simply override a particular interface.


    class MyCharm(OpenStackCharm):

        override_states_to_check = {
            'mongo-db': {
                'connected': '{relation-name}.connected',
                'available': '{relation-name}.database.available'

This would allow a declarative way to provide for interfaces that don't use the (now) conventional pattern.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers