NAME

Farly::Remove::Rule - Removes a list firewall rule entries

DESCRIPTION

Farly::Remove::Rule calculates dependencies and generates the commands needed to remove a $list<Object::KVC::List<Object::KVC::Hash>> of firewall rule entries from the given firewall configuration.

If the firewall configuration rule uses a group, then the configuration rule is removed and the expanded firewall rule entries are used in the configuration.

METHODS

new( $list<Object::KVC::List<Object::KVC::Hash>> )

The constructor. A firewall configuration $list must be provided.

$rule_remover = Farly::Remove::Rule->new( $list );

remove( $list<Object::KVC::List<Object::KVC::Hash>> )

Resolves dependencies and removes the list of firewall rule entries from the current Farly firewall model.

$remover->remove( $list );

result()

Returns an Object::KVC::Set<Object::KVC::Hash> object containing all objects which need to be removed or added to the current Farly firewall model in order to remove all references to the list of removed firewall rule entries.

$remove_result_set = $remover->result();

config()

Return the current configuration Object::KVC::List<Object::KVC::Hash> object.

$fw_config = $remover->config();

After calling remove() this will be the up to date configuration, with configuration rules removed and expanded rule entries added in.

COPYRIGHT AND LICENCE

Farly::Remove::Rule Copyright (C) 2012 Trystan Johnson

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.