aboutsummaryrefslogtreecommitdiffstats
path: root/platform-logic/generic-resource-api/src/main/xml
diff options
context:
space:
mode:
authorCheung, Pat (kc1472) <kc1472@att.com>2019-03-29 14:47:54 +0000
committerCheung, Pat (kc1472) <kc1472@att.com>2019-03-29 14:47:54 +0000
commit1f9a53dee8c026b6fe4b0baf8b39167a5cf5f7fe (patch)
treee2eb2d481c91711fcb25e42cc0bf831d8501f7df /platform-logic/generic-resource-api/src/main/xml
parentd6346ad42dca37c99773040d88b19227d80a26a6 (diff)
Dublin pnf DGs
Adding DGs to support aai put for pnf Change-Id: I04d66be61be3b8d13daf1c14310ff75b24c687ba Issue-ID: SDNC-634 Signed-off-by: Cheung, Pat (kc1472) <kc1472@att.com> Former-commit-id: 2b38887a7cde529a01f15702358d4678e3d7b120
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_self-serve-aai-pnf-put.xml156
1 files changed, 156 insertions, 0 deletions
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-aai-pnf-put.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-aai-pnf-put.xml
new file mode 100644
index 00000000..6631d89e
--- /dev/null
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_self-serve-aai-pnf-put.xml
@@ -0,0 +1,156 @@
+<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='self-serve-aai-pnf-put' mode='sync'>
+ <block atomic="true">
+ <switch test='`$ss.capability-name`'>
+ <outcome value=''>
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="ss.capability-name is null" />
+ </return>
+ </outcome>
+ </switch>
+ <switch test='`$ss.capability-action`'>
+ <outcome value=''>
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500"/>
+ <parameter name="error-message" value="ss.capability-action is null" />
+ </return>
+ </outcome>
+ <outcome value='assign'>
+ <block atomic='true'>
+ <for silentFailure='true' index="aidx" start="0" end="`$service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-parameters-data.param_length`">
+ <switch test='`$service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-parameters-data.param[$aidx].name`'>
+ <outcome value='pnf-name'>
+ <set>
+ <parameter name='ss.param.pnf-name' value ='`$service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-parameters-data.param[$aidx].value`' />
+ <parameter name='ss.param.pnf-name-index' value='`$aidx`' />
+ </set>
+ </outcome>
+ <outcome value='pnf-name2'>
+ <set>
+ <parameter name='ss.param.pnf-name2' value ='`$service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-parameters-data.param[$aidx].value`' />
+ <parameter name='ss.param.pnf-name2-index' value='`$aidx`' />
+ </set>
+ </outcome>
+ <outcome value='pnf-id'>
+ <set>
+ <parameter name='ss.param.pnf-id' value ='`$service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-parameters-data.param[$aidx].value`' />
+ <parameter name='ss.param.pnf-id-index' value='`$aidx`' />
+ </set>
+ </outcome>
+ <outcome value='aai-pnf-put'>
+ <set>
+ <parameter name='ss.param.aai-pnf-put-index' value='`$aidx`' />
+ </set>
+ </outcome>
+ <outcome value='ipv4-oam-address'>
+ <set>
+ <parameter name='ss.param.ipv4-oam-address' value='`$service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-parameters-data.param[$aidx].value`' />
+ <parameter name='ss.param.ipv4-oam-address-index' value='`$aidx`' />
+ </set>
+ </outcome>
+ <outcome value='ipv6-oam-address'>
+ <set>
+ <parameter name='ss.param.ipv6-oam-address' value='`$service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-parameters-data.param[$aidx].value`' />
+ <parameter name='ss.param.ipv6-oam-address-index' value='`$aidx`' />
+ </set>
+ </outcome>
+ </switch>
+ </for>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="pnf"
+ key="pnf.pnf-name = $ss.param.pnf-name "
+ pfx="tmp.aai.pnf" >
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-parameters-data.param[$ss.param.aai-pnf-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`'Encountered error to get pnf with pnf-name=' + $ss.param.pnf-name + ' from AnAI'`" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-parameters-data.param[$ss.param.aai-pnf-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`'pnf with pnf-name=' + $ss.param.pnf-name + ' not found in AAI'`" />
+ </return>
+ </block>
+ </outcome>
+ </get-resource>
+ <set>
+ <parameter name="ss.selflink"
+ value="`'restconf/config/GENERIC-RESOURCE-API:services/service/' +
+ $service-data.pnfs.pnf[$pnf-index].pnf-data.service-information.service-instance-id +
+ '/service-data/pnfs/pnf/' +
+ $ss.param.pnf-id +
+ '/pnf-data/pnf-topology/'`" />
+ </set>
+ <update plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="pnf"
+ key="pnf.pnf-name = $ss.param.pnf-name " >
+ <parameter name="pnf-name2" value="`$ss.param.pnf-name2`" />
+ <parameter name="prov-status" value="PREPROV" />
+ <parameter name="selflink" value="`$ss.selflink`" />
+ <parameter name="ipaddress-v4-oam" value="`$ss.param.ipv4-oam-address`" />
+ <parameter name="ipaddress-v6-oam" value="`$ss.param.ipv6-oam-address`" />
+ <parameter name="model-customization-id"
+ value="`$service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-details.onap-model-information.model-customization-uuid`" />
+ <parameter name="model-invariant-id"
+ value="`$service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-details.onap-model-information.model-invariant-uuid`" />
+ <parameter name="model-version-id"
+ value="`$service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-details.onap-model-information.model-uuid`" />
+ <outcome value='failure'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-parameters-data.param[$ss.param.aai-pnf-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`'Failed to update pnf.pnf-name in AnAI with pnf-name=' + $ss.param.pnf-name`" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='not-found'>
+ <block atomic='true'>
+ <set>
+ <parameter name='service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-parameters-data.param[$ss.param.aai-pnf-put-index].resource-resolution-data.status'
+ value='FAILED' />
+ </set>
+ <return status='failure'>
+ <parameter name='error-code' value='500' />
+ <parameter name='error-message' value="`'pnf with pnf-name =' + $ss.param.pnf-name + ' is not found in AAI'`" />
+ </return>
+ </block>
+ </outcome>
+ </update>
+ <set>
+ <parameter name='service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-parameters-data.param[$ss.param.aai-pnf-put-index].resource-resolution-data.status'
+ value='SUCCESS' />
+ </set>
+ </block>
+ </outcome>
+ </switch>
+ <set>
+ <parameter name='service-data.pnfs.pnf[$pnf-index].pnf-data.pnf-topology.pnf-parameters-data.param[$ss.param.aai-pnf-put-index].value'
+ value='SUCCESS' />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >
+ <parameter name='filename' value='/var/tmp/ss-aai-pnf-put.log' />
+ </execute>
+ </block>
+ </method>
+</service-logic> \ No newline at end of file