{"action":"created","comment":{"url":"https://api.github.com/repos/docker/swarmkit/pulls/comments/110974345","pull_request_review_id":32178961,"id":110974345,"diff_hunk":"@@ -0,0 +1,35 @@\n+package genericresource\n+\n+import (\n+\t\"strconv\"\n+\t\"strings\"\n+\n+\t\"github.com/docker/swarmkit/api\"\n+)\n+\n+// Parse parses the GenericResource resources given by the arguments\n+func Parse(tprs string, resources *api.Resources) error {\n+\tresources.Generic = make(map[string]*api.GenericResource)\n+\tmtpr := resources.Generic\n+\n+\tfor _, term := range strings.Split(tprs, \";\") {","path":"api/genericresource/parse.go","position":15,"original_position":15,"commit_id":"7d02943fbf744f9a4083b2bc9654af5bd6e34122","original_commit_id":"7d02943fbf744f9a4083b2bc9654af5bd6e34122","user":{"login":"dongluochen","id":14985073,"avatar_url":"https://avatars0.githubusercontent.com/u/14985073?v=3","gravatar_id":"","url":"https://api.github.com/users/dongluochen","html_url":"https://github.com/dongluochen","followers_url":"https://api.github.com/users/dongluochen/followers","following_url":"https://api.github.com/users/dongluochen/following{/other_user}","gists_url":"https://api.github.com/users/dongluochen/gists{/gist_id}","starred_url":"https://api.github.com/users/dongluochen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dongluochen/subscriptions","organizations_url":"https://api.github.com/users/dongluochen/orgs","repos_url":"https://api.github.com/users/dongluochen/repos","events_url":"https://api.github.com/users/dongluochen/events{/privacy}","received_events_url":"https://api.github.com/users/dongluochen/received_events","type":"User","site_admin":false},"body":"I think the description needs to explicitly specify what type of resource it is (discrete value, set, scalar, etc). And allow extension. ","created_at":"2017-04-11T18:08:33Z","updated_at":"2017-04-11T18:13:31Z","html_url":"https://github.com/docker/swarmkit/pull/2090#discussion_r110974345","pull_request_url":"https://api.github.com/repos/docker/swarmkit/pulls/2090","_links":{"self":{"href":"https://api.github.com/repos/docker/swarmkit/pulls/comments/110974345"},"html":{"href":"https://github.com/docker/swarmkit/pull/2090#discussion_r110974345"},"pull_request":{"href":"https://api.github.com/repos/docker/swarmkit/pulls/2090"}}},"pull_request":{"url":"https://api.github.com/repos/docker/swarmkit/pulls/2090","id":114255072,"html_url":"https://github.com/docker/swarmkit/pull/2090","diff_url":"https://github.com/docker/swarmkit/pull/2090.diff","patch_url":"https://github.com/docker/swarmkit/pull/2090.patch","issue_url":"https://api.github.com/repos/docker/swarmkit/issues/2090","number":2090,"state":"open","locked":false,"title":"[PROPOSAL] Third Party Resources support","user":{"login":"RenaudWasTaken","id":2519571,"avatar_url":"https://avatars2.githubusercontent.com/u/2519571?v=3","gravatar_id":"","url":"https://api.github.com/users/RenaudWasTaken","html_url":"https://github.com/RenaudWasTaken","followers_url":"https://api.github.com/users/RenaudWasTaken/followers","following_url":"https://api.github.com/users/RenaudWasTaken/following{/other_user}","gists_url":"https://api.github.com/users/RenaudWasTaken/gists{/gist_id}","starred_url":"https://api.github.com/users/RenaudWasTaken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RenaudWasTaken/subscriptions","organizations_url":"https://api.github.com/users/RenaudWasTaken/orgs","repos_url":"https://api.github.com/users/RenaudWasTaken/repos","events_url":"https://api.github.com/users/RenaudWasTaken/events{/privacy}","received_events_url":"https://api.github.com/users/RenaudWasTaken/received_events","type":"User","site_admin":false},"body":"Hi !\r\n\r\nFollowing the different issues that were opened and closed as well as the different\r\npull request which suffered the same fate, I've implemented a way to support Third Party Resources in swarmkit.\r\n\r\nI've described my implementation choices in the following design doc: [Third Party Resources](https://github.com/RenaudWasTaken/swarmkit/blob/tpr/design/third_party_resources.md).\r\n\r\nI've also listed the different issues and PRs that were opened and closed on this subject:\r\n- https://github.com/docker/swarmkit/issues/594\r\n- https://github.com/docker/swarm/issues/2223\r\n- https://github.com/docker/swarmkit/issues/1244\r\n- https://github.com/docker/swarmkit/issues/211\r\n- https://github.com/docker/docker/issues/23917\r\n- https://github.com/docker/docker/issues/24582\r\n- https://github.com/docker/docker/issues/24750\r\n- https://github.com/docker/docker/issues/28642\r\n- https://github.com/docker/swarmkit/issues/206\r\n- And many more\r\n\r\nI believe the main users involved were:\r\n- @stevvooe \r\n- @aluzzardi\r\n- @justincormack\r\n\r\nThis proposal would solve problems for different resources such as:\r\n- GPUs\r\n- FPGAs\r\n- MICs (Many-Integrated Core, such as Xeon Phi)\r\n- [More here](https://github.com/RenaudWasTaken/swarmkit/blob/tpr/design/third_party_resources.md#use-cases)\r\n- ...\r\n\r\nWould it be possible for you to review this proposal and express your concerns / insights on wether this would fit in swarmkit and if so if my code is the best place ?\r\n\r\nThe naming conventions are also something that would be up for discussion as I don't have a very strong opinion on the current one.\r\n\r\nThanks !","created_at":"2017-04-04T22:07:54Z","updated_at":"2017-04-11T18:13:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7f40b980f98fd5021bf8dc61e8abc5d8f78ec05e","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/docker/swarmkit/pulls/2090/commits","review_comments_url":"https://api.github.com/repos/docker/swarmkit/pulls/2090/comments","review_comment_url":"https://api.github.com/repos/docker/swarmkit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/docker/swarmkit/issues/2090/comments","statuses_url":"https://api.github.com/repos/docker/swarmkit/statuses/7d02943fbf744f9a4083b2bc9654af5bd6e34122","head":{"label":"RenaudWasTaken:tpr","ref":"tpr","sha":"7d02943fbf744f9a4083b2bc9654af5bd6e34122","user":{"login":"RenaudWasTaken","id":2519571,"avatar_url":"https://avatars2.githubusercontent.com/u/2519571?v=3","gravatar_id":"","url":"https://api.github.com/users/RenaudWasTaken","html_url":"https://github.com/RenaudWasTaken","followers_url":"https://api.github.com/users/RenaudWasTaken/followers","following_url":"https://api.github.com/users/RenaudWasTaken/following{/other_user}","gists_url":"https://api.github.com/users/RenaudWasTaken/gists{/gist_id}","starred_url":"https://api.github.com/users/RenaudWasTaken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RenaudWasTaken/subscriptions","organizations_url":"https://api.github.com/users/RenaudWasTaken/orgs","repos_url":"https://api.github.com/users/RenaudWasTaken/repos","events_url":"https://api.github.com/users/RenaudWasTaken/events{/privacy}","received_events_url":"https://api.github.com/users/RenaudWasTaken/received_events","type":"User","site_admin":false},"repo":{"id":87229464,"name":"swarmkit","full_name":"RenaudWasTaken/swarmkit","owner":{"login":"RenaudWasTaken","id":2519571,"avatar_url":"https://avatars2.githubusercontent.com/u/2519571?v=3","gravatar_id":"","url":"https://api.github.com/users/RenaudWasTaken","html_url":"https://github.com/RenaudWasTaken","followers_url":"https://api.github.com/users/RenaudWasTaken/followers","following_url":"https://api.github.com/users/RenaudWasTaken/following{/other_user}","gists_url":"https://api.github.com/users/RenaudWasTaken/gists{/gist_id}","starred_url":"https://api.github.com/users/RenaudWasTaken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RenaudWasTaken/subscriptions","organizations_url":"https://api.github.com/users/RenaudWasTaken/orgs","repos_url":"https://api.github.com/users/RenaudWasTaken/repos","events_url":"https://api.github.com/users/RenaudWasTaken/events{/privacy}","received_events_url":"https://api.github.com/users/RenaudWasTaken/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/RenaudWasTaken/swarmkit","description":"A toolkit for orchestrating distributed systems at any scale. It includes primitives for node discovery, raft-based consensus, task scheduling and more.","fork":true,"url":"https://api.github.com/repos/RenaudWasTaken/swarmkit","forks_url":"https://api.github.com/repos/RenaudWasTaken/swarmkit/forks","keys_url":"https://api.github.com/repos/RenaudWasTaken/swarmkit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RenaudWasTaken/swarmkit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RenaudWasTaken/swarmkit/teams","hooks_url":"https://api.github.com/repos/RenaudWasTaken/swarmkit/hooks","issue_events_url":"https://api.github.com/repos/RenaudWasTaken/swarmkit/issues/events{/number}","events_url":"https://api.github.com/repos/RenaudWasTaken/swarmkit/events","assignees_url":"https://api.github.com/repos/RenaudWasTaken/swarmkit/assignees{/user}","branches_url":"https://api.github.com/repos/RenaudWasTaken/swarmkit/branches{/branch}","tags_url":"https://api.github.com/repos/RenaudWasTaken/swarmkit/tags","blobs_url":"https://api.github.com/repos/RenaudWasTaken/swarmkit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RenaudWasTaken/swarmkit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RenaudWasTaken/swarmkit/git/refs{/sha}","trees_url":"https://api.github.com/repos/RenaudWasTaken/swarmkit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RenaudWasTaken/swarmkit/statuses/{sha}","languages_url":"https://api.github.com/repos/RenaudWasTaken/swarmkit/languages","stargazers_url":"https://api.github.com/repos/RenaudWasTaken/swarmkit/stargazers","contributors_url":"https://api.github.com/repos/RenaudWasTaken/swarmkit/contributors","subscribers_url":"https://api.github.com/repos/RenaudWasTaken/swarmkit/subscribers","subscription_url":"https://api.github.com/repos/RenaudWasTaken/swarmkit/subscription","commits_url":"https://api.github.com/repos/RenaudWasTaken/swarmkit/commits{/sha}","git_commits_url":"https://api.github.com/repos/RenaudWasTaken/swarmkit/git/commits{/sha}","comments_url":"https://api.github.com/repos/RenaudWasTaken/swarmkit/comments{/number}","issue_comment_url":"https://api.github.com/repos/RenaudWasTaken/swarmkit/issues/comments{/number}","contents_url":"https://api.github.com/repos/RenaudWasTaken/swarmkit/contents/{+path}","compare_url":"https://api.github.com/repos/RenaudWasTaken/swarmkit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RenaudWasTaken/swarmkit/merges","archive_url":"https://api.github.com/repos/RenaudWasTaken/swarmkit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RenaudWasTaken/swarmkit/downloads","issues_url":"https://api.github.com/repos/RenaudWasTaken/swarmkit/issues{/number}","pulls_url":"https://api.github.com/repos/RenaudWasTaken/swarmkit/pulls{/number}","milestones_url":"https://api.github.com/repos/RenaudWasTaken/swarmkit/milestones{/number}","notifications_url":"https://api.github.com/repos/RenaudWasTaken/swarmkit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RenaudWasTaken/swarmkit/labels{/name}","releases_url":"https://api.github.com/repos/RenaudWasTaken/swarmkit/releases{/id}","deployments_url":"https://api.github.com/repos/RenaudWasTaken/swarmkit/deployments","created_at":"2017-04-04T20:00:04Z","updated_at":"2017-04-04T20:00:07Z","pushed_at":"2017-04-11T07:52:38Z","git_url":"git://github.com/RenaudWasTaken/swarmkit.git","ssh_url":"git@github.com:RenaudWasTaken/swarmkit.git","clone_url":"https://github.com/RenaudWasTaken/swarmkit.git","svn_url":"https://github.com/RenaudWasTaken/swarmkit","homepage":"","size":15059,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"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":"docker:master","ref":"master","sha":"f2bf2b16054e6efac64f4bc68267e2d7034b2f00","user":{"login":"docker","id":5429470,"avatar_url":"https://avatars2.githubusercontent.com/u/5429470?v=3","gravatar_id":"","url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"repo":{"id":51556828,"name":"swarmkit","full_name":"docker/swarmkit","owner":{"login":"docker","id":5429470,"avatar_url":"https://avatars2.githubusercontent.com/u/5429470?v=3","gravatar_id":"","url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/docker/swarmkit","description":"A toolkit for orchestrating distributed systems at any scale. It includes primitives for node discovery, raft-based consensus, task scheduling and more.","fork":false,"url":"https://api.github.com/repos/docker/swarmkit","forks_url":"https://api.github.com/repos/docker/swarmkit/forks","keys_url":"https://api.github.com/repos/docker/swarmkit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/docker/swarmkit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/docker/swarmkit/teams","hooks_url":"https://api.github.com/repos/docker/swarmkit/hooks","issue_events_url":"https://api.github.com/repos/docker/swarmkit/issues/events{/number}","events_url":"https://api.github.com/repos/docker/swarmkit/events","assignees_url":"https://api.github.com/repos/docker/swarmkit/assignees{/user}","branches_url":"https://api.github.com/repos/docker/swarmkit/branches{/branch}","tags_url":"https://api.github.com/repos/docker/swarmkit/tags","blobs_url":"https://api.github.com/repos/docker/swarmkit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/docker/swarmkit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/docker/swarmkit/git/refs{/sha}","trees_url":"https://api.github.com/repos/docker/swarmkit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/docker/swarmkit/statuses/{sha}","languages_url":"https://api.github.com/repos/docker/swarmkit/languages","stargazers_url":"https://api.github.com/repos/docker/swarmkit/stargazers","contributors_url":"https://api.github.com/repos/docker/swarmkit/contributors","subscribers_url":"https://api.github.com/repos/docker/swarmkit/subscribers","subscription_url":"https://api.github.com/repos/docker/swarmkit/subscription","commits_url":"https://api.github.com/repos/docker/swarmkit/commits{/sha}","git_commits_url":"https://api.github.com/repos/docker/swarmkit/git/commits{/sha}","comments_url":"https://api.github.com/repos/docker/swarmkit/comments{/number}","issue_comment_url":"https://api.github.com/repos/docker/swarmkit/issues/comments{/number}","contents_url":"https://api.github.com/repos/docker/swarmkit/contents/{+path}","compare_url":"https://api.github.com/repos/docker/swarmkit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/docker/swarmkit/merges","archive_url":"https://api.github.com/repos/docker/swarmkit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/docker/swarmkit/downloads","issues_url":"https://api.github.com/repos/docker/swarmkit/issues{/number}","pulls_url":"https://api.github.com/repos/docker/swarmkit/pulls{/number}","milestones_url":"https://api.github.com/repos/docker/swarmkit/milestones{/number}","notifications_url":"https://api.github.com/repos/docker/swarmkit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/docker/swarmkit/labels{/name}","releases_url":"https://api.github.com/repos/docker/swarmkit/releases{/id}","deployments_url":"https://api.github.com/repos/docker/swarmkit/deployments","created_at":"2016-02-12T00:02:15Z","updated_at":"2017-04-09T03:29:46Z","pushed_at":"2017-04-11T14:09:48Z","git_url":"git://github.com/docker/swarmkit.git","ssh_url":"git@github.com:docker/swarmkit.git","clone_url":"https://github.com/docker/swarmkit.git","svn_url":"https://github.com/docker/swarmkit","homepage":"","size":15014,"stargazers_count":1230,"watchers_count":1230,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":250,"mirror_url":null,"open_issues_count":170,"forks":250,"open_issues":170,"watchers":1230,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/docker/swarmkit/pulls/2090"},"html":{"href":"https://github.com/docker/swarmkit/pull/2090"},"issue":{"href":"https://api.github.com/repos/docker/swarmkit/issues/2090"},"comments":{"href":"https://api.github.com/repos/docker/swarmkit/issues/2090/comments"},"review_comments":{"href":"https://api.github.com/repos/docker/swarmkit/pulls/2090/comments"},"review_comment":{"href":"https://api.github.com/repos/docker/swarmkit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/docker/swarmkit/pulls/2090/commits"},"statuses":{"href":"https://api.github.com/repos/docker/swarmkit/statuses/7d02943fbf744f9a4083b2bc9654af5bd6e34122"}}}}
{"actor":{"display_login":"dongluochen"}}