new()
Initialise()
GetCollectorName()
GetCollectorDescription()
GetDebugLevel()
SetupDataSources()
UpdateDataSourceEmsData()
DeleteData()
GetNodeStore()
AddDeviceData()
UpdateNode()
GetDeviceData()
DeleteDeviceData()
AddGeographicLocation()
GetGeographicLocation()
AddInterface()
GetInterfaces()
GetInterfaceByKey()
AddEntity()
GetEntityList()
ResolveAssociatedAddresses()
ResolveDeviceAddresses()
AddAssocAddress()
GetConfiguredAddresses()
GetAssocAddresses()
GetAssocAddress()
AddMplsInterface()
GetMplsInterfaces()
AddConnection()
GetConnections()
AddExtraInfo()
AddCustomData()
DeviceName()
InterfaceName()
DeviceCollects()
InterfaceCollects()
DeviceHosts()
InterfaceHosts()
DeviceDependency()
InterfaceDependency()
AddGenericRelationship()
TranslateUpdateData()
TranslateInfo()
TranslateDeviceList()
IsInSubnet()
TranslateDeviceInfo()
TranslateInventory()
TranslateEntities()
TranslateAssociatedAddresses()
TranslateMplsInterfaces()
TranslateConnections()
PrintDebug()
Collector::Store - class to hold and translate Collector discovered data
n/a
Tip: It is recommended that the Collector Developer Guide document and Collector::Collector (Collector.pm) part of the Perl Collector Library documentation be read prior to this documentation
The Collector::Store module is used to manage Collector discovered data. Using this module in a Collector will also enable automatic generation of ITNM compatible XML-RPC XML responses, and a level of data validation.
An advantage of using Collector::Store to perform storage/validation and XML conversion is that the Collector implementor need only redirect ITNM's XML-RPC calls to the corresponding translation method to generate a valid response.
The intention is that this module will make writing Collectors easier by reducing (or removing) unnecessary restrictions on data storage imposed by the XML-RPC methods that it is supposed to ultimately populate; i.e. the Collectors can be written with the aim of populating a reasonably structured Store rather than populating many potentially overlapping stores, each servicing a single XML-RPC method's requirements.
A Store object must be created via a call to new()
and prepared via calls to SetupDataSources()
and Initialise()
before it can be used.
It will then be ready to be used in the creation of a Collector::Collector object.
For example;
... my @sourceInfo = ( { Id=>1, Descr=>"Primary Data Source" } );
my $store = Collector::Store->new();
$store->SetupDataSources( $sourceInfo );
$store->Initialise( "MyCollector", "An exmaple" ); ...
Note: Data sources (represented by sourceInfo above) enable a single Collector to support multiple sources of data, however in most circumstances users tend to prefer to run separate Collectors, each with a single data source.
new()
Initialise()
SetupDataSources()
UpdateDataSourceEmsData()
GetCollectorName()
GetCollectorDescription()
DeleteData()
Entity data (i.e. cards, fans, interfaces/ports ) access is covered by the following methods.
Note: Interfaces can be added via AddInterface()
or AddEntity()
(for Port class entities). See the Collector Developer Guide for the reasons behind this.
AddDeviceData()
UpdateNode()
GetDeviceData()
DeleteDeviceData()
AddGeographicLocation()
GetGeographicLocation()
AddEntity()
GetEntityList()
AddInterface()
GetInterfaces()
GetInterfaceByKey()
Address information is added via the following methods.
AddAssocAddress()
GetAssocAddresses()
GetAssocAddress()
GetConfiguredAddresses()
ResolveAssociatedAddresses()
ResolveDeviceAddresses()
Layer 2 and Layer 3 Virtual Private Network data is supported by the methods in this section.
AddMplsInterface()
GetMplsInterfaces()
The following methods are used to add and retrieve connectivity data from the Store object.
Note:
A prerequisite to adding connection information is that the entities referred to are already defined in the Store.
For example; the device/interfaces at the end points of the connection must have been added via the AddDeviceData()
AddInterface()/AddEntity() methods)
AddConnection()
The following methods allow custom data attributes to be added to the Collector::Store object.
The methods in this section provide facilities to define various NCIM-style relationships such as;
collects contains hosts depends
See the NCIM reference in the standard ITNM documentation for more information regarding these relationships.
DeviceCollects()
InterfaceCollects()
DeviceHosts()
InterfaceHosts()
DeviceDependency()
InterfaceDependency()
AddCollectedEntity()
AddContainedEntity()
AddDependentEntity()
AddHostedService()
DeviceName()
InterfaceName()
For each of the standard ITNM XML-RPC calls Collector::Store provides a method that generates the XML response string based on the Store held data. These methods are used by the Collector::Collector standard XML-RPC call implementation methods to generate XML-RPC responses. These are in turn called by the users Collector.
Normally users would not call these methods directly - they are documented here for advanced use only.
The example below shows how these methods are normally used indirectly by a Collector;
Users Collector:
sub GetDeviceList # an ITNM XML-RPC call implementation { ... # we put our data in a Store object, so can use the standard # XML-RPC implementations to produce the response; return $g_Collector->StdGetDeviceList( ... ); }
Collector::Collector:
sub StdGetDeviceList # a Collector::Collector standard call implementation { ... # do some standard checking ... # use Store to generate XML response return $self->{Store}->TranslateDeviceInfo(...); }
Collector::Store:
sub TranslateDeviceInfo { ... # translate the Store data to XML ... return $translatedXml; }
Note: It is the users responsibility to provide methods to generate XML responses for any custom XML-RPC calls (i.e. those called via user written Perl Agents and implemented in custom Collectors).
TranslateUpdateData()
TranslateInfo()
TranslateDeviceList()
TranslateDeviceInfo()
TranslateAssociatedAddresses()
TranslateInventory()
TranslateEntities()
TranslateMplsInterfaces()
new()
The Store constructor
- Arguments
classname: the Store class name
- Return Value
returns the blessed object reference
Initialise()
Initialises the Store object with the supplied name and description
- Arguments
collectorName: String reference holding collectors name. If NULL then ITNM will not process this collectors data.
collectorDescr: String reference holding collectors description
- Return Value
returns 1 if initialised ok, else 0
GetCollectorName()
Access function for the collector name associated with this store
- Arguments
none
- Return Value
returns the collector name
GetCollectorDescription()
Access function for the collector description associated with this store
- Arguments
none
- Return Value
returns the collector description
GetDebugLevel()
Access function for the collector debug level associated with this store
- Arguments
none
- Return Value
returns the debug level
SetupDataSources()
Sets up the data source store for each supplied data source (usually just one).
A single Collector may potentially support multiple data sources, and this module needs to ensure that the data of different sources is kept distinct.
See also
UpdateDataSourceEmsData()
to aid with cases where certain data is not available when the datasource is initially set up.
- Arguments
sourceSpec: Reference to a list of hashes, each holding a data source specification. Valid hash fields are;
Id (integer) Id unique within the Collector to represent the data source Descr (string) Description of the data source EmsHost (string) Host of source EMS. Can be the DNS name or an IPv4 address EmsName (string) Name of source EMS EmsVersion (string) Version of source EMS EmsIdentifier (string) Identifier of EMS EmsRole (string) Ems role. Valid values are; unknown primary backup other EmsStatus (string) Ems status. Valid values are; unknown up down other- Return Value
none
UpdateDataSourceEmsData()
Allows the EMS related felds of an existing data source to be updated. This helps in cases where EMS information is not complete when the datasources are initially setup (via SetupDataSources()).
- Arguments
sourceId: The Id of an existing data source.
emsData: A subset of the fields supported by sourceSpec in
SetupDataSources()
. Where present the data (Hash values) in the following fields (hash keys) will overwrite the corresponding values in the esiting data source definition. Where a field is not present the existing value is retained.EmsHost (string) Host of source EMS EmsName (string) Name of source EMS EmsVersion (string) Version of source EMS EmsIdentifier (string) Identifier of EMS EmsRole (string) Ems role. Valid values are; unknown primary backup other EmsStatus (string) Ems status. Valid values are; unknown up down other- Return Value
none
DeleteData()
Deletes the data associated with the supplied data source id
- Arguments
id: The data source id representing the data to be deleted
- Return Value
none
GetNodeStore()
Returns the device data store for the supplied data source id.
- Arguments
id: Data source id
- Return Value
returns a hash reference to the node store
AddDeviceData()
Validates and (if valid) adds the supplied data to the store under the supplied data source id and device identifier.If called on a device that already exists in the store, the fields in 'data' will be added to the existing data, overwriting them if already present.
Note: DeviceIds represent the identifier by which the data source (e.g. EMS) uniquely knows the device. This may differ from the name (BaseName) used for the device, which is intended as a more user friendly name used to reference the device outside of the EMS.
- Arguments
sourceId: The data source to which the device data relates
deviceId: Device id to add device data to. This is the native identifier, i.e. the identifier used by the EMS to refer to the device.
data: Hash reference to the data to add. Valid fields are;
BaseName (string) Device name ManagementIpAddress (string) Address used to manage device Protocol (integer) Address protocol. Valid values are; 0 - Unknown 1 - IPv4 2 - NAT 3 - IPv6 4 - EMS Supplied Address (i.e. the device address that is made available by the data source is not an IP but some other text) SysObjectId (string) RFC1907::sysObjectID SysDescr (string) Description of entity IpForwarding (integer) The IP forwarding capability of the device. See RFC1213-MIB ipForwarding ManagedElementId (string) An optional custom id field to be used when an id is required in addition to the standard 'native' id (see argument deviceId).Note: BaseName or ManagementIpAddress must be present
- Return Value
none
UpdateNode()
Data can be added to an existing node. For example, device X may have been inferred from data for device Y. If a third source, device Z supplies additional data for device X, it can be added to the existing node for device X.
- Arguments
node: An existing node in the store.
newData: Data to merge with the existing node. No validation is performed - if the node already exists, and we are not removing any fields, then it must be valid.
- Return Value
none
GetDeviceData()
Returns the data store for the supplied data source id and device identifier
- Arguments
sourceId: Data source id to get device data from
deviceId: Device id to get device data from
- Return Value
returns a hash reference to the device data
DeleteDeviceData()
Deletes the data store for the supplied data source id and device identifier
- Arguments
sourceId: Data source id to delete device data from
deviceId: Device id to delete device data for
- Return Value
none
AddGeographicLocation()
Adds geographic location to an existing device.
This is returned via the GetDeviceInfo XML-RPC call. The data can also be retrieved locally (for example to copy to another device) using the
GetGeographicLocation()
method.
- Arguments
sourceId: The data source to which the geographic data relates
deviceId: Device id to add geographic data to. This is the native identifier, i.e. the identifier used by the EMS to refer to the device.
data: Hash reference to the data to add. Valid fields are;
locationName (string) Mandatory name to be assigned to a single geographic location collecting one or more devices. longitude (string) Optional longitude (based on WGS84 standard). Mandatory if latitude is supplied. latitude (string) Optional latitude (based on WGS84 standard) Mandatory if longitude is supplied. altitude (string) Optional altitude (based on WGS84 standard) altitudeUnits (string) Optional units of altitude. Mandatory if altitide is supplied. Valid values are: 'Meters' 'Kilometers' 'Centimeters' 'Feet' 'Yards' 'Miles' 'Inches' regionName (string) Optional name to be assigned to a geographic region collecting one or more geographic locations.- Return Value
The affected node, if it was found. and the data was validated. undef otherwise.
GetGeographicLocation()
Returns a copy of the geographic location data, if any, for a device.
The returned data is in a format suitable to be passed in to the
AddGeographicLocation()
method.
- Arguments
sourceId: Data source id to get geographic location data from
deviceId: Device id to get geographic location data from
- Return Value
returns a copy of the geographic location data as a hash ref. undef if none exists
AddInterface()
Validates and (if valid) adds the supplied interface data to the store under the supplied data source id, device id and interfaceKey
It is the responsibility of the calling Collector to ensure that InterfaceKey is unique and used consistently. Usually it will be the ifIndex, but can be a string based InterfaceId.
- Arguments
sourceId: The data source to which the data relates
deviceId: The device to which the data relates
interfaceKey: The key uniquely identifying this interface
data: Hash reference holding interface data, valid fields are;
Port (integer) Port number Card (integer) Card number IfIndex (integer) Interface index, RFC1213::ifIndex InterfaceId (string) Unique string based interface identifier IfDescr (string) Description, as RFC1213::ifDescr IfName (string) Interface name IfType (integer) Type, as RFC1213::ifType IfPhysAddress (string) MAC, as RFC1213::ifPhysAddress IpAddress (string) IP Address configures on interface Subnet (string) Subnet SubnetMask (string) Subnet mask (e.g. 255.255.255.0) NetMask (integer) Net mask (e.g. 24) IfOperStatus (integer) Operational status, as RFC1213::ifOperStatus IfAdminStatus (integer) Admin status, as RFC1213::ifAdminStatusNote: IfIndex or InterfaceId (or both) must exist. Note: IpAddress can alternatively be added via
AddAssocAddress()
.- Return Value
none
GetInterfaces()
Returns the interface data for the supplied data source id and device id
This allows direct access to the interface data held within the store for a given data source and device id.
- Arguments
sourceId: The data source for which to retrieve interface data
deviceId: The device id for which to retrieve interface data
- Return Value
The data returned is a list of interface data entries, where each entry is a hash of the same format as that added by
AddInterface()
GetInterfaceByKey()
This method allows direct access to the interface data held within the store for a given data source, device id and interfaceKey.
Note: The interfaceKey is whatever the calling Collector is using to key the interface data; usually it will be an ifIndex, but can also be a string based interface id.
- Arguments
sourceId: The data source for which to retrieve interface data
deviceId: The device id for which to retrieve interface data
interfaceKey: The key uniquely identifying this interface (e.g. the IfIndex)
- Return Value
The data returned is a list of interface data entries, where each entry is a hash of the same format as that added by
AddInterface()
AddEntity()
Validates and (if valid) adds the supplied entity data to the store under the supplied data source id and device id.
This method supports entity data in an ENTITY-MIB style or a more generic style. The main difference is that the ENTITY-MIB style uses indexes to identify the entity and parent, while the generic method uses names.
- Arguments
sourceId: The data source to which the data relates
deviceId: The device to which the data relates
data: Hash reference holding entity data, valid fields are;
(Keys applicable to both ENTITY-MIB style and generic style entity data)EntPhysName (string) The name of the entity. If ENTITY-MIB style is used then it is the equivalent of entPhysicalName. EntPhysDescr (string) Entity description. If ENTITY-MIB style is used then it is the equivalent of entPhysicalDescr. EntPhysAlias (string) Entity alias value. If ENTITY-MIB style is used then it is the equivalent of entPhysicalAlias. EntPhysParentRelPos (integer) The relative position of the entity within the parent. If ENTITY-MIB style is used then it is the equivalent of entPhysicalParentRelPos. EntHwRevision (string) Entity hardware version. If ENTITY-MIB style is used then it is the equivalent of entPhysicalHardwareRev. EntSwRevision (string) Entity software version. If ENTITY-MIB style is used then it is the equivalent of entPhysicalSoftwareRev. EntFwRevision (string) Entity firmware version. If ENTITY-MIB style is used then it is the equivalent of entPhysicalFirmwareRev. EntSerialNumber (string) Entity serial number. If ENTITY-MIB style is used then it is the equivalent of entPhysicalSerialNum. IfIndex (integer) An optional interface index value representing the interface data associated with entity port data. Specifying this value provides fine control over how Disco associated port entity data with interface data and may improve performance. InterfaceId (string) An optional interface id value representing the interface data associated with entity port data. Specifying this value provides fine control over how Disco associated port entity data with interface data and may improve performance.(Keys applicable to ENTITY-MIB style data only)EntPhysicalIndex (integer) as ENTITY-MIB::entPhysicalIndex EntPhysClass (integer) as ENTITY-MIB::entPhysicalClass EntPhysContainedIn (integer) as ENTITY-MIB::entPhysicalContainedIn EntPhysVendorType (string) as ENTITY-MIB::entPhysicalVendorType(Keys applicable to generic style data only)EntParent (string) The name of the parent entity (i.e. matches the EntPhysName of another entity) EntPhysType (integer) The entity type (based on the CDM 'type') Supported values are; 0 : Other 1 : Unknown 2 : Chassis 3 : Backplane 4 : Slot 5 : Power Supply 6 : Fan 7 : Sensor 8 : Module 9 : Port 10 : RackFor ENTITY-MIB style data both EntPhysicalIndex and EntPhysClass must be present.
For generic style data EntPhysName and EntPhysType must be present.
- Return Value
none
GetEntityList()
Returns the entity data for the supplied data source id and device id
This allows direct access to the entity data held within the store for a given data source and device id.
- Arguments
sourceId: The data source for which to retrieve the entity data
deviceId: The device id for which to retrieve the entity data list
- Return Value
The data returned is a list of entity data entries, where each entry is a hash of the same format as that added by
AddEntity()
ResolveAssociatedAddresses()
Builds the associated address list based on the existing interface data. If deviceId is not specified then this method resolves the associated addresses for all devices known to the data source.
- Arguments
sourceId: The data source to which the data relates
deviceId: The device to which the data relates
- Return Value
none
ResolveDeviceAddresses()
Builds the associated address list based on the existing interface data.
- Arguments
sourceId: The data source to which the data relates
deviceId: The device to which the data relates
- Return Value
one
AddAssocAddress()
Validates and (if valid) adds the supplied address data to the store under the supplied data source id, device id and ifIndex.
This method can be used as an alternative to adding address information to the interface data supplied to
AddInterface()
.
- Arguments
sourceId: The data source to which the data relates
deviceId: The device to which the data relates
interfaceKey: The key identifying the interface to which the data relates
data: Hash reference holding address data, valid fields are;
IfIndex (integer) RFC1213::ifIndex InterfaceId (string) Interface identifier IfOperStatus (integer) RFC1213::ifOperStatus IpAddress (string) The addressIpAddress and IfOperStatus must be present.
Either or both of IfIndex and InterfaceId must be present.
- Return Value
none
GetConfiguredAddresses()
Returns the addresses configured on the supplied data source id and device id. This data is a simplified version of that provided by
GetAssocAddresses()
, and is of use when a quick 'does this ip exist' check is required.
- Arguments
sourceId: Data source id to get data from
deviceId: Device id to get data from
- Return Value
returns a hash reference to the address data for the device; key is IpAddress, data is ifOperStatus
GetAssocAddresses()
Returns the address data for the supplied data source id and device id
This allows direct access to the associated address data held within the store for a given data source and device id.
- Arguments
sourceId: The data source for which to retrieve the address data
deviceId: The device id for which to retrieve the address data
- Return Value
The data returned is a hash, keyed on the interface key originally used to add the data. Each value consists of a list of hashes, each of which is of the same format as that added using the
AddAssocAddress()
method.
GetAssocAddress()
Returns the address data for the supplied data source id, device id and port.
This allows direct access to the associated address data held within the store for a given data source, device id and interface key.
- Arguments
sourceId: The data source for which to retrieve the address data
deviceId: The device id for which to retrieve the address data
interfaceKey: The key identifying the interface for which data is required
- Return Value
The data returned is an array of hashes, each reflecting the hash added for this device/interface by the
AddAssocAddress()
method.
Validates and (if valid) adds the supplied vpn data to the store under the supplied data source id, device id.
- Arguments
sourceId: The data source to which the data relates
deviceId: The device to which the data relates
data: Hash reference holding the VPN data to add. Valid fields are;
VPNName (string) VPN Name VRFName (string) Name of VRF used to implement the VPN RD (string) Route distinguisher Status (integer) VPN status: 1=up, 2=down Description (string) VPN description ImportRTs (list) A list of strings. Each string being an imported Route Target. ExportRTs (list) A list of strings. Each string being an exported Route Target. Interfaces (hash) A hash of hashes representing the interfaces on which the VPN is configured. Hash Key: ifIndex or InterfaceId Hash Value: a hash of the form described in AddL3VpnInterface()VRFName must exist.
- Return Value
none
Validates and (if valid) adds the supplied vpn interface data to the store under the supplied data source id, device id and vpn name
- Arguments
sourceId: The data source to which the data relates
deviceId: The device to which the data relates
interfaceKey: Key of the interface to add data to
vpnName: VPN to add data to
interface: Hash reference holding data, valid fields are;
IfIndex (integer) RFC1213::ifIndex InterfaceId (string) Unique interface identifier CEAddress (string) Address of the Customer Edge (CE) device connected to ifIndex Protocol (string) Textual description of PE-CE protocol CustomerName (string) Name of connected customer, if known CustomerDescr (string) Customer description, if knonwEither or both IfIndex and InterfaceId must be present.
- Return Value
none
Validates and (if valid) adds the supplied VPN RT data to the store under the supplied data source id, device id and VPN name.
- Arguments
sourceId: The data source to which the data relates
deviceId: The device to which the data relates
vpnName: VPN to add data to
rt: Route target to add
rtType: Route target type, i.e.
import(1)
,export(2)
orboth(3)
.- Return Value
none
Returns the vpn data for the supplied data source id, device id
This allows direct access to the VPN data held within the store for a given data source and device id.
- Arguments
sourceId: The data source for which to retrieve the VPN data
deviceId: The device id for which to retrieve the VPN data
- Return Value
The data returned is a hash of the following form;
Key: VPN name Value: Hash of the following format:
VPNName (string) As added by AddL3Vpn() VRFName (string) As added by AddL3Vpn() RD (string) As added by AddL3Vpn() Status (integer) As added by AddL3Vpn() Description (string) As added by AddL3Vpn() ImportRTs (list of strings) As added by AddL3VpnRouteTarget() ExportRTs (list of strings) As added by AddL3VpnRouteTarget() Interfaces (hash of hashes) Key: IfIndex or InterfaceId Value: same as that added in AddL3VpnInterface()
Returns the vpn data for the supplied data source id, device id and vpn name.
This allows direct access to the VPN data held within the store for a given data source, device id and VPN.
- Arguments
sourceId: The data source for which to retrieve the VPN data
deviceId: The device id for which to retrieve the VPN data
vpn: The VPN name for which to retrieve VPN data
- Return Value
Returns a hash reference to the vpn data for the device/vpn. The data returned is a hash of the following form:
VPNName (string) As added by AddL3Vpn() VRFName (string) As added by AddL3Vpn() RD (string) As added by AddL3Vpn() Status (integer) As added by AddL3Vpn() Description (string) As added by AddL3Vpn() ImportRTs (list of strings) As added by AddL3VpnRouteTarget() ExportRTs (list of strings) As added by AddL3VpnRouteTarget() Interfaces (hash of hashes) Key: IfIndex or InterfaceId Value: same as that added in AddL3VpnInterface()
Validates and (if valid) adds the supplied vpn data to the store under the supplied data source id, device id.
- Arguments
sourceId: The data source to which the data relates
deviceId: The device to which the data relates
data: Hash reference holding the VPN data to add. Valid fields are;
VPNName (string) VPN name VCID (string) Virtual Circuit Id VCType (integer) Virtual Circuit type. Valid values are; 0=invalid, 1= framerelay, 2=atm aal5 vcc, 3=atm trans, 4=vlan, 5=Ethernet, 6=hdlc, 7=ppp, 8=cep, 9=atm vcc, 10=atm vpl, 11 vpls Usually a VPLS VPN will be type 11 and a VPWS type 5. IfIndex (integer) RFC1213::ifIndex InterfaceId (string) String based interface identifier LocalLabel (integer) Label imposed for local->remote LSP PeerIp (string) IP address of remote device PeerIfIndex (integer) IfIndex on the remote device PeerInterfaceId (string) Interface identifier on the remote device PeerLabel (integer) Label imposed for remote->local LSP VPNType (integer) Valid VPN types are; 0=invalid, 1=other, 2=bgp ip, 3=bgp layer 2, 4=bgp vpls. 5=l2 circuit, 6=ldp vpls, 7=optical, 8=vp ocx, 9=ccc, 10=atm So, for VPLS the type should be 4 or 6, and for VPWS the type should be 3 or 5. Status (integer) VPN state. Valid values are; 0=unknown, 1=down, 2=upEither or both IfIndex and InterfaceId must be present
- Return Value
none
Returns the vpn data for the supplied data source id, device id and vpn name
This allows direct access to the VPN data held within the store for a given data source and device id.
- Arguments
sourceId: The data source for which to retrieve the VPN data
deviceId: The device id for which to retrieve the VPN data
- Return Value
The data returned is a list hashes, each of the same format as the data added in AddL2Vpn()
AddMplsInterface()
Validates and (if valid) adds the supplied mpls interface data to the store under the supplied data source id, device id.
This method marks an interface as being capable of forwarding MPLS label data; i.e. that it is considered an MPLS Core device/interface.
- Arguments
sourceId: The data source to which the data relates
deviceId: The device to which the data relates
data: Hash reference holding mpls data, valid fields are;
IfIndex (integer) RFC1213::ifIndex InterfaceId (string) String value that uniquely identifies the interface on the deviceIfIndex and/or InterfaceId must be present.
- Return Value
none
GetMplsInterfaces()
Returns the mpls interface data for the supplied data source id and device id
- Arguments
sourceId: Data source id to get data from
deviceId: Device id to get data from
- Return Value
returns a list reference to the mpls interface data for the device
AddConnection()
Validates and (if valid) adds the supplied link data to the store under the supplied data source id, device id for the appropriate topology.
- Arguments
sourceId: The data source to which the data relates
deviceId: The device to which the data relates
topology: Mandatory topology. Currently allowed values are: 'Layer1' (returned via GetLayer1Connections RPC call) 'Layer2' (returned via GetLayer2Connections RPC call) 'Layer3' (returned via GetLayer3Connections RPC call) 'Microwave' (returned via GetConnections('Microwave') RPC call) 'RAN' (returned via GetConnections('RAN') RPC call)
data: Hash reference holding link data, valid fields are;
SourceInterfaceId (string) Source device interface identifier SourceIfIndex (integer) Source device RFC1213::ifIndexDestination (string) Mandatory destination device name or IP DestinationInterfaceId (string) Destination device interface identifier DestinationIfIndex (integer) Destination device RFC1213::ifIndexUnidirectional (integer) Directionality of link. Allowed values are: 0 = bi-directional (default if not supplied) 1 = unidirectionalDestination is a mandatory field.
- Return Value
none
GetConnections()
Allows direct access to the link data at a given topology level, held within the store for a given data source and device id.
- Arguments
sourceId: The data source for which to retrieve the link data
deviceId: The device id for which to retrieve the link data
topology: The topology type. Currently allowed values are: 'Layer1' (handled by CollectorLayer1 agent) 'Layer2' (handled by CollectorLayer2 agent) 'Layer3' (handled by CollectorLayer3 agent) 'Microwave' (handled by CollectorLayer1 agent)
- Return Value
The data returned is a list hashes of the same format as the data added in
AddConnection()
Validates and (if valid) adds the supplied link data to the store under the supplied data source id, device id.
This is deprecated.
AddConnection()
should be used in preference.
- Arguments
sourceId: The data source to which the data relates
deviceId: The device to which the data relates
data: Hash reference holding link data, valid fields are;
SourceName (string) Source device name SourceIfIndex (integer) Source device RFC1213::ifIndex SourceInterfaceId (string) Source device interface identifier DestinationIP (string) Destination device name DestinationIfIndex (integer) Destination device RFC1213::ifIndex DestinationInterfaceId (string) Destination device interface identifierSourceName and DestinationIP must exist.
- Return Value
none
Allows direct access to the link data held within the store for a given data source and device id.
This is deprecated.
GetConnections()
should be used in preference.
- Arguments
sourceId: The data source for which to retrieve the link data
deviceId: The device id for which to retrieve the link data
- Return Value
The data returned is a list hashes of the same format as the data added in AddLayer3Connection() or
AddConnection()
with topology = 'Layer3'
Validates and (if valid) adds the supplied link data to the store under the supplied data source id, device id.
This is deprecated.
AddConnection()
should be used in preference.
- Arguments
sourceId: The data source to which the data relates
deviceId: The device to which the data relates
data: Hash reference holding link data, valid fields are;
SourceName (string) Source device name SourceIfIndex (integer) Source device RFC1213::ifIndex SourceInterfaceId (string) Source device interface identifier DestinationIP (string) Destination device IP DestinationName (string) Destination device name (if DestinationIP not specified) DestinationIfIndex (integer) Destination device RFC1213::ifIndex DestinationInterfaceId (string) Destination device interface identifierSourceName and DestinationName (or DestinationIP) must exist.
Do not specify both DestinationIP and DestinationName as these both populate the same XML tag.
- Return Value
none
Allows direct access to the link data held within the store for a given data source and device id.
This is deprecated.
GetConnections()
should be used in preference.
- Arguments
sourceId: The data source for which to retrieve the link data
deviceId: The device id for which to retrieve the link data
- Return Value
The data returned is a list hashes of the same format as the data added in AddLayer2Connection() or
AddConnection()
with topology = 'Layer2'
Validates and (if valid) adds the supplied link data to the store under the supplied data source id, device id.
This is deprecated.
AddConnection()
should be used in preference.
- Arguments
sourceId: The data source to which the data relates
deviceId: The device to which the data relates
data: Hash reference holding link data, valid fields are;
SourceName (string) Source device name SourceIfIndex (integer) Source device RFC1213::ifIndex SourceInterfaceId (string) Source device interface identifier DestinationIP (string) Destination device IP DestinationName (string) Destination device name (if DestinationIP not specified) DestinationIfIndex (integer) Destination device RFC1213::ifIndex DestinationInterfaceId (string) Destination device interface identifier Unidirectional (integer) Directionality of link (0=bi-directional, 1=unidirectional)SourceName and DestinationName (or DestinationIP) must exist.
Do not specify both DestinationIP and DestinationName as these both populate the same XML tag.
- Return Value
none
Allows direct access to the link data held within the store for a given data source and device id.
This is deprecated.
GetConnections()
should be used in preference.
- Arguments
sourceId: The data source for which to retrieve the link data
deviceId: The device id for which to retrieve the link data
- Return Value
The data returned is a list hashes of the same format as the data added in AddLayer1Connection() or
AddConnection()
with topology = 'Layer1'
AddExtraInfo()
Add to the ExtraInfo field of a node in the store. ExtraInfo is returned in the generic data by the RPC calls such as
GetDeviceInfo()
,GetEntities()
, etc.
- Arguments
destinationHash: A node within the store at which to add the new ExtraInfo
newFieldName: Name of the new field to be added to ExtraInfo
newFieldValue: Value of the new field to be added to ExtraInfo
- Return Value
returns a reference to the updated destination hash
AddCustomData()
Add to the CustomData field of a node in the store. Add freeform data via this method when you don't want it returns alongside the standard entity data (as would happen with freeform data added via AddExtraInfo()).
only if explcitly retrieved using
GetFunctionData()
- Arguments
destinationHash: A node within the store at which to add the new data
newFieldName: Name of the new field to be added to CustomData
newFieldValue: Value of the new field to be added to CustomData
- Return Value
returns a reference to the current custom data hash
DeviceName()
When adding relationships between devices, it is necessary to know the device name, which is not necessarily the same as the deviceId.
Some collector implementations may want to override this functionality, but will need to ensure that the stitchers handle the data appropriately.
- Arguments
sourceId: Data source id holding the device
deviceId: Device id to use in the name
- Return Value
returns the device name (or undef on failure)
InterfaceName()
When adding relationships between interfaces, it is necessary to know the interface name. This default implementation gives it as the base device name and the interfaceId.
Some collector implementations may want to override this functionality, but will need to ensure that the stitchers handle the data appropriately.
- Arguments
sourceId: Data source id holding the device
deviceId: Device id to use in the name
interfaceId: Interface id to use in the name
- Return Value
returns the interface name (or undef on failure)
DeviceCollects()
Add a dependency relationship to a device
- Arguments
sourceId: Data source id holding the device
deviceId: Device id to add the relationship to
collectedDataHashRef: Hash reference to the collectd data to add. Valid fields are;
m_EntityName (string) Device name m_DeviceId (string) Device IDm_InterfaceId (string) Interface ID on the device m_IfIndex (string) Interface ifIndex on the device m_TrxId (string) Transceiver ID on the devicem_Sequence (integer) Valid only for collects relationshipNote: m_EntityName and m_DeviceId are mutually exclusive, but one must be present
Note: m_InterfaceId, m_IfIndex and m_TrxId are mutually exclusive and optional
Note: m_EntityName vs m_DeviceId. If a device has multiple sources, be that multiple collectors, or SNMP plus a collector, it is not guaranteed that the BaseName for it in one collector is used as the final entityName. Using the deviceId, which is unique within the context of a single collector, resolves this problem. If a device has a single source, though, or the names are consistent across sources, use of entityName is more efficient.
- Return Value
none
InterfaceCollects()
Add a dependency relationship to an interface
- Arguments
sourceId: Data source id holding the device
deviceId: Device containing the interface
interfaceId: Interface id to add the relationship to
collectedDataHashRef: Hash reference to the collectd data to add. Valid fields are;
m_EntityName (string) Device name m_DeviceId (string) Device IDm_InterfaceId (string) Interface ID on the device m_IfIndex (string) Interface ifIndex on the device m_TrxId (string) Transceiver ID on the devicem_Sequence (integer) Valid only for collects relationshipNote: m_EntityName and m_DeviceId are mutually exclusive, but one must be present
Note: m_InterfaceId, m_IfIndex and m_TrxId are mutually exclusive and optional
Note: m_EntityName vs m_DeviceId. If a device has multiple sources, be that multiple collectors, or SNMP plus a collector, it is not guaranteed that the BaseName for it in one collector is used as the final entityName. Using the deviceId, which is unique within the context of a single collector, resolves this problem. If a device has a single source, though, or the names are consistent across sources, use of entityName is more efficient.
- Return Value
onne
DeviceHosts()
Add a hostedService relationship to a device
- Arguments
sourceId: Data source id holding the device
deviceId: Device id to add the relationship to
hostedServiceName: The name of the hosted service
hostedDataHashRef: Hash reference to the hosted service data to add. Valid fields are;
m_EntityName (string) Device name m_DeviceId (string) Device IDm_InterfaceId (string) Interface ID on the device m_IfIndex (string) Interface ifIndex on the device m_TrxId (string) Transceiver ID on the deviceNote: m_EntityName and m_DeviceId are mutually exclusive, but one must be present
Note: m_InterfaceId, m_IfIndex and m_TrxId are mutually exclusive and optional
Note: m_EntityName vs m_DeviceId. If a device has multiple sources, be that multiple collectors, or SNMP plus a collector, it is not guaranteed that the BaseName for it in one collector is used as the final entityName. Using the deviceId, which is unique within the context of a single collector, resolves this problem. If a device has a single source, though, or the names are consistent across sources, use of entityName is more efficient.
- Return Value
none
InterfaceHosts()
Add a hostedService relationship to an interface
- Arguments
sourceId: Data source id holding the device
deviceId: Device containing the interface
interfaceId: Interface id to add the relationship to
hostedDataHashRef: Hash reference to the hosted service data to add. Valid fields are;
m_EntityName (string) Device name m_DeviceId (string) Device IDm_InterfaceId (string) Interface ID on the device m_IfIndex (string) Interface ifIndex on the device m_TrxId (string) Transceiver ID on the deviceNote: m_EntityName and m_DeviceId are mutually exclusive, but one must be present
Note: m_InterfaceId, m_IfIndex and m_TrxId are mutually exclusive and optional
Note: m_EntityName vs m_DeviceId. If a device has multiple sources, be that multiple collectors, or SNMP plus a collector, it is not guaranteed that the BaseName for it in one collector is used as the final entityName. Using the deviceId, which is unique within the context of a single collector, resolves this problem. If a device has a single source, though, or the names are consistent across sources, use of entityName is more efficient.
- Return Value
none
DeviceDependency()
Add a dependency relationship to a device
- Arguments
sourceId: Data source id holding the device
deviceId: Device id to add the relationship to
dependentDataHashRef: Hash reference to the related data to add. Valid fields are;
m_EntityName (string) Device name m_DeviceId (string) Device IDm_InterfaceId (string) Interface ID on the device m_IfIndex (string) Interface ifIndex on the device m_TrxId (string) Transceiver ID on the devicem_DependencyType (integer) Valid only for dependency relationshipNote: m_EntityName and m_DeviceId are mutually exclusive, but one must be present
Note: m_InterfaceId, m_IfIndex and m_TrxId are mutually exclusive and optional
Note: m_EntityName vs m_DeviceId. If a device has multiple sources, be that multiple collectors, or SNMP plus a collector, it is not guaranteed that the BaseName for it in one collector is used as the final entityName. Using the deviceId, which is unique within the context of a single collector, resolves this problem. If a device has a single source, though, or the names are consistent across sources, use of entityName is more efficient.
- Return Value
none
InterfaceDependency()
Add a dependency relationship to an interface
- Arguments
sourceId: Data source id holding the device
deviceId: Device containing the interface
interfaceId: Interface id to add the relationship to
dependentDataHashRef: Hash reference to the related data to add. Valid fields are;
m_EntityName (string) Device name m_DeviceId (string) Device IDm_InterfaceId (string) Interface ID on the device m_IfIndex (string) Interface ifIndex on the device m_TrxId (string) Transceiver ID on the devicem_DependencyType (integer) Valid only for dependency relationshipNote: m_EntityName and m_DeviceId are mutually exclusive, but one must be present
Note: m_InterfaceId, m_IfIndex and m_TrxId are mutually exclusive and optional
Note: m_EntityName vs m_DeviceId. If a device has multiple sources, be that multiple collectors, or SNMP plus a collector, it is not guaranteed that the BaseName for it in one collector is used as the final entityName. Using the deviceId, which is unique within the context of a single collector, resolves this problem. If a device has a single source, though, or the names are consistent across sources, use of entityName is more efficient.
- Return Value
none
AddGenericRelationship()
Add a relationship (collects, contains, dependency, hostedService)
- Arguments
owningEntityHashRef: Reference to a hash ref within the store. The relationship will be added to this hash, which represents the entity that owns the relationship
relationshipName: String identifying the type of relationship. Allowed values are: collects - owning entity collects the related data entity contains - owning entity contains the related data entity dependency - related data entity depends on the owning entity hostedService - owning entity hosts the related data service
relatedDataHashRef: Hash reference to the related data to add. Valid fields are;
m_EntityName (string) Device name m_DeviceId (string) Device IDm_InterfaceId (string) Interface ID on the device m_IfIndex (string) Interface ifIndex on the device m_TrxId (string) Transceiver ID on the devicem_Sequence (integer) Valid only for collects relationship m_UpwardsConnection (integer) Valid only for contains relationship m_DependencyType (integer) Valid only for dependency relationshipNote: m_EntityName and m_DeviceId are mutually exclusive, but one must be present
Note: m_InterfaceId, m_IfIndex and m_TrxId are mutually exclusive and optional
Note: m_EntityName vs m_DeviceId. If a device has multiple sources, be that multiple collectors, or SNMP plus a collector, it is not guaranteed that the BaseName for it in one collector is used as the final entityName. Using the deviceId, which is unique within the context of a single collector, resolves this problem. If a device has a single source, though, or the names are consistent across sources, use of entityName is more efficient.
checkForDuplicates: Optional. Interger default to 1. If value is 1 then if the relatedDataHasRef has already been added to the relationship then a warning will be produced and the duplicate will not be added. If 0, no check will be made for duplicates allowing duplicates to be added.
Note: checkForDuplicates performs a linear search of the relationships converting each hash to a string and therefore could impact performance.
- Return Value
none
TranslateUpdateData()
Builds the response to the
UpdateData()
RPC call.Note Store data is required for this particular call as there is a simple standard response for the
UpdateData()
call:<updateResponse></updateResponse>
- Arguments
none
- Return Value
returns data as a ITNM XML-RPC compatible XML response string
TranslateInfo()
Builds the response to the
GetInfo()
RPC call using the store data.See the Collector Developer Guide for precise information regarding the format of the XML response.
The Store held data is used to construct the XML response as follows:
+----------------------+-------------------+-------------------------+ | Store Field | XML Tag Populated | Store Data Origin | +----------------------+-------------------+-------------------------+ | CollectorName | <name> | Initialise() | | CollectorDescr | <descr> | Initialise() | | Id | <id> | SetupDataSources() | | Descr | <descr> | SetupDataSources() | +----------------------+-------------------+-------------------------+
- Arguments
none
- Return Value
returns data as a ITNM XML-RPC compatible XML response string
TranslateDeviceList()
Builds the response to the
GetDeviceList()
RPC call using the Store data.See the Collector Developer Guide for precise information regarding the format of the XML response.
The Store held data is used to construct the XML response as follows:
+----------------------+-------------------+-------------------------+ | Store Field | XML Tag Populated | Store Data Origin | +----------------------+-------------------+-------------------------+ | BaseName | <id> | AddDeviceData() | | ManagementIpAddress | <ip> | AddDeviceData() | | AddressSpace | <addressSpace> | AddDeviceData() | | Protocol | <protocol> | AddDeviceData() | | ManagedElementId | <meId> | AddDeviceData() | +----------------------+-------------------+-------------------------+
- Arguments
sourceId(int): Data source id of relevant data
reqType(int): Request type (0=full,1=single,2=subnet)
address(string): address (or subnet) to return list for. May be ''
mask(string): '' or the mask of the subnet required
- Return Value
returns data as a ITNM XML-RPC compatible XML response string
IsInSubnet()
Checks to see if the supplied IP address lies in the range of addresses covered by the supplied subnet and mask
- Arguments
ip(string): Ip address to test
subnet(string): Subnet to check against
mask(string): Subnet mask to check against
- Return Value
returns 1 if ip is within subnet/mask, else 0
TranslateDeviceInfo()
Builds the response to the
GetDeviceInfo()
RPC call using the Store data.See the Collector Developer Guide for precise information regarding the format of the XML response.
The Store held data is used to construct the XML response as follows:
+----------------------+-------------------+-------------------------+ | Store Field | XML Tag Populated | Store Data Origin | +----------------------+-------------------+-------------------------+ | BaseName | <name> | AddDeviceData() | | Protocol | <protocol> | AddDeviceData() | | SysObjectId | <sysObjectId> | AddDeviceData() | | SysDescr | <descr> | AddDeviceData() | | SysName | <sysName> | AddDeviceData() | | IpForwarding | <ipForwarding> | AddDeviceData() | | ExtraInfo | <extraInfo> | AddDeviceData() | | | | AddGeographicLocation() | | | | AddExtraInfo() | +----------------------+-------------------+-------------------------+
- Arguments
sourceId(int): Data source id of relevant data
deviceId(string): Device for which to get data
- Return Value
returns data as a ITNM XML-RPC compatible XML response string
TranslateInventory()
Builds the response to the
GetInventory()
RPC call using the Store data.See the Collector Developer Guide for precise information regarding the format of the XML response.
The Store held data is used to construct the XML response as follows:
+----------------------+-------------------+-------------------------+ | Store Field | XML Tag Populated | Store Data Origin | +----------------------+-------------------+-------------------------+ | Port | <port> | AddInterface() | | Card | <card> | AddInterface() | | IfIndex | <ifIndex> | AddInterface() | | InterfaceId | <interfaceId> | AddInterface() | | IfDescr | <ifDescr> | AddInterface() | | IfName | <ifName> | AddInterface() | | IfType | <ifType> | AddInterface() | | IfPhysAddress | <ifPhysAddress> | AddInterface() | | IpAddress | <ipAddress> | AddInterface() | | | | or AddAssocAddress() | | Subnet | <subnet> | AddInterface() | | SubnetMask | <subnetMask> | AddInterface() | | NetMask | <netMask> | AddInterface() | | IfOperStatus | <ifOperStatus> | AddInterface() | | IfAdminStatus | <ifAdminStatus> | AddInterface() | +----------------------+-------------------+-------------------------+
- Arguments
sourceId(int): Data source id of relevant data
deviceId(string): Device for which to get data
- Return Value
returns data as a ITNM XML-RPC compatible XML response string
TranslateEntities()
Builds the response to the
GetEntities()
RPC call using the Store data.See the Collector Developer Guide for precise information regarding the format of the XML response.
The Store held data is used to construct the XML response as follows:
+----------------------+-------------------+-------------------------+ | Store Field | XML Tag Populated | Store Data Origin | +----------------------+-------------------+-------------------------+ | EntPhysName | <name> | AddEntity() | | EntPhysDescr | <descr> | AddEntity() | | EntPhysAlias | <alias> | AddEntity() | | EntPhysParentRelPos | <parentRelPos> | AddEntity() | | EntHwRevision | <hwRev> | AddEntity() | | EntSwRevision | <swRev> | AddEntity() | | EntFwRevision | <fwRev> | AddEntity() | | EntSerialNumber | <serialNumber> | AddEntity() | | EntPhysicalIndex | <index> | AddEntity() | | EntPhysClass | <class> | AddEntity() | | EntPhysContainedIn | <containedIn> | AddEntity() | | EntPhysVendorType | <vendorType> | AddEntity() | | EntParent | <parent> | AddEntity() | | EntPhysType | <cdmType> | AddEntity() | +----------------------+-------------------+-------------------------+
- Arguments
sourceId(int): Data source id of relevant data
deviceId(string): Device for which to get data
- Return Value
returns data as a ITNM XML-RPC compatible XML response string
TranslateAssociatedAddresses()
Builds the response to the
GetAssociatedAddresses()
RPC call using the Store data.See the Collector Developer Guide for precise information regarding the format of the XML response.
The Store held data is used to construct the XML response as follows:
+----------------------+-------------------+-------------------------+ | Store Field | XML Tag Populated | Store Data Origin | +----------------------+-------------------+-------------------------+ | IfIndex | <ifIndex> | AddAssocAddress() | | InterfaceId | <interfaceId> | AddAssocAddress() | | IfOperStatus | <ifOperStatus> | AddAssocAddress() | | IpAddress | <ipAddress> | AddAssocAddress() | +----------------------+-------------------+-------------------------+
- Arguments
sourceId(int): Data source id of relevant data
deviceId(string): Device for which to get data
- Return Value
returns data as a ITNM XML-RPC compatible XML response string
Builds the response to the GetLayer3Vpns() RPC call using the Store data.
See the Collector Developer Guide for precise information regarding the format of the XML response.
The Store held data is used to construct the XML response as follows:
+----------------------+-------------------+-------------------------+ | Store Field | XML Tag Populated | Store Data Origin | +----------------------+-------------------+-------------------------+ | VPNName | <vpnName> | AddL3Vpn() | | VRFName | <vrfName> | AddL3Vpn() | | RD | <rd> | AddL3Vpn() | | Status | <status> | AddL3Vpn() | | Description | <descr> | AddL3Vpn() | | ImportRTs | <importRTs> | AddL3VpnRouteTarget() | | ExportRTs | <exportRTs> | AddL3VpnRouteTarget() | | Interfaces | <interfaces> | AddL3VpnInterface() | | ->IfIndex | <ifIndex> | AddL3VpnInterface() | | ->InterfaceId | <interfaceId> | AddL3VpnInterface() | | ->CEAddress | <ceIp> | AddL3VpnInterface() | | ->Protocol | <protocol> | AddL3VpnInterface() | | ->CustomerName | <customername> | AddL3VpnInterface() | | ->CustomerDescr | <customerDescr> | AddL3VpnInterface() | +----------------------+-------------------+-------------------------+
- Arguments
sourceId(int): Data source id of relevant data
deviceId(string): Device for which to get data
- Return Value
returns data as a ITNM XML-RPC compatible XML response string
Builds the response to the GetLayer2Vpns() RPC call using the Store data.
See the Collector Developer Guide for precise information regarding the format of the XML response.
The Store held data is used to construct the XML response as follows:
+----------------------+-------------------+-------------------------+ | Store Field | XML Tag Populated | Store Data Origin | +----------------------+-------------------+-------------------------+ | VPNName | <vpnName> | AddL2Vpn() | | VCID | <vcId> | AddL2Vpn() | | VCType | <vcType> | AddL2Vpn() | | IfIndex | <localIfIndex> | AddL2Vpn() | | InterfaceId | <localInterfaceId>| AddL2Vpn() | | LocalLabel | <localLabel> | AddL2Vpn() | | PeerIp | <peerIp> | AddL2Vpn() | | PeerIfIndex | <peerIfIndex> | AddL2Vpn() | | PeerInterfaceId | <peerInterfaceId> | AddL2Vpn() | | PeerLabel | <peerLabel> | AddL2Vpn() | | VPNType | <topologyType> | AddL2Vpn() | | Status | <status> | AddL2Vpn() | +----------------------+-------------------+-------------------------+
- Arguments
sourceId(int): Data source id of relevant data
deviceId(string): Device for which to get data
- Return Value
returns data as a ITNM XML-RPC compatible XML response string
TranslateMplsInterfaces()
Builds the response to the
GetMplsInterfaces()
RPC call using the Store data.See the Collector Developer Guide for precise information regarding the format of the XML response.
The Store held data is used to construct the XML response as follows:
+----------------------+-------------------+-------------------------+ | Store Field | XML Tag Populated | Store Data Origin | +----------------------+-------------------+-------------------------+ | IfIndex | <ifIndex> | AddMplsInterface() | | InterfaceId | <interfaceId> | AddMplsInterface() | +----------------------+-------------------+-------------------------+
- Arguments
sourceId(int): Data source id of relevant data
deviceId(string): Device for which to get data
- Return Value
returns data as a ITNM XML-RPC compatible XML response string
TranslateConnections()
Builds the response to the
GetConnections()
RPC call for a single layer using the Store data.See the Collector Developer Guide for precise information regarding the format of the XML response.
The Store held data is used to construct the XML response as follows:
+------------------------+-------------------+-------------------------+ | Store Field | XML Tag Populated | Store Data Origin | +------------------------+-------------------+-------------------------+ | SourceIfIndex | <srcIfIndex> | AddConnection() | | SourceInterfaceId | <srcInterfaceId> | AddConnection() | | Destination | <dest> | AddConnection() | | DestinationIfIndex | <destIfIndex> | AddConnection() | | DestinationInterfaceId | <destInterfaceId> | AddConnection() | | Unidirectional | <unidirectional> | AddConnection() | +------------------------+-------------------+-------------------------+
- Arguments
sourceId(int): Data source id of relevant data
deviceId(string): Device for which to get data
topology: The topology type. Currently allowed values are: 'Layer1' (handled by CollectorLayer1 agent) 'Layer2' (handled by CollectorLayer2 agent) 'Layer3' (handled by CollectorLayer3 agent) 'Microwave' (handled by CollectorLayer1 agent)
- Return Value
returns data as a ITNM XML-RPC compatible XML response string
Builds the response to the GetLayer3Connections() RPC call using the Store data.
See the Collector Developer Guide for precise information regarding the format of the XML response.
The Store held data is used to construct the XML response as follows:
+------------------------+-------------------+-------------------------+ | Store Field | XML Tag Populated | Store Data Origin | +------------------------+-------------------+-------------------------+ | SourceName | <src> | AddLayer3Connection() | | SourceIfIndex | <srcIfIndex> | AddLayer3Connection() | | SourceInterfaceId | <srcInterfaceId> | AddLayer3Connection() | | Destination | <dest> | AddConnection() | | DestinationIP | <dest> | AddLayer3Connection() | | DestinationIfIndex | <destIfIndex> | AddLayer3Connection() | | DestinationInterfaceId | <destInterfaceId> | AddLayer3Connection() | +------------------------+-------------------+-------------------------+
- Arguments
sourceId(int): Data source id of relevant data
deviceId(string): Device for which to get data
- Return Value
returns data as a ITNM XML-RPC compatible XML response string
Builds the response to the GetLayer2Connections() RPC call using the Store data.
See the Collector Developer Guide for precise information regarding the format of the XML response.
The Store held data is used to construct the XML response as follows:
+------------------------+-------------------+-------------------------+ | Store Field | XML Tag Populated | Store Data Origin | +------------------------+-------------------+-------------------------+ | SourceName | <src> | AddLayer2Connection() | | SourceIfIndex | <srcIfIndex> | AddLayer2Connection() | | SourceInterfaceId | <srcInterfaceId> | AddLayer2Connection() | | Destination | <dest> | AddConnection() | | DestinationIP | <dest> | AddLayer2Connection() | | DestinationIfIndex | <destIfIndex> | AddLayer2Connection() | | DestinationInterfaceId | <destInterfaceId> | AddLayer2Connection() | +------------------------+-------------------+-------------------------+
- Arguments
sourceId(int): Data source id of relevant data
deviceId(string): Device for which to get data
- Return Value
returns data as a ITNM XML-RPC compatible XML response string
Builds the response to the GetLayer1Connections() RPC call using the Store data.
See the Collector Developer Guide for precise information regarding the format of the XML response.
The Store held data is used to construct the XML response as follows:
+------------------------+-------------------+-------------------------+ | Store Field | XML Tag Populated | Store Data Origin | +------------------------+-------------------+-------------------------+ | SourceName | <src> | AddLayer1Connection() | | SourceIfIndex | <srcIfIndex> | AddLayer1Connection() | | SourceInterfaceId | <srcInterfaceId> | AddLayer1Connection() | | DestinationIP | <dest> | AddLayer1Connection() | | Destination | <dest> | AddConnection() | | DestinationIfIndex | <destIfIndex> | AddLayer1Connection() | | DestinationInterfaceId | <destInterfaceId> | AddLayer1Connection() | | Unidirectional | <unidirectional> | AddLayer1Connection() | +------------------------+-------------------+-------------------------+
- Arguments
sourceId(int): Data source id of relevant data
deviceId(string): Device for which to get data
- Return Value
returns data as a ITNM XML-RPC compatible XML response string
PrintDebug()
Prints the supplied text to the screen IF the debug level is not 0
- Arguments
message(string): Message to print if debug is enabled
- Return Value
none
Ian Felstead
Licensed Materials - Property of IBM
"Restricted Materials of IBM"
5724-S45
(C) Copyright IBM Corp. 1997, 2012
IBM Tivoli Network Manager for Optical