Ejemplo n.º 1
0
 def __init__(self, filename, logger=None):
     FileParser.__init__(self, filename)  # Stations filename ("/apps/px/etc/stations.conf")
     self.logger = logger  # Logger Object
     self.stations = {}  # Indexed by header
     self.printErrors = True  #
     self.type = "INT"  # Must be in ['CA', 'US', 'COLL', 'INT']
     self.stationSearched = None  # Station for which we want to find the more recent occurence
Ejemplo n.º 2
0
    def __init__(self, filename, pxLinkables=[], logger=None, version = 0):
        FileParser.__init__(self, filename) # Routing filename ("/apps/px/etc/pxroute.conf")
        self.logger = logger            # Logger object
        self.version = version          # Routing file version  (0 or 1)

        self.version = 1                # FORCING VERSION 1

        self.routingInfos = {}          # Addressed by header name: self.routingInfos[header]['clients']
                                        #                           self.routingInfos[header]['subclients']
                                        #                           self.routingInfos[header]['priority']

        self.keyMasks = []              # Key pattern list :        mask, 'clients','priority',cmask,t/f
        self.keyMaskMap = {}            # Addressed by Key pattern: self.keyMaskMap[key] = True

        self.subClients = {}            # Addressed by client name
        self.aliasedClients = {}        # Addressed by alias
        self.aftnMap = {}               # Addressed by AFTN address. aftnMap['DEFAULT'] give the default
        self.goodClients = {}           # Sub group of clients that are in header2clients.conf and are px linkable.
        self.badClients = {}            # Sub group of clients that are in header2clients.conf and are not px linkable.
        self.pxLinkables = pxLinkables  # All clients to which px can link (independant of header2clients.conf)

        self.originalClients = {}       # Indexed by header, remove duplicate, no alias expansion, subclients as is.
                                        # Only used to reconstruct the routing file

        if self.logger:
            self.logger.info("Routing table used: %s" % filename)
Ejemplo n.º 3
0
 def __init__(self, filename, logger=None):
     FileParser.__init__(self, filename) # Stations filename ("/apps/px/etc/stations.conf")
     self.logger = logger     # Logger Object
     self.stations = {}       # Indexed by header
     self.printErrors = True  #
     self.type = 'INT'        # Must be in ['CA', 'US', 'COLL', 'INT']
     self.stationSearched = None  # Station for which we want to find the more recent occurence
Ejemplo n.º 4
0
 def __init__(self, filename, logger=None):
     FileParser.__init__(self, filename) # Stations filename ("/apps/px/etc/stations.conf")
     self.logger = logger     # Logger Object
     self.headers = {}        # Indexed by station
     self.stations = {}       # Indexed by header
     self.stationsColl = {}   # Indexed by header (only the ones that have to be collected)
     self.printErrors = False # Print errors
     self.logErrors = True    # Log errors
Ejemplo n.º 5
0
 def __init__(self, filename, logger=None):
     FileParser.__init__(
         self, filename)  # Stations filename ("/apps/px/etc/stations.conf")
     self.logger = logger  # Logger Object
     self.headers = {}  # Indexed by station
     self.stations = {}  # Indexed by header
     self.stationsColl = {
     }  # Indexed by header (only the ones that have to be collected)
     self.printErrors = False  # Print errors
     self.logErrors = True  # Log errors