|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.foxsmart.csu.config.CiscoRouterConfigParser
com.foxsmart.csu.config.CiscoRouterConfigComponent
com.foxsmart.csu.config.global.EnableComponent
public class EnableComponent
The Enable class represents enable password parameters.
| Field Summary | |
|---|---|
static java.lang.String |
ENABLE
|
static java.lang.String |
LAST_RESORT
|
static java.lang.String |
LAST_RESORT_PASSWORD
Enable by giving the local enable password. |
static java.lang.String |
LAST_RESORT_SUCCEED
Enable without further question. |
static java.lang.String |
LEVEL
|
static java.lang.Integer |
MAX_ENABLE_LEVEL
The maximum enable level. |
static java.lang.Integer |
MIN_ENABLE_LEVEL
The minimum enable level. |
static java.lang.String |
PASSWORD
|
static java.lang.String |
SECRET
|
static java.lang.String |
SUCCEED
|
static java.lang.String |
USE_TACACS
|
| Fields inherited from class com.foxsmart.csu.config.CiscoRouterConfigComponent |
|---|
commentComponent, componentMap, log, parentComponent |
| Fields inherited from class com.foxsmart.csu.config.CiscoRouterConfigParser |
|---|
NO, tokenIndex |
| Constructor Summary | |
|---|---|
EnableComponent()
Constructs an Enable object. |
|
| Method Summary | |
|---|---|
java.util.List |
buildFromIos(java.util.List configLines)
Parse and populate the specific CiscoRouterComponent object based on the passed in individual lines of the IOS configuration. |
Commands |
generateDeleteIos(CiscoRouterConfig updatedCiscoRouterConfig)
Generates the IOS configuration commands to delete this component. |
Commands |
generateIos()
Returns the IOS configuration commands for this component. |
java.lang.String |
getLastResortAction()
Gets the last resort action. |
GlobalEncryptionPassword |
getPassword(int enableLevel)
Gets standard "password" information for a specified enable level. |
GlobalEncryptionPassword |
getSecret(int enableLevel)
Gets "secret" information for a specified enable level. |
boolean |
getUseTacacs()
Gets whether TACACS will be used to check enable passwords. |
boolean |
lastResortPassword()
Determines if the last resort action is "password". |
boolean |
lastResortSucceed()
Determines if the last resort action is "succeed". |
boolean |
lastResortUndefined()
Determines if the last resort action is not defined. |
void |
setLastResortAction(java.lang.String action)
Sets the last resort option when no TACACS servers respond. |
void |
setPassword(int enableLevel,
GlobalEncryptionPassword globalEncryptionPassword)
Sets a "password" for a specified enable level. |
void |
setSecret(int enableLevel,
GlobalEncryptionPassword globalEncryptionPassword)
Sets a "secret" password for a specified enable level. |
void |
setUseTacacs(boolean useTacacs)
Sets whether TACACS will be used to check enable passwords. |
void |
validate()
Validates this object to ensure it contains a valid IOS configuration. |
static boolean |
validEnableLevel(java.lang.String enableLevel)
Determines whether the passed in enable level is valid or not. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String ENABLE
public static final java.lang.String LAST_RESORT
public static final java.lang.String LEVEL
public static final java.lang.String PASSWORD
public static final java.lang.String SECRET
public static final java.lang.String SUCCEED
public static final java.lang.String USE_TACACS
public static final java.lang.Integer MIN_ENABLE_LEVEL
public static final java.lang.Integer MAX_ENABLE_LEVEL
public static final java.lang.String LAST_RESORT_PASSWORD
public static final java.lang.String LAST_RESORT_SUCCEED
| Constructor Detail |
|---|
public EnableComponent()
| Method Detail |
|---|
public void setUseTacacs(boolean useTacacs)
useTacacs - If true, TACACS will be used or false if not.public boolean getUseTacacs()
public void setLastResortAction(java.lang.String action)
throws InvalidConfigurationException
action - The last resort action.
InvalidConfigurationException - if the specified parameter is invalid.public java.lang.String getLastResortAction()
public boolean lastResortPassword()
public boolean lastResortSucceed()
public boolean lastResortUndefined()
public void setPassword(int enableLevel,
GlobalEncryptionPassword globalEncryptionPassword)
throws InvalidConfigurationException
enableLevel - The enable level for the password. Must be between 1 and 15.globalEncryptionPassword - The password and its associated encryption type. The encryption type must be 0 or
7. This parameter can be null to clear out any password information associated with the enable level.
InvalidConfigurationException - if any of the parameters are invalid.public GlobalEncryptionPassword getPassword(int enableLevel)
enableLevel - the enable level to get the password for.
public void setSecret(int enableLevel,
GlobalEncryptionPassword globalEncryptionPassword)
throws InvalidConfigurationException
enableLevel - The enable level for the password. Must be between 1 and 15.globalEncryptionPassword - The password and its associated encryption type. The encryption type must be 0 or
5. This parameter can be null to clear out any password information associated with the enable level.
InvalidConfigurationException - if any of the parameters are invalid.public GlobalEncryptionPassword getSecret(int enableLevel)
enableLevel - the enable level to get the secret information for.
public java.util.List buildFromIos(java.util.List configLines)
throws InvalidConfigurationException
CiscoRouterConfigComponent
buildFromIos in class CiscoRouterConfigComponentconfigLines - The list of IOS configuration lines.
InvalidConfigurationException - if the IOS configuration can not be parsed for any reason.CiscoRouterConfigComponent
public void validate()
throws InvalidConfigurationException
CiscoRouterConfigComponent
validate in class CiscoRouterConfigComponentInvalidConfigurationException - if the configuration is invalid.CiscoRouterConfigComponentpublic static boolean validEnableLevel(java.lang.String enableLevel)
enableLevel - The enable level to validate.
public Commands generateIos()
throws InvalidConfigurationException
CiscoRouterConfigComponent
generateIos in class CiscoRouterConfigComponentInvalidConfigurationException - if the IOS configuration is invalid and the IOS string can not be generated.
The validate() method is used to determine if the configuration is valid.CiscoRouterConfigComponent
public Commands generateDeleteIos(CiscoRouterConfig updatedCiscoRouterConfig)
throws InvalidConfigurationException
CiscoRouterConfigComponent
generateDeleteIos in interface MultiLineComponentgenerateDeleteIos in class CiscoRouterConfigComponentupdatedCiscoRouterConfig - the updated Cisco router configuration.
InvalidConfigurationException - if the IOS configuration is invalid and the IOS string can not be generated.
The validate() method is used to determine if the configuration is valid.CiscoRouterConfigComponent
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||