diff options
author | Dan Timoney <dtimoney@att.com> | 2019-05-30 11:54:19 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-05-30 11:54:19 +0000 |
commit | 69a263df52f822e41b42f411f13afef773dbde5d (patch) | |
tree | 1d720c8c1f1a2446a1ba156e271d5d8a15b1efdf /platform-logic/generic-resource-api/src/main/xml | |
parent | 6e28a662a8c74a81a7d885cf15ce3e60a84e1baf (diff) | |
parent | 37115b5eac1f20ea2093b523bc2eade32d689c09 (diff) |
Merge "Fix SDNC parameters save in AAI failure"
Former-commit-id: b0aa3b3bcc3c269bbc62a2e9690830a959e37e59
Diffstat (limited to 'platform-logic/generic-resource-api/src/main/xml')
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" />
|