{"action":"created","comment":{"url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/pulls/comments/55261254","id":55261254,"diff_hunk":"@@ -1485,13 +1480,51 @@ def get_resource_hash(neutron_resource, *args):\n         return hash(tuple(hash_list))\n \n     def get_new_extnet_id(self, src_net_id, src_nets, dst_nets):\n+        \"\"\"\n+        Get ID of similar external network form DST.\n+\n+        :param src_net_id: External network ID from SRC cloud,\n+        :param src_nets: Networks list from SRC cloud,\n+        :param dst_nets: Networks list from DST cloud,\n+\n+        :return unicode: External network ID from DST, that matches with the\n+                         similar network from SRC.\n+        \"\"\"\n+\n         if src_net_id in self.ext_net_map:\n             dst_net_id = self.ext_net_map[src_net_id]\n         else:\n-            net_hash = self.get_res_hash_by_id(src_nets, src_net_id)\n-            dst_net_id = self.get_res_by_hash(dst_nets, net_hash)['id']\n+            src_net = get_network_from_list_by_id(src_net_id, src_nets)\n+            dst_net = self.get_dst_net_by_src_net(dst_nets, src_net)\n+\n+            if not dst_net:\n+                raise exception.AbortMigrationError(\n+                    \"No any suitable external network has been found. \"\n+                    \"Aborting migration...\")","path":"cloudferrylib/os/network/neutron.py","position":81,"original_position":81,"commit_id":"030642af58012dc1191b2a24d8e2002e9b2165d5","original_commit_id":"030642af58012dc1191b2a24d8e2002e9b2165d5","user":{"login":"roman-verchikov","id":386276,"avatar_url":"https://avatars.githubusercontent.com/u/386276?v=3","gravatar_id":"","url":"https://api.github.com/users/roman-verchikov","html_url":"https://github.com/roman-verchikov","followers_url":"https://api.github.com/users/roman-verchikov/followers","following_url":"https://api.github.com/users/roman-verchikov/following{/other_user}","gists_url":"https://api.github.com/users/roman-verchikov/gists{/gist_id}","starred_url":"https://api.github.com/users/roman-verchikov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roman-verchikov/subscriptions","organizations_url":"https://api.github.com/users/roman-verchikov/orgs","repos_url":"https://api.github.com/users/roman-verchikov/repos","events_url":"https://api.github.com/users/roman-verchikov/events{/privacy}","received_events_url":"https://api.github.com/users/roman-verchikov/received_events","type":"User","site_admin":false},"body":"Just return `None` here, this case is already handled by calling code","created_at":"2016-03-07T19:53:03Z","updated_at":"2016-03-07T19:53:03Z","html_url":"https://github.com/MirantisWorkloadMobility/CloudFerry/pull/891#discussion_r55261254","pull_request_url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/pulls/891","_links":{"self":{"href":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/pulls/comments/55261254"},"html":{"href":"https://github.com/MirantisWorkloadMobility/CloudFerry/pull/891#discussion_r55261254"},"pull_request":{"href":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/pulls/891"}}},"pull_request":{"url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/pulls/891","id":61787154,"html_url":"https://github.com/MirantisWorkloadMobility/CloudFerry/pull/891","diff_url":"https://github.com/MirantisWorkloadMobility/CloudFerry/pull/891.diff","patch_url":"https://github.com/MirantisWorkloadMobility/CloudFerry/pull/891.patch","issue_url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/issues/891","number":891,"state":"open","locked":false,"title":"[CF-249] Fix floating IPs migration","user":{"login":"miarmak","id":3357550,"avatar_url":"https://avatars.githubusercontent.com/u/3357550?v=3","gravatar_id":"","url":"https://api.github.com/users/miarmak","html_url":"https://github.com/miarmak","followers_url":"https://api.github.com/users/miarmak/followers","following_url":"https://api.github.com/users/miarmak/following{/other_user}","gists_url":"https://api.github.com/users/miarmak/gists{/gist_id}","starred_url":"https://api.github.com/users/miarmak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miarmak/subscriptions","organizations_url":"https://api.github.com/users/miarmak/orgs","repos_url":"https://api.github.com/users/miarmak/repos","events_url":"https://api.github.com/users/miarmak/events{/privacy}","received_events_url":"https://api.github.com/users/miarmak/received_events","type":"User","site_admin":false},"body":"Change the way of networks comparison. Collect all subnets hashes of\r\neach network and use it for more accurate networks comparison\r\n(identify which network on DST matches with the same network from SRC).","created_at":"2016-03-04T23:29:27Z","updated_at":"2016-03-07T19:53:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"540d88beacb33e8f4b9918a872ca7c4d4d9d53cf","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/pulls/891/commits","review_comments_url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/pulls/891/comments","review_comment_url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/pulls/comments{/number}","comments_url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/issues/891/comments","statuses_url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/statuses/030642af58012dc1191b2a24d8e2002e9b2165d5","head":{"label":"miarmak:cf-249_similar_ext_nets_check","ref":"cf-249_similar_ext_nets_check","sha":"030642af58012dc1191b2a24d8e2002e9b2165d5","user":{"login":"miarmak","id":3357550,"avatar_url":"https://avatars.githubusercontent.com/u/3357550?v=3","gravatar_id":"","url":"https://api.github.com/users/miarmak","html_url":"https://github.com/miarmak","followers_url":"https://api.github.com/users/miarmak/followers","following_url":"https://api.github.com/users/miarmak/following{/other_user}","gists_url":"https://api.github.com/users/miarmak/gists{/gist_id}","starred_url":"https://api.github.com/users/miarmak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miarmak/subscriptions","organizations_url":"https://api.github.com/users/miarmak/orgs","repos_url":"https://api.github.com/users/miarmak/repos","events_url":"https://api.github.com/users/miarmak/events{/privacy}","received_events_url":"https://api.github.com/users/miarmak/received_events","type":"User","site_admin":false},"repo":{"id":24412789,"name":"CloudFerry","full_name":"miarmak/CloudFerry","owner":{"login":"miarmak","id":3357550,"avatar_url":"https://avatars.githubusercontent.com/u/3357550?v=3","gravatar_id":"","url":"https://api.github.com/users/miarmak","html_url":"https://github.com/miarmak","followers_url":"https://api.github.com/users/miarmak/followers","following_url":"https://api.github.com/users/miarmak/following{/other_user}","gists_url":"https://api.github.com/users/miarmak/gists{/gist_id}","starred_url":"https://api.github.com/users/miarmak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miarmak/subscriptions","organizations_url":"https://api.github.com/users/miarmak/orgs","repos_url":"https://api.github.com/users/miarmak/repos","events_url":"https://api.github.com/users/miarmak/events{/privacy}","received_events_url":"https://api.github.com/users/miarmak/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/miarmak/CloudFerry","description":"CloudFerry is a cloud virtual workloads migration tool designed and developed by Mirantis Inc. ","fork":true,"url":"https://api.github.com/repos/miarmak/CloudFerry","forks_url":"https://api.github.com/repos/miarmak/CloudFerry/forks","keys_url":"https://api.github.com/repos/miarmak/CloudFerry/keys{/key_id}","collaborators_url":"https://api.github.com/repos/miarmak/CloudFerry/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/miarmak/CloudFerry/teams","hooks_url":"https://api.github.com/repos/miarmak/CloudFerry/hooks","issue_events_url":"https://api.github.com/repos/miarmak/CloudFerry/issues/events{/number}","events_url":"https://api.github.com/repos/miarmak/CloudFerry/events","assignees_url":"https://api.github.com/repos/miarmak/CloudFerry/assignees{/user}","branches_url":"https://api.github.com/repos/miarmak/CloudFerry/branches{/branch}","tags_url":"https://api.github.com/repos/miarmak/CloudFerry/tags","blobs_url":"https://api.github.com/repos/miarmak/CloudFerry/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/miarmak/CloudFerry/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/miarmak/CloudFerry/git/refs{/sha}","trees_url":"https://api.github.com/repos/miarmak/CloudFerry/git/trees{/sha}","statuses_url":"https://api.github.com/repos/miarmak/CloudFerry/statuses/{sha}","languages_url":"https://api.github.com/repos/miarmak/CloudFerry/languages","stargazers_url":"https://api.github.com/repos/miarmak/CloudFerry/stargazers","contributors_url":"https://api.github.com/repos/miarmak/CloudFerry/contributors","subscribers_url":"https://api.github.com/repos/miarmak/CloudFerry/subscribers","subscription_url":"https://api.github.com/repos/miarmak/CloudFerry/subscription","commits_url":"https://api.github.com/repos/miarmak/CloudFerry/commits{/sha}","git_commits_url":"https://api.github.com/repos/miarmak/CloudFerry/git/commits{/sha}","comments_url":"https://api.github.com/repos/miarmak/CloudFerry/comments{/number}","issue_comment_url":"https://api.github.com/repos/miarmak/CloudFerry/issues/comments{/number}","contents_url":"https://api.github.com/repos/miarmak/CloudFerry/contents/{+path}","compare_url":"https://api.github.com/repos/miarmak/CloudFerry/compare/{base}...{head}","merges_url":"https://api.github.com/repos/miarmak/CloudFerry/merges","archive_url":"https://api.github.com/repos/miarmak/CloudFerry/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/miarmak/CloudFerry/downloads","issues_url":"https://api.github.com/repos/miarmak/CloudFerry/issues{/number}","pulls_url":"https://api.github.com/repos/miarmak/CloudFerry/pulls{/number}","milestones_url":"https://api.github.com/repos/miarmak/CloudFerry/milestones{/number}","notifications_url":"https://api.github.com/repos/miarmak/CloudFerry/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/miarmak/CloudFerry/labels{/name}","releases_url":"https://api.github.com/repos/miarmak/CloudFerry/releases{/id}","deployments_url":"https://api.github.com/repos/miarmak/CloudFerry/deployments","created_at":"2014-09-24T11:45:40Z","updated_at":"2015-03-05T03:49:43Z","pushed_at":"2016-03-05T02:31:20Z","git_url":"git://github.com/miarmak/CloudFerry.git","ssh_url":"git@github.com:miarmak/CloudFerry.git","clone_url":"https://github.com/miarmak/CloudFerry.git","svn_url":"https://github.com/miarmak/CloudFerry","homepage":null,"size":3963,"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":"c499f25b51dc4d0bd512713f8a9293084ef7d969","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-03-07T18:49:02Z","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":4853,"stargazers_count":17,"watchers_count":17,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":38,"mirror_url":null,"open_issues_count":11,"forks":38,"open_issues":11,"watchers":17,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/pulls/891"},"html":{"href":"https://github.com/MirantisWorkloadMobility/CloudFerry/pull/891"},"issue":{"href":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/issues/891"},"comments":{"href":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/issues/891/comments"},"review_comments":{"href":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/pulls/891/comments"},"review_comment":{"href":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/pulls/891/commits"},"statuses":{"href":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/statuses/030642af58012dc1191b2a24d8e2002e9b2165d5"}}}}