Bump epp-xml, fix some epp bugs

This commit is contained in:
Martin Lensment 2014-10-31 15:10:09 +02:00
parent 1498aa339f
commit 4c7895a7fb
7 changed files with 14 additions and 195 deletions

View file

@ -73,34 +73,6 @@ module Epp
end
end
def domain_update_xml(xml_params = {}, dnssec_params = false)
defaults = {
name: { value: 'example.ee' }
}
xml_params = defaults.deep_merge(xml_params)
xml = Builder::XmlMarkup.new
xml.instruct!(:xml, standalone: 'no')
xml.epp('xmlns' => 'urn:ietf:params:xml:ns:epp-1.0') do
xml.command do
xml.update do
xml.tag!('domain:update', 'xmlns:domain' => 'urn:ietf:params:xml:ns:domain-1.0') do
generate_xml_from_hash(xml_params, xml, 'domain:')
end
end
xml.extension do
xml.tag!('secDNS:create', 'xmlns:secDNS' => 'urn:ietf:params:xml:ns:secDNS-1.1') do
generate_xml_from_hash(dnssec_params, xml, 'secDNS:')
end
end if dnssec_params != false
xml.clTRID 'ABC-12345'
end
end
end
def generate_xml_from_hash(xml_params, xml, ns = '')
xml_params.each do |k, v|
# Value is a hash which has string type value