Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.

Commit

Permalink
Merge pull request #10139 from mnadeem92/except-exception-for-cleanup
Browse files Browse the repository at this point in the history
[1LP][RFR] Adding exception for volume cleanup and Fixing locator for schedule_migration test
  • Loading branch information
mshriver authored May 22, 2020
2 parents c1937a9 + 61f3914 commit f206a9c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 5 additions & 1 deletion cfme/fixtures/v2v_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import fauxfactory
import pytest
from cinderclient.exceptions import BadRequest
from manageiq_client.filters import Q
from riggerlib import recursive_update
from widgetastic.utils import partial_match
Expand Down Expand Up @@ -349,7 +350,10 @@ def cleanup_target(provider, migrated_vm):
for vol in vm.raw._info['os-extended-volumes:volumes_attached']:
volumes.append(vol['id'])
migrated_vm.cleanup_on_provider()
provider.mgmt.delete_volume(*volumes)
try:
provider.mgmt.delete_volume(*volumes)
except BadRequest as e:
logger.warning(e)


def get_vm(request, appliance, source_provider, template_type, datastore='nfs'):
Expand Down
5 changes: 1 addition & 4 deletions widgetastic_manageiq/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4777,10 +4777,7 @@ class MigrationPlansList(Widget):
ITEM_PROMPT_DELETE_BUTTON_LOCATOR = './/div[@role="document"]//button[@class="btn btn-primary"]'
ITEM_MODAL_CANCEL_BUTTON_LOCATOR = './/button[contains(@class,"btn-cancel btn")]'
ITEM_MODAL_TEXT_LOCATOR = './/div[ contains(@class,"modal-body")]'
ITEM_SCHEDULE_BUTTON_LOCATOR = (
'./div[contains(@class,"list-view-pf-actions")]'
'//button[text()="Schedule" or text()="Unschedule"]'
)
ITEM_SCHEDULE_BUTTON_LOCATOR = './/button[text()="Schedule" or text()="Unschedule"]'
ITEM_SCHEDULE_INPUT_LOCATOR = './/input[@id="dateTimeInput"]'
ITEM_MODAL_SCHEDULE_LOCATOR = (
'.//div[@class="modal-footer"]/' 'button[text()="Schedule" or text()="Unschedule"]'
Expand Down

0 comments on commit f206a9c

Please sign in to comment.