Zabbix::API::UserGroup -- Zabbix usergroup objects
use Zabbix::API::UserGroup; my $group = $zabbix->fetch(...); $group->delete;
Handles CRUD for Zabbix usergroup objects.
This is a very simple subclass of Zabbix::API::CRUDE. Only the required methods are implemented (and in a very simple fashion on top of that).
Zabbix::API::CRUDE
Accessor for the usergroup's name (the "name" attribute); returns the empty string if no name is set, for instance if the usergroup has not been created on the server yet.
Mutator for the usergroup's users.
This method handles extraneous user => Zabbix::API::User attributes in the users array, transforming them into userid attributes, and pushing the users to the server if they don't exist already. The original user attributes are kept but hidden from the CRUDE push method, and restored after the pull method is called.
user => Zabbix::API::User
userid
CRUDE
push
pull
This means you can put Zabbix::API::User objects in your data and the module will Do The Right Thing (assuming you agree with my definition of the Right Thing). Users that have been created this way will not be removed from the server if they are removed from the graph, however.
Zabbix::API::User
Overriden from Zabbix::API::CRUDE.
Zabbix::API::CRUDE.
Fabrice Gabolde <fabrice.gabolde@uperto.com>
Copyright (C) 2013 SFR
This library is free software; you can redistribute it and/or modify it under the terms of the GPLv3.
To install Zabbix::API, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Zabbix::API
CPAN shell
perl -MCPAN -e shell install Zabbix::API
For more information on module installation, please visit the detailed CPAN module installation guide.