Commit 9baf56b2 authored by bee26's avatar bee26
Browse files

Merge branch 'qtech_qos_version' into 'master'

Fix Qtech.QOS.get_version script

See merge request noc/noc!2276

(cherry picked from commit 854c7f82)

bf0017b8 Fix Qtech.QOS.get_version script
parent bfeac212
......@@ -2,12 +2,13 @@
# ---------------------------------------------------------------------
# Qtech.QOS.get_version
# ---------------------------------------------------------------------
# Copyright (C) 2007-2017 The NOC Project
# Copyright (C) 2007-2019 The NOC Project
# See LICENSE for details
# ---------------------------------------------------------------------
# Python modules
import re
# NOC modules
from noc.core.script.base import BaseScript
from noc.sa.interfaces.igetversion import IGetVersion
......@@ -24,15 +25,15 @@ class Script(BaseScript):
r"^Bootstrap Version: (?P<bootprom>\S+)\s*\n"
r"^Software Version: QOS_(?P<version>\S+)\s*\n"
r"^PCB Version: .+\n"
r"^FPGA Version: .+\n"
r"(^FPGA Version: .+\n)?"
r"^CPLD Version: .+\n"
r"^QOS Version: .+\n"
r"^BOM Version: .+\n"
r"(^BOM Version: .+\n)?"
r"^Compiled .+\n"
r"^\s*\n"
r"^System MacAddress: (?P<mac>\S+)\s*\n"
r"^Serial number: (?P<serial>\S+)\s*\n",
re.MULTILINE
re.MULTILINE,
)
def execute(self):
......@@ -45,6 +46,6 @@ class Script(BaseScript):
"attributes": {
"Boot PROM": match.group("bootprom"),
"HW version": match.group("hardware"),
"Serial Number": match.group("serial")
}
"Serial Number": match.group("serial"),
},
}
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