diff --git a/board/netconf/rootfs/lib/infix/cli-pretty b/board/netconf/rootfs/lib/infix/cli-pretty index f792b6d6a..2f8b249e9 100755 --- a/board/netconf/rootfs/lib/infix/cli-pretty +++ b/board/netconf/rootfs/lib/infix/cli-pretty @@ -95,8 +95,8 @@ class Iface: def pr_proto_eth(self): row = f"{'ethernet':<{Pad.proto}}" - dec = Decore.green if self.data['oper-status'] == "up" else Decore.red - row += dec(f"{self.data['oper-status'].upper():<{Pad.state}}") + dec = Decore.green if self.oper_status == "up" else Decore.red + row += dec(f"{self.oper_status.upper():<{Pad.state}}") row += f"{self.data['phys-address']:<{Pad.data}}" print(row) diff --git a/test/case/cli_pretty/json/bloated.json b/test/case/cli_pretty/json/bloated.json index 347fb6098..1c425a5b1 100644 --- a/test/case/cli_pretty/json/bloated.json +++ b/test/case/cli_pretty/json/bloated.json @@ -322,9 +322,9 @@ } }, { + "TEST-DESCR": "VLAN without operstatus", "name": "vlan20", "type": "infix-if-type:vlan", - "oper-status": "up", "if-index": 4, "phys-address": "02:00:00:00:00:00", "statistics": {