{"action":"created","comment":{"url":"https://api.github.com/repos/docker/libnetwork/pulls/comments/30834551","id":30834551,"diff_hunk":"@@ -167,6 +168,9 @@ func (n *networkNamespace) RemoveInterface(i *Interface) error {\n }\n \n func (n *networkNamespace) AddInterface(i *Interface) error {\n+\tsuffix := fmt.Sprintf(\"%d\", n.nextIfIndex)","path":"sandbox/namespace_linux.go","position":16,"original_position":16,"commit_id":"66510d7bf1c31e6ac6d1a295e9ab7337dccf2365","original_commit_id":"66510d7bf1c31e6ac6d1a295e9ab7337dccf2365","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":"Since you are not using suffix anywhere else, have you considered:\r\n\r\ni.DstName = fmt.Sprintf(\"%s%d\", i.DstName, n.nextIfIndex)\r\n\r\nIf you think it is cleaner as it is now, it's fine too.","created_at":"2015-05-21T18:51:43Z","updated_at":"2015-05-21T18:51:43Z","html_url":"https://github.com/docker/libnetwork/pull/193#discussion_r30834551","pull_request_url":"https://api.github.com/repos/docker/libnetwork/pulls/193","_links":{"self":{"href":"https://api.github.com/repos/docker/libnetwork/pulls/comments/30834551"},"html":{"href":"https://github.com/docker/libnetwork/pull/193#discussion_r30834551"},"pull_request":{"href":"https://api.github.com/repos/docker/libnetwork/pulls/193"}}},"pull_request":{"url":"https://api.github.com/repos/docker/libnetwork/pulls/193","id":35963043,"html_url":"https://github.com/docker/libnetwork/pull/193","diff_url":"https://github.com/docker/libnetwork/pull/193.diff","patch_url":"https://github.com/docker/libnetwork/pull/193.patch","issue_url":"https://api.github.com/repos/docker/libnetwork/issues/193","number":193,"state":"open","locked":false,"title":"Modify driver Join api to only allow dst prefix","user":{"login":"mrjana","id":1693482,"avatar_url":"https://avatars.githubusercontent.com/u/1693482?v=3","gravatar_id":"","url":"https://api.github.com/users/mrjana","html_url":"https://github.com/mrjana","followers_url":"https://api.github.com/users/mrjana/followers","following_url":"https://api.github.com/users/mrjana/following{/other_user}","gists_url":"https://api.github.com/users/mrjana/gists{/gist_id}","starred_url":"https://api.github.com/users/mrjana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrjana/subscriptions","organizations_url":"https://api.github.com/users/mrjana/orgs","repos_url":"https://api.github.com/users/mrjana/repos","events_url":"https://api.github.com/users/mrjana/events{/privacy}","received_events_url":"https://api.github.com/users/mrjana/received_events","type":"User","site_admin":false},"body":"Currently the driver api allows the driver to specify the\r\nfull interface name for the interface inside the container.\r\nThis is not appropriate since the driver does not have the full\r\nview of the sandbox to correcly allocate an unambiguous interface\r\nname. Instead with this PR the driver will be allowed to specify\r\na prefix for the name and libnetwork and sandbox layers will\r\ndisambiguate it with an appropriate suffix.\r\n\r\nSigned-off-by: Jana Radhakrishnan <mrjana@docker.com>","created_at":"2015-05-21T18:27:13Z","updated_at":"2015-05-21T18:51:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"67d4ab8741a48b69a723d407c71c8ecd0eb2e2da","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/docker/libnetwork/pulls/193/commits","review_comments_url":"https://api.github.com/repos/docker/libnetwork/pulls/193/comments","review_comment_url":"https://api.github.com/repos/docker/libnetwork/pulls/comments{/number}","comments_url":"https://api.github.com/repos/docker/libnetwork/issues/193/comments","statuses_url":"https://api.github.com/repos/docker/libnetwork/statuses/66510d7bf1c31e6ac6d1a295e9ab7337dccf2365","head":{"label":"mrjana:cnm","ref":"cnm","sha":"66510d7bf1c31e6ac6d1a295e9ab7337dccf2365","user":{"login":"mrjana","id":1693482,"avatar_url":"https://avatars.githubusercontent.com/u/1693482?v=3","gravatar_id":"","url":"https://api.github.com/users/mrjana","html_url":"https://github.com/mrjana","followers_url":"https://api.github.com/users/mrjana/followers","following_url":"https://api.github.com/users/mrjana/following{/other_user}","gists_url":"https://api.github.com/users/mrjana/gists{/gist_id}","starred_url":"https://api.github.com/users/mrjana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrjana/subscriptions","organizations_url":"https://api.github.com/users/mrjana/orgs","repos_url":"https://api.github.com/users/mrjana/repos","events_url":"https://api.github.com/users/mrjana/events{/privacy}","received_events_url":"https://api.github.com/users/mrjana/received_events","type":"User","site_admin":false},"repo":{"id":33910102,"name":"libnetwork","full_name":"mrjana/libnetwork","owner":{"login":"mrjana","id":1693482,"avatar_url":"https://avatars.githubusercontent.com/u/1693482?v=3","gravatar_id":"","url":"https://api.github.com/users/mrjana","html_url":"https://github.com/mrjana","followers_url":"https://api.github.com/users/mrjana/followers","following_url":"https://api.github.com/users/mrjana/following{/other_user}","gists_url":"https://api.github.com/users/mrjana/gists{/gist_id}","starred_url":"https://api.github.com/users/mrjana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrjana/subscriptions","organizations_url":"https://api.github.com/users/mrjana/orgs","repos_url":"https://api.github.com/users/mrjana/repos","events_url":"https://api.github.com/users/mrjana/events{/privacy}","received_events_url":"https://api.github.com/users/mrjana/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mrjana/libnetwork","description":"networking for containers","fork":true,"url":"https://api.github.com/repos/mrjana/libnetwork","forks_url":"https://api.github.com/repos/mrjana/libnetwork/forks","keys_url":"https://api.github.com/repos/mrjana/libnetwork/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mrjana/libnetwork/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mrjana/libnetwork/teams","hooks_url":"https://api.github.com/repos/mrjana/libnetwork/hooks","issue_events_url":"https://api.github.com/repos/mrjana/libnetwork/issues/events{/number}","events_url":"https://api.github.com/repos/mrjana/libnetwork/events","assignees_url":"https://api.github.com/repos/mrjana/libnetwork/assignees{/user}","branches_url":"https://api.github.com/repos/mrjana/libnetwork/branches{/branch}","tags_url":"https://api.github.com/repos/mrjana/libnetwork/tags","blobs_url":"https://api.github.com/repos/mrjana/libnetwork/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mrjana/libnetwork/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mrjana/libnetwork/git/refs{/sha}","trees_url":"https://api.github.com/repos/mrjana/libnetwork/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mrjana/libnetwork/statuses/{sha}","languages_url":"https://api.github.com/repos/mrjana/libnetwork/languages","stargazers_url":"https://api.github.com/repos/mrjana/libnetwork/stargazers","contributors_url":"https://api.github.com/repos/mrjana/libnetwork/contributors","subscribers_url":"https://api.github.com/repos/mrjana/libnetwork/subscribers","subscription_url":"https://api.github.com/repos/mrjana/libnetwork/subscription","commits_url":"https://api.github.com/repos/mrjana/libnetwork/commits{/sha}","git_commits_url":"https://api.github.com/repos/mrjana/libnetwork/git/commits{/sha}","comments_url":"https://api.github.com/repos/mrjana/libnetwork/comments{/number}","issue_comment_url":"https://api.github.com/repos/mrjana/libnetwork/issues/comments{/number}","contents_url":"https://api.github.com/repos/mrjana/libnetwork/contents/{+path}","compare_url":"https://api.github.com/repos/mrjana/libnetwork/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mrjana/libnetwork/merges","archive_url":"https://api.github.com/repos/mrjana/libnetwork/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mrjana/libnetwork/downloads","issues_url":"https://api.github.com/repos/mrjana/libnetwork/issues{/number}","pulls_url":"https://api.github.com/repos/mrjana/libnetwork/pulls{/number}","milestones_url":"https://api.github.com/repos/mrjana/libnetwork/milestones{/number}","notifications_url":"https://api.github.com/repos/mrjana/libnetwork/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mrjana/libnetwork/labels{/name}","releases_url":"https://api.github.com/repos/mrjana/libnetwork/releases{/id}","created_at":"2015-04-14T04:08:13Z","updated_at":"2015-04-17T04:44:34Z","pushed_at":"2015-05-21T18:25:22Z","git_url":"git://github.com/mrjana/libnetwork.git","ssh_url":"git@github.com:mrjana/libnetwork.git","clone_url":"https://github.com/mrjana/libnetwork.git","svn_url":"https://github.com/mrjana/libnetwork","homepage":"","size":946,"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":"6a48128ebcf14e21301f1c7e3bdf49c84dc726a8","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-05-21T17:25:21Z","pushed_at":"2015-05-21T18:32:57Z","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":6211,"stargazers_count":220,"watchers_count":220,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":54,"mirror_url":null,"open_issues_count":35,"forks":54,"open_issues":35,"watchers":220,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/docker/libnetwork/pulls/193"},"html":{"href":"https://github.com/docker/libnetwork/pull/193"},"issue":{"href":"https://api.github.com/repos/docker/libnetwork/issues/193"},"comments":{"href":"https://api.github.com/repos/docker/libnetwork/issues/193/comments"},"review_comments":{"href":"https://api.github.com/repos/docker/libnetwork/pulls/193/comments"},"review_comment":{"href":"https://api.github.com/repos/docker/libnetwork/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/docker/libnetwork/pulls/193/commits"},"statuses":{"href":"https://api.github.com/repos/docker/libnetwork/statuses/66510d7bf1c31e6ac6d1a295e9ab7337dccf2365"}}}}