API - Whenever retrieving an action plan with actions 'first_action_uuid' is always None

Bug #1538130 reported by Vincent Françoise on 2016-01-26
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
watcher
Medium
Vincent Françoise

Bug Description

Whenever trying to get the first action related to a given action plan, we get back a 'null' value from the API even though we know there are actions that are actually linked to it within the DB.

The objective is to make sure that when we query the API using a GET on "/v1/action_plans/MY-ACTION-PLAN-UUID", we get back a JSON object formatted as followed:

{
    "audit_id": 353,
    "audit_uuid": "7e992d3b-cc2a-4963-ba07-15d880f2c9f3",
    "created_at": "2016-01-26T12:41:45+00:00",
    "deleted_at": null,
    "first_action_id": 550,
    "first_action_uuid": "863eaf73-0013-4f8d-b019-3c2f692b7526", # This should not be None
    "state": "RECOMMENDED",
    "updated_at": "2016-01-26T12:41:45+00:00",
    "uuid": "7bf6f84f-2974-47d9-9e9d-b33663ad2376"
}

Tags: api Edit Tag help
Changed in watcher:
milestone: none → mitaka-3
importance: Undecided → Medium

Fix proposed to branch: master
Review: https://review.openstack.org/272517

Changed in watcher:
status: New → In Progress

Reviewed: https://review.openstack.org/272517
Committed: https://git.openstack.org/cgit/openstack/watcher/commit/?id=de307e536ef040afe506d1d2acc5c2025c31104e
Submitter: Jenkins
Branch: master

commit de307e536ef040afe506d1d2acc5c2025c31104e
Author: Vincent Françoise <email address hidden>
Date: Tue Jan 26 14:05:00 2016 +0100

    GET on an action_plan provides first_action_uuid

    Whenever trying to get the first action related to a given action
    plan, we were getting back a 'null' value from the API even though
    we knew there were actions to be linked to it in the DB.
    So I fixed this issue and added a related unit test.

    Change-Id: I1fa755f24fbf37ecd6ce2cc2396658fca8743a1c
    Closes-Bug: #1538130

Changed in watcher:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers