Merge lp:~hopem/charms/trusty/nova-cloud-controller/lp1464605-stable-backport into lp:~openstack-charmers-archive/charms/trusty/nova-cloud-controller/trunk

Proposed by Edward Hope-Morley
Status: Merged
Merged at revision: 164
Proposed branch: lp:~hopem/charms/trusty/nova-cloud-controller/lp1464605-stable-backport
Merge into: lp:~openstack-charmers-archive/charms/trusty/nova-cloud-controller/trunk
Diff against target: 56 lines (+13/-3)
2 files modified
hooks/nova_cc_hooks.py (+6/-1)
unit_tests/test_nova_cc_hooks.py (+7/-2)
To merge this branch: bzr merge lp:~hopem/charms/trusty/nova-cloud-controller/lp1464605-stable-backport
Reviewer Review Type Date Requested Status
Liam Young (community) Approve
Review via email: mp+261942@code.launchpad.net
To post a comment you must log in.
Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_lint_check #5401 nova-cloud-controller for hopem mp261942
    LINT OK: passed

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

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

charm_unit_test #5033 nova-cloud-controller for hopem mp261942
    UNIT OK: passed

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

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

charm_amulet_test #4644 nova-cloud-controller for hopem mp261942
    AMULET OK: passed

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

Revision history for this message
Liam Young (gnuoy) wrote :

Approve

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/nova_cc_hooks.py'
2--- hooks/nova_cc_hooks.py 2015-04-22 14:39:04 +0000
3+++ hooks/nova_cc_hooks.py 2015-06-15 09:51:42 +0000
4@@ -169,9 +169,14 @@
5 CONFIGS.write_all()
6 if console_attributes('protocol'):
7 apt_update()
8- apt_install(console_attributes('packages'), fatal=True)
9+ packages = console_attributes('packages') or []
10+ filtered = filter_installed_packages(packages)
11+ if filtered:
12+ apt_install(filtered, fatal=True)
13+
14 [compute_joined(rid=rid)
15 for rid in relation_ids('cloud-compute')]
16+
17 for r_id in relation_ids('identity-service'):
18 identity_joined(rid=r_id)
19 for rid in relation_ids('zeromq-configuration'):
20
21=== modified file 'unit_tests/test_nova_cc_hooks.py'
22--- unit_tests/test_nova_cc_hooks.py 2015-04-22 19:22:30 +0000
23+++ unit_tests/test_nova_cc_hooks.py 2015-06-15 09:51:42 +0000
24@@ -106,18 +106,22 @@
25 self.disable_services.assert_called()
26 self.cmd_all_services.assert_called_with('stop')
27
28+ @patch.object(hooks, 'filter_installed_packages')
29 @patch.object(hooks, 'configure_https')
30- def test_config_changed_no_upgrade(self, conf_https):
31+ def test_config_changed_no_upgrade(self, conf_https, mock_filter_packages):
32 self.openstack_upgrade_available.return_value = False
33 hooks.config_changed()
34 self.assertTrue(self.save_script_rc.called)
35+ mock_filter_packages.assert_called_with([])
36
37+ @patch.object(hooks, 'filter_installed_packages')
38 @patch.object(hooks, 'cluster_joined')
39 @patch.object(hooks, 'identity_joined')
40 @patch.object(hooks, 'neutron_api_relation_joined')
41 @patch.object(hooks, 'configure_https')
42 def test_config_changed_with_upgrade(self, conf_https, neutron_api_joined,
43- identity_joined, cluster_joined):
44+ identity_joined, cluster_joined,
45+ mock_filter_packages):
46 self.openstack_upgrade_available.return_value = True
47 self.relation_ids.return_value = ['generic_rid']
48 _zmq_joined = self.patch('zeromq_configuration_relation_joined')
49@@ -128,6 +132,7 @@
50 self.assertTrue(_zmq_joined.called)
51 self.assertTrue(cluster_joined.called)
52 self.assertTrue(self.save_script_rc.called)
53+ mock_filter_packages.assert_called_with([])
54
55 def test_compute_changed_ssh_migration(self):
56 self.test_relation.set({

Subscribers

People subscribed via source and target branches