← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 2022043] Re: APIs for resources which don't have project_id still requires it in the API definition

 

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

commit b82a34c09b9a69084cc5d52bd40329c4c1ced924
Author: Slawek Kaplonski <skaplons@xxxxxxxxxx>
Date:   Tue May 14 16:38:34 2024 +0200

    Always expect project_id and tenant_id to be in the attributes list
    
    Even in case when resource definition don't have project_id nor
    tenant_id in its API definition it is always there because it is added
    from the neutron_context.
    Because of that reason, it was necessary to add those attributes to the
    list of attributes of all resources, even those which don't really
    belong to any specific project (like e.g. flavors or QoS rules).
    
    This patch adds project_id and tenant_id to the list of the expected
    attributes always so it won't fail validation of the attributes during
    e.g. creation of the flavor even if flavor resource don't have
    project_id defined.
    
    Additionally this patch removes project_id from the flavors and QoS
    rules definitions.
    
    Closes-bug: #2022043
    Change-Id: Ib25295e666e7230f9d6c7c5df83411014d5b6ac2


** Changed in: neutron
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/2022043

Title:
  APIs for resources which don't have project_id still requires it in
  the API definition

Status in neutron:
  Fix Released

Bug description:
  I discovered that while working on new default SG rules templates API:
  https://review.opendev.org/c/openstack/neutron/+/883246 but it seems
  it's the same for e.g. flavors: https://github.com/openstack/neutron-
  lib/blob/master/neutron_lib/api/definitions/flavors.py which have
  tenant_id defined in the API definiton even if policy don't really
  require it and it don't really belongs to any project.

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/2022043/+subscriptions



References