Exemplo n.º 1
0
    class Instance(object):
        def __init__(self, name):
            self.name = name
            self.hostname = get_docker_bridge()
            self.port_rez = PortReservation()

        @property
        def port(self):
            return self.port_rez.get()

        @property
        def addr(self):
            return '{}:{}'.format(self.hostname, self.port)
Exemplo n.º 2
0
 def __init__(self, name):
     self.name = name
     self.hostname = get_docker_bridge()
     self.port_rez = PortReservation()