From b6a14a593df86ef5b0030912e0798464d61fdf66 Mon Sep 17 00:00:00 2001 From: Ryosuke Kato Date: Tue, 7 Nov 2023 23:27:20 +0900 Subject: [PATCH] fix: counter function (#82) * fix: counter function * Update: interface.py apply [black](https://github.com/psf/black) format * fix: format&unintentional deletion --- src/north/cli/goldstone/north/cli/interface.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/north/cli/goldstone/north/cli/interface.py b/src/north/cli/goldstone/north/cli/interface.py index af062ef0..00a573d0 100644 --- a/src/north/cli/goldstone/north/cli/interface.py +++ b/src/north/cli/goldstone/north/cli/interface.py @@ -1046,6 +1046,7 @@ class InterfaceCounterCommand(Command): def __init__(self, context, parent, name, **options): super().__init__(context, parent, name, **options) + self.model = options.get("model", "goldstone-interfaces") self.add_command("pcs", InterfacePCSCounterCommand) self.add_command("detail", InterfaceDetailCounterCommand) @@ -1085,8 +1086,9 @@ def exec(self, line): table = line[0] == "table" ifnames = self.context.ifnames + model = self.model - show_counters(self.conn, ifnames, table) + show_counters(self.conn, ifnames, table, model) class InterfaceShowCommand(Command):