Use reader role for network tests
OpenStack services have implemented the 'reader' role in their
RBAC policy by default. But the Tempest tests for the reader role
APIs are calling these APIs with an admin or member user.
This patch update all the test files in tempest/api/network to use
the reader role for the GET requests (list, show, get operations).
This ensures proper RBAC testing by using the project_reader
credentials for read operations while maintaining the primary
credentials for write operations.
Changes include:
- Added credentials = ['primary', 'project_reader'] to test classes
- Set up reader_client in setup_clients method
- Replaced all GET requests to use reader_client instead of regular client
- Updated files: test_agent_management_negative.py,
test_allowed_address_pair.py, test_dhcp_ipv6.py, test_extensions.py,
test_extra_dhcp_options.py, test_floating_ips.py, test_networks.py,
test_networks_negative.py, test_ports.py, test_routers.py,
test_routers_negative.py, test_security_groups.py,
test_security_groups_negative.py, test_service_providers.py,
test_subnetpools_extensions.py, test_tags.py, test_versions.py
Implements-blueprint: test-neutron-with-srbac-defaults
Change-Id: I507358721afd4eca550e8b21b61ede1398248fc5
Signed-off-by: Manpreet Kaur <kaurmanpreet2620@gmail.com>
17 files changed