diff options
author | ramu.n <ramu.n@huawei.com> | 2017-11-14 20:05:30 +0530 |
---|---|---|
committer | ramu.n <ramu.n@huawei.com> | 2017-11-14 20:05:30 +0530 |
commit | 42fb5723b7b11e94fc7d5ab901ae293b7fd67d7f (patch) | |
tree | 45498af955efd43a093c208dc630a8752e2ebd81 /platform-logic/generic-resource-api/src/main/xml | |
parent | 125ff04404f8cacc991ad4059e1553d74dac30a2 (diff) |
Update underlay DG for delete flow
*Need to store vrf ids which are reuired during delete
*Add delete network from MDSAL data store
Change-Id: I411c01f90a2a186e2d72f570c30ae8ecdd8d5b15
Issue-Id: SDNC-188
Signed-off-by: Ramu N <ramu.n@huawei.com>
Former-commit-id: f28363f0fae83efa9cb09ddd61fd995ccdf8498c
Diffstat (limited to 'platform-logic/generic-resource-api/src/main/xml')
4 files changed, 261 insertions, 192 deletions
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_dci-connects-network-topology-operation-activate.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_dci-connects-network-topology-operation-activate.xml index c0046db3..3afa4b93 100644 --- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_dci-connects-network-topology-operation-activate.xml +++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_dci-connects-network-topology-operation-activate.xml @@ -155,6 +155,7 @@ <parameter name="prop.sdncRestApi.thirdpartySdnc.url" value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].service-url`" />
<parameter name="prop.sdncRestApi.thirdpartySdnc.user" value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`" />
<parameter name="prop.sdncRestApi.thirdpartySdnc.password" value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].password`" />
+ <parameter name="prop.sdncRestApi.thirdpartySdnc.vendor" value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].vendor`" />
</set>
</outcome>
<outcome value="not-found">
@@ -187,49 +188,32 @@ <parameter name="field9" value="sdncRestApi.thirdpartySdnc.url" />
<parameter name="field10" value="`$prop.sdncRestApi.thirdpartySdnc.url`" />
</record>
- <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" />
- <outcome value="success">
- <set>
- <parameter name="prop.sdncRestApi.token_id" value="$token-result.token_id" />
- </set>
- </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 get token rest api" />
- </return>
- </outcome>
- </execute>
- <switch test="`$prop.dci-connects.tunnelType`">
- <outcome value="L3-DCI">
- <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
- <parameter name="templateFileName" value="`$prop.restapi.templateDir +'/l3-dci-connects-template.json'`" />
- <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url +'/v2.0/l3-dci-connects'`" />
- <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="restapi-result" />
- <parameter name="customHttpHeaders" value="`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`" />
- </execute>
- </outcome>
- <outcome value="L2-DCI">
- <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
- <parameter name="templateFileName" value="`$prop.restapi.templateDir +'/l2-dci-connects-template.json'`" />
- <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url +'/v2.0/l2-dci-connects'`" />
- <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="restapi-result" />
- <parameter name="customHttpHeaders" value="`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`" />
- </execute>
+ <switch test="`$prop.sdncRestApi.thirdpartySdnc.vendor`">
+ <outcome value="SPTN">
+ <switch test="`$prop.dci-connects.tunnelType`">
+ <outcome value="L3-DCI">
+ <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir +'/l3-dci-connects-template.json'`" />
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url +'/v2.0/l3-dci-connects'`" />
+ <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="restapi-result" />
+ </execute>
+ </outcome>
+ <outcome value="L2-DCI">
+ <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir +'/l2-dci-connects-template.json'`" />
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url +'/v2.0/l2-dci-connects'`" />
+ <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="restapi-result" />
+ </execute>
+ </outcome>
+ </switch>
</outcome>
</switch>
</block>
@@ -376,6 +360,7 @@ <parameter name="prop.sdncRestApi.thirdpartySdnc.url" value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].service-url`" />
<parameter name="prop.sdncRestApi.thirdpartySdnc.user" value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`" />
<parameter name="prop.sdncRestApi.thirdpartySdnc.password" value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].password`" />
+ <parameter name="prop.sdncRestApi.thirdpartySdnc.vendor" value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].vendor`" />
</set>
</outcome>
<outcome value="not-found">
@@ -408,49 +393,32 @@ <parameter name="field9" value="sdncRestApi.thirdpartySdnc.url" />
<parameter name="field10" value="`$prop.sdncRestApi.thirdpartySdnc.url`" />
</record>
- <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" />
- <outcome value="success">
- <set>
- <parameter name="prop.sdncRestApi.token_id" value="$token-result.token_id" />
- </set>
- </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 get token rest api" />
- </return>
- </outcome>
- </execute>
- <switch test="`$prop.dci-connects.tunnelType`">
- <outcome value="L3-DCI">
- <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
- <parameter name="templateFileName" value="`$prop.restapi.templateDir +'/l3-dci-connects-template.json'`" />
- <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url +'/v2.0/l3-dci-connects'`" />
- <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="restapi-result" />
- <parameter name="customHttpHeaders" value="`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`" />
- </execute>
- </outcome>
- <outcome value="L2-DCI">
- <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
- <parameter name="templateFileName" value="`$prop.restapi.templateDir +'/l2-dci-connects-template.json'`" />
- <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url +'/v2.0/l2-dci-connects'`" />
- <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="restapi-result" />
- <parameter name="customHttpHeaders" value="`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`" />
- </execute>
+ <switch test="`$prop.sdncRestApi.thirdpartySdnc.vendor`">
+ <outcome value="SPTN">
+ <switch test="`$prop.dci-connects.tunnelType`">
+ <outcome value="L3-DCI">
+ <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir +'/l3-dci-connects-template.json'`" />
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url +'/v2.0/l3-dci-connects'`" />
+ <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="restapi-result" />
+ </execute>
+ </outcome>
+ <outcome value="L2-DCI">
+ <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
+ <parameter name="templateFileName" value="`$prop.restapi.templateDir +'/l2-dci-connects-template.json'`" />
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url +'/v2.0/l2-dci-connects'`" />
+ <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="restapi-result" />
+ </execute>
+ </outcome>
+ </switch>
</outcome>
</switch>
</block>
@@ -500,8 +468,6 @@ <parameter name="relationship-list.relationship[0].related-link" value="/network/configurations/configuration" />
<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-key" value="configuration.configuration-id" />
<parameter name="relationship-list.relationship[0].relationship-data[0].relationship-value" value="`$prop.dci.network-id`" />
- <parameter name="relationship-list.relationship[0].relationship-data[1].relationship-key" value="configuration.configuration-type" />
- <parameter name="relationship-list.relationship[0].relationship-data[1].relationship-value" value="overlay" />
</save>
<return status="success">
<parameter name="ack-final-indicator" value="Y" />
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_dci-connects-network-topology-operation-deactivate.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_dci-connects-network-topology-operation-deactivate.xml index 1883baf8..04cbb6e9 100644 --- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_dci-connects-network-topology-operation-deactivate.xml +++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_dci-connects-network-topology-operation-deactivate.xml @@ -30,6 +30,7 @@ <parameter name="prop.sdncRestApi.templateDir" value="/opt/onap/sdnc/data" />
<parameter name="prop.sdncRestApi.thirdpartySdnc.user" value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`" />
<parameter name="prop.sdncRestApi.thirdpartySdnc.password" value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].password`" />
+ <parameter name="prop.sdncRestApi.thirdpartySdnc.vendor" value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].vendor`" />
</set>
</outcome>
<outcome value="not-found">
@@ -62,47 +63,32 @@ <parameter name="field9" value="sdncRestApi.thirdpartySdnc.url" />
<parameter name="field10" value="`$prop.sdncRestApi.thirdpartySdnc.url`" />
</record>
- <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" />
- <outcome value="success">
- <set>
- <parameter name="prop.sdncRestApi.token_id" value="$token-result.token_id" />
- </set>
- </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 get token rest api" />
- </return>
- </outcome>
- </execute>
- <switch test="`$prop.dci-connects.tunnelType`">
- <outcome value="L3-DCI">
- <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
- <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/v2.0/l3-dci-connects/' + $prop.dci-connects.id`" />
- <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="delete" />
- <parameter name="responsePrefix" value="restapi-result" />
- <parameter name="customHttpHeaders" value="`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`" />
- </execute>
- </outcome>
- <outcome value="L2-DCI">
- <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
- <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/v2.0/l2-dci-connects/' + $prop.dci-connects.id`" />
- <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="delete" />
- <parameter name="responsePrefix" value="restapi-result" />
- <parameter name="customHttpHeaders" value="`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`" />
- </execute>
+ <switch test="`$prop.sdncRestApi.thirdpartySdnc.vendor`">
+ <outcome value="SPTN">
+ <switch test="`$prop.dci-connects.tunnelType`">
+ <outcome value="L3-DCI">
+ <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/v2.0/l3-dci-connects/' + $prop.dci-connects.id`" />
+ <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="delete" />
+ <parameter name="responsePrefix" value="restapi-result" />
+ <parameter name="customHttpHeaders" value="`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`" />
+ </execute>
+ </outcome>
+ <outcome value="L2-DCI">
+ <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/v2.0/l2-dci-connects/' + $prop.dci-connects.id`" />
+ <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="delete" />
+ <parameter name="responsePrefix" value="restapi-result" />
+ <parameter name="customHttpHeaders" value="`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`" />
+ </execute>
+ </outcome>
+ </switch>
</outcome>
</switch>
</block>
@@ -127,6 +113,7 @@ <parameter name="prop.sdncRestApi.templateDir" value="/opt/onap/sdnc/data" />
<parameter name="prop.sdncRestApi.thirdpartySdnc.user" value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].user-name`" />
<parameter name="prop.sdncRestApi.thirdpartySdnc.password" value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].password`" />
+ <parameter name="prop.sdncRestApi.thirdpartySdnc.vendor" value="`$tmp.aai.esr-thirdparty-sdnc.esr-system-info-list.esr-system-info[0].vendor`" />
</set>
</outcome>
<outcome value="not-found">
@@ -159,47 +146,32 @@ <parameter name="field9" value="sdncRestApi.thirdpartySdnc.url" />
<parameter name="field10" value="`$prop.sdncRestApi.thirdpartySdnc.url`" />
</record>
- <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" />
- <outcome value="success">
- <set>
- <parameter name="prop.sdncRestApi.token_id" value="$token-result.token_id" />
- </set>
- </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 get token rest api" />
- </return>
- </outcome>
- </execute>
- <switch test="`$prop.dci-connects.tunnelType`">
- <outcome value="L3-DCI">
- <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
- <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/v2.0/l3-dci-connects/' + $prop.dci-connects.id`" />
- <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="delete" />
- <parameter name="responsePrefix" value="restapi-result" />
- <parameter name="customHttpHeaders" value="`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`" />
- </execute>
- </outcome>
- <outcome value="L2-DCI">
- <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
- <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/v2.0/l2-dci-connects/' + $prop.dci-connects.id`" />
- <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="delete" />
- <parameter name="responsePrefix" value="restapi-result" />
- <parameter name="customHttpHeaders" value="`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`" />
- </execute>
+ <switch test="`$prop.sdncRestApi.thirdpartySdnc.vendor`">
+ <outcome value="SPTN">
+ <switch test="`$prop.dci-connects.tunnelType`">
+ <outcome value="L3-DCI">
+ <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/v2.0/l3-dci-connects/' + $prop.dci-connects.id`" />
+ <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="delete" />
+ <parameter name="responsePrefix" value="restapi-result" />
+ <parameter name="customHttpHeaders" value="`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`" />
+ </execute>
+ </outcome>
+ <outcome value="L2-DCI">
+ <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/v2.0/l2-dci-connects/' + $prop.dci-connects.id`" />
+ <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="delete" />
+ <parameter name="responsePrefix" value="restapi-result" />
+ <parameter name="customHttpHeaders" value="`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`" />
+ </execute>
+ </outcome>
+ </switch>
</outcome>
</switch>
</block>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-create.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-create.xml index f4fd9eef..54585562 100644 --- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-create.xml +++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-create.xml @@ -522,6 +522,16 @@ <parameter name="service-data.networks.network_length" value="`$nidx+1`" />
</set>
<set>
+ <parameter name="pidx" value="`$network-topology-operation-input.network-request-input.network-input-parameters.param_length`" />
+ </set>
+ <set>
+ <parameter name="service-data.networks.network[$nidx].network-data.network-request-input.network-input-parameters.param[$pidx].name" value="vrf1_id" />
+ <parameter name="service-data.networks.network[$nidx].network-data.network-request-input.network-input-parameters.param[$pidx].value" value="`$prop.l3vpn.vrf1-id`" />
+ <parameter name="service-data.networks.network[$nidx].network-data.network-request-input.network-input-parameters.param[$pidx+1].name" value="vrf2_id" />
+ <parameter name="service-data.networks.network[$nidx].network-data.network-request-input.network-input-parameters.param[$pidx+1].value" value="`$prop.l3vpn.vrf2-id`d" />
+ <parameter name="service-data.networks.network[$nidx].network_data.network-request-input.network-input-parameters.param_length" value="`$pidx+2`" />
+ </set>
+ <set>
<parameter name="networkId" value="`$prop.l3vpn.network-id`" />
<parameter name="network-object-path" value="`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $network-topology-operation-input.service-information.service-instance-id + '/service-data/networks/network/' + $prop.l3vpn.network-id + '/network-data/'` " />
</set>
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-delete.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-delete.xml index 3e2ff578..22952f50 100644 --- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-delete.xml +++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-delete.xml @@ -4,6 +4,13 @@ <block atomic="true">
<call module="GENERIC-RESOURCE-API" rpc="validate-network-input-parameters" mode="sync" />
<switch test="`$service-data.networks.network_length`">
+ <outcome value="0">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="network-topology-operation-input.network-request-input.network-id not found in service-data" />
+ </return>
+ </outcome>
<outcome value="">
<return status="failure">
<parameter name="ack-final" value="Y" />
@@ -58,6 +65,27 @@ </set>
</outcome>
</switch>
+ <switch test="`$service-data.networks.network[$tmp.nidx].network-data.network-request-input.network-input-parameters.param[$idx].name == 'site1_name'`">
+ <outcome value="true">
+ <set>
+ <parameter name="prop.l3vpn.site1_name" value="`$service-data.networks.network[$tmp.nidx].network-data.network-request-input.network-input-parameters.param[$idx].value`" />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$service-data.networks.network[$tmp.nidx].network-data.network-request-input.network-input-parameters.param[$idx].name == 'vrf1_id'`">
+ <outcome value="true">
+ <set>
+ <parameter name="prop.l3vpn.vrf1-id" value="`$service-data.networks.network[$tmp.nidx].network-data.network-request-input.network-input-parameters.param[$idx].value`" />
+ </set>
+ </outcome>
+ </switch>
+ <switch test="`$service-data.networks.network[$tmp.nidx].network-data.network-request-input.network-input-parameters.param[$idx].name == 'vrf2_id'`">
+ <outcome value="true">
+ <set>
+ <parameter name="prop.l3vpn.vrf2-id" value="`$service-data.networks.network[$tmp.nidx].network-data.network-request-input.network-input-parameters.param[$idx].value`" />
+ </set>
+ </outcome>
+ </switch>
</block>
</for>
<get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="pnf" key="pnf.pnf-name = $prop.l3vpn.pe1_id AND depth = '0'" pfx="tmp.aai.pnf" local-only="false">
@@ -117,9 +145,13 @@ <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.openecomp.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.token_id" />
+ <parameter name="prop.sdncRestApi.token_id" value="$token-result.data.token_id" />
</set>
</outcome>
<outcome value="failure">
@@ -131,44 +163,133 @@ </outcome>
</execute>
<execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
- <parameter name="templateFileName" value="`$prop.restapi.templateDir +'/l3smvpntemplate.json'`" />
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/huawei-ac-net-l3vpn-svc:l3vpn-svc-cfg/sites/site=' + $prop.l3vpn.site1_name`" />
+ <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="delete" />
+ <parameter name="responsePrefix" value="site-result" />
+ <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.openecomp.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 Delete Site rest api" />
+ </return>
+ </outcome>
+ <outcome value="success">
+ <block />
+ </outcome>
+ </execute>
+ <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/huawei-ac-net-l3vpn-svc:l3vpn-svc-cfg/huawei-ac-net-l3vpn-svc-vfi:vrf-attributes/vrf-attribute=' + $prop.l3vpn.vrf1-id`" />
+ <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="delete" />
+ <parameter name="responsePrefix" value="vrf1-result" />
+ <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.openecomp.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 />
+ </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 Delete VRF1 rest api" />
+ </return>
+ </outcome>
+ </execute>
+ <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
+ <parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/huawei-ac-net-l3vpn-svc:l3vpn-svc-cfg/huawei-ac-net-l3vpn-svc-vfi:vrf-attributes/vrf-attribute=' + $prop.l3vpn.vrf2-id`" />
+ <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="delete" />
+ <parameter name="responsePrefix" value="vrf2-result" />
+ <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.openecomp.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 />
+ </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 Delete VRF2 rest api" />
+ </return>
+ </outcome>
+ </execute>
+ <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
<parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/huawei-ac-net-l3vpn-svc:l3vpn-svc-cfg/vpn-services/vpnservice=' + $prop.l3vpn.name`" />
<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="delete" />
- <parameter name="responsePrefix" value="restapi-result" />
+ <parameter name="responsePrefix" value="vpn-result" />
+ <parameter name="trustStoreFileName" value="/opt/onap/sdnc/data/stores/truststore.openecomp.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" />
+ <outcome value="success">
+ <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 3rd party controller rest api" />
+ <parameter name="error-message" value="Error executing Delete VPN rest api" />
</return>
</outcome>
</execute>
</block>
</outcome>
</switch>
- <block atomic="true">
- <set>
- <parameter name="service-data.networks.network[$tmp.nidx].network-data.sdnc-request-header." value="`$network-topology-operation-input.sdnc-request-header.`" />
- <parameter name="service-data.networks.network[$tmp.nidx].network-data.request-information." value="`$network-topology-operation-input.request-information.`" />
- </set>
- <set>
- <parameter name="networkId" value="`$network-topology-operation-input.network-information.network-id`" />
- </set>
- <set>
- <parameter name="network-object-path" value="`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $network-topology-operation-input.service-information.service-instance-id + '/service-data/networks/network/' + $networkId + '/network-data/'` " />
- </set>
- <set>
- <parameter name="service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.order-status" value="Deleted" />
- <parameter name="service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.last-rpc-action" value="`$network-topology-operation-input.sdnc-request-header.svc-action`" />
- <parameter name="service-data.networks.network[$tmp.nidx].network-data.network-level-oper-status.last-action" value="`$network-topology-operation-input.request-information.request-action`" />
- </set>
- </block>
<delete plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService" resource="configuration" key="configuration.configuration-id = $network-topology-operation-input.network-information.network-id" />
+ <set>
+ <parameter name="tmp.nw-url" value="`'/restconf/config/GENERIC-RESOURCE-API:services/service/' + $network-topology-operation-input.service-information.service-instance-id + '/service-data/networks/network/' + $network-topology-operation-input.network-information.network-id` " />
+ </set>
+ <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
+ <parameter name="restapiUrl" value="`$prop.controller.url + $tmp.nw-url`" />
+ <parameter name="restapiUser" value="`$prop.controller.user`" />
+ <parameter name="restapiPassword" value="`$prop.controller.pwd`" />
+ <parameter name="format" value="json" />
+ <parameter name="httpMethod" value="DELETE" />
+ <parameter name="responsePrefix" value="mdsal-nw" />
+ <outcome value="success">
+ <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 updating md-sal for network-data" />
+ </return>
+ </outcome>
+ <outcome value="not-found">
+ <return status="failure">
+ <parameter name="ack-final" value="Y" />
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error updating md-sal for network-data" />
+ </return>
+ </outcome>
+ </execute>
+ <set>
+ <parameter name="networkId" value="`$network-topology-operation-input.network-information.network-id`" />
+ <parameter name="service-object-path" value="`'restconf/config/GENERIC-RESOURCE-API:services/service/' + $network-topology-operation-input.service-information.service-instance-id + '/service-data/service-topology/'` " />
+ </set>
<return status="success">
<parameter name="ack-final-indicator" value="Y" />
<parameter name="error-code" value="200" />
|