Skip to content

Latest commit

 

History

History
32 lines (26 loc) · 1.08 KB

findobjectbyguid.adoc

File metadata and controls

32 lines (26 loc) · 1.08 KB

FindObjectByGUID()

FindObjectByGUID(guid, currentNode) => NetObj

Look up any object inherited from [class-netobj] ([class-node], [class-interface], [class-cluster], etc.) by GUID.

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 omitted or set to null.

Table 1. Parameters

guid

String

Object GUID.

currentNode

[class-netobj]

Lookup context or null if trusted nodes validation is disabled. Optional parameter.

Return

Instance of object inherited from [class-netobj] or null if not found or not accessible. Type of the object can be verified using function [func-classof].

Example
node = FindObjectByGUID("d602a7f1-0049-421b-a134-2fcf35712608", $node);
if (node != NULL) println(node.name); // Prints node name if node with given GUID is found