It's all about the answers!

Ask a question

Creating new root labresourceattribute using API


Wayne Belshaw (14887) | asked Dec 23 '11, 11:14 a.m.
Paul,
The API seems quite specific that users must select CPU, Operating Systems or Software Install as the qm:parent for creating a new labresourceattribute.

I am able to create a new root labresourceattribute using the GUI but need to confirm if the description below is stating that I CANNOT use the API currently to create new root entries, e.g., Switch (and I would add additional switch model types via API).

Please confirm if this is a limitation? If not, how do I set the root in the labresourceattribute XML to use my new root name "Switch?"

From API description for labresourceattribute:

"A Lab Resource Attribute can be used to add data to the lab resource catalog. This resource may only be use to add to the system, there is no DELETE for this service. The name of the new attribute must be indicated as the Id in the URL. The types that may be extended by this mechanism are: CPU, Operating System and Software Install. The parent where this attribute will show up in the hierarchy must also be indicated. If the new attribute is to be put at the root of the hierarchy, a special keyword must be used for the parent. These are: CPU, OperatingSystem and SoftwareInstall."

13 answers



permanent link
Paul Slauenwhite (8.4k12) | answered Jan 03 '12, 2:27 p.m.
FORUM MODERATOR / JAZZ DEVELOPER
Wayne, you cannot create a your own root labresourceattribute; only decedents of the CPU, OperatingSystem and SoftwareInstall labresourceattribute.

permanent link
Wayne Belshaw (14887) | answered Jan 03 '12, 2:30 p.m.
Wayne, you cannot create a your own root labresourceattribute; only decedents of the CPU, OperatingSystem and SoftwareInstall labresourceattribute.


Hi Paul,
That's what the document seemed to indicate.

If I use the GUI to create my own additional root attributes, can I use the API to populate and/or edit those manually-added children attributes? Just curious...

Thanks.

permanent link
Paul Slauenwhite (8.4k12) | answered Jan 03 '12, 2:31 p.m.
FORUM MODERATOR / JAZZ DEVELOPER
Correct!

permanent link
Wayne Belshaw (14887) | answered Jan 05 '12, 9:20 a.m.
Correct!


That worked! Thanks Paul.

On a separate, unrelated note...

I thought RQM allowed users to select multiple TERs or Test Cases (in one or more views) and allow PASS/FAIL of the selected group all at once? I have observed that I'm only offered the "Run Offline" option when more than one is selected. We have some power users that want to select several tests inside the RQM GUI and PASS/FAIL them without having to go offline. Is this not a feature of RQM?

Thanks.

permanent link
Paul Slauenwhite (8.4k12) | answered Jan 05 '12, 10:10 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
See http://publib.boulder.ibm.com/infocenter/clmhelp/v3r0m1/topic/com.ibm.rational.test.qm.doc/topics/c_record_results_without_execution.html.

permanent link
Wayne Belshaw (14887) | answered Jan 05 '12, 10:19 a.m.
See http://publib.boulder.ibm.com/infocenter/clmhelp/v3r0m1/topic/com.ibm.rational.test.qm.doc/topics/c_record_results_without_execution.html.


Thanks Paul! Lots of "easter eggs" buried in some of the icons. Nice.

Last question on this thread I hope...

I notice that my PUTs of new attributes result in 201 code as expected. Any subsequent attempt to PUT with the same info results in a 400 code instead of a 200 code (update code). Is this expected and does this mean that the API should NOT be used to modify existing entries?

Thanks again.

permanent link
Paul Slauenwhite (8.4k12) | answered Jan 05 '12, 11:14 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
No, PUT requests are used to create new and/or update existing test artifacts (see https://jazz.net/wiki/bin/view/Main/RqmApi#Usage_Basics). It sounds like you are attempting to update a property with an invalid value (only a guess). I would suggest looking at the system log (https://jazz.net/wiki/bin/view/Main/RqmApi#Logging_Messages) for more details on the error (see 400 in http://en.wikipedia.org/wiki/List_of_HTTP_status_codes#4xx_Client_Error).

permanent link
Wayne Belshaw (14887) | answered Jan 05 '12, 11:23 a.m.
No, PUT requests are used to create new and/or update existing test artifacts (see https://jazz.net/wiki/bin/view/Main/RqmApi#Usage_Basics). It sounds like you are attempting to update a property with an invalid value (only a guess). I would suggest looking at the system log (https://jazz.net/wiki/bin/view/Main/RqmApi#Logging_Messages) for more details on the error (see 400 in http://en.wikipedia.org/wiki/List_of_HTTP_status_codes#4xx_Client_Error).


Thanks Paul...keep in mind that I used the exact same command twice. I issued it on a DOS command line and it returned 201 (expected). I repeated the exact same command and it returned 400. I changed nothing. I could only conclude that my attempt to update the object created the problem. To repeat, I did not change the URL or the XML content for this experiment. Does this help?

Here is URL and XML (assuming they display OK in this editor):

-filepath C:\VDX6730abc.xml
-url https://hq1-up-almapp-1.brocade.com:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/SQA_NOS_202/labresourceattribute/VDX6730abc

<xml>
<labresourceattribute>
<dc>VDX6730abc</dc>
<qm>Switches</qm>
</labresourceattribute>

permanent link
Paul Slauenwhite (8.4k12) | answered Jan 05 '12, 12:15 p.m.
FORUM MODERATOR / JAZZ DEVELOPER
As mentioned, the System log contains the following exception.:

java.lang.IllegalArgumentException: Duplicate lab resource type specified: VDX6730abc.

As such, this is a defect since labresourceattribute resources cannot be updated. Please open a defect (https://jazz.net/jazz02/web/projects/Rational%20Quality%20Manager#action=com.ibm.team.workitem.newWorkItem).

permanent link
Wayne Belshaw (14887) | answered Jan 11 '12, 7:02 p.m.
As mentioned, the System log contains the following exception.:

java.lang.IllegalArgumentException: Duplicate lab resource type specified: VDX6730abc.

As such, this is a defect since labresourceattribute resources cannot be updated. Please open a defect (https://jazz.net/jazz02/web/projects/Rational%20Quality%20Manager#action=com.ibm.team.workitem.newWorkItem).


Paul,
I have automation of the Types working with the catalog now. When I push the info into the API, it is taking 5-10 SECONDS to return with a 201 code. With cases, plans and other attributes it is around 300 msec per transaction using the RQMUrlUtility in 3.0.1.

Can you help explain why there is so much overhead with the catalog update process? Fortunately, this is something we typically only do once per project but it is still painful.

Thanks!

Your answer


Register or 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.