Exemplo n.º 1
0
function registerLocalHost($client)
{
    echo "## Registering for localhost ##\n";
    $resourceDesc = createComputeResourceDescription("localhost", "LocalHost", null, null);
    $localhostId = $client->registerComputeResource($resourceDesc);
    $resourceJobManager = createResourceJobManager(ResourceJobManagerType::FORK, null, null, null);
    $submission = new LOCALSubmission();
    $submission->resourceJobManager = $resourceJobManager;
    $localSubmission = $client->addLocalSubmissionDetails($localhostId, 1, $submission);
    echo "registered " . $localSubmission . "\n";
    return $localhostId;
    // echo var_dump(ResourceJobManagerType::FORK);
}
Exemplo n.º 2
0
function registerHost($client, $resource)
{
    $resourceDesc = createComputeResourceDescription($resource->host, $resource->description, null, null);
    $hostId = $client->registerComputeResource($resourceDesc);
    $resourceJobManager = createResourceJobManager(ResourceJobManagerType::FORK, null, null, null);
    $submission = new LOCALSubmission();
    $submission->resourceJobManager = $resourceJobManager;
    $localSubmission = $client->addLocalSubmissionDetails($hostId, 1, $submission);
    echo "registered " . $localSubmission . "\n";
    return $hostId;
}