Skip to content

Commit

Permalink
docstring fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdbeek committed Feb 22, 2016
1 parent bad1aca commit e718e8e
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions lib/galaxy/web/base/interactive_environments.py
Expand Up @@ -252,12 +252,12 @@ def launch(self, raw_cmd=None, env_override={}, volumes=[]):
# self.attr.PORT = self.attr.proxy_request[ 'proxied_port' ]

def inspect_container(self, container_id):
"""Run docker inspect on a container and return json response as python dictionary inspect_data.
"""Runs docker inspect on a container and returns json response as python dictionary inspect_data.
:type container_id: str
:param container_id: a docker container ID
:returns: inspect_data: dict
:returns: inspect_data, a dict of docker inspect output
"""
command = self.attr.viz_config.get("docker", "command")
command = command.format(docker_args="inspect %s" % container_id)
Expand Down Expand Up @@ -287,15 +287,17 @@ def inspect_container(self, container_id):
def get_container_gateway_ip(self, inspect_data):
"""
Returns gateway ip from inspect_data
:param inspect_data: dict
:returns: gateway_ip: str
:type inspect_data: dict
:param inspect_data: output of docker inspect
:returns: gateway_ip
"""
gateway_ip = inspect_data[0]['NetworkSettings']['Gateway']
return gateway_ip

def get_container_port_mapping(self, inspect_data):
"""
:param inspect_data: dict
:type inspect_data: dict
:param inspect_data: output of docker inspect
:returns: a list of triples containing (internal_port, external_ip,
external_port), of which the ports are probably the only
useful information.
Expand Down

0 comments on commit e718e8e

Please sign in to comment.