Add default handler for storage-backend

Add a default handler for storage-backend relation. This is part
of the work to push cinder plugin bolierplate code into supporting
layers.

Change-Id: Icad5f72939b1e33d15adf2638f8e344235a9318b
This commit is contained in:
Liam Young 2019-01-11 13:58:00 +00:00
parent cb4d058c0b
commit bfda016be4

View File

@ -66,6 +66,13 @@ def run_default_update_status():
reactive.remove_state('run-default-update-status')
@reactive.when('storage-backend.connected',
'charms.openstack.do-default-storage-backend.connected')
def run_storage_backend():
with charm.provide_charm_instance() as instance:
instance.send_storage_backend_data()
# Series upgrade hooks are a special case and reacting to the hook directly
# makes sense as we may not want other charm code to run
@reactive.hook('pre-series-upgrade')