diff options
author | 2017-10-17 20:58:58 +0530 | |
---|---|---|
committer | 2017-10-17 20:58:58 +0530 | |
commit | b7367b675238fa88f4bdee8bb6735a3b5ed3d201 (patch) | |
tree | c6fa134facb6612779e8c73c1ed7678e747564cf /platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-create.xml | |
parent | d51d41fa3a6d2280a9f2b5608cb6772398043707 (diff) |
Fix underlay DG testing issues
*Fix json template context variable name
*Add customHttpHeaders
Change-Id: Ic565716227327db53c8cd65cb5c44b57f2501042
Issue-Id: SDNC-131
Signed-off-by: Ramu N <ramu.n@huawei.com>
Former-commit-id: 9ea126b1bfbf0908e45eaf52d61b6b2032fc1b23
Diffstat (limited to 'platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-create.xml')
-rw-r--r-- | platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_network-topology-operation-create.xml | 64 |
1 files changed, 55 insertions, 9 deletions
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 bc167e8f..d8c4a960 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 @@ -361,41 +361,87 @@ <parameter name="vrf2-id" value="`$prop.l3vpn.vrf2-id`" />
<parameter name="af_type" value="`$prop.l3vpn.af_type`" />
</record>
- <switch test="`$network-topology-operation-input.network-request-input.network-input-parameters.param[$idx].name == 'service-type'`">
+ <switch test="`$prop.l3vpn.service-type`">
<outcome value="l3vpn-ipwan">
<block atomic="true">
<execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
- <parameter name="templateFileName" value="`$prop.sdncRestApi.tempDir + '/l3smvpntemplate.json'`" />
+ <parameter name="templateFileName" value="`$prop.sdncRestApi.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>
+ <execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
+ <parameter name="templateFileName" value="`$prop.sdncRestApi.templateDir + '/l3smvpntemplate.json'`" />
<parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url + '/restconf/data/huawei-ac-net-l3vpn-svc:l3vpn-svc-cfg/vpn-services'`" />
<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="responsePrefix" value="vpn-result" />
+ <parameter name="customHttpHeaders" value="`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`" />
+ <outcome value="success" />
+ <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" />
+ </return>
+ </outcome>
</execute>
<execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
- <parameter name="templateFileName" value="`$prop.sdncRestApi.tempDir +'/l3smsitetemplate.json'`" />
+ <parameter name="templateFileName" value="`$prop.sdncRestApi.templateDir +'/l3smsitetemplate.json'`" />
<parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url +'/restconf/data/huawei-ac-net-l3vpn-svc:l3vpn-svc-cfg/sites'`" />
<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="responsePrefix" value="site-result" />
+ <parameter name="customHttpHeaders" value="`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`" />
+ <outcome value="success" />
+ <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" />
+ </return>
+ </outcome>
</execute>
<execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
- <parameter name="templateFileName" value="`$prop.sdncRestApi.tempDir +'/l3smvrftemplate.json'`" />
+ <parameter name="templateFileName" value="`$prop.sdncRestApi.templateDir +'/l3smvrftemplate.json'`" />
<parameter name="restapiUrl" value="`$prop.sdncRestApi.thirdpartySdnc.url +'/restconf/data/huawei-ac-net-l3vpn-svc:l3vpn-svc-cfg/vrf-attributes'`" />
<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="responsePrefix" value="vrf-result" />
+ <parameter name="customHttpHeaders" value="`'X-ACCESS-TOKEN=' + $prop.sdncRestApi.token_id`" />
+ <outcome value="success" />
+ <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" />
+ </return>
+ </outcome>
</execute>
</block>
</outcome>
- <outcome value="true">
+ <outcome value="l3vpn-sptn">
<execute plugin="org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode" method="sendRequest">
- <parameter name="templateFileName" value="$prop.sdncRestApi.tempDir +'/l3smsitetemplate.json'" />
+ <parameter name="templateFileName" value="$prop.sdncRestApi.templateDir +'/l3smsitetemplate.json'" />
<parameter name="restapiUrl" value="$prop.sdncRestApi.thirdpartySdnc.url" />
<parameter name="restapiUser" value="$prop.sdncRestApi.thirdpartySdnc.user" />
<parameter name="restapiPassword" value="$prop.sdncRestApi.thirdpartySdnc.password" />
|