|
||||||||||
| 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.interfacepkg.ServicePolicyComponent
public class ServicePolicyComponent
The ServicePolicyComponent class defines a QoS Service Policy on an interface.
| Field Summary | |
|---|---|
static java.lang.String |
INPUT
|
static java.lang.String |
OUTPUT
|
static java.lang.String |
SERVICE_POLICY
|
| 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 | |
|---|---|
ServicePolicyComponent()
Constructs a Service Policy component 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. |
protected java.lang.String |
generateDeleteIosString(java.lang.String inputOrOutput,
java.lang.String policyMapName)
Generates the delete IOS string for the specified input or output with the specified policy map name. |
Commands |
generateIos()
Returns the IOS configuration commands for this component. |
protected java.lang.String |
generateIosString(java.lang.String intputOrOutput,
java.lang.String policyMapName)
Generates the IOS string for the specified input or output string with the specified policy map name. |
protected Commands |
generateMultiLineUpdateConfiglet(CiscoRouterConfigComponent origComponent)
Generates the IOS commands that will handle the updating of a multi-line component. |
java.lang.String |
getInputPolicyMapName()
Gets the input policy map name. |
java.lang.String |
getOutputPolicyMapName()
Gets the output policy map name. |
void |
setInputPolicyMapName(java.lang.String inputPolicyMapName)
Sets the input policy map name. |
void |
setOutputPolicyMapName(java.lang.String outputPolicyMapName)
Sets the output policy map name. |
void |
validate()
Validates this object to ensure it contains a valid IOS configuration. |
protected void |
validatePolicyMapName(java.lang.String policyMapName)
Verifies that a policy map with the specified name is configured on the router if the specified name is not empty. |
| 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 SERVICE_POLICY
public static final java.lang.String INPUT
public static final java.lang.String OUTPUT
| Constructor Detail |
|---|
public ServicePolicyComponent()
| Method Detail |
|---|
public java.lang.String getInputPolicyMapName()
public void setInputPolicyMapName(java.lang.String inputPolicyMapName)
inputPolicyMapName - the input policy map name.public java.lang.String getOutputPolicyMapName()
public void setOutputPolicyMapName(java.lang.String outputPolicyMapName)
outputPolicyMapName - the output policy map name.
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.CiscoRouterConfigComponent
protected void validatePolicyMapName(java.lang.String policyMapName)
throws InvalidConfigurationException
policyMapName - the policy map name to verify.
InvalidConfigurationException - if the policy map with the specified name is not configured on the router.
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.MultiLineComponent
protected java.lang.String generateIosString(java.lang.String intputOrOutput,
java.lang.String policyMapName)
intputOrOutput - input or output string.policyMapName - the policy map name.
protected java.lang.String generateDeleteIosString(java.lang.String inputOrOutput,
java.lang.String policyMapName)
inputOrOutput - input or output string.policyMapName - the policy map name.
protected Commands generateMultiLineUpdateConfiglet(CiscoRouterConfigComponent origComponent)
throws InvalidConfigurationException
CiscoRouterConfigComponent
generateMultiLineUpdateConfiglet in class CiscoRouterConfigComponentorigComponent - The original component.
InvalidConfigurationException - if either this or the passed in configuration are invalid.CiscoRouterConfigComponent
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||