AllowZoneName
Syntax
sub AllowZoneName
Description
Configuration
By default, this hook is not called. To configure the hook, complete the procedure below. For details, see Override FireFlow system defaults.
-
Make sure the MultipleZonesRecommendation config flag parameter is set to 1 to enable the hook.
-
Set the SetMultipleZonesViaHook hook config parameter to 1.
-
Set SelectUndetectedZones config parameter to:
-
1 to allow the hook to also select undetected zones (those that FireFlow hasn't recommended)
-
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).
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") |
Return Values
The output is a Boolean about the suggested action: include the zone (1) or exclude it (0).
Example
In the following example, the hook allows only “FromZone” zones with “from_” prefix and “ToZone” with “to_” prefix:
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;
}