예제 #1
0
 def __init__(self, execution_session, action_manager=None):
     self._execution_session = execution_session
     self._action_manager = action_manager or am.ModifyActionManager()
     self._client = None
예제 #2
0
 def test_action_apply_invalid_spec(self):
     manager = am.ModifyActionManager()
     self.assertRaises(ValueError, manager.apply_action, self._obj,
                       'remove-object')
예제 #3
0
 def test_action_apply(self):
     with self._runner.session():
         manager = am.ModifyActionManager()
         obj_id = self._dict_member.id
         action_spec = 'remove-object: {object_id: %s}' % obj_id
         manager.apply_action(self._obj, action_spec)
예제 #4
0
 def test_no_such_action(self):
     manager = am.ModifyActionManager()
     self.assertRaises(ValueError, manager.load_action, 'no-such-action')
예제 #5
0
 def __init__(self, environment, action_manager=None):
     self._environment = environment
     self._client_manager = environment.clients
     self._action_manager = action_manager or am.ModifyActionManager()
예제 #6
0
 def test_action_apply(self):
     manager = am.ModifyActionManager()
     action_spec = 'remove-object: {object_id: %s}' % self._dict_member.id
     manager.apply_action(self._obj, action_spec)