{"action":"created","comment":{"url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/comments/28520835","id":28520835,"diff_hunk":"@@ -17,6 +17,51 @@ def self.table_name\n   def index\n     redirect_to :action => 'show_list'\n   end\n+  \n+  def scaling\n+    assert_privileges(\"ems_infra_scale\")\n+    if params[:cancel]\n+      redirect_to :action => 'show', :id => params[:id]\n+    end\n+    \n+    drop_breadcrumb(:name => _(\"Scale Infrastructure Provider\"), :url => \"/ems_infra/scaling\")\n+    @infra = EmsOpenstackInfra.find(params[:id])\n+    @stack = @infra.orchestration_stacks.first\n+    @count_parameters = @stack.parameters.select {|x| x.name.to_s.include?('::count')}\n+    \n+    if !params[:scale]\n+      return\n+    end\n+\n+    scale_parameters = params.select { |k,v| k.include?('::count')}\n+    \n+    assigned_hosts = 0\n+    scale_parameters.each_value { |value| assigned_hosts += Integer(value) }","path":"vmdb/app/controllers/ems_infra_controller.rb","position":23,"original_position":23,"commit_id":"6078a5e26adc61c9eb36eca5bedb6b6f8079a4a0","original_commit_id":"6078a5e26adc61c9eb36eca5bedb6b6f8079a4a0","user":{"login":"Ladas","id":1737058,"avatar_url":"https://avatars.githubusercontent.com/u/1737058?v=3","gravatar_id":"","url":"https://api.github.com/users/Ladas","html_url":"https://github.com/Ladas","followers_url":"https://api.github.com/users/Ladas/followers","following_url":"https://api.github.com/users/Ladas/following{/other_user}","gists_url":"https://api.github.com/users/Ladas/gists{/gist_id}","starred_url":"https://api.github.com/users/Ladas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ladas/subscriptions","organizations_url":"https://api.github.com/users/Ladas/orgs","repos_url":"https://api.github.com/users/Ladas/repos","events_url":"https://api.github.com/users/Ladas/events{/privacy}","received_events_url":"https://api.github.com/users/Ladas/received_events","type":"User","site_admin":false},"body":"I think heat just returns strings for everything, though value.to_i is nicer","created_at":"2015-04-16T15:37:07Z","updated_at":"2015-04-16T15:37:07Z","html_url":"https://github.com/ManageIQ/manageiq/pull/2028#discussion_r28520835","pull_request_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/2028","_links":{"self":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/comments/28520835"},"html":{"href":"https://github.com/ManageIQ/manageiq/pull/2028#discussion_r28520835"},"pull_request":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/2028"}}},"pull_request":{"url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/2028","id":30612524,"html_url":"https://github.com/ManageIQ/manageiq/pull/2028","diff_url":"https://github.com/ManageIQ/manageiq/pull/2028.diff","patch_url":"https://github.com/ManageIQ/manageiq/pull/2028.patch","issue_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/2028","number":2028,"state":"open","locked":false,"title":"UI changes to support scaling OpenStack Infrastructure Provider","user":{"login":"rwsu","id":974403,"avatar_url":"https://avatars.githubusercontent.com/u/974403?v=3","gravatar_id":"","url":"https://api.github.com/users/rwsu","html_url":"https://github.com/rwsu","followers_url":"https://api.github.com/users/rwsu/followers","following_url":"https://api.github.com/users/rwsu/following{/other_user}","gists_url":"https://api.github.com/users/rwsu/gists{/gist_id}","starred_url":"https://api.github.com/users/rwsu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rwsu/subscriptions","organizations_url":"https://api.github.com/users/rwsu/orgs","repos_url":"https://api.github.com/users/rwsu/repos","events_url":"https://api.github.com/users/rwsu/events{/privacy}","received_events_url":"https://api.github.com/users/rwsu/received_events","type":"User","site_admin":false},"body":"Only last 3 commits are relevant the rest comes from #1797.\r\n\r\nThis change also depends on a change to Fog: https://github.com/fog/fog/pull/3440\r\n","created_at":"2015-03-06T01:05:19Z","updated_at":"2015-04-16T15:37:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bdd7daaeb95b31f9c1def753ec6817db8ade4beb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/2028/commits","review_comments_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/2028/comments","review_comment_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/2028/comments","statuses_url":"https://api.github.com/repos/ManageIQ/manageiq/statuses/6078a5e26adc61c9eb36eca5bedb6b6f8079a4a0","head":{"label":"rwsu:openstack-infra-scaling-ui","ref":"openstack-infra-scaling-ui","sha":"6078a5e26adc61c9eb36eca5bedb6b6f8079a4a0","user":{"login":"rwsu","id":974403,"avatar_url":"https://avatars.githubusercontent.com/u/974403?v=3","gravatar_id":"","url":"https://api.github.com/users/rwsu","html_url":"https://github.com/rwsu","followers_url":"https://api.github.com/users/rwsu/followers","following_url":"https://api.github.com/users/rwsu/following{/other_user}","gists_url":"https://api.github.com/users/rwsu/gists{/gist_id}","starred_url":"https://api.github.com/users/rwsu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rwsu/subscriptions","organizations_url":"https://api.github.com/users/rwsu/orgs","repos_url":"https://api.github.com/users/rwsu/repos","events_url":"https://api.github.com/users/rwsu/events{/privacy}","received_events_url":"https://api.github.com/users/rwsu/received_events","type":"User","site_admin":false},"repo":{"id":30277850,"name":"manageiq","full_name":"rwsu/manageiq","owner":{"login":"rwsu","id":974403,"avatar_url":"https://avatars.githubusercontent.com/u/974403?v=3","gravatar_id":"","url":"https://api.github.com/users/rwsu","html_url":"https://github.com/rwsu","followers_url":"https://api.github.com/users/rwsu/followers","following_url":"https://api.github.com/users/rwsu/following{/other_user}","gists_url":"https://api.github.com/users/rwsu/gists{/gist_id}","starred_url":"https://api.github.com/users/rwsu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rwsu/subscriptions","organizations_url":"https://api.github.com/users/rwsu/orgs","repos_url":"https://api.github.com/users/rwsu/repos","events_url":"https://api.github.com/users/rwsu/events{/privacy}","received_events_url":"https://api.github.com/users/rwsu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rwsu/manageiq","description":"ManageIQ Cloud Management Platform","fork":true,"url":"https://api.github.com/repos/rwsu/manageiq","forks_url":"https://api.github.com/repos/rwsu/manageiq/forks","keys_url":"https://api.github.com/repos/rwsu/manageiq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rwsu/manageiq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rwsu/manageiq/teams","hooks_url":"https://api.github.com/repos/rwsu/manageiq/hooks","issue_events_url":"https://api.github.com/repos/rwsu/manageiq/issues/events{/number}","events_url":"https://api.github.com/repos/rwsu/manageiq/events","assignees_url":"https://api.github.com/repos/rwsu/manageiq/assignees{/user}","branches_url":"https://api.github.com/repos/rwsu/manageiq/branches{/branch}","tags_url":"https://api.github.com/repos/rwsu/manageiq/tags","blobs_url":"https://api.github.com/repos/rwsu/manageiq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rwsu/manageiq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rwsu/manageiq/git/refs{/sha}","trees_url":"https://api.github.com/repos/rwsu/manageiq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rwsu/manageiq/statuses/{sha}","languages_url":"https://api.github.com/repos/rwsu/manageiq/languages","stargazers_url":"https://api.github.com/repos/rwsu/manageiq/stargazers","contributors_url":"https://api.github.com/repos/rwsu/manageiq/contributors","subscribers_url":"https://api.github.com/repos/rwsu/manageiq/subscribers","subscription_url":"https://api.github.com/repos/rwsu/manageiq/subscription","commits_url":"https://api.github.com/repos/rwsu/manageiq/commits{/sha}","git_commits_url":"https://api.github.com/repos/rwsu/manageiq/git/commits{/sha}","comments_url":"https://api.github.com/repos/rwsu/manageiq/comments{/number}","issue_comment_url":"https://api.github.com/repos/rwsu/manageiq/issues/comments{/number}","contents_url":"https://api.github.com/repos/rwsu/manageiq/contents/{+path}","compare_url":"https://api.github.com/repos/rwsu/manageiq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rwsu/manageiq/merges","archive_url":"https://api.github.com/repos/rwsu/manageiq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rwsu/manageiq/downloads","issues_url":"https://api.github.com/repos/rwsu/manageiq/issues{/number}","pulls_url":"https://api.github.com/repos/rwsu/manageiq/pulls{/number}","milestones_url":"https://api.github.com/repos/rwsu/manageiq/milestones{/number}","notifications_url":"https://api.github.com/repos/rwsu/manageiq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rwsu/manageiq/labels{/name}","releases_url":"https://api.github.com/repos/rwsu/manageiq/releases{/id}","created_at":"2015-02-04T02:49:25Z","updated_at":"2015-03-05T02:27:53Z","pushed_at":"2015-04-15T23:48:33Z","git_url":"git://github.com/rwsu/manageiq.git","ssh_url":"git@github.com:rwsu/manageiq.git","clone_url":"https://github.com/rwsu/manageiq.git","svn_url":"https://github.com/rwsu/manageiq","homepage":"manageiq.org","size":68603,"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":"ManageIQ:master","ref":"master","sha":"b3af7ce48c959616827ce826c031719b9ecdf3cc","user":{"login":"ManageIQ","id":1125575,"avatar_url":"https://avatars.githubusercontent.com/u/1125575?v=3","gravatar_id":"","url":"https://api.github.com/users/ManageIQ","html_url":"https://github.com/ManageIQ","followers_url":"https://api.github.com/users/ManageIQ/followers","following_url":"https://api.github.com/users/ManageIQ/following{/other_user}","gists_url":"https://api.github.com/users/ManageIQ/gists{/gist_id}","starred_url":"https://api.github.com/users/ManageIQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ManageIQ/subscriptions","organizations_url":"https://api.github.com/users/ManageIQ/orgs","repos_url":"https://api.github.com/users/ManageIQ/repos","events_url":"https://api.github.com/users/ManageIQ/events{/privacy}","received_events_url":"https://api.github.com/users/ManageIQ/received_events","type":"Organization","site_admin":false},"repo":{"id":20789757,"name":"manageiq","full_name":"ManageIQ/manageiq","owner":{"login":"ManageIQ","id":1125575,"avatar_url":"https://avatars.githubusercontent.com/u/1125575?v=3","gravatar_id":"","url":"https://api.github.com/users/ManageIQ","html_url":"https://github.com/ManageIQ","followers_url":"https://api.github.com/users/ManageIQ/followers","following_url":"https://api.github.com/users/ManageIQ/following{/other_user}","gists_url":"https://api.github.com/users/ManageIQ/gists{/gist_id}","starred_url":"https://api.github.com/users/ManageIQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ManageIQ/subscriptions","organizations_url":"https://api.github.com/users/ManageIQ/orgs","repos_url":"https://api.github.com/users/ManageIQ/repos","events_url":"https://api.github.com/users/ManageIQ/events{/privacy}","received_events_url":"https://api.github.com/users/ManageIQ/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ManageIQ/manageiq","description":"ManageIQ Cloud Management Platform","fork":false,"url":"https://api.github.com/repos/ManageIQ/manageiq","forks_url":"https://api.github.com/repos/ManageIQ/manageiq/forks","keys_url":"https://api.github.com/repos/ManageIQ/manageiq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ManageIQ/manageiq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ManageIQ/manageiq/teams","hooks_url":"https://api.github.com/repos/ManageIQ/manageiq/hooks","issue_events_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/events{/number}","events_url":"https://api.github.com/repos/ManageIQ/manageiq/events","assignees_url":"https://api.github.com/repos/ManageIQ/manageiq/assignees{/user}","branches_url":"https://api.github.com/repos/ManageIQ/manageiq/branches{/branch}","tags_url":"https://api.github.com/repos/ManageIQ/manageiq/tags","blobs_url":"https://api.github.com/repos/ManageIQ/manageiq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ManageIQ/manageiq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ManageIQ/manageiq/git/refs{/sha}","trees_url":"https://api.github.com/repos/ManageIQ/manageiq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ManageIQ/manageiq/statuses/{sha}","languages_url":"https://api.github.com/repos/ManageIQ/manageiq/languages","stargazers_url":"https://api.github.com/repos/ManageIQ/manageiq/stargazers","contributors_url":"https://api.github.com/repos/ManageIQ/manageiq/contributors","subscribers_url":"https://api.github.com/repos/ManageIQ/manageiq/subscribers","subscription_url":"https://api.github.com/repos/ManageIQ/manageiq/subscription","commits_url":"https://api.github.com/repos/ManageIQ/manageiq/commits{/sha}","git_commits_url":"https://api.github.com/repos/ManageIQ/manageiq/git/commits{/sha}","comments_url":"https://api.github.com/repos/ManageIQ/manageiq/comments{/number}","issue_comment_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/comments{/number}","contents_url":"https://api.github.com/repos/ManageIQ/manageiq/contents/{+path}","compare_url":"https://api.github.com/repos/ManageIQ/manageiq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ManageIQ/manageiq/merges","archive_url":"https://api.github.com/repos/ManageIQ/manageiq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ManageIQ/manageiq/downloads","issues_url":"https://api.github.com/repos/ManageIQ/manageiq/issues{/number}","pulls_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls{/number}","milestones_url":"https://api.github.com/repos/ManageIQ/manageiq/milestones{/number}","notifications_url":"https://api.github.com/repos/ManageIQ/manageiq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ManageIQ/manageiq/labels{/name}","releases_url":"https://api.github.com/repos/ManageIQ/manageiq/releases{/id}","created_at":"2014-06-13T02:31:26Z","updated_at":"2015-04-16T15:25:47Z","pushed_at":"2015-04-16T15:25:47Z","git_url":"git://github.com/ManageIQ/manageiq.git","ssh_url":"git@github.com:ManageIQ/manageiq.git","clone_url":"https://github.com/ManageIQ/manageiq.git","svn_url":"https://github.com/ManageIQ/manageiq","homepage":"manageiq.org","size":121563,"stargazers_count":103,"watchers_count":103,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":101,"mirror_url":null,"open_issues_count":366,"forks":101,"open_issues":366,"watchers":103,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/2028"},"html":{"href":"https://github.com/ManageIQ/manageiq/pull/2028"},"issue":{"href":"https://api.github.com/repos/ManageIQ/manageiq/issues/2028"},"comments":{"href":"https://api.github.com/repos/ManageIQ/manageiq/issues/2028/comments"},"review_comments":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/2028/comments"},"review_comment":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/2028/commits"},"statuses":{"href":"https://api.github.com/repos/ManageIQ/manageiq/statuses/6078a5e26adc61c9eb36eca5bedb6b6f8079a4a0"}}}}