Commit f008e705 authored by MaksimSmile13's avatar MaksimSmile13

Add Fake Cisco

parent fc2b4402
# -*- coding: utf-8 -*-
# ----------------------------------------------------------------------
# Rotek.BT.get_interfaces
# ----------------------------------------------------------------------
# Copyright (C) 2007-2017 The NOC Project
# See LICENSE for details
# ----------------------------------------------------------------------
# NOC modules
from noc.core.script.base import BaseScript
from noc.sa.interfaces.igetinterfaces import IGetInterfaces
class Script(BaseScript):
name = "Cisco.Fake.get_interfaces"
interface = IGetInterfaces
cache = True
def execute_cli(self):
interfaces = []
for i in range(1,9):
iface = {
"name": "Fa 0/%s" % i,
"admin_status": True,
"oper_status": True,
"type": "physical",
"enabled_protocols": [],
"subinterfaces":[]
}
interfaces += [iface]
gi_face = {
"name": "Gi 0/1",
"admin_status": True,
"oper_status": True,
"type": "physical",
"enabled_protocols": [],
"subinterfaces":[]
}
interfaces += [gi_face]
return [{"interfaces": interfaces}]
# -*- coding: utf-8 -*-
# ---------------------------------------------------------------------
# Rotek.BT.get_version
# ---------------------------------------------------------------------
# Copyright (C) 2007-2017 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 = "Cisco.Fake.get_version"
interface = IGetVersion
def execute_cli(self):
result = {
"vendor": "Cisco",
"version": "12.2(35)SE5",
"platform": "WS-C2960-8TC-L"}
return result
# -*- coding: utf-8 -*-
# ---------------------------------------------------------------------
# Vendor: Eltex
# OS: UEP
# ---------------------------------------------------------------------
# Copyright (C) 2007-2018 The NOC Project
# See LICENSE for details
# ---------------------------------------------------------------------
from noc.core.profile.base import BaseProfile
class Profile(BaseProfile):
name = "Cisco.Fake"
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