Beispiel #1
0
    def step(self, *args, **kwargs):

        try:
            self.prerequisite_view.entities.get_entity(name=self.obj.name,
                                                       surf_pages=True).click()

        except ItemNotFound:
            raise VolumeNotFoundError('Volume {} not found'.format(self.obj.name))
Beispiel #2
0
    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(name=volume.name).check()
                except ItemNotFound:
                    raise VolumeNotFoundError("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 VolumeNotFoundError('No Cloud Volume for Deletion')