def test_pause_unit_helper(self): with patch.object(cinder_utils, '_pause_resume_helper') as prh: cinder_utils.pause_unit_helper('random-config') prh.assert_called_once_with(cinder_utils.pause_unit, 'random-config') with patch.object(cinder_utils, '_pause_resume_helper') as prh: cinder_utils.resume_unit_helper('random-config') prh.assert_called_once_with(cinder_utils.resume_unit, 'random-config')
def test_pause_unit_helper(self): with patch.object(cinder_utils, '_pause_resume_helper') as prh: cinder_utils.pause_unit_helper('random-config') prh.assert_called_once_with(cinder_utils.pause_unit, 'random-config') with patch.object(cinder_utils, '_pause_resume_helper') as prh: cinder_utils.resume_unit_helper('random-config') prh.assert_called_once_with(cinder_utils.resume_unit, 'random-config')
def openstack_upgrade(): """Upgrade packages to config-set Openstack version. If the charm was installed from source we cannot upgrade it. For backwards compatibility a config flag must be set for this code to run, otherwise a full service level upgrade will fire on config-changed.""" if (do_action_openstack_upgrade('cinder-common', do_openstack_upgrade, configs=None)): # tell any storage-backends we just upgraded for rid in relation_ids('storage-backend'): relation_set(relation_id=rid, upgrade_nonce=uuid.uuid4()) # Force reload to get any chances resulting from upgrade. # See LP 1726527. cinder_hooks.CONFIGS = register_configs() # If we are paused, resume LP Bug #1824545 if is_unit_paused_set(): resume_unit_helper(cinder_hooks.register_configs()) cinder_hooks.config_changed()
def openstack_upgrade(): """Upgrade packages to config-set Openstack version. If the charm was installed from source we cannot upgrade it. For backwards compatibility a config flag must be set for this code to run, otherwise a full service level upgrade will fire on config-changed.""" if (do_action_openstack_upgrade('cinder-common', do_openstack_upgrade, configs=None)): # tell any storage-backends we just upgraded for rid in relation_ids('storage-backend'): relation_set(relation_id=rid, upgrade_nonce=uuid.uuid4()) # Force reload to get any chances resulting from upgrade. # See LP 1726527. cinder_hooks.CONFIGS = register_configs() # If we are paused, resume LP Bug #1824545 if is_unit_paused_set(): resume_unit_helper(cinder_hooks.register_configs()) cinder_hooks.config_changed()
def resume(args): """Resume the Ceilometer services. @raises Exception should the service fail to start.""" resume_unit_helper(register_configs())
def resume(args): """Resume the Ceilometer services. @raises Exception should the service fail to start.""" resume_unit_helper(register_configs())