The code was elevating context before requesting networks which
means that the project_only code is skipped and all networks
could be retrieved. This means that the default networks returned
by FlatDhcpManager could include networks that belong to other
projects.
This fixes the issue by requesting the network without elevating
the context, re-enabling the proper project checking. It includes
tests to verify that the proper exception is raised when an
illegal network is requested and that the context has not been
elevated by the compute manager.
Reviewed: https:/ /review. openstack. org/100707 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=d8c19e78230 96bcdbc714e81fa fabffe8a70a22e
Committed: https:/
Submitter: Jenkins
Branch: master
commit d8c19e7823096bc dbc714e81fafabf fe8a70a22e
Author: Vishvananda Ishaya <email address hidden>
Date: Tue Jun 17 10:31:36 2014 -0700
Fix ownership checking in get_networks_ by_uuid
The code was elevating context before requesting networks which
means that the project_only code is skipped and all networks
could be retrieved. This means that the default networks returned
by FlatDhcpManager could include networks that belong to other
projects.
This fixes the issue by requesting the network without elevating
the context, re-enabling the proper project checking. It includes
tests to verify that the proper exception is raised when an
illegal network is requested and that the context has not been
elevated by the compute manager.
Partially- implements blueprint better- support- for-multiple- networks
Change-Id: Icd3bc521003725 cc3da9875dfd653 2d5c5524f43
Closes-Bug: 1331092