On Thu, Sep 26, Josef Reidinger wrote:

> In src/modules/Routing.rb:
> 
> > @@ -280,10 +298,14 @@ def Import(settings)
> >      # @return autoinstallation settings
> >      def Export
> >        exproute = {}
> > -      if Ops.greater_than(Builtins.size(Builtins.eval(@Routes)), 0)
> > -        Ops.set(exproute, "routes", Builtins.eval(@Routes))
> > -      end
> > -      Ops.set(exproute, "ip_forward", @Forward)
> > +
> > +      routes = Builtins.eval(@Routes)
> > +
> > +      exproute[ "routes"] = routes if routes.size > 0
> > +      exproute[ "ip_forward"] = @Forward_v4
> > +      # FIXME:
> > +      # Separated option for IPv6 forwarding enablement in AutoYast has to be introduced
> 
> I think you can introduce it yourself if you change rng file for network
> autoyast part. Ask @thomas-fehr for details.

Indeed if you extend ./src/config/networking.rnc accordingly you can add 
arbitrary new keys. client "lan_auto" creates them and base autoyast just puts 
them into <networking> section in profile. 

You need to stay backward compatible though.

What you must not do is depend on the presence of a key that was not there
in previous versions of lan_auto. So if you add e.g. "ip_forward6" you need
a default when accessing it, since "ip_forward6" it will not be present in 
old autoyast profiles.

Similar if you would e.g. decide to add (for clarification reasons) new keys
"ip_forward4" and "ip_forward6". You would need to also keep code that
maps old key "ip_forward" to the two new keys during Import() call in 
lan_auto.rb. So Import() needs to cope reasonable with arbitrary old xml 
settings while Export() can create newer ones. So if you would decide to
replace "ip_forward" by two keys "ip_forward4" and "ip_forward6" you would
handle (obsolete) key "ip_forward" in Import() call and export 
"ip_forward4" and "ip_forward6" (and no "ip_forward" any more) in Export()
call. 

Which approach you take is up to you: 
- Just adding "ip_forward6" is less work
- Splitting "ip_forward" into "ip_forward4" and "ip_forward6" gives more
  clarity to user.

Tschuess, 
	Thomas Fehr
-- 
  Thomas Fehr, SuSE Linux Products GmbH, Maxfeldstr. 5, 90409 Nuernberg, Germany
  GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)
  Tel: +49-911-74053-0,  Fax: +49-911-74053-482,  Email: fehr@suse.de
  GPG public key available.