def pretty_print(self, q): q.text("bsn_vport_l2gre {") with q.group(): with q.indent(2): q.breakable() q.text("flags = ") q.text("%#x" % self.flags) q.text(",") q.breakable() q.text("port_no = ") q.text(util.pretty_port(self.port_no)) q.text(",") q.breakable() q.text("loopback_port_no = ") q.text(util.pretty_port(self.loopback_port_no)) q.text(",") q.breakable() q.text("local_mac = ") q.text(util.pretty_mac(self.local_mac)) q.text(",") q.breakable() q.text("nh_mac = ") q.text(util.pretty_mac(self.nh_mac)) q.text(",") q.breakable() q.text("src_ip = ") q.text(util.pretty_ipv4(self.src_ip)) q.text(",") q.breakable() q.text("dst_ip = ") q.text(util.pretty_ipv4(self.dst_ip)) q.text(",") q.breakable() q.text("dscp = ") q.text("%#x" % self.dscp) q.text(",") q.breakable() q.text("ttl = ") q.text("%#x" % self.ttl) q.text(",") q.breakable() q.text("vpn = ") q.text("%#x" % self.vpn) q.text(",") q.breakable() q.text("rate_limit = ") q.text("%#x" % self.rate_limit) q.text(",") q.breakable() q.text("if_name = ") q.pp(self.if_name) q.breakable() q.text('}')
def pretty_print(self, q): q.text("queue_stats_entry {") 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("queue_id = ") q.text("%#x" % self.queue_id) q.text(",") q.breakable() q.text("tx_bytes = ") q.text("%#x" % self.tx_bytes) q.text(",") q.breakable() q.text("tx_packets = ") q.text("%#x" % self.tx_packets) q.text(",") q.breakable() q.text("tx_errors = ") q.text("%#x" % self.tx_errors) q.breakable() q.text("}")
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('}')
def pretty_print(self, q): q.text("queue_stats_entry {") 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("queue_id = ") q.text("%#x" % self.queue_id) q.text(",") q.breakable() q.text("tx_bytes = ") q.text("%#x" % self.tx_bytes) q.text(",") q.breakable() q.text("tx_packets = ") q.text("%#x" % self.tx_packets) q.text(",") q.breakable() q.text("tx_errors = ") q.text("%#x" % self.tx_errors) q.breakable() q.text('}')
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("}")
def pretty_print(self, q): q.text("port_stats_entry {") 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("rx_packets = ") q.text("%#x" % self.rx_packets) q.text(",") q.breakable() q.text("tx_packets = ") q.text("%#x" % self.tx_packets) q.text(",") q.breakable() q.text("rx_bytes = ") q.text("%#x" % self.rx_bytes) q.text(",") q.breakable() q.text("tx_bytes = ") q.text("%#x" % self.tx_bytes) q.text(",") q.breakable() q.text("rx_dropped = ") q.text("%#x" % self.rx_dropped) q.text(",") q.breakable() q.text("tx_dropped = ") q.text("%#x" % self.tx_dropped) q.text(",") q.breakable() q.text("rx_errors = ") q.text("%#x" % self.rx_errors) q.text(",") q.breakable() q.text("tx_errors = ") q.text("%#x" % self.tx_errors) q.text(",") q.breakable() q.text("rx_frame_err = ") q.text("%#x" % self.rx_frame_err) q.text(",") q.breakable() q.text("rx_over_err = ") q.text("%#x" % self.rx_over_err) q.text(",") q.breakable() q.text("rx_crc_err = ") q.text("%#x" % self.rx_crc_err) q.text(",") q.breakable() q.text("collisions = ") q.text("%#x" % self.collisions) q.breakable() q.text("}")
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('}')
def pretty_print(self, q): q.text("port_stats_entry {") 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("rx_packets = ") q.text("%#x" % self.rx_packets) q.text(",") q.breakable() q.text("tx_packets = ") q.text("%#x" % self.tx_packets) q.text(",") q.breakable() q.text("rx_bytes = ") q.text("%#x" % self.rx_bytes) q.text(",") q.breakable() q.text("tx_bytes = ") q.text("%#x" % self.tx_bytes) q.text(",") q.breakable() q.text("rx_dropped = ") q.text("%#x" % self.rx_dropped) q.text(",") q.breakable() q.text("tx_dropped = ") q.text("%#x" % self.tx_dropped) q.text(",") q.breakable() q.text("rx_errors = ") q.text("%#x" % self.rx_errors) q.text(",") q.breakable() q.text("tx_errors = ") q.text("%#x" % self.tx_errors) q.text(",") q.breakable() q.text("rx_frame_err = ") q.text("%#x" % self.rx_frame_err) q.text(",") q.breakable() q.text("rx_over_err = ") q.text("%#x" % self.rx_over_err) q.text(",") q.breakable() q.text("rx_crc_err = ") q.text("%#x" % self.rx_crc_err) q.text(",") q.breakable() q.text("collisions = ") q.text("%#x" % self.collisions) q.breakable() q.text('}')
def pretty_print(self, q): q.text("port {") with q.group(): with q.indent(2): q.breakable() q.text("value = "); q.text(util.pretty_port(self.value)) q.breakable() q.text('}')
def pretty_print(self, q): q.text("bsn_vport_l2gre {") with q.group(): with q.indent(2): q.breakable() q.text("flags = "); q.text("%#x" % self.flags) q.text(","); q.breakable() q.text("port_no = "); q.text(util.pretty_port(self.port_no)) q.text(","); q.breakable() q.text("loopback_port_no = "); q.text(util.pretty_port(self.loopback_port_no)) q.text(","); q.breakable() q.text("local_mac = "); q.text(util.pretty_mac(self.local_mac)) q.text(","); q.breakable() q.text("nh_mac = "); q.text(util.pretty_mac(self.nh_mac)) q.text(","); q.breakable() q.text("src_ip = "); q.text(util.pretty_ipv4(self.src_ip)) q.text(","); q.breakable() q.text("dst_ip = "); q.text(util.pretty_ipv4(self.dst_ip)) q.text(","); q.breakable() q.text("dscp = "); q.text("%#x" % self.dscp) q.text(","); q.breakable() q.text("ttl = "); q.text("%#x" % self.ttl) q.text(","); q.breakable() q.text("vpn = "); q.text("%#x" % self.vpn) q.text(","); q.breakable() q.text("rate_limit = "); q.text("%#x" % self.rate_limit) q.text(","); q.breakable() q.text("if_name = "); q.pp(self.if_name) q.breakable() q.text('}')
def pretty_print(self, q): q.text("output {") with q.group(): with q.indent(2): q.breakable() q.text("port = "); q.text(util.pretty_port(self.port)) q.text(","); q.breakable() q.text("max_len = "); q.text("%#x" % self.max_len) q.breakable() q.text('}')
def pretty_print(self, q): q.text("enqueue {") with q.group(): with q.indent(2): q.breakable() q.text("port = "); q.text(util.pretty_port(self.port)) q.text(","); q.breakable() q.text("queue_id = "); q.text("%#x" % self.queue_id) q.breakable() q.text('}')