neutron-lib duplicates os-resource-classes constants

Bug #1934256 reported by Balazs Gibizer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Low
Przemyslaw Szczerbik

Bug Description

The os-resource-classes lib is the official source of the standard placement resource classes. The neutron-lib repo has a copy of those constants[1]. Instead of duplicating the names, neutron-lib could depend on the os-resource-classes lib and import the constants from there[2].

[1] https://github.com/openstack/neutron-lib/blob/63c8443a65db4c662237b8687beff19c3973b819/neutron_lib/placement/constants.py#L20-L21
[2] https://github.com/openstack/os-resource-classes/blob/3aead5dd249d753a85585879ea501e1f4f4bcd17/os_resource_classes/__init__.py#L59-L62

tags: added: low-hanging-fruit
tags: added: lib
Changed in neutron:
assignee: nobody → Przemyslaw Szczerbik (pszczerbik)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron-lib (master)
Changed in neutron:
status: New → In Progress
Miguel Lavalle (minsel)
Changed in neutron:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron (master)

Related fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/neutron/+/799676

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron-lib (master)

Reviewed: https://review.opendev.org/c/openstack/neutron-lib/+/799034
Committed: https://opendev.org/openstack/neutron-lib/commit/44b3fc3f1821022aa5662b87a749b6b0eddaff20
Submitter: "Zuul (22348)"
Branch: master

commit 44b3fc3f1821022aa5662b87a749b6b0eddaff20
Author: Przemyslaw Szczerbik <email address hidden>
Date: Thu Jul 1 12:11:21 2021 +0200

    Add a TODO note for resource classes constants

    The os-resource-classes lib is the official source of the standard
    placement resource classes. Currently, the neutron-lib contains a copy
    of those constants. This code duplication shall be fixed with next
    major neutron-lib release. For the time being, add a TODO note
    informing that those constants shouldn't be used.

    Related-Bug: #1934256
    Change-Id: Iee08835fd30d43249a261aa0c0a0b6f2cda08ea4

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron (master)

Reviewed: https://review.opendev.org/c/openstack/neutron/+/799676
Committed: https://opendev.org/openstack/neutron/commit/26b06d246a345029ca9eb2137c1be14338f0dcae
Submitter: "Zuul (22348)"
Branch: master

commit 26b06d246a345029ca9eb2137c1be14338f0dcae
Author: Przemyslaw Szczerbik <email address hidden>
Date: Tue Jul 6 15:27:01 2021 +0200

    Use os-resource-classes lib for resource classes names

    The os-resource-classes lib is the official source of the standard
    placement resource classes. Currently, the neutron-lib contains a copy
    of those constants. However, they are already marked as deprecated and
    are going to be removed with next major release.

    Related-Bug: #1934256
    Change-Id: I33ecd6f32410f9b7ab1e87a6640201ea157bc383

Changed in neutron:
status: In Progress → Fix Released
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.