'Ensure we can get actions by UUID.'

def test_instance_actions_get_by_instance(self):

    uuid1 = uuidsentinel.uuid1
    expected = []
    action_values = self._create_action_values(uuid1)
    action = db.action_start(self.ctxt, action_values)
    expected.append(action)
    action_values['action'] = 'resize'
    action = db.action_start(self.ctxt, action_values)
    expected.append(action)
    uuid2 = uuidsentinel.uuid2
    ctxt2 = context.get_admin_context()
    action_values = self._create_action_values(uuid2, 'reboot', ctxt2)
    db.action_start(ctxt2, action_values)
    db.action_start(ctxt2, action_values)
    actions = db.actions_get(self.ctxt, uuid1)
    self._assertEqualListsOfObjects(expected, actions)
