{"action":"created","comment":{"url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/comments/23711808","id":23711808,"diff_hunk":"@@ -92,5 +106,16 @@ def destroy_vm(vm)\n     rescue => err\n       action_result(false, err.to_s)\n     end\n+\n+    def set_owner_vm(vm, owner)\n+      desc = \"#{vm_ident(vm)} setting owner to '#{owner}'\"\n+      user = User.find_or_create_by_ldap_upn(owner)","path":"vmdb/app/controllers/api_controller/vms.rb","position":28,"original_position":28,"commit_id":"891811017fa1260d66d41c166d2b6ef4b185e4fa","original_commit_id":"891811017fa1260d66d41c166d2b6ef4b185e4fa","user":{"login":"lfu","id":2593270,"avatar_url":"https://avatars.githubusercontent.com/u/2593270?v=3","gravatar_id":"","url":"https://api.github.com/users/lfu","html_url":"https://github.com/lfu","followers_url":"https://api.github.com/users/lfu/followers","following_url":"https://api.github.com/users/lfu/following{/other_user}","gists_url":"https://api.github.com/users/lfu/gists{/gist_id}","starred_url":"https://api.github.com/users/lfu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lfu/subscriptions","organizations_url":"https://api.github.com/users/lfu/orgs","repos_url":"https://api.github.com/users/lfu/repos","events_url":"https://api.github.com/users/lfu/events{/privacy}","received_events_url":"https://api.github.com/users/lfu/received_events","type":"User","site_admin":false},"body":"@Fryguy This is about VM's owner and group. Were you mixing it with User's groups and current group?","created_at":"2015-01-28T18:53:39Z","updated_at":"2015-01-28T18:53:39Z","html_url":"https://github.com/ManageIQ/manageiq/pull/1197#discussion_r23711808","pull_request_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/1197","_links":{"self":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/comments/23711808"},"html":{"href":"https://github.com/ManageIQ/manageiq/pull/1197#discussion_r23711808"},"pull_request":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/1197"}}},"pull_request":{"url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/1197","id":25710197,"html_url":"https://github.com/ManageIQ/manageiq/pull/1197","diff_url":"https://github.com/ManageIQ/manageiq/pull/1197.diff","patch_url":"https://github.com/ManageIQ/manageiq/pull/1197.patch","issue_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/1197","number":1197,"state":"closed","locked":false,"title":"[api] Adding support for VM set_owner action","user":{"login":"abellotti","id":5797328,"avatar_url":"https://avatars.githubusercontent.com/u/5797328?v=3","gravatar_id":"","url":"https://api.github.com/users/abellotti","html_url":"https://github.com/abellotti","followers_url":"https://api.github.com/users/abellotti/followers","following_url":"https://api.github.com/users/abellotti/following{/other_user}","gists_url":"https://api.github.com/users/abellotti/gists{/gist_id}","starred_url":"https://api.github.com/users/abellotti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abellotti/subscriptions","organizations_url":"https://api.github.com/users/abellotti/orgs","repos_url":"https://api.github.com/users/abellotti/repos","events_url":"https://api.github.com/users/abellotti/events{/privacy}","received_events_url":"https://api.github.com/users/abellotti/received_events","type":"User","site_admin":false},"body":"- Enabling set_owner action on VM collection and resources\r\n- Added set_owner_resource_vms method\r\n- New specs for VM set_owner action\r\n\r\nhttps://trello.com/c/jRyHMgjs","created_at":"2014-12-09T00:31:12Z","updated_at":"2015-01-28T18:53:39Z","closed_at":"2015-01-28T18:14:00Z","merged_at":"2015-01-28T18:14:00Z","merge_commit_sha":"ff66073c9c88e7ea5fbb920d01d98a363fc642aa","assignee":{"login":"abellotti","id":5797328,"avatar_url":"https://avatars.githubusercontent.com/u/5797328?v=3","gravatar_id":"","url":"https://api.github.com/users/abellotti","html_url":"https://github.com/abellotti","followers_url":"https://api.github.com/users/abellotti/followers","following_url":"https://api.github.com/users/abellotti/following{/other_user}","gists_url":"https://api.github.com/users/abellotti/gists{/gist_id}","starred_url":"https://api.github.com/users/abellotti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abellotti/subscriptions","organizations_url":"https://api.github.com/users/abellotti/orgs","repos_url":"https://api.github.com/users/abellotti/repos","events_url":"https://api.github.com/users/abellotti/events{/privacy}","received_events_url":"https://api.github.com/users/abellotti/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/ManageIQ/manageiq/milestones/13","labels_url":"https://api.github.com/repos/ManageIQ/manageiq/milestones/13/labels","id":953518,"number":13,"title":"Sprint 19 Ending Feb 16, 2015","description":"","creator":{"login":"Fryguy","id":52120,"avatar_url":"https://avatars.githubusercontent.com/u/52120?v=3","gravatar_id":"","url":"https://api.github.com/users/Fryguy","html_url":"https://github.com/Fryguy","followers_url":"https://api.github.com/users/Fryguy/followers","following_url":"https://api.github.com/users/Fryguy/following{/other_user}","gists_url":"https://api.github.com/users/Fryguy/gists{/gist_id}","starred_url":"https://api.github.com/users/Fryguy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fryguy/subscriptions","organizations_url":"https://api.github.com/users/Fryguy/orgs","repos_url":"https://api.github.com/users/Fryguy/repos","events_url":"https://api.github.com/users/Fryguy/events{/privacy}","received_events_url":"https://api.github.com/users/Fryguy/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":14,"state":"open","created_at":"2015-01-27T17:18:00Z","updated_at":"2015-01-28T18:14:00Z","due_on":"2015-02-16T05:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/1197/commits","review_comments_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/1197/comments","review_comment_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/comments/{number}","comments_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/1197/comments","statuses_url":"https://api.github.com/repos/ManageIQ/manageiq/statuses/891811017fa1260d66d41c166d2b6ef4b185e4fa","head":{"label":"abellotti:rest_api_vm_setowner","ref":"rest_api_vm_setowner","sha":"891811017fa1260d66d41c166d2b6ef4b185e4fa","user":{"login":"abellotti","id":5797328,"avatar_url":"https://avatars.githubusercontent.com/u/5797328?v=3","gravatar_id":"","url":"https://api.github.com/users/abellotti","html_url":"https://github.com/abellotti","followers_url":"https://api.github.com/users/abellotti/followers","following_url":"https://api.github.com/users/abellotti/following{/other_user}","gists_url":"https://api.github.com/users/abellotti/gists{/gist_id}","starred_url":"https://api.github.com/users/abellotti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abellotti/subscriptions","organizations_url":"https://api.github.com/users/abellotti/orgs","repos_url":"https://api.github.com/users/abellotti/repos","events_url":"https://api.github.com/users/abellotti/events{/privacy}","received_events_url":"https://api.github.com/users/abellotti/received_events","type":"User","site_admin":false},"repo":{"id":20813598,"name":"manageiq","full_name":"abellotti/manageiq","owner":{"login":"abellotti","id":5797328,"avatar_url":"https://avatars.githubusercontent.com/u/5797328?v=3","gravatar_id":"","url":"https://api.github.com/users/abellotti","html_url":"https://github.com/abellotti","followers_url":"https://api.github.com/users/abellotti/followers","following_url":"https://api.github.com/users/abellotti/following{/other_user}","gists_url":"https://api.github.com/users/abellotti/gists{/gist_id}","starred_url":"https://api.github.com/users/abellotti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abellotti/subscriptions","organizations_url":"https://api.github.com/users/abellotti/orgs","repos_url":"https://api.github.com/users/abellotti/repos","events_url":"https://api.github.com/users/abellotti/events{/privacy}","received_events_url":"https://api.github.com/users/abellotti/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/abellotti/manageiq","description":"ManageIQ Cloud Management Platform","fork":true,"url":"https://api.github.com/repos/abellotti/manageiq","forks_url":"https://api.github.com/repos/abellotti/manageiq/forks","keys_url":"https://api.github.com/repos/abellotti/manageiq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/abellotti/manageiq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/abellotti/manageiq/teams","hooks_url":"https://api.github.com/repos/abellotti/manageiq/hooks","issue_events_url":"https://api.github.com/repos/abellotti/manageiq/issues/events{/number}","events_url":"https://api.github.com/repos/abellotti/manageiq/events","assignees_url":"https://api.github.com/repos/abellotti/manageiq/assignees{/user}","branches_url":"https://api.github.com/repos/abellotti/manageiq/branches{/branch}","tags_url":"https://api.github.com/repos/abellotti/manageiq/tags","blobs_url":"https://api.github.com/repos/abellotti/manageiq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/abellotti/manageiq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/abellotti/manageiq/git/refs{/sha}","trees_url":"https://api.github.com/repos/abellotti/manageiq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/abellotti/manageiq/statuses/{sha}","languages_url":"https://api.github.com/repos/abellotti/manageiq/languages","stargazers_url":"https://api.github.com/repos/abellotti/manageiq/stargazers","contributors_url":"https://api.github.com/repos/abellotti/manageiq/contributors","subscribers_url":"https://api.github.com/repos/abellotti/manageiq/subscribers","subscription_url":"https://api.github.com/repos/abellotti/manageiq/subscription","commits_url":"https://api.github.com/repos/abellotti/manageiq/commits{/sha}","git_commits_url":"https://api.github.com/repos/abellotti/manageiq/git/commits{/sha}","comments_url":"https://api.github.com/repos/abellotti/manageiq/comments{/number}","issue_comment_url":"https://api.github.com/repos/abellotti/manageiq/issues/comments/{number}","contents_url":"https://api.github.com/repos/abellotti/manageiq/contents/{+path}","compare_url":"https://api.github.com/repos/abellotti/manageiq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/abellotti/manageiq/merges","archive_url":"https://api.github.com/repos/abellotti/manageiq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/abellotti/manageiq/downloads","issues_url":"https://api.github.com/repos/abellotti/manageiq/issues{/number}","pulls_url":"https://api.github.com/repos/abellotti/manageiq/pulls{/number}","milestones_url":"https://api.github.com/repos/abellotti/manageiq/milestones{/number}","notifications_url":"https://api.github.com/repos/abellotti/manageiq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/abellotti/manageiq/labels{/name}","releases_url":"https://api.github.com/repos/abellotti/manageiq/releases{/id}","created_at":"2014-06-13T18:22:42Z","updated_at":"2014-06-17T20:58:44Z","pushed_at":"2015-01-28T18:37:12Z","git_url":"git://github.com/abellotti/manageiq.git","ssh_url":"git@github.com:abellotti/manageiq.git","clone_url":"https://github.com/abellotti/manageiq.git","svn_url":"https://github.com/abellotti/manageiq","homepage":null,"size":61890,"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":"0f95f7118a215f2053130892648ed4a766eadadd","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-01-28T18:14:00Z","pushed_at":"2015-01-28T18:14:00Z","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":87071,"stargazers_count":80,"watchers_count":80,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":83,"mirror_url":null,"open_issues_count":237,"forks":83,"open_issues":237,"watchers":80,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/1197"},"html":{"href":"https://github.com/ManageIQ/manageiq/pull/1197"},"issue":{"href":"https://api.github.com/repos/ManageIQ/manageiq/issues/1197"},"comments":{"href":"https://api.github.com/repos/ManageIQ/manageiq/issues/1197/comments"},"review_comments":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/1197/comments"},"review_comment":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/1197/commits"},"statuses":{"href":"https://api.github.com/repos/ManageIQ/manageiq/statuses/891811017fa1260d66d41c166d2b6ef4b185e4fa"}}}}