Mailinglist Archive: yast-devel (163 mails)

< Previous Next >
[yast-devel] Re: [yast-commit] <rest-service> master : Switched to the InvalidParameters exception.
  • From: Josef Reidinger <jreidinger@xxxxxxx>
  • Date: Mon, 21 Sep 2009 13:32:23 +0200
  • Message-id: <200909211332.23651.jreidinger@xxxxxxx>
On Monday 21 September 2009 12:48:10 Martin Vidner wrote:
ref: refs/heads/master
commit 31a423025739c568c47ccd8a49faca381da583da
Author: Martin Vidner <mvidner@xxxxxxx>
Date: Mon Sep 21 12:18:07 2009 +0200

Switched to the InvalidParameters exception.
---
.../app/controllers/network/dns_controller.rb | 2 +-
.../app/controllers/network/hostname_controller.rb | 2 +-
.../controllers/network/interfaces_controller.rb | 2 +-
.../app/controllers/network/routes_controller.rb | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/plugins/network/app/controllers/network/dns_controller.rb
b/plugins/network/app/controllers/network/dns_controller.rb index
810b7df..bcfe961 100644
--- a/plugins/network/app/controllers/network/dns_controller.rb
+++ b/plugins/network/app/controllers/network/dns_controller.rb
@@ -11,7 +11,7 @@ class Network::DnsController < ApplicationController
def update
root = params[:dns]
if root == nil
- render ErrorResult.error(404, 2, "format or internal error") and
return + raise InvalidParameters.new [{:name => "Dns", :error =>
"Missing"}] end

root["searches"]=root["searches"].split
diff --git a/plugins/network/app/controllers/network/hostname_controller.rb
b/plugins/network/app/controllers/network/hostname_controller.rb index
cd85d66..86c51d3 100644
--- a/plugins/network/app/controllers/network/hostname_controller.rb
+++ b/plugins/network/app/controllers/network/hostname_controller.rb
@@ -12,7 +12,7 @@ class Network::HostnameController <
ApplicationController
def update
root = params[:hostname]
if root == nil
- render ErrorResult.error(404, 2, "format or internal error") and
return + raise InvalidParameters.new [{:name => "Hostname", :error =>
"Missing"}] end

@hostname = Hostname.new(root)
diff --git
a/plugins/network/app/controllers/network/interfaces_controller.rb
b/plugins/network/app/controllers/network/interfaces_controller.rb index
5571039..a377a09 100644
--- a/plugins/network/app/controllers/network/interfaces_controller.rb
+++ b/plugins/network/app/controllers/network/interfaces_controller.rb
@@ -11,7 +11,7 @@ class Network::InterfacesController <
ApplicationController def update
root = params[:interfaces]
if root == nil
- render ErrorResult.error(404, 2, "format or internal error") and
return + raise InvalidParameters.new [{:name => "Interfaces", :error
=> "Missing"}] end

@iface = Interface.new(root)
diff --git a/plugins/network/app/controllers/network/routes_controller.rb
b/plugins/network/app/controllers/network/routes_controller.rb index
571d132..011620a 100644
--- a/plugins/network/app/controllers/network/routes_controller.rb
+++ b/plugins/network/app/controllers/network/routes_controller.rb
@@ -11,7 +11,7 @@ class Network::RoutesController < ApplicationController
def update
root = params[:routes]
if root == nil
- render ErrorResult.error(404, 2, "format or internal error") and
return + raise InvalidParameters.new [{:name => "Routes", :error =>
"Missing"}] end
@route = Route.find(root[:id])
@route.via = root[:via]


Hi, just note, that you don't need set name to humanized string, I already do
it, so just name parameter like if routes is not set, then you can set name to
"routes"
--
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 >
This Thread
  • No further messages