当前位置: 首页>>代码示例>>Python>>正文


Python Host.__init__方法代码示例

本文整理汇总了Python中host.Host.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Host.__init__方法的具体用法?Python Host.__init__怎么用?Python Host.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在host.Host的用法示例。


在下文中一共展示了Host.__init__方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from host import Host [as 别名]
# 或者: from host.Host import __init__ [as 别名]
 def __init__(self, name, mymac=(0,0,0,0,0,0), myip=(0,0,0,0), destip=(0,0,0,0), pkts=1):
     Host.__init__(self, name, mymac, myip)
     self.pkts_to_send = pkts
     self.pkts_sent = 0
     self.received_pkt_count = 0
     self.current_destip_idx = 0
     if isinstance(destip, list):
         self.destip = map(lambda x: IpAddress(x), destip)
     else:
         self.destip = [IpAddress(destip)]
     self.flows_started = 0
     self.connections = {}
开发者ID:mcanini,项目名称:nice,代码行数:14,代码来源:tcp_client.py

示例2: __init__

# 需要导入模块: from host import Host [as 别名]
# 或者: from host.Host import __init__ [as 别名]
    def __init__(self, **kwargs):
        """Constructor

           Initialize object's private data.

           rpcdebug:
               Set RPC kernel debug flags and save log messages [default: '']
           nfsdebug:
               Set NFS kernel debug flags and save log messages [default: '']
           dbgname:
               Base name for log messages files to create [default: 'dbgfile']
           tracename:
               Base name for trace files to create [default: 'tracefile']
           notrace:
               Debug option so a trace is not actually started [default: False]
           tcpdump:
               Tcpdump command [default: '/usr/sbin/tcpdump']
           messages:
               Location of file for system messages [default: '/var/log/messages']
           tmpdir:
               Temporary directory where trace files are created [default: '/tmp']
        """
        # Arguments
        self.rpcdebug  = kwargs.pop("rpcdebug",  '')
        self.nfsdebug  = kwargs.pop("nfsdebug",  '')
        self.dbgname   = kwargs.pop("dbgname",   'dbgfile')
        self.tracename = kwargs.pop("tracename", 'tracefile')
        self.notrace   = kwargs.pop("notrace",   False)
        self.tcpdump   = kwargs.pop("tcpdump",   c.NFSTEST_TCPDUMP)
        self.messages  = kwargs.pop("messages",  c.NFSTEST_MESSAGESLOG)
        self.tmpdir    = kwargs.pop("tmpdir",    c.NFSTEST_TMPDIR)
        self._nfsdebug = False
        Host.__init__(self)

        # Initialize object variables
        self.dbgidx = 1
        self.dbgfile = ''
        self.traceidx = 1
        self.tracefile = ''
        self.tracefiles = []
        self.clients = []
        self.traceproc = None
        self.nii_name = ''    # nii_name for the client
        self.nii_server = ''  # nii_name for the server
开发者ID:elasti-rans,项目名称:nfstest,代码行数:46,代码来源:nfs_util.py

示例3: __init__

# 需要导入模块: from host import Host [as 别名]
# 或者: from host.Host import __init__ [as 别名]
 def __init__(self, name, mymac, myip, tcp_port=80):
     Host.__init__(self, name, mymac, myip)
     self.received_pkt_count = 0
     self.myport = tcp_port
     self.controller = None
     self.connections = {}
开发者ID:mcanini,项目名称:nice,代码行数:8,代码来源:tcp_server.py

示例4: __init__

# 需要导入模块: from host import Host [as 别名]
# 或者: from host.Host import __init__ [as 别名]
 def __init__(self, host, katcp_port=7147, boffile=None, connect=False):
     Host.__init__(self, host, katcp_port)
     KatcpFpga.__init__(self, host, katcp_port, connect=connect)
     self.boffile = boffile
开发者ID:shaoguangleo,项目名称:corr2,代码行数:6,代码来源:host_fpga.py

示例5: __init__

# 需要导入模块: from host import Host [as 别名]
# 或者: from host.Host import __init__ [as 别名]
 def __init__(self, name, mymac):
     Host.__init__(self, name, mymac, "10.0.0.1")
     self.packet_id = 1 # uses odd numbers
     self.move_host = False
     self.move_host_switch = None
开发者ID:mcanini,项目名称:nice,代码行数:7,代码来源:replier.py

示例6: __init__

# 需要导入模块: from host import Host [as 别名]
# 或者: from host.Host import __init__ [as 别名]
 def __init__(self):
     Host.__init__(self, "InSec", "65.32.2.133", ["sensenet.log", "a3f15cb.txt", "emplrec0451.log"], ["clientProtector", "sec0451", "SysAdmin"])
     self.state = 1
开发者ID:Kha,项目名称:HottestCatOnTheBlock,代码行数:5,代码来源:cats.py

示例7: __init__

# 需要导入模块: from host import Host [as 别名]
# 或者: from host.Host import __init__ [as 别名]
 def __init__(self, id, ip, name=None):
     Host.__init__(self, ip=ip, name=name)
     self._id = id
开发者ID:stefsava,项目名称:nemesys-qos,代码行数:5,代码来源:server.py


注:本文中的host.Host.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。