Add 'connected' state to please charms_openstack state check
Change-Id: Ia821c381853202ddda6c5ed9e5f17414a8899174
This commit is contained in:
parent
ebdb590db7
commit
15a4e6c8ee
|
@ -39,11 +39,13 @@ class DashboardPluginRequires(Endpoint):
|
|||
clear_flag(
|
||||
self.expand_name(
|
||||
'endpoint.{endpoint_name}.changed.openstack_dir'))
|
||||
set_flag(self.expand_name('{endpoint_name}.connected'))
|
||||
set_flag(self.expand_name('{endpoint_name}.available'))
|
||||
|
||||
@when_not('endpoint.{endpoint_name}.joined')
|
||||
def broken(self):
|
||||
clear_flag(self.expand_name('{endpoint_name}.available'))
|
||||
clear_flag(self.expand_name('{endpoint_name}.connected'))
|
||||
|
||||
@property
|
||||
def release(self):
|
||||
|
|
|
@ -84,12 +84,18 @@ class TestDashboardPluginRequires(test_utils.PatchHelper):
|
|||
mock.call('endpoint.some-relation.changed.bin_path'),
|
||||
mock.call('endpoint.some-relation.changed.openstack_dir'),
|
||||
])
|
||||
self.set_flag.assert_called_once_with('some-relation.available')
|
||||
self.set_flag.assert_has_calls([
|
||||
mock.call('some-relation.connected'),
|
||||
mock.call('some-relation.available'),
|
||||
])
|
||||
|
||||
def test_broken(self):
|
||||
self.patch_object(requires, 'clear_flag')
|
||||
self.dashboard_req.broken()
|
||||
self.clear_flag.assert_called_once_with('some-relation.available')
|
||||
self.clear_flag.assert_has_calls([
|
||||
mock.call('some-relation.available'),
|
||||
mock.call('some-relation.connected'),
|
||||
])
|
||||
|
||||
def test_publish_plugin_info(self):
|
||||
to_publish = self.patch_topublish()
|
||||
|
|
Loading…
Reference in New Issue