thefactory/marathon-python — pull request #11 by danielfrg (2014-10-09 22:19:49+00:00)
Title: add service_port argument

There was a bug when you tried to use the lib to start a docker container in marathon. The problem was that marathon is returning a json field `servicePort` and the code is trying to map it to `service_port` which didn't exists on the `__init__`.

The problem only affected the response parsing, the task in marathon was created fine.

Now I was able to do it like this:

```python
from marathon import MarathonClient
from marathon.models.container import MarathonContainer, MarathonDockerContainer, MarathonContainerPortMapping

c = MarathonClient('http://localhost:8080/')
ports = MarathonContainerPortMapping(container_port=4444)
docker = MarathonDockerContainer('danielfrg/selenium', network='BRIDGE', port_mappings=[ports])
container = MarathonContainer(docker=docker)
app = MarathonApp(container=container, mem=300, cpus=0.5)
c.create_app('selenium', app)
```

Thanks for the lib :)