aboutsummaryrefslogtreecommitdiffstats
path: root/platform-logic/generic-resource-api/src/main/xml
diff options
context:
space:
mode:
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-activate.xml49
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-lanport-create.xml47
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-lanport-deactivate.xml11
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-lanport-delete.xml11
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-vpn-create.xml18
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-wanport-activate.xml266
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_validate-sdwan-vf-vpn-input-parameters.xml9
7 files changed, 225 insertions, 186 deletions
diff --git a/platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-lanport-activate.xml b/platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-lanport-activate.xml
index 15f1e537..808070fc 100644
--- a/platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-lanport-activate.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-lanport-activate.xml
@@ -61,23 +61,34 @@
</outcome>
</switch>
<for index='vnfidx' start='0' end='`$service-data.vnfs.vnf_length`' >
- <for index='vfidx' start='0' end='`$service-data.vnfs.vnf[$vnfidx].vnf-data.vf-modules.vf-module_length`' >
- <for index='pidx' start='0' end='`$service-data.vnfs.vnf[$vnfidx].vnf-data.vf-modules.vf-module[$vfidx].vf-module-data.vf-module-request-input.vf-module-input-parameters.param_length`' >
- <switch test="`$service-data.vnfs.vnf[$vnfidx].vnf-data.vf-modules.vf-module[$vfidx].vf-module-data.vf-module-request-input.vf-module-input-parameters.param[$pidx].value == '$prop.lan.deviceName'`">
- <outcome value='true'>
- <for index='pidx' start='0' end='`$service-data.vnfs.vnf[$vnfidx].vnf-data.vf-modules.vf-module[$vfidx].vf-module-data.vf-module-request-input.vf-module-input-parameters.param_length`' >
- <switch test="`$service-data.vnfs.vnf[$vnfidx].vnf-data.vf-modules.vf-module[$vfidx].vf-module-data.vf-module-request-input.vf-module-input-parameters.param[$pidx].name == 'deviceId'`">
- <outcome value='true'>
- <set>
- <parameter name='prop.lan.deviceId' value='`$service-data.vnfs.vnf[$vnfidx].vnf-data.vf-modules.vf-module[$vfidx].vf-module-data.vf-module-request-input.vf-module-input-parameters.param[$pidx].value`' />
- </set>
- </outcome>
- </switch>
+ <block atomic="true">
+ <switch test="`$service-data.vnfs.vnf[$vnfidx].vnf-data.vf-modules.vf-module_length >= '0'`">
+ <!--switch test="`$service-data.vnfs.vnf[$i].vnf-data.request-information.request-action == 'ActivateSDWANDeviceInstance'`"-->
+ <outcome value='true'>
+ <block atomic="true">
+ <for index='vfidx' start='0' end='`$service-data.vnfs.vnf[$vnfidx].vnf-data.vf-modules.vf-module_length`' >
+ <for index='pidx' start='0' end='`$service-data.vnfs.vnf[$vnfidx].vnf-data.vf-modules.vf-module[$vfidx].vf-module-data.vf-module-request-input.vf-module-input-parameters.param_length`' >
+ <block atomic="true">
+ <switch test="`$service-data.vnfs.vnf[$vnfidx].vnf-data.vf-modules.vf-module[$vfidx].vf-module-data.vf-module-request-input.vf-module-input-parameters.param[$pidx].value == $prop.lan.deviceName`">
+ <outcome value='true'>
+ <for index='pidx' start='0' end='`$service-data.vnfs.vnf[$vnfidx].vnf-data.vf-modules.vf-module[$vfidx].vf-module-data.vf-module-request-input.vf-module-input-parameters.param_length`' >
+ <switch test="`$service-data.vnfs.vnf[$vnfidx].vnf-data.vf-modules.vf-module[$vfidx].vf-module-data.vf-module-request-input.vf-module-input-parameters.param[$pidx].name == 'deviceId'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='prop.lan.deviceId' value='`$service-data.vnfs.vnf[$vnfidx].vnf-data.vf-modules.vf-module[$vfidx].vf-module-data.vf-module-request-input.vf-module-input-parameters.param[$pidx].value`' />
+ </set>
+ </outcome>
+ </switch>
+ </for>
+ </outcome>
+ </switch>
+ </block>
+ </for>
</for>
- </outcome>
- </switch>
- </for>
- </for>
+ </block>
+ </outcome>
+ </switch>
+ </block>
</for>
<set>
<parameter name='prop.siteAttachements_length' value='0' />
@@ -86,12 +97,6 @@
<for index='vnfidx' start='0' end='`$service-data.vnfs.vnf_length`' >
<for index='vfidx' start='0' end='`$service-data.vnfs.vnf[$vnfidx].vnf-data.vf-modules.vf-module_length`' >
<block>
- <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
- <parameter name="file" value="/opt/opendaylight/current/data/log/svclogic24.log"/>
- <parameter name="field1" value="__TIMESTAMP__"/>
- <parameter name="field2" value="request-action"/>
- <parameter name="field3" value='`$service-data.vnfs.vnf[$vnfidx].vnf-data.vf-modules.vf-module[$vfidx].vf-module-data.request-information.request-action`'/>
- </record>
<switch test="`$service-data.vnfs.vnf[$vnfidx].vnf-data.vf-modules.vf-module[$vfidx].vf-module-data.request-information.request-action == 'ActivateSDWANSiteInstance'`">
<outcome value='true'>
<for index='pidx' start='0' end='`$service-data.vnfs.vnf[$vnfidx].vnf-data.vf-modules.vf-module[$vfidx].vf-module-data.vf-module-request-input.vf-module-input-parameters.param_length`' >
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>
+
diff --git a/platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-lanport-deactivate.xml b/platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-lanport-deactivate.xml
index 77575c2f..2a0a3af1 100644
--- a/platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-lanport-deactivate.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-lanport-deactivate.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='0'>
<return status='failure'>
@@ -63,7 +72,7 @@
<for index='vnfidx' start='0' end='`$service-data.vnfs.vnf_length`' >
<for index='vfidx' start='0' end='`$service-data.vnfs.vnf[$vnfidx].vnf-data.vf-modules.vf-module_length`' >
<for index='pidx' start='0' end='`$service-data.vnfs.vnf[$vnfidx].vnf-data.vf-modules.vf-module[$vfidx].vf-module-data.vf-module-request-input.vf-module-input-parameters.param_length`' >
- <switch test="`$service-data.vnfs.vnf[$vnfidx].vnf-data.vf-modules.vf-module[$vfidx].vf-module-data.vf-module-request-input.vf-module-input-parameters.param[$pidx].value == '$prop.lan.deviceName'`">
+ <switch test="`$service-data.vnfs.vnf[$vnfidx].vnf-data.vf-modules.vf-module[$vfidx].vf-module-data.vf-module-request-input.vf-module-input-parameters.param[$pidx].value == $prop.lan.deviceName`">
<outcome value='true'>
<block atomic="true">
<set>
diff --git a/platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-lanport-delete.xml b/platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-lanport-delete.xml
index 5fb67357..30df6e08 100644
--- a/platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-lanport-delete.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-lanport-delete.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='0'>
<return status='failure'>
@@ -127,7 +136,7 @@
+ '/service-data/service-topology/'`"/>
</set>
<delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource='lan-port-config'
- key='site-resource.site-resource-id = $vf-module-topology-operation-input.vf-module-information.vf-module-id'></delete>
+ key='lan-port-config.lan-port-config-id = $vf-module-topology-operation-input.vf-module-information.vf-module-id'></delete>
<return status='success'>
<parameter name="ack-final-indicator" value="Y" />
<parameter name="error-code" value="200" />
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 02a816bd..360cb476 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
@@ -4,24 +4,6 @@
<method rpc='sdwan-vf-operation-vpn-create' mode='sync'>
<block atomic="true">
<call module='GENERIC-RESOURCE-API' rpc='validate-sdwan-vf-vpn-input-parameters' mode='sync' ></call>
- <switch test='`$service-data.vnfs.vnf_length`'>
- <outcome value=''>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="404" />
- <parameter name="error-message" value="There are no VNFs in MD-SAL" />
- </return>
- </outcome>
- </switch>
- <for index='idx' start='0' end='`$service-data.vnfs.vnf_length`' >
- <switch test="`$service-data.vnfs.vnf[$idx].vnf-id == $vf-module-topology-operation-input.vnf-information.vnf-id`">
- <outcome value='true'>
- <set>
- <parameter name='vnf-index' value='`$idx`' />
- </set>
- </outcome>
- </switch>
- </for>
<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module_length`'>
<outcome value=''>
<set>
diff --git a/platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-wanport-activate.xml b/platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-wanport-activate.xml
index 95f83691..40b1896d 100644
--- a/platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-wanport-activate.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_sdwan-vf-operation-wanport-activate.xml
@@ -67,6 +67,16 @@
<outcome value='true'>
<block atomic="true">
<for index="didx" start="0" end="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-data.vf-module-request-input.vf-module-input-parameters.param_length`">
+ <block>
+ <switch test="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-data.vf-module-request-input.vf-module-input-parameters.param[$didx].name == 'deviceId'`">
+ <outcome value='true'>
+ <set>
+ <parameter name='prop.site.deviceId[$prop.site.deviceId_length]' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$idx].vf-module-data.vf-module-request-input.vf-module-input-parameters.param[$didx].value`' />
+ <parameter name='prop.site.deviceId_length' value='`$prop.site.deviceId_length + 1`' />
+ </set>
+ </outcome>
+ </switch>
+ </block>
<block atomic="true">
<record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
<parameter name="file" value="/opt/opendaylight/current/data/log/svclogic-device-param.log"/>
@@ -135,7 +145,7 @@
<parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' />
<parameter name='contextPrefix' value='prop' />
</execute>
- <for index="sidx" start="0" end="`$ctx.site.vf-module-data.vf-module-request-input.vf-module-input-parameters.param_length`">
+ <for index="sidx" start="0" end="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$tmp.siteVidx].vf-module-data.vf-module-request-input.vf-module-input-parameters.param_length`">
<block atomic="true">
<switch test="`$ctx.site.vf-module-data.vf-module-request-input.vf-module-input-parameters.param[$sidx].name == 'siteId'`">
<outcome value='true'>
@@ -197,53 +207,75 @@
</outcome>
</execute>
<call module='GENERIC-RESOURCE-API' rpc='sdwan-get-tenant-auth' mode='sync' ></call>
- <set>
- <parameter name='portResp.success[0].id' value="12345" />
- </set>
- <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
- <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/sdwan-port.json'`" />
- <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/campus/v1/sdwan/net/ports'`" />
- <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.user`" />
- <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.password`" />
- <parameter name="format" value="json"/>
- <parameter name="httpMethod" value="post"/>
- <parameter name="responsePrefix" value="portResp"/>
- <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.onap.client.jks"/>
- <parameter name="trustStorePassword" value="adminadmin"/>
- <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/>
- <parameter name="keyStorePassword" value="adminadmin"/>
- <parameter name='customHttpHeaders' value="`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`" />
- <outcome value='failure'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error executing Create device port rest api" />
- </return>
- </outcome>
- <outcome value='success'>
- <block atomic="true"></block>
- </outcome>
- </execute>
- <set>
- <parameter name='portResp.success[0].id' value="12345" />
- </set>
<for index='idx' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$tmp.vidx].vf-module-data.vf-module-request-input.vf-module-input-parameters.param_length`'>
<block>
- <switch test="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$tmp.vidx].vf-module-data.vf-module-request-input.vf-module-input-parameters.param[$idx].name == 'IPMode'`">
+ <switch test="`$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$tmp.vidx].vf-module-data.vf-module-request-input.vf-module-input-parameters.param[$idx].name == 'portType'`">
<outcome value='true'>
<block atomic="true">
- <switch test="`GE == $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$tmp.vidx].vf-module-data.vf-module-request-input.vf-module-input-parameters.param[$didx].value`">
+ <switch test="`GE == $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$tmp.vidx].vf-module-data.vf-module-request-input.vf-module-input-parameters.param[$idx].value`">
<outcome value='true'>
- <set>
- <parameter name='prop.wan.linkType' value="Ethernet" />
- </set>
+ <block atomic="true">
+ <set>
+ <parameter name='prop.wan.linkType' value="Ethernet" />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/sdwan-port-ethernet.json'`" />
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/campus/v1/sdwan/net/ports'`" />
+ <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.user`" />
+ <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.password`" />
+ <parameter name="format" value="json"/>
+ <parameter name="httpMethod" value="post"/>
+ <parameter name="responsePrefix" value="portResp"/>
+ <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.onap.client.jks"/>
+ <parameter name="trustStorePassword" value="adminadmin"/>
+ <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/>
+ <parameter name="keyStorePassword" value="adminadmin"/>
+ <parameter name='customHttpHeaders' value="`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`" />
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error executing Create device port rest api" />
+ </return>
+ </outcome>
+ <outcome value='success'>
+ <block atomic="true"></block>
+ </outcome>
+ </execute>
+ </block>
</outcome>
</switch>
- <switch test="`LTE == $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$tmp.vidx].vf-module-data.vf-module-request-input.vf-module-input-parameters.param[$didx].value`">
+ <switch test="`LTE == $service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$tmp.vidx].vf-module-data.vf-module-request-input.vf-module-input-parameters.param[$idx].value`">
<outcome value='true'>
- <set>
- <parameter name='prop.wan.linkType' value="Cellular" />
- </set>
+ <block atomic="true">
+ <set>
+ <parameter name='prop.wan.linkType' value="Cellular" />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/sdwan-port-cellular.json'`" />
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/campus/v1/sdwan/net/ports'`" />
+ <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.user`" />
+ <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.password`" />
+ <parameter name="format" value="json"/>
+ <parameter name="httpMethod" value="post"/>
+ <parameter name="responsePrefix" value="portResp"/>
+ <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.onap.client.jks"/>
+ <parameter name="trustStorePassword" value="adminadmin"/>
+ <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/>
+ <parameter name="keyStorePassword" value="adminadmin"/>
+ <parameter name='customHttpHeaders' value="`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`" />
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error executing Create device port rest api" />
+ </return>
+ </outcome>
+ <outcome value='success'>
+ <block atomic="true"></block>
+ </outcome>
+ </execute>
+ </block>
</outcome>
</switch>
</block>
@@ -251,30 +283,6 @@
</switch>
</block>
</for>
- <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
- <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/sdwan-port.json'`" />
- <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/campus/v1/sdwan/net/ports'`" />
- <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.user`" />
- <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.password`" />
- <parameter name="format" value="json"/>
- <parameter name="httpMethod" value="post"/>
- <parameter name="responsePrefix" value="portResp"/>
- <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.onap.client.jks"/>
- <parameter name="trustStorePassword" value="adminadmin"/>
- <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/>
- <parameter name="keyStorePassword" value="adminadmin"/>
- <parameter name='customHttpHeaders' value="`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`" />
- <outcome value='failure'>
- <return status='failure'>
- <parameter name='ack-final' value='Y'/>
- <parameter name="error-code" value="500" />
- <parameter name="error-message" value="Error executing Create device port rest api" />
- </return>
- </outcome>
- <outcome value='success'>
- <block atomic="true"></block>
- </outcome>
- </execute>
<set>
<parameter name='prop.wan.devicePortId' value='`$portResp.success[0].id`' />
</set>
@@ -336,23 +344,76 @@
<block atomic="true">
<switch test="`Static == $prop.wan.IPMode`">
<outcome value='true'>
- <set>
- <parameter name='prop.wan.ip-address' value="" />
- <parameter name='prop.wan.prefixLength' value="" />
- <parameter name='prop.wan.providerIpAddress' value="" />
- <parameter name='prop.wan.IpMode' value="static" />
- <parameter name='prop.route.nextHopType' value="ip-address" />
- <parameter name='prop.route.ipAddress' value="`$prop.wan.ipAddress`" />
- </set>
+ <block atomic="true">
+ <set>
+ <parameter name='prop.wan.ip-address' value="prop.wan.ipAddress" />
+ <parameter name='prop.wan.providerIpAddress' value="prop.wan.provideripAddress" />
+ <parameter name='prop.wan.IpMode' value="static" />
+ <parameter name='prop.route.nextHopType' value="ip-address" />
+ <parameter name='prop.route.ipAddress' value="`$prop.wan.ipAddress`" />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/sdwan-wan-port-static.json'`" />
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/campus/v1/sdwan/net/transport-network-ports'`" />
+ <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.user`" />
+ <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.password`" />
+ <parameter name="format" value="json"/>
+ <parameter name="httpMethod" value="post"/>
+ <parameter name="responsePrefix" value="wanPortResp"/>
+ <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.onap.client.jks"/>
+ <parameter name="trustStorePassword" value="adminadmin"/>
+ <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/>
+ <parameter name="keyStorePassword" value="adminadmin"/>
+ <parameter name='customHttpHeaders' value="`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`" />
+ <outcome value='failure'>
+ <block atomic="true"></block>
+ </outcome>
+ <outcome value='success'>
+ <block atomic="true">
+ <set>
+ <parameter name='prop.wan.wanPortId' value='`$wanPortResp.success[0].id`' />
+ </set>
+ </block>
+ </outcome>
+ </execute>
+ </block>
</outcome>
</switch>
<switch test="`DHCP == $prop.wan.IPMode`">
<outcome value='true'>
- <set>
- <parameter name='prop.route.nextHopType' value="outbound-interface" />
- <parameter name='prop.wan.IpMode' value="DHCP" />
- <parameter name='prop.route.ipAddress' value="" />
- </set>
+ <block atomic="true">
+ <set>
+ <parameter name='prop.wan.ip-address' value="" />
+ <parameter name='prop.wan.prefixLength' value="" />
+ <parameter name='prop.wan.providerIpAddress' value="" />
+ <parameter name='prop.wan.IpMode' value="DHCP" />
+ <parameter name='prop.route.nextHopType' value="outbound-interface" />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/sdwan-wan-port-dhcp.json'`" />
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/campus/v1/sdwan/net/transport-network-ports'`" />
+ <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.user`" />
+ <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.password`" />
+ <parameter name="format" value="json"/>
+ <parameter name="httpMethod" value="post"/>
+ <parameter name="responsePrefix" value="wanPortResp"/>
+ <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.onap.client.jks"/>
+ <parameter name="trustStorePassword" value="adminadmin"/>
+ <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/>
+ <parameter name="keyStorePassword" value="adminadmin"/>
+ <parameter name='customHttpHeaders' value="`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`" />
+ <outcome value='failure'>
+ <block atomic="true"></block>
+ </outcome>
+ <outcome value='success'>
+ <block atomic="true">
+ <set>
+ <parameter name='prop.wan.wanPortId' value='`$wanPortResp.success[0].id`' />
+ </set>
+ </block>
+ </outcome>
+ </execute>
+ </block>
</outcome>
</switch>
</block>
@@ -360,50 +421,6 @@
</switch>
</block>
</for>
- <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
- <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/sdwan-wan-port.json'`" />
- <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/campus/v1/sdwan/net/transport-network-ports'`" />
- <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.user`" />
- <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.password`" />
- <parameter name="format" value="json"/>
- <parameter name="httpMethod" value="post"/>
- <parameter name="responsePrefix" value="wanPortResp"/>
- <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.onap.client.jks"/>
- <parameter name="trustStorePassword" value="adminadmin"/>
- <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/>
- <parameter name="keyStorePassword" value="adminadmin"/>
- <parameter name='customHttpHeaders' value="`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`" />
- <outcome value='failure'>
- <block atomic="true"></block>
- </outcome>
- <outcome value='success'>
- <block atomic="true">
- <set>
- <parameter name='prop.wan.wanPortId' value='`$wanPortResp.success[0].id`' />
- </set>
- </block>
- </outcome>
- </execute>
- <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
- <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/sdwan-underlay.json'`" />
- <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/campus/v1/sdwan/routing-protocol/static/action/batch-delete'`" />
- <parameter name="restapiUser" value="`$prop.sdncRestApi.thirdpartySdnc.user`" />
- <parameter name="restapiPassword" value="`$prop.sdncRestApi.thirdpartySdnc.password`" />
- <parameter name="format" value="json"/>
- <parameter name="httpMethod" value="post"/>
- <parameter name="responsePrefix" value="underlayspokeResp"/>
- <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.onap.client.jks"/>
- <parameter name="trustStorePassword" value="adminadmin"/>
- <parameter name="keyStoreFileName" value="/opt/onap/sdnc/data/stores/sdnc.p12"/>
- <parameter name="keyStorePassword" value="adminadmin"/>
- <parameter name='customHttpHeaders' value="`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`" />
- <outcome value='failure'>
- <block></block>
- </outcome>
- <outcome value='success'>
- <block></block>
- </outcome>
- </execute>
<set>
<parameter name='$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$tmp.vidx].vf-module-data.vf-module-request-input.vf-module-input-parameters.param[$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$tmp.vidx].vf-module-data.vf-module-request-input.vf-module-input-parameters.param_length].name' value='devicePortId' />
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$tmp.vidx].vf-module-data.vf-module-request-input.vf-module-input-parameters.param[$service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$tmp.vidx].vf-module-data.vf-module-request-input.vf-module-input-parameters.param_length].value' value='`$prop.wan.devicePortId`' />
@@ -449,14 +466,11 @@
<parameter name='service-data.vnfs.vnf[$vnf-index].vnf-data.vf-modules.vf-module[$tmp.vidx].vf-module-data.vf-module-level-oper-status.last-action' value='`$vf-module-topology-operation-input.sdnc-request-header.request-action`' />
</set>
<update plugin='org.onap.ccsdk.sli.adaptors.aai.AAIService' resource='wan-port-config'
- key='wan-port-config.wan-port-config-id = $vf-module-topology-operation-input.vnf-information.vnf-id' >
- <parameter name="wan-port-config-id" value="`$vf-module-topology-operation-input.vnf-information.vnf-id`" />
+ key='wan-port-config.wan-port-config-id = $vf-module-topology-operation-input.vf-module-information.vf-module-id' >
+ <parameter name="wan-port-config-id" value='`$vf-module-topology-operation-input.vf-module-information.vf-module-id`' />
<parameter name='operational-status' value='Active' />
<parameter name='device-port-id' value='`$prop.wan.devicePortId`' />
<parameter name='wan-port-id' value='`$prop.wan.wanPortId`' />
- <parameter name='model-customization-id' value='`$vf-module-topology-operation-input.vnf-information.onap-model-information.model-customization-uuid`' />
- <parameter name='model-invariant-id' value='`$vf-module-topology-operation-input.vnf-information.onap-model-information.model-invariant-uuid`' />
- <parameter name='model-version-id' value='`$vf-module-topology-operation-input.vnf-information.onap-model-information.model-uuid`' />
</update>
<return status='success'>
<parameter name="ack-final-indicator" value="Y" />
diff --git a/platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_validate-sdwan-vf-vpn-input-parameters.xml b/platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_validate-sdwan-vf-vpn-input-parameters.xml
index 29b26cd9..60492b5b 100644
--- a/platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_validate-sdwan-vf-vpn-input-parameters.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/sdwan/GENERIC-RESOURCE-API_validate-sdwan-vf-vpn-input-parameters.xml
@@ -30,6 +30,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='`$vf-module-topology-operation-input.sdnc-request-header.svc-action`'>
<outcome value='create'>
<block atomic="true">