Class: VagrantAutoDNS::Action::Delete

Inherits:
Object
  • Object
show all
Includes:
Common
Defined in:
lib/vagrant-autodns/actions/delete.rb

Instance Method Summary collapse

Methods included from Common

#call, #hostname, included, #initialize, #machine_name

Instance Method Details

#actionObject



16
17
18
19
20
21
22
23
24
# File 'lib/vagrant-autodns/actions/delete.rb', line 16

def action
  require_relative '../autodnsdb'
  log.info("Deleting DNS records for host #{machine_name}")
  if VagrantAutoDNS.autodnsdb.delete_host(machine_name)
    log.info("Entries for host #{machine_name} has been removed")
  else
    log.error("Failed to remov record for #{machine_name}")
  end
end