Compute API in nova - server group "policy" field is a string rather than an object

Bug #1830800 reported by Matt Riedemann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Yikun Jiang
Rocky
Confirmed
Medium
Unassigned
Stein
Fix Committed
Medium
Matt Riedemann

Bug Description

- [x] This doc is inaccurate in this way:

The server group policy field added in v2.64 is a string but the API reference says the parameter is an object.

https://github.com/openstack/nova/blob/37ccd7ec3a0f0b8f636d8dd82e6e929f462f6586/api-ref/source/parameters.yaml#L5368

https://github.com/openstack/nova/blob/37ccd7ec3a0f0b8f636d8dd82e6e929f462f6586/nova/api/openstack/compute/schemas/server_groups.py#L60

-----------------------------------
Release: 19.1.0.dev441 on 2019-03-26 18:09:01
SHA: 37ccd7ec3a0f0b8f636d8dd82e6e929f462f6586
Source: https://opendev.org/openstack/nova/src/api-ref/source/index.rst
URL: https://developer.openstack.org/api-ref/compute/

Tags: api-ref
Revision history for this message
Takashi Natsume (natsume-takashi) wrote :

The API reference is generated from master branch only.
So stable branches do not have to be fixed.

Changed in nova:
assignee: nobody → Takashi NATSUME (natsume-takashi)
status: Triaged → In Progress
Revision history for this message
Yikun Jiang (yikunkero) wrote :

Yes, I think it's a api-ref bug.

And I also saw why it happened: it came from original patch PS31~32 [1], the policy code had been change from "object" to "string", but I forgot to change the api-ref together.

[1] https://review.opendev.org/#/c/567534/31..32/doc/api_samples/os-server-groups/v2.64/server-groups-post-req.json

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

Fix proposed to branch: master
Review: https://review.opendev.org/661869

Changed in nova:
assignee: Takashi NATSUME (natsume-takashi) → Yikun Jiang (yikunkero)
Revision history for this message
Matt Riedemann (mriedem) wrote :

> The API reference is generated from master branch only.

True they are published from master only, but...

> So stable branches do not have to be fixed.

If someone is building docs from the stable branch code for their product, then the api-ref changes could be backported. This is also a small enough fix that I think backports are OK.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.opendev.org/661869
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=961435453552569754cb7801c1e5c366dd9d16a8
Submitter: Zuul
Branch: master

commit 961435453552569754cb7801c1e5c366dd9d16a8
Author: Yikun Jiang <email address hidden>
Date: Wed May 29 09:16:51 2019 +0800

    Fix the server group "policy" field type in api-ref

    The server group policy field added in v2.64 is a string but
    the API reference says the parameter is an object.

    This patch changes it from "object" to "string".

    Change-Id: I1b4efe8afb302d94c810389e124c5370cbe72ddf
    Closes-bug: #1830800

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

Fix proposed to branch: stable/stein
Review: https://review.opendev.org/662224

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

Reviewed: https://review.opendev.org/662224
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=5eb4e01a836810c0fea4f688018faa4ca71eba0e
Submitter: Zuul
Branch: stable/stein

commit 5eb4e01a836810c0fea4f688018faa4ca71eba0e
Author: Yikun Jiang <email address hidden>
Date: Wed May 29 09:16:51 2019 +0800

    Fix the server group "policy" field type in api-ref

    The server group policy field added in v2.64 is a string but
    the API reference says the parameter is an object.

    This patch changes it from "object" to "string".

    Change-Id: I1b4efe8afb302d94c810389e124c5370cbe72ddf
    Closes-bug: #1830800
    (cherry picked from commit 961435453552569754cb7801c1e5c366dd9d16a8)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 20.0.0.0rc1

This issue was fixed in the openstack/nova 20.0.0.0rc1 release candidate.

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

This issue was fixed in the openstack/nova 19.0.3 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.