NAME

Device::Firewall::PaloAlto::Op - Operations module for Palo Alto firewalls

VERSION

version 0.1.9

SYNOPSIS

my $op = Device::Firewall::PaloAlto->new(username => 'admin', password => 'admin')->auth->op;
my @interfaces = $op->interface->to_array;

DESCRIPTION

This module holds methods that perform operation commands on the firewall.

METHODS

new

The new() method can be used, but in general it's easier to call the op() method from the Device::Firewall::PaloAlto module.

vsys

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.

system_info

my $info = $fw->op->system_info;

Returns a Device::Firewall::PaloAlto::Op::SysInfo object containing system information about the firewall.

interfaces

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.

interface_stats

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.

arp_table

my $arp = $fw->op->arp_table();

Returns a Device::Firewall::PaloAlto::Op::ARPTable object representing all of the ARP entries on the device.

virtual_router

# 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.

tunnels

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');

global_counters

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;

ip_user_mapping

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;

ha

Returns a Device::Firewall::PaloAlto::Op::HA object representing the current high availability state of the firewall.

my $ha_info = $fw->op->ha;

ntp

Returns a Device::Firewall::PaloAlto::Op::NTP object reresenting the current NTP synchronisation status of the firewall.

logging_status

my $log_status = $fw->op->logging_status

Returns a Device::Firewall::PaloAlto::Op::LogStatus objects represent the current logging status of the firewall

AUTHOR

Greg Foletta <greg@foletta.org>

COPYRIGHT AND LICENSE

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.