Revision 5440d482
Added by Greg Sutcliffe over 9 years ago
app/models/concerns/orchestration/dns.rb | ||
---|---|---|
end
|
||
|
||
def dns?
|
||
hostname.present? && ip_available? && !domain.nil? && !domain.proxy.nil? && host.managed? && managed?
|
||
# host.managed? and managed? should always come first so that orchestration doesn't
|
||
# even get tested for such objects
|
||
(host.nil? || host.managed?) && managed? && hostname.present? && ip_available? && !domain.nil? && !domain.proxy.nil?
|
||
end
|
||
|
||
def reverse_dns?
|
||
hostname.present? && ip_available? && !subnet.nil? && subnet.dns? && host.managed? && managed?
|
||
# host.managed? and managed? should always come first so that orchestration doesn't
|
||
# even get tested for such objects
|
||
(host.nil? || host.managed?) && managed? && hostname.present? && ip_available? && !subnet.nil? && subnet.dns?
|
||
end
|
||
|
||
def dns_a_record
|
Also available in: Unified diff
Fixes #9147 - move managed checks to the start of the DHCP/DNS/TFTP orchestration checks