Update VoLTE underlay JSON template 53/18753/1
authorramu.n <ramu.n@huawei.com>
Fri, 13 Oct 2017 10:48:50 +0000 (16:18 +0530)
committerramu.n <ramu.n@huawei.com>
Fri, 13 Oct 2017 10:48:50 +0000 (16:18 +0530)
*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>
restapi-call-node/provider/src/main/resources/l3smsitetemplate.json
restapi-call-node/provider/src/test/java/jtest/org/onap/ccsdk/sli/plugins/restapicall/TestRestapiCallNode.java
restapi-call-node/provider/src/test/resources/l3smsitetemplate.json

index 3aa426b..016879c 100644 (file)
@@ -19,7 +19,8 @@
  * ============LICENSE_END=========================================================
  */
 
-[
+{
+  "site":[
   {
   "site-id": ${prop.l3vpn.site1_name},
   "vpn-policies": {
     }
     ]
   }
-]
+ ]
+}
 
index 2c2bde0..a84d150 100644 (file)
@@ -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();
index 3aa426b..016879c 100644 (file)
@@ -19,7 +19,8 @@
  * ============LICENSE_END=========================================================
  */
 
-[
+{
+  "site":[
   {
   "site-id": ${prop.l3vpn.site1_name},
   "vpn-policies": {
     }
     ]
   }
-]
+ ]
+}