{"action":"created","comment":{"url":"https://api.github.com/repos/rancher/cattle/pulls/comments/50488024","id":50488024,"diff_hunk":"@@ -67,4 +150,47 @@ public int deleteSchemas(long serviceId) {\n                 ).fetch().intoArray(INSTANCE.AGENT_ID));\n     }\n \n+    @SuppressWarnings(\"unchecked\")\n+    @Override\n+    public void createRoles(DynamicSchema dynamicSchema) {\n+        List<String> roles = (List<String>) CollectionUtils.toList(CollectionUtils.getNestedValue(dynamicSchema.getData(),\n+                \"fields\", \"roles\"));\n+        for (String role: roles) {\n+            create().insertInto(DYNAMIC_SCHEMA_ROLE, DYNAMIC_SCHEMA_ROLE.DYNAMIC_SCHEMA_ID, DYNAMIC_SCHEMA_ROLE.ROLE)\n+                    .values(dynamicSchema.getId(), role).execute();\n+        }\n+    }\n+\n+    @Override\n+    public void removeRoles(DynamicSchema dynamicSchema) {\n+        create().delete(DYNAMIC_SCHEMA_ROLE)\n+                .where(DYNAMIC_SCHEMA_ROLE.DYNAMIC_SCHEMA_ID.eq(dynamicSchema.getId()))\n+                .execute();\n+\n+    }\n+\n+    @SuppressWarnings(\"unchecked\")","path":"code/iaas/model/src/main/java/io/cattle/platform/core/dao/impl/DynamicSchemaDaoImpl.java","position":150,"original_position":150,"commit_id":"3f5f457e77195f02695b52e486312fc1e1899d5a","original_commit_id":"3f5f457e77195f02695b52e486312fc1e1899d5a","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":"Unnecessary suppress is causing a compiler warning","created_at":"2016-01-22T00:34:49Z","updated_at":"2016-01-22T00:34:49Z","html_url":"https://github.com/rancher/cattle/pull/1229#discussion_r50488024","pull_request_url":"https://api.github.com/repos/rancher/cattle/pulls/1229","_links":{"self":{"href":"https://api.github.com/repos/rancher/cattle/pulls/comments/50488024"},"html":{"href":"https://github.com/rancher/cattle/pull/1229#discussion_r50488024"},"pull_request":{"href":"https://api.github.com/repos/rancher/cattle/pulls/1229"}}},"pull_request":{"url":"https://api.github.com/repos/rancher/cattle/pulls/1229","id":55131528,"html_url":"https://github.com/rancher/cattle/pull/1229","diff_url":"https://github.com/rancher/cattle/pull/1229.diff","patch_url":"https://github.com/rancher/cattle/pull/1229.patch","issue_url":"https://api.github.com/repos/rancher/cattle/issues/1229","number":1229,"state":"open","locked":false,"title":"WIP Gms Dynamic Drivers","user":{"login":"hibooboo2","id":1197823,"avatar_url":"https://avatars.githubusercontent.com/u/1197823?v=3","gravatar_id":"","url":"https://api.github.com/users/hibooboo2","html_url":"https://github.com/hibooboo2","followers_url":"https://api.github.com/users/hibooboo2/followers","following_url":"https://api.github.com/users/hibooboo2/following{/other_user}","gists_url":"https://api.github.com/users/hibooboo2/gists{/gist_id}","starred_url":"https://api.github.com/users/hibooboo2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hibooboo2/subscriptions","organizations_url":"https://api.github.com/users/hibooboo2/orgs","repos_url":"https://api.github.com/users/hibooboo2/repos","events_url":"https://api.github.com/users/hibooboo2/events{/privacy}","received_events_url":"https://api.github.com/users/hibooboo2/received_events","type":"User","site_admin":false},"body":null,"created_at":"2016-01-05T19:26:01Z","updated_at":"2016-01-22T00:34:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c32122732a5f1f0a5982a4f0ef55782aef068642","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rancher/cattle/pulls/1229/commits","review_comments_url":"https://api.github.com/repos/rancher/cattle/pulls/1229/comments","review_comment_url":"https://api.github.com/repos/rancher/cattle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rancher/cattle/issues/1229/comments","statuses_url":"https://api.github.com/repos/rancher/cattle/statuses/3f5f457e77195f02695b52e486312fc1e1899d5a","head":{"label":"hibooboo2:gms_drivers","ref":"gms_drivers","sha":"3f5f457e77195f02695b52e486312fc1e1899d5a","user":{"login":"hibooboo2","id":1197823,"avatar_url":"https://avatars.githubusercontent.com/u/1197823?v=3","gravatar_id":"","url":"https://api.github.com/users/hibooboo2","html_url":"https://github.com/hibooboo2","followers_url":"https://api.github.com/users/hibooboo2/followers","following_url":"https://api.github.com/users/hibooboo2/following{/other_user}","gists_url":"https://api.github.com/users/hibooboo2/gists{/gist_id}","starred_url":"https://api.github.com/users/hibooboo2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hibooboo2/subscriptions","organizations_url":"https://api.github.com/users/hibooboo2/orgs","repos_url":"https://api.github.com/users/hibooboo2/repos","events_url":"https://api.github.com/users/hibooboo2/events{/privacy}","received_events_url":"https://api.github.com/users/hibooboo2/received_events","type":"User","site_admin":false},"repo":{"id":29162693,"name":"cattle","full_name":"hibooboo2/cattle","owner":{"login":"hibooboo2","id":1197823,"avatar_url":"https://avatars.githubusercontent.com/u/1197823?v=3","gravatar_id":"","url":"https://api.github.com/users/hibooboo2","html_url":"https://github.com/hibooboo2","followers_url":"https://api.github.com/users/hibooboo2/followers","following_url":"https://api.github.com/users/hibooboo2/following{/other_user}","gists_url":"https://api.github.com/users/hibooboo2/gists{/gist_id}","starred_url":"https://api.github.com/users/hibooboo2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hibooboo2/subscriptions","organizations_url":"https://api.github.com/users/hibooboo2/orgs","repos_url":"https://api.github.com/users/hibooboo2/repos","events_url":"https://api.github.com/users/hibooboo2/events{/privacy}","received_events_url":"https://api.github.com/users/hibooboo2/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hibooboo2/cattle","description":"Infrastructure orchestration platform","fork":true,"url":"https://api.github.com/repos/hibooboo2/cattle","forks_url":"https://api.github.com/repos/hibooboo2/cattle/forks","keys_url":"https://api.github.com/repos/hibooboo2/cattle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hibooboo2/cattle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hibooboo2/cattle/teams","hooks_url":"https://api.github.com/repos/hibooboo2/cattle/hooks","issue_events_url":"https://api.github.com/repos/hibooboo2/cattle/issues/events{/number}","events_url":"https://api.github.com/repos/hibooboo2/cattle/events","assignees_url":"https://api.github.com/repos/hibooboo2/cattle/assignees{/user}","branches_url":"https://api.github.com/repos/hibooboo2/cattle/branches{/branch}","tags_url":"https://api.github.com/repos/hibooboo2/cattle/tags","blobs_url":"https://api.github.com/repos/hibooboo2/cattle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hibooboo2/cattle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hibooboo2/cattle/git/refs{/sha}","trees_url":"https://api.github.com/repos/hibooboo2/cattle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hibooboo2/cattle/statuses/{sha}","languages_url":"https://api.github.com/repos/hibooboo2/cattle/languages","stargazers_url":"https://api.github.com/repos/hibooboo2/cattle/stargazers","contributors_url":"https://api.github.com/repos/hibooboo2/cattle/contributors","subscribers_url":"https://api.github.com/repos/hibooboo2/cattle/subscribers","subscription_url":"https://api.github.com/repos/hibooboo2/cattle/subscription","commits_url":"https://api.github.com/repos/hibooboo2/cattle/commits{/sha}","git_commits_url":"https://api.github.com/repos/hibooboo2/cattle/git/commits{/sha}","comments_url":"https://api.github.com/repos/hibooboo2/cattle/comments{/number}","issue_comment_url":"https://api.github.com/repos/hibooboo2/cattle/issues/comments{/number}","contents_url":"https://api.github.com/repos/hibooboo2/cattle/contents/{+path}","compare_url":"https://api.github.com/repos/hibooboo2/cattle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hibooboo2/cattle/merges","archive_url":"https://api.github.com/repos/hibooboo2/cattle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hibooboo2/cattle/downloads","issues_url":"https://api.github.com/repos/hibooboo2/cattle/issues{/number}","pulls_url":"https://api.github.com/repos/hibooboo2/cattle/pulls{/number}","milestones_url":"https://api.github.com/repos/hibooboo2/cattle/milestones{/number}","notifications_url":"https://api.github.com/repos/hibooboo2/cattle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hibooboo2/cattle/labels{/name}","releases_url":"https://api.github.com/repos/hibooboo2/cattle/releases{/id}","deployments_url":"https://api.github.com/repos/hibooboo2/cattle/deployments","created_at":"2015-01-12T23:33:21Z","updated_at":"2015-10-27T12:29:47Z","pushed_at":"2016-01-22T00:29:08Z","git_url":"git://github.com/hibooboo2/cattle.git","ssh_url":"git@github.com:hibooboo2/cattle.git","clone_url":"https://github.com/hibooboo2/cattle.git","svn_url":"https://github.com/hibooboo2/cattle","homepage":"","size":22595,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"drone-slack"}},"base":{"label":"rancher:master","ref":"master","sha":"fef2314ab24a478bf9bead4bec10cbc7a4e50197","user":{"login":"rancher","id":9343010,"avatar_url":"https://avatars.githubusercontent.com/u/9343010?v=3","gravatar_id":"","url":"https://api.github.com/users/rancher","html_url":"https://github.com/rancher","followers_url":"https://api.github.com/users/rancher/followers","following_url":"https://api.github.com/users/rancher/following{/other_user}","gists_url":"https://api.github.com/users/rancher/gists{/gist_id}","starred_url":"https://api.github.com/users/rancher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rancher/subscriptions","organizations_url":"https://api.github.com/users/rancher/orgs","repos_url":"https://api.github.com/users/rancher/repos","events_url":"https://api.github.com/users/rancher/events{/privacy}","received_events_url":"https://api.github.com/users/rancher/received_events","type":"Organization","site_admin":false},"repo":{"id":18023059,"name":"cattle","full_name":"rancher/cattle","owner":{"login":"rancher","id":9343010,"avatar_url":"https://avatars.githubusercontent.com/u/9343010?v=3","gravatar_id":"","url":"https://api.github.com/users/rancher","html_url":"https://github.com/rancher","followers_url":"https://api.github.com/users/rancher/followers","following_url":"https://api.github.com/users/rancher/following{/other_user}","gists_url":"https://api.github.com/users/rancher/gists{/gist_id}","starred_url":"https://api.github.com/users/rancher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rancher/subscriptions","organizations_url":"https://api.github.com/users/rancher/orgs","repos_url":"https://api.github.com/users/rancher/repos","events_url":"https://api.github.com/users/rancher/events{/privacy}","received_events_url":"https://api.github.com/users/rancher/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rancher/cattle","description":"Infrastructure orchestration platform","fork":false,"url":"https://api.github.com/repos/rancher/cattle","forks_url":"https://api.github.com/repos/rancher/cattle/forks","keys_url":"https://api.github.com/repos/rancher/cattle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rancher/cattle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rancher/cattle/teams","hooks_url":"https://api.github.com/repos/rancher/cattle/hooks","issue_events_url":"https://api.github.com/repos/rancher/cattle/issues/events{/number}","events_url":"https://api.github.com/repos/rancher/cattle/events","assignees_url":"https://api.github.com/repos/rancher/cattle/assignees{/user}","branches_url":"https://api.github.com/repos/rancher/cattle/branches{/branch}","tags_url":"https://api.github.com/repos/rancher/cattle/tags","blobs_url":"https://api.github.com/repos/rancher/cattle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rancher/cattle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rancher/cattle/git/refs{/sha}","trees_url":"https://api.github.com/repos/rancher/cattle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rancher/cattle/statuses/{sha}","languages_url":"https://api.github.com/repos/rancher/cattle/languages","stargazers_url":"https://api.github.com/repos/rancher/cattle/stargazers","contributors_url":"https://api.github.com/repos/rancher/cattle/contributors","subscribers_url":"https://api.github.com/repos/rancher/cattle/subscribers","subscription_url":"https://api.github.com/repos/rancher/cattle/subscription","commits_url":"https://api.github.com/repos/rancher/cattle/commits{/sha}","git_commits_url":"https://api.github.com/repos/rancher/cattle/git/commits{/sha}","comments_url":"https://api.github.com/repos/rancher/cattle/comments{/number}","issue_comment_url":"https://api.github.com/repos/rancher/cattle/issues/comments{/number}","contents_url":"https://api.github.com/repos/rancher/cattle/contents/{+path}","compare_url":"https://api.github.com/repos/rancher/cattle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rancher/cattle/merges","archive_url":"https://api.github.com/repos/rancher/cattle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rancher/cattle/downloads","issues_url":"https://api.github.com/repos/rancher/cattle/issues{/number}","pulls_url":"https://api.github.com/repos/rancher/cattle/pulls{/number}","milestones_url":"https://api.github.com/repos/rancher/cattle/milestones{/number}","notifications_url":"https://api.github.com/repos/rancher/cattle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rancher/cattle/labels{/name}","releases_url":"https://api.github.com/repos/rancher/cattle/releases{/id}","deployments_url":"https://api.github.com/repos/rancher/cattle/deployments","created_at":"2014-03-23T00:19:52Z","updated_at":"2016-01-18T10:17:00Z","pushed_at":"2016-01-22T00:29:08Z","git_url":"git://github.com/rancher/cattle.git","ssh_url":"git@github.com:rancher/cattle.git","clone_url":"https://github.com/rancher/cattle.git","svn_url":"https://github.com/rancher/cattle","homepage":"","size":26923,"stargazers_count":186,"watchers_count":186,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":64,"mirror_url":null,"open_issues_count":84,"forks":64,"open_issues":84,"watchers":186,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rancher/cattle/pulls/1229"},"html":{"href":"https://github.com/rancher/cattle/pull/1229"},"issue":{"href":"https://api.github.com/repos/rancher/cattle/issues/1229"},"comments":{"href":"https://api.github.com/repos/rancher/cattle/issues/1229/comments"},"review_comments":{"href":"https://api.github.com/repos/rancher/cattle/pulls/1229/comments"},"review_comment":{"href":"https://api.github.com/repos/rancher/cattle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rancher/cattle/pulls/1229/commits"},"statuses":{"href":"https://api.github.com/repos/rancher/cattle/statuses/3f5f457e77195f02695b52e486312fc1e1899d5a"}}}}