LUALoriotPro WEB site

LoriotPro scripting documentation
Extensions for LUA language

Table of contents Search function

Print the current page Mail this  link UTUBE Channel version française

lp.LocateDirectoryUID - Select the default object by UID

LoriotPro has extended the LUA sripting language by providing its own LUA libraries. The new functions provided are dedicated to the creation of monitoring and SNMP automation application.

Syntax

value = lp.LocateDirectoryUID('uid');

Description

The lp.LocateDirectoryUID LUA function locate an object in the directory by its UID and select it. It becomes the current default object for further operations.

Parameters

‘uid’                 The UID number of the audit as unsigned 64bits coded as a character string.

Return Values

value : value

Return nil if an error occurs

buffer : value

Return nil if an error occurs

Example

lua logoLoriotPro WEB site Documentation scripting LoriotPro
Extensions du language LUA

Table des matières    Liste de fonctions

Imprimer la page en cours Mail this  link UTUBE Channel

We will locate and select the device ‘1.1.1.1’ with the name ‘new host’. 

Use the wizard in the LUA script editor to select the UID.

locate object by uid

We alos use the function lp.FindName that provide the uid of an object when you know its name.

uid=lp.FindName("new host")

if (uid) then

lp.Print(uid,"\n");

lp.LocateDirectoryUID(uid);

end

Before launching the script

locate object by uid

After, the "new host" is now selected

locate object by uid

 

 


www.loriotpro.com