Mailinglist Archive: yast-commit (2114 mails)

< Previous Next >
[yast-commit] <rest-service> network : delete empty configuration
  • From: Michal Zugec <mzugec@xxxxxxx>
  • Date: Wed, 16 Sep 2009 17:00:58 +0200
  • Message-id: <E1Mnw30-0003tL-Mu@xxxxxxxxxxxxxxxx>
ref: refs/heads/network
commit 530d2f662bece811d92e66247a6bab30c12ca6a0
Author: Michal Zugec <mzugec@xxxxxxx>
Date: Wed Sep 16 17:00:58 2009 +0200

delete empty configuration
---
plugins/network/app/models/interface.rb | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/plugins/network/app/models/interface.rb
b/plugins/network/app/models/interface.rb
index d28c5b8..f23c88a 100644
--- a/plugins/network/app/models/interface.rb
+++ b/plugins/network/app/models/interface.rb
@@ -36,12 +36,16 @@ class Interface
# Saves data from model to system via YaPI. Saves only setted data,
# so it support partial safe (e.g. save only new timezone if rest of fields
is not set).
def save
- settings = {
- @id => {
+ if @bootproto==""
+ settings = {@id=>{}}
+ else
+ settings = {
+ @id => {
"bootproto" => @bootproto,
"ipaddr" => @ipaddr
+ }
}
- }
+ end
vsettings = [ "a{sa{ss}}", settings ] # bnc#538050
YastService.Call("YaPI::NETWORK::Write",{"interface" => vsettings})
# TODO success or not?
--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages