Module: Orchestration::DNS::InstanceMethods

Defined in:
app/models/orchestration/dns.rb

Instance Method Summary collapse

Instance Method Details

#dns?Boolean

Returns:

  • (Boolean)

12
13
14
# File 'app/models/orchestration/dns.rb', line 12

def dns?
  name.present? and ip_available? and !domain.nil? and !domain.proxy.nil? and managed?
end

#dns_a_recordObject


20
21
22
23
# File 'app/models/orchestration/dns.rb', line 20

def dns_a_record
  return unless dns? or @dns_a_record
  @dns_a_record ||= Net::DNS::ARecord.new dns_record_attrs
end

#dns_ptr_recordObject


25
26
27
28
# File 'app/models/orchestration/dns.rb', line 25

def dns_ptr_record
  return unless reverse_dns? or @dns_ptr_record
  @dns_ptr_record ||= Net::DNS::PTRRecord.new reverse_dns_record_attrs
end

#reverse_dns?Boolean

Returns:

  • (Boolean)

16
17
18
# File 'app/models/orchestration/dns.rb', line 16

def reverse_dns?
  name.present? and ip_available? and !subnet.nil? and subnet.dns? and managed?
end