How to query RQM to get physical vs virtual lab resources
2 answers
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
- 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
NAME could be one of the following : "VirtualImage" or "PhysicalMachine" or "VirtualMachine"
enjoy
*piero
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.
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.