[cli] broken project/tenant arguments handling

Bug #1545182 reported by Jacek Tomasiak
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
python-muranoclient
Fix Released
Undecided
Jacek Tomasiak

Bug Description

OS_PROJECT_ID/OS_TENANT_ID and OS_PROJECT_NAME/OS_TENANT_NAME are supposed to be used interchangeably.
Current implementation doesn't handle this properly.

Example:
MURANO_URL=http://localhost:8082/ OS_AUTH_URL=http://localhost:5000/v2.0 OS_PROJECT_NAME=demo OS_USERNAME=demo OS_PASSWORD=<password> python shell.py package-list

Results in:
You must provide a tenant name or tenant id via --os-tenant-name, --os-tenant-id, env[OS_TENANT_NAME] or env[OS_TENANT_ID] OR a project name or project id via --os-project-name, --os-project-id, env[OS_PROJECT_ID] or env[OS_PROJECT_NAME]

It works correctly if both OS_PROJECT_NAME and OS_TENANT_NAME (or only OS_TENANT_NAME) are provided.

Jacek Tomasiak (skazi)
Changed in python-muranoclient:
assignee: nobody → Jacek Tomasiak (skazi)
Jacek Tomasiak (skazi)
Changed in python-muranoclient:
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-muranoclient (master)

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

Changed in python-muranoclient:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-muranoclient (master)

Reviewed: https://review.openstack.org/279868
Committed: https://git.openstack.org/cgit/openstack/python-muranoclient/commit/?id=ffa0fe44315e8ad7fd978342dd4e8cd6871c01a3
Submitter: Jenkins
Branch: master

commit ffa0fe44315e8ad7fd978342dd4e8cd6871c01a3
Author: Jacek Tomasiak <email address hidden>
Date: Fri Feb 12 23:30:31 2016 +0100

    Fix checks for Project/Tenant command line arguments

    OS_PROJECT_ID/OS_TENANT_ID and OS_PROJECT_NAME/OS_TENANT_NAME are
    supposed to be used interchangeably. Current implementation doesn't
    handle this properly. It requires "tenant" parameters to be present
    even if "project" arguments are provided. The check is done twice
    which is redundant, inconsistent and catches some paths which don't
    require those arguments at all.

    The redundant check has been removed and better of two available
    checks has been moved to proper place in the code.

    Change-Id: I7f435aedf40fa16af8417c21d778efc0c70979d6
    Closes-Bug: #1545182

Changed in python-muranoclient:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.