Mailinglist Archive: yast-commit (1771 mails)

< Previous Next >
[yast-commit] <rest-service> network : YaPI::Read takes runlevel as parameter and returns list of strings
  • From: Jiri Suchomel <jsuchome@xxxxxxx>
  • Date: Thu, 20 Aug 2009 15:55:44 +0200
  • Message-id: <E1MiTqF-0006Wq-TP@xxxxxxxxxxxxxxxx>
ref: refs/heads/network
commit 2540171ec00d9ec4eadcc8a22acacba9372882a1
Author: Jiri Suchomel <jsuchome@xxxxxxx>
Date: Thu Aug 20 15:55:44 2009 +0200

YaPI::Read takes runlevel as parameter and returns list of strings
added dependency on yast2 package
---
plugins/services/app/models/service.rb | 8 ++++----
.../package/yast2-webservice-services.changes | 7 +++++++
.../package/yast2-webservice-services.spec | 4 ++++
3 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/plugins/services/app/models/service.rb
b/plugins/services/app/models/service.rb
index 40bc3b2..2796314 100644
--- a/plugins/services/app/models/service.rb
+++ b/plugins/services/app/models/service.rb
@@ -21,7 +21,6 @@ class Service
cfg.each do |name, s|
service = Service.new
service.name = name
- # TODO read the service status?
Rails.logger.debug "custom service: #{service.inspect}"
services << service
end
@@ -29,15 +28,16 @@ class Service
Rails.logger.error e
end
else
- yapi_ret = YastService.Call("YaPI::SERVICES::Read")
+ rl = `runlevel`.split(" ").last
+ yapi_ret = YastService.Call("YaPI::SERVICES::Read", rl == "S" ? -1 :
rl.to_i)

if yapi_ret.nil?
raise "Can't get services list"
else
yapi_ret.each do |s|
service = Service.new
- service.name = s["name"]
-# service.status= s["status"] read on demand, this takes much time
+ service.name = s
+ # read status on demand, it takes much time
Rails.logger.debug "service: #{service.inspect}"
services << service
end
diff --git a/plugins/services/package/yast2-webservice-services.changes
b/plugins/services/package/yast2-webservice-services.changes
index c1709a4..cfb8a70 100644
--- a/plugins/services/package/yast2-webservice-services.changes
+++ b/plugins/services/package/yast2-webservice-services.changes
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Thu Aug 20 15:47:27 CEST 2009 - jsuchome@xxxxxxx
+
+- simplified: only one controler and model, index and update actions
+- model uses YaPI and SCR libraries to access the system
+- YaPI based policy file
+
+-------------------------------------------------------------------
Wed Jun 24 10:40:44 CEST 2009 - mvidner@xxxxxxx

- /services shows all services, not just fakes (but avoids "halt")
diff --git a/plugins/services/package/yast2-webservice-services.spec
b/plugins/services/package/yast2-webservice-services.spec
index 512f2a8..e96556d 100644
--- a/plugins/services/package/yast2-webservice-services.spec
+++ b/plugins/services/package/yast2-webservice-services.spec
@@ -23,6 +23,10 @@ Source1: org.opensuse.yast.system.services.policy
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch

+# YaPI/SERVICES.pm
+Requires: yast2 >= 2.17.10.1
+
+
#
%define pkg_user yastws
%define plugin_name services
--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages