Convert OS discovery to new style (#12099)

* terra

* airos

* port cisco os polling
old wwan polling was broken and deprecated anyway

* enterasys

* Brother, a few changes

* AW Plus

* Fabos

* set expected test data

* 3com

* Adva FSP150

* advantech

* airos-af

* aix

* akcp

* allied

* allworx and missed mibs

* anyos

* fixup some zyxel shared stuffs
zywall graph polling

* aos

* apc

* apex

* apsoluteos

* fix copyrights

* arris

* arris

* aruba-instant

* ArubaOS

* Ascom

* asuswrt-merlin, ats

* audiocodes

* avocent

* avtech

* barracuda

* binox

* boss

* canonprinter

* cdata

* ceraos

* ciena-waveserver

* fix 3com

* fix airos

* fix brother yaml?

* fix aos more

* fix and improve apc

* fix arista test data

* yaml discovery (basic)

* cimc

* mib not used

* remove old discovery file

* ciscosat

* ciscosb fixes + improvements

* comware

* ctm

* cumulus

* cxr-ts

* cyberoam-utm

* cyberpower

* dahua-nvr

* dasan-nos

* datadomain

* dcn-software and fallback oids

* dd-wrt

* dell-laser

* d*

* e* and location

* forti, post processing, oid coalescing

* Freebsd array of sysDescr regex

* finish f*

* g*

* h*

* i* WIP

* i*

* Junos

* j*

* k*

* unix refactor previous to yaml more
inject $device

* fixes

* fixes

* l*

* m*

* n* ability to set other fields in regex
tnmsne polling to eloquent

* o*

* p*

* q* + bonus calix

* r*

* s* WIP

* s*

* t*

* u*

* v*
rework vrp to yaml (hybrid)

* w*

* x*

* z*

* a* easy no-data

* fixes

* style fixes

* missed ApexPlus

* fix signature

* Add missing location data

* rename getDevice functions

* add new cisco ftd data

* update docs

* revert sill snmp format

* fix snmp options

* update for new smartax test data

* rebase dsm

* fix voss
This commit is contained in:
Tony Murray
2020-09-18 08:12:07 -05:00
committed by GitHub
parent d2d1e18925
commit 941037e44e
1189 changed files with 137252 additions and 12921 deletions

View File

@@ -49,35 +49,35 @@ class Mpls implements Module
if ($os instanceof MplsDiscovery) {
echo "\nMPLS LSPs: ";
ModuleModelObserver::observe('\App\Models\MplsLsp');
$lsps = $this->syncModels($os->getDeviceModel(), 'mplsLsps', $os->discoverMplsLsps());
$lsps = $this->syncModels($os->getDevice(), 'mplsLsps', $os->discoverMplsLsps());
echo "\nMPLS LSP Paths: ";
ModuleModelObserver::observe('\App\Models\MplsLspPath');
$paths = $this->syncModels($os->getDeviceModel(), 'mplsLspPaths', $os->discoverMplsPaths($lsps));
$paths = $this->syncModels($os->getDevice(), 'mplsLspPaths', $os->discoverMplsPaths($lsps));
echo "\nMPLS SDPs: ";
ModuleModelObserver::observe('\App\Models\MplsSdp');
$sdps = $this->syncModels($os->getDeviceModel(), 'mplsSdps', $os->discoverMplsSdps());
$sdps = $this->syncModels($os->getDevice(), 'mplsSdps', $os->discoverMplsSdps());
echo "\nMPLS Services: ";
ModuleModelObserver::observe('\App\Models\MplsService');
$svcs = $this->syncModels($os->getDeviceModel(), 'mplsServices', $os->discoverMplsServices());
$svcs = $this->syncModels($os->getDevice(), 'mplsServices', $os->discoverMplsServices());
echo "\nMPLS SAPs: ";
ModuleModelObserver::observe('\App\Models\MplsSap');
$this->syncModels($os->getDeviceModel(), 'mplsSaps', $os->discoverMplsSaps($svcs));
$this->syncModels($os->getDevice(), 'mplsSaps', $os->discoverMplsSaps($svcs));
echo "\nMPLS SDP Bindings: ";
ModuleModelObserver::observe('\App\Models\MplsSdpBind');
$this->syncModels($os->getDeviceModel(), 'mplsSdpBinds', $os->discoverMplsSdpBinds($sdps, $svcs));
$this->syncModels($os->getDevice(), 'mplsSdpBinds', $os->discoverMplsSdpBinds($sdps, $svcs));
echo "\nMPLS Tunnel Active Routing Hops: ";
ModuleModelObserver::observe('\App\Models\MplsTunnelArHop');
$this->syncModels($os->getDeviceModel(), 'mplsTunnelArHops', $os->discoverMplsTunnelArHops($paths));
$this->syncModels($os->getDevice(), 'mplsTunnelArHops', $os->discoverMplsTunnelArHops($paths));
echo "\nMPLS Tunnel Constrained Shortest Path First Hops: ";
ModuleModelObserver::observe('\App\Models\MplsTunnelCHop');
$this->syncModels($os->getDeviceModel(), 'mplsTunnelCHops', $os->discoverMplsTunnelCHops($paths));
$this->syncModels($os->getDevice(), 'mplsTunnelCHops', $os->discoverMplsTunnelCHops($paths));
echo PHP_EOL;
}
@@ -93,7 +93,7 @@ class Mpls implements Module
public function poll(OS $os)
{
if ($os instanceof MplsPolling) {
$device = $os->getDeviceModel();
$device = $os->getDevice();
if ($device->mplsLsps()->exists()) {
echo "\nMPLS LSPs: ";
@@ -155,13 +155,13 @@ class Mpls implements Module
*/
public function cleanup(OS $os)
{
$os->getDeviceModel()->mplsLsps()->delete();
$os->getDeviceModel()->mplsLspPaths()->delete();
$os->getDeviceModel()->mplsSdps()->delete();
$os->getDeviceModel()->mplsServices()->delete();
$os->getDeviceModel()->mplsSaps()->delete();
$os->getDeviceModel()->mplsSdpBinds()->delete();
$os->getDeviceModel()->mplsTunnelArHops()->delete();
$os->getDeviceModel()->mplsTunnelCHops()->delete();
$os->getDevice()->mplsLsps()->delete();
$os->getDevice()->mplsLspPaths()->delete();
$os->getDevice()->mplsSdps()->delete();
$os->getDevice()->mplsServices()->delete();
$os->getDevice()->mplsSaps()->delete();
$os->getDevice()->mplsSdpBinds()->delete();
$os->getDevice()->mplsTunnelArHops()->delete();
$os->getDevice()->mplsTunnelCHops()->delete();
}
}