Merge lp:~1chb1n/charms/trusty/neutron-gateway/next-amulet-15.10 into lp:~openstack-charmers-archive/charms/trusty/neutron-gateway/next
- Trusty Tahr (14.04)
- next-amulet-15.10
- Merge into next
Status: | Merged |
---|---|
Merged at revision: | 153 |
Proposed branch: | lp:~1chb1n/charms/trusty/neutron-gateway/next-amulet-15.10 |
Merge into: | lp:~openstack-charmers-archive/charms/trusty/neutron-gateway/next |
Diff against target: |
315 lines (+145/-14) 8 files modified
hooks/charmhelpers/contrib/openstack/amulet/deployment.py (+40/-0) hooks/charmhelpers/contrib/openstack/amulet/utils.py (+1/-1) hooks/charmhelpers/contrib/openstack/context.py (+25/-9) hooks/charmhelpers/contrib/openstack/neutron.py (+14/-0) hooks/charmhelpers/contrib/openstack/utils.py (+1/-0) hooks/charmhelpers/core/host.py (+12/-1) tests/basic_deployment.py (+12/-3) tests/charmhelpers/contrib/openstack/amulet/deployment.py (+40/-0) |
To merge this branch: | bzr merge lp:~1chb1n/charms/trusty/neutron-gateway/next-amulet-15.10 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Liam Young (community) | Approve | ||
Review via email: mp+274722@code.launchpad.net |
Commit message
Description of the change
Update amulet tests for Trusty-Liberty, Wily-Liberty.
Sync charmhelpers.
Add service and relations to satisfy workload status ready state.
Add new logic to wait for extended status message to confirm deploy is ready, before testing.
uosci-testing-bot (uosci-testing-bot) wrote : | # |
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_unit_test #11176 neutron-
UNIT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_amulet_test #7387 neutron-
AMULET FAIL: amulet-test failed
AMULET Results (max last 2 lines):
make: *** [functional_test] Error 124
ERROR:root:Make target returned non-zero.
Full amulet test output: http://
Build: http://
Ryan Beisner (1chb1n) wrote : | # |
^ bootstrap fail
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_amulet_test #7388 neutron-
AMULET FAIL: amulet-test failed
AMULET Results (max last 2 lines):
make: *** [functional_test] Error 1
ERROR:root:Make target returned non-zero.
Full amulet test output: http://
Build: http://
- 154. By Ryan Beisner
-
fix relation check, remove varying unit data check
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_lint_check #12031 neutron-
LINT OK: passed
Build: http://
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_unit_test #11178 neutron-
UNIT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_amulet_test #7392 neutron-
AMULET FAIL: amulet-test failed
AMULET Results (max last 2 lines):
make: *** [functional_test] Error 1
ERROR:root:Make target returned non-zero.
Full amulet test output: http://
Build: http://
- 155. By Ryan Beisner
-
enable wily test; add debug output
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_lint_check #12162 neutron-
LINT OK: passed
Build: http://
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_unit_test #11293 neutron-
UNIT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_amulet_test #7432 neutron-
AMULET OK: passed
Build: http://
Preview Diff
1 | === modified file 'hooks/charmhelpers/contrib/openstack/amulet/deployment.py' | |||
2 | --- hooks/charmhelpers/contrib/openstack/amulet/deployment.py 2015-09-21 22:51:02 +0000 | |||
3 | +++ hooks/charmhelpers/contrib/openstack/amulet/deployment.py 2015-10-19 14:53:22 +0000 | |||
4 | @@ -14,6 +14,7 @@ | |||
5 | 14 | # You should have received a copy of the GNU Lesser General Public License | 14 | # You should have received a copy of the GNU Lesser General Public License |
6 | 15 | # along with charm-helpers. If not, see <http://www.gnu.org/licenses/>. | 15 | # along with charm-helpers. If not, see <http://www.gnu.org/licenses/>. |
7 | 16 | 16 | ||
8 | 17 | import re | ||
9 | 17 | import six | 18 | import six |
10 | 18 | from collections import OrderedDict | 19 | from collections import OrderedDict |
11 | 19 | from charmhelpers.contrib.amulet.deployment import ( | 20 | from charmhelpers.contrib.amulet.deployment import ( |
12 | @@ -114,6 +115,45 @@ | |||
13 | 114 | for service, config in six.iteritems(configs): | 115 | for service, config in six.iteritems(configs): |
14 | 115 | self.d.configure(service, config) | 116 | self.d.configure(service, config) |
15 | 116 | 117 | ||
16 | 118 | def _auto_wait_for_status(self, message=None, exclude_services=None, | ||
17 | 119 | timeout=1800): | ||
18 | 120 | """Wait for all units to have a specific extended status, except | ||
19 | 121 | for any defined as excluded. Unless specified via message, any | ||
20 | 122 | status containing any case of 'ready' will be considered a match. | ||
21 | 123 | |||
22 | 124 | Examples of message usage: | ||
23 | 125 | |||
24 | 126 | Wait for all unit status to CONTAIN any case of 'ready' or 'ok': | ||
25 | 127 | message = re.compile('.*ready.*|.*ok.*', re.IGNORECASE) | ||
26 | 128 | |||
27 | 129 | Wait for all units to reach this status (exact match): | ||
28 | 130 | message = 'Unit is ready' | ||
29 | 131 | |||
30 | 132 | Wait for all units to reach any one of these (exact match): | ||
31 | 133 | message = re.compile('Unit is ready|OK|Ready') | ||
32 | 134 | |||
33 | 135 | Wait for at least one unit to reach this status (exact match): | ||
34 | 136 | message = {'ready'} | ||
35 | 137 | |||
36 | 138 | See Amulet's sentry.wait_for_messages() for message usage detail. | ||
37 | 139 | https://github.com/juju/amulet/blob/master/amulet/sentry.py | ||
38 | 140 | |||
39 | 141 | :param message: Expected status match | ||
40 | 142 | :param exclude_services: List of juju service names to ignore | ||
41 | 143 | :param timeout: Maximum time in seconds to wait for status match | ||
42 | 144 | :returns: None. Raises if timeout is hit. | ||
43 | 145 | """ | ||
44 | 146 | |||
45 | 147 | if not message: | ||
46 | 148 | message = re.compile('.*ready.*', re.IGNORECASE) | ||
47 | 149 | |||
48 | 150 | if not exclude_services: | ||
49 | 151 | exclude_services = [] | ||
50 | 152 | |||
51 | 153 | services = list(set(self.d.services.keys()) - set(exclude_services)) | ||
52 | 154 | service_messages = {service: message for service in services} | ||
53 | 155 | self.d.sentry.wait_for_messages(service_messages, timeout=timeout) | ||
54 | 156 | |||
55 | 117 | def _get_openstack_release(self): | 157 | def _get_openstack_release(self): |
56 | 118 | """Get openstack release. | 158 | """Get openstack release. |
57 | 119 | 159 | ||
58 | 120 | 160 | ||
59 | === modified file 'hooks/charmhelpers/contrib/openstack/amulet/utils.py' | |||
60 | --- hooks/charmhelpers/contrib/openstack/amulet/utils.py 2015-09-21 22:51:02 +0000 | |||
61 | +++ hooks/charmhelpers/contrib/openstack/amulet/utils.py 2015-10-19 14:53:22 +0000 | |||
62 | @@ -752,7 +752,7 @@ | |||
63 | 752 | self.log.debug('SSL is enabled @{}:{} ' | 752 | self.log.debug('SSL is enabled @{}:{} ' |
64 | 753 | '({})'.format(host, port, unit_name)) | 753 | '({})'.format(host, port, unit_name)) |
65 | 754 | return True | 754 | return True |
67 | 755 | elif not port and not conf_ssl: | 755 | elif not conf_ssl: |
68 | 756 | self.log.debug('SSL not enabled @{}:{} ' | 756 | self.log.debug('SSL not enabled @{}:{} ' |
69 | 757 | '({})'.format(host, port, unit_name)) | 757 | '({})'.format(host, port, unit_name)) |
70 | 758 | return False | 758 | return False |
71 | 759 | 759 | ||
72 | === modified file 'hooks/charmhelpers/contrib/openstack/context.py' | |||
73 | --- hooks/charmhelpers/contrib/openstack/context.py 2015-09-29 20:59:50 +0000 | |||
74 | +++ hooks/charmhelpers/contrib/openstack/context.py 2015-10-19 14:53:22 +0000 | |||
75 | @@ -952,6 +952,19 @@ | |||
76 | 952 | 'config': config} | 952 | 'config': config} |
77 | 953 | return ovs_ctxt | 953 | return ovs_ctxt |
78 | 954 | 954 | ||
79 | 955 | def midonet_ctxt(self): | ||
80 | 956 | driver = neutron_plugin_attribute(self.plugin, 'driver', | ||
81 | 957 | self.network_manager) | ||
82 | 958 | midonet_config = neutron_plugin_attribute(self.plugin, 'config', | ||
83 | 959 | self.network_manager) | ||
84 | 960 | mido_ctxt = {'core_plugin': driver, | ||
85 | 961 | 'neutron_plugin': 'midonet', | ||
86 | 962 | 'neutron_security_groups': self.neutron_security_groups, | ||
87 | 963 | 'local_ip': unit_private_ip(), | ||
88 | 964 | 'config': midonet_config} | ||
89 | 965 | |||
90 | 966 | return mido_ctxt | ||
91 | 967 | |||
92 | 955 | def __call__(self): | 968 | def __call__(self): |
93 | 956 | if self.network_manager not in ['quantum', 'neutron']: | 969 | if self.network_manager not in ['quantum', 'neutron']: |
94 | 957 | return {} | 970 | return {} |
95 | @@ -973,6 +986,8 @@ | |||
96 | 973 | ctxt.update(self.nuage_ctxt()) | 986 | ctxt.update(self.nuage_ctxt()) |
97 | 974 | elif self.plugin == 'plumgrid': | 987 | elif self.plugin == 'plumgrid': |
98 | 975 | ctxt.update(self.pg_ctxt()) | 988 | ctxt.update(self.pg_ctxt()) |
99 | 989 | elif self.plugin == 'midonet': | ||
100 | 990 | ctxt.update(self.midonet_ctxt()) | ||
101 | 976 | 991 | ||
102 | 977 | alchemy_flags = config('neutron-alchemy-flags') | 992 | alchemy_flags = config('neutron-alchemy-flags') |
103 | 978 | if alchemy_flags: | 993 | if alchemy_flags: |
104 | @@ -1105,7 +1120,7 @@ | |||
105 | 1105 | 1120 | ||
106 | 1106 | ctxt = { | 1121 | ctxt = { |
107 | 1107 | ... other context ... | 1122 | ... other context ... |
109 | 1108 | 'subordinate_config': { | 1123 | 'subordinate_configuration': { |
110 | 1109 | 'DEFAULT': { | 1124 | 'DEFAULT': { |
111 | 1110 | 'key1': 'value1', | 1125 | 'key1': 'value1', |
112 | 1111 | }, | 1126 | }, |
113 | @@ -1146,22 +1161,23 @@ | |||
114 | 1146 | try: | 1161 | try: |
115 | 1147 | sub_config = json.loads(sub_config) | 1162 | sub_config = json.loads(sub_config) |
116 | 1148 | except: | 1163 | except: |
119 | 1149 | log('Could not parse JSON from subordinate_config ' | 1164 | log('Could not parse JSON from ' |
120 | 1150 | 'setting from %s' % rid, level=ERROR) | 1165 | 'subordinate_configuration setting from %s' |
121 | 1166 | % rid, level=ERROR) | ||
122 | 1151 | continue | 1167 | continue |
123 | 1152 | 1168 | ||
124 | 1153 | for service in self.services: | 1169 | for service in self.services: |
125 | 1154 | if service not in sub_config: | 1170 | if service not in sub_config: |
129 | 1155 | log('Found subordinate_config on %s but it contained' | 1171 | log('Found subordinate_configuration on %s but it ' |
130 | 1156 | 'nothing for %s service' % (rid, service), | 1172 | 'contained nothing for %s service' |
131 | 1157 | level=INFO) | 1173 | % (rid, service), level=INFO) |
132 | 1158 | continue | 1174 | continue |
133 | 1159 | 1175 | ||
134 | 1160 | sub_config = sub_config[service] | 1176 | sub_config = sub_config[service] |
135 | 1161 | if self.config_file not in sub_config: | 1177 | if self.config_file not in sub_config: |
139 | 1162 | log('Found subordinate_config on %s but it contained' | 1178 | log('Found subordinate_configuration on %s but it ' |
140 | 1163 | 'nothing for %s' % (rid, self.config_file), | 1179 | 'contained nothing for %s' |
141 | 1164 | level=INFO) | 1180 | % (rid, self.config_file), level=INFO) |
142 | 1165 | continue | 1181 | continue |
143 | 1166 | 1182 | ||
144 | 1167 | sub_config = sub_config[self.config_file] | 1183 | sub_config = sub_config[self.config_file] |
145 | 1168 | 1184 | ||
146 | === modified file 'hooks/charmhelpers/contrib/openstack/neutron.py' | |||
147 | --- hooks/charmhelpers/contrib/openstack/neutron.py 2015-09-28 11:18:48 +0000 | |||
148 | +++ hooks/charmhelpers/contrib/openstack/neutron.py 2015-10-19 14:53:22 +0000 | |||
149 | @@ -209,6 +209,20 @@ | |||
150 | 209 | 'server_packages': ['neutron-server', | 209 | 'server_packages': ['neutron-server', |
151 | 210 | 'neutron-plugin-plumgrid'], | 210 | 'neutron-plugin-plumgrid'], |
152 | 211 | 'server_services': ['neutron-server'] | 211 | 'server_services': ['neutron-server'] |
153 | 212 | }, | ||
154 | 213 | 'midonet': { | ||
155 | 214 | 'config': '/etc/neutron/plugins/midonet/midonet.ini', | ||
156 | 215 | 'driver': 'midonet.neutron.plugin.MidonetPluginV2', | ||
157 | 216 | 'contexts': [ | ||
158 | 217 | context.SharedDBContext(user=config('neutron-database-user'), | ||
159 | 218 | database=config('neutron-database'), | ||
160 | 219 | relation_prefix='neutron', | ||
161 | 220 | ssl_dir=NEUTRON_CONF_DIR)], | ||
162 | 221 | 'services': [], | ||
163 | 222 | 'packages': [[headers_package()] + determine_dkms_package()], | ||
164 | 223 | 'server_packages': ['neutron-server', | ||
165 | 224 | 'python-neutron-plugin-midonet'], | ||
166 | 225 | 'server_services': ['neutron-server'] | ||
167 | 212 | } | 226 | } |
168 | 213 | } | 227 | } |
169 | 214 | if release >= 'icehouse': | 228 | if release >= 'icehouse': |
170 | 215 | 229 | ||
171 | === modified file 'hooks/charmhelpers/contrib/openstack/utils.py' | |||
172 | --- hooks/charmhelpers/contrib/openstack/utils.py 2015-09-28 09:44:36 +0000 | |||
173 | +++ hooks/charmhelpers/contrib/openstack/utils.py 2015-10-19 14:53:22 +0000 | |||
174 | @@ -121,6 +121,7 @@ | |||
175 | 121 | ('2.2.2', 'kilo'), | 121 | ('2.2.2', 'kilo'), |
176 | 122 | ('2.3.0', 'liberty'), | 122 | ('2.3.0', 'liberty'), |
177 | 123 | ('2.4.0', 'liberty'), | 123 | ('2.4.0', 'liberty'), |
178 | 124 | ('2.5.0', 'liberty'), | ||
179 | 124 | ]) | 125 | ]) |
180 | 125 | 126 | ||
181 | 126 | # >= Liberty version->codename mapping | 127 | # >= Liberty version->codename mapping |
182 | 127 | 128 | ||
183 | === modified file 'hooks/charmhelpers/core/host.py' | |||
184 | --- hooks/charmhelpers/core/host.py 2015-09-21 22:51:02 +0000 | |||
185 | +++ hooks/charmhelpers/core/host.py 2015-10-19 14:53:22 +0000 | |||
186 | @@ -566,7 +566,14 @@ | |||
187 | 566 | os.chdir(cur) | 566 | os.chdir(cur) |
188 | 567 | 567 | ||
189 | 568 | 568 | ||
191 | 569 | def chownr(path, owner, group, follow_links=True): | 569 | def chownr(path, owner, group, follow_links=True, chowntopdir=False): |
192 | 570 | """ | ||
193 | 571 | Recursively change user and group ownership of files and directories | ||
194 | 572 | in given path. Doesn't chown path itself by default, only its children. | ||
195 | 573 | |||
196 | 574 | :param bool follow_links: Also Chown links if True | ||
197 | 575 | :param bool chowntopdir: Also chown path itself if True | ||
198 | 576 | """ | ||
199 | 570 | uid = pwd.getpwnam(owner).pw_uid | 577 | uid = pwd.getpwnam(owner).pw_uid |
200 | 571 | gid = grp.getgrnam(group).gr_gid | 578 | gid = grp.getgrnam(group).gr_gid |
201 | 572 | if follow_links: | 579 | if follow_links: |
202 | @@ -574,6 +581,10 @@ | |||
203 | 574 | else: | 581 | else: |
204 | 575 | chown = os.lchown | 582 | chown = os.lchown |
205 | 576 | 583 | ||
206 | 584 | if chowntopdir: | ||
207 | 585 | broken_symlink = os.path.lexists(path) and not os.path.exists(path) | ||
208 | 586 | if not broken_symlink: | ||
209 | 587 | chown(path, uid, gid) | ||
210 | 577 | for root, dirs, files in os.walk(path): | 588 | for root, dirs, files in os.walk(path): |
211 | 578 | for name in dirs + files: | 589 | for name in dirs + files: |
212 | 579 | full = os.path.join(root, name) | 590 | full = os.path.join(root, name) |
213 | 580 | 591 | ||
214 | === modified file 'tests/021-basic-wily-liberty' (properties changed: -x to +x) | |||
215 | === modified file 'tests/basic_deployment.py' | |||
216 | --- tests/basic_deployment.py 2015-10-19 09:32:10 +0000 | |||
217 | +++ tests/basic_deployment.py 2015-10-19 14:53:22 +0000 | |||
218 | @@ -1,5 +1,3 @@ | |||
219 | 1 | #!/usr/bin/python | ||
220 | 2 | |||
221 | 3 | import amulet | 1 | import amulet |
222 | 4 | import os | 2 | import os |
223 | 5 | import time | 3 | import time |
224 | @@ -47,7 +45,9 @@ | |||
225 | 47 | other_services = [{'name': 'mysql'}, | 45 | other_services = [{'name': 'mysql'}, |
226 | 48 | {'name': 'rabbitmq-server'}, | 46 | {'name': 'rabbitmq-server'}, |
227 | 49 | {'name': 'keystone'}, | 47 | {'name': 'keystone'}, |
228 | 48 | {'name': 'glance'}, # satisfy workload status | ||
229 | 50 | {'name': 'nova-cloud-controller'}, | 49 | {'name': 'nova-cloud-controller'}, |
230 | 50 | {'name': 'nova-compute'}, # satisfy workload stat | ||
231 | 51 | {'name': 'neutron-api'}] | 51 | {'name': 'neutron-api'}] |
232 | 52 | 52 | ||
233 | 53 | super(NeutronGatewayBasicDeployment, self)._add_services( | 53 | super(NeutronGatewayBasicDeployment, self)._add_services( |
234 | @@ -68,7 +68,15 @@ | |||
235 | 68 | 'neutron-api:shared-db': 'mysql:shared-db', | 68 | 'neutron-api:shared-db': 'mysql:shared-db', |
236 | 69 | 'neutron-api:amqp': 'rabbitmq-server:amqp', | 69 | 'neutron-api:amqp': 'rabbitmq-server:amqp', |
237 | 70 | 'neutron-api:neutron-api': 'nova-cloud-controller:neutron-api', | 70 | 'neutron-api:neutron-api': 'nova-cloud-controller:neutron-api', |
239 | 71 | 'neutron-api:identity-service': 'keystone:identity-service' | 71 | 'neutron-api:identity-service': 'keystone:identity-service', |
240 | 72 | 'glance:identity-service': 'keystone:identity-service', | ||
241 | 73 | 'glance:shared-db': 'mysql:shared-db', | ||
242 | 74 | 'glance:amqp': 'rabbitmq-server:amqp', | ||
243 | 75 | 'nova-cloud-controller:cloud-compute': 'nova-compute:' | ||
244 | 76 | 'cloud-compute', | ||
245 | 77 | 'nova-compute:amqp': 'rabbitmq-server:amqp', | ||
246 | 78 | 'nova-compute:image-service': 'glance:image-service', | ||
247 | 79 | 'nova-cloud-controller:image-service': 'glance:image-service', | ||
248 | 72 | } | 80 | } |
249 | 73 | super(NeutronGatewayBasicDeployment, self)._add_relations(relations) | 81 | super(NeutronGatewayBasicDeployment, self)._add_relations(relations) |
250 | 74 | 82 | ||
251 | @@ -947,6 +955,7 @@ | |||
252 | 947 | self.neutron.create_network({'network': network}) | 955 | self.neutron.create_network({'network': network}) |
253 | 948 | 956 | ||
254 | 949 | networks = self.neutron.list_networks(name=net_name) | 957 | networks = self.neutron.list_networks(name=net_name) |
255 | 958 | u.log.debug('Networks: {}'.format(networks)) | ||
256 | 950 | net_len = len(networks['networks']) | 959 | net_len = len(networks['networks']) |
257 | 951 | if net_len != 1: | 960 | if net_len != 1: |
258 | 952 | msg = "Expected 1 network, found {}".format(net_len) | 961 | msg = "Expected 1 network, found {}".format(net_len) |
259 | 953 | 962 | ||
260 | === modified file 'tests/charmhelpers/contrib/openstack/amulet/deployment.py' | |||
261 | --- tests/charmhelpers/contrib/openstack/amulet/deployment.py 2015-09-28 10:06:18 +0000 | |||
262 | +++ tests/charmhelpers/contrib/openstack/amulet/deployment.py 2015-10-19 14:53:22 +0000 | |||
263 | @@ -14,6 +14,7 @@ | |||
264 | 14 | # You should have received a copy of the GNU Lesser General Public License | 14 | # You should have received a copy of the GNU Lesser General Public License |
265 | 15 | # along with charm-helpers. If not, see <http://www.gnu.org/licenses/>. | 15 | # along with charm-helpers. If not, see <http://www.gnu.org/licenses/>. |
266 | 16 | 16 | ||
267 | 17 | import re | ||
268 | 17 | import six | 18 | import six |
269 | 18 | from collections import OrderedDict | 19 | from collections import OrderedDict |
270 | 19 | from charmhelpers.contrib.amulet.deployment import ( | 20 | from charmhelpers.contrib.amulet.deployment import ( |
271 | @@ -114,6 +115,45 @@ | |||
272 | 114 | for service, config in six.iteritems(configs): | 115 | for service, config in six.iteritems(configs): |
273 | 115 | self.d.configure(service, config) | 116 | self.d.configure(service, config) |
274 | 116 | 117 | ||
275 | 118 | def _auto_wait_for_status(self, message=None, exclude_services=None, | ||
276 | 119 | timeout=1800): | ||
277 | 120 | """Wait for all units to have a specific extended status, except | ||
278 | 121 | for any defined as excluded. Unless specified via message, any | ||
279 | 122 | status containing any case of 'ready' will be considered a match. | ||
280 | 123 | |||
281 | 124 | Examples of message usage: | ||
282 | 125 | |||
283 | 126 | Wait for all unit status to CONTAIN any case of 'ready' or 'ok': | ||
284 | 127 | message = re.compile('.*ready.*|.*ok.*', re.IGNORECASE) | ||
285 | 128 | |||
286 | 129 | Wait for all units to reach this status (exact match): | ||
287 | 130 | message = 'Unit is ready' | ||
288 | 131 | |||
289 | 132 | Wait for all units to reach any one of these (exact match): | ||
290 | 133 | message = re.compile('Unit is ready|OK|Ready') | ||
291 | 134 | |||
292 | 135 | Wait for at least one unit to reach this status (exact match): | ||
293 | 136 | message = {'ready'} | ||
294 | 137 | |||
295 | 138 | See Amulet's sentry.wait_for_messages() for message usage detail. | ||
296 | 139 | https://github.com/juju/amulet/blob/master/amulet/sentry.py | ||
297 | 140 | |||
298 | 141 | :param message: Expected status match | ||
299 | 142 | :param exclude_services: List of juju service names to ignore | ||
300 | 143 | :param timeout: Maximum time in seconds to wait for status match | ||
301 | 144 | :returns: None. Raises if timeout is hit. | ||
302 | 145 | """ | ||
303 | 146 | |||
304 | 147 | if not message: | ||
305 | 148 | message = re.compile('.*ready.*', re.IGNORECASE) | ||
306 | 149 | |||
307 | 150 | if not exclude_services: | ||
308 | 151 | exclude_services = [] | ||
309 | 152 | |||
310 | 153 | services = list(set(self.d.services.keys()) - set(exclude_services)) | ||
311 | 154 | service_messages = {service: message for service in services} | ||
312 | 155 | self.d.sentry.wait_for_messages(service_messages, timeout=timeout) | ||
313 | 156 | |||
314 | 117 | def _get_openstack_release(self): | 157 | def _get_openstack_release(self): |
315 | 118 | """Get openstack release. | 158 | """Get openstack release. |
316 | 119 | 159 |
charm_lint_check #12026 neutron- gateway- next for 1chb1n mp274722
LINT OK: passed
Build: http:// 10.245. 162.77: 8080/job/ charm_lint_ check/12026/