verinec.adaptation.snmp
Class CiscoUtil
java.lang.Object
verinec.adaptation.snmp.CiscoUtil
public class CiscoUtil
- extends Object
Collection of methods to manipulate Cisco configuration files.
Contains a method to remove all existing access lists from cisco.
- Version:
- 1.0
- Author:
- christoph.ehret at unifr.ch
|
Field Summary |
private static String |
linesep
Cisco seems to accept both windows and unix encoded end of line. |
|
Method Summary |
static String |
noAclParser(File configFile)
Parse config file to find all access-list numbers and build
no access-list 'acl_number' commands. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
linesep
private static String linesep
- Cisco seems to accept both windows and unix encoded end of line.
We use the unix format \n here.
CiscoUtil
public CiscoUtil()
noAclParser
public static String noAclParser(File configFile)
throws VerinecException,
FileNotFoundException
- Parse config file to find all access-list numbers and build
no access-list 'acl_number' commands.
- Parameters:
configFile - Configuration file to read from
- Returns:
- no access-list commands to send to cisco
- Throws:
VerinecException - If cannot read targFile
FileNotFoundException - If configFile can not be opened