Removing PLUMgrid restart on LCM Key post

This commit is contained in:
Bilal Baqar 2015-08-16 12:08:38 -07:00
parent 1d5c433f9a
commit d6be75bbae
3 changed files with 5 additions and 1 deletions

View File

@ -70,6 +70,9 @@ def config_changed():
This hook is run when a config parameter is changed.
It also runs on node reboot.
'''
if add_lcm_key():
log("PLUMgrid LCM Key added")
return 1
stop_pg()
configure_sources(update=True)
pkgs = determine_packages()

View File

@ -212,3 +212,4 @@ def add_lcm_key():
fa.write(key)
fa.write('\n')
fa.close()
return 1

View File

@ -71,6 +71,7 @@ class PGGwHooksTests(CharmTestCase):
def test_config_changed_hook(self):
_pkgs = ['plumgrid-lxc', 'iovisor-dkms']
self.add_lcm_key.return_value = 0
self.determine_packages.return_value = [_pkgs]
self._call_hook('config-changed')
self.stop_pg.assert_called_with()
@ -82,7 +83,6 @@ class PGGwHooksTests(CharmTestCase):
self.load_iovisor.assert_called_with()
self.ensure_mtu.assert_called_with()
self.ensure_files.assert_called_with()
self.add_lcm_key.assert_called_with()
self.CONFIGS.write_all.assert_called_with()
self.restart_pg.assert_called_with()