summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 3aa426be7..016879c3c 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 2c2bde0f4..a84d1509e 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 3aa426be7..016879c3c 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 @@
}
]
}
-]
+ ]
+}