Device::Firewall::PaloAlto::Op - Operations module for Palo Alto firewalls
version 0.1.9
my $op = Device::Firewall::PaloAlto->new(username => 'admin', password => 'admin')->auth->op; my @interfaces = $op->interface->to_array;
This module holds methods that perform operation commands on the firewall.
The new() method can be used, but in general it's easier to call the op() method from the Device::Firewall::PaloAlto module.
new()
op()
Sets the virtual system (vsys) ID to which calls will be applied. By default vsys 1 is used.
On success reutrns the Device::Firewall::PaloAlto::Op object so calls can be chained together. On failure it returns a Class::Error object.
my $info = $fw->op->system_info;
Returns a Device::Firewall::PaloAlto::Op::SysInfo object containing system information about the firewall.
my $interfaces = $fw->op->interfaces();
Returns a Device::Firewall::PaloAlto::Op::Interfaces object containing all of the interfaces, both physical and logical, on the device.
my $int_stats = $fw->op->interface_stats('ethernet1/1');
Returns an Device::Firewall::PaloAlto::Op::InterfaceStats objects containing specific interface statistics.
If no interface is specified, 'ethernet1/1' is used.
my $arp = $fw->op->arp_table();
Returns a Device::Firewall::PaloAlto::Op::ARPTable object representing all of the ARP entries on the device.
# If no virtual router specified, returns the one named 'default' my $routing_tables = $fw->op_routing_tables(); # Retrieve thee 'guest_vr' virtual router my $vr = $fw->op->virtual_router('guest_vr');
Returns a Device::Firewall::PaloAlto::Op::VirtualRouter object representing all of the routing tables on the firewall.
Returns a Device::Firewall::PaloAlto::Op::Tunnels object representing the current active IPSEC tunnels.
my $tunnels = $fw->op->tunnels my $client_site = $tunnels->gw('remote_site_gw');
Returns a Device::Firewall::PaloAlto::Op::GlobalCounters object representing the global counters.
# Extract out the drop alerts alerts my $counters = $fw->op->global_counters; my @drop_counter = grep { $_->severity eq 'drop' } $counters->to_array;
Returns a Device::Firewall::PaloAlto::Op::IPUserMaps objects representing the current active IP to user mappings on the device.
my $maps = $fw->op->ip_user_mapping; my @mappings = grep { $_->user eq 'greg.foleta' } $map->to_array;
Returns a Device::Firewall::PaloAlto::Op::HA object representing the current high availability state of the firewall.
my $ha_info = $fw->op->ha;
Returns a Device::Firewall::PaloAlto::Op::NTP object reresenting the current NTP synchronisation status of the firewall.
my $log_status = $fw->op->logging_status
Returns a Device::Firewall::PaloAlto::Op::LogStatus objects represent the current logging status of the firewall
Greg Foletta <greg@foletta.org>
This software is copyright (c) 2019 by Greg Foletta.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Device::Firewall::PaloAlto, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Device::Firewall::PaloAlto
CPAN shell
perl -MCPAN -e shell install Device::Firewall::PaloAlto
For more information on module installation, please visit the detailed CPAN module installation guide.