From f5a375e9bc63f01bb2a31c6fbc02d79ae5a64eac Mon Sep 17 00:00:00 2001 From: James Page Date: Fri, 7 Oct 2016 11:46:07 +0100 Subject: [PATCH] Correct state for odl-controller relation Drop the use of 'access' from the odl-controller relation; the interface only sets connected and available. Also assess status after the neutron-api-plugin-subordinate is connected, as it does not provide any state. Change-Id: I7b1793779a516c963f7459749aa02dc9ecef603d --- src/reactive/neutron_api_odl_handlers.py | 3 ++- unit_tests/test_neutron_api_odl_handlers.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/reactive/neutron_api_odl_handlers.py b/src/reactive/neutron_api_odl_handlers.py index 5f785ff..79c1e03 100644 --- a/src/reactive/neutron_api_odl_handlers.py +++ b/src/reactive/neutron_api_odl_handlers.py @@ -27,7 +27,7 @@ charm.use_defaults( 'update-status') -@reactive.when('odl-controller.access.available') +@reactive.when('odl-controller.available') def render_config(*args): with charm.provide_charm_instance() as neutron_api_odl_charm: neutron_api_odl_charm.render_with_interfaces(args) @@ -38,6 +38,7 @@ def render_config(*args): def configure_plugin(api_principle): with charm.provide_charm_instance() as neutron_api_odl_charm: neutron_api_odl_charm.configure_plugin(api_principle) + neutron_api_odl_charm.assess_status() @reactive.when_file_changed(neutron_api_odl.ML2_CONF) diff --git a/unit_tests/test_neutron_api_odl_handlers.py b/unit_tests/test_neutron_api_odl_handlers.py index 81ede6c..c54769b 100644 --- a/unit_tests/test_neutron_api_odl_handlers.py +++ b/unit_tests/test_neutron_api_odl_handlers.py @@ -32,7 +32,7 @@ class TestRegisteredHooks(test_utils.TestRegisteredHooks): hook_set = { 'when': { 'render_config': ( - 'odl-controller.access.available',), + 'odl-controller.available',), 'configure_plugin': ( 'neutron-plugin-api-subordinate.connected',), 'remote_restart': (