diff --git a/docs/src/en/profiles/TPLink.EAP.rst b/docs/src/en/profiles/TPLink.EAP.rst new file mode 100644 index 0000000000000000000000000000000000000000..61c80a37aa9d46068079d7613cc5598948d802b1 --- /dev/null +++ b/docs/src/en/profiles/TPLink.EAP.rst @@ -0,0 +1,14 @@ +.. _profile-TPLink.EAP: + +============= +TPLink.EAP +============= + +.. contents:: On this page + :local: + :backlinks: none + :depth: 1 + :class: singlecol + +.. todo:: + Describe *TPLink.EAP* profile diff --git a/sa/profiles/TPLink/EAP/__init__.py b/sa/profiles/TPLink/EAP/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/sa/profiles/TPLink/EAP/get_chassis_id.py b/sa/profiles/TPLink/EAP/get_chassis_id.py new file mode 100644 index 0000000000000000000000000000000000000000..5d265983644b5d4258895151422e253224e8b134 --- /dev/null +++ b/sa/profiles/TPLink/EAP/get_chassis_id.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# --------------------------------------------------------------------- +# TPLink.EAP.get_chassis_id +# --------------------------------------------------------------------- +# Copyright (C) 2007-2019 The NOC Project +# See LICENSE for details +# --------------------------------------------------------------------- + + +# NOC modules +from noc.sa.profiles.Generic.get_chassis_id import Script as BaseScript +from noc.sa.interfaces.igetchassisid import IGetChassisID +from noc.core.mib import mib + + +class Script(BaseScript): + name = "TPLink.EAP.get_chassis_id" + cache = True + interface = IGetChassisID + + SNMP_GETNEXT_OIDS = {"SNMP": [mib["IF-MIB::ifPhysAddress"]]} diff --git a/sa/profiles/TPLink/EAP/get_fqdn.py b/sa/profiles/TPLink/EAP/get_fqdn.py new file mode 100644 index 0000000000000000000000000000000000000000..d09c1dc32b6e3fbc36fed8d45f5e89d2280a6895 --- /dev/null +++ b/sa/profiles/TPLink/EAP/get_fqdn.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +# --------------------------------------------------------------------- +# TPLink.EAP.get_config +# --------------------------------------------------------------------- +# Copyright (C) 2007-2018 The NOC Project +# See LICENSE for details +# --------------------------------------------------------------------- + +# NOC modules +from noc.core.script.base import BaseScript +from noc.sa.interfaces.igetfqdn import IGetFQDN + + +class Script(BaseScript): + name = "TPLink.EAP.get_fqdn" + interface = IGetFQDN + + def execute_snmp(self, **kwargs): + v = self.snmp.get("1.3.6.1.2.1.1.5.0", cached=True) + if v: + return v + raise self.NotSupportedError diff --git a/sa/profiles/TPLink/EAP/get_version.py b/sa/profiles/TPLink/EAP/get_version.py new file mode 100644 index 0000000000000000000000000000000000000000..29a31229c361d709f9569875856e4001f2c14a46 --- /dev/null +++ b/sa/profiles/TPLink/EAP/get_version.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# --------------------------------------------------------------------- +# TPLink.EAP.get_version +# --------------------------------------------------------------------- +# Copyright (C) 2007-2018 The NOC Project +# See LICENSE for details +# --------------------------------------------------------------------- + +# NOC modules +from noc.core.script.base import BaseScript +from noc.sa.interfaces.igetversion import IGetVersion + + +class Script(BaseScript): + name = "TPLink.EAP.get_version" + interface = IGetVersion + cache = True + + def execute_snmp(self): + platform = self.snmp.get("1.3.6.1.4.1.11863.10.1.10.3.0", cached=True) + version = self.snmp.get("1.3.6.1.4.1.11863.10.1.10.5.0", cached=True) + result = {"vendor": "TPLink", "version": version, "platform": platform} + return result diff --git a/sa/profiles/TPLink/EAP/profile.py b/sa/profiles/TPLink/EAP/profile.py new file mode 100644 index 0000000000000000000000000000000000000000..0ac68aa2b741d50811e5ba7469238e18b3e90135 --- /dev/null +++ b/sa/profiles/TPLink/EAP/profile.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- +# --------------------------------------------------------------------- +# Vendor: TPLink +# OS: EAP +# --------------------------------------------------------------------- +# Copyright (C) 2007-2016 The NOC Project +# See LICENSE for details +# --------------------------------------------------------------------- + +# NOC modules +from noc.core.profile.base import BaseProfile + + +class Profile(BaseProfile): + name = "TPLink.EAP"