From 688c7ce157198e8fbedba2af7fe714f37c1c8d14 Mon Sep 17 00:00:00 2001 From: Andrey Vertiprahov Date: Mon, 22 Aug 2022 15:32:20 +0000 Subject: [PATCH] Merge branch 'fix-avs-zte-zxdsl98-typo' into 'master' ZTE.ZXDSL98xx.get_inventory. Fix fill_ports method use from profile. See merge request noc/noc!6600 (cherry picked from commit 8b731cf557607ddef51466c20908ebb28d4f3890) c6c71459 ZTE.ZXDSL98xx.get_inventory. Fix fill_ports method use from profile. --- sa/profiles/ZTE/ZXDSL98xx/get_interfaces.py | 10 ++++++++++ sa/profiles/ZTE/ZXDSL98xx/get_inventory.py | 6 +++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/sa/profiles/ZTE/ZXDSL98xx/get_interfaces.py b/sa/profiles/ZTE/ZXDSL98xx/get_interfaces.py index e8770761f1..d7b24f6dbd 100644 --- a/sa/profiles/ZTE/ZXDSL98xx/get_interfaces.py +++ b/sa/profiles/ZTE/ZXDSL98xx/get_interfaces.py @@ -191,6 +191,10 @@ class Script(BaseScript): "type": "physical", "admin_status": match.group("admin_status") == "enable", "oper_status": match.group("oper_status") == "up", + "hints": [ + "noc::topology::direction::nni", + "technology::ethernet::1000base", + ], "subinterfaces": [ { "name": ifname, @@ -209,6 +213,7 @@ class Script(BaseScript): "type": "physical", "admin_status": match.group("admin_status") == "enable", "oper_status": match.group("oper_status") == "up", + "hints": ["technology::dsl::adsl"], "subinterfaces": [], } v = self.cli("show atm pvc interface %s" % ifname) @@ -290,6 +295,10 @@ class Script(BaseScript): "name": ifname, "type": "physical", "admin_status": admin_status, + "hints": [ + "noc::topology::direction::nni", + "technology::ethernet::1000base", + ], "oper_status": oper_status, "subinterfaces": [ { @@ -323,6 +332,7 @@ class Script(BaseScript): "type": "physical", "admin_status": admin_status, "oper_status": oper_status, + "hints": ["technology::dsl::adsl"], "subinterfaces": [], } v = self.cli("show atm vc %s" % ifname) diff --git a/sa/profiles/ZTE/ZXDSL98xx/get_inventory.py b/sa/profiles/ZTE/ZXDSL98xx/get_inventory.py index 9ee54ea36d..380b064b69 100644 --- a/sa/profiles/ZTE/ZXDSL98xx/get_inventory.py +++ b/sa/profiles/ZTE/ZXDSL98xx/get_inventory.py @@ -91,9 +91,9 @@ class Script(BaseScript): r[0]["sensors"] = sensors return r - def fill_ports(self, script): + def fill_ports(self): r = [] - v = script.cli("show card") + v = self.cli("show card") for line in v.splitlines(): match = self.rx_card.search(line) if match: @@ -102,7 +102,7 @@ class Script(BaseScript): def execute_cli(self): r = self.get_inv_from_version() - ports = self.profile.fill_ports(self) + ports = self.fill_ports() for p in ports: i = { "type": self.type[p["cfgtype"]], -- GitLab