Functions

This page provides a list of all TPL functions and is grouped by function type.

Global scope functions

  • sizeReturns the number of items in the collection, where the collection is a list, or a set of nodes retrieved with a search expression.

Log functions

  • log.debugLog the given message with a debug level message. The log messages that are output automatically include the name of the pattern performing the log action.
  • log.infoLog the given message with an info level message. The log messages that are output automatically include the name of the pattern performing the log action.
  • log.warnLog the given message with a warn level message. The log messages that are output automatically include the name of the pattern performing the log action.
  • log.errorLog the given message with an error level message. The log messages that are output automatically include the name of the pattern performing the log action.
  • log.criticalLog the given message with a critical level message. The log messages that are output automatically include the name of the pattern performing the log action.

Text functions

  • text.lowerReturns the lower-cased version of the string argument.
  • text.upperReturns the upper-cased version of the string argument.
  • text.toNumberConverts its string argument into a number.
  • text.replaceReturns a modified version of the string formed by replacing all occurrences of the string old with new.
  • text.splitReturns a list consisting of portions of the string split according to the separator string, where specified.
  • text.stripStrips unwanted characters from the start and end of the given string.
  • text.leftStripEquivalent to text.strip, but only strips from the left side of the string.
  • text.rightStripEquivalent to text.strip, but only strips from the right side of the string.
  • text.hashReturns a hashed form of the string, generated with the MD5 hash algorithm.
  • text.joinReturns a string containing all items in a list of strings joined with the specified separator.

Number functions

Regex functions

  • regex.extractReturns the result of extracting the regular expression from the string, optionally with a substitution expression and a specified result if no match is found.
  • regex.extractAllReturns a list containing all the non-overlapping matches of the pattern in the string.

XPath functions

  • xpath.evaluateReturns the result of evaluating the xpath expression against the XML string.
  • xpath.openDocumentReturns the DOM object resulting from parsing the XML string.
  • xpath.closeDocumentCloses the DOM object resulting from xpath.openDocument.

Table functions

  • tableCreates a new table.
  • table.removeRemoves the specified key from the specified table.

Discovery functions

  • discovery.fileGetRetrieves the specified file.
  • discovery.fileInfoRetrieves information about the specified file, but not the file content.
  • discovery.listDirectoryRetrieves the directory listing of the directory specified by the path on the specified target.
  • discovery.listRegistryReturns a list of the registry entries of the registry key specified by the key_path.
  • discovery.registryKeyRetrieves a registry key from a Windows machine.
  • discovery.wmiQueryPerforms a WMI query on a Windows machine.
  • discovery.runCommandReturns a DiscoveredCommandResult node containing the result of running the specified command.
  • discovery.snmpGetPerforms an SNMP query on the target and returns a DiscoveredSNMP node.
  • discovery.snmpGetTablePerforms an SNMP query that returns a table on the target.
  • discovery.processReturns the process node corresponding to the source node, which must be a ListeningPort or NetworkConnection node.
  • discovery.childrenReturns a list of the child processes for the given DiscoveredProcess node.
  • discovery.descendentsReturns a list consisting of the children of the given DiscoveredProcess node, and recursively all of the children's children.
  • discovery.parentReturns the parent process for the given DiscoveredProcess node.
  • discovery.allProcessesReturns a list of all processes corresponding to the directly discovered data source node.
  • discovery.accessReturns the DiscoveryAccess node for the source node, which must be a directly discovered data node.

Model functions

  • model.addContainmentAdds the containees to the container by creating suitable relationships between the nodes.
  • model.setContainmentEquivalent to addContainment, except unconfirmed relationships are removed at the end of the pattern body
  • model.destroyDestroy the specified node or relationship in the model.
  • model.withdrawRemoves the named attribute from the node.
  • model.setRemovalGroupAdd the specified node or nodes to a named removal group.
  • model.anchorRemovalGroupSpecify an anchor node for a named removal group.
  • model.suppressRemovalGroupSuppress removal of the named removal group.
  • model.hostThis function has been deprecated from TPL 1.6/BMC Atrium Discovery 8.3 in favor of related.host. Returns the Host node corresponding to the given node.
  • model.hostsReturns a list of all the Host nodes corresponding to the given node.
  • model.findPackagesTraverses from the node, which must be a Host or a directly discovered data node, and returns a set of all Package nodes that have names matching the provided list of regular expressions.

Related functions

  • related.detailContainerReturns the SoftwareComponent, SoftwareInstance, or BusinessApplicationInstance node containing to the given node.
  • related.hostReturns the Host node corresponding to the given node.

Email functions

Time functions

  • time.currentReturns the current time.
  • time.deltaCreates a time delta that can be added to or subtracted from a time.
  • time.parseLocalThe time is converted according to the appliance's time zone and daylight saving setting.
  • time.parseUTCThe time is assumed to already be UTC, and is not adjusted for timezones or daylight saving time.
  • time.formatLocalFormats a time into a human-readable string.
  • time.formatUTCFormats a time into a human-readable string.
  • time.toTicksConverts a time or time delta into the DCE ticks format.
  • time.fromTicksConverts DCE ticks into a time.
  • time.deltaFromTicksConverts DCE ticks into a time delta.

Inference functions

  • inference.associateCreate associate inference relationship(s) from the specified node(s) to the inferred node.
  • inference.contributorCreate contributor inference relationship(s) from the specified node(s) to the inferred node, for attribute names specified in the contributes list.
  • inference.primaryCreate primary inference relationship(s) from the specified node(s) to the inferred node.
  • inference.relationCreate relation inference relationship(s) from the specified node(s) to the inferred relationship.
  • inference.withdrawalCreate withdrawal inference relationship(s) from the specified node(s) to the inferred node, indicating the withdrawal of the withdrawn attribute name.
  • inference.destructionWhen destroying a node, indicate that the source node was responsible for its destruction.
Was this page helpful? Yes No Submitting... Thank you

Comments