{"action":"created","comment":{"url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/pulls/comments/234802607","pull_request_review_id":176523144,"id":234802607,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNDgwMjYwNw==","diff_hunk":"@@ -139,19 +170,27 @@ def create(vm_config)\n           env = @cpi.generate_agent_env(vm_config.name, created_vm.mob, vm_config.agent_id, network_env, disk_env)\n           env['env'] = vm_config.agent_env\n \n-        location = {\n-          datacenter: @datacenter.name,\n-          datastore: datastore,\n-          vm: vm_config.name,\n-        }\n+          location = {\n+            datacenter: @datacenter.name,\n+            datastore: datastore,\n+            vm: vm_config.name,\n+          }\n \n           @agent_env.set_env(created_vm.mob, location, env)\n \n           # DRS Rules\n           create_drs_rules(vm_config, created_vm.mob, cluster)\n \n-          # Add vm to VMGroup\n-          add_vm_to_vm_group(vm_config, created_vm.mob, cluster)\n+          # Add vm to VM Group present in vm_type\n+          add_vm_to_vm_group(vm_config.vm_type.vm_group, created_vm_mob, cluster)\n+\n+          unless cluster.host_group.nil?","path":"src/vsphere_cpi/lib/cloud/vsphere/vm_creator.rb","position":70,"original_position":70,"commit_id":"58fdf1ef3b6b710a0df47813f180d88539e9a988","original_commit_id":"58fdf1ef3b6b710a0df47813f180d88539e9a988","user":{"login":"nehagjain15","id":850083,"node_id":"MDQ6VXNlcjg1MDA4Mw==","avatar_url":"https://avatars1.githubusercontent.com/u/850083?v=4","gravatar_id":"","url":"https://api.github.com/users/nehagjain15","html_url":"https://github.com/nehagjain15","followers_url":"https://api.github.com/users/nehagjain15/followers","following_url":"https://api.github.com/users/nehagjain15/following{/other_user}","gists_url":"https://api.github.com/users/nehagjain15/gists{/gist_id}","starred_url":"https://api.github.com/users/nehagjain15/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nehagjain15/subscriptions","organizations_url":"https://api.github.com/users/nehagjain15/orgs","repos_url":"https://api.github.com/users/nehagjain15/repos","events_url":"https://api.github.com/users/nehagjain15/events{/privacy}","received_events_url":"https://api.github.com/users/nehagjain15/received_events","type":"User","site_admin":false},"body":"if instead of unless","created_at":"2018-11-19T22:15:56Z","updated_at":"2018-11-19T22:15:56Z","html_url":"https://github.com/cloudfoundry/bosh-vsphere-cpi-release/pull/170#discussion_r234802607","pull_request_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/pulls/170","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/pulls/comments/234802607"},"html":{"href":"https://github.com/cloudfoundry/bosh-vsphere-cpi-release/pull/170#discussion_r234802607"},"pull_request":{"href":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/pulls/170"}}},"pull_request":{"url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/pulls/170","id":228550097,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI4NTUwMDk3","html_url":"https://github.com/cloudfoundry/bosh-vsphere-cpi-release/pull/170","diff_url":"https://github.com/cloudfoundry/bosh-vsphere-cpi-release/pull/170.diff","patch_url":"https://github.com/cloudfoundry/bosh-vsphere-cpi-release/pull/170.patch","issue_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/issues/170","number":170,"state":"open","locked":false,"title":"Enable host group specification in a Cluster","user":{"login":"EleanorRigby","id":6512426,"node_id":"MDQ6VXNlcjY1MTI0MjY=","avatar_url":"https://avatars2.githubusercontent.com/u/6512426?v=4","gravatar_id":"","url":"https://api.github.com/users/EleanorRigby","html_url":"https://github.com/EleanorRigby","followers_url":"https://api.github.com/users/EleanorRigby/followers","following_url":"https://api.github.com/users/EleanorRigby/following{/other_user}","gists_url":"https://api.github.com/users/EleanorRigby/gists{/gist_id}","starred_url":"https://api.github.com/users/EleanorRigby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EleanorRigby/subscriptions","organizations_url":"https://api.github.com/users/EleanorRigby/orgs","repos_url":"https://api.github.com/users/EleanorRigby/repos","events_url":"https://api.github.com/users/EleanorRigby/events{/privacy}","received_events_url":"https://api.github.com/users/EleanorRigby/received_events","type":"User","site_admin":false},"body":"# Description\r\n\r\nThis PR will enable an Admin to specify a host group in Az's clusters. This will effectively enable the Admin to define multiple AZs within a same cluster by using host groups. It effectively enables BOSH based deployments to use a stretched vSphere cluster with VSAN fault domains. \r\n\r\n## Impacted Areas in Application\r\nVM Placement & Creation\r\n\r\n## Type of change\r\n\r\nPlease delete options that are not relevant.\r\n- [x] New feature (non-breaking change which adds functionality)\r\n- [x] This change requires a documentation update\r\n\r\n## How Has This Been Tested?\r\n\r\nUnit and Integration tests WIP\r\n# Checklist:\r\n\r\n- [x] My code follows the standard ruby style guide\r\n- [x] I have performed a self-review of my own code\r\n- [x] I have commented my code, particularly in hard-to-understand areas\r\n- [x] I have added tests that prove my fix is effective or that my feature works\r\n- [x] New and existing unit tests pass locally with my changes\r\n","created_at":"2018-11-06T01:48:34Z","updated_at":"2018-11-19T22:15:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c39cac6f7de45306df91b40315e45d1fe0e295e9","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/pulls/170/commits","review_comments_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/pulls/170/comments","review_comment_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/issues/170/comments","statuses_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/statuses/58fdf1ef3b6b710a0df47813f180d88539e9a988","head":{"label":"cloudfoundry:ta-fd","ref":"ta-fd","sha":"58fdf1ef3b6b710a0df47813f180d88539e9a988","user":{"login":"cloudfoundry","id":621746,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYyMTc0Ng==","avatar_url":"https://avatars0.githubusercontent.com/u/621746?v=4","gravatar_id":"","url":"https://api.github.com/users/cloudfoundry","html_url":"https://github.com/cloudfoundry","followers_url":"https://api.github.com/users/cloudfoundry/followers","following_url":"https://api.github.com/users/cloudfoundry/following{/other_user}","gists_url":"https://api.github.com/users/cloudfoundry/gists{/gist_id}","starred_url":"https://api.github.com/users/cloudfoundry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloudfoundry/subscriptions","organizations_url":"https://api.github.com/users/cloudfoundry/orgs","repos_url":"https://api.github.com/users/cloudfoundry/repos","events_url":"https://api.github.com/users/cloudfoundry/events{/privacy}","received_events_url":"https://api.github.com/users/cloudfoundry/received_events","type":"Organization","site_admin":false},"repo":{"id":33261686,"node_id":"MDEwOlJlcG9zaXRvcnkzMzI2MTY4Ng==","name":"bosh-vsphere-cpi-release","full_name":"cloudfoundry/bosh-vsphere-cpi-release","private":false,"owner":{"login":"cloudfoundry","id":621746,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYyMTc0Ng==","avatar_url":"https://avatars0.githubusercontent.com/u/621746?v=4","gravatar_id":"","url":"https://api.github.com/users/cloudfoundry","html_url":"https://github.com/cloudfoundry","followers_url":"https://api.github.com/users/cloudfoundry/followers","following_url":"https://api.github.com/users/cloudfoundry/following{/other_user}","gists_url":"https://api.github.com/users/cloudfoundry/gists{/gist_id}","starred_url":"https://api.github.com/users/cloudfoundry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloudfoundry/subscriptions","organizations_url":"https://api.github.com/users/cloudfoundry/orgs","repos_url":"https://api.github.com/users/cloudfoundry/repos","events_url":"https://api.github.com/users/cloudfoundry/events{/privacy}","received_events_url":"https://api.github.com/users/cloudfoundry/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/cloudfoundry/bosh-vsphere-cpi-release","description":"BOSH vSphere CPI","fork":false,"url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release","forks_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/forks","keys_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/teams","hooks_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/hooks","issue_events_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/issues/events{/number}","events_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/events","assignees_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/assignees{/user}","branches_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/branches{/branch}","tags_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/tags","blobs_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/git/refs{/sha}","trees_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/statuses/{sha}","languages_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/languages","stargazers_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/stargazers","contributors_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/contributors","subscribers_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/subscribers","subscription_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/subscription","commits_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/commits{/sha}","git_commits_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/git/commits{/sha}","comments_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/comments{/number}","issue_comment_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/issues/comments{/number}","contents_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/contents/{+path}","compare_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/merges","archive_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/downloads","issues_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/issues{/number}","pulls_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/pulls{/number}","milestones_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/milestones{/number}","notifications_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/labels{/name}","releases_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/releases{/id}","deployments_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/deployments","created_at":"2015-04-01T17:21:21Z","updated_at":"2018-11-19T18:52:27Z","pushed_at":"2018-11-19T19:46:45Z","git_url":"git://github.com/cloudfoundry/bosh-vsphere-cpi-release.git","ssh_url":"git@github.com:cloudfoundry/bosh-vsphere-cpi-release.git","clone_url":"https://github.com/cloudfoundry/bosh-vsphere-cpi-release.git","svn_url":"https://github.com/cloudfoundry/bosh-vsphere-cpi-release","homepage":"","size":67992,"stargazers_count":18,"watchers_count":18,"language":"Ruby","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":26,"mirror_url":null,"archived":false,"open_issues_count":23,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":26,"open_issues":23,"watchers":18,"default_branch":"master"}},"base":{"label":"cloudfoundry:master","ref":"master","sha":"8285dd9b90b123a39ef65f57c9c52b43f7604aa2","user":{"login":"cloudfoundry","id":621746,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYyMTc0Ng==","avatar_url":"https://avatars0.githubusercontent.com/u/621746?v=4","gravatar_id":"","url":"https://api.github.com/users/cloudfoundry","html_url":"https://github.com/cloudfoundry","followers_url":"https://api.github.com/users/cloudfoundry/followers","following_url":"https://api.github.com/users/cloudfoundry/following{/other_user}","gists_url":"https://api.github.com/users/cloudfoundry/gists{/gist_id}","starred_url":"https://api.github.com/users/cloudfoundry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloudfoundry/subscriptions","organizations_url":"https://api.github.com/users/cloudfoundry/orgs","repos_url":"https://api.github.com/users/cloudfoundry/repos","events_url":"https://api.github.com/users/cloudfoundry/events{/privacy}","received_events_url":"https://api.github.com/users/cloudfoundry/received_events","type":"Organization","site_admin":false},"repo":{"id":33261686,"node_id":"MDEwOlJlcG9zaXRvcnkzMzI2MTY4Ng==","name":"bosh-vsphere-cpi-release","full_name":"cloudfoundry/bosh-vsphere-cpi-release","private":false,"owner":{"login":"cloudfoundry","id":621746,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYyMTc0Ng==","avatar_url":"https://avatars0.githubusercontent.com/u/621746?v=4","gravatar_id":"","url":"https://api.github.com/users/cloudfoundry","html_url":"https://github.com/cloudfoundry","followers_url":"https://api.github.com/users/cloudfoundry/followers","following_url":"https://api.github.com/users/cloudfoundry/following{/other_user}","gists_url":"https://api.github.com/users/cloudfoundry/gists{/gist_id}","starred_url":"https://api.github.com/users/cloudfoundry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloudfoundry/subscriptions","organizations_url":"https://api.github.com/users/cloudfoundry/orgs","repos_url":"https://api.github.com/users/cloudfoundry/repos","events_url":"https://api.github.com/users/cloudfoundry/events{/privacy}","received_events_url":"https://api.github.com/users/cloudfoundry/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/cloudfoundry/bosh-vsphere-cpi-release","description":"BOSH vSphere CPI","fork":false,"url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release","forks_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/forks","keys_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/teams","hooks_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/hooks","issue_events_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/issues/events{/number}","events_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/events","assignees_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/assignees{/user}","branches_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/branches{/branch}","tags_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/tags","blobs_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/git/refs{/sha}","trees_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/statuses/{sha}","languages_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/languages","stargazers_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/stargazers","contributors_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/contributors","subscribers_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/subscribers","subscription_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/subscription","commits_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/commits{/sha}","git_commits_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/git/commits{/sha}","comments_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/comments{/number}","issue_comment_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/issues/comments{/number}","contents_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/contents/{+path}","compare_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/merges","archive_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/downloads","issues_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/issues{/number}","pulls_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/pulls{/number}","milestones_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/milestones{/number}","notifications_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/labels{/name}","releases_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/releases{/id}","deployments_url":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/deployments","created_at":"2015-04-01T17:21:21Z","updated_at":"2018-11-19T18:52:27Z","pushed_at":"2018-11-19T19:46:45Z","git_url":"git://github.com/cloudfoundry/bosh-vsphere-cpi-release.git","ssh_url":"git@github.com:cloudfoundry/bosh-vsphere-cpi-release.git","clone_url":"https://github.com/cloudfoundry/bosh-vsphere-cpi-release.git","svn_url":"https://github.com/cloudfoundry/bosh-vsphere-cpi-release","homepage":"","size":67992,"stargazers_count":18,"watchers_count":18,"language":"Ruby","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":26,"mirror_url":null,"archived":false,"open_issues_count":23,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":26,"open_issues":23,"watchers":18,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/pulls/170"},"html":{"href":"https://github.com/cloudfoundry/bosh-vsphere-cpi-release/pull/170"},"issue":{"href":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/issues/170"},"comments":{"href":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/issues/170/comments"},"review_comments":{"href":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/pulls/170/comments"},"review_comment":{"href":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/pulls/170/commits"},"statuses":{"href":"https://api.github.com/repos/cloudfoundry/bosh-vsphere-cpi-release/statuses/58fdf1ef3b6b710a0df47813f180d88539e9a988"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"nehagjain15"}}