{"action":"created","comment":{"url":"https://api.github.com/repos/vmware/vic/pulls/comments/173993572","pull_request_review_id":103272319,"id":173993572,"diff_hunk":"@@ -238,11 +238,34 @@ func (d *Dispatcher) DeleteVCHInstances(vmm *vm.VirtualMachine, conf *config.Vir\n \tvar err error\n \tvar children []*vm.VirtualMachine\n \n-\t// TODO: GET CHILDREN EITHER BY FOLDER OR RP BASED ON DEPLOYMENT\n-\tif children, err = d.parentResourcepool.GetChildrenVMs(d.op, d.session); err != nil {\n+\tparentFolder, err := vmm.ParentInventoryFolder(d.op, d.session)\n+\tif err != nil {\n \t\treturn err\n \t}\n \n+\tif parentFolder.Reference() == d.session.VMFolder.Reference() {\n+\t\t// get the children from the resource pool since it is an old vch","path":"lib/install/management/delete.go","position":12,"original_position":12,"commit_id":"507ef1074083cae56f9998c9eb5168c8b96d6fe3","original_commit_id":"507ef1074083cae56f9998c9eb5168c8b96d6fe3","user":{"login":"anchal-agrawal","id":4361620,"avatar_url":"https://avatars3.githubusercontent.com/u/4361620?v=4","gravatar_id":"","url":"https://api.github.com/users/anchal-agrawal","html_url":"https://github.com/anchal-agrawal","followers_url":"https://api.github.com/users/anchal-agrawal/followers","following_url":"https://api.github.com/users/anchal-agrawal/following{/other_user}","gists_url":"https://api.github.com/users/anchal-agrawal/gists{/gist_id}","starred_url":"https://api.github.com/users/anchal-agrawal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anchal-agrawal/subscriptions","organizations_url":"https://api.github.com/users/anchal-agrawal/orgs","repos_url":"https://api.github.com/users/anchal-agrawal/repos","events_url":"https://api.github.com/users/anchal-agrawal/events{/privacy}","received_events_url":"https://api.github.com/users/anchal-agrawal/received_events","type":"User","site_admin":false},"body":"+1","created_at":"2018-03-13T01:21:48Z","updated_at":"2018-03-13T01:21:48Z","html_url":"https://github.com/vmware/vic/pull/7500#discussion_r173993572","pull_request_url":"https://api.github.com/repos/vmware/vic/pulls/7500","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/vmware/vic/pulls/comments/173993572"},"html":{"href":"https://github.com/vmware/vic/pull/7500#discussion_r173993572"},"pull_request":{"href":"https://api.github.com/repos/vmware/vic/pulls/7500"}},"in_reply_to_id":173991177},"pull_request":{"url":"https://api.github.com/repos/vmware/vic/pulls/7500","id":174531555,"html_url":"https://github.com/vmware/vic/pull/7500","diff_url":"https://github.com/vmware/vic/pull/7500.diff","patch_url":"https://github.com/vmware/vic/pull/7500.patch","issue_url":"https://api.github.com/repos/vmware/vic/issues/7500","number":7500,"state":"open","locked":false,"title":"Cvm inventory support","user":{"login":"matthewavery","id":8620942,"avatar_url":"https://avatars2.githubusercontent.com/u/8620942?v=4","gravatar_id":"","url":"https://api.github.com/users/matthewavery","html_url":"https://github.com/matthewavery","followers_url":"https://api.github.com/users/matthewavery/followers","following_url":"https://api.github.com/users/matthewavery/following{/other_user}","gists_url":"https://api.github.com/users/matthewavery/gists{/gist_id}","starred_url":"https://api.github.com/users/matthewavery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthewavery/subscriptions","organizations_url":"https://api.github.com/users/matthewavery/orgs","repos_url":"https://api.github.com/users/matthewavery/repos","events_url":"https://api.github.com/users/matthewavery/events{/privacy}","received_events_url":"https://api.github.com/users/matthewavery/received_events","type":"User","site_admin":false},"body":"This PR should ensure that cvm's are created in the parent folder to the VCH. It also provides the new way of determining cvm deletion candidates during an uninstall. The logic for candidate deletion is as such. If the vch parefnt folder is the vmfolder we go to the resource pool for the deletion candidates. if the folder is not we grab all the children of the folder and check them for cvm status before attempting to delete them.\r\n\r\n[full ci]\r\nFixes #7025","created_at":"2018-03-13T00:44:26Z","updated_at":"2018-03-13T01:21:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ab73c6aa7c617efc36cabd4a85a6d3b3eedb320e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":353174341,"url":"https://api.github.com/repos/vmware/vic/labels/cla-not-required","name":"cla-not-required","color":"ffffff","default":false},{"id":865009771,"url":"https://api.github.com/repos/vmware/vic/labels/feature/robo","name":"feature/robo","color":"bfd4f2","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/vmware/vic/pulls/7500/commits","review_comments_url":"https://api.github.com/repos/vmware/vic/pulls/7500/comments","review_comment_url":"https://api.github.com/repos/vmware/vic/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vmware/vic/issues/7500/comments","statuses_url":"https://api.github.com/repos/vmware/vic/statuses/507ef1074083cae56f9998c9eb5168c8b96d6fe3","head":{"label":"matthewavery:cvm-inventory-creation","ref":"cvm-inventory-creation","sha":"507ef1074083cae56f9998c9eb5168c8b96d6fe3","user":{"login":"matthewavery","id":8620942,"avatar_url":"https://avatars2.githubusercontent.com/u/8620942?v=4","gravatar_id":"","url":"https://api.github.com/users/matthewavery","html_url":"https://github.com/matthewavery","followers_url":"https://api.github.com/users/matthewavery/followers","following_url":"https://api.github.com/users/matthewavery/following{/other_user}","gists_url":"https://api.github.com/users/matthewavery/gists{/gist_id}","starred_url":"https://api.github.com/users/matthewavery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthewavery/subscriptions","organizations_url":"https://api.github.com/users/matthewavery/orgs","repos_url":"https://api.github.com/users/matthewavery/repos","events_url":"https://api.github.com/users/matthewavery/events{/privacy}","received_events_url":"https://api.github.com/users/matthewavery/received_events","type":"User","site_admin":false},"repo":{"id":55441893,"name":"vic","full_name":"matthewavery/vic","owner":{"login":"matthewavery","id":8620942,"avatar_url":"https://avatars2.githubusercontent.com/u/8620942?v=4","gravatar_id":"","url":"https://api.github.com/users/matthewavery","html_url":"https://github.com/matthewavery","followers_url":"https://api.github.com/users/matthewavery/followers","following_url":"https://api.github.com/users/matthewavery/following{/other_user}","gists_url":"https://api.github.com/users/matthewavery/gists{/gist_id}","starred_url":"https://api.github.com/users/matthewavery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthewavery/subscriptions","organizations_url":"https://api.github.com/users/matthewavery/orgs","repos_url":"https://api.github.com/users/matthewavery/repos","events_url":"https://api.github.com/users/matthewavery/events{/privacy}","received_events_url":"https://api.github.com/users/matthewavery/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/matthewavery/vic","description":"Integrated containers on vSphere","fork":true,"url":"https://api.github.com/repos/matthewavery/vic","forks_url":"https://api.github.com/repos/matthewavery/vic/forks","keys_url":"https://api.github.com/repos/matthewavery/vic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/matthewavery/vic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/matthewavery/vic/teams","hooks_url":"https://api.github.com/repos/matthewavery/vic/hooks","issue_events_url":"https://api.github.com/repos/matthewavery/vic/issues/events{/number}","events_url":"https://api.github.com/repos/matthewavery/vic/events","assignees_url":"https://api.github.com/repos/matthewavery/vic/assignees{/user}","branches_url":"https://api.github.com/repos/matthewavery/vic/branches{/branch}","tags_url":"https://api.github.com/repos/matthewavery/vic/tags","blobs_url":"https://api.github.com/repos/matthewavery/vic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/matthewavery/vic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/matthewavery/vic/git/refs{/sha}","trees_url":"https://api.github.com/repos/matthewavery/vic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/matthewavery/vic/statuses/{sha}","languages_url":"https://api.github.com/repos/matthewavery/vic/languages","stargazers_url":"https://api.github.com/repos/matthewavery/vic/stargazers","contributors_url":"https://api.github.com/repos/matthewavery/vic/contributors","subscribers_url":"https://api.github.com/repos/matthewavery/vic/subscribers","subscription_url":"https://api.github.com/repos/matthewavery/vic/subscription","commits_url":"https://api.github.com/repos/matthewavery/vic/commits{/sha}","git_commits_url":"https://api.github.com/repos/matthewavery/vic/git/commits{/sha}","comments_url":"https://api.github.com/repos/matthewavery/vic/comments{/number}","issue_comment_url":"https://api.github.com/repos/matthewavery/vic/issues/comments{/number}","contents_url":"https://api.github.com/repos/matthewavery/vic/contents/{+path}","compare_url":"https://api.github.com/repos/matthewavery/vic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/matthewavery/vic/merges","archive_url":"https://api.github.com/repos/matthewavery/vic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/matthewavery/vic/downloads","issues_url":"https://api.github.com/repos/matthewavery/vic/issues{/number}","pulls_url":"https://api.github.com/repos/matthewavery/vic/pulls{/number}","milestones_url":"https://api.github.com/repos/matthewavery/vic/milestones{/number}","notifications_url":"https://api.github.com/repos/matthewavery/vic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/matthewavery/vic/labels{/name}","releases_url":"https://api.github.com/repos/matthewavery/vic/releases{/id}","deployments_url":"https://api.github.com/repos/matthewavery/vic/deployments","created_at":"2016-04-04T20:19:26Z","updated_at":"2016-12-13T20:04:12Z","pushed_at":"2018-03-13T00:43:39Z","git_url":"git://github.com/matthewavery/vic.git","ssh_url":"git@github.com:matthewavery/vic.git","clone_url":"https://github.com/matthewavery/vic.git","svn_url":"https://github.com/matthewavery/vic","homepage":null,"size":59276,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"vmware:feature/robo","ref":"feature/robo","sha":"58e44f3706fa83e394f7a5f72bc8843c593cda34","user":{"login":"vmware","id":473334,"avatar_url":"https://avatars0.githubusercontent.com/u/473334?v=4","gravatar_id":"","url":"https://api.github.com/users/vmware","html_url":"https://github.com/vmware","followers_url":"https://api.github.com/users/vmware/followers","following_url":"https://api.github.com/users/vmware/following{/other_user}","gists_url":"https://api.github.com/users/vmware/gists{/gist_id}","starred_url":"https://api.github.com/users/vmware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmware/subscriptions","organizations_url":"https://api.github.com/users/vmware/orgs","repos_url":"https://api.github.com/users/vmware/repos","events_url":"https://api.github.com/users/vmware/events{/privacy}","received_events_url":"https://api.github.com/users/vmware/received_events","type":"Organization","site_admin":false},"repo":{"id":49597898,"name":"vic","full_name":"vmware/vic","owner":{"login":"vmware","id":473334,"avatar_url":"https://avatars0.githubusercontent.com/u/473334?v=4","gravatar_id":"","url":"https://api.github.com/users/vmware","html_url":"https://github.com/vmware","followers_url":"https://api.github.com/users/vmware/followers","following_url":"https://api.github.com/users/vmware/following{/other_user}","gists_url":"https://api.github.com/users/vmware/gists{/gist_id}","starred_url":"https://api.github.com/users/vmware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmware/subscriptions","organizations_url":"https://api.github.com/users/vmware/orgs","repos_url":"https://api.github.com/users/vmware/repos","events_url":"https://api.github.com/users/vmware/events{/privacy}","received_events_url":"https://api.github.com/users/vmware/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vmware/vic","description":"Integrated containers engine on vSphere","fork":false,"url":"https://api.github.com/repos/vmware/vic","forks_url":"https://api.github.com/repos/vmware/vic/forks","keys_url":"https://api.github.com/repos/vmware/vic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vmware/vic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vmware/vic/teams","hooks_url":"https://api.github.com/repos/vmware/vic/hooks","issue_events_url":"https://api.github.com/repos/vmware/vic/issues/events{/number}","events_url":"https://api.github.com/repos/vmware/vic/events","assignees_url":"https://api.github.com/repos/vmware/vic/assignees{/user}","branches_url":"https://api.github.com/repos/vmware/vic/branches{/branch}","tags_url":"https://api.github.com/repos/vmware/vic/tags","blobs_url":"https://api.github.com/repos/vmware/vic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vmware/vic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vmware/vic/git/refs{/sha}","trees_url":"https://api.github.com/repos/vmware/vic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vmware/vic/statuses/{sha}","languages_url":"https://api.github.com/repos/vmware/vic/languages","stargazers_url":"https://api.github.com/repos/vmware/vic/stargazers","contributors_url":"https://api.github.com/repos/vmware/vic/contributors","subscribers_url":"https://api.github.com/repos/vmware/vic/subscribers","subscription_url":"https://api.github.com/repos/vmware/vic/subscription","commits_url":"https://api.github.com/repos/vmware/vic/commits{/sha}","git_commits_url":"https://api.github.com/repos/vmware/vic/git/commits{/sha}","comments_url":"https://api.github.com/repos/vmware/vic/comments{/number}","issue_comment_url":"https://api.github.com/repos/vmware/vic/issues/comments{/number}","contents_url":"https://api.github.com/repos/vmware/vic/contents/{+path}","compare_url":"https://api.github.com/repos/vmware/vic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vmware/vic/merges","archive_url":"https://api.github.com/repos/vmware/vic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vmware/vic/downloads","issues_url":"https://api.github.com/repos/vmware/vic/issues{/number}","pulls_url":"https://api.github.com/repos/vmware/vic/pulls{/number}","milestones_url":"https://api.github.com/repos/vmware/vic/milestones{/number}","notifications_url":"https://api.github.com/repos/vmware/vic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vmware/vic/labels{/name}","releases_url":"https://api.github.com/repos/vmware/vic/releases{/id}","deployments_url":"https://api.github.com/repos/vmware/vic/deployments","created_at":"2016-01-13T19:53:57Z","updated_at":"2018-03-12T20:15:01Z","pushed_at":"2018-03-13T00:44:27Z","git_url":"git://github.com/vmware/vic.git","ssh_url":"git@github.com:vmware/vic.git","clone_url":"https://github.com/vmware/vic.git","svn_url":"https://github.com/vmware/vic","homepage":"http://vmware.github.io/vic","size":70222,"stargazers_count":311,"watchers_count":311,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":123,"mirror_url":null,"archived":false,"open_issues_count":1025,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":123,"open_issues":1025,"watchers":311,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vmware/vic/pulls/7500"},"html":{"href":"https://github.com/vmware/vic/pull/7500"},"issue":{"href":"https://api.github.com/repos/vmware/vic/issues/7500"},"comments":{"href":"https://api.github.com/repos/vmware/vic/issues/7500/comments"},"review_comments":{"href":"https://api.github.com/repos/vmware/vic/pulls/7500/comments"},"review_comment":{"href":"https://api.github.com/repos/vmware/vic/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vmware/vic/pulls/7500/commits"},"statuses":{"href":"https://api.github.com/repos/vmware/vic/statuses/507ef1074083cae56f9998c9eb5168c8b96d6fe3"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"anchal-agrawal"}}