Skip to content

Commit

Permalink
Merge pull request #101 from Rob-Johnson/add-name-attribute-port-mapping
Browse files Browse the repository at this point in the history
add name attribute to port mapping
  • Loading branch information
solarkennedy committed May 11, 2016
2 parents 15f5845 + 49767b9 commit bc63250
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions itests/steps/marathon_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def create_complex_new_app_with_unicode(context):
'docker': {
'portMappings':
[{'protocol': 'tcp',
'name': 'myport',
'containerPort': 8888,
'hostPort': 0}],
'image': u'localhost/fake_docker_url',
Expand Down
4 changes: 3 additions & 1 deletion marathon/models/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ class MarathonContainerPortMapping(MarathonObject):
See https://mesosphere.github.io/marathon/docs/native-docker.html
:param str name:
:param int container_port:
:param int host_port:
:param str protocol:
Expand All @@ -83,7 +84,8 @@ class MarathonContainerPortMapping(MarathonObject):
PROTOCOLS = ['tcp', 'udp']
"""Valid protocols"""

def __init__(self, container_port=None, host_port=0, service_port=None, protocol='tcp', labels=None):
def __init__(self, name=None, container_port=None, host_port=0, service_port=None, protocol='tcp', labels=None):
self.name = name
self.container_port = container_port
self.host_port = host_port
self.service_port = service_port
Expand Down

0 comments on commit bc63250

Please sign in to comment.