def interfaces(self):
        """
        Interfaces as a :class:`list`of the
        :class:`shelter.core.config.Config.Interface` instances.
        """
        if 'interfaces' not in self._cached_values:
            self._cached_values['interfaces'] = []
            for name, interface in six.iteritems(self.settings.INTERFACES):
                listen = interface.get('LISTEN')
                unix_socket = interface.get('UNIX_SOCKET')
                if not listen and not unix_socket:
                    raise ValueError(
                        'Interface MUST listen either on TCP '
                        'or UNIX socket or both')
                host, port = parse_host(listen) if listen else (None, None)
                processes = int(interface.get('PROCESSES', 1))
                urls_obj_name = interface.get('URLS', '')
                if urls_obj_name:
                    urls = import_object(urls_obj_name)
                else:
                    urls = ()
                self._cached_values['interfaces'].append(
                    self.Interface(
                        name, host, port, unix_socket, processes, urls)
                )
        return self._cached_values['interfaces']
def interfaces ( self ) : if 'interfaces' not in self . _cached_values : self . _cached_values [ 'interfaces' ] = [ ] for name , interface in six . iteritems ( self . settings . INTERFACES ) : listen = interface . get ( 'LISTEN' ) unix_socket = interface . get ( 'UNIX_SOCKET' ) if not listen and not unix_socket : raise ValueError ( 'Interface MUST listen either on TCP ' 'or UNIX socket or both' ) host , port = parse_host ( listen ) if listen else ( None , None ) processes = int ( interface . get ( 'PROCESSES' , 1 ) ) urls_obj_name = interface . get ( 'URLS' , '' ) if urls_obj_name : urls = import_object ( urls_obj_name ) else : urls = ( ) self . _cached_values [ 'interfaces' ] . append ( self . Interface ( name , host , port , unix_socket , processes , urls ) ) return self . _cached_values [ 'interfaces' ]
Interfaces as a :class:`list`of the
        :class:`shelter.core.config.Config.Interface` instances.