@@ -52,24 +52,24 @@ def load_components_and_configurations(self,force=False):
5252 if not self .is_optin :
5353 logger .debug ( f"{ self .is_optin = } " )
5454 # get the default configuration
55- projx = self .execute_get_xml (self .reluri ('rm-projects/' + self .iid ) )
55+ projx = self .execute_get_xml ( self .reluri ( 'rm-projects/' + self .iid ), intent = "Retrieve the project definition (opt-out)" )
5656 compsu = rdfxml .xmlrdf_get_resource_text ( projx , './/jp06:components' )
57- compsx = self .execute_get_xml (compsu )
57+ compsx = self .execute_get_xml (compsu , intent = "Retrieve the component definition (opt-out)" )
5858 defaultcompu = rdfxml .xmlrdf_get_resource_uri ( compsx , './/oslc_config:component' )
59-
59+
6060 # register the only component
6161 ncomps += 1
6262 self ._components [defaultcompu ] = {'name' : self .name , 'configurations' : {}}
6363 thisconfu = defaultcompu + "/configurations"
64- configs = self .execute_get_json (thisconfu )
64+ configs = self .execute_get_json ( thisconfu , intent = "Retrieve all configurations (opt-out)" )
6565 configdetails = configs [defaultcompu + "/configurations" ]
6666 if type (configs [thisconfu ]["http://www.w3.org/2000/01/rdf-schema#member" ])== dict :
6767 confs = [configs [thisconfu ]["http://www.w3.org/2000/01/rdf-schema#member" ]]
6868 else :
6969 confs = configs [thisconfu ]["http://www.w3.org/2000/01/rdf-schema#member" ]
7070 for aconf in confs :
7171 confu = aconf ['value' ]
72- confx = self .execute_get_xml (confu )
72+ confx = self .execute_get_xml ( confu , intent = "Retrieve configuration definition (opt-out)" )
7373 conftitle = rdfxml .xmlrdf_get_resource_text (confx ,'.//dcterms:title' )
7474 conftype = 'Stream' if 'stream' in confu else 'Baseline'
7575 self ._components [defaultcompu ]['configurations' ][confu ] = {'name' : conftitle , 'conftype' : conftype , 'confXml' : confx }
@@ -85,7 +85,7 @@ def load_components_and_configurations(self,force=False):
8585 # <dcterms:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string">View Definition Query Capability</dcterms:title>
8686 # </oslc:QueryCapability>
8787
88- px = self .execute_get_xml (self .project_uri )
88+ px = self .execute_get_xml ( self .project_uri , intent = "Retrieve project definition" )
8989
9090 sx = self .get_services_xml ()
9191 assert sx is not None , "sx is None"
@@ -94,10 +94,10 @@ def load_components_and_configurations(self,force=False):
9494
9595 ncomps += 1
9696 self ._components [compuri ] = {'name' : self .name , 'configurations' : {}}
97- configs = self .execute_get_xml (compuri + "/configurations" )
97+ configs = self .execute_get_xml ( compuri + "/configurations" , intent = "Retrieve all project/component configurations (singlemode)" )
9898 for conf in rdfxml .xml_find_elements (configs ,'.//rdfs:member' ):
9999 confu = rdfxml .xmlrdf_get_resource_uri (conf )
100- thisconfx = self .execute_get_xml (confu )
100+ thisconfx = self .execute_get_xml ( confu , intent = "Retrieve a configuration definition (singlemode)" )
101101 conftitle = rdfxml .xmlrdf_get_resource_text (thisconfx ,'.//dcterms:title' )
102102 # e.g. http://open-services.net/ns/config#Stream
103103 isstr = rdfxml .xml_find_element ( thisconfx ,'.//oslc_config:Stream' )
@@ -124,7 +124,7 @@ def load_components_and_configurations(self,force=False):
124124 components_uri = rdfxml .xmlrdf_get_resource_uri (cmsp_xml , './/rdf:Description/rdf:type[@rdf:resource="http://open-services.net/ns/core#QueryCapability"]/../oslc:resourceType[@rdf:resource="http://open-services.net/ns/config#Component"]/../oslc:queryBase' )
125125 logger .info ( f"{ components_uri = } " )
126126 # get all components
127- crx = self .execute_get_xml (components_uri )
127+ crx = self .execute_get_xml ( components_uri , intent = "Retrieve component definition" )
128128
129129# <oslc_config:Component rdf:about="https://jazz.ibm.com:9443/qm/oslc_config/resources/com.ibm.team.vvc.Component/_iw4s4EB3Eeus6Zk4qsm_Cw">
130130# <dcterms:title rdf:parseType="Literal">SGC Agile</dcterms:title>
@@ -146,13 +146,13 @@ def load_components_and_configurations(self,force=False):
146146 self ._components [compu ] = {'name' : comptitle , 'configurations' : {}}
147147 ncomps += 1
148148 confu = rdfxml .xmlrdf_get_resource_uri (component_el , './/oslc_config:configurations' )
149- configs_xml = self .execute_get_rdf_xml ( confu )
149+ configs_xml = self .execute_get_rdf_xml ( confu , intent = "Retrieve all project/component configuration definitions" )
150150 # Each config: <ldp:contains rdf:resource="https://jazz.ibm.com:9443/qm/oslc_config/resources/com.ibm.team.vvc.Configuration/_qT1EcEB4Eeus6Zk4qsm_Cw"/>
151151
152152 for confmemberx in rdfxml .xml_find_elements (configs_xml , './/ldp:contains' ):
153153 thisconfu = rdfxml .xmlrdf_get_resource_uri ( confmemberx )
154154 try :
155- thisconfx = self .execute_get_rdf_xml (thisconfu )
155+ thisconfx = self .execute_get_rdf_xml ( thisconfu , intent = "Retrieve a configuration definition" )
156156 conftitle = rdfxml .xmlrdf_get_resource_text (thisconfx , './/dcterms:title' )
157157 conftype = rdfxml .xmlrdf_get_resource_uri (thisconfx , './/rdf:type' )
158158 logger .info ( f"Found config { conftitle } { conftype } { thisconfu } " )
@@ -267,7 +267,7 @@ def type_name_from_uri(self, uri):
267267 id = match .group (1 )
268268 else :
269269 # retrieve the definition
270- resource_xml = self .execute_get_rdf_xml (reluri = uri )
270+ resource_xml = self .execute_get_rdf_xml ( reluri = uri , intent = "Retrieve type definition to get its name" )
271271 # check for a rdf label (used for links, maybe other things)
272272 id = rdfxml .xmlrdf_get_resource_text (resource_xml ,".//rdf:Property/rdfs:label" ) or rdfxml .xmlrdf_get_resource_text (resource_xml ,".//oslc:ResourceShape/dcterms:title" ) or rdfxml .xmlrdf_get_resource_text (resource_xml ,f'.//rdf:Description[@rdf:about="{ uri } "]/rdfs:label' )
273273 if id is None :
@@ -290,7 +290,7 @@ def is_resource_uri(self, uri):
290290 # for OSLC query, given a resource URI, return the requirement dcterms:identifier
291291 def resource_id_from_uri (self , uri ):
292292 if self .is_resource_uri (uri ):
293- resource_xml = self .execute_get_rdf_xml (reluri = uri )
293+ resource_xml = self .execute_get_rdf_xml (reluri = uri , intent = "Retrieve resource dcterms:identifier" )
294294 id = rdfxml .xmlrdf_get_resource_text (resource_xml , ".//dcterms:identifier" )
295295 return id
296296 raise Exception (f"Bad resource uri { uri } " )
@@ -381,12 +381,12 @@ class _QMApp(_app._App, oslcqueryapi._OSLCOperations_Mixin, _typesystem.Type_Sys
381381
382382 def __init__ (self , server , contextroot , jts = None ):
383383 super ().__init__ (server , contextroot , jts = jts )
384- self .rootservices_xml = self .execute_get_xml (self .reluri ('rootservices' ))
384+ self .rootservices_xml = self .execute_get_xml (self .reluri ('rootservices' ), intent = "Retrieve QM application rootservices" )
385385 self .serviceproviders = 'oslc_qm_10:qmServiceProviders'
386386 self .default_query_resource = "oslc_config:Configuration"
387387
388- self .version = rdfxml .xmlrdf_get_resource_text (self .rootservices_xml ,'.//oslc_rm_10 :version' )
389- self .majorversion = rdfxml .xmlrdf_get_resource_text (self .rootservices_xml ,'.//oslc_rm_10 :majorVersion' )
388+ self .version = rdfxml .xmlrdf_get_resource_text (self .rootservices_xml ,'.//rqm :version' )
389+ self .majorversion = rdfxml .xmlrdf_get_resource_text (self .rootservices_xml ,'.//rqm :majorVersion' )
390390 logger .info ( f"Versions { self .majorversion } { self .version } " )
391391
392392 def _get_headers (self , headers = None ):
@@ -533,7 +533,7 @@ def process_represt_arguments( self, args, allapps ):
533533 if args .report :
534534 typestodo = []
535535 # get the schema, walk it building the tree of fields
536- schema_x = self .execute_get_xml (queryurl + "?metadata=schema" ).getroot ()
536+ schema_x = self .execute_get_xml (queryurl + "?metadata=schema" , intent = "Retrieve Reportable REST schema" ).getroot ()
537537# print( f"{schema_x.tag=}" )
538538# print( f"{schema_x=}" )
539539 el_x = rdfxml .xml_find_element ( schema_x , "./xs:element" )
0 commit comments