API-PureStorage
view release on metacpan or search on metacpan
lib/API/PureStorage.pm view on Meta::CPAN
__END__
=head1 NAME
API::PureStorage - Interacting with Pure Storage devices
=head1 SYNOPSIS
my $pure = new API::PureStorage ($host, $api_token);
my $info = $pure->array_info();
my $percent = sprintf('%0.2f', (100 * $info->{total} / $info->{capacity}));
print "The array $host is currently $percent full\n";
print "\nVolumes on host $host:\n";
my $vol_info = $pure->volume_info();
for my $vol (sort { lc($a->{name}) cmp lc($b->{name}) } @$vol_info) {
my $detail = $pure->volume_detail($vol->{name});
print join("\t", $detail->{name}, $detail->{serial}, $detail->{created}), "\n";
}
=head1 DESCRIPTION
lib/API/PureStorage.pm view on Meta::CPAN
* system - bytes in use by system overhead. This can include recently allocated bytes
that have yet to be accounted for in other categories. IE: a recently deleted volume
that has yet to garbage collect.
* total - a byte count of all data on the system.
* capacity - the total capacity of the array in bytes
* thin_provisioning - ?
NB: To calculate the percentage usage of whole array, divide total by capacity.
=head2 volume_info()
my @volume_info = $pure->volume_info();
my $volume_info_ref = $pure->volume_info();
Returns an array or arrayref of general information about volumes include space
usage.
Each element of the array is a hash reference, representing a single volume.
lib/API/PureStorage.pm view on Meta::CPAN
* snapshots - bytes in use by snapshots
* system - bytes in use by system overhead
* total - a byte count of all data used by the the volume
* size - the max size of the volume
* thin_provisioning - ?
NB: To calculate the percentage usage of the volume, divide total by size.
=head2 volume_detail($volume_name)
my %volume_detail = $pure->volume_detail($volume_name);
my $volume_detail_ref = $pure->volume_detail($volume_name);
Returns a hash or hasref (depending on requested context) of additional
information on the volumes now shown in the vol_info() summary.
=head3 Hash data reference:
( run in 0.424 second using v1.01-cache-2.11-cpan-709fd43a63f )