def handle(self, request, data): share_name = _get_id_if_name_empty(data) try: manila.migration_complete(request, self.initial['share_id']) messages.success( request, _('Successfully sent the request to complete migration of ' ' share: %s.') % share_name) return True except Exception: exceptions.handle(request, _("Unable to complete migration " "of share %s.") % share_name) return False
def test_migration_complete(self): api.migration_complete(self.request, 'fake_share') self.manilaclient.shares.migration_complete.assert_called_once_with( 'fake_share')