Chapter 09/circuit-oneops-1-master/components/cookbooks/panos/libraries/address_manager.rb
# this function deletes the addresses and address group from the firewall
this function deletes the addresses and address group from the firewall
this function deletes the addresses and address group from the firewall
def delete_addresses_and_dag(address_group_name, addresses, device_groups)
    device_groups.each do |device_group|
      address_request = AddressRequest.new(@url, @key)
      addresses['entries'].each do |address|
        Chef::Log.info("Address is: #{address}")
        Chef::Log.info("NAME is: #{address['name']}")
        address_request.delete(address['name'], device_group)
      end
      dag_request = AddressGroupRequest.new(@url, @key)
      dag_request.delete(address_group_name, device_group)
    end
    commit_and_check_status(device_groups)
  end
def delete_addresses_and_dag ( address_group_name , addresses , device_groups ) device_groups . each do | device_group | address_request = AddressRequest . new ( @url , @key ) addresses [ 'entries' ] . each do | address | Chef :: Log . info ( "Address is: #{address}" ) Chef :: Log . info ( "NAME is: #{address['name']}" ) address_request . delete ( address [ 'name' ] , device_group ) end dag_request = AddressGroupRequest . new ( @url , @key ) dag_request . delete ( address_group_name , device_group ) end commit_and_check_status ( device_groups ) end
this function deletes the addresses and address group from the firewall
this function deletes the addresses and address group from the firewall
# delete the addresses # delete the dag
address_group_name
<not_specific>
addresses
<not_specific>
device_groups
<not_specific>