Configure SSL endpoint for charm
Configure SSL termination and advertise SSL endpoints if Keystone sends the charm certs or the user specifies certs via config. Change-Id: Ibc73724cb849d3eb05724b06ff3d3ea1124edafe
This commit is contained in:
parent
86a407bca2
commit
6107f45e7f
@ -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()
|
||||
|
@ -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)
|
||||
|
||||
|
||||
|
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user