I think I see part of the problem. I was expecting the snapins to be attached to the group, but looking at this code in group.class.php, it appears that the snapins just get attached to each MEMBER of the group:
public function addSnapin($addArray)
{
$insert_fields = array('hostID', 'snapinID');
$insert_values = array();
$hosts = $this->get('hosts');
if (count($hosts) > 0) {
array_walk(
$hosts,
function (
&$hostID,
$index
) use (
&$insert_values,
$addArray
) {
foreach ($addArray as $snapinID) {
$insert_values[] = array($hostID, $snapinID);
}
}
);
}
I snooped around by adding some syslog messages, and it does seem that the foreach loop above is what’s invoked when I try to add a snapin to a group.
Is that what should happen? Is this possibly something that is different in the newer version of fog?