PrivilegeManager handles and manipulates privileges on routers and switches.
More...
PrivilegeManager handles and manipulates privileges on routers and switches.
◆ addCommand()
bool PrivilegeManager::addCommand |
( |
string |
, |
|
|
string |
, |
|
|
bool |
, |
|
|
int |
|
|
) |
| |
Adds the specified command to the specified mode at the specified privilege level.
- Parameters
-
mode,the | mode to add the command to. Valid modes: user, enable, global. |
command,the | command of interest. |
bAll,true | to include all, false to not include all. |
level,the | privilege level. |
- Returns
- bool, true if successful, otherwise false.
◆ getCommandForMode()
pair< string, CommandPrivilege > PrivilegeManager::getCommandForMode |
( |
string |
, |
|
|
string |
|
|
) |
| |
Returns the command string and CommandPrivilege object in the specified mode for the specified command.
- Parameters
-
mode,the | mode of interest. Valid modes: user, enable, global. |
command,the | command of interest. |
- Returns
- pair<string, CommandPrivilege"CommandSet::SCommandPrivilege">, the command and CommandPrivilege object.
◆ getCommandForModeAt()
pair< string, CommandPrivilege > PrivilegeManager::getCommandForModeAt |
( |
string |
, |
|
|
int |
|
|
) |
| |
Returns the command string and CommandPrivilege object in the specified mode at the specified index.
- Parameters
-
mode,the | mode of interest. Valid modes: user, enable, global. |
index,the | index of the command of interest. |
- Returns
- pair<string, CommandPrivilege"CommandSet::SCommandPrivilege">, the command and CommandPrivilege object.
◆ getCommandForModeCount()
int PrivilegeManager::getCommandForModeCount |
( |
string |
| ) |
|
Returns the number of commands for the specified mode.
- Parameters
-
mode,the | mode of interest. Valid modes: user, enable, global. |
- Returns
- int, the number of commands for the specified mode.
◆ getModeAt()
string PrivilegeManager::getModeAt |
( |
int |
| ) |
|
Returns the mode at the specified index.
- Parameters
-
index,the | index of the mode of interest. |
- Returns
- string, the mode at the specified index.
◆ getModeCount()
int PrivilegeManager::getModeCount |
( |
| ) |
|
Returns the number of modes.
- Returns
- int, the number of modes.
◆ isCommandAdded()
bool PrivilegeManager::isCommandAdded |
( |
string |
| ) |
|
Returns true if the command is already added, otherwise false.
- Parameters
-
commandStr,command | string to check for. |
- Returns
- bool, true if the command is already added, otherwise false.
◆ removeCommand()
bool PrivilegeManager::removeCommand |
( |
string |
, |
|
|
string |
|
|
) |
| |
Removes the specified command from the specified mode.
- Parameters
-
mode,the | mode to add the command to. Valid modes: user, enable, global. |
command,the | command of interest. |
- Returns
- bool, true if successful, otherwise false.
The documentation for this class was generated from the following file: