daemon/core/misc/xmlparser1.py
def network_class(self, network, network_type):
        '''\
        Return the corresponding CORE network class for the given
        network/network_type.
        '''
        if network_type == 'ethernet':
            return nodes.PtpNet
        elif network_type == 'satcom':
            return nodes.PtpNet
        elif network_type == 'wireless':
            channel = getFirstChildByTagName(network, 'channel')
            if channel:
                # use an explicit CORE type if it exists
                coretype = getFirstChildTextTrimWithAttribute(channel, 'type',
                                                              'domain', 'CORE')
                if coretype:
                    if coretype == 'basic_range':
                        return nodes.WlanNode
                    elif coretype.startswith('emane'):
                        return nodes.EmaneNode
                    else:
                        self.warn('unknown network type: \'%s\'' % coretype)
                        return xmltypetonodeclass(self.session, coretype)
            return nodes.WlanNode
        self.warn('unknown network type: \'%s\'' % network_type)
        return None
\
        Return the corresponding CORE network class for the given
        network/network_type.
        
\
Return the corresponding CORE network class for the given
network/network_type.
\ Return the corresponding CORE network class for the given network / network_type .
def network_class(self, network, network_type):
        if network_type == 'ethernet':
            return nodes.PtpNet
        elif network_type == 'satcom':
            return nodes.PtpNet
        elif network_type == 'wireless':
            channel = getFirstChildByTagName(network, 'channel')
            if channel:
                coretype = getFirstChildTextTrimWithAttribute(channel, 'type',
                                                              'domain', 'CORE')
                if coretype:
                    if coretype == 'basic_range':
                        return nodes.WlanNode
                    elif coretype.startswith('emane'):
                        return nodes.EmaneNode
                    else:
                        self.warn('unknown network type: \'%s\'' % coretype)
                        return xmltypetonodeclass(self.session, coretype)
            return nodes.WlanNode
        self.warn('unknown network type: \'%s\'' % network_type)
        return None
def network_class ( self , network , network_type ) : if network_type == 'ethernet' : return nodes . PtpNet elif network_type == 'satcom' : return nodes . PtpNet elif network_type == 'wireless' : channel = getFirstChildByTagName ( network , 'channel' ) if channel : coretype = getFirstChildTextTrimWithAttribute ( channel , 'type' , 'domain' , 'CORE' ) if coretype : if coretype == 'basic_range' : return nodes . WlanNode elif coretype . startswith ( 'emane' ) : return nodes . EmaneNode else : self . warn ( 'unknown network type: \'%s\'' % coretype ) return xmltypetonodeclass ( self . session , coretype ) return nodes . WlanNode self . warn ( 'unknown network type: \'%s\'' % network_type ) return None
\
Return the corresponding CORE network class for the given
network/network_type.
\ Return the corresponding CORE network class for the given network / network_type .
'''\
        Return the corresponding CORE network class for the given
        network/network_type.
        ''' # use an explicit CORE type if it exists
self
network
network_type