'Ensure we can get an action by instance UUID and action id.'

def test_instance_action_get_by_instance_and_action(self):

    ctxt2 = context.get_admin_context()
    uuid1 = uuidsentinel.uuid1
    uuid2 = uuidsentinel.uuid2
    action_values = self._create_action_values(uuid1)
    db.action_start(self.ctxt, action_values)
    request_id = action_values['request_id']
    action_values['action'] = 'resize'
    action_values['request_id'] = 'req-00000000-7522-4d99-7ff-111111111111'
    db.action_start(self.ctxt, action_values)
    action_values = self._create_action_values(uuid2, 'reboot', ctxt2)
    db.action_start(ctxt2, action_values)
    db.action_start(ctxt2, action_values)
    action = db.action_get_by_request_id(self.ctxt, uuid1, request_id)
    self.assertEqual('run_instance', action['action'])
    self.assertEqual(self.ctxt.request_id, action['request_id'])
