\SwitchLogin
Siwtches auth data and management basic class
Synopsis
class SwitchLogin
{
- // constants
- const MODULE = 'SWITCHLOGIN';
- const MODULE_URL = '?module=switchlogin';
- const TABLE_NAME = 'switch_login';
- const PATH = 'config/autoconfig/';
- // members
- protected array $switchWithLogin = ;
- protected array $switchWithoutLogin = ;
- protected integer $ipLength = 0;
- protected array $switchSelector = ;
- protected array $allAutoconfigSnmptemplates = ;
- // methods
- public void __construct()
- protected void loadSwitchesWithLogin()
- protected void loadSwitchesWithoutLogin()
- protected void alignLength()
- protected void loadWithLoginSelector()
- protected void loadWithoutLoginSelector()
- protected void loadAutoconfigSnmp()
- public string web_loginAddSnmp()
- public string web_loginEditSnmp()
- public string web_loginAddConn()
- public string web_loginEditConn()
- public void SwLoginAdd()
- public void SwLoginEditQuery()
- public string ShowSwAllLogin()
- public void SwLoginDelete()
Constants
Name | Value |
---|---|
MODULE | 'SWITCHLOGIN' |
MODULE_URL | '?module=switchlogin' |
TABLE_NAME | 'switch_login' |
PATH | 'config/autoconfig/' |
Members
protected
- $allAutoconfigSnmptemplates
—
array
Contains all snmptemplates in config/autoconfig/ - $ipLength
- $switchSelector
—
array
Contains data for switch selector as switch['id'] => switch['location'] + IP + modelname - $switchWithLogin
—
array
Contains all available switch logins - $switchWithoutLogin
Methods
protected
- alignLength()
- loadAutoconfigSnmp() — Parse all found files in directory, reads directive ['define']['DEVICE'] and place it to $allAutoconfigSnmptemplates.
- loadSwitchesWithLogin() — Load all switches logins to $switchWithLogin
- loadSwitchesWithoutLogin()
- loadWithLoginSelector() — Load data from switches, parse it and place to $switchSelector.
- loadWithoutLoginSelector() — Load data from switches, parse it and place to $switchSelector.
public
- __construct()
- ShowSwAllLogin() — Show all availables switch logins
- SwLoginAdd() — Adding login data for switch to database
- SwLoginDelete() — Delete login data for switch from database
- SwLoginEditQuery() — Editing existing login data for switch in database
- web_loginAddConn() — Shows form for adding new ssh\telnet login data for switch
- web_loginAddSnmp() — Shows form for adding new snmp login data for switch
- web_loginEditConn() — Shows form for editing existing ssh\telnet login data for switch
- web_loginEditSnmp() — Shows form for editing existing snmp login for switch