Merge lp:~ack/charms/trusty/glance/fix-pause-resume-tests into lp:~openstack-charmers-archive/charms/trusty/glance/next

Proposed by Alberto Donato
Status: Merged
Merged at revision: 146
Proposed branch: lp:~ack/charms/trusty/glance/fix-pause-resume-tests
Merge into: lp:~openstack-charmers-archive/charms/trusty/glance/next
Diff against target: 100 lines (+8/-22)
5 files modified
charmhelpers/contrib/openstack/amulet/utils.py (+1/-1)
charmhelpers/contrib/openstack/context.py (+3/-3)
charmhelpers/contrib/openstack/neutron.py (+3/-3)
tests/basic_deployment.py (+0/-14)
tests/charmhelpers/contrib/openstack/amulet/utils.py (+1/-1)
To merge this branch: bzr merge lp:~ack/charms/trusty/glance/fix-pause-resume-tests
Reviewer Review Type Date Requested Status
Corey Bryant (community) Approve
Landscape Pending
Review via email: mp+272582@code.launchpad.net

Description of the change

This syncs charmhelpers to bring in the fixes for pause/resume, and fixes related charm tests.

To post a comment you must log in.
Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_lint_check #10900 glance-next for ack mp272582
    LINT OK: passed

Build: http://10.245.162.77:8080/job/charm_lint_check/10900/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_unit_test #10117 glance-next for ack mp272582
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/10117/

Revision history for this message
Corey Bryant (corey.bryant) wrote :

Looks good, thanks. Just waiting on amulet results to post.

review: Approve
Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_amulet_test #6869 glance-next for ack mp272582
    AMULET OK: passed

Build: http://10.245.162.77:8080/job/charm_amulet_test/6869/

145. By Alberto Donato

Re-sync'd charmhelpers and merged from next.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'charmhelpers/contrib/openstack/amulet/utils.py'
--- charmhelpers/contrib/openstack/amulet/utils.py 2015-09-25 14:35:40 +0000
+++ charmhelpers/contrib/openstack/amulet/utils.py 2015-09-30 15:01:27 +0000
@@ -752,7 +752,7 @@
752 self.log.debug('SSL is enabled @{}:{} '752 self.log.debug('SSL is enabled @{}:{} '
753 '({})'.format(host, port, unit_name))753 '({})'.format(host, port, unit_name))
754 return True754 return True
755 elif not port and not conf_ssl:755 elif not conf_ssl:
756 self.log.debug('SSL not enabled @{}:{} '756 self.log.debug('SSL not enabled @{}:{} '
757 '({})'.format(host, port, unit_name))757 '({})'.format(host, port, unit_name))
758 return False758 return False
759759
=== modified file 'charmhelpers/contrib/openstack/context.py'
--- charmhelpers/contrib/openstack/context.py 2015-09-29 15:49:04 +0000
+++ charmhelpers/contrib/openstack/context.py 2015-09-30 15:01:27 +0000
@@ -1364,7 +1364,7 @@
1364 normalized.update({port: port for port in resolved1364 normalized.update({port: port for port in resolved
1365 if port in ports})1365 if port in ports})
1366 if resolved:1366 if resolved:
1367 return {bridge: normalized[port] for port, bridge in1367 return {normalized[port]: bridge for port, bridge in
1368 six.iteritems(portmap) if port in normalized.keys()}1368 six.iteritems(portmap) if port in normalized.keys()}
13691369
1370 return None1370 return None
@@ -1375,8 +1375,8 @@
1375 def __call__(self):1375 def __call__(self):
1376 ctxt = {}1376 ctxt = {}
1377 mappings = super(PhyNICMTUContext, self).__call__()1377 mappings = super(PhyNICMTUContext, self).__call__()
1378 if mappings and mappings.values():1378 if mappings and mappings.keys():
1379 ports = mappings.values()1379 ports = sorted(mappings.keys())
1380 napi_settings = NeutronAPIContext()()1380 napi_settings = NeutronAPIContext()()
1381 mtu = napi_settings.get('network_device_mtu')1381 mtu = napi_settings.get('network_device_mtu')
1382 all_ports = set()1382 all_ports = set()
13831383
=== modified file 'charmhelpers/contrib/openstack/neutron.py'
--- charmhelpers/contrib/openstack/neutron.py 2015-09-03 09:41:01 +0000
+++ charmhelpers/contrib/openstack/neutron.py 2015-09-30 15:01:27 +0000
@@ -310,10 +310,10 @@
310def parse_data_port_mappings(mappings, default_bridge='br-data'):310def parse_data_port_mappings(mappings, default_bridge='br-data'):
311 """Parse data port mappings.311 """Parse data port mappings.
312312
313 Mappings must be a space-delimited list of port:bridge mappings.313 Mappings must be a space-delimited list of bridge:port.
314314
315 Returns dict of the form {port:bridge} where port may be an mac address or315 Returns dict of the form {port:bridge} where ports may be mac addresses or
316 interface name.316 interface names.
317 """317 """
318318
319 # NOTE(dosaboy): we use rvalue for key to allow multiple values to be319 # NOTE(dosaboy): we use rvalue for key to allow multiple values to be
320320
=== modified file 'tests/basic_deployment.py'
--- tests/basic_deployment.py 2015-09-14 14:12:33 +0000
+++ tests/basic_deployment.py 2015-09-30 15:01:27 +0000
@@ -47,16 +47,6 @@
47 {self.glance_sentry: self.SERVICES},47 {self.glance_sentry: self.SERVICES},
48 expect_success=should_run)48 expect_success=should_run)
4949
50 def get_service_overrides(self, unit):
51 """
52 Return a dict mapping service names to a boolean indicating whether
53 an override file exists for that service.
54 """
55 init_contents = unit.directory_contents("/etc/init/")
56 return {
57 service: "{}.override".format(service) in init_contents["files"]
58 for service in self.SERVICES}
59
60 def _add_services(self):50 def _add_services(self):
61 """Add services51 """Add services
6252
@@ -571,11 +561,7 @@
571 assert u.wait_on_action(action_id), "Pause action failed."561 assert u.wait_on_action(action_id), "Pause action failed."
572562
573 self._assert_services(should_run=False)563 self._assert_services(should_run=False)
574 assert all(self.get_service_overrides(unit).itervalues()), \
575 "Not all override files were created."
576564
577 action_id = u.run_action(unit, "resume")565 action_id = u.run_action(unit, "resume")
578 assert u.wait_on_action(action_id), "Resume action failed"566 assert u.wait_on_action(action_id), "Resume action failed"
579 assert not any(self.get_service_overrides(unit).itervalues()), \
580 "Not all override files were removed."
581 self._assert_services(should_run=True)567 self._assert_services(should_run=True)
582568
=== modified file 'tests/charmhelpers/contrib/openstack/amulet/utils.py'
--- tests/charmhelpers/contrib/openstack/amulet/utils.py 2015-09-10 09:30:59 +0000
+++ tests/charmhelpers/contrib/openstack/amulet/utils.py 2015-09-30 15:01:27 +0000
@@ -752,7 +752,7 @@
752 self.log.debug('SSL is enabled @{}:{} '752 self.log.debug('SSL is enabled @{}:{} '
753 '({})'.format(host, port, unit_name))753 '({})'.format(host, port, unit_name))
754 return True754 return True
755 elif not port and not conf_ssl:755 elif not conf_ssl:
756 self.log.debug('SSL not enabled @{}:{} '756 self.log.debug('SSL not enabled @{}:{} '
757 '({})'.format(host, port, unit_name))757 '({})'.format(host, port, unit_name))
758 return False758 return False

Subscribers

People subscribed via source and target branches