Incorrect samples in the add Tenant Access to private flavor action

Bug #1358805 reported by KaiLin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openstack-api-site
Fix Released
Medium
Diane Fleming

Bug Description

when I give a specified tenant access to the specified private flavor, I use it like this :

POST /v2/​{tenant_id}​/flavors/​{flavor_id}​/action
{
    "addTenantAccess": {
        "tenant": "fake_tenant"
    }
}
tenant: The name of the tenant to which to give access.

The response is:
{
    "flavor_access": [
        {
            "flavor_id": "10",
            #here is "tenant_id"
            "tenant_id": "fake_tenant"
        },
        {
            "flavor_id": "10",
            "tenant_id": "openstack"
        }
    ]
}

when I use the private flavor to create VM in the specified tenant,it failed. But if I add the tenant access by using the tenant id,it can create VM successfully in the specified tenant .

POST /v2/​{tenant_id}​/flavors/​{flavor_id}​/action
{
    "addTenantAccess": {
        "tenant": "{tenant_id}"
    }
}
I check the code, It also uses the "tenant" information as the "project id".

So we should change the api guides in the add Tenant Access to private flavor action,
change "tenant: The name of the tenant to which to give access." to
"tenant: The uuid of the tenant to which to give access."

KaiLin (linkai3)
Changed in nova:
assignee: nobody → KaiLin (linkai3)
description: updated
KaiLin (linkai3)
affects: nova → openstack-api-site
description: updated
Revision history for this message
KaiLin (linkai3) wrote :

This is just a temporary modification method,we can not let the user to ensure the correctness of parameters, so we should verify the validation of tenant id.

Revision history for this message
Anne Gentle (annegentle) wrote :

To fix this as a doc bug, look for JSON examples that have "openstack" rather than a fake UUID in the api-site repo:

https://github.com/openstack/api-site/search?utf8=%E2%9C%93&q=flavor_access

Changed in openstack-api-site:
status: New → Triaged
importance: Undecided → Medium
summary: - Incorrect API in the add Tenant Access to private flavor action
+ Incorrect samples in the add Tenant Access to private flavor action
Revision history for this message
Diane Fleming (diane-fleming) wrote :
Changed in openstack-api-site:
assignee: KaiLin (linkai3) → Diane Fleming (diane-fleming)
milestone: none → kilo
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to api-site (master)

Reviewed: https://review.openstack.org/172767
Committed: https://git.openstack.org/cgit/openstack/api-site/commit/?id=806cdd7436be97beb1f7e61ebbeb520ef0269504
Submitter: Jenkins
Branch: master

commit 806cdd7436be97beb1f7e61ebbeb520ef0269504
Author: Diane Fleming <email address hidden>
Date: Sun Apr 12 19:15:27 2015 -0500

    Update os-flavor-access extension for Compute API

    Change-Id: I208c3774754dab096e43278671cd8e5738293f70
    Closes-Bug: #1358805

Changed in openstack-api-site:
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.