{"action":"created","comment":{"url":"https://api.github.com/repos/ManageIQ/manageiq-providers-azure/pulls/comments/169764523","pull_request_review_id":98344786,"id":169764523,"diff_hunk":"@@ -0,0 +1,18 @@\n+class ManageIQ::Providers::Azure::NumberOfVmsVisibilityService < ::NumberOfVmsVisibilityService\n+  def determine_visibility(number_of_vms, platform)\n+    @number_of_vms = number_of_vms\n+\n+    hash = super\n+\n+    # For Azure we will show two options in this case - private and public\n+    if @number_of_vms > 1\n+      hash[:hide].delete(:floating_ip_address)\n+    end\n+\n+    hash\n+  end","path":"app/services/manageiq/providers/azure/number_of_vms_visibility_service.rb","position":13,"original_position":13,"commit_id":"b9f4113ad2be260c9654b58c2945cce9f4e9ccf9","original_commit_id":"b9f4113ad2be260c9654b58c2945cce9f4e9ccf9","user":{"login":"djberg96","id":78529,"avatar_url":"https://avatars3.githubusercontent.com/u/78529?v=4","gravatar_id":"","url":"https://api.github.com/users/djberg96","html_url":"https://github.com/djberg96","followers_url":"https://api.github.com/users/djberg96/followers","following_url":"https://api.github.com/users/djberg96/following{/other_user}","gists_url":"https://api.github.com/users/djberg96/gists{/gist_id}","starred_url":"https://api.github.com/users/djberg96/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djberg96/subscriptions","organizations_url":"https://api.github.com/users/djberg96/orgs","repos_url":"https://api.github.com/users/djberg96/repos","events_url":"https://api.github.com/users/djberg96/events{/privacy}","received_events_url":"https://api.github.com/users/djberg96/received_events","type":"User","site_admin":false},"body":"It's used by the `MiqProvisionVirtWorkflow` class at https://github.com/ManageIQ/manageiq/blob/master/app/models/miq_provision_virt_workflow.rb#L985","created_at":"2018-02-21T20:15:48Z","updated_at":"2018-02-21T20:15:48Z","html_url":"https://github.com/ManageIQ/manageiq-providers-azure/pull/210#discussion_r169764523","pull_request_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-azure/pulls/210","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/ManageIQ/manageiq-providers-azure/pulls/comments/169764523"},"html":{"href":"https://github.com/ManageIQ/manageiq-providers-azure/pull/210#discussion_r169764523"},"pull_request":{"href":"https://api.github.com/repos/ManageIQ/manageiq-providers-azure/pulls/210"}},"in_reply_to_id":169754822},"pull_request":{"url":"https://api.github.com/repos/ManageIQ/manageiq-providers-azure/pulls/210","id":170058310,"html_url":"https://github.com/ManageIQ/manageiq-providers-azure/pull/210","diff_url":"https://github.com/ManageIQ/manageiq-providers-azure/pull/210.diff","patch_url":"https://github.com/ManageIQ/manageiq-providers-azure/pull/210.patch","issue_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-azure/issues/210","number":210,"state":"open","locked":false,"title":"Allow users to choose public or private IP when provisioning multiple VMs","user":{"login":"djberg96","id":78529,"avatar_url":"https://avatars3.githubusercontent.com/u/78529?v=4","gravatar_id":"","url":"https://api.github.com/users/djberg96","html_url":"https://github.com/djberg96","followers_url":"https://api.github.com/users/djberg96/followers","following_url":"https://api.github.com/users/djberg96/following{/other_user}","gists_url":"https://api.github.com/users/djberg96/gists{/gist_id}","starred_url":"https://api.github.com/users/djberg96/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djberg96/subscriptions","organizations_url":"https://api.github.com/users/djberg96/orgs","repos_url":"https://api.github.com/users/djberg96/repos","events_url":"https://api.github.com/users/djberg96/events{/privacy}","received_events_url":"https://api.github.com/users/djberg96/received_events","type":"User","site_admin":false},"body":"When we introduced https://github.com/ManageIQ/manageiq-providers-azure/pull/172, we defaulted to a private IP for provisioning a single VM. This had the unintended side effect of making multi-vm provisioning private by default, with no way for the user to choose.\r\n\r\nThis PR addresses that by giving the users two choices - new or none - when selecting an IP during the provisioning process for multiple vm's.\r\n\r\nRather than making specialized PR's based on provider on the UI side, this PR uses custom service subclasses that allow us to govern the UI behavior without modifying any core code.\r\n\r\nFixes https://bugzilla.redhat.com/show_bug.cgi?id=1531275\r\n\r\nI have sanity checked this by provisioning two VM's with \"none\" selected, and two with \"new\" selected. The app behaved as expected, i.e. the vm's with \"none\" selected did not have a public IP attached, while those with \"new\" selected did.\r\n\r\n~~WIP for now until I get some specs added.~~","created_at":"2018-02-19T21:46:15Z","updated_at":"2018-02-21T20:15:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b2d6d71e9de9a11317dc0e96de2e2c053d090160","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-azure/pulls/210/commits","review_comments_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-azure/pulls/210/comments","review_comment_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-azure/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-azure/issues/210/comments","statuses_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-azure/statuses/b9f4113ad2be260c9654b58c2945cce9f4e9ccf9","head":{"label":"djberg96:multi_vm_provision","ref":"multi_vm_provision","sha":"b9f4113ad2be260c9654b58c2945cce9f4e9ccf9","user":{"login":"djberg96","id":78529,"avatar_url":"https://avatars3.githubusercontent.com/u/78529?v=4","gravatar_id":"","url":"https://api.github.com/users/djberg96","html_url":"https://github.com/djberg96","followers_url":"https://api.github.com/users/djberg96/followers","following_url":"https://api.github.com/users/djberg96/following{/other_user}","gists_url":"https://api.github.com/users/djberg96/gists{/gist_id}","starred_url":"https://api.github.com/users/djberg96/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djberg96/subscriptions","organizations_url":"https://api.github.com/users/djberg96/orgs","repos_url":"https://api.github.com/users/djberg96/repos","events_url":"https://api.github.com/users/djberg96/events{/privacy}","received_events_url":"https://api.github.com/users/djberg96/received_events","type":"User","site_admin":false},"repo":{"id":72789960,"name":"manageiq-providers-azure","full_name":"djberg96/manageiq-providers-azure","owner":{"login":"djberg96","id":78529,"avatar_url":"https://avatars3.githubusercontent.com/u/78529?v=4","gravatar_id":"","url":"https://api.github.com/users/djberg96","html_url":"https://github.com/djberg96","followers_url":"https://api.github.com/users/djberg96/followers","following_url":"https://api.github.com/users/djberg96/following{/other_user}","gists_url":"https://api.github.com/users/djberg96/gists{/gist_id}","starred_url":"https://api.github.com/users/djberg96/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djberg96/subscriptions","organizations_url":"https://api.github.com/users/djberg96/orgs","repos_url":"https://api.github.com/users/djberg96/repos","events_url":"https://api.github.com/users/djberg96/events{/privacy}","received_events_url":"https://api.github.com/users/djberg96/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/djberg96/manageiq-providers-azure","description":"ManageIQ plugin for the Microsoft Azure provider","fork":true,"url":"https://api.github.com/repos/djberg96/manageiq-providers-azure","forks_url":"https://api.github.com/repos/djberg96/manageiq-providers-azure/forks","keys_url":"https://api.github.com/repos/djberg96/manageiq-providers-azure/keys{/key_id}","collaborators_url":"https://api.github.com/repos/djberg96/manageiq-providers-azure/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/djberg96/manageiq-providers-azure/teams","hooks_url":"https://api.github.com/repos/djberg96/manageiq-providers-azure/hooks","issue_events_url":"https://api.github.com/repos/djberg96/manageiq-providers-azure/issues/events{/number}","events_url":"https://api.github.com/repos/djberg96/manageiq-providers-azure/events","assignees_url":"https://api.github.com/repos/djberg96/manageiq-providers-azure/assignees{/user}","branches_url":"https://api.github.com/repos/djberg96/manageiq-providers-azure/branches{/branch}","tags_url":"https://api.github.com/repos/djberg96/manageiq-providers-azure/tags","blobs_url":"https://api.github.com/repos/djberg96/manageiq-providers-azure/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/djberg96/manageiq-providers-azure/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/djberg96/manageiq-providers-azure/git/refs{/sha}","trees_url":"https://api.github.com/repos/djberg96/manageiq-providers-azure/git/trees{/sha}","statuses_url":"https://api.github.com/repos/djberg96/manageiq-providers-azure/statuses/{sha}","languages_url":"https://api.github.com/repos/djberg96/manageiq-providers-azure/languages","stargazers_url":"https://api.github.com/repos/djberg96/manageiq-providers-azure/stargazers","contributors_url":"https://api.github.com/repos/djberg96/manageiq-providers-azure/contributors","subscribers_url":"https://api.github.com/repos/djberg96/manageiq-providers-azure/subscribers","subscription_url":"https://api.github.com/repos/djberg96/manageiq-providers-azure/subscription","commits_url":"https://api.github.com/repos/djberg96/manageiq-providers-azure/commits{/sha}","git_commits_url":"https://api.github.com/repos/djberg96/manageiq-providers-azure/git/commits{/sha}","comments_url":"https://api.github.com/repos/djberg96/manageiq-providers-azure/comments{/number}","issue_comment_url":"https://api.github.com/repos/djberg96/manageiq-providers-azure/issues/comments{/number}","contents_url":"https://api.github.com/repos/djberg96/manageiq-providers-azure/contents/{+path}","compare_url":"https://api.github.com/repos/djberg96/manageiq-providers-azure/compare/{base}...{head}","merges_url":"https://api.github.com/repos/djberg96/manageiq-providers-azure/merges","archive_url":"https://api.github.com/repos/djberg96/manageiq-providers-azure/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/djberg96/manageiq-providers-azure/downloads","issues_url":"https://api.github.com/repos/djberg96/manageiq-providers-azure/issues{/number}","pulls_url":"https://api.github.com/repos/djberg96/manageiq-providers-azure/pulls{/number}","milestones_url":"https://api.github.com/repos/djberg96/manageiq-providers-azure/milestones{/number}","notifications_url":"https://api.github.com/repos/djberg96/manageiq-providers-azure/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/djberg96/manageiq-providers-azure/labels{/name}","releases_url":"https://api.github.com/repos/djberg96/manageiq-providers-azure/releases{/id}","deployments_url":"https://api.github.com/repos/djberg96/manageiq-providers-azure/deployments","created_at":"2016-11-03T21:48:53Z","updated_at":"2016-11-03T21:48:56Z","pushed_at":"2018-02-20T14:56:59Z","git_url":"git://github.com/djberg96/manageiq-providers-azure.git","ssh_url":"git@github.com:djberg96/manageiq-providers-azure.git","clone_url":"https://github.com/djberg96/manageiq-providers-azure.git","svn_url":"https://github.com/djberg96/manageiq-providers-azure","homepage":"","size":3303,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ManageIQ:master","ref":"master","sha":"491cc05e6c809614c10f948e377fe4f6e693ed6b","user":{"login":"ManageIQ","id":1125575,"avatar_url":"https://avatars0.githubusercontent.com/u/1125575?v=4","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":72784617,"name":"manageiq-providers-azure","full_name":"ManageIQ/manageiq-providers-azure","owner":{"login":"ManageIQ","id":1125575,"avatar_url":"https://avatars0.githubusercontent.com/u/1125575?v=4","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-providers-azure","description":"ManageIQ plugin for the Microsoft Azure provider","fork":false,"url":"https://api.github.com/repos/ManageIQ/manageiq-providers-azure","forks_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-azure/forks","keys_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-azure/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-azure/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-azure/teams","hooks_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-azure/hooks","issue_events_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-azure/issues/events{/number}","events_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-azure/events","assignees_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-azure/assignees{/user}","branches_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-azure/branches{/branch}","tags_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-azure/tags","blobs_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-azure/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-azure/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-azure/git/refs{/sha}","trees_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-azure/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-azure/statuses/{sha}","languages_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-azure/languages","stargazers_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-azure/stargazers","contributors_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-azure/contributors","subscribers_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-azure/subscribers","subscription_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-azure/subscription","commits_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-azure/commits{/sha}","git_commits_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-azure/git/commits{/sha}","comments_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-azure/comments{/number}","issue_comment_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-azure/issues/comments{/number}","contents_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-azure/contents/{+path}","compare_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-azure/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-azure/merges","archive_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-azure/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-azure/downloads","issues_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-azure/issues{/number}","pulls_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-azure/pulls{/number}","milestones_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-azure/milestones{/number}","notifications_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-azure/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-azure/labels{/name}","releases_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-azure/releases{/id}","deployments_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-azure/deployments","created_at":"2016-11-03T20:37:06Z","updated_at":"2018-01-26T06:51:34Z","pushed_at":"2018-02-21T20:00:57Z","git_url":"git://github.com/ManageIQ/manageiq-providers-azure.git","ssh_url":"git@github.com:ManageIQ/manageiq-providers-azure.git","clone_url":"https://github.com/ManageIQ/manageiq-providers-azure.git","svn_url":"https://github.com/ManageIQ/manageiq-providers-azure","homepage":"","size":3292,"stargazers_count":7,"watchers_count":7,"language":"Ruby","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":37,"mirror_url":null,"archived":false,"open_issues_count":11,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":37,"open_issues":11,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ManageIQ/manageiq-providers-azure/pulls/210"},"html":{"href":"https://github.com/ManageIQ/manageiq-providers-azure/pull/210"},"issue":{"href":"https://api.github.com/repos/ManageIQ/manageiq-providers-azure/issues/210"},"comments":{"href":"https://api.github.com/repos/ManageIQ/manageiq-providers-azure/issues/210/comments"},"review_comments":{"href":"https://api.github.com/repos/ManageIQ/manageiq-providers-azure/pulls/210/comments"},"review_comment":{"href":"https://api.github.com/repos/ManageIQ/manageiq-providers-azure/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ManageIQ/manageiq-providers-azure/pulls/210/commits"},"statuses":{"href":"https://api.github.com/repos/ManageIQ/manageiq-providers-azure/statuses/b9f4113ad2be260c9654b58c2945cce9f4e9ccf9"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"djberg96"}}