From 85e0df60352d2ffa7e63a5a5e570f12cb0b081f4 Mon Sep 17 00:00:00 2001 From: "ramu.n" Date: Fri, 13 Oct 2017 16:18:50 +0530 Subject: Update VoLTE underlay JSON template *Fix missing site element in l3smsitetemplate.json file *Add UT test case delete L3VPN Change-Id: Iee56d30746328e8f094a5c45c6e2e577b6989bf9 Issue-Id: SDNC-108 Signed-off-by: Ramu N --- .../src/main/resources/l3smsitetemplate.json | 6 ++++-- .../plugins/restapicall/TestRestapiCallNode.java | 23 +++++++++++++++++++++- .../src/test/resources/l3smsitetemplate.json | 6 ++++-- 3 files changed, 30 insertions(+), 5 deletions(-) diff --git a/restapi-call-node/provider/src/main/resources/l3smsitetemplate.json b/restapi-call-node/provider/src/main/resources/l3smsitetemplate.json index 3aa426be..016879c3 100644 --- a/restapi-call-node/provider/src/main/resources/l3smsitetemplate.json +++ b/restapi-call-node/provider/src/main/resources/l3smsitetemplate.json @@ -19,7 +19,8 @@ * ============LICENSE_END========================================================= */ -[ +{ + "site":[ { "site-id": ${prop.l3vpn.site1_name}, "vpn-policies": { @@ -177,5 +178,6 @@ } ] } -] + ] +} diff --git a/restapi-call-node/provider/src/test/java/jtest/org/onap/ccsdk/sli/plugins/restapicall/TestRestapiCallNode.java b/restapi-call-node/provider/src/test/java/jtest/org/onap/ccsdk/sli/plugins/restapicall/TestRestapiCallNode.java index 2c2bde0f..a84d1509 100644 --- a/restapi-call-node/provider/src/test/java/jtest/org/onap/ccsdk/sli/plugins/restapicall/TestRestapiCallNode.java +++ b/restapi-call-node/provider/src/test/java/jtest/org/onap/ccsdk/sli/plugins/restapicall/TestRestapiCallNode.java @@ -283,7 +283,28 @@ public class TestRestapiCallNode { RestapiCallNode rcn = new RestapiCallNode(); rcn.sendRequest(p, ctx); } - + + @Test + public void testDeleteVpnJsonTemplate() throws SvcLogicException { + SvcLogicContext ctx = new SvcLogicContext(); + ctx.setAttribute("prop.l3vpn.name", "10000000-0000-0000-0000-000000000001"); + ctx.setAttribute("prop.l3vpn.topology", "point_to_point"); + + Map p = new HashMap(); + //p.put("templateFileName", "src/test/resources/l3smvpntemplate.json"); + p.put("restapiUrl", "http://ipwan:18002/restconf/data/huawei-ac-net-l3vpn-svc:l3vpn-svc-cfg/vpn-services" + + "/vpnservice=10000000-0000-0000-0000-000000000001"); + p.put("restapiUser", "admin"); + p.put("restapiPassword", "admin123"); + p.put("format", "json"); + p.put("httpMethod", "delete"); + p.put("responsePrefix", "restapi-result"); + p.put("skipSending", "true"); + + RestapiCallNode rcn = new RestapiCallNode(); + rcn.sendRequest(p, ctx); + } + @Test public void testL2DciTemplate() throws SvcLogicException { SvcLogicContext ctx = new SvcLogicContext(); diff --git a/restapi-call-node/provider/src/test/resources/l3smsitetemplate.json b/restapi-call-node/provider/src/test/resources/l3smsitetemplate.json index 3aa426be..016879c3 100644 --- a/restapi-call-node/provider/src/test/resources/l3smsitetemplate.json +++ b/restapi-call-node/provider/src/test/resources/l3smsitetemplate.json @@ -19,7 +19,8 @@ * ============LICENSE_END========================================================= */ -[ +{ + "site":[ { "site-id": ${prop.l3vpn.site1_name}, "vpn-policies": { @@ -177,5 +178,6 @@ } ] } -] + ] +} -- cgit 1.2.3-korg