Triglav::Client - A Perl Interface to Triglav API
use Triglav::Client; my $client = Triglav::Client->new( base_url => 'http://example.com/', # Base URL which your Triglav is located at api_token => 'xxxxxxxxxxxxxxxxxxx', # You can get it from your page on Triglav ); # Services $client->services; #=> Returns all the services registered on Triglav # Roles $client->roles; #=> Returns all the roles registered on Triglav $client->roles_in('sqale'); #=> Only roles in the service # Active hosts (default behaviour) $client->hosts; #=> Returns all the hosts registered on Triglav $client->hosts_in('sqale'); #=> Only hosts in the service $client->hosts_in('sqale', 'users'); #=> Only hosts in the service and which have the role # All hosts including inactive ones $client->hosts(with_inactive => 1); $client->hosts_in('sqale', undef, with_inactive => 1); $client->hosts_in('sqale', 'users', with_inactive => 1);
Triglav is a server management tool. This module is a Perl interface to its API.
http://github.com/kentaro/triglav
This module is in alpha stage. You should be conscious about the changes of this module and API spec.
triglav-client-perl
https://github.com/kentaro/triglav-client-perl
Triglav
Kentaro Kuribayashi <kentarok@gmail.com>
Copyright (C) Kentaro Kuribayashi
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Triglav::Client, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Triglav::Client
CPAN shell
perl -MCPAN -e shell install Triglav::Client
For more information on module installation, please visit the detailed CPAN module installation guide.