├── .github └── workflows │ └── php.yml ├── .gitignore ├── CODE_OF_CONDUCT.md ├── LICENSE ├── README.md ├── bin ├── connection.conf.yml └── console ├── composer.dev.json ├── composer.json ├── configs ├── models │ ├── Alcatel-switches.yml │ ├── AlliedTelesis.yml │ ├── Arista.yml │ ├── BDcom.yml │ ├── C-Data.yml │ ├── Cisco-switches.yml │ ├── DCN.yml │ ├── DES1210series.yml │ ├── DES1228-me.yml │ ├── DES30xx-series.yml │ ├── DES3200-series.yml │ ├── DES35xx-series.yml │ ├── DGS1100-series.yml │ ├── DGS1210series.yml │ ├── DGS1510series.yml │ ├── DGS3000-series.yml │ ├── DGS3100-series.yml │ ├── DGS3120-series.yml │ ├── DGS3420-series.yml │ ├── DGS3600series.yml │ ├── Dell-switches.yml │ ├── Edgecore.yml │ ├── Eltex-switches.yml │ ├── ExtremeXOS.yml │ ├── HP-switches.yml │ ├── Huawei.yml │ ├── HuaweiOLT.yml │ ├── Juniper.yml │ ├── Mikrotik-CRS.yml │ ├── Mikrotik-RouterOS.yml │ ├── Raisecom.yml │ ├── VSolution.yml │ ├── ZTE-C-series.yml │ ├── ZZZ_ApplyNet.yml │ ├── ZZ_GeneralSnmpDevices.yml │ ├── equicom.yml │ ├── gcom.yml │ ├── tplink-switches.yml │ └── ubnt-switches.yml ├── modules.yml ├── oids │ ├── applynet.yml │ ├── arista │ │ └── defaults.yml │ ├── bdcom │ │ ├── 3310b.yml │ │ ├── 3310c.yml │ │ └── gp3600.yml │ ├── cdata │ │ ├── fd-1100-series.yml │ │ ├── fd-1208s-r1.yml │ │ ├── fd-epon-series.yml │ │ └── fd-gpon-series.yml │ ├── dcn │ │ └── defaults.yml │ ├── dlink │ │ ├── common-agent-info.yml │ │ ├── common-diag-cable.yml │ │ ├── des-1210-28-me-b2.yml │ │ ├── des-1228me.yml │ │ ├── des-3026.yml │ │ ├── des-3028.yml │ │ ├── des-3028G.yml │ │ ├── des-3052.yml │ │ ├── des-3200-10-a1.yml │ │ ├── des-3200-10-c1.yml │ │ ├── des-3200-18-a1.yml │ │ ├── des-3200-18-c1.yml │ │ ├── des-3200-26-a1.yml │ │ ├── des-3200-26-c1.yml │ │ ├── des-3200-28-a1.yml │ │ ├── des-3200-28-c1.yml │ │ ├── des-3200-28F-a1.yml │ │ ├── des-3200-28F-c1.yml │ │ ├── des-3200-52-c1.yml │ │ ├── des-3200-c1-diag.yml │ │ ├── des-3526.yml │ │ ├── des-3528.yml │ │ ├── dgs-1100-06-me-a1.yml │ │ ├── dgs-1100-10-me.yml │ │ ├── dgs-1210-10-me-a1.yml │ │ ├── dgs-1210-12ts-me-b1.yml │ │ ├── dgs-1210-20-me-a1.yml │ │ ├── dgs-1210-20-me-b1.yml │ │ ├── dgs-1210-28-me-a2.yml │ │ ├── dgs-1210-28-me-b1.yml │ │ ├── dgs-1210-28xs-me-b1.yml │ │ ├── dgs-1510-20l-me.yml │ │ ├── dgs-3000-10tc.yml │ │ ├── dgs-3000-26tc.yml │ │ ├── dgs-3000-28l.yml │ │ ├── dgs-3100-24tg.yml │ │ ├── dgs-3120-24sc-a2.yml │ │ ├── dgs-3120-24sc-bx.yml │ │ ├── dgs-3420-26sc-b1.yml │ │ ├── dgs-3420-28sc-b1.yml │ │ └── dgs-3612g.yml │ ├── edgecore │ │ ├── ecs3510.yml │ │ ├── ecs4120.yml │ │ ├── ecs4510.yml │ │ ├── es3510mav2.yml │ │ ├── es3528m.yml │ │ ├── es3552m.yml │ │ └── es4612.yml │ ├── eltex │ │ └── eltex-mes.yml │ ├── equicom │ │ └── ping3.yml │ ├── gcom │ │ └── el5610.yml │ ├── global.oids.yml │ ├── huawei │ │ ├── s2326tp.yml │ │ └── smartax.yml │ ├── juniper.yml │ ├── mikrotik │ │ └── ros14988.yml │ ├── raisecom │ │ └── iscom2600.yml │ ├── vsolution │ │ ├── v1600d.yml │ │ └── v1600g.yml │ ├── xos.yml │ └── zte │ │ ├── ZTE-C300_fw1.2.yml │ │ ├── ZTE-C300_fw2.1.yml │ │ └── ZTE-C600.yml └── traps │ ├── bdcom.yml │ ├── cdata.yml │ ├── global.yml │ └── huawei.yml ├── docs ├── DEVICES.md ├── MODULES.md ├── device_info.html ├── generate-device-list-with-modules.php ├── generate-html-doc.php ├── generate-modules-list.php ├── modules_example_output │ ├── address_list_info.json │ ├── arp_info.json │ ├── arp_ping.json │ ├── cable_diag.json │ ├── clear_counters.json │ ├── counters.json │ ├── ctrl_port_descr.json │ ├── dhcp_server_info.json │ ├── errors.json │ ├── fdb.json │ ├── interface_vlan_info.json │ ├── interfaces_list.json │ ├── interfaces_status.json │ ├── lease_info.json │ ├── link_info.json │ ├── pon_fdb.json │ ├── pon_interface_info.json │ ├── pon_interfaces_list.json │ ├── pon_interfaces_tree.json │ ├── pon_onts_general_info.json │ ├── pon_onts_mac_addr.json │ ├── pon_onts_optical.json │ ├── pon_onts_status.json │ ├── pon_onts_status_detailed.json │ ├── pon_registered_onts.json │ ├── pvid.json │ ├── rmon.json │ ├── save_config.json │ ├── simple_queue_info.json │ ├── system.json │ ├── vlans.json │ ├── vlans_by_port.json │ ├── zte_card_list.json │ ├── zte_fdb.json │ ├── zte_interfaces.json │ ├── zte_onu_info.json │ ├── zte_onu_signal_strength.json │ ├── zte_onu_state_by_interface.json │ └── zte_unregistered_onu.json └── zte │ └── img.png ├── examples ├── core_module_param_testing.php └── parse_pon_port_info.php ├── phpunit.xml ├── src ├── Config │ ├── Collector.php │ ├── ModelCollector.php │ ├── ModuleCollector.php │ ├── Objects │ │ ├── Model.php │ │ ├── Module.php │ │ ├── Oid.php │ │ └── Trap.php │ ├── OidCollector.php │ ├── Reader.php │ └── TrapCollector.php ├── Dev │ ├── AbstractCommand.php │ ├── SwitcherCoreCallModuleCommand.php │ └── SwitcherCoreModules.php ├── Exceptions │ ├── IncompleteResponseException.php │ ├── ModuleErrorLoadException.php │ ├── ModuleNotFoundException.php │ ├── NoSuchInstanceException.php │ └── TrapDeclarationNotFoundByObject.php ├── Helpers │ └── IntHelper.php ├── Modules │ ├── AbstractModule.php │ ├── AlcatelSwitch │ │ ├── CableDiag.php │ │ ├── ClearIfaceCounters.php │ │ ├── Counters.php │ │ ├── Descriptions.php │ │ ├── Errors.php │ │ ├── Fdb.php │ │ ├── InterfacesList.php │ │ ├── InterfacesTrait.php │ │ ├── LinkInfo.php │ │ ├── LldpInfo.php │ │ ├── MultiRawConsoleCommand.php │ │ ├── ParseInterface.php │ │ ├── PvidDot1q.php │ │ ├── RawConsoleCommand.php │ │ ├── Rmon.php │ │ ├── SetPortDescription.php │ │ ├── StatePortControl.php │ │ ├── SysResources.php │ │ ├── System.php │ │ ├── VlanByPorts.php │ │ └── VlansDot1q.php │ ├── AlliedTelesisSwitch │ │ ├── Counters.php │ │ ├── Descriptions.php │ │ ├── Errors.php │ │ ├── Fdb.php │ │ ├── InterfacesList.php │ │ ├── InterfacesTrait.php │ │ ├── LinkInfo.php │ │ ├── LldpInfo.php │ │ ├── MultiRawConsoleCommand.php │ │ ├── ParseInterface.php │ │ ├── PvidDot1q.php │ │ ├── RawConsoleCommand.php │ │ ├── Rmon.php │ │ ├── SetPortDescription.php │ │ ├── StatePortControl.php │ │ ├── System.php │ │ ├── VlanByPorts.php │ │ └── VlansDot1q.php │ ├── ApplyNet │ │ ├── Counters.php │ │ ├── Fdb.php │ │ ├── InterfacesList.php │ │ ├── InterfacesTrait.php │ │ ├── LinkInfo.php │ │ ├── ParseInterface.php │ │ ├── StatePortControl.php │ │ └── System.php │ ├── Arista │ │ ├── Counters.php │ │ ├── Descriptions.php │ │ ├── Errors.php │ │ ├── Fdb.php │ │ ├── InterfacesList.php │ │ ├── InterfacesTrait.php │ │ ├── LinkInfo.php │ │ ├── LldpInfo.php │ │ ├── MultiRawConsoleCommand.php │ │ ├── NetSettings.php │ │ ├── ParseInterface.php │ │ ├── PvidDot1q.php │ │ ├── RawConsoleCommand.php │ │ ├── Rmon.php │ │ ├── System.php │ │ ├── SystemResources.php │ │ ├── VlanByPorts.php │ │ └── VlansDot1q.php │ ├── BDcom │ │ ├── BDcomAbstractModule.php │ │ ├── DescriptionControl.php │ │ ├── FdbTableConsole.php │ │ ├── GP3600 │ │ │ ├── BDcomAbstractModule.php │ │ │ ├── CtrlOntDescription.php │ │ │ ├── CtrlOntDisable.php │ │ │ ├── FdbTable.php │ │ │ ├── FdbTableConsole.php │ │ │ ├── GponProfiles.php │ │ │ ├── InterfaceCounters.php │ │ │ ├── InterfaceCountersNew.php │ │ │ ├── InterfaceDescriptions.php │ │ │ ├── InterfacesList.php │ │ │ ├── LinkInfo.php │ │ │ ├── LldpInfo.php │ │ │ ├── OntDelete.php │ │ │ ├── OntListWithStatuses.php │ │ │ ├── OntOpticalInfo.php │ │ │ ├── OntReasons.php │ │ │ ├── OntReboot.php │ │ │ ├── OntSerial.php │ │ │ ├── OntVendorInfo.php │ │ │ ├── ParseInterface.php │ │ │ ├── PonPortsList.php │ │ │ ├── PonPortsOptical.php │ │ │ ├── PortCountRegisteredOnts.php │ │ │ ├── PortDescriptionControl.php │ │ │ ├── PowerStatus.php │ │ │ ├── SystemInformation.php │ │ │ ├── SystemResources.php │ │ │ ├── UniInterfacesControlAdminStatus.php │ │ │ ├── UniInterfacesStatus.php │ │ │ ├── UniInterfacesVlans.php │ │ │ ├── UnregisteredOnts.php │ │ │ └── VlanList.php │ │ ├── InterfaceCounters.php │ │ ├── InterfaceCountersNew.php │ │ ├── InterfaceDescriptions.php │ │ ├── InterfacesList.php │ │ ├── LinkInfo.php │ │ ├── LldpInfo.php │ │ ├── MultiRawConsoleCommand.php │ │ ├── OltSaveSettings.php │ │ ├── OntDelete.php │ │ ├── OntListWithStatuses.php │ │ ├── OntMacAddress.php │ │ ├── OntOpticalInfo.php │ │ ├── OntReasons.php │ │ ├── OntReboot.php │ │ ├── OntReset.php │ │ ├── OntVendorInfo.php │ │ ├── P3310B │ │ │ ├── OntReasons.php │ │ │ └── OntVendorInfo.php │ │ ├── P3608B │ │ │ └── OntOpticalInfo.php │ │ ├── ParseInterface.php │ │ ├── PonPortsList.php │ │ ├── PonPortsOptical.php │ │ ├── PortCountRegisteredOnts.php │ │ ├── RateLimits.php │ │ ├── RawConsoleCommand.php │ │ ├── SystemInformation.php │ │ ├── SystemResources.php │ │ ├── UniInterfacesControlAdminStatus.php │ │ ├── UniInterfacesStatus.php │ │ ├── UniInterfacesVlans.php │ │ ├── UnregisteredOnts.php │ │ └── Vlans.php │ ├── CData │ │ ├── CDataAbstractModule.php │ │ ├── CtrlOntDescription.php │ │ ├── EponOntInterfaceCounters.php │ │ ├── FD11XX │ │ │ ├── CDataAbstractModule.php │ │ │ ├── CtrlOntDescription.php │ │ │ ├── InterfaceCounters.php │ │ │ ├── InterfaceDescriptions.php │ │ │ ├── LinkInfo.php │ │ │ ├── OltSaveSettings.php │ │ │ ├── OntDelete.php │ │ │ ├── OntFDBTable.php │ │ │ ├── OntInterfaceCounters.php │ │ │ ├── OntListWithStatuses.php │ │ │ ├── OntMacAddress.php │ │ │ ├── OntOpticalInfo.php │ │ │ ├── OntReasons.php │ │ │ ├── OntReboot.php │ │ │ ├── OntReset.php │ │ │ ├── OntUniPortsStatus.php │ │ │ ├── OntVendorInfo.php │ │ │ ├── ParseInterface.php │ │ │ ├── PonPortsList.php │ │ │ ├── PonPortsOptical.php │ │ │ ├── PortCountRegisteredOnts.php │ │ │ ├── PortDescriptionControl.php │ │ │ ├── SystemInformation.php │ │ │ ├── SystemResources.php │ │ │ ├── UniInterfacesControlAdminStatus.php │ │ │ └── Vlans.php │ │ ├── FD16xxV3 │ │ │ ├── CDataAbstractModuleFD16xxV3.php │ │ │ ├── CtrlOntDescription.php │ │ │ ├── FdbTableConsoleFD1616.php │ │ │ ├── GponOntSerial.php │ │ │ ├── InterfaceCountersFD16.php │ │ │ ├── InterfaceDescriptionsFD16.php │ │ │ ├── InterfacesList.php │ │ │ ├── LinkInfo.php │ │ │ ├── MultiRawConsoleCommand.php │ │ │ ├── OltSaveSettings.php │ │ │ ├── OntDeleteGpon.php │ │ │ ├── OntListWithStatuses.php │ │ │ ├── OntOpticalInfoFD16.php │ │ │ ├── OntReasons.php │ │ │ ├── OntRebootTelnetGpon.php │ │ │ ├── OntResetTelnetGpon.php │ │ │ ├── OntUniClearCounters.php │ │ │ ├── OntUniPortsStatus.php │ │ │ ├── OntVendorInfo.php │ │ │ ├── ParseInterface.php │ │ │ ├── PonOntsConfiguration.php │ │ │ ├── PonPortsList.php │ │ │ ├── PortCountRegisteredOnts.php │ │ │ ├── PortDescriptionControl.php │ │ │ ├── RawConsoleCommand.php │ │ │ ├── SnmpUnregisteredOnts.php │ │ │ ├── SystemInformation.php │ │ │ ├── SystemResources.php │ │ │ ├── UniInterfacesControlAdminStatus.php │ │ │ ├── UnregisteredOnts.php │ │ │ └── Vlans.php │ │ ├── FdbTableConsole.php │ │ ├── FdbTableConsoleFD1616.php │ │ ├── GetProfiles.php │ │ ├── GponOntFdbTable.php │ │ ├── GponOntSerial.php │ │ ├── InterfaceCountersFD12.php │ │ ├── InterfaceCountersFD16.php │ │ ├── InterfaceDescriptions.php │ │ ├── InterfaceDescriptionsFD12.php │ │ ├── InterfaceDescriptionsFD16.php │ │ ├── InterfacesList.php │ │ ├── LinkInfo.php │ │ ├── LldpInfo.php │ │ ├── MultiRawConsoleCommand.php │ │ ├── OltSaveSettings.php │ │ ├── OntDelete.php │ │ ├── OntDeleteGpon.php │ │ ├── OntFDBTable.php │ │ ├── OntInterfaceCounters.php │ │ ├── OntListWithStatuses.php │ │ ├── OntMacAddress.php │ │ ├── OntOpticalInfo.php │ │ ├── OntOpticalInfoFD16.php │ │ ├── OntReasons.php │ │ ├── OntReboot.php │ │ ├── OntRebootTelnetGpon.php │ │ ├── OntReset.php │ │ ├── OntResetTelnetGpon.php │ │ ├── OntUniClearCounters.php │ │ ├── OntUniPortsStatus.php │ │ ├── OntVendorInfo.php │ │ ├── ParseInterface.php │ │ ├── PonOntsConfiguration.php │ │ ├── PonPortsList.php │ │ ├── PortCountRegisteredOnts.php │ │ ├── PortDescriptionControl.php │ │ ├── RawConsoleCommand.php │ │ ├── SystemInformation.php │ │ ├── SystemResources.php │ │ ├── UniInterfacesControlAdminStatus.php │ │ ├── UnregisteredOnts.php │ │ └── Vlans.php │ ├── CiscoSwitch │ │ ├── CableDiag.php │ │ ├── Counters.php │ │ ├── Descriptions.php │ │ ├── Errors.php │ │ ├── Fdb.php │ │ ├── InterfacesList.php │ │ ├── InterfacesTrait.php │ │ ├── LinkInfo.php │ │ ├── LldpInfo.php │ │ ├── ParseInterface.php │ │ ├── PvidDot1q.php │ │ ├── Rmon.php │ │ ├── SetPortDescription.php │ │ ├── StatePortControl.php │ │ ├── SysResources.php │ │ ├── System.php │ │ ├── VlanByPorts.php │ │ └── VlansDot1q.php │ ├── DCN │ │ ├── Counters.php │ │ ├── Descriptions.php │ │ ├── Errors.php │ │ ├── Fdb.php │ │ ├── InterfacesList.php │ │ ├── InterfacesTrait.php │ │ ├── LinkInfo.php │ │ ├── LldpInfo.php │ │ ├── MultiRawConsoleCommand.php │ │ ├── NetSettings.php │ │ ├── ParseInterface.php │ │ ├── PvidDot1q.php │ │ ├── RawConsoleCommand.php │ │ ├── Rmon.php │ │ ├── System.php │ │ ├── SystemResources.php │ │ ├── VlanByPorts.php │ │ └── VlansDot1q.php │ ├── DellSwitch │ │ ├── ArpInfo.php │ │ ├── BgpInfo.php │ │ ├── BgpPeers.php │ │ ├── CableDiag.php │ │ ├── Counters.php │ │ ├── Descriptions.php │ │ ├── DirectRoutes.php │ │ ├── Errors.php │ │ ├── Fdb.php │ │ ├── InterfacesList.php │ │ ├── InterfacesTrait.php │ │ ├── LinkInfo.php │ │ ├── LldpInfo.php │ │ ├── MultiRawConsoleCommand.php │ │ ├── ParseInterface.php │ │ ├── PvidDot1q.php │ │ ├── RawConsoleCommand.php │ │ ├── Rmon.php │ │ ├── SetPortDescription.php │ │ ├── StatePortControl.php │ │ ├── SysResources.php │ │ ├── System.php │ │ ├── VlanByPorts.php │ │ └── VlansDot1q.php │ ├── Dlink │ │ ├── CableDiag │ │ │ ├── Des3526Parser.php │ │ │ ├── DlinkDgs1100Parser.php │ │ │ ├── DlinkParser.php │ │ │ └── NoMediumType.php │ │ ├── ClearCounters.php │ │ ├── ClearCountersDGS1100.php │ │ ├── Counters │ │ │ ├── DGS3100.php │ │ │ └── DefaultParser.php │ │ ├── DescriptionPortControl.php │ │ ├── Errors │ │ │ └── DefaultParser.php │ │ ├── ExecLineCtrl.php │ │ ├── Fdb │ │ │ ├── ByVlanParser.php │ │ │ └── DefaultParser.php │ │ ├── InterfacesList.php │ │ ├── InterfacesTrait.php │ │ ├── Link │ │ │ ├── DefaultParser.php │ │ │ ├── Descriptions.php │ │ │ ├── DlinkDGS3100.php │ │ │ ├── DlinkDes3526Parser.php │ │ │ ├── DlinkDgs1100Parser.php │ │ │ ├── DlinkDgs1210Parser.php │ │ │ ├── DlinkDgs3420Parser.php │ │ │ ├── DlinkParser.php │ │ │ └── NoMediumTypeParser.php │ │ ├── LldpInfo.php │ │ ├── MultiRawConsoleCommand.php │ │ ├── ParseInterface.php │ │ ├── RawConsoleCommand.php │ │ ├── Reboot.php │ │ ├── Rmon │ │ │ └── DefaultParser.php │ │ ├── SaveConfig.php │ │ ├── SfpDiag │ │ │ └── DefaultParser.php │ │ ├── SpeedPortControl.php │ │ ├── StatePortControl.php │ │ ├── SwitchesPortAbstractModule.php │ │ ├── System │ │ │ ├── DGS1100SystemResources.php │ │ │ ├── DGS1210SystemResources.php │ │ │ ├── DGS3100SystemResources.php │ │ │ ├── DefaultParser.php │ │ │ └── SystemResources.php │ │ ├── Vlan │ │ │ ├── DlinkVlanParser.php │ │ │ ├── PvidParser.php │ │ │ └── VlanByPorts.php │ │ ├── VlanPortControl.php │ │ └── VlanStateControl.php │ ├── Edgecore │ │ ├── CableDiag.php │ │ ├── CableDiagES3510.php │ │ ├── CableDiagOnlyByPort.php │ │ ├── ClearCounters.php │ │ ├── Counters.php │ │ ├── Descriptions.php │ │ ├── Errors.php │ │ ├── Fdb.php │ │ ├── InterfacesList.php │ │ ├── InterfacesTrait.php │ │ ├── LinkInfo.php │ │ ├── LldpInfo.php │ │ ├── MultiRawConsoleCommand.php │ │ ├── ParseInterface.php │ │ ├── PvidDot1q.php │ │ ├── RawConsoleCommand.php │ │ ├── Reboot.php │ │ ├── Rmon.php │ │ ├── SetPortDescription.php │ │ ├── SfpDiag.php │ │ ├── SfpMediaInfo.php │ │ ├── SfpOpticalInfo.php │ │ ├── StatePortControl.php │ │ ├── SysResources.php │ │ ├── System.php │ │ ├── VlanByPorts.php │ │ └── VlansDot1q.php │ ├── EltexSwitch │ │ ├── CableDiag.php │ │ ├── ClearIfaceCounters.php │ │ ├── Counters.php │ │ ├── Descriptions.php │ │ ├── Errors.php │ │ ├── Fdb.php │ │ ├── InterfacesList.php │ │ ├── InterfacesTrait.php │ │ ├── LinkInfo.php │ │ ├── LldpInfo.php │ │ ├── MultiRawConsoleCommand.php │ │ ├── ParseInterface.php │ │ ├── PvidDot1q.php │ │ ├── RawConsoleCommand.php │ │ ├── Rmon.php │ │ ├── SetPortDescription.php │ │ ├── StatePortControl.php │ │ ├── SysResources.php │ │ ├── System.php │ │ ├── VlanByPorts.php │ │ ├── VlansDot1q.php │ │ └── WalkerOverGet.php │ ├── ExtremeXOS │ │ ├── ArpInfo.php │ │ ├── BgpInfo.php │ │ ├── BgpPeers.php │ │ ├── Counters.php │ │ ├── Descriptions.php │ │ ├── DirectRoutes.php │ │ ├── Errors.php │ │ ├── Fdb.php │ │ ├── InterfacesList.php │ │ ├── InterfacesTrait.php │ │ ├── LinkInfo.php │ │ ├── LldpInfo.php │ │ ├── MultiRawConsoleCommand.php │ │ ├── ParseInterface.php │ │ ├── PvidDot1q.php │ │ ├── RawConsoleCommand.php │ │ ├── Rmon.php │ │ ├── SetPortDescription.php │ │ ├── SysResources.php │ │ ├── System.php │ │ ├── VlanByPorts.php │ │ ├── VlanList.php │ │ ├── VlansDot1q.php │ │ └── WalkerOverGet.php │ ├── GCOM │ │ ├── CtrlOntDescription.php │ │ ├── CtrlOntDisable.php │ │ ├── FdbTable.php │ │ ├── GCOMAbstractModule.php │ │ ├── InterfaceCounters.php │ │ ├── InterfaceDescriptions.php │ │ ├── InterfacesList.php │ │ ├── LinkInfo.php │ │ ├── MultiRawConsoleCommand.php │ │ ├── OntListWithStatuses.php │ │ ├── OntMacAddress.php │ │ ├── OntOpticalInfo.php │ │ ├── OntReasons.php │ │ ├── OntReset.php │ │ ├── OntVendorInfo.php │ │ ├── ParseInterface.php │ │ ├── PonPortsList.php │ │ ├── PonPortsOptical.php │ │ ├── PortDescriptionControl.php │ │ ├── RawConsoleCommand.php │ │ ├── SystemInformation.php │ │ ├── SystemResources.php │ │ ├── UniInterfacesControlAdminStatus.php │ │ ├── UniInterfacesStatus.php │ │ └── UniInterfacesVlans.php │ ├── General │ │ ├── LldpInfo.php │ │ ├── NetSettings.php │ │ ├── SetDeviceDescription.php │ │ ├── SetDeviceName.php │ │ ├── SupportedModules.php │ │ └── Switches │ │ │ ├── AbstractInterfaces.php │ │ │ ├── Counters.php │ │ │ ├── Descriptions.php │ │ │ ├── Errors.php │ │ │ ├── FdbDot1Bridge.php │ │ │ ├── InterfacesList.php │ │ │ ├── LinkInfo.php │ │ │ ├── MultiRawConsoleCommand.php │ │ │ ├── ParseInterface.php │ │ │ ├── PvidDot1q.php │ │ │ ├── RawConsoleCommand.php │ │ │ ├── Rmon.php │ │ │ ├── SetPortDescription.php │ │ │ ├── StatePortControl.php │ │ │ ├── System.php │ │ │ ├── VlanByPorts.php │ │ │ └── VlansDot1q.php │ ├── HPESwitch │ │ ├── Counters.php │ │ ├── Descriptions.php │ │ ├── Errors.php │ │ ├── Fdb.php │ │ ├── FdbById.php │ │ ├── InterfacesList.php │ │ ├── InterfacesTrait.php │ │ ├── LinkInfo.php │ │ ├── LldpInfo.php │ │ ├── ParseInterface.php │ │ ├── Rmon.php │ │ ├── SetPortDescription.php │ │ ├── StatePortControl.php │ │ ├── System.php │ │ ├── VlanByPorts.php │ │ └── VlansDot1q.php │ ├── Helper.php │ ├── HpArubaOsSwitch │ │ ├── CableDiag.php │ │ ├── Counters.php │ │ ├── Descriptions.php │ │ ├── Errors.php │ │ ├── Fdb.php │ │ ├── InterfacesList.php │ │ ├── InterfacesTrait.php │ │ ├── LinkInfo.php │ │ ├── LldpInfo.php │ │ ├── ParseInterface.php │ │ ├── PvidDot1q.php │ │ ├── Rmon.php │ │ ├── SetPortDescription.php │ │ ├── StatePortControl.php │ │ ├── SysResources.php │ │ ├── System.php │ │ ├── VlanByPorts.php │ │ └── VlansDot1q.php │ ├── HpSwitch │ │ ├── CableDiag.php │ │ ├── Counters.php │ │ ├── Descriptions.php │ │ ├── Errors.php │ │ ├── Fdb.php │ │ ├── InterfacesList.php │ │ ├── InterfacesTrait.php │ │ ├── LinkInfo.php │ │ ├── LldpInfo.php │ │ ├── ParseInterface.php │ │ ├── PvidDot1q.php │ │ ├── Rmon.php │ │ ├── SetPortDescription.php │ │ ├── StatePortControl.php │ │ ├── SysResources.php │ │ ├── System.php │ │ ├── VlanByPorts.php │ │ └── VlansDot1q.php │ ├── Huawei │ │ ├── CableDiag.php │ │ ├── ClearCounters.php │ │ ├── Counters.php │ │ ├── Descriptions.php │ │ ├── Errors.php │ │ ├── Fdb.php │ │ ├── InterfacesList.php │ │ ├── InterfacesTrait.php │ │ ├── LinkInfo.php │ │ ├── LldpInfo.php │ │ ├── MultiRawConsoleCommand.php │ │ ├── ParseInterface.php │ │ ├── PvidDot1q.php │ │ ├── RawConsoleCommand.php │ │ ├── Reboot.php │ │ ├── Rmon.php │ │ ├── SetPortDescription.php │ │ ├── StatePortControl.php │ │ ├── SysResources.php │ │ ├── System.php │ │ ├── VlanByPorts.php │ │ └── VlansDot1q.php │ ├── HuaweiOLT │ │ ├── CardList.php │ │ ├── CardStatus.php │ │ ├── CtrlOntDescription.php │ │ ├── CtrlPortDescription.php │ │ ├── FdbTableConsole.php │ │ ├── GponProfiles.php │ │ ├── HuaweiOLTAbstractModule.php │ │ ├── InterfaceCounters.php │ │ ├── InterfaceDescriptions.php │ │ ├── InterfacesList.php │ │ ├── LinkInfo.php │ │ ├── LldpInfo.php │ │ ├── MultiRawConsoleCommand.php │ │ ├── OltSaveSettings.php │ │ ├── OntConfiguration.php │ │ ├── OntDelete.php │ │ ├── OntDownHistory.php │ │ ├── OntListWithStatuses.php │ │ ├── OntMacAddress.php │ │ ├── OntOpticalInfo.php │ │ ├── OntReasons.php │ │ ├── OntReboot.php │ │ ├── OntResetCounters.php │ │ ├── OntSerial.php │ │ ├── OntVendorInfo.php │ │ ├── ParseInterface.php │ │ ├── PonPortsList.php │ │ ├── PonPortsOptical.php │ │ ├── RawConsoleCommand.php │ │ ├── SystemInformation.php │ │ ├── SystemResources.php │ │ ├── UniInterfacesControlAdminStatus.php │ │ ├── UniInterfacesStatus.php │ │ ├── UniInterfacesVlans.php │ │ ├── UnregisteredOnts.php │ │ └── Vlans.php │ ├── HuaweiQuidwayS93 │ │ ├── Counters.php │ │ ├── Descriptions.php │ │ ├── Errors.php │ │ ├── Fdb.php │ │ ├── InterfacesList.php │ │ ├── InterfacesTrait.php │ │ ├── LinkInfo.php │ │ ├── LldpInfo.php │ │ ├── MultiRawConsoleCommand.php │ │ ├── ParseInterface.php │ │ ├── PvidDot1q.php │ │ ├── RawConsoleCommand.php │ │ ├── Reboot.php │ │ ├── Rmon.php │ │ ├── SetPortDescription.php │ │ ├── StatePortControl.php │ │ ├── SysResources.php │ │ ├── System.php │ │ ├── VlanByPorts.php │ │ └── VlansDot1q.php │ ├── Juniper │ │ ├── ArpInfo.php │ │ ├── BgpInfo.php │ │ ├── BgpPeers.php │ │ ├── Counters.php │ │ ├── Descriptions.php │ │ ├── DirectRoutes.php │ │ ├── Errors.php │ │ ├── Fdb.php │ │ ├── InterfacesList.php │ │ ├── InterfacesTrait.php │ │ ├── LinkInfo.php │ │ ├── LldpInfo.php │ │ ├── MultiRawConsoleCommand.php │ │ ├── ParseInterface.php │ │ ├── PvidDot1q.php │ │ ├── RawConsoleCommand.php │ │ ├── Rmon.php │ │ ├── SetPortDescription.php │ │ ├── StatePortControl.php │ │ ├── SysResources.php │ │ ├── System.php │ │ ├── VlanByPorts.php │ │ ├── VlanList.php │ │ ├── VlansDot1q.php │ │ └── WalkerOverGet.php │ ├── MikrotikCRS │ │ ├── CableDiag.php │ │ ├── Counters.php │ │ ├── Descriptions.php │ │ ├── Errors.php │ │ ├── Fdb.php │ │ ├── InterfacesList.php │ │ ├── InterfacesTrait.php │ │ ├── LinkInfo.php │ │ ├── LldpInfo.php │ │ ├── ParseInterface.php │ │ ├── PvidDot1q.php │ │ ├── Rmon.php │ │ ├── SetPortDescription.php │ │ ├── StatePortControl.php │ │ ├── SysResources.php │ │ ├── System.php │ │ ├── VlanByPorts.php │ │ └── VlansDot1q.php │ ├── Raisecom │ │ ├── ClearIfaceCounters.php │ │ ├── Counters.php │ │ ├── Descriptions.php │ │ ├── Errors.php │ │ ├── Fdb.php │ │ ├── InterfacesList.php │ │ ├── InterfacesTrait.php │ │ ├── LinkInfo.php │ │ ├── LldpInfo.php │ │ ├── ParseInterface.php │ │ ├── PvidDot1q.php │ │ ├── Rmon.php │ │ ├── SetPortDescription.php │ │ ├── StatePortControl.php │ │ ├── SysResources.php │ │ ├── System.php │ │ ├── VlanByPorts.php │ │ └── VlansDot1q.php │ ├── RouterOS │ │ ├── AddressListControl.php │ │ ├── AddressListInfo.php │ │ ├── ArpInfo.php │ │ ├── ArpPing.php │ │ ├── BgpSessionsInfo.php │ │ ├── DhcpServerInfo.php │ │ ├── DirectRoutes.php │ │ ├── ExecCommand.php │ │ ├── Fdb.php │ │ ├── GeneralArpInfo.php │ │ ├── InterfaceInfo.php │ │ ├── InterfaceVlanInfo.php │ │ ├── InterfacesList.php │ │ ├── InterfacesTrait.php │ │ ├── LeaseInfo.php │ │ ├── LinkInfo.php │ │ ├── LldpInfo.php │ │ ├── SimpleQueuesCtrl.php │ │ ├── SimpleQueuesInfo.php │ │ ├── StaticArpControl.php │ │ ├── StaticLeaseControl.php │ │ └── SystemResources.php │ ├── Sensors │ │ └── Ping3 │ │ │ ├── AnalogLinesControl.php │ │ │ ├── AnalogLinesList.php │ │ │ ├── DigitalLinesControl.php │ │ │ ├── DigitalLinesList.php │ │ │ ├── KnockSensorState.php │ │ │ ├── PowerOutputControl.php │ │ │ ├── PowerOutputsList.php │ │ │ ├── PowerSensorState.php │ │ │ └── SystemInfo.php │ ├── TpLinkSwitch │ │ ├── CableDiag.php │ │ ├── Counters.php │ │ ├── Descriptions.php │ │ ├── Errors.php │ │ ├── Fdb.php │ │ ├── InterfacesList.php │ │ ├── InterfacesTrait.php │ │ ├── LinkInfo.php │ │ ├── LldpInfo.php │ │ ├── ParseInterface.php │ │ ├── PvidDot1q.php │ │ ├── Rmon.php │ │ ├── SetPortDescription.php │ │ ├── StatePortControl.php │ │ ├── SysResources.php │ │ ├── System.php │ │ ├── VlanByPorts.php │ │ └── VlansDot1q.php │ ├── UbntSwitch │ │ ├── CableDiag.php │ │ ├── Counters.php │ │ ├── Descriptions.php │ │ ├── Errors.php │ │ ├── Fdb.php │ │ ├── InterfacesList.php │ │ ├── InterfacesTrait.php │ │ ├── LinkInfo.php │ │ ├── LldpInfo.php │ │ ├── ParseInterface.php │ │ ├── PvidDot1q.php │ │ ├── Rmon.php │ │ ├── SetPortDescription.php │ │ ├── StatePortControl.php │ │ ├── SysResources.php │ │ ├── System.php │ │ ├── VlanByPorts.php │ │ └── VlansDot1q.php │ ├── VsolOlts │ │ ├── FdbTable.php │ │ ├── GPONV1600 │ │ │ ├── CtrlOntDisable.php │ │ │ ├── FdbTable.php │ │ │ ├── InterfaceCounters.php │ │ │ ├── InterfaceDescriptions.php │ │ │ ├── InterfacesList.php │ │ │ ├── LinkInfo.php │ │ │ ├── OntDelete.php │ │ │ ├── OntDescriptionControl.php │ │ │ ├── OntListWithStatuses.php │ │ │ ├── OntOpticalInfo.php │ │ │ ├── OntReboot.php │ │ │ ├── OntSerial.php │ │ │ ├── OntVendorInfo.php │ │ │ ├── ParseInterface.php │ │ │ ├── PonPortsList.php │ │ │ ├── PonPortsOptical.php │ │ │ ├── PortCountRegisteredOnts.php │ │ │ ├── PortDescriptionControl.php │ │ │ ├── UniInterfacesInfo.php │ │ │ └── VsolOltsAbstractModule.php │ │ ├── InterfaceCounters.php │ │ ├── InterfaceDescriptions.php │ │ ├── InterfacesList.php │ │ ├── MultiRawConsoleCommand.php │ │ ├── OltReboot.php │ │ ├── OltSaveSettings.php │ │ ├── OntDelete.php │ │ ├── OntListWithStatuses.php │ │ ├── OntMacAddress.php │ │ ├── OntOpticalInfo.php │ │ ├── OntReasons.php │ │ ├── OntReset.php │ │ ├── OntVendorInfo.php │ │ ├── ParseInterface.php │ │ ├── PonPortsList.php │ │ ├── PonPortsOptical.php │ │ ├── PortCountRegisteredOnts.php │ │ ├── RawConsoleCommand.php │ │ ├── SnoopingInfo.php │ │ ├── SystemInformation.php │ │ ├── SystemResources.php │ │ ├── UniInterfacesInfo.php │ │ ├── Vlans.php │ │ └── VsolOltsAbstractModule.php │ └── ZTE │ │ ├── C200Series │ │ ├── Fdb.php │ │ ├── InterfaceDescriptions.php │ │ ├── OntInfo.php │ │ ├── OntStateInfo.php │ │ └── OnuSignalStrengthInfo.php │ │ ├── C300Series │ │ ├── CardList.php │ │ ├── CardStatus.php │ │ ├── CtrlOntDisable.php │ │ ├── DeregOnt.php │ │ ├── Fdb.php │ │ ├── GponOntProfileList.php │ │ ├── InterfaceCounters.php │ │ ├── InterfaceDescriptions.php │ │ ├── InterfaceDescriptionsOld.php │ │ ├── InterfaceParser.php │ │ ├── InterfacesList.php │ │ ├── LinkInfo.php │ │ ├── MultiRawConsoleCommand.php │ │ ├── OntConfiguration.php │ │ ├── OntDownHistory.php │ │ ├── OntListWithStatusesV2.php │ │ ├── OntMacAddress.php │ │ ├── OntOpticalInfo.php │ │ ├── OntOpticalInfoV1.php │ │ ├── OntReasons.php │ │ ├── OntSerial.php │ │ ├── OntVendorInfo.php │ │ ├── PonPortsList.php │ │ ├── PortDescriptionControl.php │ │ ├── RawConsoleCommand.php │ │ ├── RebootOnu.php │ │ ├── ResetPonPort.php │ │ ├── SaveConfig.php │ │ ├── UniInterfacesControlAdminStatus.php │ │ ├── UniInterfacesStatus.php │ │ ├── UnregisteredOntList.php │ │ ├── ZteConsoleOntInfo.php │ │ ├── _OntListWithStatuses.php │ │ └── _OntOpticalInfoFW12.php │ │ ├── C600Series │ │ ├── CardList.php │ │ ├── CardStatus.php │ │ ├── CtrlOntDescription.php │ │ ├── CtrlOntDisable.php │ │ ├── DeregOnt.php │ │ ├── Fdb.php │ │ ├── GponOntProfileList.php │ │ ├── InterfaceCounters.php │ │ ├── InterfaceDescriptions.php │ │ ├── InterfaceParser.php │ │ ├── InterfacesList.php │ │ ├── InterfacesStatus.php │ │ ├── LinkInfo.php │ │ ├── ModuleAbstract.php │ │ ├── MultiRawConsoleCommand.php │ │ ├── OntConfiguration.php │ │ ├── OntDownHistory.php │ │ ├── OntListWithStatuses.php │ │ ├── OntOpticalInfo.php │ │ ├── OntReasons.php │ │ ├── OntReboot.php │ │ ├── OntSerial.php │ │ ├── OntVendorInfo.php │ │ ├── OnuIpHost.php │ │ ├── PonPortsList.php │ │ ├── PortDescriptionControl.php │ │ ├── RawConsoleCommand.php │ │ ├── SaveConfig.php │ │ ├── UniInterfacesControlAdminStatus.php │ │ ├── UniInterfacesStatus.php │ │ ├── UnregisteredOntList.php │ │ └── ZteConsoleOntInfo.php │ │ ├── ModuleAbstract.php │ │ └── NetSettings.php └── Switcher │ ├── CacheInterface.php │ ├── Console │ ├── ConsoleInterface.php │ ├── SshLazyConnect.php │ └── TelnetLazyConnect.php │ ├── Core.php │ ├── CoreConnector.php │ ├── Device.php │ ├── Objects │ ├── Cache.php │ ├── RouterOsLazyConnect.php │ ├── SnmpResponse.php │ └── WrappedResponse.php │ └── PhpCache.php ├── test.php └── tests └── OidDatabaseTest.php /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | vendor 3 | composer.lock 4 | configs/proxies.yml 5 | -------------------------------------------------------------------------------- /bin/connection.conf.yml: -------------------------------------------------------------------------------- 1 | console: 2 | port: 2323 3 | timeout: 30 4 | type: telnet 5 | 6 | snmp: 7 | repeats: 2 8 | timeout: 3 9 | 10 | miktotik_api: 11 | port: 44044 12 | -------------------------------------------------------------------------------- /bin/console: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | setName("SwitcherCore dev console"); 22 | 23 | $app->add(new \SwitcherCore\Dev\SwitcherCoreModules()); 24 | $app->add(new \SwitcherCore\Dev\SwitcherCoreCallModuleCommand()); 25 | 26 | 27 | $app->run(); 28 | -------------------------------------------------------------------------------- /configs/models/ZZZ_ApplyNet.yml: -------------------------------------------------------------------------------- 1 | 2 | models: 3 | - name: ApplyNet AN-SW812 4 | key: applynet_sw812 5 | device_type: SWITCH 6 | inputs: 7 | - snmp 8 | - console 9 | detect: {description: 'NOT_EXISTED', objid: 'NOT_EXISTED' } 10 | oids: 11 | - ./oids/applynet.yml 12 | extra: 13 | console_conn_type: dell 14 | modules: 15 | parse_interface: \SwitcherCore\Modules\ApplyNet\ParseInterface 16 | fdb: \SwitcherCore\Modules\ApplyNet\Fdb 17 | link_info: \SwitcherCore\Modules\ApplyNet\LinkInfo 18 | interface_counters: \SwitcherCore\Modules\ApplyNet\Counters 19 | system: \SwitcherCore\Modules\ApplyNet\System 20 | interfaces_list: \SwitcherCore\Modules\ApplyNet\InterfacesList 21 | ctrl_port_state: \SwitcherCore\Modules\ApplyNet\StatePortControl 22 | -------------------------------------------------------------------------------- /configs/oids/applynet.yml: -------------------------------------------------------------------------------- 1 | 2 | # .1.3.6.1.2.1.17.7.1.2.2.1.2.[VLAN ID].[MAC-OCTET].[MAC-OCTET].[MAC-OCTET].[MAC-OCTET].[MAC-OCTET].[MAC-OCTET] = [PORT] 3 | - {name: dot1q.FdbPort, oid: .1.3.6.1.2.1.17.4.3.1.2, access: read} 4 | -------------------------------------------------------------------------------- /configs/oids/bdcom/3310b.yml: -------------------------------------------------------------------------------- 1 | #ONT BLOCK 2 | - {name: pon.opticalOltRx, oid: .1.3.6.1.4.1.3320.9.183.1.1.5 } 3 | 4 | 5 | -------------------------------------------------------------------------------- /configs/oids/cdata/fd-1208s-r1.yml: -------------------------------------------------------------------------------- 1 | 2 | # PON port block 3 | - {name: pon.port.optical.temp, oid: .1.3.6.1.4.1.34592.1.3.100.2.2.1.4} # value / 100 = temp in C 4 | - {name: pon.port.optical.voltage, oid: .1.3.6.1.4.1.34592.1.3.100.2.2.1.5} # value / 100000 = voltage 5 | - {name: pon.port.optical.bias, oid: .1.3.6.1.4.1.34592.1.3.100.2.2.1.6} 6 | - {name: pon.port.optical.txPower, oid: .1.3.6.1.4.1.34592.1.3.100.2.2.1.7} # value / 100 7 | - {name: pon.portOpRxPower, oid: .1.3.6.1.4.1.34592.1.3.100.2.2.1.8} # value / 100 8 | -------------------------------------------------------------------------------- /configs/oids/dcn/defaults.yml: -------------------------------------------------------------------------------- 1 | ### .dcn.os.priSystem.switchinfo 2 | - {name: switchinfo.switchCpuUsage, oid: .1.3.6.1.4.1.6339.100.1.11.10 } # CPU Load in % 3 | - {name: switchinfo.switchTemperature, oid: .1.3.6.1.4.1.6339.100.1.11.9.0 } # Temperature in Celsius 4 | - {name: switchinfo.switchMemoryUsage, oid: .1.3.6.1.4.1.6339.100.1.11.11.0 } # Used Memory in % 5 | -------------------------------------------------------------------------------- /configs/oids/dlink/common-agent-info.yml: -------------------------------------------------------------------------------- 1 | 2 | - {name: agent.CpuUtilization5sec, oid: .1.3.6.1.4.1.171.12.1.1.6.1 } 3 | - {name: agent.CpuUtilization1min, oid: .1.3.6.1.4.1.171.12.1.1.6.2 } 4 | - {name: agent.CpuUtilization5min, oid: .1.3.6.1.4.1.171.12.1.1.6.3 } 5 | 6 | - {name: agent.DramUtilizationTotalDRAM, oid: .1.3.6.1.4.1.171.12.1.1.9.1.2 } 7 | - {name: agent.DramUtilizationUsedDRAM, oid: .1.3.6.1.4.1.171.12.1.1.9.1.3 } 8 | - {name: agent.DramUtilization, oid: .1.3.6.1.4.1.171.12.1.1.9.1.4 } 9 | 10 | - {name: agent.PortUtilizationTx, oid: .1.3.6.1.4.1.171.12.1.1.8.1.2 } 11 | - {name: agent.PortUtilizationRx, oid: .1.3.6.1.4.1.171.12.1.1.8.1.3 } 12 | - {name: agent.PortUtilizationUtil, oid: .1.3.6.1.4.1.171.12.1.1.8.1.4 } 13 | 14 | - {name: sys.serialNum, oid: .1.3.6.1.4.1.171.12.1.1.12} 15 | -------------------------------------------------------------------------------- /configs/oids/dlink/des-1228me.yml: -------------------------------------------------------------------------------- 1 | - {name: dlink.PortInfoMediumType, oid: .1.3.6.1.4.1.171.11.116.2.2.2.1.1.2, values: {100: Cooper, 101: Fiber}} 2 | - {name: dlink.PortInfoLinkStatus, oid: .1.3.6.1.4.1.171.11.116.2.2.2.1.1.4, values: {2: Up, 3: Down}} 3 | - {name: dlink.PortInfoNwayStatus, oid: .1.3.6.1.4.1.171.11.116.2.2.2.1.1.5, values: {1: Down, 2: 10-Half, 3: 10-Full, 4: 100-Half, 5: 100-Full, 6: 1G-Half, 7: 1G-Full}} 4 | - {name: dlink.PortCtrlPortAdminState, oid: .1.3.6.1.4.1.171.11.116.2.2.2.2.1.3, values: {3: Enabled, 2: Disabled}} 5 | - {name: dlink.PortCtrlPortNwayState, oid: .1.3.6.1.4.1.171.11.116.2.2.2.2.1.4, values: {1: Auto, 2: 10-Half, 3: 10-Full, 4: 100-Half, 5: 100-Full, 6: 1G-Half, 7: 1G-Full}} 6 | - {name: dlink.PortCtrlAddressLearning, oid: .1.3.6.1.4.1.171.11.116.2.2.2.2.1.7, values: {2: Disabled, 3: Enabled}} 7 | 8 | 9 | -------------------------------------------------------------------------------- /configs/oids/dlink/des-3026.yml: -------------------------------------------------------------------------------- 1 | - {name: dlink.PortInfoLinkStatus, oid: .1.3.6.1.4.1.171.11.63.3.2.2.1.1.4, values: {2: Up, 3: Down}} 2 | - {name: dlink.PortInfoNwayStatus, oid: .1.3.6.1.4.1.171.11.63.3.2.2.1.1.5, values: {1: Down, 2: 10-Half, 3: 10-Full, 4: 100-Half, 5: 100-Full, 6: 1G-Half, 7: 1G-Full}} 3 | - {name: dlink.PortCtrlPortAdminState, oid: .1.3.6.1.4.1.171.11.63.3.2.2.2.1.2, values: {3: Enabled, 2: Disabled}} 4 | - {name: dlink.PortCtrlPortNwayState, oid: .1.3.6.1.4.1.171.11.63.3.2.2.2.1.3, values: {1: Auto, 2: 10-Half, 3: 10-Full, 4: 100-Half, 5: 100-Full, 6: 1G-Half, 7: 1G-Full}} 5 | 6 | - {name: dlink.DevCtrlCleanAllStatisticCounter, oid: .1.3.6.1.4.1.171.11.63.6.2.1.2.12.0, values: {1: normal, 2: active}} 7 | - {name: dlink.DevCtrlSystemReboot, oid: .1.3.6.1.4.1.171.11.63.6.2.1.2.1.0, values: {1: other, 2: reboot, 3: save-config-and-reboot, 4: reboot-and-load-factory-default-config}} 8 | 9 | - {name: ddm.power.tx, oid: .1.3.6.1.4.1.171.12.72.2.1.1.1.5} 10 | - {name: ddm.power.rx, oid: .1.3.6.1.4.1.171.12.72.2.1.1.1.6} 11 | -------------------------------------------------------------------------------- /configs/oids/dlink/des-3028G.yml: -------------------------------------------------------------------------------- 1 | - {name: dlink.PortInfoMediumType, oid: .1.3.6.1.4.1.171.11.63.11.2.2.1.1.2, values: {100: Cooper, 101: Fiber}} 2 | - {name: dlink.PortInfoLinkStatus, oid: .1.3.6.1.4.1.171.11.63.11.2.2.1.1.4, values: {2: Up, 3: Down}} 3 | - {name: dlink.PortInfoNwayStatus, oid: .1.3.6.1.4.1.171.11.63.11.2.2.1.1.5, values: {1: Down, 2: 10-Half, 3: 10-Full, 4: 100-Half, 5: 100-Full, 6: 1G-Half, 7: 1G-Full}} 4 | - {name: dlink.PortCtrlPortAdminState, oid: .1.3.6.1.4.1.171.11.63.11.2.2.2.1.3, values: {3: Enabled, 2: Disabled}} 5 | - {name: dlink.PortCtrlPortNwayState, oid: .1.3.6.1.4.1.171.11.63.11.2.2.2.1.4, values: {1: Auto, 2: 10-Half, 3: 10-Full, 4: 100-Half, 5: 100-Full, 6: 1G-Half, 7: 1G-Full}} 6 | - {name: dlink.PortCtrlAddressLearning, oid: .1.3.6.1.4.1.171.11.63.11.2.2.2.1.7, values: {2: Disabled, 3: Enabled}} 7 | 8 | 9 | - {name: ddm.power.tx, oid: .1.3.6.1.4.1.171.12.72.2.1.1.1.5} 10 | - {name: ddm.power.rx, oid: .1.3.6.1.4.1.171.12.72.2.1.1.1.6} 11 | -------------------------------------------------------------------------------- /configs/oids/dlink/des-3200-10-a1.yml: -------------------------------------------------------------------------------- 1 | - {name: dlink.PortInfoMediumType, oid: .1.3.6.1.4.1.171.11.113.1.1.2.2.1.1.2, values: {100: Cooper, 101: Fiber}} 2 | - {name: dlink.PortInfoLinkStatus, oid: .1.3.6.1.4.1.171.11.113.1.1.2.2.1.1.4, values: {2: Up, 3: Down}} 3 | - {name: dlink.PortInfoNwayStatus, oid: .1.3.6.1.4.1.171.11.113.1.1.2.2.1.1.5, values: {1: Down, 2: 10-Half, 3: 10-Full, 4: 100-Half, 5: 100-Full, 6: 1G-Half, 7: 1G-Full}} 4 | - {name: dlink.PortCtrlPortAdminState, oid: .1.3.6.1.4.1.171.11.113.1.1.2.2.2.1.3, values: {3: Enabled, 2: Disabled}} 5 | - {name: dlink.PortCtrlPortNwayState, oid: .1.3.6.1.4.1.171.11.113.1.1.2.2.2.1.4, values: {1: Auto, 2: 10-Half, 3: 10-Full, 4: 100-Half, 5: 100-Full, 6: 1G-Half, 7: 1G-Full}} 6 | - {name: dlink.PortCtrlAddressLearning, oid: .1.3.6.1.4.1.171.11.113.1.1.2.2.2.1.7, values: {2: Disabled, 3: Enabled}} 7 | 8 | - {name: ddm.power.tx, oid: .1.3.6.1.4.1.171.12.72.2.1.1.1.5} 9 | - {name: ddm.power.rx, oid: .1.3.6.1.4.1.171.12.72.2.1.1.1.6} -------------------------------------------------------------------------------- /configs/oids/dlink/des-3200-10-c1.yml: -------------------------------------------------------------------------------- 1 | - {name: dlink.PortInfoMediumType, oid: .1.3.6.1.4.1.171.11.113.2.1.2.3.2.1.2, values: {1: Cooper, 2: Fiber}} 2 | - {name: dlink.PortInfoLinkStatus, oid: .1.3.6.1.4.1.171.11.113.2.1.2.3.1.1.5, values: {2: Up, 3: Down}} 3 | - {name: dlink.PortInfoNwayStatus, oid: .1.3.6.1.4.1.171.11.113.2.1.2.3.1.1.6, values: {0: Down, 2: Down, 3: 10-Half, 4: 10-Full, 5: 100-Half, 6: 100-Full, 7: 1G-Half, 8: 1G-Full, 10: 1G-Full}} 4 | - {name: dlink.PortCtrlPortAdminState, oid: .1.3.6.1.4.1.171.11.113.2.1.2.3.2.1.4, values: {3: Enabled, 2: Disabled}} 5 | - {name: dlink.PortCtrlPortNwayState, oid: .1.3.6.1.4.1.171.11.113.2.1.2.3.2.1.5, values: {2: Auto, 3: 10-Half, 4: 10-Full, 5: 100-Half, 6: 100-Full, 7: 1G-Half, 8: 1G-Full}} 6 | - {name: dlink.PortCtrlAddressLearning, oid: .1.3.6.1.4.1.171.11.113.2.1.2.3.2.1.7, values: {2: Disabled, 3: Enabled}} 7 | 8 | 9 | - {name: ddm.power.tx, oid: .1.3.6.1.4.1.171.12.72.2.1.1.1.5} 10 | - {name: ddm.power.rx, oid: .1.3.6.1.4.1.171.12.72.2.1.1.1.6} 11 | 12 | -------------------------------------------------------------------------------- /configs/oids/dlink/des-3200-18-a1.yml: -------------------------------------------------------------------------------- 1 | - {name: dlink.PortInfoMediumType, oid: .1.3.6.1.4.1.171.11.113.1.2.2.2.1.1.2, values: {100: Cooper, 101: Fiber}} 2 | - {name: dlink.PortInfoLinkStatus, oid: .1.3.6.1.4.1.171.11.113.1.2.2.2.1.1.4, values: {2: Up, 3: Down}} 3 | - {name: dlink.PortInfoNwayStatus, oid: .1.3.6.1.4.1.171.11.113.1.2.2.2.1.1.5, values: {1: Down, 2: 10-Half, 3: 10-Full, 4: 100-Half, 5: 100-Full, 6: 1G-Half, 7: 1G-Full}} 4 | - {name: dlink.PortCtrlPortAdminState, oid: .1.3.6.1.4.1.171.11.113.1.2.2.2.2.1.3, values: {3: Enabled, 2: Disabled}} 5 | - {name: dlink.PortCtrlPortNwayState, oid: .1.3.6.1.4.1.171.11.113.1.2.2.2.2.1.4, values: {1: Auto, 2: 10-Half, 3: 10-Full, 4: 100-Half, 5: 100-Full, 6: 1G-Half, 7: 1G-Full}} 6 | - {name: dlink.PortCtrlAddressLearning, oid: .1.3.6.1.4.1.171.11.113.1.2.2.2.2.1.7, values: {2: Disabled, 3: Enabled}} 7 | 8 | - {name: ddm.power.tx, oid: .1.3.6.1.4.1.171.12.72.2.1.1.1.5} 9 | - {name: ddm.power.rx, oid: .1.3.6.1.4.1.171.12.72.2.1.1.1.6} -------------------------------------------------------------------------------- /configs/oids/dlink/des-3200-18-c1.yml: -------------------------------------------------------------------------------- 1 | - {name: dlink.PortInfoMediumType, oid: .1.3.6.1.4.1.171.11.113.3.1.2.3.2.1.2, values: {1: Cooper, 2: Fiber}} 2 | - {name: dlink.PortInfoLinkStatus, oid: .1.3.6.1.4.1.171.11.113.3.1.2.3.1.1.5, values: {2: Up, 3: Down}} 3 | - {name: dlink.PortInfoNwayStatus, oid: .1.3.6.1.4.1.171.11.113.3.1.2.3.1.1.6, values: {2: Down, 3: 10-Half, 4: 10-Full, 5: 100-Half, 6: 100-Full, 7: 1G-Half, 8: 1G-Full}} 4 | - {name: dlink.PortCtrlPortAdminState, oid: .1.3.6.1.4.1.171.11.113.3.1.2.3.2.1.4, values: {3: Enabled, 2: Disabled}} 5 | - {name: dlink.PortCtrlPortNwayState, oid: .1.3.6.1.4.1.171.11.113.3.1.2.3.2.1.5, values: {2: Auto, 3: 10-Half, 4: 10-Full, 5: 100-Half, 6: 100-Full, 7: 1G-Half, 8: 1G-Full}} 6 | - {name: dlink.PortCtrlAddressLearning, oid: .1.3.6.1.4.1.171.11.113.3.1.2.3.2.1.7, values: {2: Disabled, 3: Enabled}} 7 | 8 | 9 | - {name: ddm.power.tx, oid: .1.3.6.1.4.1.171.12.72.2.1.1.1.5} 10 | - {name: ddm.power.rx, oid: .1.3.6.1.4.1.171.12.72.2.1.1.1.6} 11 | -------------------------------------------------------------------------------- /configs/oids/dlink/des-3200-26-a1.yml: -------------------------------------------------------------------------------- 1 | - {name: dlink.PortInfoMediumType, oid: .1.3.6.1.4.1.171.11.113.1.5.2.2.1.1.2, values: {100: Cooper, 101: Fiber}} 2 | - {name: dlink.PortInfoLinkStatus, oid: .1.3.6.1.4.1.171.11.113.1.5.2.2.1.1.4, values: {2: Up, 3: Down}} 3 | - {name: dlink.PortInfoNwayStatus, oid: .1.3.6.1.4.1.171.11.113.1.5.2.2.1.1.5, values: {1: Down, 2: 10-Half, 3: 10-Full, 4: 100-Half, 5: 100-Full, 6: 1G-Half, 7: 1G-Full}} 4 | - {name: dlink.PortCtrlPortAdminState, oid: .1.3.6.1.4.1.171.11.113.1.5.2.2.2.1.3, values: {3: Enabled, 2: Disabled}} 5 | - {name: dlink.PortCtrlPortNwayState, oid: .1.3.6.1.4.1.171.11.113.1.5.2.2.2.1.4, values: {1: Auto, 2: 10-Half, 3: 10-Full, 4: 100-Half, 5: 100-Full, 6: 1G-Half, 7: 1G-Full}} 6 | - {name: dlink.PortCtrlAddressLearning, oid: .1.3.6.1.4.1.171.11.113.1.5.2.2.2.1.7, values: {2: Disabled, 3: Enabled}} 7 | 8 | - {name: ddm.power.tx, oid: .1.3.6.1.4.1.171.12.72.2.1.1.1.5} 9 | - {name: ddm.power.rx, oid: .1.3.6.1.4.1.171.12.72.2.1.1.1.6} -------------------------------------------------------------------------------- /configs/oids/dlink/des-3200-26-c1.yml: -------------------------------------------------------------------------------- 1 | - {name: dlink.PortInfoMediumType, oid: .1.3.6.1.4.1.171.11.113.4.1.2.3.2.1.2, values: {1: Cooper, 2: Fiber}} 2 | - {name: dlink.PortInfoLinkStatus, oid: .1.3.6.1.4.1.171.11.113.4.1.2.3.1.1.5, values: {2: Up, 3: Down}} 3 | - {name: dlink.PortInfoNwayStatus, oid: .1.3.6.1.4.1.171.11.113.4.1.2.3.1.1.6, values: {2: Down, 3: 10-Half, 4: 10-Full, 5: 100-Half, 6: 100-Full, 7: 1G-Half, 8: 1G-Full}} 4 | - {name: dlink.PortCtrlPortAdminState, oid: .1.3.6.1.4.1.171.11.113.4.1.2.3.2.1.4, values: {3: Enabled, 2: Disabled}} 5 | - {name: dlink.PortCtrlPortNwayState, oid: .1.3.6.1.4.1.171.11.113.4.1.2.3.2.1.5, values: {2: Auto, 3: 10-Half, 4: 10-Full, 5: 100-Half, 6: 100-Full, 7: 1G-Half, 8: 1G-Full}} 6 | - {name: dlink.PortCtrlAddressLearning, oid: .1.3.6.1.4.1.171.11.113.4.1.2.3.2.1.7, values: {2: Disabled, 3: Enabled}} 7 | 8 | - {name: ddm.power.tx, oid: .1.3.6.1.4.1.171.12.72.2.1.1.1.5} 9 | - {name: ddm.power.rx, oid: .1.3.6.1.4.1.171.12.72.2.1.1.1.6} 10 | -------------------------------------------------------------------------------- /configs/oids/dlink/des-3200-28-a1.yml: -------------------------------------------------------------------------------- 1 | - {name: dlink.PortInfoMediumType, oid: .1.3.6.1.4.1.171.11.113.1.3.2.2.1.1.2, values: {100: Cooper, 101: Fiber}} 2 | - {name: dlink.PortInfoLinkStatus, oid: .1.3.6.1.4.1.171.11.113.1.3.2.2.1.1.4, values: {2: Up, 3: Down}} 3 | - {name: dlink.PortInfoNwayStatus, oid: .1.3.6.1.4.1.171.11.113.1.3.2.2.1.1.5, values: {1: Down, 2: 10-Half, 3: 10-Full, 4: 100-Half, 5: 100-Full, 6: 1G-Half, 7: 1G-Full}} 4 | - {name: dlink.PortCtrlPortAdminState, oid: .1.3.6.1.4.1.171.11.113.1.3.2.2.2.1.3, values: {3: Enabled, 2: Disabled}} 5 | - {name: dlink.PortCtrlPortNwayState, oid: .1.3.6.1.4.1.171.11.113.1.3.2.2.2.1.4, values: {1: Auto, 2: 10-Half, 3: 10-Full, 4: 100-Half, 5: 100-Full, 6: 1G-Half, 7: 1G-Full}} 6 | - {name: dlink.PortCtrlAddressLearning, oid: .1.3.6.1.4.1.171.11.113.1.3.2.2.2.1.7, values: {2: Disabled, 3: Enabled}} 7 | 8 | - {name: ddm.power.tx, oid: .1.3.6.1.4.1.171.12.72.2.1.1.1.5} 9 | - {name: ddm.power.rx, oid: .1.3.6.1.4.1.171.12.72.2.1.1.1.6} -------------------------------------------------------------------------------- /configs/oids/dlink/des-3200-28-c1.yml: -------------------------------------------------------------------------------- 1 | - {name: dlink.PortInfoMediumType, oid: .1.3.6.1.4.1.171.11.113.5.1.2.3.2.1.2, values: {1: Cooper, 2: Fiber}} 2 | - {name: dlink.PortInfoLinkStatus, oid: .1.3.6.1.4.1.171.11.113.5.1.2.3.1.1.5, values: {2: Up, 3: Down}} 3 | - {name: dlink.PortInfoNwayStatus, oid: .1.3.6.1.4.1.171.11.113.5.1.2.3.1.1.6, values: {0: Down, 2: Down, 3: 10-Half, 4: 10-Full, 5: 100-Half, 6: 100-Full, 7: 1G-Half, 8: 1G-Full, 10: 1G-Full}} 4 | - {name: dlink.PortCtrlPortAdminState, oid: .1.3.6.1.4.1.171.11.113.5.1.2.3.2.1.4, values: {3: Enabled, 2: Disabled}} 5 | - {name: dlink.PortCtrlPortNwayState, oid: .1.3.6.1.4.1.171.11.113.5.1.2.3.2.1.5, values: {2: Auto, 3: 10-Half, 4: 10-Full, 5: 100-Half, 6: 100-Full, 7: 1G-Half, 8: 1G-Full}} 6 | - {name: dlink.PortCtrlAddressLearning, oid: .1.3.6.1.4.1.171.11.113.5.1.2.3.2.1.7, values: {2: Disabled, 3: Enabled}} 7 | 8 | 9 | - {name: ddm.power.tx, oid: .1.3.6.1.4.1.171.12.72.2.1.1.1.5} 10 | - {name: ddm.power.rx, oid: .1.3.6.1.4.1.171.12.72.2.1.1.1.6} 11 | -------------------------------------------------------------------------------- /configs/oids/dlink/des-3200-28F-a1.yml: -------------------------------------------------------------------------------- 1 | - {name: dlink.PortInfoMediumType, oid: .1.3.6.1.4.1.171.11.113.1.4.2.2.1.1.2, values: {100: Cooper, 101: Fiber}} 2 | - {name: dlink.PortInfoLinkStatus, oid: .1.3.6.1.4.1.171.11.113.1.4.2.2.1.1.4, values: {2: Up, 3: Down}} 3 | - {name: dlink.PortInfoNwayStatus, oid: .1.3.6.1.4.1.171.11.113.1.4.2.2.1.1.5, values: {1: Down, 2: 10-Half, 3: 10-Full, 4: 100-Half, 5: 100-Full, 6: 1G-Half, 7: 1G-Full}} 4 | - {name: dlink.PortCtrlPortAdminState, oid: .1.3.6.1.4.1.171.11.113.1.4.2.2.2.1.3, values: {3: Enabled, 2: Disabled}} 5 | - {name: dlink.PortCtrlPortNwayState, oid: .1.3.6.1.4.1.171.11.113.1.4.2.2.2.1.4, values: {1: Auto, 2: 10-Half, 3: 10-Full, 4: 100-Half, 5: 100-Full, 6: 1G-Half, 7: 1G-Full}} 6 | - {name: dlink.PortCtrlAddressLearning, oid: .1.3.6.1.4.1.171.11.113.1.4.2.2.2.1.7, values: {2: Disabled, 3: Enabled}} 7 | 8 | - {name: ddm.power.tx, oid: .1.3.6.1.4.1.171.12.72.2.1.1.1.5} 9 | - {name: ddm.power.rx, oid: .1.3.6.1.4.1.171.12.72.2.1.1.1.6} -------------------------------------------------------------------------------- /configs/oids/dlink/des-3200-28F-c1.yml: -------------------------------------------------------------------------------- 1 | - {name: dlink.PortInfoMediumType, oid: .1.3.6.1.4.1.171.11.113.6.1.2.3.2.1.2, values: {1: Cooper, 2: Fiber}} 2 | - {name: dlink.PortInfoLinkStatus, oid: .1.3.6.1.4.1.171.11.113.6.1.2.3.1.1.5, values: {2: Up, 3: Down}} 3 | - {name: dlink.PortInfoNwayStatus, oid: .1.3.6.1.4.1.171.11.113.6.1.2.3.1.1.6, values: {2: Down, 3: 10-Half, 4: 10-Full, 5: 100-Half, 6: 100-Full, 7: 1G-Half, 8: 1G-Full}} 4 | - {name: dlink.PortCtrlPortAdminState, oid: .1.3.6.1.4.1.171.11.113.6.1.2.3.2.1.4, values: {3: Enabled, 2: Disabled}} 5 | - {name: dlink.PortCtrlPortNwayState, oid: .1.3.6.1.4.1.171.11.113.6.1.2.3.2.1.5, values: {2: Auto, 3: 10-Half, 4: 10-Full, 5: 100-Half, 6: 100-Full, 7: 1G-Half, 8: 1G-Full}} 6 | - {name: dlink.PortCtrlAddressLearning, oid: .1.3.6.1.4.1.171.11.113.6.1.2.3.2.1.7, values: {2: Disabled, 3: Enabled}} 7 | 8 | 9 | - {name: ddm.power.tx, oid: .1.3.6.1.4.1.171.12.72.2.1.1.1.5} 10 | - {name: ddm.power.rx, oid: .1.3.6.1.4.1.171.12.72.2.1.1.1.6} 11 | -------------------------------------------------------------------------------- /configs/oids/dlink/des-3200-52-c1.yml: -------------------------------------------------------------------------------- 1 | - {name: dlink.PortInfoMediumType, oid: .1.3.6.1.4.1.171.11.113.9.1.2.3.2.1.2, values: {1: Cooper, 2: Fiber}} 2 | - {name: dlink.PortInfoLinkStatus, oid: .1.3.6.1.4.1.171.11.113.9.1.2.3.1.1.5, values: {2: Up, 3: Down}} 3 | - {name: dlink.PortInfoNwayStatus, oid: .1.3.6.1.4.1.171.11.113.9.1.2.3.1.1.6, values: {0: Down, 2: Down, 3: 10-Half, 4: 10-Full, 5: 100-Half, 6: 100-Full, 7: 1G-Half, 8: 1G-Full, 10: 1G-Full}} 4 | - {name: dlink.PortCtrlPortAdminState, oid: .1.3.6.1.4.1.171.11.113.9.1.2.3.2.1.4, values: {3: Enabled, 2: Disabled}} 5 | - {name: dlink.PortCtrlPortNwayState, oid: .1.3.6.1.4.1.171.11.113.9.1.2.3.2.1.5, values: {2: Auto, 3: 10-Half, 4: 10-Full, 5: 100-Half, 6: 100-Full, 7: 1G-Half, 8: 1G-Full}} 6 | - {name: dlink.PortCtrlAddressLearning, oid: .1.3.6.1.4.1.171.11.113.9.1.2.3.2.1.7, values: {2: Disabled, 3: Enabled}} 7 | 8 | 9 | 10 | - {name: ddm.power.tx, oid: .1.3.6.1.4.1.171.12.72.2.1.1.1.5} 11 | - {name: ddm.power.rx, oid: .1.3.6.1.4.1.171.12.72.2.1.1.1.6} 12 | -------------------------------------------------------------------------------- /configs/oids/dlink/dgs-1510-20l-me.yml: -------------------------------------------------------------------------------- 1 | - {name: dlink.PortInfoMediumType, oid: .1.3.6.1.4.1.171.10.141.2.1.2.3.1.1.2, values: {1: Cooper, 2: Fiber}} 2 | - {name: dlink.PortInfoLinkStatus, oid: .1.3.6.1.4.1.171.10.141.2.1.2.3.1.1.5, values: {2: Up, 3: Down}} 3 | - {name: dlink.PortInfoNwayStatus, oid: .1.3.6.1.4.1.171.10.141.2.1.2.3.1.1.6, values: {0: Other, 1: Empty, 2: Down, 3: 10-Half, 4: 10-Full, 5: 100-Half, 6: 100-Full, 7: 1G-Half, 8: 1G-Full}} 4 | - {name: dlink.PortCtrlPortAdminState, oid: .1.3.6.1.4.1.171.10.141.2.1.2.3.2.1.4, values: {3: Enabled, 2: Disabled}} 5 | - {name: dlink.PortCtrlPortNwayState, oid: .1.3.6.1.4.1.171.10.141.2.1.2.3.2.1.5, values: { 1: Other, 2: Enabled, 3: 10-Half, 4: 10-Full, 5: 100-Half, 6: 100-Full, 7: 1G-Half, 8: 1G-Full } } 6 | - {name: dlink.PortCtrlAddressLearning, oid: .1.3.6.1.4.1.171.10.141.2.1.2.3.2.1.7, values: {2: Disabled, 3: Enabled}} 7 | 8 | 9 | - {name: ddm.power.tx, oid: .1.3.6.1.4.1.171.10.76.43.1.105.2.1.1.1.5 } 10 | - {name: ddm.power.rx, oid: .1.3.6.1.4.1.171.10.76.43.1.105.2.1.1.1.6 } 11 | -------------------------------------------------------------------------------- /configs/oids/dlink/dgs-3000-10tc.yml: -------------------------------------------------------------------------------- 1 | - {name: dlink.PortInfoMediumType, oid: .1.3.6.1.4.1.171.11.133.1.1.2.3.1.1.2, values: {1: Cooper, 2: Fiber}} 2 | - {name: dlink.PortInfoLinkStatus, oid: .1.3.6.1.4.1.171.11.133.1.1.2.3.1.1.5, values: {2: Up, 3: Down}} 3 | - {name: dlink.PortInfoNwayStatus, oid: .1.3.6.1.4.1.171.11.133.1.1.2.3.1.1.6, values: {0: Other, 1: Empty, 2: Down, 3: 10-Half, 4: 10-Full, 5: 100-Half, 6: 100-Full, 7: 1G-Half, 8: 1G-Full, 9: 10G-Full}} 4 | - {name: dlink.PortCtrlPortAdminState, oid: .1.3.6.1.4.1.171.11.133.1.1.2.3.2.1.4, values: {3: Enabled, 2: Disabled}} 5 | - {name: dlink.PortCtrlPortNwayState, oid: .1.3.6.1.4.1.171.11.133.1.1.2.3.2.1.5, values: {1: Other, 2: Auto, 3: 10-Half, 4: 10-Full, 5: 100-Half, 6: 100-Full, 7: 1G-Half, 8: 1G-Full, 9: 1G-Full-Master, 10: 10G-Full, 11: 10G-Full}} 6 | - {name: dlink.PortCtrlAddressLearning, oid: .1.3.6.1.4.1.171.11.133.1.1.2.3.2.1.7, values: {2: Disabled, 3: Enabled}} 7 | 8 | - {name: ddm.power.tx, oid: .1.3.6.1.4.1.171.12.72.2.1.1.1.5} 9 | - {name: ddm.power.rx, oid: .1.3.6.1.4.1.171.12.72.2.1.1.1.6} 10 | -------------------------------------------------------------------------------- /configs/oids/dlink/dgs-3000-28l.yml: -------------------------------------------------------------------------------- 1 | - {name: dlink.PortInfoMediumType, oid: .1.3.6.1.4.1.171.10.133.8.2.2.3.1.1.2, values: {1: Cooper, 2: Fiber}} 2 | - {name: dlink.PortInfoLinkStatus, oid: .1.3.6.1.4.1.171.10.133.8.2.2.3.1.1.5, values: {2: Up, 3: Down}} 3 | - {name: dlink.PortInfoNwayStatus, oid: .1.3.6.1.4.1.171.10.133.8.2.2.3.1.1.6, values: {0: Other, 1: Empty, 2: Down, 3: 10-Half, 4: 10-Full, 5: 100-Half, 6: 100-Full, 7: 1G-Half, 8: 1G-Full, 9: 10G-Full}} 4 | - {name: dlink.PortCtrlPortAdminState, oid: .1.3.6.1.4.1.171.10.133.8.2.2.3.2.1.4, values: {3: Enabled, 2: Disabled}} 5 | - {name: dlink.PortCtrlPortNwayState, oid: .1.3.6.1.4.1.171.10.133.8.2.2.3.2.1.5, values: {1: Other, 2: Auto, 3: 10-Half, 4: 10-Full, 5: 100-Half, 6: 100-Full, 7: 1G-Half, 8: 1G-Full, 9: 1G-Full-Master, 10: 10G-Full, 11: 10G-Full}} 6 | - {name: dlink.PortCtrlAddressLearning, oid: .1.3.6.1.4.1.171.10.133.8.2.2.3.2.1.7, values: {2: Disabled, 3: Enabled}} 7 | 8 | - {name: ddm.power.tx, oid: .1.3.6.1.4.1.171.12.72.2.1.1.1.5} 9 | - {name: ddm.power.rx, oid: .1.3.6.1.4.1.171.12.72.2.1.1.1.6} 10 | -------------------------------------------------------------------------------- /configs/oids/dlink/dgs-3120-24sc-a2.yml: -------------------------------------------------------------------------------- 1 | - {name: dlink.PortInfoMediumType, oid: .1.3.6.1.4.1.171.11.117.1.3.2.3.2.1.2, values: {1: Cooper, 2: Fiber}} 2 | - {name: dlink.sysPortCtrlSpeed, oid: .1.3.6.1.4.1.171.11.117.1.3.2.3.2.1.5, values: {1: Other, 2: Auto, 3: 10-Half, 4: 10-Full, 5: 100-Half, 6: 100-Full, 7: 1G-Half, 8: 1G-Full, 9: 1G-Full,10: 1G-Full(S)}} 3 | - {name: dlink.sysPortCtrlOperStatus, oid: .1.3.6.1.4.1.171.11.117.1.3.2.3.1.1.6, values: {0: Down, 1: 10-Full, 2: 10-Full, 3: 10-Half, 4: 10-Half, 5: 100-Full, 6: 100-Full, 7: 100-Half, 8: 100-Half, 9: 1G-Full, 10: 1G-Full, 11: 1G-Half, 12: 1G-Half, 13: 10G-Full, 14: 10G-Full, 15: 10G-Half, 16: 10G-Half, 17: Empty, 18: Err-Disabled}} 4 | - {name: dlink.sysPortCtrlState, oid: .1.3.6.1.4.1.171.11.117.1.3.2.3.2.1.4, values: {2: Disabled, 3: Enabled}} 5 | 6 | 7 | - {name: ddm.power.tx, oid: .1.3.6.1.4.1.171.12.72.2.1.1.1.5} 8 | - {name: ddm.power.rx, oid: .1.3.6.1.4.1.171.12.72.2.1.1.1.6} 9 | 10 | -------------------------------------------------------------------------------- /configs/oids/dlink/dgs-3120-24sc-bx.yml: -------------------------------------------------------------------------------- 1 | - {name: dlink.PortInfoMediumType, oid: .1.3.6.1.4.1.171.11.117.4.1.2.3.2.1.2, values: {1: Cooper, 2: Fiber}} 2 | - {name: dlink.sysPortCtrlSpeed, oid: .1.3.6.1.4.1.171.11.117.4.1.2.3.2.1.5, values: {1: Other, 2: Auto, 3: 10-Half, 4: 10-Full, 5: 100-Half, 6: 100-Full, 7: 1G-Half, 8: 1G-Full, 9: 1G-Full,10: 1G-Full(S)}} 3 | - {name: dlink.sysPortCtrlOperStatus, oid: .1.3.6.1.4.1.171.11.117.4.1.2.3.1.1.6, values: {0: Down, 1: 10-Full, 2: 10-Full, 3: 10-Half, 4: 10-Half, 5: 100-Full, 6: 100-Full, 7: 100-Half, 8: 100-Half, 9: 1G-Full, 10: 1G-Full, 11: 1G-Half, 12: 1G-Half, 13: 10G-Full, 14: 10G-Full, 15: 10G-Half, 16: 10G-Half, 17: Empty, 18: Err-Disabled}} 4 | - {name: dlink.sysPortCtrlState, oid: .1.3.6.1.4.1.171.11.117.4.1.2.3.2.1.4, values: {2: Disabled, 3: Enabled}} 5 | 6 | 7 | 8 | - {name: ddm.power.tx, oid: .1.3.6.1.4.1.171.12.72.2.1.1.1.5} 9 | - {name: ddm.power.rx, oid: .1.3.6.1.4.1.171.12.72.2.1.1.1.6} 10 | 11 | -------------------------------------------------------------------------------- /configs/oids/dlink/dgs-3420-26sc-b1.yml: -------------------------------------------------------------------------------- 1 | - {name: dlink.PortInfoMediumType, oid: .1.3.6.1.4.1.171.11.119.6.2.3.1.1.2, values: {1: Cooper, 2: Fiber}} 2 | - {name: dlink.sysPortCtrlSpeed, oid: .1.3.6.1.4.1.171.11.119.6.2.3.2.1.5, values: {1: Other, 2: Enabled, 3: 10-Half, 4: 10-Full, 5: 100-Half, 6: 100-Full, 7: 1G-Half, 8: 1G-Full, 9: 1G-Full,10: 1G-Full}} 3 | - {name: dlink.sysPortCtrlOperStatus, oid: .1.3.6.1.4.1.171.11.119.6.2.3.1.1.6, values: {0: Down, 1: 10-Full, 2: 10-Full, 3: 10-Half, 4: 10-Half, 5: 100-Full, 6: 100-Full, 7: 100-Full, 8: 100-Half, 9: 1G-Full, 10: 1G-Full, 11: 1G-Half, 12: 1G-Half, 13: 10G-Full, 14: 10G-Full,15: 10G-Half, 16: 10G-Half, 17: empty, 18: err-disabled}} 4 | - {name: dlink.sysPortCtrlState, oid: .1.3.6.1.4.1.171.11.119.6.2.3.2.1.4, values: {2: Disabled, 3: Enabled}} 5 | 6 | 7 | - {name: ddm.power.tx, oid: .1.3.6.1.4.1.171.12.72.2.1.1.1.5} 8 | - {name: ddm.power.rx, oid: .1.3.6.1.4.1.171.12.72.2.1.1.1.6} 9 | 10 | -------------------------------------------------------------------------------- /configs/oids/dlink/dgs-3420-28sc-b1.yml: -------------------------------------------------------------------------------- 1 | - {name: dlink.PortInfoMediumType, oid: .1.3.6.1.4.1.171.11.119.2.2.3.1.1.2, values: {1: Cooper, 2: Fiber}} 2 | - {name: dlink.sysPortCtrlSpeed, oid: .1.3.6.1.4.1.171.11.119.2.2.3.2.1.5, values: {1: Other, 2: Enabled, 3: 10-Half, 4: 10-Full, 5: 100-Half, 6: 100-Full, 7: 1G-Half, 8: 1G-Full, 9: 1G-Full,10: 1G-Full}} 3 | - {name: dlink.sysPortCtrlOperStatus, oid: .1.3.6.1.4.1.171.11.119.2.2.3.1.1.6, values: {0: Down, 1: 10-Full, 2: 10-Full, 3: 10-Half, 4: 10-Half, 5: 100-Full, 6: 100-Full, 7: 100-Full, 8: 100-Half, 9: 1G-Full, 10: 1G-Full, 11: 1G-Half, 12: 1G-Half, 13: 10G-Full, 14: 10G-Full,15: 10G-Half, 16: 10G-Half, 17: empty, 18: err-disabled}} 4 | - {name: dlink.sysPortCtrlState, oid: .1.3.6.1.4.1.171.11.119.2.2.3.2.1.4, values: {2: Disabled, 3: Enabled}} 5 | 6 | - {name: ddm.power.tx, oid: .1.3.6.1.4.1.171.12.72.2.1.1.1.5} 7 | - {name: ddm.power.rx, oid: .1.3.6.1.4.1.171.12.72.2.1.1.1.6} 8 | 9 | -------------------------------------------------------------------------------- /configs/oids/dlink/dgs-3612g.yml: -------------------------------------------------------------------------------- 1 | - { name: dlink.PortInfoMediumType, oid: .1.3.6.1.4.1.171.11.70.9.2.3.1.1.2, values: { 1: Cooper, 2: Fiber } } 2 | - { name: dlink.PortInfoLinkStatus, oid: .1.3.6.1.4.1.171.11.70.9.2.3.1.1.5, values: { 2: Up, 3: Down } } 3 | - { name: dlink.PortInfoNwayStatus, oid: .1.3.6.1.4.1.171.11.70.9.2.3.1.1.6, values: { 4 | 0: Down, 5 | 1: 10-Full, 6 | 2: 10-Full, 7 | 3: 10-Half, 8 | 4: 10-Half, 9 | 5: 100-Full, 10 | 6: 100-Full, 11 | 7: 100-Half, 12 | 8: 100-Half, 13 | 9: 1G-Full, 14 | 10: 1G-Full, 15 | 11: 1G-Half, 16 | 12: 1G-Half, 17 | 13: 10G-Full, 18 | 14: 10G-Full, 19 | 15: 10G-Half, 20 | 16: 10G-Half 21 | } } 22 | - { name: dlink.PortCtrlPortAdminState, oid: .1.3.6.1.4.1.171.11.70.9.2.3.2.1.4, values: { 3: Enabled, 2: Disabled } } 23 | - { name: dlink.PortCtrlPortNwayState, oid: .1.3.6.1.4.1.171.11.70.9.2.3.2.1.5, values: { 1: Other, 2: Enabled, 3: 10-Half, 4: 10-Full, 5: 100-Half, 6: 100-Full, 7: 1G-Half, 8: 1G-Full } } 24 | -------------------------------------------------------------------------------- /configs/oids/eltex/eltex-mes.yml: -------------------------------------------------------------------------------- 1 | - {name: rlStack.unitIdTable, oid: .1.3.6.1.4.1.89.107.1} 2 | -------------------------------------------------------------------------------- /configs/oids/juniper.yml: -------------------------------------------------------------------------------- 1 | 2 | - {name: jnx.vlan.name, oid: .1.3.6.1.4.1.2636.3.48.1.3.1.1.2} 3 | - {name: jnx.vlan.tag, oid: .1.3.6.1.4.1.2636.3.48.1.3.1.1.3 } 4 | - {name: jnx.vlan.fdb_id, oid: .1.3.6.1.4.1.2636.3.48.1.3.1.1.5} 5 | 6 | 7 | -------------------------------------------------------------------------------- /configs/oids/mikrotik/ros14988.yml: -------------------------------------------------------------------------------- 1 | - {name: sys.serialNum, oid: .1.3.6.1.4.1.14988.1.1.7.3.0} 2 | -------------------------------------------------------------------------------- /configs/oids/raisecom/iscom2600.yml: -------------------------------------------------------------------------------- 1 | - {name: if.StatsDuplexStatus, oid: .1.3.6.1.2.1.10.7.2.1.19, access: read , values: {1: Down, 2: Full, 3: Half}} -------------------------------------------------------------------------------- /configs/oids/xos.yml: -------------------------------------------------------------------------------- 1 | # Аналог LACP 2 | - { name: port.loadShare.status, oid: .1.3.6.1.4.1.1916.1.4.3.1.4, values: { 3 | 1: 'active(1)', 4 | 2: 'notInService(2)', 5 | 3: 'notReady(3)', 6 | 4: 'createAndGo(4)', 7 | 5: 'createAndWait(5)', 8 | 6: 'destroy(6)' 9 | } 10 | } -------------------------------------------------------------------------------- /configs/traps/cdata.yml: -------------------------------------------------------------------------------- 1 | - name: onuOnlineStatusChange 2 | description: Online status changed 3 | object: .1.3.6.1.4.1.34592.1.3.6.0.7 4 | is_interface: true 5 | modules: 6 | - pon_onts_status 7 | 8 | - name: onuPortLoopBack 9 | description: Port loopback detected 10 | object: .1.3.6.1.4.1.34592.1.3.6.0.18 11 | is_interface: true 12 | 13 | - name: powerStatusChange 14 | description: Power status changed 15 | object: .1.3.6.1.4.1.34592.1.3.6.0.3 16 | is_interface: false 17 | 18 | - name: fanStatusChange 19 | description: Fan status changed 20 | object: .1.3.6.1.4.1.34592.1.3.6.0.4 21 | is_interface: false 22 | -------------------------------------------------------------------------------- /configs/traps/global.yml: -------------------------------------------------------------------------------- 1 | - name: LinkUp 2 | description: | 3 | A linkUp trap signifies that the SNMPv2 entity, 4 | acting in an agent role, has detected that the 5 | ifOperStatus object for one of its communication links 6 | has transitioned out of the down state. 7 | object: .1.3.6.1.6.3.1.1.5.4 8 | is_interface: true 9 | modules: 10 | - link_info 11 | 12 | - name: LinkDown 13 | description: | 14 | A linkDown trap signifies that the SNMPv2 entity, 15 | acting in an agent role, has detected that the 16 | ifOperStatus object for one of its communication links 17 | is about to transition into the down state. 18 | object: .1.3.6.1.6.3.1.1.5.3 19 | is_interface: true 20 | modules: 21 | - link_info 22 | -------------------------------------------------------------------------------- /docs/modules_example_output/clear_counters.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": true, 3 | "arguments": [] 4 | } -------------------------------------------------------------------------------- /docs/modules_example_output/ctrl_port_descr.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": true, 3 | "arguments": { 4 | "port": "2", 5 | "description": "TEST" 6 | } 7 | } -------------------------------------------------------------------------------- /docs/modules_example_output/dhcp_server_info.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [ 3 | { 4 | "name": "ControlPower", 5 | "interface": "ControlPower", 6 | "lease_time": "1d", 7 | "address_pool": "ControlPower", 8 | "extra": { 9 | "vlan": { 10 | "vlan_id": "100", 11 | "name": "ControlPower", 12 | "disabled": "false", 13 | "arp": "enabled" 14 | } 15 | } 16 | } 17 | ], 18 | "arguments": { 19 | "vlan_id": "100" 20 | } 21 | } -------------------------------------------------------------------------------- /docs/modules_example_output/fdb.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [ 3 | { 4 | "interface": { 5 | "id": "3", 6 | "name": "1\/3" 7 | }, 8 | "vlan_id": "301", 9 | "mac": "20:C9:D0:98:BE:5A", 10 | "status": "LEARNED" 11 | } 12 | ], 13 | "arguments": { 14 | "interface": "3" 15 | } 16 | } -------------------------------------------------------------------------------- /docs/modules_example_output/interface_vlan_info.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [ 3 | { 4 | "vlan_id": "100", 5 | "name": "ControlPower", 6 | "disabled": "false", 7 | "arp": "enabled" 8 | } 9 | ], 10 | "arguments": { 11 | "vlan_id": "100" 12 | } 13 | } -------------------------------------------------------------------------------- /docs/modules_example_output/pon_fdb.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [ 3 | { 4 | "interface": { 5 | "name": "pon0\/0\/2:1", 6 | "parent": 16780800, 7 | "id": 16780801, 8 | "xid": 14, 9 | "type": "ONU", 10 | "onu_num": 1, 11 | "uni": "1" 12 | }, 13 | "mac_address": "40:16:7E:B3:91:98", 14 | "vlan_id": 40 15 | } 16 | ], 17 | "arguments": [] 18 | } -------------------------------------------------------------------------------- /docs/modules_example_output/pon_onts_mac_addr.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [ 3 | { 4 | "interface": { 5 | "name": "pon0\/0\/2:1", 6 | "parent": 16780800, 7 | "id": 16780801, 8 | "xid": 14, 9 | "type": "ONU", 10 | "onu_num": 1, 11 | "uni": null, 12 | "onu_id": "16780801" 13 | }, 14 | "mac_address": "E0:E8:E6:B9:57:99" 15 | }, 16 | { 17 | "interface": { 18 | "name": "pon0\/0\/2:2", 19 | "parent": 16780800, 20 | "id": 16780802, 21 | "xid": 14, 22 | "type": "ONU", 23 | "onu_num": 2, 24 | "uni": null, 25 | "onu_id": "16780802" 26 | }, 27 | "mac_address": "E0:E8:E6:B9:57:9F" 28 | } 29 | ], 30 | "arguments": [] 31 | } -------------------------------------------------------------------------------- /docs/modules_example_output/pvid.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [ 3 | { 4 | "pvid": "303", 5 | "port": "13" 6 | } 7 | ], 8 | "arguments": { 9 | "port": "13" 10 | } 11 | } -------------------------------------------------------------------------------- /docs/modules_example_output/save_config.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": true, 3 | "arguments": [] 4 | } -------------------------------------------------------------------------------- /docs/modules_example_output/zte_onu_signal_strength.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": { 3 | "onu": "gpon-onu_1\/2\/1:3", 4 | "onu_rx": "-28.860", 5 | "olt_rx": "-26.856" 6 | }, 7 | "arguments": { 8 | "onu": "gpon-onu_1\/2\/1:3" 9 | } 10 | } -------------------------------------------------------------------------------- /docs/modules_example_output/zte_unregistered_onu.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [], 3 | "arguments": [] 4 | } -------------------------------------------------------------------------------- /docs/zte/img.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meklis/switcher-core/1e7d2fc2f62b79d6520b60e36ebc8679240c61fd/docs/zte/img.png -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | -------------------------------------------------------------------------------- /src/Config/Collector.php: -------------------------------------------------------------------------------- 1 | reader = $reader; 22 | $instance->read(); 23 | $instance->instance = $instance; 24 | return $instance; 25 | } 26 | protected abstract function read(); 27 | } -------------------------------------------------------------------------------- /src/Exceptions/IncompleteResponseException.php: -------------------------------------------------------------------------------- 1 | oids->getOidByName('if.HCInOctets')->getOid(), 14 | $this->oids->getOidByName('if.HCOutOctets')->getOid(), 15 | ]; 16 | 17 | if($params['interface']) { 18 | $interface = $this->parseInterface($params['interface']); 19 | foreach ($oids as $num=>$oid) { 20 | $oids[$num] .= ".{$interface['_snmp_id']}"; 21 | } 22 | } 23 | 24 | $oidObjects = []; 25 | foreach ($oids as $oid) { 26 | $oidObjects[] = Oid::init($oid); 27 | } 28 | 29 | $this->response = $this->formatResponse($this->snmp->walk($oidObjects)); 30 | return $this; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/Modules/Arista/Descriptions.php: -------------------------------------------------------------------------------- 1 | parseInterface($params['interface']); 12 | 13 | 14 | $description = str_replace(' ', '_', $params['description']); 15 | $this->checkSnmpRespError($this->snmp->set( 16 | Oid::init($this->oids->getOidByName('if.Alias')->getOid() . ".{$interface['xid']}") 17 | ->setType('StringValue') 18 | ->setValue($description) 19 | )); 20 | 21 | $this->response = true; 22 | return $this; 23 | } 24 | 25 | function getPretty() 26 | { 27 | return $this->response; 28 | } 29 | } -------------------------------------------------------------------------------- /src/Modules/BDcom/GP3600/ParseInterface.php: -------------------------------------------------------------------------------- 1 | response; 26 | } 27 | 28 | function getPretty() 29 | { 30 | return $this->response; 31 | } 32 | 33 | /** 34 | * @param array $filter 35 | * @return $this|AbstractModule 36 | * @throws Exception 37 | */ 38 | public function run($filter = []) 39 | { 40 | $this->response = $this->parseInterface($filter['interface']); 41 | return $this; 42 | } 43 | } 44 | 45 | -------------------------------------------------------------------------------- /src/Modules/BDcom/GP3600/PonPortsList.php: -------------------------------------------------------------------------------- 1 | response; 21 | } 22 | 23 | function getPretty() 24 | { 25 | return array_map(function($e){ 26 | if(!isset($e['pontype'])) { 27 | $e['pontype'] = null; 28 | } 29 | return $e; 30 | },$this->getPhysicalInterfaces()); 31 | } 32 | 33 | /** 34 | * @param array $filter 35 | * @return $this|AbstractModule 36 | * @throws Exception 37 | */ 38 | public function run($filter = []) 39 | { 40 | return $this; 41 | } 42 | } 43 | 44 | -------------------------------------------------------------------------------- /src/Modules/BDcom/GP3600/PortDescriptionControl.php: -------------------------------------------------------------------------------- 1 | parseInterface($params['interface']); 11 | 12 | if ($interface['type'] == 'ONU') { 13 | throw new \InvalidArgumentException("ONU not allowed, just physical ports"); 14 | } 15 | 16 | $description = str_replace(' ', '_', $params['description']); 17 | $this->checkSnmpRespError($this->snmp->set( 18 | Oid::init($this->oids->getOidByName('if.Alias')->getOid() . ".{$interface['xid']}") 19 | ->setType('StringValue') 20 | ->setValue($description) 21 | )); 22 | 23 | $this->response = true; 24 | return $this; 25 | } 26 | 27 | function getPretty() 28 | { 29 | return $this->response; 30 | } 31 | } -------------------------------------------------------------------------------- /src/Modules/BDcom/InterfacesList.php: -------------------------------------------------------------------------------- 1 | response; 27 | } 28 | 29 | function getPrettyFiltered($filter = [], $fromCache = false) 30 | { 31 | $data = $this->getPretty(); 32 | return $data; 33 | } 34 | 35 | function getPretty() 36 | { 37 | return $this->getPhysicalInterfaces(); 38 | } 39 | 40 | 41 | public function run($filter = []) 42 | { 43 | $this->response = array_values($this->getInterfacesIds()); 44 | return $this; 45 | } 46 | 47 | } 48 | 49 | -------------------------------------------------------------------------------- /src/Modules/BDcom/OntReboot.php: -------------------------------------------------------------------------------- 1 | parseInterface($filter['interface']); 30 | $this->console->exec("epon reboot onu interface {$iface['name']}", true, "Are you sure"); 31 | $this->console->exec("y"); 32 | return $this; 33 | } 34 | } 35 | 36 | -------------------------------------------------------------------------------- /src/Modules/BDcom/OntReset.php: -------------------------------------------------------------------------------- 1 | oids->getOidByName('ont.action.resetOnu')->getOid(); 30 | $resp = $this->snmp->set(Oid::init($oid, false, 'Integer', 0)); 31 | if($resp[0]->error) { 32 | throw new \Exception("Returned error from device: {$resp[0]->error}"); 33 | } 34 | return $this; 35 | } 36 | } 37 | 38 | -------------------------------------------------------------------------------- /src/Modules/BDcom/ParseInterface.php: -------------------------------------------------------------------------------- 1 | response; 26 | } 27 | 28 | function getPretty() 29 | { 30 | return $this->response; 31 | } 32 | 33 | /** 34 | * @param array $filter 35 | * @return $this|AbstractModule 36 | * @throws Exception 37 | */ 38 | public function run($filter = []) 39 | { 40 | $this->response = $this->parseInterface($filter['interface']); 41 | return $this; 42 | } 43 | } 44 | 45 | -------------------------------------------------------------------------------- /src/Modules/BDcom/PonPortsList.php: -------------------------------------------------------------------------------- 1 | response; 21 | } 22 | 23 | function getPretty() 24 | { 25 | return array_map(function($e){ 26 | if(!isset($e['pontype'])) { 27 | $e['pontype'] = null; 28 | } 29 | return $e; 30 | },$this->getPhysicalInterfaces()); 31 | } 32 | 33 | /** 34 | * @param array $filter 35 | * @return $this|AbstractModule 36 | * @throws Exception 37 | */ 38 | public function run($filter = []) 39 | { 40 | return $this; 41 | } 42 | } 43 | 44 | -------------------------------------------------------------------------------- /src/Modules/CData/FD11XX/ParseInterface.php: -------------------------------------------------------------------------------- 1 | response; 26 | } 27 | 28 | function getPretty() 29 | { 30 | return $this->response; 31 | } 32 | 33 | /** 34 | * @param array $filter 35 | * @return $this|AbstractModule 36 | * @throws Exception 37 | */ 38 | public function run($filter = []) 39 | { 40 | $this->response = $this->parseInterface($filter['interface']); 41 | return $this; 42 | } 43 | } 44 | 45 | -------------------------------------------------------------------------------- /src/Modules/CData/FD16xxV3/InterfacesList.php: -------------------------------------------------------------------------------- 1 | response; 20 | } 21 | 22 | function getPretty() 23 | { 24 | return array_values($this->getPhysicalInterfaces()); 25 | } 26 | 27 | /** 28 | * @param array $filter 29 | * @return $this|AbstractModule 30 | * @throws Exception 31 | */ 32 | public function run($filter = []) 33 | { 34 | return $this; 35 | } 36 | } 37 | 38 | -------------------------------------------------------------------------------- /src/Modules/CData/FD16xxV3/ParseInterface.php: -------------------------------------------------------------------------------- 1 | response; 26 | } 27 | 28 | function getPretty() 29 | { 30 | return $this->response; 31 | } 32 | 33 | /** 34 | * @param array $filter 35 | * @return $this|AbstractModule 36 | * @throws Exception 37 | */ 38 | public function run($filter = []) 39 | { 40 | $this->response = $this->parseInterface($filter['interface']); 41 | return $this; 42 | } 43 | } 44 | 45 | -------------------------------------------------------------------------------- /src/Modules/CData/FD16xxV3/PonPortsList.php: -------------------------------------------------------------------------------- 1 | response; 20 | } 21 | 22 | function getPretty() 23 | { 24 | return array_values(array_filter($this->getPhysicalInterfaces(), function($interface) { 25 | return $interface['type'] == 'PON'; 26 | })); 27 | } 28 | 29 | /** 30 | * @param array $filter 31 | * @return $this|AbstractModule 32 | * @throws Exception 33 | */ 34 | public function run($filter = []) 35 | { 36 | return $this; 37 | } 38 | } 39 | 40 | -------------------------------------------------------------------------------- /src/Modules/CData/InterfacesList.php: -------------------------------------------------------------------------------- 1 | response; 21 | } 22 | 23 | function getPretty() 24 | { 25 | return array_values($this->model->getExtraParamByName('interfaces')); 26 | } 27 | 28 | /** 29 | * @param array $filter 30 | * @return $this|AbstractModule 31 | * @throws Exception 32 | */ 33 | public function run($filter = []) 34 | { 35 | return $this; 36 | } 37 | } 38 | 39 | -------------------------------------------------------------------------------- /src/Modules/CData/OltSaveSettings.php: -------------------------------------------------------------------------------- 1 | oids->getOidByName('olt.save')->getOid(); 30 | $resp = $this->snmp->set(Oid::init($oid, false, 'Integer', 1)); 31 | if($resp[0]->error) { 32 | throw new \Exception("Returned error from device: {$resp[0]->error}"); 33 | } 34 | return $this; 35 | } 36 | } 37 | 38 | -------------------------------------------------------------------------------- /src/Modules/CData/ParseInterface.php: -------------------------------------------------------------------------------- 1 | response; 26 | } 27 | 28 | function getPretty() 29 | { 30 | return $this->response; 31 | } 32 | 33 | /** 34 | * @param array $filter 35 | * @return $this|AbstractModule 36 | * @throws Exception 37 | */ 38 | public function run($filter = []) 39 | { 40 | $this->response = $this->parseInterface($filter['interface']); 41 | return $this; 42 | } 43 | } 44 | 45 | -------------------------------------------------------------------------------- /src/Modules/CiscoSwitch/Descriptions.php: -------------------------------------------------------------------------------- 1 | model->getPorts()}"; 12 | } 13 | } -------------------------------------------------------------------------------- /src/Modules/Dlink/DescriptionPortControl.php: -------------------------------------------------------------------------------- 1 | parseInterface($params['interface']); 14 | $description = str_replace([" "], '_', $params['description']); 15 | if(trim($description)) { 16 | return "config ports {$interface['_key']} description {$description}"; 17 | } else { 18 | return "config ports {$interface['_key']} description \"\""; 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /src/Modules/Dlink/InterfacesList.php: -------------------------------------------------------------------------------- 1 | parseInterface($filter['interface'])]; 21 | } else { 22 | return array_values($this->getIndexes()); 23 | } 24 | } 25 | 26 | 27 | } -------------------------------------------------------------------------------- /src/Modules/Dlink/LldpInfo.php: -------------------------------------------------------------------------------- 1 | parseInterface($filter['interface']); 20 | } 21 | 22 | 23 | } -------------------------------------------------------------------------------- /src/Modules/Dlink/RawConsoleCommand.php: -------------------------------------------------------------------------------- 1 | getModule('link_info')->run(['interface' => $params['interface']])->getPrettyFiltered(['interface' => $params['interface']]); 17 | $interface = $this->parseInterface($params['interface']); 18 | if(count($interfaces) > 1) { 19 | return "config ports {$interface['_key']} speed {$this->getRevertSpeed($params['speed'])} && 20 | config ports {$interface['_key']} medium_type fiber speed {$this->getRevertSpeed($params['speed'])} 21 | "; 22 | } 23 | return "config ports {$interface['_key']} speed {$this->getRevertSpeed($params['speed'])}"; 24 | } 25 | } -------------------------------------------------------------------------------- /src/Modules/Dlink/StatePortControl.php: -------------------------------------------------------------------------------- 1 | parseInterface($params['interface']); 15 | return "config ports {$interface['_key']} state {$params['state']}"; 16 | } 17 | } -------------------------------------------------------------------------------- /src/Modules/Edgecore/ClearCounters.php: -------------------------------------------------------------------------------- 1 | getPretty(); 27 | } 28 | 29 | public function run($params = []) 30 | { 31 | foreach ($this->getInterfacesIds() as $port) { 32 | $this->console->exec('clear counters ethernet '.$port['_unit'].'/'.$port['_port']); 33 | } 34 | return $this; 35 | } 36 | } -------------------------------------------------------------------------------- /src/Modules/Edgecore/Counters.php: -------------------------------------------------------------------------------- 1 | parseInterface($filter['interface']); 20 | } else { 21 | $ifaces = $this->getInterfacesIds(); 22 | } 23 | $this->response = $this->snmpGetByInterfaces($ifaces, $this->oids->getOidsByRegex('if\.HC.*')); 24 | return $this; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/Modules/EltexSwitch/Descriptions.php: -------------------------------------------------------------------------------- 1 | parseInterface($filter['interface']); 20 | } else { 21 | $ifaces = $this->getInterfacesIds(); 22 | } 23 | 24 | $oid = $this->oids->getOidByName('if.Alias') ; 25 | 26 | $this->response = $this->snmpGetByInterfaces($ifaces, [$oid]); 27 | return $this; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/Modules/EltexSwitch/Fdb.php: -------------------------------------------------------------------------------- 1 | parseInterface($filter['interface']); 20 | } else { 21 | $ifaces = $this->getInterfacesIds(); 22 | } 23 | $this->response = $this->snmpGetByInterfaces($ifaces,$this->oids->getOidsByRegex('rmon.*')); 24 | return $this; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/Modules/EltexSwitch/SetPortDescription.php: -------------------------------------------------------------------------------- 1 | parseInterface($filter['interface']); 20 | } else { 21 | $ifaces = $this->getInterfacesIds(); 22 | } 23 | $this->response = $this->snmpGetByInterfaces($ifaces, $this->oids->getOidsByRegex('if\.HC.*')); 24 | return $this; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/Modules/ExtremeXOS/Descriptions.php: -------------------------------------------------------------------------------- 1 | parseInterface($filter['interface']); 20 | } else { 21 | $ifaces = $this->getInterfacesIds(); 22 | } 23 | 24 | $oid = $this->oids->getOidByName('if.Alias') ; 25 | 26 | $this->response = $this->snmpGetByInterfaces($ifaces, [$oid]); 27 | return $this; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/Modules/ExtremeXOS/InterfacesList.php: -------------------------------------------------------------------------------- 1 | parseInterface($filter['interface']); 20 | } else { 21 | $ifaces = $this->getInterfacesIds(); 22 | } 23 | $this->response = $this->snmpGetByInterfaces($ifaces,$this->oids->getOidsByRegex('rmon.*')); 24 | return $this; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/Modules/ExtremeXOS/SetPortDescription.php: -------------------------------------------------------------------------------- 1 | response; 26 | } 27 | 28 | function getPretty() 29 | { 30 | return $this->response; 31 | } 32 | 33 | /** 34 | * @param array $filter 35 | * @return $this|AbstractModule 36 | * @throws Exception 37 | */ 38 | public function run($filter = []) 39 | { 40 | $this->response = $this->parseInterface($filter['interface']); 41 | return $this; 42 | } 43 | } 44 | 45 | -------------------------------------------------------------------------------- /src/Modules/General/SupportedModules.php: -------------------------------------------------------------------------------- 1 | model->getModulesList(); 16 | } 17 | 18 | 19 | function getPrettyFiltered($filter = []) 20 | { 21 | return $this->model->getModulesList(); 22 | } 23 | 24 | public function run($filter = []) 25 | { 26 | return $this; 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/Modules/General/Switches/AbstractInterfaces.php: -------------------------------------------------------------------------------- 1 | getInterfacesIds()); 20 | if($filter['interface']) { 21 | $iface = $this->parseInterface($filter['interface']); 22 | $ifaces = array_filter($ifaces, function ($e) use ($iface) { 23 | return $e['id'] == $iface['id']; 24 | }); 25 | } 26 | return $ifaces; 27 | } 28 | 29 | } -------------------------------------------------------------------------------- /src/Modules/General/Switches/ParseInterface.php: -------------------------------------------------------------------------------- 1 | parseInterface($filter['interface']); 20 | } 21 | 22 | 23 | } -------------------------------------------------------------------------------- /src/Modules/HPESwitch/Descriptions.php: -------------------------------------------------------------------------------- 1 | $v) { 18 | if(strpos($v['description'], 'HUAWEI,') === 0) { 19 | $pretty[$k]['description'] = ''; 20 | } 21 | } 22 | return $pretty; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Modules/Huawei/Errors.php: -------------------------------------------------------------------------------- 1 | oids->getOidByName('olt.save')->getOid(); 30 | $resp = $this->snmp->set(Oid::init($oid, false, 'Integer', 1)); 31 | if($resp[0]->error) { 32 | throw new \Exception("Returned error from device: {$resp[0]->error}"); 33 | } 34 | return $this; 35 | } 36 | } 37 | 38 | -------------------------------------------------------------------------------- /src/Modules/HuaweiOLT/ParseInterface.php: -------------------------------------------------------------------------------- 1 | response; 26 | } 27 | 28 | function getPretty() 29 | { 30 | return $this->response; 31 | } 32 | 33 | /** 34 | * @param array $filter 35 | * @return $this|AbstractModule 36 | * @throws Exception 37 | */ 38 | public function run($filter = []) 39 | { 40 | $this->response = $this->parseInterface($filter['interface']); 41 | return $this; 42 | } 43 | } 44 | 45 | -------------------------------------------------------------------------------- /src/Modules/HuaweiOLT/PonPortsList.php: -------------------------------------------------------------------------------- 1 | response; 21 | } 22 | 23 | function getPretty() 24 | { 25 | return array_values(array_filter($this->getInterfaces(), function($e){ 26 | return $e['type'] == 'PON'; 27 | })); 28 | } 29 | 30 | /** 31 | * @param array $filter 32 | * @return $this|AbstractModule 33 | * @throws Exception 34 | */ 35 | public function run($filter = []) 36 | { 37 | return $this; 38 | } 39 | } 40 | 41 | -------------------------------------------------------------------------------- /src/Modules/HuaweiQuidwayS93/Counters.php: -------------------------------------------------------------------------------- 1 | $v) { 18 | if(strpos($v['description'], 'HUAWEI,') === 0) { 19 | $pretty[$k]['description'] = ''; 20 | } 21 | } 22 | return $pretty; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Modules/HuaweiQuidwayS93/Errors.php: -------------------------------------------------------------------------------- 1 | parseInterface($filter['interface']); 20 | } else { 21 | $ifaces = $this->getInterfacesIds(); 22 | } 23 | $this->response = $this->snmpGetByInterfaces($ifaces, $this->oids->getOidsByRegex('if\.HC.*')); 24 | return $this; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/Modules/Juniper/Descriptions.php: -------------------------------------------------------------------------------- 1 | parseInterface($filter['interface']); 20 | } else { 21 | $ifaces = $this->getInterfacesIds(); 22 | } 23 | 24 | $oid = $this->oids->getOidByName('if.Alias') ; 25 | 26 | $this->response = $this->snmpGetByInterfaces($ifaces, [$oid]); 27 | return $this; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/Modules/Juniper/InterfacesList.php: -------------------------------------------------------------------------------- 1 | parseInterface($filter['interface']); 20 | } else { 21 | $ifaces = $this->getInterfacesIds(); 22 | } 23 | $this->response = $this->snmpGetByInterfaces($ifaces,$this->oids->getOidsByRegex('rmon.*')); 24 | return $this; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/Modules/Juniper/SetPortDescription.php: -------------------------------------------------------------------------------- 1 | getOid()); 14 | }, [ 15 | $this->oids->getOidByName('knock.state'), 16 | ] 17 | ); 18 | $this->response = $this->formatResponse($this->snmp->get($oids)); 19 | return $this; 20 | } 21 | 22 | public function getPretty() 23 | { 24 | return [ 25 | 'state' => $this->getResponseByName('knock.state')->fetchOne()->getParsedValue() 26 | ]; 27 | } 28 | 29 | public function getPrettyFiltered($filter = []) 30 | { 31 | return $this->getPretty(); 32 | } 33 | 34 | } -------------------------------------------------------------------------------- /src/Modules/Sensors/Ping3/PowerSensorState.php: -------------------------------------------------------------------------------- 1 | getOid()); 14 | }, [ 15 | $this->oids->getOidByName('power.sensorState'), 16 | ] 17 | ); 18 | $this->response = $this->formatResponse($this->snmp->get($oids)); 19 | return $this; 20 | } 21 | 22 | public function getPretty() 23 | { 24 | return [ 25 | 'state' => $this->getResponseByName('power.sensorState')->fetchOne()->getParsedValue() 26 | ]; 27 | } 28 | 29 | public function getPrettyFiltered($filter = []) 30 | { 31 | return $this->getPretty(); 32 | } 33 | 34 | } -------------------------------------------------------------------------------- /src/Modules/TpLinkSwitch/Descriptions.php: -------------------------------------------------------------------------------- 1 | response; 24 | } 25 | 26 | function getPrettyFiltered($filter = [], $fromCache = false) 27 | { 28 | $data = $this->getPretty(); 29 | return $data; 30 | } 31 | 32 | function getPretty() 33 | { 34 | return $this->response; 35 | } 36 | 37 | 38 | public function run($filter = []) 39 | { 40 | //$this->response = $this->getInterfaces(); 41 | $this->response = $this->getPhysicalInterfaces(); 42 | return $this; 43 | } 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /src/Modules/VsolOlts/GPONV1600/ParseInterface.php: -------------------------------------------------------------------------------- 1 | response; 26 | } 27 | 28 | function getPretty() 29 | { 30 | return $this->response; 31 | } 32 | 33 | /** 34 | * @param array $filter 35 | * @return $this|AbstractModule 36 | * @throws Exception 37 | */ 38 | public function run($filter = []) 39 | { 40 | $this->response = $this->parseInterface($filter['interface']); 41 | return $this; 42 | } 43 | } 44 | 45 | -------------------------------------------------------------------------------- /src/Modules/VsolOlts/GPONV1600/PonPortsList.php: -------------------------------------------------------------------------------- 1 | response; 21 | } 22 | 23 | function getPretty() 24 | { 25 | return array_values(array_filter($this->getPhysicalInterfaces(), function ($e) { 26 | return $e['type'] == 'PON'; 27 | })); 28 | } 29 | 30 | /** 31 | * @param array $filter 32 | * @return $this|AbstractModule 33 | * @throws Exception 34 | */ 35 | public function run($filter = []) 36 | { 37 | return $this; 38 | } 39 | } 40 | 41 | -------------------------------------------------------------------------------- /src/Modules/VsolOlts/GPONV1600/PortDescriptionControl.php: -------------------------------------------------------------------------------- 1 | parseInterface($params['interface']); 12 | 13 | if ($interface['type'] == 'ONU') { 14 | throw new \InvalidArgumentException("ONU not allowed, just physical interfaces"); 15 | } 16 | $description = str_replace(' ', '_', $params['description']); 17 | $this->checkSnmpRespError($this->snmp->set( 18 | Oid::init($this->oids->getOidByName('if.Alias')->getOid() . ".{$interface['xid']}") 19 | ->setType('StringValue') 20 | ->setValue($description) 21 | )); 22 | 23 | $this->response = true; 24 | return $this; 25 | } 26 | 27 | function getPretty() 28 | { 29 | return $this->response; 30 | } 31 | } -------------------------------------------------------------------------------- /src/Modules/VsolOlts/InterfacesList.php: -------------------------------------------------------------------------------- 1 | response; 27 | } 28 | 29 | function getPrettyFiltered($filter = [], $fromCache = false) 30 | { 31 | $data = $this->getPretty(); 32 | return $data; 33 | } 34 | 35 | function getPretty() 36 | { 37 | return $this->response; 38 | } 39 | 40 | 41 | public function run($filter = []) 42 | { 43 | $this->response = array_values($this->getInterfaces()); 44 | return $this; 45 | } 46 | 47 | } 48 | 49 | -------------------------------------------------------------------------------- /src/Modules/VsolOlts/OltReboot.php: -------------------------------------------------------------------------------- 1 | oids->getOidByName('action.reboot')->getOid(); 30 | $resp = $this->snmp->set(Oid::init($oid, false, 'Integer', 1)); 31 | if($resp[0]->error) { 32 | throw new \Exception("Returned error from device: {$resp[0]->error}"); 33 | } 34 | return $this; 35 | } 36 | } 37 | 38 | -------------------------------------------------------------------------------- /src/Modules/VsolOlts/ParseInterface.php: -------------------------------------------------------------------------------- 1 | response; 26 | } 27 | 28 | function getPretty() 29 | { 30 | return $this->response; 31 | } 32 | 33 | /** 34 | * @param array $filter 35 | * @return $this|AbstractModule 36 | * @throws Exception 37 | */ 38 | public function run($filter = []) 39 | { 40 | $this->response = $this->parseInterface($filter['interface']); 41 | return $this; 42 | } 43 | } 44 | 45 | -------------------------------------------------------------------------------- /src/Modules/VsolOlts/PonPortsList.php: -------------------------------------------------------------------------------- 1 | response; 21 | } 22 | 23 | function getPretty() 24 | { 25 | return array_values(array_filter($this->getInterfaces(), function ($e) { 26 | return $e['type'] == 'PON'; 27 | })); 28 | } 29 | 30 | /** 31 | * @param array $filter 32 | * @return $this|AbstractModule 33 | * @throws Exception 34 | */ 35 | public function run($filter = []) 36 | { 37 | return $this; 38 | } 39 | } 40 | 41 | -------------------------------------------------------------------------------- /src/Modules/ZTE/C300Series/DeregOnt.php: -------------------------------------------------------------------------------- 1 | telnet) { 16 | throw new Exception("Module required telnet connection"); 17 | } 18 | $iface = $this->parseInterface($params['interface']); 19 | $interface = "{$iface['_technology']}-olt_{$iface['_shelf']}/{$iface['_slot']}/{$iface['_port']}"; 20 | $this->exec("conf t"); 21 | $this->exec("interface {$interface}"); 22 | $this->exec("no onu {$iface['_onu']}"); 23 | return $this; 24 | } 25 | 26 | public function getPretty() 27 | { 28 | return true; 29 | } 30 | 31 | public function getPrettyFiltered($filter = []) 32 | { 33 | return true; 34 | } 35 | 36 | } -------------------------------------------------------------------------------- /src/Modules/ZTE/C300Series/InterfaceParser.php: -------------------------------------------------------------------------------- 1 | response = $this->parseInterface($params['interface']); 16 | return $this; 17 | } 18 | public function getPretty() 19 | { 20 | return $this->response; 21 | } 22 | 23 | public function getPrettyFiltered($filter = []) 24 | { 25 | return $this->response; 26 | } 27 | 28 | } -------------------------------------------------------------------------------- /src/Modules/ZTE/C300Series/InterfacesList.php: -------------------------------------------------------------------------------- 1 | response = []; 16 | if($params['interface']) { 17 | $this->response[] = $this->parseInterface($params['interface']); 18 | } else { 19 | $this->response = array_values(array_map(function ($i) { 20 | return $this->parseInterface($i['_xid'], 'xid'); 21 | }, $this->listInterfacesByXidNames())); 22 | } 23 | return $this; 24 | } 25 | public function getPretty() 26 | { 27 | return $this->response; 28 | } 29 | 30 | public function getPrettyFiltered($filter = []) 31 | { 32 | return $this->response; 33 | } 34 | 35 | } -------------------------------------------------------------------------------- /src/Modules/ZTE/C300Series/PonPortsList.php: -------------------------------------------------------------------------------- 1 | getCardListWithStatuses(); 15 | foreach ($cards as $card) { 16 | if ($card['oper_status'] !== 'inService') continue; 17 | if (!$card['technology']) continue; 18 | for ($port = 1; $port <= $card['num_ports']; $port++) { 19 | $response[] = $this->parseInterface("{$card['technology']}-olt_{$card['shelf']}/{$card['slot']}/{$port}"); 20 | } 21 | } 22 | $this->response = $response; 23 | return $this; 24 | } 25 | 26 | public function getPretty() 27 | { 28 | return $this->response; 29 | } 30 | 31 | public function getPrettyFiltered($filter = []) 32 | { 33 | return $this->response; 34 | } 35 | 36 | } -------------------------------------------------------------------------------- /src/Modules/ZTE/C300Series/SaveConfig.php: -------------------------------------------------------------------------------- 1 | telnet) { 16 | throw new Exception("Module required telnet connection"); 17 | } 18 | $this->exec("end"); 19 | $this->exec("wr"); 20 | return $this; 21 | } 22 | 23 | 24 | public function getPretty() 25 | { 26 | return true; 27 | } 28 | 29 | public function getPrettyFiltered($filter = []) 30 | { 31 | return true; 32 | } 33 | 34 | } -------------------------------------------------------------------------------- /src/Modules/ZTE/C600Series/DeregOnt.php: -------------------------------------------------------------------------------- 1 | telnet) { 15 | throw new Exception("Module required telnet connection"); 16 | } 17 | $iface = $this->parseInterface($params['interface']); 18 | $interface = "{$iface['_technology']}_olt-{$iface['_shelf']}/{$iface['_slot']}/{$iface['_port']}"; 19 | $this->exec("conf t"); 20 | $this->exec("interface {$interface}"); 21 | $this->exec("no onu {$iface['_onu']}"); 22 | return $this; 23 | } 24 | 25 | public function getPretty() 26 | { 27 | return true; 28 | } 29 | 30 | public function getPrettyFiltered($filter = []) 31 | { 32 | return true; 33 | } 34 | 35 | } -------------------------------------------------------------------------------- /src/Modules/ZTE/C600Series/InterfaceParser.php: -------------------------------------------------------------------------------- 1 | response = $this->parseInterface($params['interface']); 16 | return $this; 17 | } 18 | public function getPretty() 19 | { 20 | return $this->response; 21 | } 22 | 23 | public function getPrettyFiltered($filter = []) 24 | { 25 | return $this->response; 26 | } 27 | 28 | } -------------------------------------------------------------------------------- /src/Modules/ZTE/C600Series/InterfacesList.php: -------------------------------------------------------------------------------- 1 | response = []; 16 | if($params['interface']) { 17 | $this->response[] = $this->parseInterface($params['interface']); 18 | } else { 19 | $this->response = array_values($this->listInterfacesByXidNames()['id']); 20 | } 21 | return $this; 22 | } 23 | public function getPretty() 24 | { 25 | return $this->response; 26 | } 27 | 28 | public function getPrettyFiltered($filter = []) 29 | { 30 | return $this->response; 31 | } 32 | 33 | } -------------------------------------------------------------------------------- /src/Modules/ZTE/C600Series/PonPortsList.php: -------------------------------------------------------------------------------- 1 | getModule('card_list')->run()->getPretty(); 17 | foreach ($cards as $card) { 18 | if(!$card['technology']) continue; 19 | for($port = 1; $port <= $card['num_ports']; $port++) { 20 | $response[] = $this->parseInterface("{$card['technology']}-olt_{$card['shelf']}/{$card['slot']}/{$port}"); 21 | } 22 | } 23 | $this->response = $response; 24 | return $this; 25 | } 26 | public function getPretty() 27 | { 28 | return $this->response; 29 | } 30 | 31 | public function getPrettyFiltered($filter = []) 32 | { 33 | return $this->response; 34 | } 35 | 36 | } -------------------------------------------------------------------------------- /src/Modules/ZTE/C600Series/SaveConfig.php: -------------------------------------------------------------------------------- 1 | telnet) { 16 | throw new Exception("Module required telnet connection"); 17 | } 18 | $this->exec("end"); 19 | $this->exec("wr"); 20 | return $this; 21 | } 22 | 23 | 24 | public function getPretty() 25 | { 26 | return true; 27 | } 28 | 29 | public function getPrettyFiltered($filter = []) 30 | { 31 | return true; 32 | } 33 | 34 | } -------------------------------------------------------------------------------- /src/Switcher/CacheInterface.php: -------------------------------------------------------------------------------- 1 | memcache = new Memcache; 17 | $this->memcache->connect($config['host'], $config['port']); 18 | } 19 | 20 | } 21 | function get($key) { 22 | 23 | } 24 | function set($key, $value, $timeout = 3600) { 25 | 26 | } 27 | 28 | } -------------------------------------------------------------------------------- /src/Switcher/Objects/SnmpResponse.php: -------------------------------------------------------------------------------- 1 | parsed_value = $value; 12 | return $this; 13 | } 14 | 15 | function getParsedValue() { 16 | return trim($this->parsed_value); 17 | } 18 | function setValue($val) { 19 | $this->value = $val; 20 | return $this; 21 | } 22 | function setOid($val) { 23 | $this->oid = $val; 24 | return $this; 25 | } 26 | function setHexValue($val) { 27 | $this->hex_value = $val; 28 | return $this; 29 | } 30 | function setType($val) { 31 | $this->type = $val; 32 | return $this; 33 | } 34 | } -------------------------------------------------------------------------------- /src/Switcher/PhpCache.php: -------------------------------------------------------------------------------- 1 | cache[$key] = [ 13 | 'value' => $value, 14 | 'timeout' => $timeout + time(), 15 | ]; 16 | return $this; 17 | } 18 | public function get($key) { 19 | if(isset($this->cache[$key]) && $this->cache[$key]['timeout'] > time()) { 20 | return $this->cache[$key]['value']; 21 | } else { 22 | return null; 23 | } 24 | } 25 | public function isExist($key) { 26 | return isset($this->cache[$key]); 27 | } 28 | } -------------------------------------------------------------------------------- /test.php: -------------------------------------------------------------------------------- 1 | VLAN ID: $vlanId" . PHP_EOL; 18 | } --------------------------------------------------------------------------------