summaryrefslogtreecommitdiffstats
path: root/platform-logic/generic-resource-api/src/main/xml
diff options
context:
space:
mode:
authorshashikanth.vh <shashikanth.vh@huawei.com>2019-04-22 01:04:01 +0530
committerShashikanth VH <shashikanth.vh@huawei.com>2019-04-24 13:27:44 +0000
commit31d827340a2072ff9b677e7bbc1669a0d4e75d2b (patch)
tree25a0b9986fb1d2574d3dd8671a13c83f4e16de51 /platform-logic/generic-resource-api/src/main/xml
parentd7dc8f2552565790223112996c9bfc719a55c0d8 (diff)
SDWAN wan port activate DG
Fixed couple of issues 1.paramters update for static and dhcp scenarios 2.invalid key parameter used while updating to AAI 3.Removed unused and hardcoded nodes. Change-Id: I08e98d09392c2094dfbe9eb7c6def14be03d76e0 Issue-ID: SDNC-653 Signed-off-by: shashikanth.vh <shashikanth.vh@huawei.com> Former-commit-id: 99141d3dd9d62dc636f2b7cacc2dba5874c88611
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-wanport-activate.xml266
1 files changed, 140 insertions, 126 deletions
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" />