{"action":"created","comment":{"url":"https://api.github.com/repos/mesosphere/marathon/pulls/comments/73151288","id":73151288,"diff_hunk":"@@ -3,25 +3,26 @@ package mesosphere.marathon.state\n import com.wix.accord.dsl._\n import com.wix.accord._\n import mesosphere.marathon.api.v2.Validation._\n-import org.apache.mesos.{ Protos => Mesos }\n+\n+import org.apache.mesos.Protos.ContainerInfo\n+\n import scala.collection.immutable.Seq\n \n-// TODO: trait Container and specializations?\n-// Current implementation with type defaulting to DOCKER and docker to NONE makes no sense\n-case class Container(\n-    `type`: Mesos.ContainerInfo.Type = Mesos.ContainerInfo.Type.DOCKER,\n-    volumes: Seq[Volume] = Nil,\n-    docker: Option[Container.Docker] = None) {\n+sealed trait Container {\n+  val volumes: Seq[Volume]\n \n-  import Container._\n+  def docker(): Option[Container.Docker] = {\n+    this match {\n+      case docker: Container.Docker => Some(docker)\n+      case _ => None\n+    }\n+  }\n \n-  def portMappings: Option[Seq[Docker.PortMapping]] = {\n-    import Mesos.ContainerInfo.DockerInfo.Network\n+  def portMappings: Option[Seq[Container.Docker.PortMapping]] = {","path":"src/main/scala/mesosphere/marathon/state/Container.scala","position":29,"original_position":29,"commit_id":"18ac74e8dcc16279ede1bbcedb554234fb57567d","original_commit_id":"18ac74e8dcc16279ede1bbcedb554234fb57567d","user":{"login":"aquamatthias","id":330485,"avatar_url":"https://avatars.githubusercontent.com/u/330485?v=3","gravatar_id":"","url":"https://api.github.com/users/aquamatthias","html_url":"https://github.com/aquamatthias","followers_url":"https://api.github.com/users/aquamatthias/followers","following_url":"https://api.github.com/users/aquamatthias/following{/other_user}","gists_url":"https://api.github.com/users/aquamatthias/gists{/gist_id}","starred_url":"https://api.github.com/users/aquamatthias/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aquamatthias/subscriptions","organizations_url":"https://api.github.com/users/aquamatthias/orgs","repos_url":"https://api.github.com/users/aquamatthias/repos","events_url":"https://api.github.com/users/aquamatthias/events{/privacy}","received_events_url":"https://api.github.com/users/aquamatthias/received_events","type":"User","site_admin":false},"body":"Add validation, that makes sure that portMappings are only valid if network mode is bridge or user","created_at":"2016-08-02T13:11:30Z","updated_at":"2016-08-02T13:11:30Z","html_url":"https://github.com/mesosphere/marathon/pull/4088#discussion_r73151288","pull_request_url":"https://api.github.com/repos/mesosphere/marathon/pulls/4088","_links":{"self":{"href":"https://api.github.com/repos/mesosphere/marathon/pulls/comments/73151288"},"html":{"href":"https://github.com/mesosphere/marathon/pull/4088#discussion_r73151288"},"pull_request":{"href":"https://api.github.com/repos/mesosphere/marathon/pulls/4088"}}},"pull_request":{"url":"https://api.github.com/repos/mesosphere/marathon/pulls/4088","id":77132990,"html_url":"https://github.com/mesosphere/marathon/pull/4088","diff_url":"https://github.com/mesosphere/marathon/pull/4088.diff","patch_url":"https://github.com/mesosphere/marathon/pull/4088.patch","issue_url":"https://api.github.com/repos/mesosphere/marathon/issues/4088","number":4088,"state":"open","locked":false,"title":"Unified Mesos Containerizer support","user":{"login":"bernd-mesos","id":6527195,"avatar_url":"https://avatars.githubusercontent.com/u/6527195?v=3","gravatar_id":"","url":"https://api.github.com/users/bernd-mesos","html_url":"https://github.com/bernd-mesos","followers_url":"https://api.github.com/users/bernd-mesos/followers","following_url":"https://api.github.com/users/bernd-mesos/following{/other_user}","gists_url":"https://api.github.com/users/bernd-mesos/gists{/gist_id}","starred_url":"https://api.github.com/users/bernd-mesos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bernd-mesos/subscriptions","organizations_url":"https://api.github.com/users/bernd-mesos/orgs","repos_url":"https://api.github.com/users/bernd-mesos/repos","events_url":"https://api.github.com/users/bernd-mesos/events{/privacy}","received_events_url":"https://api.github.com/users/bernd-mesos/received_events","type":"User","site_admin":false},"body":"Formerly https://github.com/mesosphere/marathon/pull/4023","created_at":"2016-07-12T14:45:53Z","updated_at":"2016-08-02T13:11:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7faff2a8a62110b729e613eacdcd49f22b93537e","assignee":{"login":"meichstedt","id":414354,"avatar_url":"https://avatars.githubusercontent.com/u/414354?v=3","gravatar_id":"","url":"https://api.github.com/users/meichstedt","html_url":"https://github.com/meichstedt","followers_url":"https://api.github.com/users/meichstedt/followers","following_url":"https://api.github.com/users/meichstedt/following{/other_user}","gists_url":"https://api.github.com/users/meichstedt/gists{/gist_id}","starred_url":"https://api.github.com/users/meichstedt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meichstedt/subscriptions","organizations_url":"https://api.github.com/users/meichstedt/orgs","repos_url":"https://api.github.com/users/meichstedt/repos","events_url":"https://api.github.com/users/meichstedt/events{/privacy}","received_events_url":"https://api.github.com/users/meichstedt/received_events","type":"User","site_admin":false},"assignees":[{"login":"meichstedt","id":414354,"avatar_url":"https://avatars.githubusercontent.com/u/414354?v=3","gravatar_id":"","url":"https://api.github.com/users/meichstedt","html_url":"https://github.com/meichstedt","followers_url":"https://api.github.com/users/meichstedt/followers","following_url":"https://api.github.com/users/meichstedt/following{/other_user}","gists_url":"https://api.github.com/users/meichstedt/gists{/gist_id}","starred_url":"https://api.github.com/users/meichstedt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meichstedt/subscriptions","organizations_url":"https://api.github.com/users/meichstedt/orgs","repos_url":"https://api.github.com/users/meichstedt/repos","events_url":"https://api.github.com/users/meichstedt/events{/privacy}","received_events_url":"https://api.github.com/users/meichstedt/received_events","type":"User","site_admin":false},{"login":"nfnt","id":2085586,"avatar_url":"https://avatars.githubusercontent.com/u/2085586?v=3","gravatar_id":"","url":"https://api.github.com/users/nfnt","html_url":"https://github.com/nfnt","followers_url":"https://api.github.com/users/nfnt/followers","following_url":"https://api.github.com/users/nfnt/following{/other_user}","gists_url":"https://api.github.com/users/nfnt/gists{/gist_id}","starred_url":"https://api.github.com/users/nfnt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nfnt/subscriptions","organizations_url":"https://api.github.com/users/nfnt/orgs","repos_url":"https://api.github.com/users/nfnt/repos","events_url":"https://api.github.com/users/nfnt/events{/privacy}","received_events_url":"https://api.github.com/users/nfnt/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/mesosphere/marathon/milestones/29","html_url":"https://github.com/mesosphere/marathon/milestones/1.2","labels_url":"https://api.github.com/repos/mesosphere/marathon/milestones/29/labels","id":1712993,"number":29,"title":"1.2","description":"","creator":{"login":"aquamatthias","id":330485,"avatar_url":"https://avatars.githubusercontent.com/u/330485?v=3","gravatar_id":"","url":"https://api.github.com/users/aquamatthias","html_url":"https://github.com/aquamatthias","followers_url":"https://api.github.com/users/aquamatthias/followers","following_url":"https://api.github.com/users/aquamatthias/following{/other_user}","gists_url":"https://api.github.com/users/aquamatthias/gists{/gist_id}","starred_url":"https://api.github.com/users/aquamatthias/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aquamatthias/subscriptions","organizations_url":"https://api.github.com/users/aquamatthias/orgs","repos_url":"https://api.github.com/users/aquamatthias/repos","events_url":"https://api.github.com/users/aquamatthias/events{/privacy}","received_events_url":"https://api.github.com/users/aquamatthias/received_events","type":"User","site_admin":false},"open_issues":21,"closed_issues":25,"state":"open","created_at":"2016-04-18T08:15:57Z","updated_at":"2016-08-01T19:46:31Z","due_on":"2016-08-25T22:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/mesosphere/marathon/pulls/4088/commits","review_comments_url":"https://api.github.com/repos/mesosphere/marathon/pulls/4088/comments","review_comment_url":"https://api.github.com/repos/mesosphere/marathon/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mesosphere/marathon/issues/4088/comments","statuses_url":"https://api.github.com/repos/mesosphere/marathon/statuses/18ac74e8dcc16279ede1bbcedb554234fb57567d","head":{"label":"mesosphere:bernd-uc1","ref":"bernd-uc1","sha":"18ac74e8dcc16279ede1bbcedb554234fb57567d","user":{"login":"mesosphere","id":3458585,"avatar_url":"https://avatars.githubusercontent.com/u/3458585?v=3","gravatar_id":"","url":"https://api.github.com/users/mesosphere","html_url":"https://github.com/mesosphere","followers_url":"https://api.github.com/users/mesosphere/followers","following_url":"https://api.github.com/users/mesosphere/following{/other_user}","gists_url":"https://api.github.com/users/mesosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/mesosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mesosphere/subscriptions","organizations_url":"https://api.github.com/users/mesosphere/orgs","repos_url":"https://api.github.com/users/mesosphere/repos","events_url":"https://api.github.com/users/mesosphere/events{/privacy}","received_events_url":"https://api.github.com/users/mesosphere/received_events","type":"Organization","site_admin":false},"repo":{"id":10941409,"name":"marathon","full_name":"mesosphere/marathon","owner":{"login":"mesosphere","id":3458585,"avatar_url":"https://avatars.githubusercontent.com/u/3458585?v=3","gravatar_id":"","url":"https://api.github.com/users/mesosphere","html_url":"https://github.com/mesosphere","followers_url":"https://api.github.com/users/mesosphere/followers","following_url":"https://api.github.com/users/mesosphere/following{/other_user}","gists_url":"https://api.github.com/users/mesosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/mesosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mesosphere/subscriptions","organizations_url":"https://api.github.com/users/mesosphere/orgs","repos_url":"https://api.github.com/users/mesosphere/repos","events_url":"https://api.github.com/users/mesosphere/events{/privacy}","received_events_url":"https://api.github.com/users/mesosphere/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mesosphere/marathon","description":"Deploy and manage containers (including Docker) on top of Apache Mesos at scale.","fork":false,"url":"https://api.github.com/repos/mesosphere/marathon","forks_url":"https://api.github.com/repos/mesosphere/marathon/forks","keys_url":"https://api.github.com/repos/mesosphere/marathon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mesosphere/marathon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mesosphere/marathon/teams","hooks_url":"https://api.github.com/repos/mesosphere/marathon/hooks","issue_events_url":"https://api.github.com/repos/mesosphere/marathon/issues/events{/number}","events_url":"https://api.github.com/repos/mesosphere/marathon/events","assignees_url":"https://api.github.com/repos/mesosphere/marathon/assignees{/user}","branches_url":"https://api.github.com/repos/mesosphere/marathon/branches{/branch}","tags_url":"https://api.github.com/repos/mesosphere/marathon/tags","blobs_url":"https://api.github.com/repos/mesosphere/marathon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mesosphere/marathon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mesosphere/marathon/git/refs{/sha}","trees_url":"https://api.github.com/repos/mesosphere/marathon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mesosphere/marathon/statuses/{sha}","languages_url":"https://api.github.com/repos/mesosphere/marathon/languages","stargazers_url":"https://api.github.com/repos/mesosphere/marathon/stargazers","contributors_url":"https://api.github.com/repos/mesosphere/marathon/contributors","subscribers_url":"https://api.github.com/repos/mesosphere/marathon/subscribers","subscription_url":"https://api.github.com/repos/mesosphere/marathon/subscription","commits_url":"https://api.github.com/repos/mesosphere/marathon/commits{/sha}","git_commits_url":"https://api.github.com/repos/mesosphere/marathon/git/commits{/sha}","comments_url":"https://api.github.com/repos/mesosphere/marathon/comments{/number}","issue_comment_url":"https://api.github.com/repos/mesosphere/marathon/issues/comments{/number}","contents_url":"https://api.github.com/repos/mesosphere/marathon/contents/{+path}","compare_url":"https://api.github.com/repos/mesosphere/marathon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mesosphere/marathon/merges","archive_url":"https://api.github.com/repos/mesosphere/marathon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mesosphere/marathon/downloads","issues_url":"https://api.github.com/repos/mesosphere/marathon/issues{/number}","pulls_url":"https://api.github.com/repos/mesosphere/marathon/pulls{/number}","milestones_url":"https://api.github.com/repos/mesosphere/marathon/milestones{/number}","notifications_url":"https://api.github.com/repos/mesosphere/marathon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mesosphere/marathon/labels{/name}","releases_url":"https://api.github.com/repos/mesosphere/marathon/releases{/id}","deployments_url":"https://api.github.com/repos/mesosphere/marathon/deployments","created_at":"2013-06-25T14:56:34Z","updated_at":"2016-08-01T14:36:21Z","pushed_at":"2016-08-02T12:30:21Z","git_url":"git://github.com/mesosphere/marathon.git","ssh_url":"git@github.com:mesosphere/marathon.git","clone_url":"https://github.com/mesosphere/marathon.git","svn_url":"https://github.com/mesosphere/marathon","homepage":"https://mesosphere.github.io/marathon/","size":28437,"stargazers_count":2684,"watchers_count":2684,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":596,"mirror_url":null,"open_issues_count":623,"forks":596,"open_issues":623,"watchers":2684,"default_branch":"master"}},"base":{"label":"mesosphere:master","ref":"master","sha":"729a95a21e00f098de103e0853fd092af1d0cbce","user":{"login":"mesosphere","id":3458585,"avatar_url":"https://avatars.githubusercontent.com/u/3458585?v=3","gravatar_id":"","url":"https://api.github.com/users/mesosphere","html_url":"https://github.com/mesosphere","followers_url":"https://api.github.com/users/mesosphere/followers","following_url":"https://api.github.com/users/mesosphere/following{/other_user}","gists_url":"https://api.github.com/users/mesosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/mesosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mesosphere/subscriptions","organizations_url":"https://api.github.com/users/mesosphere/orgs","repos_url":"https://api.github.com/users/mesosphere/repos","events_url":"https://api.github.com/users/mesosphere/events{/privacy}","received_events_url":"https://api.github.com/users/mesosphere/received_events","type":"Organization","site_admin":false},"repo":{"id":10941409,"name":"marathon","full_name":"mesosphere/marathon","owner":{"login":"mesosphere","id":3458585,"avatar_url":"https://avatars.githubusercontent.com/u/3458585?v=3","gravatar_id":"","url":"https://api.github.com/users/mesosphere","html_url":"https://github.com/mesosphere","followers_url":"https://api.github.com/users/mesosphere/followers","following_url":"https://api.github.com/users/mesosphere/following{/other_user}","gists_url":"https://api.github.com/users/mesosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/mesosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mesosphere/subscriptions","organizations_url":"https://api.github.com/users/mesosphere/orgs","repos_url":"https://api.github.com/users/mesosphere/repos","events_url":"https://api.github.com/users/mesosphere/events{/privacy}","received_events_url":"https://api.github.com/users/mesosphere/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mesosphere/marathon","description":"Deploy and manage containers (including Docker) on top of Apache Mesos at scale.","fork":false,"url":"https://api.github.com/repos/mesosphere/marathon","forks_url":"https://api.github.com/repos/mesosphere/marathon/forks","keys_url":"https://api.github.com/repos/mesosphere/marathon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mesosphere/marathon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mesosphere/marathon/teams","hooks_url":"https://api.github.com/repos/mesosphere/marathon/hooks","issue_events_url":"https://api.github.com/repos/mesosphere/marathon/issues/events{/number}","events_url":"https://api.github.com/repos/mesosphere/marathon/events","assignees_url":"https://api.github.com/repos/mesosphere/marathon/assignees{/user}","branches_url":"https://api.github.com/repos/mesosphere/marathon/branches{/branch}","tags_url":"https://api.github.com/repos/mesosphere/marathon/tags","blobs_url":"https://api.github.com/repos/mesosphere/marathon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mesosphere/marathon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mesosphere/marathon/git/refs{/sha}","trees_url":"https://api.github.com/repos/mesosphere/marathon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mesosphere/marathon/statuses/{sha}","languages_url":"https://api.github.com/repos/mesosphere/marathon/languages","stargazers_url":"https://api.github.com/repos/mesosphere/marathon/stargazers","contributors_url":"https://api.github.com/repos/mesosphere/marathon/contributors","subscribers_url":"https://api.github.com/repos/mesosphere/marathon/subscribers","subscription_url":"https://api.github.com/repos/mesosphere/marathon/subscription","commits_url":"https://api.github.com/repos/mesosphere/marathon/commits{/sha}","git_commits_url":"https://api.github.com/repos/mesosphere/marathon/git/commits{/sha}","comments_url":"https://api.github.com/repos/mesosphere/marathon/comments{/number}","issue_comment_url":"https://api.github.com/repos/mesosphere/marathon/issues/comments{/number}","contents_url":"https://api.github.com/repos/mesosphere/marathon/contents/{+path}","compare_url":"https://api.github.com/repos/mesosphere/marathon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mesosphere/marathon/merges","archive_url":"https://api.github.com/repos/mesosphere/marathon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mesosphere/marathon/downloads","issues_url":"https://api.github.com/repos/mesosphere/marathon/issues{/number}","pulls_url":"https://api.github.com/repos/mesosphere/marathon/pulls{/number}","milestones_url":"https://api.github.com/repos/mesosphere/marathon/milestones{/number}","notifications_url":"https://api.github.com/repos/mesosphere/marathon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mesosphere/marathon/labels{/name}","releases_url":"https://api.github.com/repos/mesosphere/marathon/releases{/id}","deployments_url":"https://api.github.com/repos/mesosphere/marathon/deployments","created_at":"2013-06-25T14:56:34Z","updated_at":"2016-08-01T14:36:21Z","pushed_at":"2016-08-02T12:30:21Z","git_url":"git://github.com/mesosphere/marathon.git","ssh_url":"git@github.com:mesosphere/marathon.git","clone_url":"https://github.com/mesosphere/marathon.git","svn_url":"https://github.com/mesosphere/marathon","homepage":"https://mesosphere.github.io/marathon/","size":28437,"stargazers_count":2684,"watchers_count":2684,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":596,"mirror_url":null,"open_issues_count":623,"forks":596,"open_issues":623,"watchers":2684,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mesosphere/marathon/pulls/4088"},"html":{"href":"https://github.com/mesosphere/marathon/pull/4088"},"issue":{"href":"https://api.github.com/repos/mesosphere/marathon/issues/4088"},"comments":{"href":"https://api.github.com/repos/mesosphere/marathon/issues/4088/comments"},"review_comments":{"href":"https://api.github.com/repos/mesosphere/marathon/pulls/4088/comments"},"review_comment":{"href":"https://api.github.com/repos/mesosphere/marathon/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mesosphere/marathon/pulls/4088/commits"},"statuses":{"href":"https://api.github.com/repos/mesosphere/marathon/statuses/18ac74e8dcc16279ede1bbcedb554234fb57567d"}}}}
{"actor":{"display_login":"aquamatthias"}}