How to use reset_group_status method in tempest

Best Python code snippet using tempest_python

test_groups.py

Source:test_groups.py Github

copy

Full Screen

...154 _api_version = 3155 min_microversion = '3.20'156 max_microversion = 'latest'157 @decorators.idempotent_id('b20c696b-0cbc-49a5-8b3a-b1fb9338f45c')158 def test_reset_group_status(self):159 # Create volume type160 volume_type = self.create_volume_type()161 # Create group type162 group_type = self.create_group_type()163 # Create group164 group = self.create_group(group_type=group_type['id'],165 volume_types=[volume_type['id']])166 # Reset group status167 self.addCleanup(waiters.wait_for_volume_resource_status,168 self.groups_client, group['id'], 'available')169 self.addCleanup(self.admin_groups_client.reset_group_status,170 group['id'], 'available')171 for status in ['creating', 'available', 'error']:172 self.admin_groups_client.reset_group_status(group['id'], status)173 waiters.wait_for_volume_resource_status(...

Full Screen

Full Screen

groups_client.py

Source:groups_client.py Github

copy

Full Screen

...94 put_body = json.dumps({'group': kwargs})95 resp, body = self.put('groups/%s' % group_id, put_body)96 self.validate_response(schema.update_group, resp, body)97 return rest_client.ResponseBody(resp, body)98 def reset_group_status(self, group_id, status_to_set):99 """Resets group status.100 For more information, please refer to the official API reference:101 https://docs.openstack.org/api-ref/block-storage/v3/#reset-group-status102 """103 post_body = json.dumps({'reset_status': {'status': status_to_set}})104 resp, body = self.post('groups/%s/action' % group_id, post_body)105 self.validate_response(schema.reset_group_status, resp, body)106 return rest_client.ResponseBody(resp, body)107 def is_resource_deleted(self, id):108 try:109 self.show_group(id)110 except lib_exc.NotFound:111 return True112 return False...

Full Screen

Full Screen

Automation Testing Tutorials

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.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run tempest automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful