summaryrefslogtreecommitdiffstats
path: root/platform-logic/generic-resource-api/src/main/xml/sdwan
diff options
context:
space:
mode:
authorprakash.e <prakash.e@huawei.com>2019-05-27 19:34:20 +0530
committerprakash eswaramoorthy <prakash.e@huawei.com>2019-05-29 11:15:06 +0000
commit37115b5eac1f20ea2093b523bc2eade32d689c09 (patch)
treef60db92434a17d1f7f7e1c20732f9acb707cb0be /platform-logic/generic-resource-api/src/main/xml/sdwan
parent4757df51de8b114c6846eb82c913e4f1b1cc485e (diff)
Fix SDNC parameters save in AAI failure
1. SDNC is fixed by passing proper UUID and version ID. 2. SDNC is fixed by removing validations for vnf resource creation DG 3. Fixed sdwan-wan-port-static.json template by passing generated wan-portId Issue-ID: SDNC-773 Signed-off-by: prakash.e <prakash.e@huawei.com> Change-Id: I0021983f0721dde6592d86bef602b8b4641215a3 Former-commit-id: 5e6ca08e7b71fa0ba6fc4a9ad9e02739e81e5e07
Diffstat (limited to 'platform-logic/generic-resource-api/src/main/xml/sdwan')
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-device-create.xml6
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-lanport-create.xml20
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-site-create.xml2
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-vpn-create.xml2
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-wanport-create.xml2
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_vnf-topology-operation-vpn-site-resource-create.xml69
6 files changed, 59 insertions, 42 deletions
diff --git a/platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-device-create.xml b/platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-device-create.xml
index 80df2aad..15bbecf7 100644
--- a/platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-device-create.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-device-create.xml
@@ -162,7 +162,9 @@
<parameter name='version' value='`$prop.device.version`' />
<parameter name='system-ip' value='`$prop.device.systemIp`' />
<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='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-uuid`' />
<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>
</outcome>
@@ -181,7 +183,7 @@
<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='model-version-id' value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-uuid`' />
<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/'` " />
</update>
</outcome>
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 d1578ec5..27f1c435 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
@@ -1,6 +1,6 @@
<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}'>
+ 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='sdwan-vf-operation-lanport-create' mode='sync'>
<block atomic="true">
<switch test='`$service-data.vnfs.vnf_length`'>
@@ -98,13 +98,13 @@
+ $vf-module-topology-operation-input.vf-module-information.vf-module-id
+ '/vf-module-data/vf-module-topology/'`"/>
<parameter name='vnf-object-path'
- value="`'restconf/config/GENERIC-RESOURCE-API:services/service/'
+ 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/vnf-topology/'`"/>
<parameter name='service-object-path'
- value="`'restconf/config/GENERIC-RESOURCE-API:services/service/'
+ value="`'restconf/config/GENERIC-RESOURCE-API:services/service/'
+ $vf-module-topology-operation-input.service-information.service-instance-id
+ '/service-data/service-topology/'`"/>
</set>
@@ -113,8 +113,8 @@
<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-rpc-action' value='`$vf-module-topology-operation-input.sdnc-request-header.svc-action`' />
<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.vf-id' >
+ <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='lan-port-config'
+ 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`' />
@@ -125,12 +125,12 @@
<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='model-version-id' value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-uuid`' />
<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">
+ <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="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" />
diff --git a/platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-site-create.xml b/platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-site-create.xml
index e4bdd6f2..b88f3af5 100644
--- a/platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-site-create.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-site-create.xml
@@ -114,7 +114,7 @@
<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='model-version-id' value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-uuid`' />
<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/'` " />
</save>
<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='generic-vnf:relationship-list'
diff --git a/platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-vpn-create.xml b/platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-vpn-create.xml
index 360cb476..7d8950ad 100644
--- a/platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-vpn-create.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-vpn-create.xml
@@ -112,7 +112,7 @@
<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='model-version-id' value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-uuid`' />
<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.vpn-vf-index + '/vf-module-data/'` " />
</save>
<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='generic-vnf:relationship-list'
diff --git a/platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-wanport-create.xml b/platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-wanport-create.xml
index f630eeee..a25f727e 100644
--- a/platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-wanport-create.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-wanport-create.xml
@@ -121,7 +121,7 @@
<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='model-version-id' value='`$vf-module-topology-operation-input.vf-module-information.onap-model-information.model-uuid`' />
<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.wan-port-vf-index + '/vf-module-data/'` " />
</save>
<save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='generic-vnf:relationship-list'
diff --git a/platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_vnf-topology-operation-vpn-site-resource-create.xml b/platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_vnf-topology-operation-vpn-site-resource-create.xml
index 3e8b537b..4b288933 100644
--- a/platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_vnf-topology-operation-vpn-site-resource-create.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_vnf-topology-operation-vpn-site-resource-create.xml
@@ -1,6 +1,6 @@
<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}'>
+ 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='vnf-topology-operation-vpn-site-resource-create' mode='sync'>
<block atomic="true">
<switch test='`$service-data.vnfs.vnf_length`'>
@@ -29,24 +29,32 @@
</block>
</outcome>
</switch>
- <switch test='`$vnf-topology-operation-input.vnf-request-input.vnf-name`'>
- <outcome value='SDWAN-vpn'>
- <block atomic="true"></block>
- </outcome>
- <outcome value='SDWAN-site'>
- <block atomic="true"></block>
- </outcome>
- <outcome value='Other'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error: vnf-name should be either SDWAN-vpn or SDWAN-site." />
- </return>
- </outcome>
- </switch>
+ <for index="idx" start="0" end="`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param_length`">
+ <block>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >
+ <parameter name="original_string" value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name`'/>
+ <parameter name="regex" value="_"/>
+ <parameter name="ctx_memory_result_key" value="param-prefix"/>
+ </execute>
+ <set>
+ <parameter name="`vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name`" value='`$param-prefix[$param-prefix_length -1]`'/>
+ </set>
+ </block>
+ </for>
<set>
<parameter name='vnf-request-input.' value='`$vnf-topology-operation-input.vnf-request-input.`' />
</set>
+ <for index="idx" start="0" end="`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param_length`">
+ <block>
+ <switch test="`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].name == 'name'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='prop.vnfName' value='`$vnf-topology-operation-input.vnf-request-input.vnf-input-parameters.param[$idx].value`' />
+ </set>
+ </outcome>
+ </switch>
+ </block>
+ </for>
<set>
<parameter name='service-data.vnfs.vnf_length' value='`$vnf-index + 1`' />
</set>
@@ -73,21 +81,28 @@
<parameter name='vnfId' value='`$prop.vnf-id`' />
<parameter name="vnf-object-path" value="`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $vnf-topology-operation-input.service-information.service-instance-id + '/service-data/vnfs/vnf/' + $prop.vnf-id + '/vnf-data/'` " />
</set>
- <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
- resource="generic-vnf"
- key="generic-vnf.vnf-id = $prop.vnf-id" >
- <parameter name="orchestration-status" value="create" />
- <parameter name="vnf-type" value="some vnf-type" />
+ <save plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $prop.vnf-id" >
+ <parameter name="orchestration-status" value="Created" />
+ <parameter name="in-maint" value = "true" />
+ <parameter name="vnf-type" value='`$prop.vnfName`' />
+ <parameter name="vnf-name" value = "`$prop.vnfName`"/>
+ <parameter name="model-invariant-id" value = "`$vnf-topology-operation-input.vnf-information.onap-model-information.model-invariant-uuid`"/>
+ <parameter name="model-version-id" value = "`$vnf-topology-operation-input.vnf-information.onap-model-information.model-uuid`"/>
+ <parameter name="model-customization-id" value = "`$vnf-topology-operation-input.vnf-information.onap-model-information.model-customization-uuid`"/>
</save>
- <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='service-instance:relationship-list'
- key='service-instance.service-instance-id = $service-data.service-information.service-instance-id
- AND customer.global-customer-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.global-customer-id
- AND service-subscription.service-type = $service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.subscription-service-type'
- force="true" pfx="tmp.AnAI-data">
+ <save plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='service-instance:relationship-list'
+ key='service-instance.service-instance-id = $service-data.service-instance-id
+ AND customer.global-customer-id = $service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.global-customer-id
+ AND service-subscription.service-type = $service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.subscription-service-type'
+ force="true" pfx="tmp.AnAI-data">
<parameter name="relationship-list.relationship[0].related-to" value="generic-vnf" />
<parameter name="relationship-list.relationship[0].related-link" value="`'/network/generic-vnfs/generic-vnf/' + $prop.vnf-id`" />
<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="generic-vnf.vnf-id" />
<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$prop.vnf-id`" />
+ <!--key='service-instance.service-instance-id = $service-data.service-information.service-instance-id -->
+ <!--key='service-instance.service-instance-id = $service-data.service-instance-id -->
</save>
<return status='success'>
<parameter name="ack-final-indicator" value="Y" />