{"action":"created","comment":{"url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/pulls/comments/61504102","id":61504102,"diff_hunk":"@@ -140,32 +133,30 @@ class UploadImage(BaseImageMigrationTask):\n \n     def migrate(self, dst_object, *args, **kwargs):\n         if self.src_object.status == 'deleted':\n-            return [True]\n+            return dict(need_restore_deleted=True)\n         image_id = dst_object.object_id.id\n         try:\n             image_data = _FileLikeProxy(self.src_glance.images.data(image_id))\n             self.dst_glance.images.update(image_id, data=image_data)\n-            return [False]\n+            return dict(need_restore_deleted=False)\n         except glance_exc.HTTPNotFound:\n-            return [True]\n+            return dict(need_restore_deleted=True)\n \n \n class UploadDeletedImage(BaseImageMigrationTask):\n-    default_provides = ['status']\n-\n     def migrate(self, dst_object, need_restore_deleted, *args, **kwargs):\n         if not need_restore_deleted:\n-            return [True]\n+            return\n         dst_image_id = dst_object.object_id.id\n         with model.Session() as session:\n             boot_disk_infos = self._get_boot_disk_locations(session)\n \n         for boot_disk_info in boot_disk_infos:\n             if self.upload_server_image(boot_disk_info, dst_image_id):\n-                return [True]\n+                return\n         LOG.warning('Unable to restore image %s: no servers found',\n                     dst_image_id)\n-        return [False]\n+        raise RuntimeError('Unable to restore deleted image: no servers found')","path":"cloudferry/lib/os/migrate/glance.py","position":108,"original_position":108,"commit_id":"473c532f01177948e2382b3f61688e3ac16b5b1c","original_commit_id":"473c532f01177948e2382b3f61688e3ac16b5b1c","user":{"login":"antonf","id":110457,"avatar_url":"https://avatars.githubusercontent.com/u/110457?v=3","gravatar_id":"","url":"https://api.github.com/users/antonf","html_url":"https://github.com/antonf","followers_url":"https://api.github.com/users/antonf/followers","following_url":"https://api.github.com/users/antonf/following{/other_user}","gists_url":"https://api.github.com/users/antonf/gists{/gist_id}","starred_url":"https://api.github.com/users/antonf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antonf/subscriptions","organizations_url":"https://api.github.com/users/antonf/orgs","repos_url":"https://api.github.com/users/antonf/repos","events_url":"https://api.github.com/users/antonf/events{/privacy}","received_events_url":"https://api.github.com/users/antonf/received_events","type":"User","site_admin":false},"body":"It will fail image migration and don't proceed with migration that depend on them. When migration will complete, exception will be raised that will include all exception raised in tasks based on which we can report what objects we failed to migrate and why.","created_at":"2016-04-28T21:17:45Z","updated_at":"2016-04-28T21:17:45Z","html_url":"https://github.com/MirantisWorkloadMobility/CloudFerry/pull/986#discussion_r61504102","pull_request_url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/pulls/986","_links":{"self":{"href":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/pulls/comments/61504102"},"html":{"href":"https://github.com/MirantisWorkloadMobility/CloudFerry/pull/986#discussion_r61504102"},"pull_request":{"href":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/pulls/986"}}},"pull_request":{"url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/pulls/986","id":68129544,"html_url":"https://github.com/MirantisWorkloadMobility/CloudFerry/pull/986","diff_url":"https://github.com/MirantisWorkloadMobility/CloudFerry/pull/986.diff","patch_url":"https://github.com/MirantisWorkloadMobility/CloudFerry/pull/986.patch","issue_url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/issues/986","number":986,"state":"open","locked":false,"title":"[CF-436] Add ImageMember migration.","user":{"login":"antonf","id":110457,"avatar_url":"https://avatars.githubusercontent.com/u/110457?v=3","gravatar_id":"","url":"https://api.github.com/users/antonf","html_url":"https://github.com/antonf","followers_url":"https://api.github.com/users/antonf/followers","following_url":"https://api.github.com/users/antonf/following{/other_user}","gists_url":"https://api.github.com/users/antonf/gists{/gist_id}","starred_url":"https://api.github.com/users/antonf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antonf/subscriptions","organizations_url":"https://api.github.com/users/antonf/orgs","repos_url":"https://api.github.com/users/antonf/repos","events_url":"https://api.github.com/users/antonf/events{/privacy}","received_events_url":"https://api.github.com/users/antonf/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-04-27T21:38:46Z","updated_at":"2016-04-28T21:17:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"445eabbfa5557ad12c550c96452038c0db6203e7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/pulls/986/commits","review_comments_url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/pulls/986/comments","review_comment_url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/pulls/comments{/number}","comments_url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/issues/986/comments","statuses_url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/statuses/473c532f01177948e2382b3f61688e3ac16b5b1c","head":{"label":"antonf:012_v2_image_member_migration","ref":"012_v2_image_member_migration","sha":"473c532f01177948e2382b3f61688e3ac16b5b1c","user":{"login":"antonf","id":110457,"avatar_url":"https://avatars.githubusercontent.com/u/110457?v=3","gravatar_id":"","url":"https://api.github.com/users/antonf","html_url":"https://github.com/antonf","followers_url":"https://api.github.com/users/antonf/followers","following_url":"https://api.github.com/users/antonf/following{/other_user}","gists_url":"https://api.github.com/users/antonf/gists{/gist_id}","starred_url":"https://api.github.com/users/antonf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antonf/subscriptions","organizations_url":"https://api.github.com/users/antonf/orgs","repos_url":"https://api.github.com/users/antonf/repos","events_url":"https://api.github.com/users/antonf/events{/privacy}","received_events_url":"https://api.github.com/users/antonf/received_events","type":"User","site_admin":false},"repo":{"id":45059913,"name":"CloudFerry","full_name":"antonf/CloudFerry","owner":{"login":"antonf","id":110457,"avatar_url":"https://avatars.githubusercontent.com/u/110457?v=3","gravatar_id":"","url":"https://api.github.com/users/antonf","html_url":"https://github.com/antonf","followers_url":"https://api.github.com/users/antonf/followers","following_url":"https://api.github.com/users/antonf/following{/other_user}","gists_url":"https://api.github.com/users/antonf/gists{/gist_id}","starred_url":"https://api.github.com/users/antonf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antonf/subscriptions","organizations_url":"https://api.github.com/users/antonf/orgs","repos_url":"https://api.github.com/users/antonf/repos","events_url":"https://api.github.com/users/antonf/events{/privacy}","received_events_url":"https://api.github.com/users/antonf/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/antonf/CloudFerry","description":"CloudFerry is a cloud virtual workloads migration tool designed and developed by Mirantis Inc. ","fork":true,"url":"https://api.github.com/repos/antonf/CloudFerry","forks_url":"https://api.github.com/repos/antonf/CloudFerry/forks","keys_url":"https://api.github.com/repos/antonf/CloudFerry/keys{/key_id}","collaborators_url":"https://api.github.com/repos/antonf/CloudFerry/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/antonf/CloudFerry/teams","hooks_url":"https://api.github.com/repos/antonf/CloudFerry/hooks","issue_events_url":"https://api.github.com/repos/antonf/CloudFerry/issues/events{/number}","events_url":"https://api.github.com/repos/antonf/CloudFerry/events","assignees_url":"https://api.github.com/repos/antonf/CloudFerry/assignees{/user}","branches_url":"https://api.github.com/repos/antonf/CloudFerry/branches{/branch}","tags_url":"https://api.github.com/repos/antonf/CloudFerry/tags","blobs_url":"https://api.github.com/repos/antonf/CloudFerry/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/antonf/CloudFerry/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/antonf/CloudFerry/git/refs{/sha}","trees_url":"https://api.github.com/repos/antonf/CloudFerry/git/trees{/sha}","statuses_url":"https://api.github.com/repos/antonf/CloudFerry/statuses/{sha}","languages_url":"https://api.github.com/repos/antonf/CloudFerry/languages","stargazers_url":"https://api.github.com/repos/antonf/CloudFerry/stargazers","contributors_url":"https://api.github.com/repos/antonf/CloudFerry/contributors","subscribers_url":"https://api.github.com/repos/antonf/CloudFerry/subscribers","subscription_url":"https://api.github.com/repos/antonf/CloudFerry/subscription","commits_url":"https://api.github.com/repos/antonf/CloudFerry/commits{/sha}","git_commits_url":"https://api.github.com/repos/antonf/CloudFerry/git/commits{/sha}","comments_url":"https://api.github.com/repos/antonf/CloudFerry/comments{/number}","issue_comment_url":"https://api.github.com/repos/antonf/CloudFerry/issues/comments{/number}","contents_url":"https://api.github.com/repos/antonf/CloudFerry/contents/{+path}","compare_url":"https://api.github.com/repos/antonf/CloudFerry/compare/{base}...{head}","merges_url":"https://api.github.com/repos/antonf/CloudFerry/merges","archive_url":"https://api.github.com/repos/antonf/CloudFerry/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/antonf/CloudFerry/downloads","issues_url":"https://api.github.com/repos/antonf/CloudFerry/issues{/number}","pulls_url":"https://api.github.com/repos/antonf/CloudFerry/pulls{/number}","milestones_url":"https://api.github.com/repos/antonf/CloudFerry/milestones{/number}","notifications_url":"https://api.github.com/repos/antonf/CloudFerry/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/antonf/CloudFerry/labels{/name}","releases_url":"https://api.github.com/repos/antonf/CloudFerry/releases{/id}","deployments_url":"https://api.github.com/repos/antonf/CloudFerry/deployments","created_at":"2015-10-27T18:00:49Z","updated_at":"2015-10-27T18:00:50Z","pushed_at":"2016-04-27T22:39:22Z","git_url":"git://github.com/antonf/CloudFerry.git","ssh_url":"git@github.com:antonf/CloudFerry.git","clone_url":"https://github.com/antonf/CloudFerry.git","svn_url":"https://github.com/antonf/CloudFerry","homepage":null,"size":4726,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"MirantisWorkloadMobility:devel","ref":"devel","sha":"ade3909212d3d3f551940d4998453511ee68ddbc","user":{"login":"MirantisWorkloadMobility","id":8500817,"avatar_url":"https://avatars.githubusercontent.com/u/8500817?v=3","gravatar_id":"","url":"https://api.github.com/users/MirantisWorkloadMobility","html_url":"https://github.com/MirantisWorkloadMobility","followers_url":"https://api.github.com/users/MirantisWorkloadMobility/followers","following_url":"https://api.github.com/users/MirantisWorkloadMobility/following{/other_user}","gists_url":"https://api.github.com/users/MirantisWorkloadMobility/gists{/gist_id}","starred_url":"https://api.github.com/users/MirantisWorkloadMobility/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MirantisWorkloadMobility/subscriptions","organizations_url":"https://api.github.com/users/MirantisWorkloadMobility/orgs","repos_url":"https://api.github.com/users/MirantisWorkloadMobility/repos","events_url":"https://api.github.com/users/MirantisWorkloadMobility/events{/privacy}","received_events_url":"https://api.github.com/users/MirantisWorkloadMobility/received_events","type":"User","site_admin":false},"repo":{"id":23142392,"name":"CloudFerry","full_name":"MirantisWorkloadMobility/CloudFerry","owner":{"login":"MirantisWorkloadMobility","id":8500817,"avatar_url":"https://avatars.githubusercontent.com/u/8500817?v=3","gravatar_id":"","url":"https://api.github.com/users/MirantisWorkloadMobility","html_url":"https://github.com/MirantisWorkloadMobility","followers_url":"https://api.github.com/users/MirantisWorkloadMobility/followers","following_url":"https://api.github.com/users/MirantisWorkloadMobility/following{/other_user}","gists_url":"https://api.github.com/users/MirantisWorkloadMobility/gists{/gist_id}","starred_url":"https://api.github.com/users/MirantisWorkloadMobility/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MirantisWorkloadMobility/subscriptions","organizations_url":"https://api.github.com/users/MirantisWorkloadMobility/orgs","repos_url":"https://api.github.com/users/MirantisWorkloadMobility/repos","events_url":"https://api.github.com/users/MirantisWorkloadMobility/events{/privacy}","received_events_url":"https://api.github.com/users/MirantisWorkloadMobility/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MirantisWorkloadMobility/CloudFerry","description":"\"CloudFerry Framework\" is a cloud virtual workloads migration framework designed and developed by Mirantis Inc. ","fork":false,"url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry","forks_url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/forks","keys_url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/teams","hooks_url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/hooks","issue_events_url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/issues/events{/number}","events_url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/events","assignees_url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/assignees{/user}","branches_url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/branches{/branch}","tags_url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/tags","blobs_url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/git/refs{/sha}","trees_url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/statuses/{sha}","languages_url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/languages","stargazers_url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/stargazers","contributors_url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/contributors","subscribers_url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/subscribers","subscription_url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/subscription","commits_url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/commits{/sha}","git_commits_url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/git/commits{/sha}","comments_url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/comments{/number}","issue_comment_url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/issues/comments{/number}","contents_url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/contents/{+path}","compare_url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/merges","archive_url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/downloads","issues_url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/issues{/number}","pulls_url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/pulls{/number}","milestones_url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/milestones{/number}","notifications_url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/labels{/name}","releases_url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/releases{/id}","deployments_url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/deployments","created_at":"2014-08-20T09:00:38Z","updated_at":"2016-03-02T10:20:17Z","pushed_at":"2016-04-28T19:06:50Z","git_url":"git://github.com/MirantisWorkloadMobility/CloudFerry.git","ssh_url":"git@github.com:MirantisWorkloadMobility/CloudFerry.git","clone_url":"https://github.com/MirantisWorkloadMobility/CloudFerry.git","svn_url":"https://github.com/MirantisWorkloadMobility/CloudFerry","homepage":"","size":5698,"stargazers_count":17,"watchers_count":17,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":40,"mirror_url":null,"open_issues_count":9,"forks":40,"open_issues":9,"watchers":17,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/pulls/986"},"html":{"href":"https://github.com/MirantisWorkloadMobility/CloudFerry/pull/986"},"issue":{"href":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/issues/986"},"comments":{"href":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/issues/986/comments"},"review_comments":{"href":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/pulls/986/comments"},"review_comment":{"href":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/pulls/986/commits"},"statuses":{"href":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/statuses/473c532f01177948e2382b3f61688e3ac16b5b1c"}}}}