Example #1
0
 def test_pause_unit_helper(self):
     with patch.object(nutils, '_pause_resume_helper') as prh:
         nutils.pause_unit_helper('random-config')
         prh.assert_called_once_with(nutils.pause_unit, 'random-config')
     with patch.object(nutils, '_pause_resume_helper') as prh:
         nutils.resume_unit_helper('random-config')
         prh.assert_called_once_with(nutils.resume_unit, 'random-config')
 def test_pause_unit_helper(self):
     with patch.object(nutils, '_pause_resume_helper') as prh:
         nutils.pause_unit_helper('random-config')
         prh.assert_called_once_with(nutils.pause_unit, 'random-config')
     with patch.object(nutils, '_pause_resume_helper') as prh:
         nutils.resume_unit_helper('random-config')
         prh.assert_called_once_with(nutils.resume_unit, 'random-config')
def pause(args):
    """Pause the Ceilometer services.
    @raises Exception should the service fail to stop.
    """
    pause_unit_helper(register_configs())
Example #4
0
def pause(args):
    """Pause the neutron-openvswitch services.
    @raises Exception should the service fail to stop.
    """
    pause_unit_helper(register_configs(),
                      exclude_services=['openvswitch-switch'])
Example #5
0
def pause(args):
    """Pause the Ceilometer services.
    @raises Exception should the service fail to stop.
    """
    pause_unit_helper(register_configs())