def step(self, *args, **kwargs): try: self.prerequisite_view.entities.get_entity( by_name=self.obj.name, surf_pages=True).click() except ItemNotFound: raise VolumeNotFound('Volume {} not found'.format(self.obj.name))
def delete(self, *volumes): """Delete one or more Volumes from list of Volumes Args: One or Multiple 'cfme.storage.volume.Volume' objects """ view = navigate_to(self, 'All') if view.entities.get_all(): for volume in volumes: try: view.entities.get_entity(volume.name).check() except ItemNotFound: raise VolumeNotFound("Volume {} not found".format( volume.name)) view.toolbar.configuration.item_select( 'Delete selected Cloud Volumes', handle_alert=True) for volume in volumes: volume.wait_for_disappear() else: raise VolumeNotFound('No Cloud Volume for Deletion')