{"action":"created","comment":{"url":"https://api.github.com/repos/docker/libnetwork/pulls/comments/37314647","id":37314647,"diff_hunk":"@@ -0,0 +1,488 @@\n+package libnetwork\n+\n+import (\n+\t\"container/heap\"\n+\t\"encoding/json\"\n+\t\"fmt\"\n+\t\"sync\"\n+\n+\t\"github.com/Sirupsen/logrus\"\n+\t\"github.com/docker/libnetwork/sandbox\"\n+\t\"github.com/docker/libnetwork/types\"\n+)\n+\n+// Sandbox provides the control over the network container entity. It is a one to one mapping with the container.\n+type Sandbox interface {\n+\t// Info returns the info regarding this container.\n+\tInfo() SandboxInfo\n+\t// Delete destroys this container after detaching it from all connected endpoints.\n+\tDelete() error\n+}\n+\n+// SandboxInfo provides an interface to retrieve the info about the sandbox.\n+type SandboxInfo interface {","path":"sandbox.go","position":23,"original_position":23,"commit_id":"4724abebf1981016e7b6a646430c17ccdf6d3a4a","original_commit_id":"4724abebf1981016e7b6a646430c17ccdf6d3a4a","user":{"login":"aboch","id":10080882,"avatar_url":"https://avatars.githubusercontent.com/u/10080882?v=3","gravatar_id":"","url":"https://api.github.com/users/aboch","html_url":"https://github.com/aboch","followers_url":"https://api.github.com/users/aboch/followers","following_url":"https://api.github.com/users/aboch/following{/other_user}","gists_url":"https://api.github.com/users/aboch/gists{/gist_id}","starred_url":"https://api.github.com/users/aboch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aboch/subscriptions","organizations_url":"https://api.github.com/users/aboch/orgs","repos_url":"https://api.github.com/users/aboch/repos","events_url":"https://api.github.com/users/aboch/events{/privacy}","received_events_url":"https://api.github.com/users/aboch/received_events","type":"User","site_admin":false},"body":"Actually Endpoint has EndpointInfo as sub interface. I followed the same here. Maybe ID() and Key() could be part of Sandbox but more detailed info like labels and stats I feel they belong to SandboxInfo.","created_at":"2015-08-18T15:43:14Z","updated_at":"2015-08-18T15:43:14Z","html_url":"https://github.com/docker/libnetwork/pull/365#discussion_r37314647","pull_request_url":"https://api.github.com/repos/docker/libnetwork/pulls/365","_links":{"self":{"href":"https://api.github.com/repos/docker/libnetwork/pulls/comments/37314647"},"html":{"href":"https://github.com/docker/libnetwork/pull/365#discussion_r37314647"},"pull_request":{"href":"https://api.github.com/repos/docker/libnetwork/pulls/365"}}},"pull_request":{"url":"https://api.github.com/repos/docker/libnetwork/pulls/365","id":39249728,"html_url":"https://github.com/docker/libnetwork/pull/365","diff_url":"https://github.com/docker/libnetwork/pull/365.diff","patch_url":"https://github.com/docker/libnetwork/pull/365.patch","issue_url":"https://api.github.com/repos/docker/libnetwork/issues/365","number":365,"state":"open","locked":false,"title":"Introduce Sandbox entity","user":{"login":"aboch","id":10080882,"avatar_url":"https://avatars.githubusercontent.com/u/10080882?v=3","gravatar_id":"","url":"https://api.github.com/users/aboch","html_url":"https://github.com/aboch","followers_url":"https://api.github.com/users/aboch/followers","following_url":"https://api.github.com/users/aboch/following{/other_user}","gists_url":"https://api.github.com/users/aboch/gists{/gist_id}","starred_url":"https://api.github.com/users/aboch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aboch/subscriptions","organizations_url":"https://api.github.com/users/aboch/orgs","repos_url":"https://api.github.com/users/aboch/repos","events_url":"https://api.github.com/users/aboch/events{/privacy}","received_events_url":"https://api.github.com/users/aboch/received_events","type":"User","site_admin":false},"body":"- Maps 1 to 1 with container's networking stack\r\n- It holds container's specific nw options which\r\n  before were incorrectly owned by Endpoint.\r\n- Sandbox creation no longer coupled with Endpoint Join,\r\n  sandbox and endpoint have now separate lifecycle.\r\n- LeaveAll naturally replaced by Sandbox.Delete\r\n- New sandbox RSET API will come later\r\n\r\n It addresses point 2 and first part of point 3 in issue #429 \r\n\r\nSigned-off-by: Alessandro Boch <aboch@docker.com>","created_at":"2015-07-06T09:27:43Z","updated_at":"2015-08-18T15:43:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"54404b57631741d0d514217c41d4ca2191b98eef","assignee":null,"milestone":{"url":"https://api.github.com/repos/docker/libnetwork/milestones/4","html_url":"https://github.com/docker/libnetwork/milestones/0.5","labels_url":"https://api.github.com/repos/docker/libnetwork/milestones/4/labels","id":1205437,"number":4,"title":"0.5","description":"","creator":{"login":"dave-tucker","id":3781777,"avatar_url":"https://avatars.githubusercontent.com/u/3781777?v=3","gravatar_id":"","url":"https://api.github.com/users/dave-tucker","html_url":"https://github.com/dave-tucker","followers_url":"https://api.github.com/users/dave-tucker/followers","following_url":"https://api.github.com/users/dave-tucker/following{/other_user}","gists_url":"https://api.github.com/users/dave-tucker/gists{/gist_id}","starred_url":"https://api.github.com/users/dave-tucker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dave-tucker/subscriptions","organizations_url":"https://api.github.com/users/dave-tucker/orgs","repos_url":"https://api.github.com/users/dave-tucker/repos","events_url":"https://api.github.com/users/dave-tucker/events{/privacy}","received_events_url":"https://api.github.com/users/dave-tucker/received_events","type":"User","site_admin":false},"open_issues":24,"closed_issues":6,"state":"open","created_at":"2015-07-13T16:24:41Z","updated_at":"2015-08-13T22:28:46Z","due_on":"2015-10-05T23:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/docker/libnetwork/pulls/365/commits","review_comments_url":"https://api.github.com/repos/docker/libnetwork/pulls/365/comments","review_comment_url":"https://api.github.com/repos/docker/libnetwork/pulls/comments{/number}","comments_url":"https://api.github.com/repos/docker/libnetwork/issues/365/comments","statuses_url":"https://api.github.com/repos/docker/libnetwork/statuses/4724abebf1981016e7b6a646430c17ccdf6d3a4a","head":{"label":"aboch:netc","ref":"netc","sha":"4724abebf1981016e7b6a646430c17ccdf6d3a4a","user":{"login":"aboch","id":10080882,"avatar_url":"https://avatars.githubusercontent.com/u/10080882?v=3","gravatar_id":"","url":"https://api.github.com/users/aboch","html_url":"https://github.com/aboch","followers_url":"https://api.github.com/users/aboch/followers","following_url":"https://api.github.com/users/aboch/following{/other_user}","gists_url":"https://api.github.com/users/aboch/gists{/gist_id}","starred_url":"https://api.github.com/users/aboch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aboch/subscriptions","organizations_url":"https://api.github.com/users/aboch/orgs","repos_url":"https://api.github.com/users/aboch/repos","events_url":"https://api.github.com/users/aboch/events{/privacy}","received_events_url":"https://api.github.com/users/aboch/received_events","type":"User","site_admin":false},"repo":{"id":34007834,"name":"libnetwork_new","full_name":"aboch/libnetwork_new","owner":{"login":"aboch","id":10080882,"avatar_url":"https://avatars.githubusercontent.com/u/10080882?v=3","gravatar_id":"","url":"https://api.github.com/users/aboch","html_url":"https://github.com/aboch","followers_url":"https://api.github.com/users/aboch/followers","following_url":"https://api.github.com/users/aboch/following{/other_user}","gists_url":"https://api.github.com/users/aboch/gists{/gist_id}","starred_url":"https://api.github.com/users/aboch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aboch/subscriptions","organizations_url":"https://api.github.com/users/aboch/orgs","repos_url":"https://api.github.com/users/aboch/repos","events_url":"https://api.github.com/users/aboch/events{/privacy}","received_events_url":"https://api.github.com/users/aboch/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aboch/libnetwork_new","description":"networking for containers","fork":true,"url":"https://api.github.com/repos/aboch/libnetwork_new","forks_url":"https://api.github.com/repos/aboch/libnetwork_new/forks","keys_url":"https://api.github.com/repos/aboch/libnetwork_new/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aboch/libnetwork_new/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aboch/libnetwork_new/teams","hooks_url":"https://api.github.com/repos/aboch/libnetwork_new/hooks","issue_events_url":"https://api.github.com/repos/aboch/libnetwork_new/issues/events{/number}","events_url":"https://api.github.com/repos/aboch/libnetwork_new/events","assignees_url":"https://api.github.com/repos/aboch/libnetwork_new/assignees{/user}","branches_url":"https://api.github.com/repos/aboch/libnetwork_new/branches{/branch}","tags_url":"https://api.github.com/repos/aboch/libnetwork_new/tags","blobs_url":"https://api.github.com/repos/aboch/libnetwork_new/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aboch/libnetwork_new/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aboch/libnetwork_new/git/refs{/sha}","trees_url":"https://api.github.com/repos/aboch/libnetwork_new/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aboch/libnetwork_new/statuses/{sha}","languages_url":"https://api.github.com/repos/aboch/libnetwork_new/languages","stargazers_url":"https://api.github.com/repos/aboch/libnetwork_new/stargazers","contributors_url":"https://api.github.com/repos/aboch/libnetwork_new/contributors","subscribers_url":"https://api.github.com/repos/aboch/libnetwork_new/subscribers","subscription_url":"https://api.github.com/repos/aboch/libnetwork_new/subscription","commits_url":"https://api.github.com/repos/aboch/libnetwork_new/commits{/sha}","git_commits_url":"https://api.github.com/repos/aboch/libnetwork_new/git/commits{/sha}","comments_url":"https://api.github.com/repos/aboch/libnetwork_new/comments{/number}","issue_comment_url":"https://api.github.com/repos/aboch/libnetwork_new/issues/comments{/number}","contents_url":"https://api.github.com/repos/aboch/libnetwork_new/contents/{+path}","compare_url":"https://api.github.com/repos/aboch/libnetwork_new/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aboch/libnetwork_new/merges","archive_url":"https://api.github.com/repos/aboch/libnetwork_new/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aboch/libnetwork_new/downloads","issues_url":"https://api.github.com/repos/aboch/libnetwork_new/issues{/number}","pulls_url":"https://api.github.com/repos/aboch/libnetwork_new/pulls{/number}","milestones_url":"https://api.github.com/repos/aboch/libnetwork_new/milestones{/number}","notifications_url":"https://api.github.com/repos/aboch/libnetwork_new/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aboch/libnetwork_new/labels{/name}","releases_url":"https://api.github.com/repos/aboch/libnetwork_new/releases{/id}","created_at":"2015-04-15T17:16:09Z","updated_at":"2015-05-03T07:22:06Z","pushed_at":"2015-08-17T20:16:15Z","git_url":"git://github.com/aboch/libnetwork_new.git","ssh_url":"git@github.com:aboch/libnetwork_new.git","clone_url":"https://github.com/aboch/libnetwork_new.git","svn_url":"https://github.com/aboch/libnetwork_new","homepage":"","size":5538,"stargazers_count":0,"watchers_count":0,"language":"Go","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":"docker:master","ref":"master","sha":"54a2ee8e5859cfd26c8c07e9938349e1bf9370a8","user":{"login":"docker","id":5429470,"avatar_url":"https://avatars.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":31046054,"name":"libnetwork","full_name":"docker/libnetwork","owner":{"login":"docker","id":5429470,"avatar_url":"https://avatars.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/libnetwork","description":"networking for containers","fork":false,"url":"https://api.github.com/repos/docker/libnetwork","forks_url":"https://api.github.com/repos/docker/libnetwork/forks","keys_url":"https://api.github.com/repos/docker/libnetwork/keys{/key_id}","collaborators_url":"https://api.github.com/repos/docker/libnetwork/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/docker/libnetwork/teams","hooks_url":"https://api.github.com/repos/docker/libnetwork/hooks","issue_events_url":"https://api.github.com/repos/docker/libnetwork/issues/events{/number}","events_url":"https://api.github.com/repos/docker/libnetwork/events","assignees_url":"https://api.github.com/repos/docker/libnetwork/assignees{/user}","branches_url":"https://api.github.com/repos/docker/libnetwork/branches{/branch}","tags_url":"https://api.github.com/repos/docker/libnetwork/tags","blobs_url":"https://api.github.com/repos/docker/libnetwork/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/docker/libnetwork/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/docker/libnetwork/git/refs{/sha}","trees_url":"https://api.github.com/repos/docker/libnetwork/git/trees{/sha}","statuses_url":"https://api.github.com/repos/docker/libnetwork/statuses/{sha}","languages_url":"https://api.github.com/repos/docker/libnetwork/languages","stargazers_url":"https://api.github.com/repos/docker/libnetwork/stargazers","contributors_url":"https://api.github.com/repos/docker/libnetwork/contributors","subscribers_url":"https://api.github.com/repos/docker/libnetwork/subscribers","subscription_url":"https://api.github.com/repos/docker/libnetwork/subscription","commits_url":"https://api.github.com/repos/docker/libnetwork/commits{/sha}","git_commits_url":"https://api.github.com/repos/docker/libnetwork/git/commits{/sha}","comments_url":"https://api.github.com/repos/docker/libnetwork/comments{/number}","issue_comment_url":"https://api.github.com/repos/docker/libnetwork/issues/comments{/number}","contents_url":"https://api.github.com/repos/docker/libnetwork/contents/{+path}","compare_url":"https://api.github.com/repos/docker/libnetwork/compare/{base}...{head}","merges_url":"https://api.github.com/repos/docker/libnetwork/merges","archive_url":"https://api.github.com/repos/docker/libnetwork/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/docker/libnetwork/downloads","issues_url":"https://api.github.com/repos/docker/libnetwork/issues{/number}","pulls_url":"https://api.github.com/repos/docker/libnetwork/pulls{/number}","milestones_url":"https://api.github.com/repos/docker/libnetwork/milestones{/number}","notifications_url":"https://api.github.com/repos/docker/libnetwork/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/docker/libnetwork/labels{/name}","releases_url":"https://api.github.com/repos/docker/libnetwork/releases{/id}","created_at":"2015-02-20T01:20:15Z","updated_at":"2015-08-17T12:17:12Z","pushed_at":"2015-08-18T10:03:20Z","git_url":"git://github.com/docker/libnetwork.git","ssh_url":"git@github.com:docker/libnetwork.git","clone_url":"https://github.com/docker/libnetwork.git","svn_url":"https://github.com/docker/libnetwork","homepage":"","size":10841,"stargazers_count":409,"watchers_count":409,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":135,"mirror_url":null,"open_issues_count":69,"forks":135,"open_issues":69,"watchers":409,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/docker/libnetwork/pulls/365"},"html":{"href":"https://github.com/docker/libnetwork/pull/365"},"issue":{"href":"https://api.github.com/repos/docker/libnetwork/issues/365"},"comments":{"href":"https://api.github.com/repos/docker/libnetwork/issues/365/comments"},"review_comments":{"href":"https://api.github.com/repos/docker/libnetwork/pulls/365/comments"},"review_comment":{"href":"https://api.github.com/repos/docker/libnetwork/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/docker/libnetwork/pulls/365/commits"},"statuses":{"href":"https://api.github.com/repos/docker/libnetwork/statuses/4724abebf1981016e7b6a646430c17ccdf6d3a4a"}}}}