This is the documentation for the development version. There are no official binaries for it; build it from the source code in git. Download links on these pages work only after the release. For the current release, see version 7.0.

GetAllNodes

GetAllNodes(currentObject): Array

Get list of all Node objects in the system as array. Only nodes the script has read access to are included.

If trusted object validation is enforced, currentObject must be given and only nodes that trust it are returned; without it the array is empty.

Table 1. Parameters

currentObject

NetObj

Optional. Execution context object ($object or $node in most cases).

Return

Array of node objects.

>>> for (n : GetAllNodes()) {
>>>   println(n.id .. " - " .. n.name);
>>> }

6766 - demo-netxms
6901 - Control Unit 1
6902 - Control Unit 2