Пример #1
0
    def _getManageIp(self):
        """
        Pick an IP out of available choices.

        @return: IP address to contact the service on
        @rtype: string
        """
        manage_ip = Service.getManageIp(self)
        bare_ip = manage_ip.split('/',1)[0]
        if bare_ip in self.ipaddresses:
            return bare_ip

        for ip in self.ipaddresses:
            if ip != '0.0.0.0' and ip != '127.0.0.1' and ip != '::1':
                return ip
        return bare_ip