Adding support for nested hostgroups

Yann DIRSON yann.dirson at sagem.com
Thu Apr 14 15:20:20 CEST 2005


AFAIK, it is currently not possible to declare one hostgroup to contain 
all members of another group.  Such a capability would be very useful to 
us, so I've had a look at how it could be done in 2.0b3.

I would add a "member_hostgroups" attribute to the hostgroup config 
object, and the content of this attribute would be passed to 
xodtemplate_expand_hostgroups_and_hosts() (instead of NULL) from 
xodtemplate_recombobulate_hostgroups().

Then we would have to make sure all hostgroups depended on were in fact 
expanded first, so recombobulate_hostgroups() should do a topological sort 
of hostgroups first.
This also implies the "process all hosts that have hostgroup directives" 
loop should be moved first.

Would there be any annoying side-effects to sort 
xodtemplate_hostgroup_list in-place, or any other thing I would have 
missed at first look ?
If not, it looks like it would only be an half-an-hour coding session to 
get this running :)



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click




More information about the Developers mailing list