Commit ba6a16f2 authored by bee26's avatar bee26 Committed by Andrey Vertiprahov

add_get_capabilities_AlliedTelesis.AT9900

parent bf79b157
# -*- coding: utf-8 -*-
# ---------------------------------------------------------------------
# AlliedTelesis.AT9900.get_capabilities
# ---------------------------------------------------------------------
# Copyright (C) 2007-2020 The NOC Project
# See LICENSE for details
# ---------------------------------------------------------------------
# NOC modules
from noc.sa.profiles.Generic.get_capabilities import Script as BaseScript
from noc.sa.profiles.Generic.get_capabilities import false_on_cli_error
from noc.core.mib import mib
class Script(BaseScript):
name = "AlliedTelesis.AT9900.get_capabilities"
def has_lldp_snmp(self):
"""
Check box has lldp enabled
"""
for v, r in self.snmp.getnext(mib["LLDP-MIB::lldpPortConfigAdminStatus"], bulk=False):
if r != 4:
return True
return False
@false_on_cli_error
def has_lldp_cli(self):
"""
Check box has lldp enabled
"""
cmd = self.cli("show config dynamic", ignore_errors=True)
return "enable lldp" in cmd
Markdown is supported
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