[gold-users] listing jobs charged to a specific allocation
Scott Jackson
scottmo at adaptivecomputing.com
Mon Mar 8 17:25:39 MST 2010
Kevin,
Look in a client command like glsaccount for examples:
It'll probably be something like:
if ($response->getStatus() ne "Failure")
{
my $doc = XML::LibXML::Document->new();
my $data = $response->getDataElement();
$doc->setDocumentElement($data);
# Iterate over each row of data
foreach my $row ($data->childNodes())
{
my $jobId=
($row->getChildrenByTagName("JobId"))[0]->textContent();
push(@jobIds, $jobId);
}
Scott
Kevin Van Workum wrote:
> On Mon, Mar 8, 2010 at 3:33 PM, Kevin Van Workum <vanw at sabalcore.com> wrote:
>
>> I'm trying to create a command that will list jobs that have been
>> charged to a specific allocation. I realize I can use "glstxn -i Id -O
>> Job", but that lists the transactions. I want to get the list of jobs.
>> I could first use glstxn, then use glsjob for each job found, but is
>> there a more efficient way. Maybe something like:
>>
>> my $request = new Gold::Request(object => "Job", action => "Query");
>> Gold::Client::buildSupplements($request);
>> $request->setCondition("AllocationId", "123");
>>
>>
>
> Also, assuming I've done this:
>
> my $request = new Gold::Request(object => "Transaction", action
> => "Query");
> Gold::Client::buildSupplements($request);
> $request->setCondition("Allocation", $allocation);
> $request->setCondition("Object", "Job");
> $request->setSelection("JobId");
> my $response = $request->getResponse();
>
> How do I create an array, @jobids, that contains all the JobId values
> in the response?
> _______________________________________________
> gold-users mailing list
> gold-users at supercluster.org
> http://www.supercluster.org/mailman/listinfo/gold-users
>
More information about the gold-users
mailing list