manila/manila/tests
Mohammed Naser c3b92b030a share_networks: enable project_only API only
At the moment, the share_network database API which the web
API layer interacts with directly does not have any checking
for project_id which means that a user has the ability to run
operations against any other share_network if they have the ID.

This patch implements the usage of project_only in the database
query which ensures that administrators still have the behaviour
of getting any share network they want, but users can only pull
up those which are part of their context/authenticated project.

This patch also adjusts a few other tests due to the fact that
the existing tests would run a lot of inserts with a different
project_id than the context, which is not allowed in this new
API behaviour.  Therefore, the instances that involved projects
different than the context were converted to elevated ones.

There was also an instance where they were being created with a
project_id that did not match the fake context, therefore the
context was adjusted accordingly as well.

Closes-Bug: #1861485
Change-Id: Id67a939a475c4ac06d546b7e095bd10f1a6d2619
(cherry picked from commit 947315f090)
(cherry picked from commit 496e6e1d2a)
(cherry picked from commit 039ab2b020)
(cherry picked from commit 496bb1473e)
2020-03-10 15:34:57 -04:00
..
api Fix pagination does not speed up queries bug 2019-10-18 23:22:33 +00:00
cmd Add user messages periodic cleanup task 2017-07-17 07:53:19 +02:00
common Deprecate old keystone session config opts 2019-01-03 11:53:36 -08:00
compute Deprecate old keystone session config opts 2019-01-03 11:53:36 -08:00
data Fix Host-assisted Share Migration with IPv4+IPv6 2018-02-06 17:23:16 -05:00
db share_networks: enable project_only API only 2020-03-10 15:34:57 -04:00
integrated setup _IntegratedTestBase without verbose flag 2017-03-28 13:37:10 -04:00
message Removes use of timeutils.set_time_override 2017-09-15 23:31:33 +08:00
monkey_patch_example Removed ignored checks from tox.ini and fixed pep8 issues 2016-02-14 14:56:55 +02:00
network Fix tap device disappear after node restart 2018-03-20 14:33:34 +00:00
scheduler Remove backend spec from share type while creating replica 2019-10-16 21:08:08 +00:00
share Fix [Unity] verification and convert mgmt ipv6 2019-10-24 23:38:57 +00:00
share_group Add share groups and share group snapshots quotas 2017-07-26 11:32:43 +03:00
var Renamed cinder to manila. 2013-09-02 09:59:07 +03:00
volume Deprecate old keystone session config opts 2019-01-03 11:53:36 -08:00
wsgi Add possibility to run 'manila-api' with wsgi web servers 2017-04-10 12:49:20 +03:00
xenapi Renamed cinder to manila. 2013-09-02 09:59:07 +03:00
__init__.py Removed ignored checks from tox.ini and fixed pep8 issues 2016-02-14 14:56:55 +02:00
conf_fixture.py [Manila Unity] Set unity_server_meta_pool option as required 2018-06-08 17:37:26 +08:00
db_utils.py Destroy type quotas when a share type is deleted 2019-03-19 14:34:27 +00:00
declare_conf.py Switch to using oslo_* instead of oslo.* 2015-01-27 09:19:50 +01:00
fake_client_exception_class.py Fix keystone v3 issues for all clients 2016-03-18 14:42:33 +01:00
fake_compute.py Remove unused server_get() method 2016-01-21 09:16:14 +01:00
fake_driver.py Fix tap device disappear after node restart 2018-03-20 14:33:34 +00:00
fake_network.py Replaces uuid.uuid4 with uuidutils.generate_uuid() 2016-11-14 10:51:24 -05:00
fake_notifier.py Disable notifications 2017-07-17 12:45:11 -03:00
fake_service_instance.py Fix tap device disappear after node restart 2018-03-20 14:33:34 +00:00
fake_share.py Add quotas per share type 2017-07-19 17:29:04 +03:00
fake_utils.py Enable some off-by-default checks 2017-08-03 16:13:32 +08:00
fake_volume.py Trivial: Remove unused logging import 2015-12-28 21:44:26 -05:00
fake_zfssa.py Add share manage/unmanage of Oracle ZFSSA driver 2016-07-05 15:58:18 -04:00
policy.json [policy in code] Add support for share instance export location resource 2017-11-16 04:39:00 +00:00
runtime_conf.py Switch to using oslo_* instead of oslo.* 2015-01-27 09:19:50 +01:00
test_api.py Fix imports for py34 compatibility 2015-08-05 17:32:13 +03:00
test_conf.py Removed unnecessary setUp() calls in tests 2017-08-02 12:47:34 +00:00
test_context.py Remove unit test that is not relevant anymore 2017-01-28 12:02:24 +02:00
test_coordination.py coordination: use tooz builtin heartbeat feature 2017-05-17 10:38:53 +02:00
test_exception.py Add exception for no default share type configured 2017-08-02 15:27:53 -04:00
test_hacking.py Fix the duplicate hacking check M312 and H203 2017-08-13 08:01:42 +08:00
test_manager.py Use parenthesis instead of backslashes in tests folder 2017-06-19 17:56:01 +08:00
test_misc.py Don't translate LOG messages in testsuite 2014-10-28 19:46:09 +01:00
test_network.py Simplify the way drivers report support for ipv6 2017-12-06 15:21:53 +00:00
test_policy.py [policy in code] Add support for share instance export location resource 2017-11-16 04:39:00 +00:00
test_quota.py Destroy type quotas when a share type is deleted 2019-03-19 14:34:27 +00:00
test_rpc.py Removed unnecessary setUp() calls in tests 2017-08-02 12:47:34 +00:00
test_service.py Add ssl support for manila API access 2017-11-18 08:59:13 +00:00
test_test.py Fix test_rpc_consumer_isolation for oslo.messaging 5.31.0 2017-09-08 16:22:45 -04:00
test_test_utils.py Remove vim headers 2014-10-06 15:00:27 +02:00
test_utils.py Adjust ssh timeouts 2019-01-07 13:42:31 +00:00
utils.py NetApp cDOT: Add Intra-Vserver migration support 2017-01-21 13:06:30 -05:00