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
1=== modified file 'charmhelpers/contrib/openstack/amulet/utils.py'
2--- charmhelpers/contrib/openstack/amulet/utils.py 2015-09-25 14:35:40 +0000
3+++ charmhelpers/contrib/openstack/amulet/utils.py 2015-09-30 15:01:27 +0000
4@@ -752,7 +752,7 @@
5 self.log.debug('SSL is enabled @{}:{} '
6 '({})'.format(host, port, unit_name))
7 return True
8- elif not port and not conf_ssl:
9+ elif not conf_ssl:
10 self.log.debug('SSL not enabled @{}:{} '
11 '({})'.format(host, port, unit_name))
12 return False
13
14=== modified file 'charmhelpers/contrib/openstack/context.py'
15--- charmhelpers/contrib/openstack/context.py 2015-09-29 15:49:04 +0000
16+++ charmhelpers/contrib/openstack/context.py 2015-09-30 15:01:27 +0000
17@@ -1364,7 +1364,7 @@
18 normalized.update({port: port for port in resolved
19 if port in ports})
20 if resolved:
21- return {bridge: normalized[port] for port, bridge in
22+ return {normalized[port]: bridge for port, bridge in
23 six.iteritems(portmap) if port in normalized.keys()}
24
25 return None
26@@ -1375,8 +1375,8 @@
27 def __call__(self):
28 ctxt = {}
29 mappings = super(PhyNICMTUContext, self).__call__()
30- if mappings and mappings.values():
31- ports = mappings.values()
32+ if mappings and mappings.keys():
33+ ports = sorted(mappings.keys())
34 napi_settings = NeutronAPIContext()()
35 mtu = napi_settings.get('network_device_mtu')
36 all_ports = set()
37
38=== modified file 'charmhelpers/contrib/openstack/neutron.py'
39--- charmhelpers/contrib/openstack/neutron.py 2015-09-03 09:41:01 +0000
40+++ charmhelpers/contrib/openstack/neutron.py 2015-09-30 15:01:27 +0000
41@@ -310,10 +310,10 @@
42 def parse_data_port_mappings(mappings, default_bridge='br-data'):
43 """Parse data port mappings.
44
45- Mappings must be a space-delimited list of port:bridge mappings.
46+ Mappings must be a space-delimited list of bridge:port.
47
48- Returns dict of the form {port:bridge} where port may be an mac address or
49- interface name.
50+ Returns dict of the form {port:bridge} where ports may be mac addresses or
51+ interface names.
52 """
53
54 # NOTE(dosaboy): we use rvalue for key to allow multiple values to be
55
56=== modified file 'tests/basic_deployment.py'
57--- tests/basic_deployment.py 2015-09-14 14:12:33 +0000
58+++ tests/basic_deployment.py 2015-09-30 15:01:27 +0000
59@@ -47,16 +47,6 @@
60 {self.glance_sentry: self.SERVICES},
61 expect_success=should_run)
62
63- def get_service_overrides(self, unit):
64- """
65- Return a dict mapping service names to a boolean indicating whether
66- an override file exists for that service.
67- """
68- init_contents = unit.directory_contents("/etc/init/")
69- return {
70- service: "{}.override".format(service) in init_contents["files"]
71- for service in self.SERVICES}
72-
73 def _add_services(self):
74 """Add services
75
76@@ -571,11 +561,7 @@
77 assert u.wait_on_action(action_id), "Pause action failed."
78
79 self._assert_services(should_run=False)
80- assert all(self.get_service_overrides(unit).itervalues()), \
81- "Not all override files were created."
82
83 action_id = u.run_action(unit, "resume")
84 assert u.wait_on_action(action_id), "Resume action failed"
85- assert not any(self.get_service_overrides(unit).itervalues()), \
86- "Not all override files were removed."
87 self._assert_services(should_run=True)
88
89=== modified file 'tests/charmhelpers/contrib/openstack/amulet/utils.py'
90--- tests/charmhelpers/contrib/openstack/amulet/utils.py 2015-09-10 09:30:59 +0000
91+++ tests/charmhelpers/contrib/openstack/amulet/utils.py 2015-09-30 15:01:27 +0000
92@@ -752,7 +752,7 @@
93 self.log.debug('SSL is enabled @{}:{} '
94 '({})'.format(host, port, unit_name))
95 return True
96- elif not port and not conf_ssl:
97+ elif not conf_ssl:
98 self.log.debug('SSL not enabled @{}:{} '
99 '({})'.format(host, port, unit_name))
100 return False

Subscribers

People subscribed via source and target branches