Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
arthur-zzz
noc
Commits
bf0017b8
Commit
bf0017b8
authored
Jul 02, 2019
by
Dmitry Lukhtionov
Browse files
Fix Qtech.QOS.get_version script
parent
f846547c
Changes
1
Hide whitespace changes
Inline
Side-by-side
sa/profiles/Qtech/QOS/get_version.py
View file @
bf0017b8
...
...
@@ -2,12 +2,13 @@
# ---------------------------------------------------------------------
# Qtech.QOS.get_version
# ---------------------------------------------------------------------
# Copyright (C) 2007-201
7
The NOC Project
# Copyright (C) 2007-201
9
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"
)
,
}
,
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment