summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrode Nordahl <frode.nordahl@canonical.com>2018-11-18 00:18:51 +0100
committerFrode Nordahl <frode.nordahl@canonical.com>2018-11-18 00:23:53 +0100
commit15a4e6c8ee377be75f4c40b64ab246775dace5b5 (patch)
treee4934af2cf1c0dfbbe9fb8feb5ba3fa1a8ccf376
parentebdb590db7af09756132e92a285715becdde9ed3 (diff)
downloadcharm-interface-dashboard-plugin-15a4e6c8ee377be75f4c40b64ab246775dace5b5.zip
charm-interface-dashboard-plugin-15a4e6c8ee377be75f4c40b64ab246775dace5b5.tar.gz
charm-interface-dashboard-plugin-15a4e6c8ee377be75f4c40b64ab246775dace5b5.tar.bz2
Add 'connected' state to please charms_openstack state check
Change-Id: Ia821c381853202ddda6c5ed9e5f17414a8899174
-rw-r--r--requires.py2
-rw-r--r--unit_tests/test_requires.py10
2 files changed, 10 insertions, 2 deletions
diff --git a/requires.py b/requires.py
index 873a05e..79ae003 100644
--- a/requires.py
+++ b/requires.py
@@ -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):
diff --git a/unit_tests/test_requires.py b/unit_tests/test_requires.py
index 1a22f42..2e4a9eb 100644
--- a/unit_tests/test_requires.py
+++ b/unit_tests/test_requires.py
@@ -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()

This mirror site include all the OpenStack related repositories under: openstack, openstack-dev and openstack-infra.

NOTE: All repositories are updated every one hour.

Usage

For Git Clone
 git clone http://git.trystack.cn/openstack/nova.git 
For DevStack

Add GIT_BASE, NOVNC_REPO and SPICE_REPO variables to local.conf file.

[[local|localrc]]

# use TryStack git mirror
GIT_BASE=http://git.trystack.cn
NOVNC_REPO=http://git.trystack.cn/kanaka/noVNC.git
SPICE_REPO=http://git.trystack.cn/git/spice/spice-html5.git