Commit 48790d97 authored by Andrey Vertiprahov's avatar Andrey Vertiprahov
Browse files

Fix Siklu.EH.get_inventory filter empty part_no.

parent 0f71f292
Pipeline #8183 passed with stages
in 5 minutes and 55 seconds
......@@ -5,13 +5,12 @@
# Copyright (C) 2007-2016 The NOC Project
# See LICENSE for details
# ---------------------------------------------------------------------
# Python modules
import re
# NOC modules
from noc.core.script.base import BaseScript
from noc.sa.interfaces.igetinventory import IGetInventory
from noc.sa.interfaces.base import InterfaceTypeError
class Script(BaseScript):
......@@ -41,11 +40,14 @@ class Script(BaseScript):
vendor = match.group("vendor").upper()
else:
vendor = "NONAME"
part_no = match.group("part_no")
if not part_no:
continue
p = {
"type": match.group("type").upper(),
"number": int(match.group("number") or 0),
"vendor": vendor,
"part_no": match.group("part_no"),
"part_no": part_no,
"revision": match.group("revision"),
"description": match.group("description")
}
......
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