NAME

Device::PaloAlto::Firewall - Interact with the Palo Alto firewall API

VERSION

version 0.05

SYNOPSIS

CONSTRUCTOR

RETURN VALUES

METHODS

verify_hostname

Enables/disables the verification of the peer certificate and hostname if 'https' is used for API calls.

$fw->verify_hostname(1); Enable TLS peer verification
$fw->verify_hostname(0); Disable TLS verification

optimise

Enables/disables the local caching of requests and responses to the firewall. This is disabled by default.

$fw->optimise(1);                           # Enable optimisation
my $system_info = $fw->system_info();       # API call to retrieve interface information
$system_info = $fw->system_info();          # Information retrieved from local cache

The first call to system_info() will make an API call to the firewall and cache the result. The second request will retrieve the response from the local cache without making an API call. Under the covers it uses Memoize to cache the API request call. This means that each function & arguments receive their own cache. For example:

$fw->optimise(1); 
my $default_vr bgp_peers = $fw->bgp_peers(vrouter => 'default');
my $other_vr_bgp_peers = $fw->bgp_peers(vrouter => 'other');

Both of these methods would make an API call to the firewall as the arguments differ.

tester

Retrieves a Device::PaloAlto::Firewall::Test object for this firewall.

use Test::More;
my $test = Device::PaloAlto::Firewall->new(uri => 'http://remote_pa.domain', username => 'test', password => 'test')->tester();

ok( $test->interfaces_up(interfaces => ['ethernet1/1']) );

For more information, see the Device::PaloAlto::Firewall::Test documentation.

system_info

Returns system information from the firewall.

my $system_info = $fw->system_info();
say "Current Time on Firewall: $system_info->{time}";

environmentals

Returns information on the system environmentals. This includes the fantray and fans, power supplies and power, temperature. Note: virtual machines don't have any environmental information and won't return any information.

interfaces

Retrieves interface information.

high_availability

Retrieves information on the high availability status of the firewall.

ntp

Retrieves information on the current synchronisation and reachability of configured NTP peers.

routing_table

Retrives information on the routing table for a particular virtual router. If no vrouter argument is specified it retrieves the 'default' vrouter's routing table.

my $default_vr_table = $fw->routing_table();
my $corp_vr_table = $fw->routing_table(vrouter => 'corp');

bgp_peers

Retrieves information on the configured BGP peers for a particular virtual router. If no vrouter argument is specified it retrieves the 'default' vrouter's BGP peers.

my $default_vr_bgp_peers = $fw->bgp_peers();
my $corp_vr_bgp_peers = $fw->bgp_peers(vrouter => 'corp');

panorama_status

Returns information on the current Panorama runtime status.

ip_user_mapping

Returns the ip to user mapping table.

userid_server_monitor

Returns the state of the servers used to monitor User-ID IP-to-user mappings.

AUTHOR

Greg Foletta, <greg at foletta.org>

BUGS

Please report any bugs or feature requests to bug-device-paloalto at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Device-PaloAlto. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc Device::PaloAlto::Firewall

You can also look for information at:

ACKNOWLEDGEMENTS

LICENSE AND COPYRIGHT

Copyright 2017 Greg Foletta.

This program is free software; you can redistribute it and/or modify it under the terms of the the Artistic License (2.0). You may obtain a copy of the full license at:

http://www.perlfoundation.org/artistic_license_2_0

Any use, modification, and distribution of the Standard or Modified Versions is governed by this Artistic License. By using, modifying or distributing the Package, you accept this license. Do not use, modify, or distribute the Package, if you do not accept this license.

If your Modified Version has been derived from a Modified Version made by someone other than you, you are nevertheless required to ensure that your Modified Version complies with the requirements of this license.

This license does not grant you the right to use any trademark, service mark, tradename, or logo of the Copyright Holder.

This license includes the non-exclusive, worldwide, free-of-charge patent license to make, have made, use, offer to sell, sell, import and otherwise transfer the Package with respect to any patent claims licensable by the Copyright Holder that are necessarily infringed by the Package. If you institute patent litigation (including a cross-claim or counterclaim) against any party alleging that the Package constitutes direct or contributory patent infringement, then this Artistic License to you shall terminate on the date that such litigation is filed.

Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.