Skip to content

Commit

Permalink
[BF] pre-init arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
barryo committed Feb 27, 2017
1 parent 30938dc commit 5230c7a
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions app/Services/Grapher/Backend/Mrtg.php
Expand Up @@ -125,12 +125,23 @@ public function generateConfiguration( IXP $ixp, int $type = self::GENERATED_CON
* * array `['ixpports']` conataining the PhysicalInterface IDs of peering ports
*
*
* @param Entities\IXP $ixp The IXP to generate the config for (multi-IXP mode)
* @param \Entities\IXP $ixp The IXP to generate the config for (multi-IXP mode)
* @return array
*/
public function getPeeringPorts( IXP $ixp ): array {
$data = [];
$data['ixpports_maxbytes'] = 0;
$data['ixpports'] = [];
$data['ixpports_maxbytes'] = 0;
$data['infras'] = [];
$data['infraports'] = [];
$data['infraports_maxbytes'] = [];
$data['custs'] = [];
$data['custports'] = [];
$data['custlags'] = [];
$data['sws'] = [];
$data['swports'] = [];
$data['swports_maxbytes'] = [];


// we need to wrap switch ports in physical interfaces for switch aggregates and, as such, we need to use unused physical interface IDs
$maxPiID = 0;
Expand Down

0 comments on commit 5230c7a

Please sign in to comment.