Best Python code snippet using tempest_python
test_qos_rbac.py
Source:test_qos_rbac.py
...58 @decorators.idempotent_id('ff1e98f3-d456-40a9-96d4-c7e4a55dcffa')59 def test_get_association_qos(self):60 qos = self._create_test_qos_specs()61 vol_type = self.create_volume_type()['id']62 self.qos_client.associate_qos(qos['id'], vol_type)63 self.addCleanup(self.qos_client.disassociate_qos, qos['id'], vol_type)64 with self.override_role():65 self.qos_client.show_association_qos(qos['id'])66 @rbac_rule_validation.action(67 service="cinder",68 rules=["volume_extension:qos_specs_manage:get_all"])69 @decorators.idempotent_id('546b8bb1-04a4-4387-9506-a538a7f3cd6a')70 def test_list_qos(self):71 with self.override_role():72 self.qos_client.list_qos()['qos_specs']73 @rbac_rule_validation.action(74 service="cinder", rules=["volume_extension:qos_specs_manage:update"])75 @decorators.idempotent_id('89b630b7-c170-47c3-ac80-50ed425c2d98')76 def test_set_qos_key(self):77 qos = self._create_test_qos_specs()78 with self.override_role():79 self.qos_client.set_qos_key(80 qos['id'], iops_bytes='500')['qos_specs']81 @rbac_rule_validation.action(82 service="cinder", rules=["volume_extension:qos_specs_manage:update"])83 @decorators.idempotent_id('6c50c837-de77-4dae-a2ec-30e05c62969c')84 def test_unset_qos_key(self):85 qos = self._create_test_qos_specs()86 self.qos_client.set_qos_key(qos['id'], iops_bytes='500')['qos_specs']87 with self.override_role():88 self.qos_client.unset_qos_key(qos['id'], ['iops_bytes'])89 waiters.wait_for_qos_operations(self.qos_client, qos['id'],90 'qos-key-unset', args=['iops_bytes'])91 @rbac_rule_validation.action(92 service="cinder", rules=["volume_extension:qos_specs_manage:update"])93 @decorators.idempotent_id('2047b347-8bbe-405e-bf5a-c75a0d7e3930')94 def test_associate_qos(self):95 qos = self._create_test_qos_specs()96 vol_type = self.create_volume_type()['id']97 with self.override_role():98 self.qos_client.associate_qos(qos['id'], vol_type)99 self.addCleanup(100 test_utils.call_and_ignore_notfound_exc,101 self.qos_client.disassociate_qos, qos['id'], vol_type)102 @rbac_rule_validation.action(103 service="cinder", rules=["volume_extension:qos_specs_manage:update"])104 @decorators.idempotent_id('f12aeca1-0c02-4f33-b805-014171e5b2d4')105 def test_disassociate_qos(self):106 qos = self._create_test_qos_specs()107 vol_type = self.create_volume_type()['id']108 self.qos_client.associate_qos(qos['id'], vol_type)109 self.addCleanup(test_utils.call_and_ignore_notfound_exc,110 self.qos_client.disassociate_qos, qos['id'], vol_type)111 with self.override_role():112 self.qos_client.disassociate_qos(qos['id'], vol_type)113 waiters.wait_for_qos_operations(self.qos_client, qos['id'],114 'disassociate', args=vol_type)115 @rbac_rule_validation.action(116 service="cinder", rules=["volume_extension:qos_specs_manage:update"])117 @decorators.idempotent_id('9f6e664d-a5d9-4e71-b122-73a3086be1b9')118 def test_disassociate_all_qos(self):119 qos = self._create_test_qos_specs()120 vol_type = self.create_volume_type()['id']121 self.qos_client.associate_qos(qos['id'], vol_type)122 self.addCleanup(test_utils.call_and_ignore_notfound_exc,123 self.qos_client.disassociate_qos, qos['id'], vol_type)124 with self.override_role():125 self.qos_client.disassociate_all_qos(qos['id'])126 waiters.wait_for_qos_operations(self.qos_client, qos['id'],...
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!