Mailinglist Archive: yast-commit (1914 mails)

< Previous Next >
[yast-commit] <rest-service> basesystem : dns model shows xml list
  • From: Michal Zugec <mzugec@xxxxxxx>
  • Date: Thu, 3 Sep 2009 12:14:49 +0200
  • Message-id: <E1Mlezx-00049m-4r@xxxxxxxxxxxxxxxx>
ref: refs/heads/basesystem
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

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages