diff options
author | Dan Timoney <dtimoney@att.com> | 2018-11-19 22:43:21 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-11-19 22:43:21 +0000 |
commit | 544eb60c3511df480063a96ddb068eb4ba4aee62 (patch) | |
tree | fc4d86b9a1b438ea2d44d6da5bfa6a82c5b74479 /platform-logic/datachange/src/main/xml | |
parent | 24c5beebeddbfa1717db15793ea02a2b40dff214 (diff) | |
parent | d1e6d41cce7c5a894536b2b88da760236b60a17d (diff) |
Merge "removed vnf-id validation check in DG"
Former-commit-id: a2736d119810fc5475585cc4b4586da470f26b2f
Diffstat (limited to 'platform-logic/datachange/src/main/xml')
-rw-r--r-- | platform-logic/datachange/src/main/xml/DataChange_esr-thirdparty-sdnc-discovery.xml | 183 |
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 |