NAME

Net::Checkpoint::Management::v1 - Checkpoint Management API version 1.x client library

VERSION

version 0.003000

SYNOPSIS

use strict;
use warnings;
use Net::Checkpoint::Management::v1;

my $cpmgmt = Net::Checkpoint::Management::v1->new(
    server      => 'https://cpmgmt.example.com',
    user        => 'username',
    passwd      => '$password',
    clientattrs => { timeout => 30 },
);

$cpmgmt->login;

DESCRIPTION

This module is a client library for the Checkpoint Management API version 1.x. Currently it is developed and tested against version R80.40.

ATTRIBUTES

api_versions

Returns a list of all available API versions which gets populated on the first call. Only works on API version 1.1 and higher.

api_version

The API version used by all methods. Is automatically set to the highest version available by the "login" method.

METHODS

login

Logs into the Checkpoint Manager API using version 1.

logout

Logs out of the Checkpoint Manager API using version 1.

publish

Publishes all previously submitted changes. Returns the task id on success.

discard

Discards all previously submitted changes. Returns a hashref containing the operation status message and the number of discarded changes.

verify_policy

Verifies the policy of the given package.

Takes a policy name.

Returns the task id on success.

install_policy

Installs the policy of the given package onto the given target(s).

Takes a policy name, target(s) and an optional hashref of additional parameters. The target(s) can be a single name or uid or a list of names or uids.

Returns the task id on success.

wait_for_task

Takes a task id and checks its status every second until it isn't 'in progress' any more and return the status. Takes an optional callback coderef which is called for every check with the task as argument.

where_used

Takes a Checkpoint object in form of a hashref as returned by the various APIs and optional query parameters.

Prefers the object uid over its name for the query.

Returns the unmodified response on success.

AUTHOR

Alexander Hartmaier <abraxxa@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2023 by Alexander Hartmaier.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.