Admin can't add network to project

Bug #1161441 reported by Vish Ishaya
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Expired
Undecided
Unassigned

Bug Description

The add network command in os_networks does not accept a project_id. This makes the command pretty useless because it is an admin only command but the command only allows an admin to add the network to his own project. This should really have a parameter called project_id so the command is useful and does what the nova-manage command it is supposed to replace does.

Tags: api
Changed in nova:
importance: Undecided → Medium
Revision history for this message
Anne Gentle (annegentle) wrote :

Also I see there is a ghost mention of os-networks-associate in the nova/tests/integrated/api_samples/all_extensions/extensions-get-resp.json.tpl in the nova repo. Was that extension supposed to be the solution?

ZhiQiang Fan (aji-zqfan)
Changed in nova:
assignee: nobody → Zhiqiang Fan (aji-zqfan)
Revision history for this message
Dan Smith (danms) wrote :
Download full text (5.3 KiB)

FWIW, I do think that create accepts project_id:

dan@guaranine:/opt/stack/nova$ curl -i http://192.168.201.194:8774/v2/b85f70a3dbe84c5f823f47df21365ff8/os-networks -X POST -H "X-Auth-Project-Id: admin" -H "User-Agent: python-novaclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: MIIKjQYJKoZIhvcNAQcCoIIKfjCCCnoCAQExCTAHBgUrDgMCGjCCCWYGCSqGSIb3DQEHAaCCCVcEgglTeyJhY2Nlc3MiOiB7InRva2VuIjogeyJpc3N1ZWRfYXQiOiAiMjAxMy0wMy0yOVQxODozNTozMS42OTQ5MTMiLCAiZXhwaXJlcyI6ICIyMDEzLTAzLTMwVDE4OjM1OjMxWiIsICJpZCI6ICJwbGFjZWhvbGRlciIsICJ0ZW5hbnQiOiB7ImRlc2NyaXB0aW9uIjogbnVsbCwgImVuYWJsZWQiOiB0cnVlLCAiaWQiOiAiYjg1ZjcwYTNkYmU4NGM1ZjgyM2Y0N2RmMjEzNjVmZjgiLCAibmFtZSI6ICJhZG1pbiJ9fSwgInNlcnZpY2VDYXRhbG9nIjogW3siZW5kcG9pbnRzIjogW3siYWRtaW5VUkwiOiAiaHR0cDovLzE5Mi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zIifSwgeyJlbmRwb2ludHMiOiBbeyJhZG1pblVSTCI6ICJodHRwOi8vMTkyLjE2OC4yMDEuMTk0OjM1MzU3L3YyLjAiLCAicmVnaW9uIjogIlJlZ2lvbk9uZSIsICJpbnRlcm5hbFVSTCI6ICJodHRwOi8vMTkyLjE2OC4yMDEuMTk0OjUwMDAvdjIuMCIsICJpZCI6ICIwOWU1OGE3NDhiODg0YzIzOTAzZWExZTIzNjhmN2RiMCIsICJwdWJsaWNVUkwiOiAiaHR0cDovLzE5Mi4xNjguMjAxLjE5NDo1MDAwL3...

Read more...

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

Fix proposed to branch: stable/folsom
Review: https://review.openstack.org/25803

Revision history for this message
ZhiQiang Fan (aji-zqfan) wrote :

@Dan Smith (danms) :
yes, it can create a network with project_id,
but it cannot associate a non-associated network to other project except the admin own project.
please look up the reference in api.openstack.org/api-ref.html
or looking into the source code of netwroks extension.
it does not provide a way to accept a project id as parameter, just extract from context.project_id

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

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

Changed in nova:
status: New → In Progress
ZhiQiang Fan (aji-zqfan)
Changed in nova:
assignee: Zhiqiang Fan (aji-zqfan) → nobody
ZhiQiang Fan (aji-zqfan)
Changed in nova:
status: In Progress → Incomplete
Sean Dague (sdague)
Changed in nova:
status: Incomplete → Confirmed
tags: added: api
Changed in nova:
importance: Medium → Low
Loic Dachary (dachary)
Changed in nova:
assignee: nobody → Loic Dachary (dachary)
jawed (jkhelil)
Changed in nova:
assignee: Loic Dachary (dachary) → jawed (jkhelil)
jawed (jkhelil)
Changed in nova:
status: Confirmed → In Progress
Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote :

https://review.openstack.org/#/c/25814/ is not in progress, so setting this back to confirmed

Changed in nova:
status: In Progress → Confirmed
Revision history for this message
Sailaja (sailajap) wrote :

Hi Jawed,

Are you working on this bug?

Changed in nova:
assignee: jawed (jkhelil) → nobody
Revision history for this message
Markus Zoeller (markus_z) (mzoeller) wrote : Cleanup EOL bug report

This is an automated cleanup. This bug report has been closed because it
is older than 18 months and there is no open code change to fix this.
After this time it is unlikely that the circumstances which lead to
the observed issue can be reproduced.

If you can reproduce the bug, please:
* reopen the bug report (set to status "New")
* AND add the detailed steps to reproduce the issue (if applicable)
* AND leave a comment "CONFIRMED FOR: <RELEASE_NAME>"
  Only still supported release names are valid (LIBERTY, MITAKA, OCATA, NEWTON).
  Valid example: CONFIRMED FOR: LIBERTY

Changed in nova:
importance: Low → Undecided
status: Confirmed → Expired
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.