Is there a way to get all test artifacts for specific GC stream with only GC URI context as parameter or Header using OSLC api?
Hello Team,
Currently we are using the query to fetch all the testplans for particular stream added under a GC tree.
https://server/qm/oslc_qm/contexts/processAreaUUID/resources/com.ibm.rqm.planning.VersionedTestPlan?oslc_config.context=localStreamUUID along with
https://server/qm/oslc_qm/contexts/processAreaUUID/resources/com.ibm.rqm.planning.VersionedTestPlan?oslc_config.context=localStreamUUID along with
header “Configuration-Context” : https://server/gc/configuration/361.Above URL works fine. But is there a way to find all the test artifacts without passing parameter of
localStreamUUID ?
We are expecting something like below :
https://server/qm/oslc_qm/contexts/processAreaUUID/resources/com.ibm.rqm.planning.VersionedTestPlan?oslc_config.context=https://server/gc/configuration/361
localStreamUUID ?
We are expecting something like below :
https://server/qm/oslc_qm/contexts/processAreaUUID/resources/com.ibm.rqm.planning.VersionedTestPlan?oslc_config.context=https://server/gc/configuration/361
One answer
Requests may either include a
oslc_config.context
parameter or a
Configuration-Context
header. The OSLC Configuration Management specification at https://docs.oasis-open-projects.org/oslc-op/config/v1.0/psd01/config-resources.html#configcontext says:
A server MUST support both these methods of passing configuration context. [CONFIG-RES-82]
If a request contains both a header and a query string, the server MUST use the query string. Servers MUST reject requests that contain two or more different configuration contexts passed in query strings. [CONFIG-RES-83]
Note that
oslc_config.context
should be a URL encoded URI of a configuration. Specifying just some UUID is not valid usage according to the OSLC Configuration Management specification. Since you specified both a query string and a header, the query string should be used, and the header value ignored.
Assuming that https://server/gc/configuration/361 is a correct GC URI, then
https://rb-alm-11-p.de.bosch.com/qm/oslc_qm/contexts/_JcxK8FtpEemmsaDgWtsYZQ/resources/com.ibm.rqm.planning.VersionedTestPlan?oslc_config.context=https%3A%2F%2Fserver%2Fgc%2Fconfiguration%2F361
should work. OSLC compliant servers must accept URIs of global configurations and local configurations. If ETM does not, that would be an ETM defect.
Best regards,
David