Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

adds docker_endpoint parameter to ships #20

Merged
merged 1 commit into from

3 participants

@stefanfoulis

this is just a quickfix for #19. does not include any tests yet.

@Jud

+1 - This also adds the ability to run docker on a socket w/ maestro

@mpetazzoni mpetazzoni merged commit a35b1b5 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 6, 2014
  1. @stefanfoulis
This page is out of date. Refresh to see the latest.
Showing with 7 additions and 3 deletions.
  1. +6 −3 maestro/entities.py
  2. +1 −0  maestro/maestro.py
View
9 maestro/entities.py
@@ -37,19 +37,22 @@ class Ship(Entity):
DEFAULT_DOCKER_TIMEOUT = 5
def __init__(self, name, ip, docker_port=DEFAULT_DOCKER_PORT,
- timeout=None):
+ timeout=None, docker_endpoint=None):
"""Instantiate a new ship.
Args:
name (string): the name of the ship.
ip (string): the IP address of resolvable host name of the host.
docker_port (int): the port the Docker daemon listens on.
+ docker_endpoint (url): endpoint to access the docker api
"""
Entity.__init__(self, name)
self._ip = ip
self._docker_port = docker_port
-
- self._backend_url = 'http://{:s}:{:d}'.format(ip, docker_port)
+ if docker_endpoint:
+ self._backend_url = docker_endpoint
+ else:
+ self._backend_url = 'http://{:s}:{:d}'.format(ip, docker_port)
self._backend = docker.Client(
base_url=self._backend_url,
version=Ship.DEFAULT_DOCKER_VERSION,
View
1  maestro/maestro.py
@@ -24,6 +24,7 @@ def __init__(self, config):
k, v['ip'],
docker_port=v.get('docker_port',
entities.Ship.DEFAULT_DOCKER_PORT),
+ docker_endpoint=v.get('docker_endpoint'),
timeout=v.get('timeout')))
for k, v in self._config['ships'].iteritems())
Something went wrong with that request. Please try again.