public class TellabsINM8000DataProvider
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected int[] |
REGIONID |
protected boolean |
REGIONIDENABLE |
protected boolean |
USEALIASNAME |
protected boolean |
USEFILTERNODEDISCOVERY |
protected boolean |
USEINTERFACEIFMSG |
| Constructor and Description |
|---|
TellabsINM8000DataProvider()
Constructor of the class
|
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
bytesToHex(byte[] in) |
protected void |
closeSession()
Disconnect the current connection to TellabsINM8000 EMS
|
java.lang.String |
convertIpAddressv4(byte[] rawBytes)
Utility method to convert raw IPv4 address to String format
|
java.net.InetAddress |
convertIpAddressv6(byte[] rawBytes)
Utility method to convert raw IPv6 address to String format
|
protected java.lang.String |
convertIpv4ToRawBytesString(java.lang.String ipaddr)
Returns a converted IPv4 address in bytes format
|
void |
displayAllAttributeDataType() |
void |
displayNbifAttr(int attribute,
int data) |
void |
displayNbifAttr(int attribute,
java.lang.String data) |
protected TolResultSet |
getAllData(int entityId,
java.util.ArrayList<java.lang.Integer> attr)
Helper method to returns all records of an TellabsINM8000 EMS entity with
a set of attributes.
|
protected java.util.ArrayList<PhysicalInventory> |
getAllPhysicalInventory(TellabsINM8000InventoryType type,
int entityId,
java.util.ArrayList<java.lang.Integer> entityAtrr,
java.util.HashMap<java.lang.Integer,java.util.HashMap<java.lang.String,java.lang.Integer>> boundaryFilterSubRack,
java.lang.String METHOD_NAME)
Helper method to return all records of a physical inventory e.g.
|
void |
getAttrDataTypeDesc(int attribute) |
protected int |
getBATCHINTERFACESIZE() |
protected int |
getBATCHMODULESIZE() |
protected int |
getBATCHSUBRACKSIZE() |
protected int |
getBATCHUNITSIZE() |
protected boolean |
getConnection()
Establishes connection to TellabsINM8000 EMS
|
protected TolResultSet |
getFilteredData(int entityId,
java.util.ArrayList<java.lang.Integer> attr,
java.lang.String filterStr)
Helper method to returns a set of records based on filter
|
protected int |
getIfOperStatusInstalled() |
protected int |
getIfOperStatusInUse() |
protected int |
getIfOperStatusPlanned() |
protected int |
getIfOperStatusUndefined() |
protected java.util.ArrayList<PhysicalInventory> |
getInterfaces(java.util.HashMap<java.lang.Integer,java.util.HashMap<java.lang.String,java.lang.Integer>> boundaryFilter,
java.util.ArrayList<PhysicalInventory> nodes)
Retrieve a list of Interface
|
protected java.util.ArrayList<PhysicalInventory> |
getModules(java.util.HashMap<java.lang.Integer,java.util.HashMap<java.lang.String,java.lang.Integer>> boundaryFilter,
java.util.ArrayList<PhysicalInventory> nodes)
Retrieve a list of Module
|
protected java.util.ArrayList<PhysicalInventory> |
getNodes(int[] regionId)
Retrieves a list of Node objects by region id
|
protected java.util.ArrayList<PhysicalInventory> |
getOneNode(int nodeID)
Return a single Node object
|
protected java.util.ArrayList<PhysicalInventory> |
getPhysicalInventoryByRegionId(TellabsINM8000InventoryType type,
int entityId,
java.util.ArrayList<java.lang.Integer> entityAtrr,
java.util.ArrayList<PhysicalInventory> objPhysInventoryList,
java.lang.String METHOD_NAME)
Helper method to return records of a physical inventory e.g.
|
protected java.util.Properties |
getPropfile() |
static java.lang.String |
getStackTraceMessage(java.lang.Exception ex)
Returns stacktrace exception messages
|
protected java.util.ArrayList<PhysicalInventory> |
getSubRacks(java.util.HashMap<java.lang.Integer,java.util.HashMap<java.lang.String,java.lang.Integer>> boundaryFilter,
java.util.ArrayList<PhysicalInventory> nodes)
Retrieve a list of Subracks
|
protected java.lang.String |
getTopologyType(int typeNum) |
protected Trunk |
getTrunk(long intTrunkId)
Returns a list of populated Trunk objects
|
protected java.util.ArrayList<PhysicalInventory> |
getTrunks(java.util.HashMap<java.lang.Integer,java.util.HashMap<java.lang.String,java.lang.Integer>> boundaryFilter,
java.util.ArrayList<PhysicalInventory> nodes)
Retrieve a list of Trunk
|
protected java.util.ArrayList<PhysicalInventory> |
getUnits(java.util.HashMap<java.lang.Integer,java.util.HashMap<java.lang.String,java.lang.Integer>> boundaryFilter,
java.util.ArrayList<PhysicalInventory> nodes)
Retrieve a list of Unit
|
java.lang.Boolean |
getUseNameAlias()
Return the useNameAlias flag status of the setUseNameAlias from property
file
|
void |
initialise()
Creates a new connection session, loads and initialises properties values
from properties file
|
protected boolean |
isCollectData()
Returns the collectData flag status of the collector
|
protected boolean |
isGetEntities() |
protected boolean |
isGetLayer1Connections() |
protected boolean |
isGetLayer2Connections() |
protected boolean |
isGetLayer3Connections() |
protected java.util.ArrayList<PhysicalInventory> |
populateInterfaces(TolResultSet tolResultSet)
Returns a list of populated Interface objects
|
protected java.util.ArrayList<PhysicalInventory> |
populateModules(TolResultSet tolResultSet)
Returns a list of populated Module objects
|
protected java.util.ArrayList<PhysicalInventory> |
populateNodes(TolResultSet tolResultSet)
Returns a list of populated Node objects
|
protected java.util.ArrayList<PhysicalInventory> |
populateSubRacks(TolResultSet tolResultSet)
Returns a list of populated Subrack objects
|
protected Trunk |
populateTrunk(TolResultSet tolResultSet)
Returns a list of populated Trunk objects
|
protected java.util.ArrayList<PhysicalInventory> |
populateTrunks(TolResultSet tolResultSet)
Returns a list of populated Trunk objects
|
protected java.util.ArrayList<PhysicalInventory> |
populateUnits(TolResultSet tolResultSet)
Returns a list of populated Unit objects
|
java.util.HashMap<java.lang.Integer,java.util.HashMap<java.lang.String,java.lang.Integer>> |
setBoundaryFilter(java.util.List<PhysicalInventory> nodeList,
int batchSize)
Sets "boundaries" of records to retrieve based on batch sizes in
properties file.
|
protected void |
setGetEntities(java.lang.String getEntitiesFlag) |
protected void |
setGetLayer1Connections(java.lang.String getLayer1Connections) |
protected void |
setGetLayer2Connections(java.lang.String getLayer2Connections) |
protected void |
setGetLayer3Connections(java.lang.String getLayer3Connections) |
void |
setUseNameAlias(java.lang.Boolean useNameAlias)
Set the useNameAlias flag status of the setUseNameAlias from property
file
|
protected int[] REGIONID
protected boolean REGIONIDENABLE
protected boolean USEALIASNAME
protected boolean USEINTERFACEIFMSG
protected boolean USEFILTERNODEDISCOVERY
public TellabsINM8000DataProvider()
public void initialise()
protected boolean getConnection()
protected void closeSession()
protected TolResultSet getAllData(int entityId,
java.util.ArrayList<java.lang.Integer> attr)
throws TolAttributeException,
java.io.IOException,
TolCommunicationException
entityId - The Id number of the type of entity type e.g. Node, Subrack,
Unit, Interface, etc.attr - The attibutes(columns) of the recordTolAttributeException - , IOException, TolCommunicationExceptionjava.io.IOExceptionTolCommunicationExceptionprotected TolResultSet getFilteredData(int entityId,
java.util.ArrayList<java.lang.Integer> attr,
java.lang.String filterStr)
throws TolAttributeException,
java.io.IOException,
TolCommunicationException
entityId - The Id number of the type of entity type e.g. Node, Subrack,
Unit, Interface, etc.attr - The attibutes(columns) of the recordfilterStr - Filter to retrieve records based on specific criteria.
Analogous to "WHERE" statement in SQL queryTolAttributeException - , IOException, TolCommunicationExceptionjava.io.IOExceptionTolCommunicationExceptionprotected java.util.ArrayList<PhysicalInventory> getAllPhysicalInventory(TellabsINM8000InventoryType type, int entityId, java.util.ArrayList<java.lang.Integer> entityAtrr, java.util.HashMap<java.lang.Integer,java.util.HashMap<java.lang.String,java.lang.Integer>> boundaryFilterSubRack, java.lang.String METHOD_NAME)
entityId - The Id number of the type of entity type e.g. Node, Subrack,
Unit, Interface, etc.entityAtrr - The attibutes(columns) of the recordboundaryFilterSubRack - HashMap containing "boundaries" to retrieve a batch of recordMETHOD_NAME - Name of the method that invokes this helper methodprotected java.util.ArrayList<PhysicalInventory> getPhysicalInventoryByRegionId(TellabsINM8000InventoryType type, int entityId, java.util.ArrayList<java.lang.Integer> entityAtrr, java.util.ArrayList<PhysicalInventory> objPhysInventoryList, java.lang.String METHOD_NAME)
type - Entity typeentityId - The Id number of the type of entity type e.g. Node, Subrack,
Unit, Interface, etc.entityAtrr - The attibutes(columns) of the recordobjPhysInventoryList - List of Node objectsMETHOD_NAME - Name of the method that invokes this helper methodprotected java.util.ArrayList<PhysicalInventory> getNodes(int[] regionId) throws java.io.IOException
regionId - Region id number(s)java.io.IOExceptionprotected java.util.ArrayList<PhysicalInventory> populateNodes(TolResultSet tolResultSet) throws TolAttributeException, java.io.IOException
tolResultSet - Resultset of entity recordsTolAttributeException - , IOExceptionjava.io.IOExceptionprotected java.util.ArrayList<PhysicalInventory> getSubRacks(java.util.HashMap<java.lang.Integer,java.util.HashMap<java.lang.String,java.lang.Integer>> boundaryFilter, java.util.ArrayList<PhysicalInventory> nodes)
boundaryFilter - "Boundaries" for retrieving records in batchesnodes - A list of Node objectprotected java.util.ArrayList<PhysicalInventory> populateSubRacks(TolResultSet tolResultSet) throws TolAttributeException, java.io.IOException
tolResultSet - Resultset of entity recordsTolAttributeException - , IOExceptionjava.io.IOExceptionprotected java.util.ArrayList<PhysicalInventory> getUnits(java.util.HashMap<java.lang.Integer,java.util.HashMap<java.lang.String,java.lang.Integer>> boundaryFilter, java.util.ArrayList<PhysicalInventory> nodes)
boundaryFilter - "Boundaries" for retrieving records in batchesnodes - A list of Unit objectprotected java.util.ArrayList<PhysicalInventory> populateUnits(TolResultSet tolResultSet) throws TolAttributeException, java.io.IOException
tolResultSet - Resultset of entity recordsTolAttributeException - , IOExceptionjava.io.IOExceptionprotected java.util.ArrayList<PhysicalInventory> getModules(java.util.HashMap<java.lang.Integer,java.util.HashMap<java.lang.String,java.lang.Integer>> boundaryFilter, java.util.ArrayList<PhysicalInventory> nodes)
boundaryFilter - "Boundaries" for retrieving records in batchesnodes - A list of Module objectprotected java.util.ArrayList<PhysicalInventory> populateModules(TolResultSet tolResultSet) throws TolAttributeException, java.io.IOException
tolResultSet - Resultset of entity recordsTolAttributeException - , IOExceptionjava.io.IOExceptionprotected java.util.ArrayList<PhysicalInventory> getInterfaces(java.util.HashMap<java.lang.Integer,java.util.HashMap<java.lang.String,java.lang.Integer>> boundaryFilter, java.util.ArrayList<PhysicalInventory> nodes)
boundaryFilter - "Boundaries" for retrieving records in batchesnodes - A list of Interface objectprotected java.util.ArrayList<PhysicalInventory> populateInterfaces(TolResultSet tolResultSet) throws TolAttributeException, java.io.IOException
tolResultSet - Resultset of entity recordsTolAttributeException - , IOExceptionjava.io.IOExceptionprotected java.util.ArrayList<PhysicalInventory> getTrunks(java.util.HashMap<java.lang.Integer,java.util.HashMap<java.lang.String,java.lang.Integer>> boundaryFilter, java.util.ArrayList<PhysicalInventory> nodes) throws java.io.IOException
boundaryFilter - "Boundaries" for retrieving records in batchesnodes - A list of Trunk objectjava.io.IOExceptionprotected java.util.ArrayList<PhysicalInventory> populateTrunks(TolResultSet tolResultSet) throws TolAttributeException, java.io.IOException
tolResultSet - Resultset of entity recordsTolAttributeException - , IOExceptionjava.io.IOExceptionprotected Trunk getTrunk(long intTrunkId) throws java.io.IOException
tolResultSet - Resultset of entity recordsTolAttributeException - , IOExceptionjava.io.IOExceptionprotected Trunk populateTrunk(TolResultSet tolResultSet) throws TolAttributeException, java.io.IOException
tolResultSet - Resultset of entity recordsTolAttributeException - , IOExceptionjava.io.IOExceptionprotected java.util.ArrayList<PhysicalInventory> getOneNode(int nodeID) throws java.io.IOException
Node - Id of the nodejava.io.IOExceptionpublic java.util.HashMap<java.lang.Integer,java.util.HashMap<java.lang.String,java.lang.Integer>> setBoundaryFilter(java.util.List<PhysicalInventory> nodeList, int batchSize)
nodeList - List of node objectsbatchSize - Batch size of records to be retrieved at one timeprotected java.util.Properties getPropfile()
protected java.lang.String convertIpv4ToRawBytesString(java.lang.String ipaddr)
String - String of IPv4 addresspublic java.lang.String convertIpAddressv4(byte[] rawBytes)
rawBytes - IPv4 address in bytespublic java.net.InetAddress convertIpAddressv6(byte[] rawBytes)
throws java.io.IOException
rawBytes - IPv6 address in bytesjava.io.IOExceptionprotected boolean isGetLayer1Connections()
protected void setGetLayer1Connections(java.lang.String getLayer1Connections)
getLayer1Connections - the getLayer1Connections to setprotected boolean isGetLayer2Connections()
protected void setGetLayer2Connections(java.lang.String getLayer2Connections)
getLayer2Connections - the getLayer2Connections to setprotected boolean isGetLayer3Connections()
protected void setGetLayer3Connections(java.lang.String getLayer3Connections)
getLayer3Connections - the getLayer3Connections to setprotected java.lang.String getTopologyType(int typeNum)
protected int getBATCHSUBRACKSIZE()
protected int getBATCHUNITSIZE()
protected int getBATCHMODULESIZE()
protected int getBATCHINTERFACESIZE()
protected boolean isGetEntities()
protected void setGetEntities(java.lang.String getEntitiesFlag)
getEntities - the getEntities to setprotected int getIfOperStatusInUse()
protected int getIfOperStatusPlanned()
protected int getIfOperStatusInstalled()
protected int getIfOperStatusUndefined()
protected boolean isCollectData()
public void setUseNameAlias(java.lang.Boolean useNameAlias)
public java.lang.Boolean getUseNameAlias()
public void getAttrDataTypeDesc(int attribute)
throws TolAttributeException,
java.io.IOException,
TolCommunicationException
TolAttributeExceptionjava.io.IOExceptionTolCommunicationExceptionpublic void displayNbifAttr(int attribute,
int data)
throws TolAttributeException,
java.io.IOException,
TolCommunicationException
TolAttributeExceptionjava.io.IOExceptionTolCommunicationExceptionpublic void displayNbifAttr(int attribute,
java.lang.String data)
throws TolAttributeException,
java.io.IOException,
TolCommunicationException
TolAttributeExceptionjava.io.IOExceptionTolCommunicationExceptionpublic void displayAllAttributeDataType()
throws TolAttributeException,
java.io.IOException,
TolCommunicationException
TolAttributeExceptionjava.io.IOExceptionTolCommunicationExceptionpublic static java.lang.String bytesToHex(byte[] in)
public static java.lang.String getStackTraceMessage(java.lang.Exception ex)
ex - The exception that is thrown