neutron/neutron/tests/retargetable
Mathieu Rohon 5d53dfb8d6 Avoid duplicating tenant check when creating resources
The check of the tenant done in the method _get_tenant_id_for_create()
is already did by the Neutron Controller in prepare_request_body(),
with a call to attributes.populate_tenant_id().
Moreover, when the Controller processes a "create" requests, it
will add the 'tenant_id' to the resource dict.
Thus, _get_tenant_id_for_create() can be deleted.
Calls to this method are replaced by the res['tenant_id'].

Changes have to be done in UT to explicitly add the tenant_id while
creating resources, since the UT framework is bypassing the controller code
that automatically adds the tenant_id to the resource.

Co-Authored-By: Hong Hui Xiao <xiaohhui@cn.ibm.com>
Closes-Bug: #1513825
Change-Id: Icea06dc81344e1120bdf986a97a6b1094bbb765e
Depends-On: I31022e9230fc5404c6a94edabbb08d2b079c3a09
Depends-On: Iea3f014ef17a1e1b755cd2efe99afd1a36ebbc6a
Depends-On: I604602d023e0cbf7f6591149f914d73217d7a574
2016-01-05 14:18:41 +00:00
..
__init__.py Simplify retargetable test framework 2015-03-31 20:13:04 +00:00
base.py Fixed a bunch of typos throughout Neutron 2015-10-30 08:54:41 -05:00
client_fixtures.py Avoid duplicating tenant check when creating resources 2016-01-05 14:18:41 +00:00
rest_fixture.py Simplify retargetable test framework 2015-03-31 20:13:04 +00:00
test_example.py Simplify retargetable test framework 2015-03-31 20:13:04 +00:00