|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectverinec.importer.parser.ethernet.ImportEth
public class ImportEth
ImportEth represents the set of all Ethernet config files
in the /etc/sysconfig/network-scripts directiory.
Search for all Ethernet configuration files, i.e. files begining with
"ifcfg-eth" in the /etc/sysconfig/network-scripts directory or in a
directory given by the user.
Create a VeriNeC <ethernet> XML element for every found interface configuration
file and save this element.
Special treatment for alias files (e.g. ifcfg-eth0:1), only an additional
VeriNeC <nw> XML element is added to the corresponding <ethernet> element.
| Field Summary | |
|---|---|
private ImporterEnvironment |
environment
The environment |
private String |
filename
Name of current configuration file. |
private ConfigFile |
ifcfg
current ConfigFile object |
private String |
ifname
Name of interface in current file. |
private ImportEthernet |
importConfig
|
private Logger |
log
|
| Constructor Summary | |
|---|---|
ImportEth(ImportEthernet impConf,
ImporterEnvironment environment)
Perform the import of ethernet files. |
|
| Method Summary | |
|---|---|
private Element |
etherbindingElement()
Create a Verinec <ethernet-binding> XML element with the specifications of the file. |
private Element |
ethernetElement()
Create a Verinec <ethernet> XML element with the specifications of the file. |
void |
extractInfo()
Parses configuration files and adds the information to importConfig |
String |
getRawConfiguration()
Get a string with all configuration files for ethernet |
private void |
importLoopback()
Todo: should not rely on nickname of device. |
private void |
loadFile(File f)
Initialise all variables depending on the file f, make a new ConfigFile object |
private Element |
nwElement(int i)
Create a Verinec <nw> XML element with the specifications of the file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private Logger log
private final ImportEthernet importConfig
private ImporterEnvironment environment
private String filename
private String ifname
private ConfigFile ifcfg
| Constructor Detail |
|---|
public ImportEth(ImportEthernet impConf,
ImporterEnvironment environment)
impConf - The main ethernet import class is used to get configuration and store resultsenvironment - General env. for logging| Method Detail |
|---|
public void extractInfo()
throws VerinecImporterException
importConfig
VerinecImporterExceptionpublic String getRawConfiguration()
private Element ethernetElement()
throws VerinecImporterException
VerinecImporterException
private Element etherbindingElement()
throws VerinecImporterException
VerinecImporterException
private Element nwElement(int i)
throws VerinecImporterException
i - id number of the network
VerinecImporterException
private void loadFile(File f)
throws VerinecImporterException
f - The file to open
VerinecImporterException
private void importLoopback()
throws VerinecImporterException
VerinecImporterException
|
Copyright © 2005 Verinec, DIUF | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||