set_global_variable

Descripción

Establece el valor de una variable global en el diccionario '_GLOBAL_VARIABLES'.

Parámetros

Nombre Tipo Requerido Descripción
variable_name str SI Nombre de la variable a establecer
value None Si Valor a asignar a la variable

Return 

Tipo
None


Versión

Ejemplo

import pandoraPlugintools as pt

# Define the variable name and value to set
variable_name = 'security_level'
new_value = 'auth_without_privacy'

# Set the value of the global variable
pt.snmp.set_global_variable(variable_name, new_value)

# Print the updated value of the global variable
print(f"Updated value of '{variable_name}': {pt.snmp._GLOBAL_VARIABLES[variable_name]}")

Revision #3
Created 18 August 2023 12:54:20 by alejandro.sanchez
Updated 14 February 2024 14:31:21 by alejandro.sanchez