Verified Commit c6c71459 authored by Andrey Vertiprahov's avatar Andrey Vertiprahov
Browse files

ZTE.ZXDSL98xx.get_inventory. Fix fill_ports method use from profile.

parent 5d1af19c
Pipeline #37301 passed with stages
in 26 minutes and 1 second
......@@ -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)
......
......@@ -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"]],
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment