{"action":"created","comment":{"url":"https://api.github.com/repos/rancherio/cattle/pulls/comments/30629758","id":30629758,"diff_hunk":"@@ -0,0 +1,84 @@\n+package io.cattle.iaas.labels.api;\n+\n+import io.cattle.iaas.labels.service.LabelsService;\n+import io.cattle.platform.api.action.ActionHandler;\n+import io.cattle.platform.core.constants.LabelConstants;\n+import io.cattle.platform.core.dao.GenericMapDao;\n+import io.cattle.platform.core.dao.LabelsDao;\n+import io.cattle.platform.core.model.Instance;\n+import io.cattle.platform.core.model.InstanceLabelMap;\n+import io.cattle.platform.core.model.Label;\n+import io.cattle.platform.object.process.ObjectProcessManager;\n+import io.cattle.platform.object.process.StandardProcess;\n+import io.cattle.platform.object.util.DataAccessor;\n+import io.github.ibuildthecloud.gdapi.request.ApiRequest;\n+\n+import java.util.HashMap;\n+import java.util.List;\n+import java.util.Map;\n+\n+import javax.inject.Inject;\n+\n+public class SetContainerLabelsActionHandler implements ActionHandler {\n+\n+    @Inject\n+    GenericMapDao mapDao;\n+\n+    @Inject\n+    LabelsDao labelsDao;\n+\n+    @Inject\n+    ObjectProcessManager processManager;\n+\n+    @Inject\n+    LabelsService labelsService;\n+\n+    @Override\n+    public String getName() {\n+        return \"instance.setlabels\";\n+    }\n+\n+    @Override\n+    public Object perform(String name, Object obj, ApiRequest request) {\n+        Instance instance = (Instance) obj;\n+\n+        // are locks automatically applied for actions or just for process changes.  i'm guessing","path":"code/iaas/labels/src/main/java/io/cattle/iaas/labels/api/SetContainerLabelsActionHandler.java","position":45,"original_position":45,"commit_id":"d0131e2de6452d1fdbf84159cd828b46def6623f","original_commit_id":"d0131e2de6452d1fdbf84159cd828b46def6623f","user":{"login":"cjellick","id":2473240,"avatar_url":"https://avatars.githubusercontent.com/u/2473240?v=3","gravatar_id":"","url":"https://api.github.com/users/cjellick","html_url":"https://github.com/cjellick","followers_url":"https://api.github.com/users/cjellick/followers","following_url":"https://api.github.com/users/cjellick/following{/other_user}","gists_url":"https://api.github.com/users/cjellick/gists{/gist_id}","starred_url":"https://api.github.com/users/cjellick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cjellick/subscriptions","organizations_url":"https://api.github.com/users/cjellick/orgs","repos_url":"https://api.github.com/users/cjellick/repos","events_url":"https://api.github.com/users/cjellick/events{/privacy}","received_events_url":"https://api.github.com/users/cjellick/received_events","type":"User","site_admin":false},"body":"Do you mean to keep this comment in here?","created_at":"2015-05-19T18:21:10Z","updated_at":"2015-05-19T18:21:10Z","html_url":"https://github.com/rancherio/cattle/pull/447#discussion_r30629758","pull_request_url":"https://api.github.com/repos/rancherio/cattle/pulls/447","_links":{"self":{"href":"https://api.github.com/repos/rancherio/cattle/pulls/comments/30629758"},"html":{"href":"https://github.com/rancherio/cattle/pull/447#discussion_r30629758"},"pull_request":{"href":"https://api.github.com/repos/rancherio/cattle/pulls/447"}}},"pull_request":{"url":"https://api.github.com/repos/rancherio/cattle/pulls/447","id":35560209,"html_url":"https://github.com/rancherio/cattle/pull/447","diff_url":"https://github.com/rancherio/cattle/pull/447.diff","patch_url":"https://github.com/rancherio/cattle/pull/447.patch","issue_url":"https://api.github.com/repos/rancherio/cattle/issues/447","number":447,"state":"open","locked":false,"title":"refactor and add setlabels to containers and hosts","user":{"login":"sonchang","id":8651231,"avatar_url":"https://avatars.githubusercontent.com/u/8651231?v=3","gravatar_id":"","url":"https://api.github.com/users/sonchang","html_url":"https://github.com/sonchang","followers_url":"https://api.github.com/users/sonchang/followers","following_url":"https://api.github.com/users/sonchang/following{/other_user}","gists_url":"https://api.github.com/users/sonchang/gists{/gist_id}","starred_url":"https://api.github.com/users/sonchang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sonchang/subscriptions","organizations_url":"https://api.github.com/users/sonchang/orgs","repos_url":"https://api.github.com/users/sonchang/repos","events_url":"https://api.github.com/users/sonchang/events{/privacy}","received_events_url":"https://api.github.com/users/sonchang/received_events","type":"User","site_admin":false},"body":"@vincent99 @alena1108 @cjellick ","created_at":"2015-05-15T23:46:03Z","updated_at":"2015-05-19T18:21:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"43a7879c3e741ad7dda2eb019920e091c0b77dc2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rancherio/cattle/pulls/447/commits","review_comments_url":"https://api.github.com/repos/rancherio/cattle/pulls/447/comments","review_comment_url":"https://api.github.com/repos/rancherio/cattle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rancherio/cattle/issues/447/comments","statuses_url":"https://api.github.com/repos/rancherio/cattle/statuses/d0131e2de6452d1fdbf84159cd828b46def6623f","head":{"label":"sonchang:set_labels","ref":"set_labels","sha":"d0131e2de6452d1fdbf84159cd828b46def6623f","user":{"login":"sonchang","id":8651231,"avatar_url":"https://avatars.githubusercontent.com/u/8651231?v=3","gravatar_id":"","url":"https://api.github.com/users/sonchang","html_url":"https://github.com/sonchang","followers_url":"https://api.github.com/users/sonchang/followers","following_url":"https://api.github.com/users/sonchang/following{/other_user}","gists_url":"https://api.github.com/users/sonchang/gists{/gist_id}","starred_url":"https://api.github.com/users/sonchang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sonchang/subscriptions","organizations_url":"https://api.github.com/users/sonchang/orgs","repos_url":"https://api.github.com/users/sonchang/repos","events_url":"https://api.github.com/users/sonchang/events{/privacy}","received_events_url":"https://api.github.com/users/sonchang/received_events","type":"User","site_admin":false},"repo":{"id":29026857,"name":"cattle","full_name":"sonchang/cattle","owner":{"login":"sonchang","id":8651231,"avatar_url":"https://avatars.githubusercontent.com/u/8651231?v=3","gravatar_id":"","url":"https://api.github.com/users/sonchang","html_url":"https://github.com/sonchang","followers_url":"https://api.github.com/users/sonchang/followers","following_url":"https://api.github.com/users/sonchang/following{/other_user}","gists_url":"https://api.github.com/users/sonchang/gists{/gist_id}","starred_url":"https://api.github.com/users/sonchang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sonchang/subscriptions","organizations_url":"https://api.github.com/users/sonchang/orgs","repos_url":"https://api.github.com/users/sonchang/repos","events_url":"https://api.github.com/users/sonchang/events{/privacy}","received_events_url":"https://api.github.com/users/sonchang/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sonchang/cattle","description":"Infrastructure orchestration platform","fork":true,"url":"https://api.github.com/repos/sonchang/cattle","forks_url":"https://api.github.com/repos/sonchang/cattle/forks","keys_url":"https://api.github.com/repos/sonchang/cattle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sonchang/cattle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sonchang/cattle/teams","hooks_url":"https://api.github.com/repos/sonchang/cattle/hooks","issue_events_url":"https://api.github.com/repos/sonchang/cattle/issues/events{/number}","events_url":"https://api.github.com/repos/sonchang/cattle/events","assignees_url":"https://api.github.com/repos/sonchang/cattle/assignees{/user}","branches_url":"https://api.github.com/repos/sonchang/cattle/branches{/branch}","tags_url":"https://api.github.com/repos/sonchang/cattle/tags","blobs_url":"https://api.github.com/repos/sonchang/cattle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sonchang/cattle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sonchang/cattle/git/refs{/sha}","trees_url":"https://api.github.com/repos/sonchang/cattle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sonchang/cattle/statuses/{sha}","languages_url":"https://api.github.com/repos/sonchang/cattle/languages","stargazers_url":"https://api.github.com/repos/sonchang/cattle/stargazers","contributors_url":"https://api.github.com/repos/sonchang/cattle/contributors","subscribers_url":"https://api.github.com/repos/sonchang/cattle/subscribers","subscription_url":"https://api.github.com/repos/sonchang/cattle/subscription","commits_url":"https://api.github.com/repos/sonchang/cattle/commits{/sha}","git_commits_url":"https://api.github.com/repos/sonchang/cattle/git/commits{/sha}","comments_url":"https://api.github.com/repos/sonchang/cattle/comments{/number}","issue_comment_url":"https://api.github.com/repos/sonchang/cattle/issues/comments{/number}","contents_url":"https://api.github.com/repos/sonchang/cattle/contents/{+path}","compare_url":"https://api.github.com/repos/sonchang/cattle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sonchang/cattle/merges","archive_url":"https://api.github.com/repos/sonchang/cattle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sonchang/cattle/downloads","issues_url":"https://api.github.com/repos/sonchang/cattle/issues{/number}","pulls_url":"https://api.github.com/repos/sonchang/cattle/pulls{/number}","milestones_url":"https://api.github.com/repos/sonchang/cattle/milestones{/number}","notifications_url":"https://api.github.com/repos/sonchang/cattle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sonchang/cattle/labels{/name}","releases_url":"https://api.github.com/repos/sonchang/cattle/releases{/id}","created_at":"2015-01-09T17:18:38Z","updated_at":"2015-05-07T15:56:06Z","pushed_at":"2015-05-19T16:50:26Z","git_url":"git://github.com/sonchang/cattle.git","ssh_url":"git@github.com:sonchang/cattle.git","clone_url":"https://github.com/sonchang/cattle.git","svn_url":"https://github.com/sonchang/cattle","homepage":"","size":18705,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"rancherio:master","ref":"master","sha":"75f3d3ca72ef2db89c04461a50dfca191d649a6d","user":{"login":"rancherio","id":9343010,"avatar_url":"https://avatars.githubusercontent.com/u/9343010?v=3","gravatar_id":"","url":"https://api.github.com/users/rancherio","html_url":"https://github.com/rancherio","followers_url":"https://api.github.com/users/rancherio/followers","following_url":"https://api.github.com/users/rancherio/following{/other_user}","gists_url":"https://api.github.com/users/rancherio/gists{/gist_id}","starred_url":"https://api.github.com/users/rancherio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rancherio/subscriptions","organizations_url":"https://api.github.com/users/rancherio/orgs","repos_url":"https://api.github.com/users/rancherio/repos","events_url":"https://api.github.com/users/rancherio/events{/privacy}","received_events_url":"https://api.github.com/users/rancherio/received_events","type":"Organization","site_admin":false},"repo":{"id":18023059,"name":"cattle","full_name":"rancherio/cattle","owner":{"login":"rancherio","id":9343010,"avatar_url":"https://avatars.githubusercontent.com/u/9343010?v=3","gravatar_id":"","url":"https://api.github.com/users/rancherio","html_url":"https://github.com/rancherio","followers_url":"https://api.github.com/users/rancherio/followers","following_url":"https://api.github.com/users/rancherio/following{/other_user}","gists_url":"https://api.github.com/users/rancherio/gists{/gist_id}","starred_url":"https://api.github.com/users/rancherio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rancherio/subscriptions","organizations_url":"https://api.github.com/users/rancherio/orgs","repos_url":"https://api.github.com/users/rancherio/repos","events_url":"https://api.github.com/users/rancherio/events{/privacy}","received_events_url":"https://api.github.com/users/rancherio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rancherio/cattle","description":"Infrastructure orchestration platform","fork":false,"url":"https://api.github.com/repos/rancherio/cattle","forks_url":"https://api.github.com/repos/rancherio/cattle/forks","keys_url":"https://api.github.com/repos/rancherio/cattle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rancherio/cattle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rancherio/cattle/teams","hooks_url":"https://api.github.com/repos/rancherio/cattle/hooks","issue_events_url":"https://api.github.com/repos/rancherio/cattle/issues/events{/number}","events_url":"https://api.github.com/repos/rancherio/cattle/events","assignees_url":"https://api.github.com/repos/rancherio/cattle/assignees{/user}","branches_url":"https://api.github.com/repos/rancherio/cattle/branches{/branch}","tags_url":"https://api.github.com/repos/rancherio/cattle/tags","blobs_url":"https://api.github.com/repos/rancherio/cattle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rancherio/cattle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rancherio/cattle/git/refs{/sha}","trees_url":"https://api.github.com/repos/rancherio/cattle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rancherio/cattle/statuses/{sha}","languages_url":"https://api.github.com/repos/rancherio/cattle/languages","stargazers_url":"https://api.github.com/repos/rancherio/cattle/stargazers","contributors_url":"https://api.github.com/repos/rancherio/cattle/contributors","subscribers_url":"https://api.github.com/repos/rancherio/cattle/subscribers","subscription_url":"https://api.github.com/repos/rancherio/cattle/subscription","commits_url":"https://api.github.com/repos/rancherio/cattle/commits{/sha}","git_commits_url":"https://api.github.com/repos/rancherio/cattle/git/commits{/sha}","comments_url":"https://api.github.com/repos/rancherio/cattle/comments{/number}","issue_comment_url":"https://api.github.com/repos/rancherio/cattle/issues/comments{/number}","contents_url":"https://api.github.com/repos/rancherio/cattle/contents/{+path}","compare_url":"https://api.github.com/repos/rancherio/cattle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rancherio/cattle/merges","archive_url":"https://api.github.com/repos/rancherio/cattle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rancherio/cattle/downloads","issues_url":"https://api.github.com/repos/rancherio/cattle/issues{/number}","pulls_url":"https://api.github.com/repos/rancherio/cattle/pulls{/number}","milestones_url":"https://api.github.com/repos/rancherio/cattle/milestones{/number}","notifications_url":"https://api.github.com/repos/rancherio/cattle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rancherio/cattle/labels{/name}","releases_url":"https://api.github.com/repos/rancherio/cattle/releases{/id}","created_at":"2014-03-23T00:19:52Z","updated_at":"2015-05-19T07:34:33Z","pushed_at":"2015-05-19T18:04:18Z","git_url":"git://github.com/rancherio/cattle.git","ssh_url":"git@github.com:rancherio/cattle.git","clone_url":"https://github.com/rancherio/cattle.git","svn_url":"https://github.com/rancherio/cattle","homepage":"","size":27738,"stargazers_count":135,"watchers_count":135,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":31,"mirror_url":null,"open_issues_count":91,"forks":31,"open_issues":91,"watchers":135,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rancherio/cattle/pulls/447"},"html":{"href":"https://github.com/rancherio/cattle/pull/447"},"issue":{"href":"https://api.github.com/repos/rancherio/cattle/issues/447"},"comments":{"href":"https://api.github.com/repos/rancherio/cattle/issues/447/comments"},"review_comments":{"href":"https://api.github.com/repos/rancherio/cattle/pulls/447/comments"},"review_comment":{"href":"https://api.github.com/repos/rancherio/cattle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rancherio/cattle/pulls/447/commits"},"statuses":{"href":"https://api.github.com/repos/rancherio/cattle/statuses/d0131e2de6452d1fdbf84159cd828b46def6623f"}}}}