It's all about the answers!

Ask a question

How to query RQM to get physical vs virtual lab resources


pietro marella (953130) | asked Aug 16 '11, 11:20 a.m.
Hello
I'm working with RQM 2.0 (latest ifix level)

I need to be able to programmatically (not from WUI) query RQM to list the lab resources it knows and be able to differentiate between physical and virtual resources -
what should be the right way to get this data?

thanks in advance
*piero

2 answers



permanent link
pietro marella (953130) | answered Aug 17 '11, 3:34 a.m.
For who is interested in - this is the answer to my question:

- There is no way to differentiate among "virtual" or "physical" lab resources when using the REST API (the field "type" for the lab resource is always set to "null" regardless the type of the resource)

- The only way to retrieve this info is to query directly the db -
After a lot of digging in the rqm log has been necessary, but here it is (it is for a Derby installation . could be you need to adapt it for DB2 schema:


SELECT * FROM LM.ABSTRACT_INSTANCE WHERE FAMILY_ITEM_ID in (SELECT ITEM_ID FROM LM.FAMILY WHERE PROJECT_AREA_ITEM_ID IN (SELECT ITEM_ID FROM PROCESS.PROCESS_AREA WHERE UNIQUE_NAME='<project>') AND NAME='VirtualImage')

NAME could be one of the following : "VirtualImage" or "PhysicalMachine" or "VirtualMachine"

enjoy

*piero

permanent link
Paul Slauenwhite (8.4k12) | answered Aug 17 '11, 10:08 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
NOTE: The RQM product team does not support nor advocate direct DB access against RQM data. The RQM Reportable REST API (https://jazz.net/wiki/bin/view/Main/RqmApi#Resources_and_their_Supported_Op) or OSLC QM V2 (http://open-services.net/bin/view/Main/QmSpecificationV2) in RQM 3.0.1+ are the encouraged methods for data interchange with the server.

I would suggest opening a work item (https://jazz.net/jazz02/web/projects/Rational%20Quality%20Manager#action=com.ibm.team.workitem.newWorkItem) to add this property to the labresource resource.

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.