Mailinglist Archive: yast-devel (163 mails)

< Previous Next >
[yast-devel] Re: [yast-commit] <rest-service> network : dns model shows xml list
  • From: Josef Reidinger <jreidinger@xxxxxxx>
  • Date: Thu, 03 Sep 2009 12:52:25 +0200
  • Message-id: <4A9F9FE9.2050904@xxxxxxx>
On 09/03/2009 12:14 PM, Michal Zugec wrote:
ref: refs/heads/network
commit b72baab724ea256472be56efe577c9231df97881
Author: Michal Zugec <mzugec@xxxxxxx>
Date: Thu Sep 3 12:14:49 2009 +0200

dns model shows xml list
---
plugins/network/app/models/dns.rb | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/plugins/network/app/models/dns.rb
b/plugins/network/app/models/dns.rb
index 6a03736..f153a75 100644
--- a/plugins/network/app/models/dns.rb
+++ b/plugins/network/app/models/dns.rb
@@ -42,9 +42,17 @@ class DNS
xml = options[:builder] ||= Builder::XmlMarkup.new(options)
xml.instruct! unless options[:skip_instruct]

- xml.hostname do
- xml.domains @domains
- xml.servers @servers
+ xml.dns do
+ xml.domains({:type => "array"}) do
+ domains.each do |@domains, val|
+ xml.tag!(:domain, domains)
+ end
+ end
+ xml.servers({:type => "array"}) do
+ servers.each do |@servers, val|
+ xml.tag!(:nameserver, servers)
+ end
+ end
end
end


Hi, I see it quite often in code and Karel on session say, that instead
xml.tag!(:domain, domains)
we should use simple
xml.domain domains

--
Josef Reidinger
YaST team
maintainer of perl-Bootloader, YaST2-Repair, webyast modules language
and time
--
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-devel+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups