Mailinglist Archive: yast-commit (2114 mails)

< Previous Next >
[yast-commit] <rest-service> resource-restful : remove ntp parser
  • From: Josef Reidinger <jreidinger@xxxxxxx>
  • Date: Thu, 3 Sep 2009 13:06:45 +0200
  • Message-id: <E1Mq44D-00084M-NS@xxxxxxxxxxxxxxxx>
ref: refs/heads/resource-restful
commit 189fd0338f93e4c02520c8f64de0be374b1469cb
Author: Josef Reidinger <jreidinger@xxxxxxx>
Date: Thu Sep 3 13:06:45 2009 +0200

remove ntp parser
---
webservice/lib/parsers/ntp/ntp_conf.rb | 62 --------------------------------
1 files changed, 0 insertions(+), 62 deletions(-)

diff --git a/webservice/lib/parsers/ntp/ntp_conf.rb
b/webservice/lib/parsers/ntp/ntp_conf.rb
deleted file mode 100644
index 32329a7..0000000
--- a/webservice/lib/parsers/ntp/ntp_conf.rb
+++ /dev/null
@@ -1,62 +0,0 @@
-class Parsers::Ntp::NtpConf
- def parse( location )
- @opthash = Hash.new
- @servers = Hash.new
- @opthash[:id] = location
- @opthash[:location] = location
-
- IO.foreach( location ) { |line|
- case line
-
- when /^server\s+(\S+)/
- cserver = @servers[$1]
- if ( ! cserver )
- cserver = @servers[$1] = Hash.new
- end
- cserver[:id] = $1
- cserver[:address] = $1
-
- when /^fudge\s+(\S+)\s+(.*)/
- cserver = @servers[$1]
- if ( ! cserver )
- cserver = @servers[$1] = Hash.new
- end
- #cserver = Hash.new
- #@servers.push( cserver )
- cserver[:id] = $1
- cserver[:fudge] = $2
-
- when /^driftfile\s+(\S+)/
- @opthash[:driftfile] = $1
-
- when /^logfile\s+(\S+)/
- @opthash[:logfile] = $1
-
- end
- }
- end
-
- def to_xml
- out = String.new
- out << '<config>'
- @opthash.each do |key,value|
- out << '<' << key.to_s << '>'
- out << value
- out << '</' << key.to_s << '>'
- end
- out << '<servers>'
- @servers.each do |x,server|
- out << '<server>'
- server.each do |skey,svalue|
- out << '<' << skey.to_s << '>'
- out << svalue
- out << '</' << skey.to_s << '>'
- end
- out << '</server>'
- end
- out << '</servers>'
- out << '</config>'
- return out
- end
-
-end
\ No newline at end of file
--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages