Audit Creation - No default state provided

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

Bug Description

As of now, we have to send the state in which we want to create an Audit.

This should not be the case as we should not be able to meddle with the Audit lifecycle directly via the API.

Moreover, we should check that the state is 'PENDING' before executing an Audit (see watcher/decision_engine/audit/default.py:68)

Note
====

There is a Tempest test that is currently skipped because of this bug. So they will have to be re-enabled as we get this fixed.

Tags: api Edit Tag help
description: updated
Changed in watcher:
status: New → Confirmed
importance: Undecided → Wishlist
importance: Wishlist → Medium
Changed in watcher:
milestone: none → mitaka-3
description: updated
Changed in watcher:
assignee: nobody → Vincent Françoise (vincent-francoise)

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

Changed in watcher:
status: Confirmed → In Progress
Changed in watcher:
milestone: mitaka-3 → mitaka-rc-1
Changed in watcher:
milestone: mitaka-rc-1 → mitaka-rc-final
Changed in watcher:
milestone: mitaka-rc-final → newton-1
Changed in watcher:
assignee: Vincent Françoise (vincent-francoise) → Alexander Chadin (joker946)

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

commit e52dc4f8aab349ae595eda0abf5e030f4fe59d5e
Author: Alexander Chadin <email address hidden>
Date: Wed Apr 6 17:42:06 2016 +0300

    Add parameters verification when Audit is being created

    We have to check Audit Type and Audit State to make sure
    these parameters are in valid status.

    Also, we provide default states for the next attributes:

    - 'audit_template' is required and should be either UUID or text field
    - 'state' is readonly so it raises an error if submitted in POST
      and is set by default to PENDING
    - 'deadline' is optional and should be a datetime
    - 'type' is a required text field

    Change-Id: I2a7e0deec0ee2040e86400b500bb0efd8eade564
    Closes-Bug: #1532843
    Closes-Bug: #1533210

Changed in watcher:
status: In Progress → Fix Released

Change abandoned by Vincent Françoise (<email address hidden>) on branch: master
Review: https://review.openstack.org/282395
Reason: Fixed in https://review.openstack.org/#/c/302293/ by Alexander Chadin

This issue was fixed in the openstack/watcher 0.27.0 release.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers