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


Python util.pretty_mac函数代码示例

本文整理汇总了Python中util.pretty_mac函数的典型用法代码示例。如果您正苦于以下问题:Python pretty_mac函数的具体用法?Python pretty_mac怎么用?Python pretty_mac使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: pretty_print

 def pretty_print(self, q):
     q.text("match_v1 {")
     with q.group():
         with q.indent(2):
             q.breakable()
             q.text("wildcards = ")
             q.text(util.pretty_wildcards(self.wildcards))
             q.text(",")
             q.breakable()
             q.text("in_port = ")
             q.text(util.pretty_port(self.in_port))
             q.text(",")
             q.breakable()
             q.text("eth_src = ")
             q.text(util.pretty_mac(self.eth_src))
             q.text(",")
             q.breakable()
             q.text("eth_dst = ")
             q.text(util.pretty_mac(self.eth_dst))
             q.text(",")
             q.breakable()
             q.text("vlan_vid = ")
             q.text("%#x" % self.vlan_vid)
             q.text(",")
             q.breakable()
             q.text("vlan_pcp = ")
             q.text("%#x" % self.vlan_pcp)
             q.text(",")
             q.breakable()
             q.text("eth_type = ")
             q.text("%#x" % self.eth_type)
             q.text(",")
             q.breakable()
             q.text("ip_dscp = ")
             q.text("%#x" % self.ip_dscp)
             q.text(",")
             q.breakable()
             q.text("ip_proto = ")
             q.text("%#x" % self.ip_proto)
             q.text(",")
             q.breakable()
             q.text("ipv4_src = ")
             q.text(util.pretty_ipv4(self.ipv4_src))
             q.text(",")
             q.breakable()
             q.text("ipv4_dst = ")
             q.text(util.pretty_ipv4(self.ipv4_dst))
             q.text(",")
             q.breakable()
             q.text("tcp_src = ")
             q.text("%#x" % self.tcp_src)
             q.text(",")
             q.breakable()
             q.text("tcp_dst = ")
             q.text("%#x" % self.tcp_dst)
         q.breakable()
     q.text("}")
开发者ID:dtalayco,项目名称:oftest,代码行数:57,代码来源:common.py

示例2: pretty_print

 def pretty_print(self, q):
     q.text("port_desc {")
     with q.group():
         with q.indent(2):
             q.breakable()
             q.text("port_no = ");
             q.text(util.pretty_port(self.port_no))
             q.text(","); q.breakable()
             q.text("hw_addr = ");
             q.text(util.pretty_mac(self.hw_addr))
             q.text(","); q.breakable()
             q.text("name = ");
             q.pp(self.name)
             q.text(","); q.breakable()
             q.text("config = ");
             q.text("%#x" % self.config)
             q.text(","); q.breakable()
             q.text("state = ");
             q.text("%#x" % self.state)
             q.text(","); q.breakable()
             q.text("curr = ");
             q.text("%#x" % self.curr)
             q.text(","); q.breakable()
             q.text("advertised = ");
             q.text("%#x" % self.advertised)
             q.text(","); q.breakable()
             q.text("supported = ");
             q.text("%#x" % self.supported)
             q.text(","); q.breakable()
             q.text("peer = ");
             q.text("%#x" % self.peer)
         q.breakable()
     q.text('}')
开发者ID:jerk1991,项目名称:loxigen-artifacts,代码行数:33,代码来源:common.py

示例3: pretty_print

 def pretty_print(self, q):
     q.text("set_dl_src {")
     with q.group():
         with q.indent(2):
             q.breakable()
             q.text("dl_addr = ");
             q.text(util.pretty_mac(self.dl_addr))
         q.breakable()
     q.text('}')
开发者ID:StonyBrookUniversity,项目名称:oftest,代码行数:9,代码来源:action.py

示例4: pretty_print

 def pretty_print(self, q):
     q.text("mac {")
     with q.group():
         with q.indent(2):
             q.breakable()
             q.text("value = ");
             q.text(util.pretty_mac(self.value))
         q.breakable()
     q.text('}')
开发者ID:TestNAutomation,项目名称:oftest,代码行数:9,代码来源:bsn_tlv.py


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