class Roadworker::Batch::Delete
Public Instance Methods
changes()
click to toggle source
# File lib/roadworker/batch.rb, line 278 def changes # Avoid deleting hosted zone SOA/NS if hosted_zone_soa_or_ns? return [] end [ { action: 'DELETE', resource_record_set: present_rrset.to_h, } ] end
cname_first?()
click to toggle source
CNAME should always be deleted first, as CNAME doesn’t permit other records
# File lib/roadworker/batch.rb, line 270 def cname_first? true end
diff!()
click to toggle source
# File lib/roadworker/batch.rb, line 292 def diff! return if changes.empty? log(:info, 'Delete ResourceRecordSet', :red) do "#{present_rrset.name} #{present_rrset.type}#{ present_rrset.set_identifier && " (#{present_rrset.set_identifier})" }" end end
hosted_zone_soa_or_ns?()
click to toggle source
# File lib/roadworker/batch.rb, line 274 def hosted_zone_soa_or_ns? (present_rrset.type == 'SOA' || present_rrset.type == 'NS') && hosted_zone.name == present_rrset.name end