Fix a few Db* to Eloquent requests (#14278)

* Eloquent for 2 requests

* Eloquent for 1 request

* a few in Dell

* Model

* and more with timos

* and more with timos

* and firebrick

* firebrick

* one query instead of many

* Should use collection get

* Update timos.inc.php

* Update dell-os10.inc.php

* avoid changing timos as it breaks something

* new try with timos

* deps for BGP

* revert deps for BGP

* style

* style

* deps for BGP, 2nd try

* typo

* revert aos7

* fix create

* firebricktests

* firebrick

* firebrick

* cipsec-fix

* cipsec

* timos fix 100th time :)

* ./scripts/save-test-data.php -m os,ports,processors,mempools,vrf,sensors,bgp-peers,mpls,ospf  -o timos -v 7705

* remove timos from this PR

Co-authored-by: Tony Murray <murraytony@gmail.com>
This commit is contained in:
PipoCanaja
2022-10-02 16:04:08 +02:00
committed by GitHub
parent e4451714e2
commit daa8c757f6
9 changed files with 85 additions and 50 deletions

View File

@@ -35,7 +35,22 @@ class BgpPeer extends DeviceRelatedModel
public $timestamps = false;
protected $table = 'bgpPeers';
protected $primaryKey = 'bgpPeer_id';
protected $fillable = [
'vrf_id',
'bgpPeerIdentifier',
'bgpPeerRemoteAs',
'bgpPeerState',
'bgpPeerAdminStatus',
'bgpLocalAddr',
'bgpPeerRemoteAddr',
'bgpPeerInUpdates',
'bgpPeerOutUpdates',
'bgpPeerInTotalMessages',
'bgpPeerOutTotalMessages',
'bgpPeerFsmEstablishedTime',
'bgpPeerInUpdateElapsedTime',
'astext',
];
// ---- Query scopes ----
public function scopeInAlarm(Builder $query)