{"action":"created","comment":{"url":"https://api.github.com/repos/vmware/vic/pulls/comments/58575935","id":58575935,"diff_hunk":"@@ -284,6 +288,21 @@ func (c *Container) dockerContainerCreateParamsToPortlayer(cc types.ContainerCre\n \tportLayerConfig.CreateConfig.NetworkDisabled = new(bool)\n \t*portLayerConfig.CreateConfig.NetworkDisabled = cc.Config.NetworkDisabled\n \n+\tif !cc.Config.NetworkDisabled {\n+\t\tnc := &models.NetworkConfig{\n+\t\t\tNetworkName: cc.HostConfig.NetworkMode.NetworkName(),\n+\t\t}\n+\t\tif cc.NetworkingConfig != nil {\n+\t\t\tif es, ok := cc.NetworkingConfig.EndpointsConfig[nc.NetworkName]; ok {\n+\t\t\t\tif es.IPAMConfig != nil {\n+\t\t\t\t\tnc.Address = &es.IPAMConfig.IPv4Address\n+\t\t\t\t}\n+\t\t\t}\n+\t\t}\n+\n+\t\tportLayerConfig.CreateConfig.NetworkSettings = nc","path":"apiservers/engine/backends/container.go","position":27,"original_position":27,"commit_id":"9d4d3ce5eac5dc5e314d5dac1b72adf439a6712e","original_commit_id":"9d4d3ce5eac5dc5e314d5dac1b72adf439a6712e","user":{"login":"fdawg4l","id":4296242,"avatar_url":"https://avatars.githubusercontent.com/u/4296242?v=3","gravatar_id":"","url":"https://api.github.com/users/fdawg4l","html_url":"https://github.com/fdawg4l","followers_url":"https://api.github.com/users/fdawg4l/followers","following_url":"https://api.github.com/users/fdawg4l/following{/other_user}","gists_url":"https://api.github.com/users/fdawg4l/gists{/gist_id}","starred_url":"https://api.github.com/users/fdawg4l/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fdawg4l/subscriptions","organizations_url":"https://api.github.com/users/fdawg4l/orgs","repos_url":"https://api.github.com/users/fdawg4l/repos","events_url":"https://api.github.com/users/fdawg4l/events{/privacy}","received_events_url":"https://api.github.com/users/fdawg4l/received_events","type":"User","site_admin":false},"body":"Consider moving everything after the `if` to a helper.  Then we can test this path without bringing up the full daemon.","created_at":"2016-04-05T17:02:54Z","updated_at":"2016-04-05T17:02:54Z","html_url":"https://github.com/vmware/vic/pull/446#discussion_r58575935","pull_request_url":"https://api.github.com/repos/vmware/vic/pulls/446","_links":{"self":{"href":"https://api.github.com/repos/vmware/vic/pulls/comments/58575935"},"html":{"href":"https://github.com/vmware/vic/pull/446#discussion_r58575935"},"pull_request":{"href":"https://api.github.com/repos/vmware/vic/pulls/446"}}},"pull_request":{"url":"https://api.github.com/repos/vmware/vic/pulls/446","id":65338820,"html_url":"https://github.com/vmware/vic/pull/446","diff_url":"https://github.com/vmware/vic/pull/446.diff","patch_url":"https://github.com/vmware/vic/pull/446.patch","issue_url":"https://api.github.com/repos/vmware/vic/issues/446","number":446,"state":"open","locked":false,"title":"Adding net support to docker create","user":{"login":"hmahmood","id":6599778,"avatar_url":"https://avatars.githubusercontent.com/u/6599778?v=3","gravatar_id":"","url":"https://api.github.com/users/hmahmood","html_url":"https://github.com/hmahmood","followers_url":"https://api.github.com/users/hmahmood/followers","following_url":"https://api.github.com/users/hmahmood/following{/other_user}","gists_url":"https://api.github.com/users/hmahmood/gists{/gist_id}","starred_url":"https://api.github.com/users/hmahmood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmahmood/subscriptions","organizations_url":"https://api.github.com/users/hmahmood/orgs","repos_url":"https://api.github.com/users/hmahmood/repos","events_url":"https://api.github.com/users/hmahmood/events{/privacy}","received_events_url":"https://api.github.com/users/hmahmood/received_events","type":"User","site_admin":false},"body":"Fixes #111 #107 \r\n\r\nAdding net support to docker create\r\nAdding net support to port layer exec create","created_at":"2016-04-05T16:57:21Z","updated_at":"2016-04-05T17:02:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2a81637835540b76e9c1ddbe104af530ce096926","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/vmware/vic/pulls/446/commits","review_comments_url":"https://api.github.com/repos/vmware/vic/pulls/446/comments","review_comment_url":"https://api.github.com/repos/vmware/vic/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vmware/vic/issues/446/comments","statuses_url":"https://api.github.com/repos/vmware/vic/statuses/9d4d3ce5eac5dc5e314d5dac1b72adf439a6712e","head":{"label":"hmahmood:networking","ref":"networking","sha":"9d4d3ce5eac5dc5e314d5dac1b72adf439a6712e","user":{"login":"hmahmood","id":6599778,"avatar_url":"https://avatars.githubusercontent.com/u/6599778?v=3","gravatar_id":"","url":"https://api.github.com/users/hmahmood","html_url":"https://github.com/hmahmood","followers_url":"https://api.github.com/users/hmahmood/followers","following_url":"https://api.github.com/users/hmahmood/following{/other_user}","gists_url":"https://api.github.com/users/hmahmood/gists{/gist_id}","starred_url":"https://api.github.com/users/hmahmood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmahmood/subscriptions","organizations_url":"https://api.github.com/users/hmahmood/orgs","repos_url":"https://api.github.com/users/hmahmood/repos","events_url":"https://api.github.com/users/hmahmood/events{/privacy}","received_events_url":"https://api.github.com/users/hmahmood/received_events","type":"User","site_admin":false},"repo":{"id":55442022,"name":"vic","full_name":"hmahmood/vic","owner":{"login":"hmahmood","id":6599778,"avatar_url":"https://avatars.githubusercontent.com/u/6599778?v=3","gravatar_id":"","url":"https://api.github.com/users/hmahmood","html_url":"https://github.com/hmahmood","followers_url":"https://api.github.com/users/hmahmood/followers","following_url":"https://api.github.com/users/hmahmood/following{/other_user}","gists_url":"https://api.github.com/users/hmahmood/gists{/gist_id}","starred_url":"https://api.github.com/users/hmahmood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmahmood/subscriptions","organizations_url":"https://api.github.com/users/hmahmood/orgs","repos_url":"https://api.github.com/users/hmahmood/repos","events_url":"https://api.github.com/users/hmahmood/events{/privacy}","received_events_url":"https://api.github.com/users/hmahmood/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hmahmood/vic","description":"Integrated containers on vSphere","fork":true,"url":"https://api.github.com/repos/hmahmood/vic","forks_url":"https://api.github.com/repos/hmahmood/vic/forks","keys_url":"https://api.github.com/repos/hmahmood/vic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hmahmood/vic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hmahmood/vic/teams","hooks_url":"https://api.github.com/repos/hmahmood/vic/hooks","issue_events_url":"https://api.github.com/repos/hmahmood/vic/issues/events{/number}","events_url":"https://api.github.com/repos/hmahmood/vic/events","assignees_url":"https://api.github.com/repos/hmahmood/vic/assignees{/user}","branches_url":"https://api.github.com/repos/hmahmood/vic/branches{/branch}","tags_url":"https://api.github.com/repos/hmahmood/vic/tags","blobs_url":"https://api.github.com/repos/hmahmood/vic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hmahmood/vic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hmahmood/vic/git/refs{/sha}","trees_url":"https://api.github.com/repos/hmahmood/vic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hmahmood/vic/statuses/{sha}","languages_url":"https://api.github.com/repos/hmahmood/vic/languages","stargazers_url":"https://api.github.com/repos/hmahmood/vic/stargazers","contributors_url":"https://api.github.com/repos/hmahmood/vic/contributors","subscribers_url":"https://api.github.com/repos/hmahmood/vic/subscribers","subscription_url":"https://api.github.com/repos/hmahmood/vic/subscription","commits_url":"https://api.github.com/repos/hmahmood/vic/commits{/sha}","git_commits_url":"https://api.github.com/repos/hmahmood/vic/git/commits{/sha}","comments_url":"https://api.github.com/repos/hmahmood/vic/comments{/number}","issue_comment_url":"https://api.github.com/repos/hmahmood/vic/issues/comments{/number}","contents_url":"https://api.github.com/repos/hmahmood/vic/contents/{+path}","compare_url":"https://api.github.com/repos/hmahmood/vic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hmahmood/vic/merges","archive_url":"https://api.github.com/repos/hmahmood/vic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hmahmood/vic/downloads","issues_url":"https://api.github.com/repos/hmahmood/vic/issues{/number}","pulls_url":"https://api.github.com/repos/hmahmood/vic/pulls{/number}","milestones_url":"https://api.github.com/repos/hmahmood/vic/milestones{/number}","notifications_url":"https://api.github.com/repos/hmahmood/vic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hmahmood/vic/labels{/name}","releases_url":"https://api.github.com/repos/hmahmood/vic/releases{/id}","deployments_url":"https://api.github.com/repos/hmahmood/vic/deployments","created_at":"2016-04-04T20:21:22Z","updated_at":"2016-04-04T20:21:23Z","pushed_at":"2016-04-05T16:56:17Z","git_url":"git://github.com/hmahmood/vic.git","ssh_url":"git@github.com:hmahmood/vic.git","clone_url":"https://github.com/hmahmood/vic.git","svn_url":"https://github.com/hmahmood/vic","homepage":null,"size":12973,"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":"vmware:master","ref":"master","sha":"4823993b1d4af42c104ae00713365d8b0bf680b9","user":{"login":"vmware","id":473334,"avatar_url":"https://avatars.githubusercontent.com/u/473334?v=3","gravatar_id":"","url":"https://api.github.com/users/vmware","html_url":"https://github.com/vmware","followers_url":"https://api.github.com/users/vmware/followers","following_url":"https://api.github.com/users/vmware/following{/other_user}","gists_url":"https://api.github.com/users/vmware/gists{/gist_id}","starred_url":"https://api.github.com/users/vmware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmware/subscriptions","organizations_url":"https://api.github.com/users/vmware/orgs","repos_url":"https://api.github.com/users/vmware/repos","events_url":"https://api.github.com/users/vmware/events{/privacy}","received_events_url":"https://api.github.com/users/vmware/received_events","type":"Organization","site_admin":false},"repo":{"id":49597898,"name":"vic","full_name":"vmware/vic","owner":{"login":"vmware","id":473334,"avatar_url":"https://avatars.githubusercontent.com/u/473334?v=3","gravatar_id":"","url":"https://api.github.com/users/vmware","html_url":"https://github.com/vmware","followers_url":"https://api.github.com/users/vmware/followers","following_url":"https://api.github.com/users/vmware/following{/other_user}","gists_url":"https://api.github.com/users/vmware/gists{/gist_id}","starred_url":"https://api.github.com/users/vmware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmware/subscriptions","organizations_url":"https://api.github.com/users/vmware/orgs","repos_url":"https://api.github.com/users/vmware/repos","events_url":"https://api.github.com/users/vmware/events{/privacy}","received_events_url":"https://api.github.com/users/vmware/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vmware/vic","description":"Integrated containers on vSphere","fork":false,"url":"https://api.github.com/repos/vmware/vic","forks_url":"https://api.github.com/repos/vmware/vic/forks","keys_url":"https://api.github.com/repos/vmware/vic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vmware/vic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vmware/vic/teams","hooks_url":"https://api.github.com/repos/vmware/vic/hooks","issue_events_url":"https://api.github.com/repos/vmware/vic/issues/events{/number}","events_url":"https://api.github.com/repos/vmware/vic/events","assignees_url":"https://api.github.com/repos/vmware/vic/assignees{/user}","branches_url":"https://api.github.com/repos/vmware/vic/branches{/branch}","tags_url":"https://api.github.com/repos/vmware/vic/tags","blobs_url":"https://api.github.com/repos/vmware/vic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vmware/vic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vmware/vic/git/refs{/sha}","trees_url":"https://api.github.com/repos/vmware/vic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vmware/vic/statuses/{sha}","languages_url":"https://api.github.com/repos/vmware/vic/languages","stargazers_url":"https://api.github.com/repos/vmware/vic/stargazers","contributors_url":"https://api.github.com/repos/vmware/vic/contributors","subscribers_url":"https://api.github.com/repos/vmware/vic/subscribers","subscription_url":"https://api.github.com/repos/vmware/vic/subscription","commits_url":"https://api.github.com/repos/vmware/vic/commits{/sha}","git_commits_url":"https://api.github.com/repos/vmware/vic/git/commits{/sha}","comments_url":"https://api.github.com/repos/vmware/vic/comments{/number}","issue_comment_url":"https://api.github.com/repos/vmware/vic/issues/comments{/number}","contents_url":"https://api.github.com/repos/vmware/vic/contents/{+path}","compare_url":"https://api.github.com/repos/vmware/vic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vmware/vic/merges","archive_url":"https://api.github.com/repos/vmware/vic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vmware/vic/downloads","issues_url":"https://api.github.com/repos/vmware/vic/issues{/number}","pulls_url":"https://api.github.com/repos/vmware/vic/pulls{/number}","milestones_url":"https://api.github.com/repos/vmware/vic/milestones{/number}","notifications_url":"https://api.github.com/repos/vmware/vic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vmware/vic/labels{/name}","releases_url":"https://api.github.com/repos/vmware/vic/releases{/id}","deployments_url":"https://api.github.com/repos/vmware/vic/deployments","created_at":"2016-01-13T19:53:57Z","updated_at":"2016-04-05T14:42:28Z","pushed_at":"2016-04-05T17:01:39Z","git_url":"git://github.com/vmware/vic.git","ssh_url":"git@github.com:vmware/vic.git","clone_url":"https://github.com/vmware/vic.git","svn_url":"https://github.com/vmware/vic","homepage":null,"size":55294,"stargazers_count":41,"watchers_count":41,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":159,"forks":13,"open_issues":159,"watchers":41,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vmware/vic/pulls/446"},"html":{"href":"https://github.com/vmware/vic/pull/446"},"issue":{"href":"https://api.github.com/repos/vmware/vic/issues/446"},"comments":{"href":"https://api.github.com/repos/vmware/vic/issues/446/comments"},"review_comments":{"href":"https://api.github.com/repos/vmware/vic/pulls/446/comments"},"review_comment":{"href":"https://api.github.com/repos/vmware/vic/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vmware/vic/pulls/446/commits"},"statuses":{"href":"https://api.github.com/repos/vmware/vic/statuses/9d4d3ce5eac5dc5e314d5dac1b72adf439a6712e"}}}}