{"action":"created","comment":{"url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/pulls/comments/56396160","id":56396160,"diff_hunk":"@@ -0,0 +1,84 @@\n+# Copyright 2016 Mirantis Inc.\n+#\n+# Licensed under the Apache License, Version 2.0 (the \"License\");\n+# you may not use this file except in compliance with the License.\n+# You may obtain a copy of the License at\n+#\n+# http://www.apache.org/licenses/LICENSE-2.0\n+#\n+# Unless required by applicable law or agreed to in writing, software\n+# distributed under the License is distributed on an \"AS IS\" BASIS,\n+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+# See the License for the specific language governing permissions and\n+# limitations under the License.\n+\n+\n+def sorted_field_names(obj):\n+    \"\"\"\n+    Returns alphabetically sorted list of public object field names (i.e. their\n+    names don't start with '_')\n+    \"\"\"\n+\n+    return sorted(\n+        f for f in dir(obj)\n+        if not f.startswith('_') and not hasattr(getattr(obj, f), '__call__'))\n+\n+\n+def compute_hash(obj):\n+    \"\"\"\n+    Hash function that is able to compute hashes for lists and dictionaries.\n+    \"\"\"\n+\n+    if isinstance(obj, dict):\n+        return hash_iterable(sorted(obj.items()))\n+    elif hasattr(obj, '__iter__'):\n+        return hash_iterable(obj)\n+    else:\n+        return hash(obj)\n+\n+\n+def hash_iterable(iterable):\n+    \"\"\"\n+    Compute hash for some iterable value\n+    \"\"\"\n+    value = hash(iterable.__class__)\n+    for item in iterable:\n+        value = ((value * 1000003) & 0xFFFFFFFFFFFFFFFF) ^ compute_hash(item)","path":"cloudferrylib/utils/bases.py","position":46,"original_position":46,"commit_id":"b4ce4532f8d990c86b020baa111d1006bc4d33a0","original_commit_id":"b4ce4532f8d990c86b020baa111d1006bc4d33a0","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":"I'd suggest `sys.maxint` as mask, more chances to survive on different architectures","created_at":"2016-03-16T19:07:39Z","updated_at":"2016-03-16T19:07:39Z","html_url":"https://github.com/MirantisWorkloadMobility/CloudFerry/pull/909#discussion_r56396160","pull_request_url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/pulls/909","_links":{"self":{"href":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/pulls/comments/56396160"},"html":{"href":"https://github.com/MirantisWorkloadMobility/CloudFerry/pull/909#discussion_r56396160"},"pull_request":{"href":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/pulls/909"}}},"pull_request":{"url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/pulls/909","id":62495000,"html_url":"https://github.com/MirantisWorkloadMobility/CloudFerry/pull/909","diff_url":"https://github.com/MirantisWorkloadMobility/CloudFerry/pull/909.diff","patch_url":"https://github.com/MirantisWorkloadMobility/CloudFerry/pull/909.patch","issue_url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/issues/909","number":909,"state":"open","locked":false,"title":"[CF-318] Run discover before show_unused_resources or estimate_migration if needed","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-03-11T04:00:33Z","updated_at":"2016-03-16T19:07:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9adc279c9574eeef7d11afafc2ed893ee9bf91cf","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/pulls/909/commits","review_comments_url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/pulls/909/comments","review_comment_url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/pulls/comments{/number}","comments_url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/issues/909/comments","statuses_url":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/statuses/b4ce4532f8d990c86b020baa111d1006bc4d33a0","head":{"label":"antonf:000_cloud_signature","ref":"000_cloud_signature","sha":"b4ce4532f8d990c86b020baa111d1006bc4d33a0","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-03-15T00:25:27Z","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":4050,"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":"f719e69dbb1e121e8fc7f8dd62afa53ae88b1ca1","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-16T18:59: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":5130,"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":14,"forks":38,"open_issues":14,"watchers":17,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/pulls/909"},"html":{"href":"https://github.com/MirantisWorkloadMobility/CloudFerry/pull/909"},"issue":{"href":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/issues/909"},"comments":{"href":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/issues/909/comments"},"review_comments":{"href":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/pulls/909/comments"},"review_comment":{"href":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/pulls/909/commits"},"statuses":{"href":"https://api.github.com/repos/MirantisWorkloadMobility/CloudFerry/statuses/b4ce4532f8d990c86b020baa111d1006bc4d33a0"}}}}