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
def __init__(self, name, sw_path=None, json_path=None, thrift_port=None, pcap_dump=None, **kwargs): P4Switch.__init__(self, name, sw_path=sw_path, json_path=json_path, thrift_port=thrift_port, pcap_dump=pcap_dump, **kwargs)
def __init__(self, *opts, **kwargs): global next_thrift_port kwargs.update(switch_args) if "operating_mode" in tk_args : kwargs["operating_mode"] = tk_args["operating_mode"] if "host_rel_cpu_speed" in tk_args : kwargs["host_rel_cpu_speed"] = tk_args["host_rel_cpu_speed"] if "switch_rel_cpu_speed" in tk_args: kwargs["switch_rel_cpu_speed"] = tk_args["switch_rel_cpu_speed"] if "n_round_insns" in tk_args : kwargs["n_round_insns"] = tk_args["n_round_insns"] kwargs['thrift_port'] = ConfiguredP4Switch.next_thrift_port ConfiguredP4Switch.next_thrift_port += 1 P4Switch.__init__(self, *opts, **kwargs)
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
def __init__(self, *opts, **kwargs): global next_thrift_port kwargs.update(switch_args) kwargs['thrift_port'] = ConfiguredP4Switch.next_thrift_port ConfiguredP4Switch.next_thrift_port += 1 P4Switch.__init__(self, *opts, **kwargs)
def __init__(self, *opts, **kwargs): global next_thrift_port kwargs.update(switch_args) P4Switch.__init__(self, *opts, **kwargs)