What is the gcUri parameter that CLM RM DNG 6.0.3 requests?
HTTP Get requests to the DNG Query Capability now fail with a Response asking for a mandatory gcUri parameter. What value should be supplied and in which Header or URL Parameter should it appear?
3 answers
Hi Lonnie,
Here's the syntax/explanation from the OSLC Configuration Management spec (https://tools.oasis-open.org/version-control/svn/oslc-ccm/trunk/specs/config-mgt/config-resources.html - Configuration Context section):
If you don't specify a context, your link might resolve to the artifact in the default stream.A client requests a specific configuration context in one of two ways:
- When performing a GET on a concept URI, add a
Configuration-Contextheader, passing the URI of a configuration resource as the value:Example 1GET /resources/conceptResourceA HTTP/1.1 Configuration-Context: http://example.com/configurations/myConfiguration1</pre> </div> </li> <li> When performing a GET on a concept URI, add a query string <code> oslc_config.context </code> and the encoded configuration URI to the end of the request URI: <div class="example"> <div class="example-title"> <span>Example 2</span> </div> <pre class="example">GET /resources/conceptResourceA?oslc_config.context=%3Chttp%3A//example.com/configurations/myConfiguration1%3E HTTP/1.1
</pre> </div> </li> </ul> If a request contains both a header and a query string, the server <i class="rfc2119" title="MUST">MUST</i> use the query string. Servers <i class="rfc2119" title="SHOULD">SHOULD</i> reject requests that contain two or more different configuration contexts passed in query strings. <p> Where the Configuration-Context header is used on a request, a server <i class="rfc2119" title="SHOULD">SHOULD</i> include in the response a header <code> Vary=Configuration-Context </code> so that different configuration contexts do not use a previously cached response. </p>
There are more details on how to integrate with config-management-enabled projects at https://jazz.net/wiki/bin/view/Deployment/IntegratingWithConfigurationManagementEnabledCLMApplications.
Hope that helps!
Comments
I have done some testing using my jazz.net sandbox RM project (CM-enabled) but not been able to trigger the complaint about gcUri. All my attempts successfully returned the requirements that I wanted. Here are some observations.
1. Start with the queryCapability URI found in the RM project's service document.
2. Add oslc.prefix, oslc.where and/or oslc.select as desired.
3. Add oslc_config.context (preferred) or vvc.configuration to specify a stream (in the local configuration), which looks like https://jazz.net/sandbox01-rm/cm/stream/_rZ1hkPJlEeaL6Oj2reeudg.
4. Optionally, add HTTP header Configuration-context (may work as a URL parameter as well) to specify the GC configuration, which looks like: Configuration-context : https://jazz.net/sandbox01-gc/configuration/1218.
5. When both Configuration-context and oslc_config.context/vvc.configuration are present, Configuration-context takes precedence. This means, if an RM stream/configuration is found in the specified GC configuration, the OSLC query is done in this stream, regardless what oslc_config.context/vvc.configuration specifies. However, if the GC configuration contains no RM stream/configuration, Configuration-context gets ignored, and the stream specified by oslc_config.context/vvc.configuration takes effect. My understanding is that it is not necessary to specify Configuration-context.
I did not do back-to-back comparison with an RM 6.0.2 environment so cannot comment on the difference between the two versions. As of this writing, jazz.net sandbox is at 6.0.3 iFix001.
Comments
Darn picky server. I found the issue.
Comments
Lonnie VanZandt
Feb 13 '17, 8:17 p.m.Lonnie VanZandt
Feb 12 '17, 11:32 p.m.Lonnie VanZandt
Feb 12 '17, 11:36 p.m.Lonnie VanZandt
Feb 12 '17, 11:37 p.m.Lonnie VanZandt
Feb 12 '17, 11:38 p.m.Lonnie VanZandt
Feb 13 '17, 10:52 p.m.Lonnie VanZandt
Feb 13 '17, 9:36 p.m.