DataSift\Storyplayer\HostLib\PhysicalHosts::destroyHost PHP Method

destroyHost() public method

public destroyHost ( stdClass $groupDef ) : void
$groupDef stdClass
return void
    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();
    }