diff --git a/src/lib/charm/openstack/aodh.py b/src/lib/charm/openstack/aodh.py index 90d69b2..b2015d4 100644 --- a/src/lib/charm/openstack/aodh.py +++ b/src/lib/charm/openstack/aodh.py @@ -29,10 +29,10 @@ class AodhAdapters(charms_openstack.adapters.OpenStackAPIRelationAdapters): Adapters class for the Aodh charm. """ def __init__(self, relations): - print(relations) super(AodhAdapters, self).__init__( relations, options_instance=charms_openstack.adapters.APIConfigurationAdapter( + service_name='aodh', port_map=AodhCharm.api_ports)) @@ -159,3 +159,9 @@ def configure_ha_resources(hacluster): """Use the singleton from the AodhCharm to run configure_ha_resources """ AodhCharm.singleton.configure_ha_resources(hacluster) + + +def configure_ssl(): + """Use the singleton from the AodhCharm to run configure_ssl + """ + AodhCharm.singleton.configure_ssl() diff --git a/src/reactive/aodh_handlers.py b/src/reactive/aodh_handlers.py index f725d27..15efba2 100644 --- a/src/reactive/aodh_handlers.py +++ b/src/reactive/aodh_handlers.py @@ -71,6 +71,7 @@ def render(*args): @reactive.when_not('cluster.available') @reactive.when(*MINIMAL_INTERFACES) def render_unclustered(*args): + aodh.configure_ssl() render(*args) diff --git a/unit_tests/test_aodh_handlers.py b/unit_tests/test_aodh_handlers.py index 924d85a..db5acfe 100644 --- a/unit_tests/test_aodh_handlers.py +++ b/unit_tests/test_aodh_handlers.py @@ -167,6 +167,8 @@ class TestAodhHandlers(unittest.TestCase): def test_render(self): self.patch(handlers.aodh, 'render_configs') self.patch(handlers.aodh, 'assess_status') + self.patch(handlers.aodh, 'configure_ssl') handlers.render_unclustered('arg1', 'arg2') self.render_configs.assert_called_once_with(('arg1', 'arg2', )) self.assess_status.assert_called_once() + self.configure_ssl.assert_called_once()