Zabbix::API::Macro -- Zabbix usermacro objects
use Zabbix::API::Macro; # TODO write the rest
Handles CRUD for Zabbix usermacro objects.
Both global and host macro types are represented by this class. If the
hosts arrayref attribute is undef or empty, then we assume it's a global macro.
This class' methods work transparently around the weird Zabbix macro API, which uses different methods on the same object depending on whether it's a global or host macro... except sometimes, for instance the
usermacro.get method which can be called on both and will return different keys... And macros don't seem to have an
exists method. It's kind of a mess.
The various massFoo methods have not been implemented at all because I did not have a use for their "mass" functionality, despite their being the only way to CRUD host macros.
prefix method is not a class method. The prefix returned depends on the type of macro (global or host) which is a characteristic of an instance.
Mutator for the macro's host.
HOST should be a
Host instance or a hashref with a
Return a true value when the macro is global, a false value otherwise.
TODO links to other pods and documentation
Fabrice Gabolde <firstname.lastname@example.org>
Copyright (C) 2011 SFR
This library is free software; you can redistribute it and/or modify it under the terms of the GPLv3.