public class CiscoEPNMRestCollector extends Collector
collectorDescription, collectorName, collectorPort, dataStore, propsFileName, running| Constructor and Description |
|---|
CiscoEPNMRestCollector(java.lang.String collectorName,
java.lang.String collectorDescription)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
AddTopologicalConnection(java.util.List<TopoEndpoint> tEndpoint,
java.lang.String neId,
java.lang.String NEName)
Load AddTopologicalConnection class attributes into hashmap to be used for
creating entity
|
protected void |
collectData(int dataSourceId,
java.lang.String address,
java.lang.String mask)
This method is responsible for ensuring that data is updated as appropriate, that is, the Collector should check
the EMS for new data and update any internal stores as appropriate.
|
protected void |
doFullDiscovery(java.lang.String nodeId)
Performs a Full Discovery operation
|
boolean |
epnmAuthenticate()
Authenticate to Cisco EPNM while performing a Full Discovery operation
3 - Level Authentication to Cisco EPNM
|
protected java.util.List<NdNode> |
getAllNodes()
Performs a getAllNodes operation
|
protected java.util.List<TopoTopologicalLink> |
getAllTopologicalLinks()
Updated getAllTopologicalLinks for JSON data*****************
|
protected java.util.List<TpTerminationPoint> |
getTerminationPoints()
Updated getAllPhysicalTerminationPoints for JSON data******************************************
|
protected void |
initDataStore()
Initializes data source as specified in the properties file
|
protected boolean |
initialise()
Initialize collector with data gather from properties file
|
protected boolean |
isGetEntities() |
protected boolean |
isGetLayer1Connections() |
protected boolean |
isGetLayer2Connections() |
protected boolean |
isGetLayer3Connections() |
void |
loadAndAddTopologicalConnections(java.util.List<TopoTopologicalLink> alTopologicalLinks,
java.lang.String NEName,
java.lang.String neId)
Load loadAndAddTopologicalConnections class attributes into hashmap to be
used for creating entity
|
void |
loadEquipmentNodeShelf(EqEquipment equipNode,
NetworkDevice neElement)
Load EquipmentNode class attributes into hashmap to be used for creating
entity
|
void |
loadEquipmentPort(TpTerminationPoint portIter,
NetworkDevice neElement)
Load Equipment Port class attributes into hashmap to be used for creating
entity
|
static void |
main(java.lang.String[] args)
Runs the Cisco EPNM rest collector
|
java.util.List<NetworkDevice> |
parseNetworkDeviceData(java.util.List<NdNode> nodeList) |
protected void |
processPhysicalInventoryData(java.util.List<NdNode> processNodeList,
java.util.List<TopoTopologicalLink> alTopoConnections,
java.util.List<TpTerminationPoint> processTerminationList)
Process data for Physical Inventory add the Entities/Interfaces to the
Datastore
|
java.util.List<NdNode> |
readNodeDataFromServer()
Reads node data from server
|
java.util.List<TpTerminationPoint> |
readTerminationDataFromServer()
Reads Termination data from server
|
java.util.List<TopoTopologicalLink> |
readTopologicalDataFromServer()
Reads Topological data from server
|
protected boolean |
setConnectionParameters(WebSocketTransport webSocketTransport,
java.lang.String remoteUsername,
java.lang.String remotePassword,
java.lang.String remoteHost,
java.lang.Integer remotePort,
java.lang.String remotekeyStoreFileName,
java.lang.String remotekeyStorePassword,
java.lang.String remoteHTTPversion,
java.lang.String remoteResponseTimeout,
java.lang.Integer remoteRefreshInterval,
java.lang.Boolean remoteEnableSSL,
java.lang.String pathToKeyStoreFile,
java.lang.String setProtocolValue,
int maxBufferSize,
boolean TrustAll)
Setting up websocket connection parameters for REST
|
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) |
static void |
setPropsFile(java.util.Properties propsFile) |
java.lang.String |
UpdateData(int dataSourceId,
int requestType,
java.lang.String address,
java.lang.String mask)
UpdateData invokes the collectData method which is responsible for ensuring
that data is updated as appropriate, that is, the Collector should check the
EMS for new data and update any internal stores as appropriate.
|
GetAfData, GetAmfData, GetAssociatedAddresses, GetAssociatedAddresses, GetAusfData, getCommandLineArgument, GetConnections, GetConnections, GetDeviceInfo, GetDeviceInfo, GetDeviceInfo, GetDeviceList, GetEirData, GetENodeBData, GetEntities, GetEntities, GetGNodeBData, GetHssData, GetInfo, GetInventory, GetInventory, GetLayer1Connections, GetLayer1Connections, GetLayer2Connections, GetLayer2Connections, GetLayer2Vpns, GetLayer2Vpns, GetLayer3Connections, GetLayer3Connections, GetLayer3Vpns, GetLayer3Vpns, GetMmeData, GetMplsInterfaces, GetMplsInterfaces, GetNefData, GetNrfData, GetNssfData, GetPcfData, GetPcrfData, GetPgwData, getPortNumberArgument, getPropertiesFileNameArgument, getPropertyValue, GetRanData, GetSAEGatewayData, GetSgwData, GetSmfData, GetUdmData, GetUpfData, initialiseDataStore, isRunning, loadPropertiesFile, setDataStore, setRunning, shutdown, startup, startuppublic CiscoEPNMRestCollector(java.lang.String collectorName,
java.lang.String collectorDescription)
collectorName - The name of the collectorcollectorDescription - A description of the collectorpublic static void main(java.lang.String[] args)
args - Command line arguments, e.g. -propsFile <props file name>public boolean epnmAuthenticate()
None - protected boolean initialise()
protected void initDataStore()
protected boolean setConnectionParameters(WebSocketTransport webSocketTransport, java.lang.String remoteUsername, java.lang.String remotePassword, java.lang.String remoteHost, java.lang.Integer remotePort, java.lang.String remotekeyStoreFileName, java.lang.String remotekeyStorePassword, java.lang.String remoteHTTPversion, java.lang.String remoteResponseTimeout, java.lang.Integer remoteRefreshInterval, java.lang.Boolean remoteEnableSSL, java.lang.String pathToKeyStoreFile, java.lang.String setProtocolValue, int maxBufferSize, boolean TrustAll)
webSocketTransport - webSocketTransport classremoteUsername - Cisco EPNM usernameremotePassword - Cisco EPNM passwordremoteHost - Cisco EPNM ip addressremoteServiceName - Cisco EPNM Service NameremotePreUsername - Cisco EPNM Presentation Server usernameremotePrePassword - Cisco EPNM Presentation Server passwordremotePreHost - Cisco EPNM Presentation Server ip addressremotePort - Cisco EPNM portremotekeyStoreFileName - Cisco EPNM usernameremotekeyStorePassword - keyStorePasswordremoteHTTPversion - HTTP versionremoteResponseTimeout - Response Timeout in secondssetRefreshInterval - Refresh Interval in secondsprotected void doFullDiscovery(java.lang.String nodeId)
throws java.io.IOException
nodeId - Node Id for Partial Discovery operation. When a non-zero value is
supplied, Partial Discovery is performed, else Full Discovery is
performed insteadjava.io.IOException - ,TolAttributeException,TolCommunicationExceptionpublic java.util.List<NdNode> readNodeDataFromServer()
public java.util.List<TpTerminationPoint> readTerminationDataFromServer()
public java.util.List<TopoTopologicalLink> readTopologicalDataFromServer()
protected java.util.List<NdNode> getAllNodes() throws java.io.IOException
None - It will get all the list of Elements from EPNM. First it will
return the location of JSON file and next send the request to
download the JSON filejava.io.IOException - ,TolAttributeException,TolCommunicationExceptionprotected java.util.List<TopoTopologicalLink> getAllTopologicalLinks() throws java.io.IOException
java.io.IOExceptionprotected java.util.List<TpTerminationPoint> getTerminationPoints() throws java.io.IOException
java.io.IOExceptionprotected void collectData(int dataSourceId,
java.lang.String address,
java.lang.String mask)
CollectorThis method is responsible for ensuring that data is updated as appropriate, that is, the Collector should check the EMS for new data and update any internal stores as appropriate.
collectData in class CollectordataSourceId - Holds the ID of the data source which should be updatedaddress - If mask is not defined then it holds the address (IP or native id) of the device to refresh, or else it holds the subnet to
refresh.mask - Holds the subnet mask, or is not definedpublic java.lang.String UpdateData(int dataSourceId,
int requestType,
java.lang.String address,
java.lang.String mask)
UpdateData invokes the collectData method which is responsible for ensuring that data is updated as appropriate, that is, the Collector should check the EMS for new data and update any internal stores as appropriate.
If the Collector does not need to update its data then it does not need to perform any work other than returning the response message "<updateResponse></updateResponse>".
Note: Is it the Collector's responsibility to determine which devices the supplied IP relates to; the IP is NOT guaranteed to be the device id.
UpdateData in class CollectordataSourceId - Holds the ID of the data source which should be updatedrequestType - The type of requestaddress - If mask is not defined then it holds the IP of the device to
refresh, or else it holds the subnet to refreshmask - Holds the subnet mask, or is not defined<updateResponse></updateResponse>protected void processPhysicalInventoryData(java.util.List<NdNode> processNodeList, java.util.List<TopoTopologicalLink> alTopoConnections, java.util.List<TpTerminationPoint> processTerminationList) throws java.io.IOException
processNodeList - List of nodesNetworkEquipment - NetworkEquipment List of Network Equipmentjava.io.IOExceptionpublic void loadAndAddTopologicalConnections(java.util.List<TopoTopologicalLink> alTopologicalLinks, java.lang.String NEName, java.lang.String neId)
ArrayList - List of items belong to TopologicalLinkspublic void AddTopologicalConnection(java.util.List<TopoEndpoint> tEndpoint, java.lang.String neId, java.lang.String NEName)
TopologicalLinks - item belong to TopologicalLinkpublic void loadEquipmentNodeShelf(EqEquipment equipNode, NetworkDevice neElement)
EquipmentNode - List of items belong to EquipmentNodeneName - The ID of Network Elementpublic void loadEquipmentPort(TpTerminationPoint portIter, NetworkDevice neElement)
PhysicalPort - List of items belong to Physical PortElements - The Network Element datapublic java.util.List<NetworkDevice> parseNetworkDeviceData(java.util.List<NdNode> nodeList)
nodeList - protected boolean isGetEntities()
protected void setGetEntities(java.lang.String getEntitiesFlag)
getEntities - the getEntities to setprotected 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 setpublic static void setPropsFile(java.util.Properties propsFile)