aboutsummaryrefslogtreecommitdiffstats
path: root/platform-logic/generic-resource-api/src/main/xml
diff options
context:
space:
mode:
authorprakash.e <prakash.e@huawei.com>2019-04-21 09:54:06 +0530
committerprakash.e <prakash.e@huawei.com>2019-04-21 09:54:19 +0530
commitc10aa53a7b66854550ca7f7ec30ecbdd7a0c5334 (patch)
tree6927ec2d56cde5a593126edbfee67e97b38a030a /platform-logic/generic-resource-api/src/main/xml
parentd7dc8f2552565790223112996c9bfc719a55c0d8 (diff)
Fixed lan-port-config resource in AAI
Added vnf-index null check and Added lan-port-config resource inplace of sdwan-vpn resource in AAI for lan-port-create Change-Id: If05b730da8932fb25396cb82688e302c6c5a4eab Issue-ID: SDNC-659 Signed-off-by: Prakash.E <prakash.e@huawei.com> Former-commit-id: 09c286f73a72a24f46ef09d5f2c5519eb79a05bd
Diffstat (limited to 'platform-logic/generic-resource-api/src/main/xml')
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-lanport-create.xml47
1 files changed, 29 insertions, 18 deletions
diff --git a/platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-lanport-create.xml b/platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-lanport-create.xml
index 607a19f6..d2538710 100644
--- a/platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-lanport-create.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-lanport-create.xml
@@ -21,6 +21,15 @@
</outcome>
</switch>
</for>
+ <switch test='`$vnf-index`'>
+ <outcome value=''>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="vnf id not found in service-data" />
+ </return>
+ </outcome>
+ </switch>
<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`'>
<outcome value=''>
<set>
@@ -58,28 +67,29 @@
</set>
</block>
</for>
- <call module='GENERIC-RESOURCE-API' rpc='sdwan-get-vf-module-lanport-param' mode='sync' ></call>
<set>
<parameter name='vf-module-request-input.' value='`$vf-module-topology-operation-input.vf-module-request-input.`' />
</set>
+ <call module='GENERIC-RESOURCE-API' rpc='sdwan-get-vf-module-lanport-param' mode='sync' ></call>
<set>
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length' value='`$vf-index + 1`' />
</set>
<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='generateUUID' >
- <parameter name="ctx-destination" value="prop.lan-vf-index"/>
+ <parameter name="ctx-destination" value="prop.vf-id"/>
</execute>
<set>
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-index].vf-module-id' value='`$prop.lan-vf-index`' />
+ <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-index].vf-module-id' value='`$prop.vf-id`' />
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-index].vf-module-data.sdnc-request-header.' value='`$vf-module-topology-operation-input.sdnc-request-header.`' />
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-index].vf-module-data.request-information.' value='`$vf-module-topology-operation-input.request-information.`' />
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-index].vf-module-data.service-information.' value='`$vf-module-topology-operation-input.service-information.`' />
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-index].vf-module-data.vnf-information.' value='`$vf-module-topology-operation-input.vnf-information.`' />
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-index].vf-module-data.vf-module-information.' value='`$vf-module-topology-operation-input.vf-module-information.`' />
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-index].vf-module-data.vf-module-request-input.' value='`$vf-module-topology-operation-input.vf-module-request-input.`' />
- <parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-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_length' value='`$vf-index+1`' />
+ <!--parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-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_length' value='`$vf-index+1`' /-->
</set>
<set>
+ <parameter name='vf-module-id' value='`$prop.vf-id`'/>
<parameter name='vf-module-object-path' value="`'restconf/config/GENERIC-RESOURCE-API:services/service/'
+ $vf-module-topology-operation-input.service-information.service-instance-id
+ '/service-data/vnfs/vnf/'
@@ -104,27 +114,27 @@
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$vf-index].vf-module-data.vf-module-level-oper-status.last-action' value='`$vf-module-topology-operation-input.sdnc-request-header.request-action`' />
</set>
<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='lan-port-config'
- key='lan-port-config.lan-port-config-id = $prop.lan-vf-index' >
- <parameter name="lan-port-config-id" value="`$prop.vnf-index`" />
- <parameter name="device-id" value="`$prop.lan.deviceName`" />
- <parameter name="port-switch" value="`$prop.lan.portSwitch`" />
- <parameter name="port-type" value="`$prop.lan.portType`" />
- <parameter name="port-number" value="`$prop.lan.portnumber`" />
- <parameter name="ipv4-address" value="`$prop.lan.ipAddress`" />
- <parameter name='vlan-tag' value="`$prop.lan.vlanId`" />
+ key='lan-port-config.lan-port-config-id = $prop.vf-id' >
+ <parameter name="lan-port-config-id" value="`$prop.vf-id`" />
+ <parameter name="device-id" value='`$prop.lan.deviceName`' />
+ <parameter name="port-switch" value='`$prop.lan.portSwitch`' />
+ <parameter name="port-type" value='`$prop.lan.portType`' />
+ <parameter name="port-number" value='`$prop.lan.portnumber`' />
+ <parameter name="ipv4-address" value='`$prop.lan.ipAddress`' />
+ <parameter name='vlan-tag' value='`$prop.lan.vlanId`' />
<parameter name='operational-status' value='Created' />
<parameter name='model-customization-id' value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-customization-uuid`' />
<parameter name='model-invariant-id' value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-invariant-uuid`' />
<parameter name='model-version-id' value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-version`' />
- <parameter name='selflink' value="`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $vf-module-topology-operation-input.service-information.service-instance-id + '/service-data/vnfs/vnf/' + $service-data.vnfs.vnf[$vnf-index].vnf-id + '/vnf-data/vf-modules/vf-module/' + $prop.site-vf-index + '/vf-module-data/'` " />
+ <parameter name='selflink' value="`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $vf-module-topology-operation-input.service-information.service-instance-id + '/service-data/vnfs/vnf/' + $service-data.vnfs.vnf[$vnf-index].vnf-id + '/vnf-data/vf-modules/vf-module/' + $prop.vf-id + '/vf-module-data/'` " />
</save>
<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='generic-vnf:relationship-list'
key='generic-vnf.vnf-id = $service-data.vnfs.vnf[$vnf-index].vnf-id'
force="true" pfx="tmp.AnAI-data">
- <parameter name="relationship-list.relationship[0].related-to" value="sdwan-vpn" />
- <parameter name="relationship-list.relationship[0].related-link" value="`'/network/sdwan-vpns/sdwan-vpn/' + $prop.lan-vf-index`" />
+ <parameter name="relationship-list.relationship[0].related-to" value="lan-port-config" />
+ <parameter name="relationship-list.relationship[0].related-link" value="`'/network/lan-port-configs/lan-port-config/' + $prop.vf-id`" />
<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="lan-port-config-id" />
- <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$prop.lan-vf-index`" />
+ <parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$prop.vf-id`" />
</save>
<return status='success'>
<parameter name="ack-final-indicator" value="Y" />
@@ -133,4 +143,5 @@
</return>
</block>
</method>
-</service-logic> \ No newline at end of file
+</service-logic>
+