예제 #1
0
 def __init__( self, name, sw_path = "dc_full", dpid=None, opts='', thrift_port = 22222, pcap_dump = False, verbose = False, **kwargs ):
     P4Switch.__init__(self, name, **kwargs)
     self.dpid = self.defaultDpid(dpid)
     self.opts = opts
     self.sw_path = sw_path
     self.verbose = verbose
     self.logfile = '/tmp/p4ns.%s.log' % self.name
     self.output = open(self.logfile, 'w')
     self.thrift_port = thrift_port
     self.pcap_dump = pcap_dump
예제 #2
0
 def __init__(self, *opts, **kwargs):
     global next_thrift_port
     kwargs.update(switch_args)
     kwargs['thrift_port'] = next_thrift_port
     next_thrift_port += 1
     P4Switch.__init__(self, *opts, **kwargs)
예제 #3
0
 def __init__(self, *opts, **kwargs):
     global next_thrift_port
     kwargs.update(ap_args)
     kwargs['thrift_port'] = ConfiguredP4Switch.next_thrift_port
     ConfiguredP4Switch.next_thrift_port += 1
     P4Switch.__init__(self, *opts, **kwargs)
예제 #4
0
 def __init__(self, *opts, **kwargs):
     global next_thrift_port
     kwargs.update(switch_args)
     P4Switch.__init__(self, *opts, **kwargs)