public class DataStore extends java.lang.Object implements CollectorDataStore
An in memory data store implementation for the ITNM java collector framework.
Contains a map of one or more DataSource
s which hold collected
network data. This data store makes use of a ReentrantReadWriteLock
in order to maintain the integrity of stored data, and so only allows one
thread to add data to a store at any given time.
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
collectorDescription
A description of the collector for this data store
|
protected java.lang.String |
collectorName
The name of the collector that "owns" this data store
|
protected java.util.Map<java.lang.Integer,DataSource> |
dataSources
A store of all
DataSource s hashed by an integer data source ID. |
protected java.util.concurrent.locks.Lock |
readLock
The read lock - to be locked whenever data is being fetched from the
store
|
protected java.util.concurrent.locks.ReentrantReadWriteLock |
rwLock
A lock to manage concurrent access to the stored data, and in doing so
maintaining data integrity.
|
protected java.util.concurrent.locks.Lock |
writeLock
The write lock - to be locked whenever data is being written to the store
|
Constructor and Description |
---|
DataStore(java.lang.String collectorName,
java.lang.String collectorDescription)
Create a new in-memory data store implementation.
|
Modifier and Type | Method and Description |
---|---|
void |
addAssociatedAddress(int dataSourceId,
java.lang.String deviceId,
java.lang.String interfaceId,
java.util.Map<java.lang.String,java.lang.Object> data)
Associate an address with a given device.
|
void |
addConnection(int dataSourceId,
java.lang.String deviceId,
java.lang.String topologyType,
java.util.Map<java.lang.String,java.lang.Object> connection)
Add a connection within a given topology for a given device.
|
void |
addDataSource(DataSource ds)
Add a new source of collector data.
|
void |
addDataSource(int dataSourceId,
java.lang.String dataSourceDescription)
Add a new source of collector data.
|
void |
addDataSource(int dataSourceId,
java.lang.String dataSourceDescription,
java.util.Map<java.lang.String,?> data)
WARNING: No validation is done on this addition of data, validation can
be performed afterwards using the methods available in
CollectorValidationUtils |
java.lang.Object |
addDeviceData(int dataSourceId,
java.lang.String deviceId,
java.lang.Object data)
Add device data to a given device.
|
void |
addEntity(int dataSourceId,
java.lang.String deviceId,
java.util.Map<java.lang.String,java.lang.Object> data)
Add entity data to a given device.
|
void |
addGeographicLocation(int dataSourceId,
java.lang.String deviceId,
java.util.Map<java.lang.String,java.lang.Object> data)
Adds geographical data to a given device.
|
void |
addInterface(int dataSourceId,
java.lang.String deviceId,
java.lang.String interfaceKey,
java.util.Map<java.lang.String,java.lang.Object> data)
Add interface data to a given device.
|
void |
addL2Vpn(int dataSourceId,
java.lang.String deviceId,
java.util.Map<java.lang.String,java.lang.Object> data)
Add layer 2 VPN data to a device.
|
void |
addL3Vpn(int dataSourceId,
java.lang.String deviceId,
java.util.Map<java.lang.String,java.lang.Object> data)
Add layer 3 VPN data to a device.
|
void |
addL3VpnInterface(int dataSourceId,
java.lang.String deviceId,
java.lang.String interfaceKey,
java.lang.String vpnName,
java.util.Map<java.lang.String,java.lang.Object> interfaceData)
Add VPN interface data for a given layer 3 VPN.
|
void |
addL3VpnRouteTarget(int dataSourceId,
java.lang.String deviceId,
java.lang.String vpnName,
java.lang.String routeTarget,
int routeTargetType)
Adds VPN route target data for a given layer 3 VPN
|
void |
addLayer1Connection(int dataSourceId,
java.lang.String deviceId,
java.util.Map<java.lang.String,java.lang.Object> data)
Add a layer 1 connection for a given device.
|
void |
addLayer2Connection(int dataSourceId,
java.lang.String deviceId,
java.util.Map<java.lang.String,java.lang.Object> data)
Add a layer 2 connection for a given device.
|
void |
addLayer3Connection(int dataSourceId,
java.lang.String deviceId,
java.util.Map<java.lang.String,java.lang.Object> data)
Add a layer 3 connection for a given device.
|
void |
addLsp(int dataSourceId,
java.lang.String deviceId,
java.util.Map<java.lang.String,java.lang.Object> data)
Add LSP data to a given device.
|
void |
addMplsInterface(int dataSourceId,
java.lang.String deviceId,
java.util.Map<java.lang.String,java.lang.Object> data)
Add MPLS interface data to a given device.
|
void |
deviceCollects(int dataSourceId,
java.lang.String deviceId,
java.util.Map<java.lang.String,java.lang.Object> entityDetails)
Add a collects relationship between a device and another entity
|
void |
deviceCollects(int dataSourceId,
java.lang.String deviceId,
java.util.Map<java.lang.String,java.lang.Object> entityDetails,
int sequence)
Add a collects relationship between a device and another entity
|
void |
deviceDependency(int dataSourceId,
java.lang.String deviceId,
java.util.Map<java.lang.String,java.lang.Object> entityDetails)
Add a dependency relationship between a device and another entity
|
void |
deviceDependency(int dataSourceId,
java.lang.String deviceId,
java.util.Map<java.lang.String,java.lang.Object> entityDetails,
int dependencyType)
Add a dependency relationship between a device and another entity
|
void |
deviceHosts(int dataSourceId,
java.lang.String deviceId,
java.util.Map<java.lang.String,java.lang.Object> entityDetails)
Add a hostedService relationship between a device and another entity
|
java.lang.String |
getAssociatedAddresses(int dataSourceId,
int deviceId)
This methods calls getAssociatedAddresses
using deviceId in numeric and dataSourceId in numeric
|
java.lang.String |
getAssociatedAddresses(int dataSourceId,
java.lang.String deviceId)
Responsible for gathering and returning all IP addresses configured on a
given device id and data source.
|
java.lang.String |
getCollectorDescription() |
java.lang.String |
getCollectorName() |
java.lang.String |
getConnections(int dataSourceId,
int deviceId,
java.lang.String topologyType)
This methods calls main getConnections
using deviceId in numeric and dataSourceId in numeric
|
java.lang.String |
getConnections(int dataSourceId,
java.lang.String deviceId,
java.lang.String topologyType)
Optional - Responsible for gathering and returning all resolved
connection information for the supplied topology type and supplied device
and data source.
|
DataSource |
getDataSource(int sourceId) |
java.util.Map<java.lang.Integer,DataSource> |
getDataSources() |
java.lang.String |
getDeviceInfo(int dataSourceId,
int deviceId)
This methods calls main getDeviceInfo
using deviceId in numeric and dataSourceId in numeric
|
java.lang.String |
getDeviceInfo(int dataSourceId,
java.lang.String deviceId)
Responsible for gathering and returning basic device level information
for a specified device and data source.
|
java.lang.String |
getDeviceInfo(java.lang.String dataSourceId,
java.lang.String deviceId)
This methods calls main getDeviceInfo
using deviceId in numeric and dataSourceId in numeric
|
java.lang.String |
getDeviceList(int dataSourceId)
Responsible for determining and returning the addresses and ids of all
devices that are managed by the Collector within the specified data
source.
|
java.lang.String |
getDeviceList(int dataSourceId,
java.lang.String address)
Responsible for determining and returning the addresses and ids of all
devices that are managed by the Collector within the specified data
source and which have the supplied ip address
|
java.lang.String |
getDeviceList(int dataSourceId,
java.lang.String address,
java.lang.String subnetMask)
Responsible for determining and returning the addresses and ids of all
devices that are managed by the Collector within the specified data
source and which lie within the specified subnet.
|
java.lang.String |
getDeviceName(int dataSourceId,
int deviceId)
This methods calls main getDeviceName
using deviceId in numeric and dataSourceId in numeric
|
java.lang.String |
getDeviceName(int dataSourceId,
java.lang.String deviceId)
Get the name for a device e.g.
|
java.lang.String |
getEntities(int dataSourceId,
int deviceId)
Get the entities for a device
from a given dataSourceId and deviceId in numeric
|
java.lang.String |
getEntities(int dataSourceId,
java.lang.String deviceId)
Optional - Responsible for gathering and returning ENTITY-MIB
style entity information for a given device id and data source.
|
java.lang.String |
getInfo()
Responsible for responding with information on the Collector and its
supported data sources.
|
java.lang.String |
getInterfaceName(int dataSourceId,
int deviceId,
java.lang.String interfaceKey)
This methods calls main getInterfaceName
using deviceId in numeric and dataSourceId in numeric
|
java.lang.String |
getInterfaceName(int dataSourceId,
java.lang.String deviceId,
java.lang.String interfaceKey)
Get the name for an interface, e.g.
|
java.lang.String |
getInventory(int dataSourceId,
int deviceId)
This methods calls main getInventory
using deviceId in numeric and dataSourceId in numeric
|
java.lang.String |
getInventory(int dataSourceId,
java.lang.String deviceId)
Optional - Responsible for gathering and returning device
interface information for a specified device id and data source.
|
java.lang.String |
getLayer1Connections(int dataSourceId,
int deviceId)
This methods calls main getLayer1Connections
using deviceId in numeric and dataSourceId in numeric
|
java.lang.String |
getLayer1Connections(int dataSourceId,
java.lang.String deviceId)
Optional - Responsible for gathering and returning all resolved
layer 1 connection information for the supplied device data source.
|
java.lang.String |
getLayer2Connections(int dataSourceId,
int deviceId)
This methods calls main getLayer2Connections
using deviceId in numeric and dataSourceId in numeric
|
java.lang.String |
getLayer2Connections(int dataSourceId,
java.lang.String deviceId)
Optional - Responsible for gathering and returning all resolved
layer 2 connection information for the supplied device data source.
|
java.lang.String |
getLayer2Vpns(int dataSourceId,
int deviceId)
This methods calls main getLayer2Vpns
using deviceId in numeric and dataSourceId in numeric
|
java.lang.String |
getLayer2Vpns(int dataSourceId,
java.lang.String deviceId)
Optional - Responsible for gathering and returning all layer 2
VPNs configured on a given device id and data source.
|
java.lang.String |
getLayer3Connections(int dataSourceId,
int deviceId)
This methods calls main getLayer3Connections
using deviceId in numeric and dataSourceId in numeric
|
java.lang.String |
getLayer3Connections(int dataSourceId,
java.lang.String deviceId)
Optional - Responsible for gathering and returning all resolved
layer 3 link information for the supplied device id and data source.
|
java.lang.String |
getLayer3Vpns(int dataSourceId,
int deviceId)
This methods calls main getLayer3Vpns
using deviceId in numeric and dataSourceId in numeric
|
java.lang.String |
getLayer3Vpns(int dataSourceId,
java.lang.String deviceId)
Optional - Responsible for gathering and returning all layer 3
VPNs configured on a given device id and data source.
|
java.lang.String |
getMplsInterfaces(int dataSourceId,
int deviceId)
This methods calls main getMplsInterfaces
using deviceId in numeric and dataSourceId in numeric
|
java.lang.String |
getMplsInterfaces(int dataSourceId,
java.lang.String deviceId)
Optional - Get a list of MPLS interfaces for a given device
|
void |
interfaceCollects(int dataSourceId,
java.lang.String deviceId,
java.lang.String interfaceId,
java.util.Map<java.lang.String,java.lang.Object> entityDetails)
Add a collects relationship between an interface and another entity
|
void |
interfaceCollects(int dataSourceId,
java.lang.String deviceId,
java.lang.String interfaceId,
java.util.Map<java.lang.String,java.lang.Object> entityDetails,
int sequence)
Add a collects relationship between an interface and another entity
|
void |
interfaceDependency(int dataSourceId,
java.lang.String deviceId,
java.lang.String interfaceId,
java.util.Map<java.lang.String,java.lang.Object> entityDetails)
Add a dependency relationship between an interface and another entity
|
void |
interfaceDependency(int dataSourceId,
java.lang.String deviceId,
java.lang.String interfaceId,
java.util.Map<java.lang.String,java.lang.Object> entityDetails,
int dependencyType)
Add a dependency relationship between an interface and another entity
|
void |
interfaceHosts(int dataSourceId,
java.lang.String deviceId,
java.lang.String interfaceId,
java.util.Map<java.lang.String,java.lang.Object> entityDetails)
Add a hostedService relationship between an interface and another entity
|
void |
removeAllDeviceData(int dataSourceId)
Delete/remove all device data associated with a given data source
|
void |
removeDataSource(int dataSourceId)
Delete/remove all data associated with a given data source
|
void |
removeDeviceData(int dataSourceId,
java.lang.String deviceId)
Delete/remove all data associated with a given device and data source
|
void |
removeDeviceEntityData(int dataSourceId,
java.lang.String deviceId)
Delete/remove entity data associated with a given device and data source
|
void |
removeDeviceInterfaceData(int dataSourceId,
java.lang.String deviceId)
Delete/remove interface data associated with a given device and data source
|
void |
removeDeviceLayer2ConnectionData(int dataSourceId,
java.lang.String deviceId)
Delete/remove layer 2 connection data associated with a given device and data source
|
void |
removeDeviceLayer2VpnData(int dataSourceId,
java.lang.String deviceId)
Delete/remove layer 2 Vpn data associated with a given device and data source
|
void |
removeDeviceLayer3VpnData(int dataSourceId,
java.lang.String deviceId)
Delete/remove layer 3 VPN data associated with a given device and data source
|
void |
removeDeviceMplsData(int dataSourceId,
java.lang.String deviceId)
Delete/remove MPLS data associated with a given device and data source
|
void |
resolveAssociatedAddresses(int dataSourceId)
Builds the associated address list based on the existing interface data.
|
void |
resolveAssociatedAddresses(int dataSourceId,
java.lang.String deviceId)
Builds the associated address list based on the existing interface data
for a given device
|
void |
setCollectorDescription(java.lang.String collectorDescription)
Set the description for the collector
|
void |
setCollectorName(java.lang.String collectorName)
Set the name of the collector
|
protected java.lang.String collectorName
protected java.lang.String collectorDescription
protected java.util.Map<java.lang.Integer,DataSource> dataSources
DataSource
s hashed by an integer data source ID.protected java.util.concurrent.locks.ReentrantReadWriteLock rwLock
protected java.util.concurrent.locks.Lock readLock
protected java.util.concurrent.locks.Lock writeLock
public DataStore(java.lang.String collectorName, java.lang.String collectorDescription)
collectorName
- The name of the collectorcollectorDescription
- A description of the collectorpublic void addAssociatedAddress(int dataSourceId, java.lang.String deviceId, java.lang.String interfaceId, java.util.Map<java.lang.String,java.lang.Object> data) throws CollectorException
CollectorDataStore
CollectorValidationUtils.validateAddressData(Map)
addAssociatedAddress
in interface CollectorDataStore
dataSourceId
- The ID of the data sourcedeviceId
- The ID of the deviceinterfaceId
- The ID of the interface on the device with which the address
is associateddata
- The address data: IfIndex, IfOperStatus, IpAddressCollectorException
CollectorValidationUtils.validateAddressData(Map)
public void addConnection(int dataSourceId, java.lang.String deviceId, java.lang.String topologyType, java.util.Map<java.lang.String,java.lang.Object> connection) throws CollectorException
CollectorDataStore
CollectorValidationUtils.validateConnectionData(Map)
addConnection
in interface CollectorDataStore
dataSourceId
- The ID of the sourcedeviceId
- The ID of the devicetopologyType
- The type of connection, for example Layer1, Layer2 or
Microwaveconnection
- Link data: SourceName SourceInterfaceId DestinationName
DestinationInterfaceIdCollectorException
CollectorValidationUtils.validateConnectionData(Map)
public void addDataSource(DataSource ds) throws CollectorException
DataSource
object as a parameter and adds directly to the storeaddDataSource
in interface CollectorDataStore
ds
- The new data source to addCollectorException
- If a data source with the same ID already existsCollectorValidationUtils.validateDataSourceData(DataSource)
public void addDataSource(int dataSourceId, java.lang.String dataSourceDescription) throws CollectorException
CollectorDataStore
addDataSource
in interface CollectorDataStore
dataSourceId
- The ID for the sourcedataSourceDescription
- The description for the data sourceCollectorException
- If the data source cannot be createdCollectorValidationUtils.validateDataSourceData(DataSource)
public void addDataSource(int dataSourceId, java.lang.String dataSourceDescription, java.util.Map<java.lang.String,?> data) throws CollectorException
CollectorValidationUtils
addDataSource
in interface CollectorDataStore
dataSourceId
- The ID for the sourcedataSourceDescription
- The description for the data sourcedata
- Collector data to be put into the data storeCollectorException
- If the data source cannot be createdCollectorValidationUtils.validateDataSourceData(DataSource)
public java.lang.Object addDeviceData(int dataSourceId, java.lang.String deviceId, java.lang.Object data) throws CollectorException
CollectorDataStore
addDeviceData
in interface CollectorDataStore
dataSourceId
- The ID of the data sourcedeviceId
- The ID of the devicedata
- An object containing the device data to merge with the
existing device data (if it already exists)CollectorException
CollectorValidationUtils.validateDeviceData(com.ibm.tivoli.nm.collectors.framework.store.NetworkDevice)
public void addEntity(int dataSourceId, java.lang.String deviceId, java.util.Map<java.lang.String,java.lang.Object> data) throws CollectorException
CollectorDataStore
CollectorValidationUtils.validateEntityData(Map)
addEntity
in interface CollectorDataStore
dataSourceId
- The ID of the data sourcedeviceId
- The ID of the devicedata
- Entity data: EntPhysicalIndex EntPhysClass EntPhysName
EntPhysDescr EntContainedIn ParentRelPos EntPhysAlias
EntVendorType EntParent EntPhysType EntHwRevision
EntSwRevision EntFwRevision EntSerialNumber
IfIndex InterfaceIdCollectorException
CollectorValidationUtils.validateEntityData(Map)
public void addGeographicLocation(int dataSourceId, java.lang.String deviceId, java.util.Map<java.lang.String,java.lang.Object> data) throws CollectorException
CollectorDataStore
CollectorValidationUtils.validateGeographicData(Map)
addGeographicLocation
in interface CollectorDataStore
dataSourceId
- The ID of the data sourcedeviceId
- The ID of the devicedata
- The geographic location data. Valid fields are:
CollectorException
- if the supplied data is not valid.CollectorValidationUtils.validateGeographicData(Map)
public void addInterface(int dataSourceId, java.lang.String deviceId, java.lang.String interfaceKey, java.util.Map<java.lang.String,java.lang.Object> data) throws CollectorException
CollectorDataStore
CollectorValidationUtils.validateInterfaceData(Map)
addInterface
in interface CollectorDataStore
dataSourceId
- The ID of the data sourcedeviceId
- The ID of the deviceinterfaceKey
- The key of the interface to add data todata
- Interface data: Port Card IfIndex InterfaceId IfDescr IfName
IfType IsConnected PhysAddress IpAddress Subnet SubnetMask
NetMaskCollectorException
CollectorValidationUtils.validateInterfaceData(Map)
public void addL2Vpn(int dataSourceId, java.lang.String deviceId, java.util.Map<java.lang.String,java.lang.Object> data) throws CollectorException
CollectorDataStore
CollectorValidationUtils.validateL2VPNData(Map)
addL2Vpn
in interface CollectorDataStore
dataSourceId
- The ID of the data sourcedeviceId
- The ID of the devicedata
- The VPN data: VPNName VCID VCType IfIndex LocalLabel PeerIp
PeerIfIndex PeerLabel VPNType StatusCollectorException
CollectorValidationUtils.validateL2VPNData(Map)
public void addL3Vpn(int dataSourceId, java.lang.String deviceId, java.util.Map<java.lang.String,java.lang.Object> data) throws CollectorException
CollectorDataStore
CollectorValidationUtils.validateL3VPNData(Map)
addL3Vpn
in interface CollectorDataStore
dataSourceId
- The ID of the data sourcedeviceId
- The ID of the devicedata
- The VPN data: VPNName VRFName RD Status Description ImportRTs
(@see DataSource.addL3VpnRouteTarget(java.lang.String, java.lang.String, java.lang.String, int)
) ExportRTs (@see
DataSource.addL3VpnRouteTarget(java.lang.String, java.lang.String, java.lang.String, int)
) Interfaces (@see
DataSource.addL3VpnInterface(java.lang.String, java.lang.String, java.lang.String, java.util.Map<java.lang.String, java.lang.Object>)
)CollectorException
CollectorValidationUtils.validateL3VPNData(Map)
public void addL3VpnInterface(int dataSourceId, java.lang.String deviceId, java.lang.String interfaceKey, java.lang.String vpnName, java.util.Map<java.lang.String,java.lang.Object> interfaceData) throws CollectorException
CollectorDataStore
CollectorValidationUtils.validateL3VPNInterfaceData(Map)
addL3VpnInterface
in interface CollectorDataStore
dataSourceId
- The ID of the data sourcedeviceId
- The ID of the deviceinterfaceKey
- The key of the interfacevpnName
- The name of the CPNinterfaceData
- The interface data: IfIndex InterfaceId CEAddress ProtocolCollectorException
CollectorValidationUtils.validateL3VPNInterfaceData(Map)
public void addL3VpnRouteTarget(int dataSourceId, java.lang.String deviceId, java.lang.String vpnName, java.lang.String routeTarget, int routeTargetType) throws CollectorException
CollectorDataStore
addL3VpnRouteTarget
in interface CollectorDataStore
dataSourceId
- The ID of the data sourcedeviceId
- The ID of the devicevpnName
- The name of the VPNrouteTarget
- The route targetrouteTargetType
- The route target type (import/export/both)CollectorException
CollectorValidationUtils.validateL3VPNRTData(String, int)
public void addLayer1Connection(int dataSourceId, java.lang.String deviceId, java.util.Map<java.lang.String,java.lang.Object> data) throws CollectorException
CollectorDataStore
CollectorValidationUtils.validateConnectionData(Map)
addLayer1Connection
in interface CollectorDataStore
dataSourceId
- The ID of the data sourcedeviceId
- The ID of the devicedata
- Link data: SourceName SourceInterfaceId DestinationName
DestinationInterfaceIdCollectorException
CollectorValidationUtils.validateConnectionData(Map)
public void addLayer2Connection(int dataSourceId, java.lang.String deviceId, java.util.Map<java.lang.String,java.lang.Object> data) throws CollectorException
CollectorDataStore
CollectorValidationUtils.validateConnectionData(Map)
addLayer2Connection
in interface CollectorDataStore
dataSourceId
- The ID of the data sourcedeviceId
- The ID of the devicedata
- Link data: SourceName SourceInterfaceId SourceIfIndex
DestinationIP DestinationIfIndex DestinationInterfaceIdCollectorException
CollectorValidationUtils.validateConnectionData(Map)
public void addLayer3Connection(int dataSourceId, java.lang.String deviceId, java.util.Map<java.lang.String,java.lang.Object> data) throws CollectorException
CollectorDataStore
CollectorValidationUtils.validateL3ConnectionData(Map)
addLayer3Connection
in interface CollectorDataStore
dataSourceId
- The ID of the data sourcedeviceId
- The ID of the devicedata
- Link data: SourceName SourceIfIndex DestinationIP
DestinationIfIndexCollectorException
CollectorValidationUtils.validateL3ConnectionData(Map)
public void addLsp(int dataSourceId, java.lang.String deviceId, java.util.Map<java.lang.String,java.lang.Object> data) throws CollectorException
CollectorDataStore
CollectorValidationUtils.validateLSPData(Map)
addLsp
in interface CollectorDataStore
dataSourceId
- The ID of the data sourcedeviceId
- The ID of the devicedata
- The LSP data: SourceName DestName NumHops LspName HopNumber
DeviceNameCollectorException
CollectorValidationUtils.validateLSPData(Map)
public void addMplsInterface(int dataSourceId, java.lang.String deviceId, java.util.Map<java.lang.String,java.lang.Object> data) throws CollectorException
CollectorDataStore
CollectorValidationUtils.validateMPLSData(Map)
addMplsInterface
in interface CollectorDataStore
dataSourceId
- The ID of the data sourcedeviceId
- The ID of the devicedata
- The MPLS interface data: ifIndex (future fields may include
statistics etc..)CollectorException
CollectorValidationUtils.validateMPLSData(Map)
public void deviceCollects(int dataSourceId, java.lang.String deviceId, java.util.Map<java.lang.String,java.lang.Object> entityDetails)
CollectorDataStore
deviceCollects
in interface CollectorDataStore
dataSourceId
- The ID of the data sourcedeviceId
- The ID of the device that represents the collecting entityentityDetails
- Identifying details for the collected entity @see
CollectorValidationUtils.validateRelationshipData(Map)
public void deviceCollects(int dataSourceId, java.lang.String deviceId, java.util.Map<java.lang.String,java.lang.Object> entityDetails, int sequence)
CollectorDataStore
deviceCollects
in interface CollectorDataStore
dataSourceId
- The ID of the data sourcedeviceId
- The ID of the device that represents the collecting entityentityDetails
- Identifying details for the collected entity @see
CollectorValidationUtils.validateRelationshipData(Map)
sequence
- An integer representing the sequencepublic void deviceDependency(int dataSourceId, java.lang.String deviceId, java.util.Map<java.lang.String,java.lang.Object> entityDetails)
CollectorDataStore
deviceDependency
in interface CollectorDataStore
dataSourceId
- The ID of the data sourcedeviceId
- The ID of the device that represents the entity that is
required by the dependententityDetails
- Identifying details for the dependent entity @see
CollectorValidationUtils.validateRelationshipData(Map)
public void deviceDependency(int dataSourceId, java.lang.String deviceId, java.util.Map<java.lang.String,java.lang.Object> entityDetails, int dependencyType)
CollectorDataStore
deviceDependency
in interface CollectorDataStore
dataSourceId
- The ID of the data sourcedeviceId
- The ID of the device that represents the entity that is
required by the dependententityDetails
- Identifying details for the dependent entity @see
CollectorValidationUtils.validateRelationshipData(Map)
dependencyType
- The type of the dependencypublic void deviceHosts(int dataSourceId, java.lang.String deviceId, java.util.Map<java.lang.String,java.lang.Object> entityDetails)
CollectorDataStore
deviceHosts
in interface CollectorDataStore
dataSourceId
- The ID of the data sourcedeviceId
- The ID of the device that represents the hosting entityentityDetails
- Identifying details for the hosted service @see
CollectorValidationUtils.validateRelationshipData(Map)
public java.lang.String getAssociatedAddresses(int dataSourceId, int deviceId)
getAssociatedAddresses
in interface CollectorDataStore
dataSourceId
- The data source id in numericdeviceId
- The device id in numericpublic java.lang.String getAssociatedAddresses(int dataSourceId, java.lang.String deviceId)
CollectorDataStore
Responsible for gathering and returning all IP addresses configured on a given device id and data source.
This method is used by the CollectorInventory agents to produce a list of associated IP addresses to allow ITNM to perform address translation.
getAssociatedAddresses
in interface CollectorDataStore
dataSourceId
- The ID for the data sourcedeviceId
- The ID for the device
<associatedAddressList>
<addressEntry>
<ifOperStatus>1</ifOperStatus>
<ifIndex>10</ifIndex>
<ipAddress>10.1.4.1</ipAddress>
</addressEntry>
<addressEntry>
<ifOperStatus>1</ifOperStatus>
<interfaceId>MyUniqueInterfaceIdFor19</interfaceId>
<ipAddress>10.1.4.1</ipAddress>
</addressEntry>
.. other entries ..
</associatedAddressList>
public java.lang.String getCollectorDescription()
public java.lang.String getCollectorName()
public java.lang.String getConnections(int dataSourceId, int deviceId, java.lang.String topologyType)
getConnections
in interface CollectorDataStore
dataSourceId
- The data source id in numericdeviceId
- The device id in numerictopologyType
- The topologyType in numericpublic java.lang.String getConnections(int dataSourceId, java.lang.String deviceId, java.lang.String topologyType)
CollectorDataStore
Optional - Responsible for gathering and returning all resolved connection information for the supplied topology type and supplied device and data source.
getConnections
in interface CollectorDataStore
dataSourceId
- The ID of the data sourcedeviceId
- The ID of the devicetopologyType
- The connection topology type, for example Layer1, Layer2,
Layer3 or Microwave
<microwaveConnections>
<connection>
<dest>10.1.230.1</dest>
<destIfIndex>22</destIfIndex>
<srcIfIndex>9</srcIfIndex>
<src>10.1.254.1</src>
</connection>
<connection>
<dest>10.1.230.1</dest>
<destInterfaceId>MyUniqueId22</destInterfaceId>
<srcInterfaceId>MyUniqueId9</srcInterfaceId>
<src>10.1.254.1</src>
</connection>
</microwaveConnections>
public DataSource getDataSource(int sourceId) throws CollectorException
CollectorException
public java.util.Map<java.lang.Integer,DataSource> getDataSources()
public java.lang.String getDeviceInfo(int dataSourceId, int deviceId)
getDeviceInfo
in interface CollectorDataStore
dataSourceId
- The data source id in numericdeviceId
- The device id in numericpublic java.lang.String getDeviceInfo(java.lang.String dataSourceId, java.lang.String deviceId)
getDeviceInfo
in interface CollectorDataStore
dataSourceId
- The data source id in stringdeviceId
- The device id in stringpublic java.lang.String getDeviceInfo(int dataSourceId, java.lang.String deviceId)
CollectorDataStore
Responsible for gathering and returning basic device level information for a specified device and data source.
getDeviceInfo
in interface CollectorDataStore
dataSourceId
- The ID for the data sourcedeviceId
- The ID for the device
<deviceInfo>
<sysObjectId>1.3.6.1.4.1.0.1.94</sysObjectId>
<descr>Vendor Device Description (sysDescr)</descr>
<name>10.1.254.1</name>
</deviceInfo>
public java.lang.String getDeviceList(int dataSourceId)
CollectorDataStore
Responsible for determining and returning the addresses and ids of all devices that are managed by the Collector within the specified data source.
The device id <id> should uniquely identify the device within the Collector/data source.
ITNM will supply the device ids returned by GetDeviceList() in further calls to the Collector.
getDeviceList
in interface CollectorDataStore
dataSourceId
- The ID for the data source
<deviceList>
<device>
<id>10.1.230.3</id>
<ip>10.1.230.3</ip>
<addressSpace></addressSpace>
</device>
.. other devices ..
</deviceList>
public java.lang.String getDeviceList(int dataSourceId, java.lang.String address)
CollectorDataStore
Responsible for determining and returning the addresses and ids of all devices that are managed by the Collector within the specified data source and which have the supplied ip address
The device id <id> should uniquely identify the device within the Collector/data source.
ITNM will supply the device ids returned by GetDeviceList() in further calls to the Collector.
getDeviceList
in interface CollectorDataStore
dataSourceId
- The ID for the data sourceaddress
- The address of the devices to match
<deviceList>
<device>
<id>10.1.230.3</id>
<ip>10.1.230.3</ip>
<addressSpace></addressSpace>
</device>
.. other devices ..
</deviceList>
public java.lang.String getDeviceList(int dataSourceId, java.lang.String address, java.lang.String subnetMask)
CollectorDataStore
Responsible for determining and returning the addresses and ids of all devices that are managed by the Collector within the specified data source and which lie within the specified subnet.
The device id <id> should uniquely identify the device within the Collector/data source.
ITNM will supply the device ids returned by GetDeviceList() in further calls to the Collector.
getDeviceList
in interface CollectorDataStore
dataSourceId
- The ID for the data sourceaddress
- The address of the devices to matchsubnetMask
- The subnet mask to use to match devices
<deviceList>
<device>
<id>10.1.230.3</id>
<ip>10.1.230.3</ip>
<addressSpace></addressSpace>
</device>
.. other devices ..
</deviceList>
public java.lang.String getDeviceName(int dataSourceId, int deviceId)
getDeviceName
in interface CollectorDataStore
dataSourceId
- The data source id in numericdeviceId
- The device id in numericpublic java.lang.String getDeviceName(int dataSourceId, java.lang.String deviceId)
CollectorDataStore
getDeviceName
in interface CollectorDataStore
dataSourceId
- The ID for the data sourcedeviceId
- The ID for the devicepublic java.lang.String getEntities(int dataSourceId, int deviceId)
CollectorDataStore
getEntities
in interface CollectorDataStore
dataSourceId
- The ID for the data sourcedeviceId
- The ID for the device in numericpublic java.lang.String getEntities(int dataSourceId, java.lang.String deviceId)
CollectorDataStore
Optional - Responsible for gathering and returning ENTITY-MIB style entity information for a given device id and data source.
This method is used by the CollectorInventory agent to produce a list of entity information for later use in containment modeling.
getEntities
in interface CollectorDataStore
dataSourceId
- The ID of the data sourcedeviceId
- The ID for the device
<entityData>
<entityList>
<entity>
<name>A Vendor 9-slot Chassis System</name>
<class>3</class>
<index>1</index>
<vendorType>1.3.6.1.4.1.0.3.175</vendorType>
<descr>ACME-2000</descr>
<parentRelPos>-1</parentRelPos>
</entity>
.. other entities ..
</entityList>
</entityData>
public java.lang.String getInfo()
CollectorDataStore
Responsible for responding with information on the Collector and its supported data sources.
This method is called by ITNM's Collector Finder to determine which Collectors are valid and which data sources they support. ITNM will subsequently issue RPC calls for data from the listed data sources.
The Collector is responsible for ensuring that each data source has a unique identifier.
getInfo
in interface CollectorDataStore
<collectorInfo>
<name>CollectorsName</name>
<descr>Collectors Description</descr>
<datasources>
<datasource>
<id>1</id>
<descr>Example data source</descr>
</datasource>
.. other data sources ..
</datasources>
</collectorInfo>
public java.lang.String getInterfaceName(int dataSourceId, int deviceId, java.lang.String interfaceKey)
getInterfaceName
in interface CollectorDataStore
dataSourceId
- The data source id in numericdeviceId
- The device id in numericinterfaceKey
- The device id in stringpublic java.lang.String getInterfaceName(int dataSourceId, java.lang.String deviceId, java.lang.String interfaceKey)
CollectorDataStore
getInterfaceName
in interface CollectorDataStore
dataSourceId
- The ID for the data sourcedeviceId
- The ID for the device in numericinterfaceKey
- The key for the interfacepublic java.lang.String getInventory(int dataSourceId, int deviceId)
getInventory
in interface CollectorDataStore
dataSourceId
- The data source id in numericdeviceId
- The device id in numericpublic java.lang.String getInventory(int dataSourceId, java.lang.String deviceId)
CollectorDataStore
Optional - Responsible for gathering and returning device interface information for a specified device id and data source.
getInventory
in interface CollectorDataStore
dataSourceId
- The ID for the data sourcedeviceId
- The ID for the device
<deviceInventory>
<deviceId>10.1.254.1</deviceId>
<interfaceList>
<interface>
<ifPhysAddress>00:99:00:E5:C4:06</ifPhysAddress>
<ifDescr>FastEthernet0/1.10</ifDescr>
<ifOperStatus>1</ifOperStatus>
<ifIndex>19</ifIndex>
<interfaceId>MyUniqueInterfaceIdFor19</interfaceId>
<ifType>135</ifType>
<ipAddress></ipAddress>
<ifName>Fa0/1.10</ifName>
</interface>
.. other interfaces ..
</interfaceList>
</deviceInventory>
public java.lang.String getLayer1Connections(int dataSourceId, int deviceId)
getLayer1Connections
in interface CollectorDataStore
dataSourceId
- The data source id in numericdeviceId
- The device id in numericpublic java.lang.String getLayer1Connections(int dataSourceId, java.lang.String deviceId)
CollectorDataStore
Optional - Responsible for gathering and returning all resolved layer 1 connection information for the supplied device data source.
ITNM will process this data, via its CollectorLayer2Layer.stch stitcher, resulting in layer 1 connectivity information in the GUI.
getLayer1Connections
in interface CollectorDataStore
dataSourceId
- The ID of the data sourcedeviceId
- The ID of the device
<layer1Connections>
<connection>
<dest>10.1.230.1</dest>
<destIfIndex>22</destIfIndex>
<srcIfIndex>9</srcIfIndex>
<src>10.1.254.1</src>
</connection>
<connection>
<dest>10.1.230.1</dest>
<destInterfaceId>MyUniqueId22</destInterfaceId>
<srcInterfaceId>MyUniqueId9</srcInterfaceId>
<src>10.1.254.1</src>
</connection>
</layer1Connections>
public java.lang.String getLayer2Connections(int dataSourceId, int deviceId)
getLayer2Connections
in interface CollectorDataStore
dataSourceId
- The data source id in numericdeviceId
- The device id in numericpublic java.lang.String getLayer2Connections(int dataSourceId, java.lang.String deviceId)
CollectorDataStore
Optional - Responsible for gathering and returning all resolved layer 2 connection information for the supplied device data source.
ITNM will process this data, via its CollectorLayer2Layer.stch stitcher, resulting in layer 2 connectivity information in the GUI.
getLayer2Connections
in interface CollectorDataStore
dataSourceId
- The ID of the data sourcedeviceId
- The ID of the device
<layer2Connections>
<connection>
<dest>10.1.230.1</dest>
<destIfIndex>22</destIfIndex>
<srcIfIndex>9</srcIfIndex>
<src>10.1.254.1</src>
</connection>
<connection>
<dest>10.1.230.1</dest>
<destInterfaceId>MyUniqueId22</destInterfaceId>
<srcInterfaceId>MyUniqueId9</srcInterfaceId>
<src>10.1.254.1</src>
</connection>
<layer2Connections>
public java.lang.String getLayer2Vpns(int dataSourceId, int deviceId)
getLayer2Vpns
in interface CollectorDataStore
dataSourceId
- The data source id in numericdeviceId
- The device id in numericpublic java.lang.String getLayer2Vpns(int dataSourceId, java.lang.String deviceId)
CollectorDataStore
Optional - Responsible for gathering and returning all layer 2 VPNs configured on a given device id and data source.
ITNM will process this data with its standard MPLS stitchers to generate VPN membership information for display in the GUI.
getLayer2Vpns
in interface CollectorDataStore
dataSourceId
- The ID of the data sourcedeviceId
- The ID of the device
<layer2Vpns>
<vpn>
<vpnName>50</vpnName>
<localLabel>26</localLabel>
<vcId>50</vcId>
<localIfIndex>32</localIfIndex>
<topologyType>5</topologyType>
<vcType>4</vcType>
<peerLabel>28</peerLabel>
<status>1</status>
<peerIp>10.1.254.2</peerIp>
<peerIfIndex>5</peerIfIndex>
</vpn>
<vpn>
<vpnName>50</vpnName>
<localLabel>26</localLabel>
<vcId>50</vcId>
<localInterfaceId>MyInterfaceId32</localInterfaceI>
<topologyType>5</topologyType>
<vcType>4</vcType>
<peerLabel>28</peerLabel>
<status>1</status>
<peerIp>10.1.254.2</peerIp>
<peerInterfaceId>MyInterfaceId5</peerInterfaceId>
</vpn>
.. other vpns ..
</layer2Vpns>
public java.lang.String getLayer3Connections(int dataSourceId, int deviceId)
getLayer3Connections
in interface CollectorDataStore
dataSourceId
- The data source id in numericdeviceId
- The device id in numericpublic java.lang.String getLayer3Connections(int dataSourceId, java.lang.String deviceId)
CollectorDataStore
Optional - Responsible for gathering and returning all resolved layer 3 link information for the supplied device id and data source.
ITNM will process this data, via its CollectorIPLayer.stch stitcher, resulting in layer 3 connectivity information in the GUI.
getLayer3Connections
in interface CollectorDataStore
dataSourceId
- The ID of the data sourcedeviceId
- The ID of the device
<layer3Connections>
<connection>
<dest>10.1.230.1</dest>
<destIfIndex>22</destIfIndex>
<srcIfIndex>9</srcIfIndex>
<src>10.1.254.1</src>
</connection>
<connection>
<dest>10.1.230.1</dest>
<destInterfaceId>MyUniqueId22</destInterfaceId>
<srcInterfaceId>MyUniqueId9</srcInterfaceId>
<src>10.1.254.1</src>
</connection>
</layer3Connections>
public java.lang.String getLayer3Vpns(int dataSourceId, int deviceId)
getLayer3Vpns
in interface CollectorDataStore
dataSourceId
- The data source id in numericdeviceId
- The device id in numericpublic java.lang.String getLayer3Vpns(int dataSourceId, java.lang.String deviceId)
CollectorDataStore
Optional - Responsible for gathering and returning all layer 3 VPNs configured on a given device id and data source.
ITNM will process this data with its standard MPLS stitchers to generate VPN membership information for display in the GUI.
getLayer3Vpns
in interface CollectorDataStore
dataSourceId
- The ID of the data sourcedeviceId
- The ID of the device
<layer3Vpns>
<vpn>
<descr>my blue VPN</descr>
<vrfName>blue</vrfName>
<vpnName>blue</vpnName>
<rd>10:401</rd>
<status>1</status>
<importRTs>
<rt>10:401</rt>
</importRTs>
<exportRTs>
<rt>10:601</rt>
</exportRTs>
<interfaces>
<interface>
<customerName>A Company</customerName>
<ceIp>10.0.0.1</ceIp>
<ifIndex>10</ifIndex>
<customerDescr> A Company</customerDescr>
<protocol>2</protocol>
</interface>
<interface>
<customerName>A Company</customerName>
<ceIp>10.0.0.1</ceIp>
<interfaceId>MyeIdFor19</interfaceId>
<customerDescr> A Company</customerDescr>
<protocol>2</protocol>
</interface>
.. other interfaces ..
</interfaces>
</vpn>
.. other vpns ..
</layer3Vpns>
public java.lang.String getMplsInterfaces(int dataSourceId, int deviceId)
getMplsInterfaces
in interface CollectorDataStore
dataSourceId
- The data source id in numericdeviceId
- The device id in numericpublic java.lang.String getMplsInterfaces(int dataSourceId, java.lang.String deviceId)
CollectorDataStore
Optional - Get a list of MPLS interfaces for a given device
getMplsInterfaces
in interface CollectorDataStore
dataSourceId
- The ID of the data sourcedeviceId
- The ID of the device
<mplsInterfaceData>
<deviceId>10.1.1.1</deviceId>
<interfaceList>
<interface>
<ifIndex>1</ifIndex>
</interface>
</interfaceList>
</mplsInterfaceData>
public void interfaceCollects(int dataSourceId, java.lang.String deviceId, java.lang.String interfaceId, java.util.Map<java.lang.String,java.lang.Object> entityDetails)
CollectorDataStore
interfaceCollects
in interface CollectorDataStore
dataSourceId
- The ID of the data sourcedeviceId
- The ID of the device that contains the interfaceinterfaceId
- The ID of the interface that represents the collecting entityentityDetails
- Identifying details for the collected entity @see
CollectorValidationUtils.validateRelationshipData(Map)
public void interfaceCollects(int dataSourceId, java.lang.String deviceId, java.lang.String interfaceId, java.util.Map<java.lang.String,java.lang.Object> entityDetails, int sequence)
CollectorDataStore
interfaceCollects
in interface CollectorDataStore
dataSourceId
- The ID of the data sourcedeviceId
- The ID of the device that contains the interfaceinterfaceId
- The ID of the interface that represents the collecting entityentityDetails
- Identifying details for the collected entity @see
CollectorValidationUtils.validateRelationshipData(Map)
sequence
- An integer representing the sequencepublic void interfaceDependency(int dataSourceId, java.lang.String deviceId, java.lang.String interfaceId, java.util.Map<java.lang.String,java.lang.Object> entityDetails)
CollectorDataStore
interfaceDependency
in interface CollectorDataStore
dataSourceId
- The ID of the data sourcedeviceId
- The ID of the device that contains the interfaceinterfaceId
- The ID of the interface that represents the entity that is
required by the dependententityDetails
- Identifying details for the dependent entity @see
CollectorValidationUtils.validateRelationshipData(Map)
public void interfaceDependency(int dataSourceId, java.lang.String deviceId, java.lang.String interfaceId, java.util.Map<java.lang.String,java.lang.Object> entityDetails, int dependencyType)
CollectorDataStore
interfaceDependency
in interface CollectorDataStore
dataSourceId
- The ID of the data sourcedeviceId
- The ID of the device that contains the interfaceinterfaceId
- The ID of the interface that represents the entity that is
required by the dependententityDetails
- Identifying details for the dependent entity @see
CollectorValidationUtils.validateRelationshipData(Map)
dependencyType
- The type of the dependencypublic void interfaceHosts(int dataSourceId, java.lang.String deviceId, java.lang.String interfaceId, java.util.Map<java.lang.String,java.lang.Object> entityDetails)
CollectorDataStore
interfaceHosts
in interface CollectorDataStore
dataSourceId
- The ID of the data sourcedeviceId
- The ID of the device that contains the interfaceinterfaceId
- The ID of the interface that represents the hosting entityentityDetails
- Identifying details for the hosted service @see
CollectorValidationUtils.validateRelationshipData(Map)
public void removeAllDeviceData(int dataSourceId)
CollectorDataStore
removeAllDeviceData
in interface CollectorDataStore
dataSourceId
- The ID of the data source whose data is to be deletedpublic void removeDataSource(int dataSourceId)
CollectorDataStore
removeDataSource
in interface CollectorDataStore
dataSourceId
- The ID of the data source to deletepublic void removeDeviceData(int dataSourceId, java.lang.String deviceId)
CollectorDataStore
removeDeviceData
in interface CollectorDataStore
dataSourceId
- The ID of the data sourcedeviceId
- The ID of the device whose data is to be deletedpublic void removeDeviceEntityData(int dataSourceId, java.lang.String deviceId)
CollectorDataStore
removeDeviceEntityData
in interface CollectorDataStore
dataSourceId
- The ID of the data sourcedeviceId
- The ID of the device whose data is to be deletedpublic void removeDeviceInterfaceData(int dataSourceId, java.lang.String deviceId)
CollectorDataStore
removeDeviceInterfaceData
in interface CollectorDataStore
dataSourceId
- The ID of the data sourcedeviceId
- The ID of the device whose data is to be deletedpublic void removeDeviceMplsData(int dataSourceId, java.lang.String deviceId)
CollectorDataStore
removeDeviceMplsData
in interface CollectorDataStore
dataSourceId
- The ID of the data sourcedeviceId
- The ID of the device whose data is to be deletedpublic void removeDeviceLayer2VpnData(int dataSourceId, java.lang.String deviceId)
CollectorDataStore
removeDeviceLayer2VpnData
in interface CollectorDataStore
dataSourceId
- The ID of the data sourcedeviceId
- The ID of the device whose data is to be deletedpublic void removeDeviceLayer3VpnData(int dataSourceId, java.lang.String deviceId)
CollectorDataStore
removeDeviceLayer3VpnData
in interface CollectorDataStore
dataSourceId
- The ID of the data sourcedeviceId
- The ID of the device whose data is to be deletedpublic void removeDeviceLayer2ConnectionData(int dataSourceId, java.lang.String deviceId)
CollectorDataStore
removeDeviceLayer2ConnectionData
in interface CollectorDataStore
dataSourceId
- The ID of the data sourcedeviceId
- The ID of the device whose data is to be deletedpublic void resolveAssociatedAddresses(int dataSourceId)
dataSourceId
- The ID of the data sourcepublic void resolveAssociatedAddresses(int dataSourceId, java.lang.String deviceId)
dataSourceId
- The ID of the data sourcedeviceId
- The ID of the devicepublic void setCollectorDescription(java.lang.String collectorDescription)
collectorDescription
- A description for the collectorpublic void setCollectorName(java.lang.String collectorName)
collectorName
- The name of the collector