Remove attributes of audit-template not work

Bug #1662395 reported by Eric Xie
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
watcher
Fix Released
Low
Eric Xie

Bug Description

Description
===========
It did not work that removing some attributes of the audit template.

Steps to reproduce
==================
* Create an audit template with strategy 'dummy'
`openstack optimize audittemplate create -s dummy -d "test" test dummy`
* Remove attribute 'strategy'
`openstack optimize audittemplate update test remove /strategy`
* Show the audit template
`openstack optimize audittemplate show test`

Expected result
===============
Got None for the 'strategy' field.

Actual result
=============
Got dummy for the 'strategy' field.

Logs
=============
2017-02-07 11:08:02.751 INFO watcher-api [req-291f168f-689a-4166-b740-b3c92c46b8e3 None None] 172.23.29.2 "PATCH /v1/audit_templates/test HTTP/1.1" status: 200 len: 780 time: 0.0837409

Environment
===========
# ENV
devstack

# version
- devstack:
git log
commit bab8516a8503445af5582bc63493cb37098f57fb
Merge: 0ab0e50 10db2b8
Author: Jenkins <email address hidden>
Date: Fri Feb 3 16:24:32 2017 +0000

    Merge "Enable VNC console in tempest.conf"

- watcher:
$ git log
commit 26c7726c00ea378e6e113b2683f3707416821d27
Merge: 4b5dce5 5b2cdb5
Author: Jenkins <email address hidden>
Date: Fri Feb 3 09:33:24 2017 +0000

    Merge "Using items() instead of six.iteritems()"

- watchclient
# pip show python-watcherclient
Name: python-watcherclient
Version: 1.0.1.dev6
Summary: Python client library for Watcher API
Home-page: http://docs.openstack.org/developer/python-watcherclient
Author: OpenStack
Author-email: <email address hidden>
License: UNKNOWN
Location: /opt/stack/python-watcherclient
Requires: Babel, cliff, osc-lib, oslo.i18n, oslo.utils, pbr, PrettyTable, keystoneauth1, six, PyYAML

Eric Xie (eric-xie)
Changed in watcher:
status: New → In Progress
assignee: nobody → Eric Xie (eric-xie)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to watcher (master)

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

Changed in watcher:
milestone: none → ocata-rc-final
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to watcher (master)

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

commit e55c73be0ec5ce3d919c60a4edc7cdbb68ac3d56
Author: ericxiett <eric_xiett@163.com>
Date: Wed Feb 8 09:25:58 2017 +0800

    Fix that remove 'strategy' attribute does not work.

    The 'strategy_id' attribute is the one that not exposes
    to API. But the 'PATCH' API always update this attribute.
    So this change does not work when choose 'remove' op.
    This patch sets value for 'strategy_id' attribute.

    Change-Id: I1597fb5d4985bb8271ad3cea7ea5f0adb7de65f4
    Closes-Bug: #1662395

Changed in watcher:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to watcher (stable/ocata)

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/434899

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to watcher (stable/ocata)

Reviewed: https://review.openstack.org/434899
Committed: https://git.openstack.org/cgit/openstack/watcher/commit/?id=8a7e316f731631fc02f2e9c5f27c53f6d3fafee8
Submitter: Jenkins
Branch: stable/ocata

commit 8a7e316f731631fc02f2e9c5f27c53f6d3fafee8
Author: ericxiett <eric_xiett@163.com>
Date: Wed Feb 8 09:25:58 2017 +0800

    Fix that remove 'strategy' attribute does not work.

    The 'strategy_id' attribute is the one that not exposes
    to API. But the 'PATCH' API always update this attribute.
    So this change does not work when choose 'remove' op.
    This patch sets value for 'strategy_id' attribute.

    Change-Id: I1597fb5d4985bb8271ad3cea7ea5f0adb7de65f4
    Closes-Bug: #1662395
    (cherry picked from commit e55c73be0ec5ce3d919c60a4edc7cdbb68ac3d56)

tags: added: in-stable-ocata
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/watcher 1.0.1

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/watcher 1.1.0

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

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.