AllowZoneName

Syntax

sub AllowZoneName

Back to top

Description

This function controls the Source Zone and Destination Zone Fields in Palo Alto (Panorama) Work Orders. Use to allow zone names instead of the AFF recommendation in the work order. In each of these fields, you can add multiple zones.

Back to top

Configuration

By default, this hook is not called. To configure the hook, complete the procedure below. For details, see Override FireFlow system defaults.

  1. Make sure the MultipleZonesRecommendation config flag parameter is set to 1 to enable the hook.

  2. Set the SetMultipleZonesViaHook hook config parameter to 1.

  3. Set SelectUndetectedZones config parameter to:

    1. 1 to allow the hook to also select undetected zones (those that FireFlow hasn't recommended)

    2. 0 to allow the hook to only select recommended zones by FireFlow

Note: After setting this parameter, you must restart FireFlow for the change to take affect. See Restarting FireFlow (see Restart FireFlow).

Back to top

Input Parameters

$ticket

A Perl hash reference containing a single key called flatTicket, which points to the flat ticket representation of the change request.

For details, see Flat Ticket Examples.

$zone

The original rule comment.

$trafficField

The rule comment suggested by FireFlow.

$zoneDirection Zone direction ("FromZone" / "ToZone")

Back to top

Return Values

The output is a Boolean about the suggested action: include the zone (1) or exclude it (0).

Back to top

Example

In the following example, the hook allows only “FromZone” zones with “from_” prefix and “ToZone” with “to_” prefix:

Copy
sub AllowZoneName
{
 # the ticket object, contains all the ticket data and attributes
 my $ticket = shift; 
 my $zone = shift;
 my $trafficField = shift;
 my $zoneDirection = shift;
 if (($zoneDirection eq 'FromZone' && $zone =~ /^from_/) || 
 (($zoneDirection eq 'ToZone' && $zone =~ /^to/))) 
 {
 return 1;
 }
 return 0;
}