Merge branch 'master' of github.com:internetee/registry

This commit is contained in:
Andres Keskküla 2014-08-27 15:03:44 +03:00
commit ede426e22e
4 changed files with 48 additions and 7 deletions

View file

@ -6,7 +6,7 @@ module Epp::DomainsHelper
handle_errors(@domain) and return unless @domain.parse_and_attach_domain_dependencies(@ph, parsed_frame)
handle_errors(@domain) and return unless @domain.save
render '/epp/domains/success'
render '/epp/domains/create'
end
end

View file

@ -0,0 +1,17 @@
xml.epp_head do
xml.response do
xml.result('code' => '1000') do
xml.msg 'Command completed successfully'
end
xml.resData do
xml.tag!('domain:creData', 'xmlns:domain' => 'urn:ietf:params:xml:ns:domain-1.0') do
xml.tag!('domain:name', @domain.name)
xml.tag!('domain:crDate', @domain.created_at)
xml.tag!('domain:exDate', @domain.valid_to)
end
end
end
xml << render('/epp/shared/trID')
end

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