@@ -1494,7 +1494,7 @@ def process_represt_arguments( self, args, allapps ):
14941494 gcconfiguri = None
14951495 gcapp = allapps .get ('gc' ,None )
14961496 if not gcapp and args .globalconfiguration :
1497- raise Exception ( "gc app must be specified in APPSTRINGS/-A ( after the rm app) to use a global configuration - for exmaple use -A rm,gc" )
1497+ raise Exception ( "gc app must be specified in APPSTRINGS/-A, after the rm app, to use a global configuration - for exmaple use -A rm,gc" )
14981498
14991499 # most queries need a project and configuration - projects queried without a config will return data from the default configuraiotn (the default component's initial stream)
15001500 if args .all or args .collection or args .module or args .view or args .typename or args .resourceID or args .moduleResourceID or args .coreResourceID or args .schema or args .attributes or args .titles or args .linksOnly or args .history or args .artifact_format == 'views' :
@@ -1541,7 +1541,7 @@ def process_represt_arguments( self, args, allapps ):
15411541
15421542 # get the query capability base URL
15431543 qcbase = gc_query_on .get_query_capability_uri ("oslc_config:Configuration" )
1544- # query for a configuration with title
1544+ # query gcm for a configuration with title
15451545 print ( f"querying for gc config { args .globalconfiguration } " )
15461546 conf = gc_query_on .execute_oslc_query ( qcbase , whereterms = [['dcterms:title' ,'=' ,f'"{ args .globalconfiguration } "' ]], select = ['*' ], prefixes = {rdfxml .RDF_DEFAULT_PREFIX ["dcterms" ]:'dcterms' })
15471547 if len ( conf .keys () ) == 0 :
@@ -1551,7 +1551,7 @@ def process_represt_arguments( self, args, allapps ):
15511551 gcconfiguri = list (conf .keys ())[0 ]
15521552 logger .info ( f"{ gcconfiguri = } " )
15531553 logger .debug ( f"{ gcconfiguri = } " )
1554- queryparams ['oslc_config.context' ] = gcconfiguri
1554+ queryparams ['oslc_config.context' ] = gcconfiguri # a GC configuration
15551555
15561556 # check the gc config uri exists - a GET from it shouldn't fail!
15571557 if not gcapp .check_valid_config_uri (gcconfiguri ,raise_exception = False ):
@@ -1597,15 +1597,23 @@ def process_represt_arguments( self, args, allapps ):
15971597 queryparams ['targetConfigUri' ] = targetconfig
15981598 queryparams ['sourceConfigUri' ] = config
15991599 else :
1600+ # opt-out
1601+ gcconfiguri = None
16001602 if not args .localconfiguration :
16011603 args .localconfiguration = f"{ args .project } Initial Stream"
16021604 config = p .get_local_config (args .localconfiguration )
16031605 queryon = p
16041606 queryon .set_local_config (config ,gcconfiguri )
1605- queryparams ['oslc_config.context' ] = config or gcconfiguri
1607+ if gcconfiguri :
1608+ queryparams ['oslc_config.context' ] = gcconfiguri
1609+ else :
1610+ queryparams ['vvc.configuration' ] = config
16061611 if args .artifact_format == 'comparison' and args .targetconfiguration :
1612+ # remove any configuration parameters!
16071613 if 'oslc_config.context' in queryparams :
16081614 del queryparams ['oslc_config.context' ]
1615+ if 'vvc.configuration' in queryparams :
1616+ del queryparams ['vvc.configuration' ]
16091617
16101618 if args .module :
16111619 # get the query capability base URL for requirements
0 commit comments