\AutoConfigurator
Network devices automatic configuration
Synopsis
class AutoConfigurator
{
- // constants
- const AUTOCONFIG = 'config/autoconfig/';
- // members
- protected array $AllSwitches = ;
- protected array $AllSwitchModels = ;
- protected array $AllSwitchPort = ;
- protected array $AllSwitchLogin = ;
- protected array $AllTerminators = ;
- protected $SnmpHelper = '';
- protected $AltCfg = '';
- // methods
- public void __construct()
- protected void LoadAllSwitches()
- protected void LoadAllSwitchPort()
- protected void LoadAllSwitchLogin()
- protected void LoadTerminators()
- protected void loadAlter()
- protected void LoadAllSwitchModels()
- protected array/bool GetSwitchPortData()
- protected array GetSwitchLoginData()
- protected array GetSwitchesData()
- protected string GetSwUplinkIP()
- protected bool CheckTermIP()
- protected bool CheckVlan()
- protected bool CheckPvid()
- public void ChangePvid()
- public void CreateVlanLooped()
Constants
Name | Value |
---|---|
AUTOCONFIG | 'config/autoconfig/' |
Members
protected
- $AllSwitchLogin
—
array
Contains all available switch login data - $AllSwitchModels
—
array
Contains all available switch models data - $AllSwitchPort
—
array
Contain all available switch ports data - $AllSwitches
—
array
Contains all available switches data - $AllTerminators
—
array
Contains all available vlan terminators - $AltCfg
—
Containt config of alter.ini - $SnmpHelper
—
Placeholder for SNMPHelper() object
Methods
protected
- CheckPvid() — Check if vlan was applied on port
- CheckTermIP() — Check if IP belongs to vlan terminator
- CheckVlan() — Check weather vlan already created on switch
- GetSwUplinkIP() — Get switch IP by ID
- GetSwitchLoginData() — Function for getting switch login data by switchid
- GetSwitchPortData() — Function for getting switchport data by login
- GetSwitchesData() — Function for getting switch data by switchid
- LoadAllSwitchLogin() — Function for getting all switch login data and place it to $AllSwitchLogin
- LoadAllSwitchModels() — Load all from `switchmodels` to $AllSwitchModels.
- LoadAllSwitchPort() — Function for getting all switchport data and place it to $AllSwitchPort
- LoadAllSwitches() — Function for getting all switches and place them to $AllSwitches
- LoadTerminators() — Get all available vlan terminators data and place it to $AllTerminators
- loadAlter() — load alter.ini config
public
- __construct()
- ChangePvid() — Change pvid on users port
- CreateVlanLooped() — Create vlan on transit switches