public function destroyHost($groupDef)
{
// what are we doing?
$log = usingLog()->startAction("de-register blackbox(es)");
// de-register all the hosts
foreach ($groupDef->details->machines as $hostId => $machine) {
foreach ($machine->roles as $role) {
usingRolesTable()->removeHostFromAllRoles($hostId);
}
usingHostsTable()->removeHost($hostId);
}
// all done
$log->endAction();
}