def bug_report (type, value, trace): import traceback from bagpipe.exabgp.log import Logger logger = Logger() print print print "-"*80 print "-- Please provide the information below on :" print "-- http://code.google.com/p/exaproxy/issues/entry" print "-"*80 print print print '-- Version' print print print sys.version print print print "-- Configuration" print print print logger.config() print print print "-- Logging History" print print print logger.history() print print print "-- Traceback" print print traceback.print_exception(type,value,trace) print print print "-"*80 print "-- Please provide the information above on :" print "-- http://code.google.com/p/exaproxy/issues/entry" print "-"*80 print print
def bug_report(type, value, trace): import traceback from bagpipe.exabgp.log import Logger logger = Logger() print print print "-" * 80 print "-- Please provide the information below on :" print "-- http://code.google.com/p/exaproxy/issues/entry" print "-" * 80 print print print '-- Version' print print print sys.version print print print "-- Configuration" print print print logger.config() print print print "-- Logging History" print print print logger.history() print print print "-- Traceback" print print traceback.print_exception(type, value, trace) print print print "-" * 80 print "-- Please provide the information above on :" print "-- http://code.google.com/p/exaproxy/issues/entry" print "-" * 80 print print
#import os #import sys import struct import time import socket #import fcntl import errno import select #import array from bagpipe.exabgp.utils import hexa,trace from bagpipe.exabgp.structure.address import AFI from bagpipe.exabgp.message import Failure from bagpipe.exabgp.log import Logger,LazyFormat logger = Logger() # If the OS tells us we have data on the socket, # we should never have to wait more than READ_TIMEOUT to be able to read it. READ_TIMEOUT = 1 errno_block = set(( errno.EINPROGRESS, errno.EALREADY, errno.EAGAIN, errno.EWOULDBLOCK, errno.EINTR, errno.EDEADLK, )) errno_fatal = set(( errno.EBADF, errno.ECONNRESET, errno.ENOTCONN, errno.ESHUTDOWN, errno.ECONNABORTED, errno.EPIPE,
import sys import time import traceback from bagpipe.exabgp.message import Failure from bagpipe.exabgp.message.nop import NOP from bagpipe.exabgp.message.open import Open,Capabilities from bagpipe.exabgp.message.update import Update from bagpipe.exabgp.message.keepalive import KeepAlive from bagpipe.exabgp.message.notification import Notification, Notify, NotConnected from bagpipe.exabgp.network.protocol import Protocol from bagpipe.exabgp.processes import ProcessError from bagpipe.exabgp.log import Logger,LazyFormat logger = Logger() # As we can not know if this is our first start or not, this flag is used to # always make the program act like it was recovering from a failure # If set to FALSE, no EOR and OPEN Flags set for Restart will be set in the # OPEN Graceful Restart Capability FORCE_GRACEFUL = True # Present a File like interface to socket.socket class Peer (object): # debug hold/keepalive timers debug_trace = True # debug traceback on unexpected exception update_time = 3 def __init__ (self,neighbor,supervisor):
import sys import time import traceback from bagpipe.exabgp.message import Failure from bagpipe.exabgp.message.nop import NOP from bagpipe.exabgp.message.open import Open, Capabilities from bagpipe.exabgp.message.update import Update from bagpipe.exabgp.message.keepalive import KeepAlive from bagpipe.exabgp.message.notification import Notification, Notify, NotConnected from bagpipe.exabgp.network.protocol import Protocol from bagpipe.exabgp.processes import ProcessError from bagpipe.exabgp.log import Logger, LazyFormat logger = Logger() # As we can not know if this is our first start or not, this flag is used to # always make the program act like it was recovering from a failure # If set to FALSE, no EOR and OPEN Flags set for Restart will be set in the # OPEN Graceful Restart Capability FORCE_GRACEFUL = True # Present a File like interface to socket.socket class Peer(object): # debug hold/keepalive timers debug_trace = True # debug traceback on unexpected exception update_time = 3
import time import signal import select from bagpipe.exabgp.network.peer import Peer from bagpipe.exabgp.version import version from bagpipe.exabgp.daemon import Daemon from bagpipe.exabgp.processes import Processes from bagpipe.exabgp.configuration import Configuration from bagpipe.exabgp.network.connection import errno_block from bagpipe.exabgp.processes import ProcessError from bagpipe.exabgp.log import Logger logger = Logger() class Supervisor(object): # [hex(ord(c)) for c in os.popen('clear').read()] clear = ''.join([ chr(int(c, 16)) for c in ['0x1b', '0x5b', '0x48', '0x1b', '0x5b', '0x32', '0x4a'] ]) def __init__(self, configuration): self.daemon = Daemon(self) self.processes = Processes(self) self.configuration = Configuration(configuration) self.watchdogs = {}
import time import signal import select from bagpipe.exabgp.network.peer import Peer from bagpipe.exabgp.version import version from bagpipe.exabgp.daemon import Daemon from bagpipe.exabgp.processes import Processes from bagpipe.exabgp.configuration import Configuration from bagpipe.exabgp.network.connection import errno_block from bagpipe.exabgp.processes import ProcessError from bagpipe.exabgp.log import Logger logger = Logger() class Supervisor (object): # [hex(ord(c)) for c in os.popen('clear').read()] clear = ''.join([chr(int(c,16)) for c in ['0x1b', '0x5b', '0x48', '0x1b', '0x5b', '0x32', '0x4a']]) def __init__ (self,configuration): self.daemon = Daemon(self) self.processes = Processes(self) self.configuration = Configuration(configuration) self.watchdogs = {} self._peers = {} self._shutdown = False self._reload = False