diff options
author | Timoney, Dan (dt5972) <dtimoney@att.com> | 2019-05-31 15:19:49 -0400 |
---|---|---|
committer | Dan Timoney <dtimoney@att.com> | 2019-05-31 20:53:38 +0000 |
commit | 7d9459636e42e73ecbd7a631f895ebc0520485ed (patch) | |
tree | bbf1af650a4d253a7abc097160005be78014eb8e /platform-logic/generic-resource-api/src/main/xml | |
parent | 1c8149de7a7d6b6597faa4faf9eaaf70ee079117 (diff) |
Return success if no preload found
Return success if no preload data is found by gw-vfmodule-update
Change-Id: I45cda28b6ea16efc615227ddb75dc60e1e747725
Issue-ID: SDNC-779
Signed-off-by: Timoney, Dan (dt5972) <dtimoney@att.com>
Former-commit-id: be00123fe3b1e10c7da77c1c5ad0db9c8274785e
Diffstat (limited to 'platform-logic/generic-resource-api/src/main/xml')
-rw-r--r-- | platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_gw-vfmodule-update.xml | 247 |
1 files changed, 143 insertions, 104 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 index f7384186..2ee6cbf1 100644 --- 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 @@ -1,92 +1,110 @@ -<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.consuming-service-instance-id' value='b3cb7040-f7a5-4beb-ad2f-2a893b7d374b' />
+<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.consuming-service-instance-id' value='b3cb7040-f7a5-4beb-ad2f-2a893b7d374b' />
service-data.service-topology.service-topology-identifier.service-instance-id
-->
-<parameter name='tmp.brg-mac-address-match' value="`'VGW2BRG-' + $tmp.brg-macaddress`"/>
-<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'
+ <parameter name='tmp.brg-mac-address-match' value="`'VGW2BRG-' + $tmp.brg-macaddress`"/>
+ <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`' />
-<!--
+ <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`' />
+ <!--
this is null
<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'>
-<block>
-<set>
-<parameter name='tmp.brg-macaddress'
+-->
+ </set>
+ <switch test='`$tmp.test1 == $tmp.consuming-service-instance-id`'>
+ <outcome value='true'>
+ <block>
+ <set>
+ <parameter name='tmp.brg-macaddress'
value='`$tmp.txconns.tunnelxconn-allotted-resources.tunnelxconn-allotted-resource.allotted-resource-data.allotted-resource-operation-information.tunnelxconn-request-input.brg-wan-mac-address`' />
-
-</set><set>
-<parameter name='tmp.brg-mac-address-match' value="`'VGW2BRG-' + $tmp.brg-macaddress`"/>
-<parameter name='tmp.consuming-service-instance-id' value='`$service-data.service-topology.service-topology-identifier.service-instance-id`' />
-
-<!--
-<parameter name='tmp.brg-macaddress' value='fa:16:3e:8f:ea:68' />
-<parameter name='tmp.brg-mac-address-match' value="`'VGW2BRG-' + $tmp.brg-macaddress`"/>
+ </set>
+ <set>
+ <parameter name='tmp.brg-mac-address-match' value="`'VGW2BRG-' + $tmp.brg-macaddress`"/>
+ <parameter name='tmp.consuming-service-instance-id' value='`$service-data.service-topology.service-topology-identifier.service-instance-id`' />
+ <!--
+<parameter name='tmp.brg-macaddress' value='fa:16:3e:8f:ea:68' /><parameter name='tmp.brg-mac-address-match' value="`'VGW2BRG-' + $tmp.brg-macaddress`"/>
-->
-<!--
+ <!--
<parameter name='tmp.consuming-service-instance-id' value='b3cb7040-f7a5-4beb-ad2f-2a893b7d374b' />
service-data.service-topology.service-topology-identifier.service-instance-id
-->
-</set><set>
-<parameter name='tmp.vg-vgmux-tunnel-vni'
+ </set>
+ <set>
+ <parameter name='tmp.vg-vgmux-tunnel-vni'
value='`$tmp.txconns.tunnelxconn-allotted-resources.tunnelxconn-allotted-resource[$txidx].allotted-resource-data.tunnelxconn-topology.tunnelxconn-assignments.vni`' />
-<parameter name='tmp.vg-ip'
+ <parameter name='tmp.vg-ip'
value='`$tmp.txconns.tunnelxconn-allotted-resources.tunnelxconn-allotted-resource[$txidx].allotted-resource-data.tunnelxconn-topology.tunnelxconn-assignments.vg-ip`' />
-</set><set>
-<parameter name='tmp.thisIsVGW' value='true' />
-</set></block></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`'>
-<!--
+ </set>
+ <set>
+ <parameter name='tmp.thisIsVGW' value='true' />
+ </set>
+ </block>
+ </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'
+ <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/'
@@ -94,49 +112,70 @@ service-data.service-topology.service-topology-identifier.service-instance-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>
-<!--
+ </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`' />
-<parameter name='tmp.service.vnf.vf-module.vg-lan-ip' value='`$tmp.txconns.tunnelxconn-allotted-resources.tunnelxconn-allotted-resource[0].allotted-resource-data[0].tunnelxconn-topology[0].tunnelxconn-assignments[0].vg-ip`' />
-
-
-
-</set><set>
-<!--
+ <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`' />
+ <parameter name='tmp.service.vnf.vf-module.vg-lan-ip' value='`$tmp.txconns.tunnelxconn-allotted-resources.tunnelxconn-allotted-resource[0].allotted-resource-data[0].tunnelxconn-topology[0].tunnelxconn-assignments[0].vg-ip`' />
+ </set>
+ <set>
+ <!--
<parameter name='tmp.service.vnf.vf-module.vg-mux-tunnel-vni' value='`$input.vni`' />
-->
-<parameter name='tmp.vg-mux-tunnel-vni-match' value='vg_vgmux_tunnel_vni' />
-<parameter name='tmp.vg-lan-ip-match' value='vgw_private_ip_0' />
-
-
-
-
-</set><for index='paramIdx' start='0' end='`$tmp.vfmodule.param_length`' >
-<block>
-<switch test='`$tmp.vfmodule.param[$paramIdx].name == $tmp.vg-mux-tunnel-vni-match`'><outcome value='true'>
-<set>
-<parameter name='$tmp.vfmodule.param[$paramIdx].value' value='`$tmp.vg-vgmux-tunnel-vni`' />
-
-<!--
+ <parameter name='tmp.vg-mux-tunnel-vni-match' value='vg_vgmux_tunnel_vni' />
+ <parameter name='tmp.vg-lan-ip-match' value='vgw_private_ip_0' />
+ </set>
+ <for index='paramIdx' start='0' end='`$tmp.vfmodule.param_length`' >
+ <block>
+ <switch test='`$tmp.vfmodule.param[$paramIdx].name == $tmp.vg-mux-tunnel-vni-match`'>
+ <outcome value='true'>
+ <set>
+ <parameter name='$tmp.vfmodule.param[$paramIdx].value' value='`$tmp.vg-vgmux-tunnel-vni`' />
+ <!--
<parameter name='$tmp.vfmodule.param[$paramIdx].value' value='`$tmp.txconns.tunnelxconn-allotted-resources.tunnelxconn-allotted-resource.allotted-resource-data.tunnelxconn-topology.tunnelxconn-assignments.vni`' />
---></set></outcome></switch><switch test='`$tmp.vfmodule.param[$paramIdx].name == $tmp.vg-lan-ip-match`'><outcome value='true'>
-<set>
-<parameter name='$tmp.vfmodule.param[$paramIdx].value' value='`$tmp.vg-ip`' />
-<!--
+-->
+ </set>
+ </outcome>
+ </switch>
+ <switch test='`$tmp.vfmodule.param[$paramIdx].name == $tmp.vg-lan-ip-match`'>
+ <outcome value='true'>
+ <set>
+ <parameter name='$tmp.vfmodule.param[$paramIdx].value' value='`$tmp.vg-ip`' />
+ <!--
<parameter name='$tmp.vfmodule.param[$paramIdx].value' value='`$tmp.txconns.tunnelxconn-allotted-resources.tunnelxconn-allotted-resource.allotted-resource-data.tunnelxconn-topology.tunnelxconn-assignments.vg-ip`' />
---></set></outcome></switch></block></for><set>
-<!--
+-->
+ </set>
+ </outcome>
+ </switch>
+ </block>
+ </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.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></block></outcome></switch></block></for></block></outcome><outcome value='Other'>
-<block>
-<return status='failure'>
-<parameter name='error-code' value='500' />
-<parameter name='error-message' value='Did not find vGW Preload' />
-</return></block></outcome></switch></block></method></service-logic>
\ No newline at end of file + <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>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </for>
+ </block>
+ </outcome>
+ <outcome value='Other'>
+ <block>
+ <return status='success'>
+ <parameter name='' value='' />
+ </return>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </method>
+</service-logic>
\ No newline at end of file |