Commit 129d3056 authored by kk's avatar kk
Browse files

Alcatel.7302 fix empty b_serial, b_revision. fix port_map

parent c195f983
Pipeline #20414 passed with stages
in 14 minutes and 10 seconds
......@@ -2,7 +2,7 @@
# ---------------------------------------------------------------------
# Alcatel.7302.get_inventory
# ---------------------------------------------------------------------
# Copyright (C) 2007-2019 The NOC Project
# Copyright (C) 2007-2020 The NOC Project
# See LICENSE for details
# ---------------------------------------------------------------------
......@@ -15,11 +15,12 @@ class Script(BaseScript):
name = "Alcatel.7302.get_inventory"
interface = IGetInventory
port_map = {
7: "7330",
14: "7330",
18: "7302",
19: "7302",
21: "7302",
} # show equipment slot for devices with one control plate return 19 slots
} # show equipment slot for 7302 with one control plate return 19 slots
def execute_snmp(self, **kwargs):
r = []
......@@ -34,6 +35,10 @@ class Script(BaseScript):
slots += 1
if b_type == "EMPTY":
continue
if b_revision is None:
b_revision = ""
if b_serial is None:
b_serial = ""
r += [
{
"num": slots,
......
......@@ -2,7 +2,7 @@
# ----------------------------------------------------------------------
# Alcatel.7302.get_version
# ----------------------------------------------------------------------
# Copyright (C) 2007-2019 The NOC Project
# Copyright (C) 2007-2020 The NOC Project
# See LICENSE for details
# ----------------------------------------------------------------------
......@@ -25,10 +25,11 @@ class Script(BaseScript):
port_map = {
7: "7330",
14: "7330",
18: "7302",
19: "7302",
21: "7302",
} # show equipment slot for devices with one control plate return 19 slots
} # show equipment slot for 7302 with one control plate return 19 slots
def execute_cli(self, **kwargs):
self.cli("environment inhibit-alarms mode batch", ignore_errors=True)
......
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