Return detailed ns info with info request

This commit is contained in:
Martin Lensment 2014-08-27 14:05:17 +03:00
parent a66450bdd1
commit df6394d771
2 changed files with 16 additions and 2 deletions

View file

@ -24,7 +24,15 @@ xml.epp_head do
xml.tag!('domain:ns') do
@domain.nameservers.each do |x|
xml.tag!('domain:hostObj', x.hostname)
if x.ipv4.present? || x.ipv6.present?
xml.tag!('domain:hostAttr') do
xml.tag!('domain:hostName', x.hostname)
xml.tag!('domain:hostAddr', x.ipv4, 'ip' => 'v4') if x.ipv4.present?
xml.tag!('domain:hostAddr', x.ipv6, 'ip' => 'v6') if x.ipv6.present?
end
else
xml.tag!('domain:hostObj', x.hostname)
end
end
end