{"action":"created","comment":{"url":"https://api.github.com/repos/crowbar/crowbar-openstack/pulls/comments/47144999","id":47144999,"diff_hunk":"@@ -80,60 +93,83 @@ def load_current_resource\n   compute_deltas\n end\n \n+def parse_gen_info_line(line, ringinfo)\n+  Chef::Log.debug(\"parsing gen info: \" + line)\n+\n+  line =~ /^(\\d+) partitions, ([0-9.]+) replicas, (\\d+) regions, (\\d+) zones, (\\d+) devices,.*$/\n+  if $~.nil?\n+    raise \"failed to parse gen info: #{line}\"\n+  end\n+\n+  ringinfo.partitions = $1\n+  ringinfo.replicas = $2\n+  _regions = $3\n+  ringinfo.zones = $4\n+  ringinfo.device_num = $5\n+end\n+\n+def parse_dev_info_line(line, ringinfo)\n+  Chef::Log.debug(\"parsing dev info: \" + line)\n+\n+  # Line looks like this:\n+  #   id  region  zone      ip address  port  replication ip  replication port      name weight partitions balance meta\n+  #   0       1     0  192.168.125.14  6000  192.168.125.14              6000 2d4dc9923ed244dc9cac8f283ca79748  99.00          0 -100.00\n+  line =~ /^\\s+(\\d+)\\s+(\\d+)\\s+(\\d+)\\s+(\\d+\\.\\d+\\.\\d+\\.\\d+)\\s+(\\d+)\\s+(\\d+\\.\\d+\\.\\d+\\.\\d+)\\s+(\\d+)\\s+(\\S+)\\s+([0-9.]+)\\s+(\\d+)\\s*([-0-9.]+)\\s*$/","path":"chef/cookbooks/swift/providers/ringfile.rb","position":63,"original_position":63,"commit_id":"46691801d7248864fbdf2d0bb761cb7aeb8a3d17","original_commit_id":"46691801d7248864fbdf2d0bb761cb7aeb8a3d17","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Metrics/LineLength: Line is too long. [144/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)","created_at":"2015-12-09T20:12:32Z","updated_at":"2015-12-09T20:12:32Z","html_url":"https://github.com/crowbar/crowbar-openstack/pull/146#discussion_r47144999","pull_request_url":"https://api.github.com/repos/crowbar/crowbar-openstack/pulls/146","_links":{"self":{"href":"https://api.github.com/repos/crowbar/crowbar-openstack/pulls/comments/47144999"},"html":{"href":"https://github.com/crowbar/crowbar-openstack/pull/146#discussion_r47144999"},"pull_request":{"href":"https://api.github.com/repos/crowbar/crowbar-openstack/pulls/146"}}},"pull_request":{"url":"https://api.github.com/repos/crowbar/crowbar-openstack/pulls/146","id":53119863,"html_url":"https://github.com/crowbar/crowbar-openstack/pull/146","diff_url":"https://github.com/crowbar/crowbar-openstack/pull/146.diff","patch_url":"https://github.com/crowbar/crowbar-openstack/pull/146.patch","issue_url":"https://api.github.com/repos/crowbar/crowbar-openstack/issues/146","number":146,"state":"open","locked":false,"title":"swift: Fix ring builder parser to be compatible with both Juno & Liberty","user":{"login":"vuntz","id":1758783,"avatar_url":"https://avatars.githubusercontent.com/u/1758783?v=3","gravatar_id":"","url":"https://api.github.com/users/vuntz","html_url":"https://github.com/vuntz","followers_url":"https://api.github.com/users/vuntz/followers","following_url":"https://api.github.com/users/vuntz/following{/other_user}","gists_url":"https://api.github.com/users/vuntz/gists{/gist_id}","starred_url":"https://api.github.com/users/vuntz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vuntz/subscriptions","organizations_url":"https://api.github.com/users/vuntz/orgs","repos_url":"https://api.github.com/users/vuntz/repos","events_url":"https://api.github.com/users/vuntz/events{/privacy}","received_events_url":"https://api.github.com/users/vuntz/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-12-09T13:42:47Z","updated_at":"2015-12-09T20:12:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"56315c939d9a3727f1d01989dfc63737225a7f89","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/crowbar/crowbar-openstack/pulls/146/commits","review_comments_url":"https://api.github.com/repos/crowbar/crowbar-openstack/pulls/146/comments","review_comment_url":"https://api.github.com/repos/crowbar/crowbar-openstack/pulls/comments{/number}","comments_url":"https://api.github.com/repos/crowbar/crowbar-openstack/issues/146/comments","statuses_url":"https://api.github.com/repos/crowbar/crowbar-openstack/statuses/46691801d7248864fbdf2d0bb761cb7aeb8a3d17","head":{"label":"vuntz:swift-ring-builder-parser","ref":"swift-ring-builder-parser","sha":"46691801d7248864fbdf2d0bb761cb7aeb8a3d17","user":{"login":"vuntz","id":1758783,"avatar_url":"https://avatars.githubusercontent.com/u/1758783?v=3","gravatar_id":"","url":"https://api.github.com/users/vuntz","html_url":"https://github.com/vuntz","followers_url":"https://api.github.com/users/vuntz/followers","following_url":"https://api.github.com/users/vuntz/following{/other_user}","gists_url":"https://api.github.com/users/vuntz/gists{/gist_id}","starred_url":"https://api.github.com/users/vuntz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vuntz/subscriptions","organizations_url":"https://api.github.com/users/vuntz/orgs","repos_url":"https://api.github.com/users/vuntz/repos","events_url":"https://api.github.com/users/vuntz/events{/privacy}","received_events_url":"https://api.github.com/users/vuntz/received_events","type":"User","site_admin":false},"repo":{"id":41142183,"name":"crowbar-openstack","full_name":"vuntz/crowbar-openstack","owner":{"login":"vuntz","id":1758783,"avatar_url":"https://avatars.githubusercontent.com/u/1758783?v=3","gravatar_id":"","url":"https://api.github.com/users/vuntz","html_url":"https://github.com/vuntz","followers_url":"https://api.github.com/users/vuntz/followers","following_url":"https://api.github.com/users/vuntz/following{/other_user}","gists_url":"https://api.github.com/users/vuntz/gists{/gist_id}","starred_url":"https://api.github.com/users/vuntz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vuntz/subscriptions","organizations_url":"https://api.github.com/users/vuntz/orgs","repos_url":"https://api.github.com/users/vuntz/repos","events_url":"https://api.github.com/users/vuntz/events{/privacy}","received_events_url":"https://api.github.com/users/vuntz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vuntz/crowbar-openstack","description":"Openstack deployment for Crowbar","fork":true,"url":"https://api.github.com/repos/vuntz/crowbar-openstack","forks_url":"https://api.github.com/repos/vuntz/crowbar-openstack/forks","keys_url":"https://api.github.com/repos/vuntz/crowbar-openstack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vuntz/crowbar-openstack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vuntz/crowbar-openstack/teams","hooks_url":"https://api.github.com/repos/vuntz/crowbar-openstack/hooks","issue_events_url":"https://api.github.com/repos/vuntz/crowbar-openstack/issues/events{/number}","events_url":"https://api.github.com/repos/vuntz/crowbar-openstack/events","assignees_url":"https://api.github.com/repos/vuntz/crowbar-openstack/assignees{/user}","branches_url":"https://api.github.com/repos/vuntz/crowbar-openstack/branches{/branch}","tags_url":"https://api.github.com/repos/vuntz/crowbar-openstack/tags","blobs_url":"https://api.github.com/repos/vuntz/crowbar-openstack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vuntz/crowbar-openstack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vuntz/crowbar-openstack/git/refs{/sha}","trees_url":"https://api.github.com/repos/vuntz/crowbar-openstack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vuntz/crowbar-openstack/statuses/{sha}","languages_url":"https://api.github.com/repos/vuntz/crowbar-openstack/languages","stargazers_url":"https://api.github.com/repos/vuntz/crowbar-openstack/stargazers","contributors_url":"https://api.github.com/repos/vuntz/crowbar-openstack/contributors","subscribers_url":"https://api.github.com/repos/vuntz/crowbar-openstack/subscribers","subscription_url":"https://api.github.com/repos/vuntz/crowbar-openstack/subscription","commits_url":"https://api.github.com/repos/vuntz/crowbar-openstack/commits{/sha}","git_commits_url":"https://api.github.com/repos/vuntz/crowbar-openstack/git/commits{/sha}","comments_url":"https://api.github.com/repos/vuntz/crowbar-openstack/comments{/number}","issue_comment_url":"https://api.github.com/repos/vuntz/crowbar-openstack/issues/comments{/number}","contents_url":"https://api.github.com/repos/vuntz/crowbar-openstack/contents/{+path}","compare_url":"https://api.github.com/repos/vuntz/crowbar-openstack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vuntz/crowbar-openstack/merges","archive_url":"https://api.github.com/repos/vuntz/crowbar-openstack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vuntz/crowbar-openstack/downloads","issues_url":"https://api.github.com/repos/vuntz/crowbar-openstack/issues{/number}","pulls_url":"https://api.github.com/repos/vuntz/crowbar-openstack/pulls{/number}","milestones_url":"https://api.github.com/repos/vuntz/crowbar-openstack/milestones{/number}","notifications_url":"https://api.github.com/repos/vuntz/crowbar-openstack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vuntz/crowbar-openstack/labels{/name}","releases_url":"https://api.github.com/repos/vuntz/crowbar-openstack/releases{/id}","created_at":"2015-08-21T07:34:22Z","updated_at":"2015-08-21T07:34:23Z","pushed_at":"2015-12-09T20:12:26Z","git_url":"git://github.com/vuntz/crowbar-openstack.git","ssh_url":"git@github.com:vuntz/crowbar-openstack.git","clone_url":"https://github.com/vuntz/crowbar-openstack.git","svn_url":"https://github.com/vuntz/crowbar-openstack","homepage":null,"size":15627,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"crowbar:master","ref":"master","sha":"c35a05cbd4fc4f7e24b3762b7958abc7f9836f81","user":{"login":"crowbar","id":2910205,"avatar_url":"https://avatars.githubusercontent.com/u/2910205?v=3","gravatar_id":"","url":"https://api.github.com/users/crowbar","html_url":"https://github.com/crowbar","followers_url":"https://api.github.com/users/crowbar/followers","following_url":"https://api.github.com/users/crowbar/following{/other_user}","gists_url":"https://api.github.com/users/crowbar/gists{/gist_id}","starred_url":"https://api.github.com/users/crowbar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crowbar/subscriptions","organizations_url":"https://api.github.com/users/crowbar/orgs","repos_url":"https://api.github.com/users/crowbar/repos","events_url":"https://api.github.com/users/crowbar/events{/privacy}","received_events_url":"https://api.github.com/users/crowbar/received_events","type":"Organization","site_admin":false},"repo":{"id":39006903,"name":"crowbar-openstack","full_name":"crowbar/crowbar-openstack","owner":{"login":"crowbar","id":2910205,"avatar_url":"https://avatars.githubusercontent.com/u/2910205?v=3","gravatar_id":"","url":"https://api.github.com/users/crowbar","html_url":"https://github.com/crowbar","followers_url":"https://api.github.com/users/crowbar/followers","following_url":"https://api.github.com/users/crowbar/following{/other_user}","gists_url":"https://api.github.com/users/crowbar/gists{/gist_id}","starred_url":"https://api.github.com/users/crowbar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crowbar/subscriptions","organizations_url":"https://api.github.com/users/crowbar/orgs","repos_url":"https://api.github.com/users/crowbar/repos","events_url":"https://api.github.com/users/crowbar/events{/privacy}","received_events_url":"https://api.github.com/users/crowbar/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/crowbar/crowbar-openstack","description":"Openstack deployment for Crowbar","fork":false,"url":"https://api.github.com/repos/crowbar/crowbar-openstack","forks_url":"https://api.github.com/repos/crowbar/crowbar-openstack/forks","keys_url":"https://api.github.com/repos/crowbar/crowbar-openstack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/crowbar/crowbar-openstack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/crowbar/crowbar-openstack/teams","hooks_url":"https://api.github.com/repos/crowbar/crowbar-openstack/hooks","issue_events_url":"https://api.github.com/repos/crowbar/crowbar-openstack/issues/events{/number}","events_url":"https://api.github.com/repos/crowbar/crowbar-openstack/events","assignees_url":"https://api.github.com/repos/crowbar/crowbar-openstack/assignees{/user}","branches_url":"https://api.github.com/repos/crowbar/crowbar-openstack/branches{/branch}","tags_url":"https://api.github.com/repos/crowbar/crowbar-openstack/tags","blobs_url":"https://api.github.com/repos/crowbar/crowbar-openstack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/crowbar/crowbar-openstack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/crowbar/crowbar-openstack/git/refs{/sha}","trees_url":"https://api.github.com/repos/crowbar/crowbar-openstack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/crowbar/crowbar-openstack/statuses/{sha}","languages_url":"https://api.github.com/repos/crowbar/crowbar-openstack/languages","stargazers_url":"https://api.github.com/repos/crowbar/crowbar-openstack/stargazers","contributors_url":"https://api.github.com/repos/crowbar/crowbar-openstack/contributors","subscribers_url":"https://api.github.com/repos/crowbar/crowbar-openstack/subscribers","subscription_url":"https://api.github.com/repos/crowbar/crowbar-openstack/subscription","commits_url":"https://api.github.com/repos/crowbar/crowbar-openstack/commits{/sha}","git_commits_url":"https://api.github.com/repos/crowbar/crowbar-openstack/git/commits{/sha}","comments_url":"https://api.github.com/repos/crowbar/crowbar-openstack/comments{/number}","issue_comment_url":"https://api.github.com/repos/crowbar/crowbar-openstack/issues/comments{/number}","contents_url":"https://api.github.com/repos/crowbar/crowbar-openstack/contents/{+path}","compare_url":"https://api.github.com/repos/crowbar/crowbar-openstack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/crowbar/crowbar-openstack/merges","archive_url":"https://api.github.com/repos/crowbar/crowbar-openstack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/crowbar/crowbar-openstack/downloads","issues_url":"https://api.github.com/repos/crowbar/crowbar-openstack/issues{/number}","pulls_url":"https://api.github.com/repos/crowbar/crowbar-openstack/pulls{/number}","milestones_url":"https://api.github.com/repos/crowbar/crowbar-openstack/milestones{/number}","notifications_url":"https://api.github.com/repos/crowbar/crowbar-openstack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/crowbar/crowbar-openstack/labels{/name}","releases_url":"https://api.github.com/repos/crowbar/crowbar-openstack/releases{/id}","created_at":"2015-07-13T10:55:33Z","updated_at":"2015-11-13T09:59:41Z","pushed_at":"2015-12-09T20:12:28Z","git_url":"git://github.com/crowbar/crowbar-openstack.git","ssh_url":"git@github.com:crowbar/crowbar-openstack.git","clone_url":"https://github.com/crowbar/crowbar-openstack.git","svn_url":"https://github.com/crowbar/crowbar-openstack","homepage":null,"size":15836,"stargazers_count":1,"watchers_count":1,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":20,"mirror_url":null,"open_issues_count":30,"forks":20,"open_issues":30,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/crowbar/crowbar-openstack/pulls/146"},"html":{"href":"https://github.com/crowbar/crowbar-openstack/pull/146"},"issue":{"href":"https://api.github.com/repos/crowbar/crowbar-openstack/issues/146"},"comments":{"href":"https://api.github.com/repos/crowbar/crowbar-openstack/issues/146/comments"},"review_comments":{"href":"https://api.github.com/repos/crowbar/crowbar-openstack/pulls/146/comments"},"review_comment":{"href":"https://api.github.com/repos/crowbar/crowbar-openstack/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/crowbar/crowbar-openstack/pulls/146/commits"},"statuses":{"href":"https://api.github.com/repos/crowbar/crowbar-openstack/statuses/46691801d7248864fbdf2d0bb761cb7aeb8a3d17"}}}}