Skip to content

Latest commit

 

History

History
36 lines (29 loc) · 960 Bytes

findnodeobject.adoc

File metadata and controls

36 lines (29 loc) · 960 Bytes

FindNodeObject()

FindNodeObject(currentNode, key) => Node

Look up [class-node] object by either name or object id, will return null if object not found or not accessible. This function search for nodes only.

If trusted node validation is enforced, currentNode should point to execution context object (instance of [class-netobj], $node in most cases). If trusted nodes are disabled (default server configuration), currentNode can be set to null.

Table 1. Parameters

currentNode

Lookup context or null if trusted nodes validation is disabled.

key

Object name of id.

Return

Instance of [class-node] object or null if not found or not accessible.

Example
>>> FindNodeObject($node, "server.netxms.org")
object
>>> FindNodeObject(null, 12)
object
>>> FindNodeObject($node, "bad_node_name")
NULL