How to use delete_volume_type method in tempest

Best Python code snippet using tempest_python

volumetypespage.py

Source:volumetypespage.py Github

copy

Full Screen

...35 return forms.FormRegion(36 self.driver, self.conf,37 field_mappings=self.CREATE_VOLUME_TYPE_FORM_FIELDS)38 @tables.bind_table_action('delete')39 def delete_volume_type(self, delete_button):40 delete_button.click()41 return forms.BaseFormRegion(self.driver, self.conf)42class VolumetypesPage(basepage.BaseNavigationPage):43 QOS_SPECS_TABLE_NAME_COLUMN = 'name'44 VOLUME_TYPES_TABLE_NAME_COLUMN = 'name'45 CINDER_CONSUMER = 'back-end'46 def __init__(self, driver, conf):47 super(VolumetypesPage, self).__init__(driver, conf)48 self._page_title = "Volumes"49 @property50 def qos_specs_table(self):51 return QosSpecsTable(self.driver, self.conf)52 @property53 def volume_types_table(self):54 return VolumeTypesTable(self.driver, self.conf)55 def _get_row_with_qos_spec_name(self, name):56 return self.qos_specs_table.get_row(57 self.QOS_SPECS_TABLE_NAME_COLUMN, name)58 def _get_row_with_volume_type_name(self, name):59 return self.volume_types_table.get_row(60 self.VOLUME_TYPES_TABLE_NAME_COLUMN, name)61 def create_qos_spec(self, qos_spec_name, consumer=CINDER_CONSUMER):62 create_qos_spec_form = self.qos_specs_table.create_qos_spec()63 create_qos_spec_form.name.text = qos_spec_name64 create_qos_spec_form.submit()65 def create_volume_type(self, volume_type_name, description=None):66 volume_type_form = self.volume_types_table.create_volume_type()67 volume_type_form.name.text = volume_type_name68 if description is not None:69 volume_type_form.description.text = description70 volume_type_form.submit()71 def delete_qos_specs(self, name):72 row = self._get_row_with_qos_spec_name(name)73 row.mark()74 confirm_delete_qos_spec_form = self.qos_specs_table.delete_qos_specs()75 confirm_delete_qos_spec_form.submit()76 def delete_volume_type(self, name):77 row = self._get_row_with_volume_type_name(name)78 row.mark()79 confirm_delete_volume_types_form = \80 self.volume_types_table.delete_volume_type()81 confirm_delete_volume_types_form.submit()82 def is_qos_spec_present(self, name):83 return bool(self._get_row_with_qos_spec_name(name))84 def is_volume_type_present(self, name):85 return bool(self._get_row_with_volume_type_name(name))86 def is_qos_spec_deleted(self, name):87 return self.qos_specs_table.is_row_deleted(88 lambda: self._get_row_with_qos_spec_name(name))89 def is_volume_type_deleted(self, name):90 return self.volume_types_table.is_row_deleted(...

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