Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Set reference to a Lab Resource in a Request programmaticaly

Hi all -

I'm using the putArtifact method in the RQMRestClient class provided with the RQM REST Client code -
My goal is to do the following steps from my client code:
- create a Request
- fulfill the Request
- reserve a Lab Resource based on the request attributes -

I'm fine with these steps, and they work fine, but I have only a problem I'd like to address and solve.
Once I have identified the Lab Resource to be In the Request, I'm not able to set the reference to the lab resource in the Request.
I have noticed that the reference to the reserved Resource in a Request is in the <configuration> section, as for this example :

<ns2>
<identifier>request/RQ1</identifier>
<ns2>1</ns2>
<ns2>2011-03-16T23:00:00.000Z</ns2>
<ns2>2011-03-16T09:44:34.647Z</ns2>
<ns2>Request 1 </ns2>
-....................
<ns2>
{"Assets":{"AssetInstance":}}}}}]}},"theIdentifier":"_EASt8E-yEeC3cbH1m29F3w"}]}}
</ns2>
<ns2>
........

The Request object exposes a method setConfiguration, that accepts a String as parameter. so my idea is to use this method to set the reference to lab resource, but I don't know how to generate the string the method is expecting, since I do not have any way (at least for my knowledge) to get the "identifier" of the Lab Resource...

Anyone can explain me how to use it??

thanks in advance
*piero

0 votes



One answer

Permanent link
Hi Piero,
The configuration in a Request describes the desired configuration, not a physical asset.
For instance, I am "requesting a machine with 1GB RAM". This is a description of the machine I am requesting and that is what getConfiguration/setConfiguration represents.
The Lab Resource is a physical machine - i.e. I am reserving myMachine.ibm.com which has 1GB of RAM. I suspect you want to set the lab resource that is reserved as part of the request? If that is the case, that is set via the Reservation and not the Request.
Hope that helps.

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Mar 22 '11, 11:20 a.m.

Question was seen: 4,518 times

Last updated: Mar 22 '11, 11:20 a.m.

Confirmation Cancel Confirm