summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorramu.n <ramu.n@huawei.com>2017-10-13 16:18:50 +0530
committerramu.n <ramu.n@huawei.com>2017-10-13 16:18:50 +0530
commit85e0df60352d2ffa7e63a5a5e570f12cb0b081f4 (patch)
treea5cfd1c1b5adca35231146e8d057129fa1f9b7e2
parent3cc6cc194791d9eedfe87fd671ee0db3e8e72897 (diff)
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 <ramu.n@huawei.com>
-rw-r--r--restapi-call-node/provider/src/main/resources/l3smsitetemplate.json6
-rw-r--r--restapi-call-node/provider/src/test/java/jtest/org/onap/ccsdk/sli/plugins/restapicall/TestRestapiCallNode.java23
-rw-r--r--restapi-call-node/provider/src/test/resources/l3smsitetemplate.json6
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<String, String> p = new HashMap<String, String>();
+ //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 @@
}
]
}
-]
+ ]
+}