diff options
Diffstat (limited to 'platform-logic/generic-resource-api/src/main/xml')
2 files changed, 94 insertions, 6 deletions
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_gw-vfmodule-update.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_gw-vfmodule-update.xml new file mode 100644 index 00000000..b2ec3406 --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_gw-vfmodule-update.xml @@ -0,0 +1,87 @@ +<service-logic xmlns='http://www.onap.org/sdnc/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='GENERIC-RESOURCE-API' version='${project.version}'><method rpc='gw-vfmodule-update' mode='sync'>
+<block>
+<set>
+<parameter name='tmp.brg-macaddress' value='fa:16:3e:8f:ea:68' />
+<parameter name='tmp.brg-mac-address-match' value='VGW2BRG-fa:16:3e:8f:ea:68'/>
+<!--
+<parameter name='tmp.consuming-service-instance-id' value='b3cb7040-f7a5-4beb-ad2f-2a893b7d374b' />
+service-data.service-topology.service-topology-identifier.service-instance-id
+
+-->
+<parameter name='tmp.consuming-service-instance-id' value='`$service-data.service-topology.service-topology-identifier.service-instance-id`' />
+</set><set>
+<parameter name='tmp.thisIsVGW' value='false' />
+</set><get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.mdsal.ConfigResource' resource='GENERIC-RESOURCE-API'
+ key='tunnelxconn-allotted-resources/' pfx='tmp.txconns' >
+ <outcome value='success'>
+<for index='txidx' start='0' end='`$tmp.txconns.tunnelxconn-allotted-resources.tunnelxconn-allotted-resource_length`' >
+
+
+<block atomic='true'><set>
+<parameter name='tmp.test1' value='`$tmp.txconns.tunnelxconn-allotted-resources.tunnelxconn-allotted-resource[$txidx].allotted-resource-data.tunnelxconn-topology.allotted-resource-identifiers.consuming-service-instance-id`' />
+<parameter name='tmp.test2' value='`$tmp.txconns.tunnelxconn-allotted-resources.tunnelxconn-allotted-resource-data[$txidx].tunnelxconn-topology[0].allotted-resource-identifiers[0].consuming-service-instance-id`' /></set><switch test='`$tmp.test1 == $tmp.consuming-service-instance-id`'><outcome value='true'>
+<set>
+<parameter name='tmp.thisIsVGW' value='true' />
+</set></outcome></switch></block></for></outcome></get-resource><switch test='`$tmp.thisIsVGW`'>
+<outcome value='true'>
+<block>
+<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.mdsal.ConfigResource' resource='VNF-API' key='preload-vnfs' pfx='tmp.preloadvnfdata' >
+</get-resource><for index='vnfidx' start='0' end='`$tmp.preloadvnfdata.preload-vnfs.vnf-preload-list_length`' >
+
+
+<block atomic='true'><set>
+<parameter name='tmp.test3' value='`$tmp.preloadvnfdata.preload-vnfs.vnf-preload-list[$vnfidx].vnf-name`' />
+<parameter name='tmp.test4' value='`$tmp.brg-mac-address-match`'/>
+
+
+</set><switch test='`$tmp.preloadvnfdata.preload-vnfs.vnf-preload-list[$vnfidx].vnf-name == $tmp.brg-mac-address-match`'>
+
+
+<outcome value='true'>
+<block>
+<set>
+<parameter name='tmp.endLoop1' value='`$tmp.preloadvnfdata.preload-vnfs.vnf-preload-list[$vnfidx].preload-data.vnf-topology-information.vnf-parameters_length`' /></set><for index='preloadIdx' start='0' end='`$tmp.endLoop1`'>
+<!--
+
+ "preload-data": {
+ "vnf-topology-information": {
+ "vnf-parameters": [
+
+ -->
+<block atomic='true'><set>
+<parameter name='tmp.vfmodule.param[$preloadIdx].name' value='`$tmp.preloadvnfdata.preload-vnfs.vnf-preload-list[$vnfidx].preload-data.vnf-topology-information.vnf-parameters[$preloadIdx].vnf-parameter-name`' />
+<parameter name='tmp.vfmodule.param[$preloadIdx].value' value='`$tmp.preloadvnfdata.preload-vnfs.vnf-preload-list[$vnfidx].preload-data.vnf-topology-information.vnf-parameters[$preloadIdx].vnf-parameter-value`' /></set></block></for><set>
+<parameter name='tmp.vfmodule.param_length' value='`$tmp.endLoop1`' />
+</set><execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >
+ <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' />
+ <parameter name='contextPrefix' value='prop' />
+</execute><set>
+<parameter name='tmp.restapi.service.vnf.vfmodule-resource' value='`$prop.restapi.service.vnf.vfmodule-resource`' />
+</set><set>
+<parameter name='tmp.vf-module-object-path'
+ value="`'restconf/config/GENERIC-RESOURCE-API:services/service/'
+ + $service-data.service-topology.service-topology-identifier.service-instance-id
+ + '/service-data/vnfs/vnf/'
+ + $service-data.vnfs.vnf[$vnf-index].vnf-id
+ + '/vnf-data/vf-modules/vf-module/'
+ + $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-id
+ + '/'`"/>
+</set><set>
+<!--
+<parameter name='tmp.service.vnf.vf-module.vg-mux-tunnel-vni' value='`$input.vni`' />
+-->
+<parameter name='tmp.service.vnf.vf-module.vg-mux-tunnel-vni' value='`$tmp.txconns.tunnelxconn-allotted-resources.tunnelxconn-allotted-resource[0].allotted-resource-data[0].tunnelxconn-topology[0].tunnelxconn-assignments[0].vni`' />
+
+
+
+</set><set>
+<!--
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.vf-module-parameters.param.'
+
+ service-data.vnfs.vnf\[0\]. vnf-data.vf-modules.vf-module\[0\] .vf-module-data.vf-module-topology.vf-module-parameters.param.
+ value='$tmp.vfmodule.' />
+-->
+<parameter name='service-data.vnfs.vnf[0].vnf-data.vf-modules.vf-module[0].vf-module-data.vf-module-topology.vf-module-parameters.'
+ value='$tmp.vfmodule.' /></set><execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
+<parameter name='filename' value='/var/tmp/bdf-gw-vfmodule.log' />
+</execute></block></outcome></switch></block></for></block></outcome></switch></block></method></service-logic>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-assign.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-assign.xml index 2855d9eb..f561acb9 100755 --- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-assign.xml +++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_vf-module-topology-operation-assign.xml @@ -36,7 +36,7 @@ <block>
<set>
<parameter name='vnf-index' value='`$idx`' />
-</set><break/></block></outcome></switch></for></outcome></switch><switch test='`$vnf-index`'>
+</set><break></break></block></outcome></switch></for></outcome></switch><switch test='`$vnf-index`'>
<outcome value='-1'>
<return status='failure'>
<parameter name='ack-final' value='Y'/>
@@ -103,7 +103,7 @@ </execute><set>
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.aic-clli'
value='`$aai-uid-split[$aai-uid-split_length - 1]`' />
-</set><break/></block></outcome></switch></for><switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.aic-clli`'>
+</set><break></break></block></outcome></switch></for><switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.aic-clli`'>
<outcome value=''><return status='failure'>
<parameter name='ack-final' value='Y'/>
<parameter name="error-code" value="500" />
@@ -231,7 +231,7 @@ <block>
<set>
<parameter name='network-index' value='`$idx`' />
-</set><break/></block></outcome></switch></for><switch test='`$network-index`'>
+</set><break></break></block></outcome></switch></for><switch test='`$network-index`'>
<outcome value='-1'>
<return status='failure'>
<parameter name='ack-final' value='Y'/>
@@ -542,7 +542,7 @@ key="INSERT INTO VIPR_CONFIGURATION (vnf_id, vnf_name, ecomp_service_instance_id <parameter name="field3" value="`$vf-module-topology-operation-input.sdnc-request-header.svc-request-id`"/>
<parameter name="field4" value="Failed to insert VIPR_CONFIGURATION record"/>
</record></outcome></save></block></for></for><set>
-<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.' value='tmp.vf-module-topology.' />
+<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-topology.' value='$tmp.vf-module-topology.' />
</set><set>
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.sdnc-request-header.'
value='$vf-module-topology-operation-input.sdnc-request-header.' />
@@ -557,7 +557,8 @@ key="INSERT INTO VIPR_CONFIGURATION (vnf_id, vnf_name, ecomp_service_instance_id <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-request-input.'
value='$vf-module-topology-operation-input.vf-module-request-input.' />
-</set><set>
+</set><call module='GENERIC-RESOURCE-API' rpc='gw-vfmodule-update' mode='sync' >
+</call><set>
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.order-status'
value='PendingCreate' />
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-module-index].vf-module-data.vf-module-level-oper-status.last-rpc-action'
@@ -570,4 +571,4 @@ key="INSERT INTO VIPR_CONFIGURATION (vnf_id, vnf_name, ecomp_service_instance_id <parameter name="ack-final-indicator" value="Y" />
<parameter name="error-code" value="200" />
<parameter name="error-message" value="`$error-message`" />
-</return></block></method></service-logic> +</return></block></method></service-logic>
|