{"action":"created","comment":{"url":"https://api.github.com/repos/containernetworking/cni/pulls/comments/73438664","id":73438664,"diff_hunk":"@@ -77,33 +78,58 @@ Network configuration in JSON format is streamed to the plugin through stdin. Th\n \n ### Result\n \n-Success is indicated by a return code of zero and the following JSON printed to stdout in the case of the ADD command. This should be the same output as was returned by the IPAM plugin (see [IP Allocation](#ip-allocation) for details).\n+Success is indicated by a return code of zero and the following JSON printed to stdout in the case of the ADD command. The `ip` and `dns` items should be the same output as was returned by the IPAM plugin (see [IP Allocation](#ip-allocation) for details) except that the plugin should fill in the `interface` indexes appropriately, which are missing from IPAM plugin output since IPAM plugins should be unaware of interfaces.\n \n ```\n {\n   \"cniVersion\": \"0.1.0\",\n-  \"ip4\": {\n-    \"ip\": <ipv4-and-subnet-in-CIDR>,\n-    \"gateway\": <ipv4-of-the-gateway>,  (optional)\n-    \"routes\": <list-of-ipv4-routes>    (optional)\n-  },\n-  \"ip6\": {\n-    \"ip\": <ipv6-and-subnet-in-CIDR>,\n-    \"gateway\": <ipv6-of-the-gateway>,  (optional)\n-    \"routes\": <list-of-ipv6-routes>    (optional)\n-  },\n+  \"interfaces\": [","path":"SPEC.md","position":39,"original_position":39,"commit_id":"7bec213634540225506324885c47e31f2846b7e7","original_commit_id":"7bec213634540225506324885c47e31f2846b7e7","user":{"login":"eyakubovich","id":3586053,"avatar_url":"https://avatars.githubusercontent.com/u/3586053?v=3","gravatar_id":"","url":"https://api.github.com/users/eyakubovich","html_url":"https://github.com/eyakubovich","followers_url":"https://api.github.com/users/eyakubovich/followers","following_url":"https://api.github.com/users/eyakubovich/following{/other_user}","gists_url":"https://api.github.com/users/eyakubovich/gists{/gist_id}","starred_url":"https://api.github.com/users/eyakubovich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eyakubovich/subscriptions","organizations_url":"https://api.github.com/users/eyakubovich/orgs","repos_url":"https://api.github.com/users/eyakubovich/repos","events_url":"https://api.github.com/users/eyakubovich/events{/privacy}","received_events_url":"https://api.github.com/users/eyakubovich/received_events","type":"User","site_admin":false},"body":"I'm unclear how this is going to be used by the container engine (the thing invoking CNI). The interface that is inside the container (one with `sandbox=<netns>`) is quite well-defined. But what about the rest of them? Sounds like another one would be the \"host end\". But there's no way to tell what this \"host end\" is for, its role or how it's connected to other components (e.g. `linux-bridge` or `ovs`). Or what happens in case of macvlan, ipvlan, ovs internal port, etc -- these things don't really have a host end.\r\n\r\nSo if I'm writing a container engine and invoking CNI plugin, what can I do with this information, provided that I don't know if it'll be there or not? Or if it is there, what can be done with that end. I guess it sounds like this is special casing `veth` interfaces and thus leaks the abstraction.","created_at":"2016-08-03T23:15:48Z","updated_at":"2016-08-03T23:15:48Z","html_url":"https://github.com/containernetworking/cni/pull/145#discussion_r73438664","pull_request_url":"https://api.github.com/repos/containernetworking/cni/pulls/145","_links":{"self":{"href":"https://api.github.com/repos/containernetworking/cni/pulls/comments/73438664"},"html":{"href":"https://github.com/containernetworking/cni/pull/145#discussion_r73438664"},"pull_request":{"href":"https://api.github.com/repos/containernetworking/cni/pulls/145"}}},"pull_request":{"url":"https://api.github.com/repos/containernetworking/cni/pulls/145","id":61450909,"html_url":"https://github.com/containernetworking/cni/pull/145","diff_url":"https://github.com/containernetworking/cni/pull/145.diff","patch_url":"https://github.com/containernetworking/cni/pull/145.patch","issue_url":"https://api.github.com/repos/containernetworking/cni/issues/145","number":145,"state":"open","locked":false,"title":"Pass interface name and MAC back to runtime","user":{"login":"dcbw","id":10926354,"avatar_url":"https://avatars.githubusercontent.com/u/10926354?v=3","gravatar_id":"","url":"https://api.github.com/users/dcbw","html_url":"https://github.com/dcbw","followers_url":"https://api.github.com/users/dcbw/followers","following_url":"https://api.github.com/users/dcbw/following{/other_user}","gists_url":"https://api.github.com/users/dcbw/gists{/gist_id}","starred_url":"https://api.github.com/users/dcbw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcbw/subscriptions","organizations_url":"https://api.github.com/users/dcbw/orgs","repos_url":"https://api.github.com/users/dcbw/repos","events_url":"https://api.github.com/users/dcbw/events{/privacy}","received_events_url":"https://api.github.com/users/dcbw/received_events","type":"User","site_admin":false},"body":"Add the infrastructure to pass interface names back from the plugin to the runtime.  This lays the groundwork for letting runtimes not pass CNI_IFNAME and allowing plugins to determine that themsevles.  This should be backwards compatible; if the runtime sends CNI_IFNAME then plugins must honor that and return an error if they cannot.  If the runtime does not send CNI_IFNAME, the plugins currently default to 'eth0'.\r\n\r\nExample output:\r\n\r\n```\r\n{\r\n    \"interface\": {\r\n        \"hostIfname\": \"veth511119b6\",\r\n        \"hostMac\": \"56:95:eb:4c:a0:91\",\r\n        \"containerIfname\": \"eth0\",\r\n        \"containerMac\": \"6a:1f:52:95:86:2c\"\r\n    },\r\n    \"ip4\": {\r\n        \"ip\": \"10.1.0.152/24\",\r\n        \"gateway\": \"10.1.0.1\",\r\n        \"routes\": [\r\n            {\r\n                \"dst\": \"0.0.0.0/0\"\r\n            }\r\n        ]\r\n    },\r\n    \"dns\": {}\r\n```","created_at":"2016-03-02T19:12:29Z","updated_at":"2016-08-03T23:15:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1607363791302d35d59b8893f3ad60a8d3acfd69","assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/containernetworking/cni/milestones/4","html_url":"https://github.com/containernetworking/cni/milestones/v0.4.0","labels_url":"https://api.github.com/repos/containernetworking/cni/milestones/4/labels","id":1772451,"number":4,"title":"v0.4.0","description":"","creator":{"login":"steveeJ","id":1181362,"avatar_url":"https://avatars.githubusercontent.com/u/1181362?v=3","gravatar_id":"","url":"https://api.github.com/users/steveeJ","html_url":"https://github.com/steveeJ","followers_url":"https://api.github.com/users/steveeJ/followers","following_url":"https://api.github.com/users/steveeJ/following{/other_user}","gists_url":"https://api.github.com/users/steveeJ/gists{/gist_id}","starred_url":"https://api.github.com/users/steveeJ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steveeJ/subscriptions","organizations_url":"https://api.github.com/users/steveeJ/orgs","repos_url":"https://api.github.com/users/steveeJ/repos","events_url":"https://api.github.com/users/steveeJ/events{/privacy}","received_events_url":"https://api.github.com/users/steveeJ/received_events","type":"User","site_admin":false},"open_issues":11,"closed_issues":8,"state":"open","created_at":"2016-05-17T19:26:29Z","updated_at":"2016-08-03T21:05:47Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/containernetworking/cni/pulls/145/commits","review_comments_url":"https://api.github.com/repos/containernetworking/cni/pulls/145/comments","review_comment_url":"https://api.github.com/repos/containernetworking/cni/pulls/comments{/number}","comments_url":"https://api.github.com/repos/containernetworking/cni/issues/145/comments","statuses_url":"https://api.github.com/repos/containernetworking/cni/statuses/7bec213634540225506324885c47e31f2846b7e7","head":{"label":"dcbw:pass-ifname-back","ref":"pass-ifname-back","sha":"7bec213634540225506324885c47e31f2846b7e7","user":{"login":"dcbw","id":10926354,"avatar_url":"https://avatars.githubusercontent.com/u/10926354?v=3","gravatar_id":"","url":"https://api.github.com/users/dcbw","html_url":"https://github.com/dcbw","followers_url":"https://api.github.com/users/dcbw/followers","following_url":"https://api.github.com/users/dcbw/following{/other_user}","gists_url":"https://api.github.com/users/dcbw/gists{/gist_id}","starred_url":"https://api.github.com/users/dcbw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcbw/subscriptions","organizations_url":"https://api.github.com/users/dcbw/orgs","repos_url":"https://api.github.com/users/dcbw/repos","events_url":"https://api.github.com/users/dcbw/events{/privacy}","received_events_url":"https://api.github.com/users/dcbw/received_events","type":"User","site_admin":false},"repo":{"id":43167992,"name":"cni","full_name":"dcbw/cni","owner":{"login":"dcbw","id":10926354,"avatar_url":"https://avatars.githubusercontent.com/u/10926354?v=3","gravatar_id":"","url":"https://api.github.com/users/dcbw","html_url":"https://github.com/dcbw","followers_url":"https://api.github.com/users/dcbw/followers","following_url":"https://api.github.com/users/dcbw/following{/other_user}","gists_url":"https://api.github.com/users/dcbw/gists{/gist_id}","starred_url":"https://api.github.com/users/dcbw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcbw/subscriptions","organizations_url":"https://api.github.com/users/dcbw/orgs","repos_url":"https://api.github.com/users/dcbw/repos","events_url":"https://api.github.com/users/dcbw/events{/privacy}","received_events_url":"https://api.github.com/users/dcbw/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dcbw/cni","description":"Container Network Interface","fork":true,"url":"https://api.github.com/repos/dcbw/cni","forks_url":"https://api.github.com/repos/dcbw/cni/forks","keys_url":"https://api.github.com/repos/dcbw/cni/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dcbw/cni/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dcbw/cni/teams","hooks_url":"https://api.github.com/repos/dcbw/cni/hooks","issue_events_url":"https://api.github.com/repos/dcbw/cni/issues/events{/number}","events_url":"https://api.github.com/repos/dcbw/cni/events","assignees_url":"https://api.github.com/repos/dcbw/cni/assignees{/user}","branches_url":"https://api.github.com/repos/dcbw/cni/branches{/branch}","tags_url":"https://api.github.com/repos/dcbw/cni/tags","blobs_url":"https://api.github.com/repos/dcbw/cni/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dcbw/cni/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dcbw/cni/git/refs{/sha}","trees_url":"https://api.github.com/repos/dcbw/cni/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dcbw/cni/statuses/{sha}","languages_url":"https://api.github.com/repos/dcbw/cni/languages","stargazers_url":"https://api.github.com/repos/dcbw/cni/stargazers","contributors_url":"https://api.github.com/repos/dcbw/cni/contributors","subscribers_url":"https://api.github.com/repos/dcbw/cni/subscribers","subscription_url":"https://api.github.com/repos/dcbw/cni/subscription","commits_url":"https://api.github.com/repos/dcbw/cni/commits{/sha}","git_commits_url":"https://api.github.com/repos/dcbw/cni/git/commits{/sha}","comments_url":"https://api.github.com/repos/dcbw/cni/comments{/number}","issue_comment_url":"https://api.github.com/repos/dcbw/cni/issues/comments{/number}","contents_url":"https://api.github.com/repos/dcbw/cni/contents/{+path}","compare_url":"https://api.github.com/repos/dcbw/cni/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dcbw/cni/merges","archive_url":"https://api.github.com/repos/dcbw/cni/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dcbw/cni/downloads","issues_url":"https://api.github.com/repos/dcbw/cni/issues{/number}","pulls_url":"https://api.github.com/repos/dcbw/cni/pulls{/number}","milestones_url":"https://api.github.com/repos/dcbw/cni/milestones{/number}","notifications_url":"https://api.github.com/repos/dcbw/cni/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dcbw/cni/labels{/name}","releases_url":"https://api.github.com/repos/dcbw/cni/releases{/id}","deployments_url":"https://api.github.com/repos/dcbw/cni/deployments","created_at":"2015-09-25T18:22:11Z","updated_at":"2016-05-04T13:17:04Z","pushed_at":"2016-07-27T21:34:10Z","git_url":"git://github.com/dcbw/cni.git","ssh_url":"git@github.com:dcbw/cni.git","clone_url":"https://github.com/dcbw/cni.git","svn_url":"https://github.com/dcbw/cni","homepage":"","size":996,"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":"containernetworking:master","ref":"master","sha":"c1ff202179dc15839825bed39e59d40b1c08a469","user":{"login":"containernetworking","id":18357459,"avatar_url":"https://avatars.githubusercontent.com/u/18357459?v=3","gravatar_id":"","url":"https://api.github.com/users/containernetworking","html_url":"https://github.com/containernetworking","followers_url":"https://api.github.com/users/containernetworking/followers","following_url":"https://api.github.com/users/containernetworking/following{/other_user}","gists_url":"https://api.github.com/users/containernetworking/gists{/gist_id}","starred_url":"https://api.github.com/users/containernetworking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/containernetworking/subscriptions","organizations_url":"https://api.github.com/users/containernetworking/orgs","repos_url":"https://api.github.com/users/containernetworking/repos","events_url":"https://api.github.com/users/containernetworking/events{/privacy}","received_events_url":"https://api.github.com/users/containernetworking/received_events","type":"Organization","site_admin":false},"repo":{"id":33429211,"name":"cni","full_name":"containernetworking/cni","owner":{"login":"containernetworking","id":18357459,"avatar_url":"https://avatars.githubusercontent.com/u/18357459?v=3","gravatar_id":"","url":"https://api.github.com/users/containernetworking","html_url":"https://github.com/containernetworking","followers_url":"https://api.github.com/users/containernetworking/followers","following_url":"https://api.github.com/users/containernetworking/following{/other_user}","gists_url":"https://api.github.com/users/containernetworking/gists{/gist_id}","starred_url":"https://api.github.com/users/containernetworking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/containernetworking/subscriptions","organizations_url":"https://api.github.com/users/containernetworking/orgs","repos_url":"https://api.github.com/users/containernetworking/repos","events_url":"https://api.github.com/users/containernetworking/events{/privacy}","received_events_url":"https://api.github.com/users/containernetworking/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/containernetworking/cni","description":"Container Network Interface - networking for Linux containers","fork":false,"url":"https://api.github.com/repos/containernetworking/cni","forks_url":"https://api.github.com/repos/containernetworking/cni/forks","keys_url":"https://api.github.com/repos/containernetworking/cni/keys{/key_id}","collaborators_url":"https://api.github.com/repos/containernetworking/cni/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/containernetworking/cni/teams","hooks_url":"https://api.github.com/repos/containernetworking/cni/hooks","issue_events_url":"https://api.github.com/repos/containernetworking/cni/issues/events{/number}","events_url":"https://api.github.com/repos/containernetworking/cni/events","assignees_url":"https://api.github.com/repos/containernetworking/cni/assignees{/user}","branches_url":"https://api.github.com/repos/containernetworking/cni/branches{/branch}","tags_url":"https://api.github.com/repos/containernetworking/cni/tags","blobs_url":"https://api.github.com/repos/containernetworking/cni/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/containernetworking/cni/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/containernetworking/cni/git/refs{/sha}","trees_url":"https://api.github.com/repos/containernetworking/cni/git/trees{/sha}","statuses_url":"https://api.github.com/repos/containernetworking/cni/statuses/{sha}","languages_url":"https://api.github.com/repos/containernetworking/cni/languages","stargazers_url":"https://api.github.com/repos/containernetworking/cni/stargazers","contributors_url":"https://api.github.com/repos/containernetworking/cni/contributors","subscribers_url":"https://api.github.com/repos/containernetworking/cni/subscribers","subscription_url":"https://api.github.com/repos/containernetworking/cni/subscription","commits_url":"https://api.github.com/repos/containernetworking/cni/commits{/sha}","git_commits_url":"https://api.github.com/repos/containernetworking/cni/git/commits{/sha}","comments_url":"https://api.github.com/repos/containernetworking/cni/comments{/number}","issue_comment_url":"https://api.github.com/repos/containernetworking/cni/issues/comments{/number}","contents_url":"https://api.github.com/repos/containernetworking/cni/contents/{+path}","compare_url":"https://api.github.com/repos/containernetworking/cni/compare/{base}...{head}","merges_url":"https://api.github.com/repos/containernetworking/cni/merges","archive_url":"https://api.github.com/repos/containernetworking/cni/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/containernetworking/cni/downloads","issues_url":"https://api.github.com/repos/containernetworking/cni/issues{/number}","pulls_url":"https://api.github.com/repos/containernetworking/cni/pulls{/number}","milestones_url":"https://api.github.com/repos/containernetworking/cni/milestones{/number}","notifications_url":"https://api.github.com/repos/containernetworking/cni/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/containernetworking/cni/labels{/name}","releases_url":"https://api.github.com/repos/containernetworking/cni/releases{/id}","deployments_url":"https://api.github.com/repos/containernetworking/cni/deployments","created_at":"2015-04-05T03:35:49Z","updated_at":"2016-08-03T20:43:12Z","pushed_at":"2016-08-02T21:43:44Z","git_url":"git://github.com/containernetworking/cni.git","ssh_url":"git@github.com:containernetworking/cni.git","clone_url":"https://github.com/containernetworking/cni.git","svn_url":"https://github.com/containernetworking/cni","homepage":"","size":2994,"stargazers_count":237,"watchers_count":237,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":72,"mirror_url":null,"open_issues_count":73,"forks":72,"open_issues":73,"watchers":237,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/containernetworking/cni/pulls/145"},"html":{"href":"https://github.com/containernetworking/cni/pull/145"},"issue":{"href":"https://api.github.com/repos/containernetworking/cni/issues/145"},"comments":{"href":"https://api.github.com/repos/containernetworking/cni/issues/145/comments"},"review_comments":{"href":"https://api.github.com/repos/containernetworking/cni/pulls/145/comments"},"review_comment":{"href":"https://api.github.com/repos/containernetworking/cni/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/containernetworking/cni/pulls/145/commits"},"statuses":{"href":"https://api.github.com/repos/containernetworking/cni/statuses/7bec213634540225506324885c47e31f2846b7e7"}}}}
{"actor":{"display_login":"eyakubovich"}}