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
=== modified file 'hooks/nova_cc_hooks.py'
--- hooks/nova_cc_hooks.py 2015-04-22 14:39:04 +0000
+++ hooks/nova_cc_hooks.py 2015-06-15 09:51:42 +0000
@@ -169,9 +169,14 @@
169 CONFIGS.write_all()169 CONFIGS.write_all()
170 if console_attributes('protocol'):170 if console_attributes('protocol'):
171 apt_update()171 apt_update()
172 apt_install(console_attributes('packages'), fatal=True)172 packages = console_attributes('packages') or []
173 filtered = filter_installed_packages(packages)
174 if filtered:
175 apt_install(filtered, fatal=True)
176
173 [compute_joined(rid=rid)177 [compute_joined(rid=rid)
174 for rid in relation_ids('cloud-compute')]178 for rid in relation_ids('cloud-compute')]
179
175 for r_id in relation_ids('identity-service'):180 for r_id in relation_ids('identity-service'):
176 identity_joined(rid=r_id)181 identity_joined(rid=r_id)
177 for rid in relation_ids('zeromq-configuration'):182 for rid in relation_ids('zeromq-configuration'):
178183
=== modified file 'unit_tests/test_nova_cc_hooks.py'
--- unit_tests/test_nova_cc_hooks.py 2015-04-22 19:22:30 +0000
+++ unit_tests/test_nova_cc_hooks.py 2015-06-15 09:51:42 +0000
@@ -106,18 +106,22 @@
106 self.disable_services.assert_called()106 self.disable_services.assert_called()
107 self.cmd_all_services.assert_called_with('stop')107 self.cmd_all_services.assert_called_with('stop')
108108
109 @patch.object(hooks, 'filter_installed_packages')
109 @patch.object(hooks, 'configure_https')110 @patch.object(hooks, 'configure_https')
110 def test_config_changed_no_upgrade(self, conf_https):111 def test_config_changed_no_upgrade(self, conf_https, mock_filter_packages):
111 self.openstack_upgrade_available.return_value = False112 self.openstack_upgrade_available.return_value = False
112 hooks.config_changed()113 hooks.config_changed()
113 self.assertTrue(self.save_script_rc.called)114 self.assertTrue(self.save_script_rc.called)
115 mock_filter_packages.assert_called_with([])
114116
117 @patch.object(hooks, 'filter_installed_packages')
115 @patch.object(hooks, 'cluster_joined')118 @patch.object(hooks, 'cluster_joined')
116 @patch.object(hooks, 'identity_joined')119 @patch.object(hooks, 'identity_joined')
117 @patch.object(hooks, 'neutron_api_relation_joined')120 @patch.object(hooks, 'neutron_api_relation_joined')
118 @patch.object(hooks, 'configure_https')121 @patch.object(hooks, 'configure_https')
119 def test_config_changed_with_upgrade(self, conf_https, neutron_api_joined,122 def test_config_changed_with_upgrade(self, conf_https, neutron_api_joined,
120 identity_joined, cluster_joined):123 identity_joined, cluster_joined,
124 mock_filter_packages):
121 self.openstack_upgrade_available.return_value = True125 self.openstack_upgrade_available.return_value = True
122 self.relation_ids.return_value = ['generic_rid']126 self.relation_ids.return_value = ['generic_rid']
123 _zmq_joined = self.patch('zeromq_configuration_relation_joined')127 _zmq_joined = self.patch('zeromq_configuration_relation_joined')
@@ -128,6 +132,7 @@
128 self.assertTrue(_zmq_joined.called)132 self.assertTrue(_zmq_joined.called)
129 self.assertTrue(cluster_joined.called)133 self.assertTrue(cluster_joined.called)
130 self.assertTrue(self.save_script_rc.called)134 self.assertTrue(self.save_script_rc.called)
135 mock_filter_packages.assert_called_with([])
131136
132 def test_compute_changed_ssh_migration(self):137 def test_compute_changed_ssh_migration(self):
133 self.test_relation.set({138 self.test_relation.set({

Subscribers

People subscribed via source and target branches