On 07/27/2009 01:01 PM, Simon Woolsgrove wrote:
Apologies if I have coded this real bad, still getting head around the cobbler, so let me know if there is a better way to do this.

This patch is to support adding the correct static ip entries when cobbler buildiso is used for systems, currently it just looks at eth0 even if ksdevice=vmnic?, eth? or  mac address other than eth0.  I have just done this against the 1.6 base, but can also do master if this is any good.

Cheers,
Simon


  

_______________________________________________ cobbler-devel mailing list cobbler-devel@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/cobbler-devel

Patch needs to be applied against master.

Also, implementation wise, it would be better to do something like (caution:  pseudocode-ish typing my thoughts, may not 100% compile directly):

blended = utils.blender(api_handle, object_root, False)   # don't collapse to strings
ksdevice = blended.get("ksdevice")
if obj.interfaces.has_key(ksdevice):
    primary_interface = ksdevice


Right?   That seems to pick primary_interface a bit faster.