deprecated_reason doesn't show up in generated sample if using deprecated_rule

Bug #1771416 reported by Matt Riedemann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
oslo.policy
Fix Released
Low
Ben Nemec

Bug Description

When you have a deprecated_for_removal rule, the deprecated_reason (if there is one) is output in the generated sample:

https://github.com/openstack/oslo.policy/blob/2ae04ebdef1bea1cb3ffbca6d04084a417ade99b/oslo_policy/generator.py#L144

But if you're instead using an alias (deprecated_rule rather than deprecated_for_removal), the deprecated_reason is not output:

https://github.com/openstack/oslo.policy/blob/2ae04ebdef1bea1cb3ffbca6d04084a417ade99b/oslo_policy/generator.py#L146

I'm not sure if this is intentional or not.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslo.policy (master)

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

Changed in oslo.policy:
assignee: nobody → Ben Nemec (bnemec)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to oslo.policy (master)

Reviewed: https://review.openstack.org/568687
Committed: https://git.openstack.org/cgit/openstack/oslo.policy/commit/?id=90e6412210e96ba98e30edf1ef1867361900dbf7
Submitter: Zuul
Branch: master

commit 90e6412210e96ba98e30edf1ef1867361900dbf7
Author: Ben Nemec <email address hidden>
Date: Tue May 15 20:18:53 2018 +0000

    Include deprecated_reason when deprecated_rule is set

    Previously deprecated_reason was only included in the sample policy
    file in the deprecated_for_removal case. There's no reason users
    wouldn't want to be able to provide an explanation for deprecated_rule
    deprecations too.

    Change-Id: I4036bf8efcd42ca4b1a35ae6940ac69af7fe205b
    Closes-Bug: 1771416

Changed in oslo.policy:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/oslo.policy 1.36.0

This issue was fixed in the openstack/oslo.policy 1.36.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.