NAME
Net::OpenStack::Client
SYNOPSIS
Example usage: use Net::OpenStack::Client; ... my $cl = Net::OpenStack::Client->new(openrc => '/home/admin/.openrc');
For basic reporting: use Net::OpenStack::Client; use Log::Log4perl qw(:easy); Log::Log4perl->easy_init($INFO); ... my $cl = Net::OpenStack::Client->new( openrc => '/home/admin/.openrc', log => Log::Log4perl->get_logger() );
For debugging, including full JSON request / repsonse and headers (so contains sensitive data!): use Net::OpenStack::Client; use Log::Log4perl qw(:easy); Log::Log4perl->easy_init($DEBUG); ... my $cl = Net::OpenStack::Client->new( openrc => '/home/admin/.openrc', log => Log::Log4perl->get_logger(), debugapi => 1 );
Public methods
- new
-
Options
- log
-
An instance that can be used for logging (with error/warn/info/debug methods) (e.g. LOG::Log4perl).
- debugapi
-
When true, log the request and response body and headers with debug.
If more options are definded, e.g.
openrc
, they are passed to passed to Net::OpenStack::Client::Auth::login. (If no other options are defined,login
is not called).