List hypervisors with details rbac test
As mentioned in a previous patch [0],
a test can be added for listing hypervisors
with details, which is what this patch does.
[0] https://review.openstack.org/#/c/462742/3/patrole_tempest_plugin/tests/api/compute/test_hypervisor_rbac.py
Change-Id: Ib828c707604b57747e9e54800455831d12155138
diff --git a/patrole_tempest_plugin/tests/api/compute/test_hypervisor_rbac.py b/patrole_tempest_plugin/tests/api/compute/test_hypervisor_rbac.py
index d9e9144..e687fb4 100644
--- a/patrole_tempest_plugin/tests/api/compute/test_hypervisor_rbac.py
+++ b/patrole_tempest_plugin/tests/api/compute/test_hypervisor_rbac.py
@@ -44,6 +44,14 @@
self.rbac_utils.switch_role(self, toggle_rbac_role=True)
self.hypervisor_client.list_hypervisors()['hypervisors']
+ @decorators.idempotent_id('36b95c7d-1085-487a-a674-b7c1ca35f520')
+ @rbac_rule_validation.action(
+ service="nova",
+ rule="os_compute_api:os-hypervisors")
+ def test_list_hypervisors_with_details(self):
+ self.rbac_utils.switch_role(self, toggle_rbac_role=True)
+ self.hypervisor_client.list_hypervisors(detail=True)['hypervisors']
+
@decorators.idempotent_id('8a7f6f9e-34a6-4480-8875-bba566c3a581')
@rbac_rule_validation.action(
service="nova",
diff --git a/releasenotes/notes/hypervisor-list-with-details-test-655e873cd881c2bb.yaml b/releasenotes/notes/hypervisor-list-with-details-test-655e873cd881c2bb.yaml
new file mode 100644
index 0000000..30ccb45
--- /dev/null
+++ b/releasenotes/notes/hypervisor-list-with-details-test-655e873cd881c2bb.yaml
@@ -0,0 +1,4 @@
+---
+features:
+ - |
+ Add RBAC test for listing hypervisors with details.