[netcf-devel] SuSE driver

Jonas Eriksson jonas.j.eriksson at ericsson.com
Fri Jun 26 08:16:05 UTC 2009


The things I have tried worked. I have a few problems, though:

' and " are not handeled. As bridges SuSE have their own
ifcfg-file, the BRIDGE_PORT contain the interfaces used in that
bridge, separated by whitespaces. My problem is mostly whether to
extend shellvars.aug to handle ' and ", or if this should be
handled in C/XSLT.

In SLE10, interfaces could be named after their mac address using
eth-id-<mac>. This is now defunct and handled by udev-rules, but
I have somewhat retained handling of this, but convert it to
ethX-syntax. However, when facing an interface-element in
netcf-xml with a mac address, I convert this to a
eth-id-interface in XSLT, and then to ethX in C by looking up the
mac. Instead of doing this, the driver should retain the original
ethX-name as an fallback in case the mac is not found.

Whenever using define in netcf, i get:
error: unspecified error
error: aug_save failed
After doing some dry runs with augtool, I have concluded that
this is most probably due to augeas trying to save the
address-files in /sys. Is this a problem when using
the initscript-driver as well? 

Currently, there is a mix between functions that accept name or
path. I am planning to clean up this mess, preferably
standardizing on name as argument.

I also have a few questions/opinions:

Should we include some general debug macros? I stole the ones
from libvirt and removed them before this post, and i had alot of
use for them, for example to see the <forest>-xml when doing a
define.

Alot of code are the same between the initscript driver, and
probably will be for other drivers as well. I recommend that this
code is broken out, for example to a Linux-helper? The same goes for
both C-code (e.g. handling of mac-address lookups) and XSLT (e.g.
bonding-options).

I changed the augeas save-behaviour to "backup" in the augeas
init function (which probably also could be lifted out to a
general helper file). I left it in there, since I like it alot,
but we should probably discuss it further.

Regards,
Jonas

--
Jonas Eriksson
Consultant at AS/EAB/FLJ/IL
Combitech AB
Älvsjö, Sweden


More information about the netcf-devel mailing list