Пример #1
0
    def getIpAddresses(self):
        """
        List the IP addresses to which we can contact the service.

        @return: list of IP addresses
        @rtype: array of strings
        """
        ips = [ ip for ip in self.ipaddresses \
            if ip != '0.0.0.0' and ip != '127.0.0.1' and ip != '::1']
        if not ips:
            ips = Service.getNonLoopbackIpAddresses(self)
            ips = [x.split('/', 1)[0] for x in ips]
        return ips
Пример #2
0
    def getIpAddresses(self):
        """
        List the IP addresses to which we can contact the service.

        @return: list of IP addresses
        @rtype: array of strings
        """
        ips = [ ip for ip in self.ipaddresses \
            if ip != '0.0.0.0' and ip != '127.0.0.1' and ip != '::1']
        if not ips:
            ips = Service.getNonLoopbackIpAddresses(self)
            ips = [ x.split('/',1)[0] for x in ips ]
        return ips