aboutsummaryrefslogtreecommitdiffstats
path: root/platform-logic/datachange/src/main/xml
diff options
context:
space:
mode:
authorshashikanth.vh <shashikanth.vh@huawei.com>2018-11-15 17:48:12 +0530
committerShashikanth VH <shashikanth.vh@huawei.com>2018-11-18 01:31:41 +0000
commitd1e6d41cce7c5a894536b2b88da760236b60a17d (patch)
treed9ff08b2f5ba2f6008b0e3c9d9b0bf62568f5566 /platform-logic/datachange/src/main/xml
parent3df4ba7c88cf330cd358b2cc1a21cd31405fcbb7 (diff)
removed vnf-id validation check in DG
1.vnf-information.vnf-id validation check should not be mandatory in validate-vnf-input DG, its removed. 2. added execute node to read generic-resource-api-dg.properties in esr-thirdparty-sdnc-discovery DG. Change-Id: Iea920004cdd548e16b4223cf57008fc00dbb1cb2 Issue-ID: SDNC-523 Signed-off-by: shashikanth.vh <shashikanth.vh@huawei.com> Former-commit-id: 4f1d05b32513c4bbca760233948541cfb983cfb3
Diffstat (limited to 'platform-logic/datachange/src/main/xml')
-rw-r--r--platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-discovery.xml183
1 files changed, 122 insertions, 61 deletions
diff --git a/platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-discovery.xml b/platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-discovery.xml
index dcab41bd..0d47536e 100644
--- a/platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-discovery.xml
+++ b/platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-discovery.xml
@@ -1,61 +1,122 @@
-<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='DataChange' version='${project.version}'>
- <method rpc='esr-thirdparty-sdnc-discovery' mode='sync'>
- <block atomic="true">
- <switch test="`$data-change-notification-input.aai-event-trigger`">
- <outcome value='Update'>
- <block>
- <switch test="`$prop.sdncRestApi.type`">
- <outcome value='SOTN'>
- <block atomic="true">
- <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
- <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/ietf-network:networks'`" />
- <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="get"/>
- <parameter name="responsePrefix" value="topology"/>
- <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='success'>
- <block atomic="true"></block>
- </outcome>
- <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 vpn rest api" />
- </return>
- </outcome>
- </execute>
- <for index='nidx' start='0' end='`$topology.networks.network_length`' >
- <block>
- <set>
- <parameter name='network.' value='`$topology.networks.network[$nidx].`' />
- </set>
- <call module='DataChange' rpc='update-network-to-aai' mode='sync' ></call>
- </block>
- </for>
- </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="`'Unsupported type = ' + $prop.sdncRestApi.type`" />
- </return>
- </outcome>
- </switch>
- </block>
- </outcome>
- <outcome value='delete'>
- <block atomic="true"></block>
- </outcome>
- </switch>
- </block>
- </method>
-</service-logic>
+<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='DataChange' version='${project.version}'>
+ <method rpc='esr-thirdparty-sdnc-discovery' mode='sync'>
+ <block atomic="true">
+ <switch test="`$data-change-notification-input.aai-event-trigger`">
+ <outcome value='Update'>
+ <block>
+ <switch test="`$prop.sdncRestApi.type`">
+ <outcome value='SOTN'>
+ <block atomic="true">
+ <execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >
+ <parameter name='fileName' value='%SDNC_CONFIG_DIR%/generic-resource-api-dg.properties' />
+ <parameter name='contextPrefix' value='prop' />
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir + '/actokentemplate.json'`" />
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/controller/v2/tokens'`" />
+ <parameter name="format" value="json"/>
+ <parameter name="httpMethod" value="post"/>
+ <parameter name="responsePrefix" value="token-result"/>
+ <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"/>
+ <outcome value='success'>
+ <set>
+ <parameter name='prop.sdncRestApi.token_id' value='`$token-result.data.token_id`' />
+ </set>
+ </outcome>
+ <outcome value='failure'>
+ <block></block>
+ </outcome>
+ </execute>
+ <switch test="`$prop.sdncRestApi.token_id`">
+ <outcome value=''>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/ietf-network:networks'`" />
+ <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="get"/>
+ <parameter name="responsePrefix" value="topology"/>
+ <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"/>
+ <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 vpn rest api" />
+ </return>
+ </outcome>
+ <outcome value='success'>
+ <block atomic="true">
+ <for index='nidx' start='0' end='`$topology.networks.network_length`' >
+ <block>
+ <set>
+ <parameter name='network.' value='`$topology.networks.network[$nidx].`' />
+ </set>
+ <call module='DataChange' rpc='update-network-to-aai' mode='sync' ></call>
+ </block>
+ </for>
+ </block>
+ </outcome>
+ </execute>
+ </outcome>
+ <outcome value='Other'>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/ietf-network:networks'`" />
+ <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="get"/>
+ <parameter name="responsePrefix" value="topology"/>
+ <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 vpn rest api" />
+ </return>
+ </outcome>
+ <outcome value='success'>
+ <block atomic="true">
+ <for index='nidx' start='0' end='`$topology.networks.network_length`' >
+ <block>
+ <set>
+ <parameter name='network.' value='`$topology.networks.network[$nidx].`' />
+ </set>
+ <call module='DataChange' rpc='update-network-to-aai' mode='sync' ></call>
+ </block>
+ </for>
+ </block>
+ </outcome>
+ </execute>
+ </outcome>
+ </switch>
+ </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="`'Unsupported type = ' + $prop.sdncRestApi.type`" />
+ </return>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='delete'>
+ <block atomic="true"></block>
+ </outcome>
+ </switch>
+ </block>
+ </method>
+</service-logic> \ No newline at end of file