@@ -1494,7 +1494,7 @@ def process_represt_arguments( self, args, allapps ):
1494
1494
gcconfiguri = None
1495
1495
gcapp = allapps .get ('gc' ,None )
1496
1496
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" )
1498
1498
1499
1499
# 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)
1500
1500
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 ):
1541
1541
1542
1542
# get the query capability base URL
1543
1543
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
1545
1545
print ( f"querying for gc config { args .globalconfiguration } " )
1546
1546
conf = gc_query_on .execute_oslc_query ( qcbase , whereterms = [['dcterms:title' ,'=' ,f'"{ args .globalconfiguration } "' ]], select = ['*' ], prefixes = {rdfxml .RDF_DEFAULT_PREFIX ["dcterms" ]:'dcterms' })
1547
1547
if len ( conf .keys () ) == 0 :
@@ -1551,7 +1551,7 @@ def process_represt_arguments( self, args, allapps ):
1551
1551
gcconfiguri = list (conf .keys ())[0 ]
1552
1552
logger .info ( f"{ gcconfiguri = } " )
1553
1553
logger .debug ( f"{ gcconfiguri = } " )
1554
- queryparams ['oslc_config.context' ] = gcconfiguri
1554
+ queryparams ['oslc_config.context' ] = gcconfiguri # a GC configuration
1555
1555
1556
1556
# check the gc config uri exists - a GET from it shouldn't fail!
1557
1557
if not gcapp .check_valid_config_uri (gcconfiguri ,raise_exception = False ):
@@ -1597,15 +1597,23 @@ def process_represt_arguments( self, args, allapps ):
1597
1597
queryparams ['targetConfigUri' ] = targetconfig
1598
1598
queryparams ['sourceConfigUri' ] = config
1599
1599
else :
1600
+ # opt-out
1601
+ gcconfiguri = None
1600
1602
if not args .localconfiguration :
1601
1603
args .localconfiguration = f"{ args .project } Initial Stream"
1602
1604
config = p .get_local_config (args .localconfiguration )
1603
1605
queryon = p
1604
1606
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
1606
1611
if args .artifact_format == 'comparison' and args .targetconfiguration :
1612
+ # remove any configuration parameters!
1607
1613
if 'oslc_config.context' in queryparams :
1608
1614
del queryparams ['oslc_config.context' ]
1615
+ if 'vvc.configuration' in queryparams :
1616
+ del queryparams ['vvc.configuration' ]
1609
1617
1610
1618
if args .module :
1611
1619
# get the query capability base URL for requirements
0 commit comments