aboutsummaryrefslogtreecommitdiffstats
path: root/restapi-call-node/provider/src/test/java/jtest/org/onap
diff options
context:
space:
mode:
authorramu.n <ramu.n@huawei.com>2017-09-29 06:32:52 +0530
committerramu.n <ramu.n@huawei.com>2017-09-29 06:49:14 +0530
commit02c63c550acb82bee8d360c01bb1723b10f8df9a (patch)
tree7896d854e9d5c5e077f0fbca74d3472bd9c284a9 /restapi-call-node/provider/src/test/java/jtest/org/onap
parente93cd6ed5eaaf014a295afdf7a63a3ec3de89b9b (diff)
Update VoLTE underlay JSON template
*Add vrf-attribute configuration *Add BGP protocol type for ac Change-Id: I6deb5b4ec6d71b18e8d6b67aadaba18b7a27c47b Issue-Id: SDNC-108 Signed-off-by: Ramu N <ramu.n@huawei.com>
Diffstat (limited to 'restapi-call-node/provider/src/test/java/jtest/org/onap')
-rw-r--r--restapi-call-node/provider/src/test/java/jtest/org/onap/ccsdk/sli/plugins/restapicall/TestRestapiCallNode.java33
1 files changed, 31 insertions, 2 deletions
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 1dcc97bc..2c2bde0f 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
@@ -23,6 +23,7 @@ package jtest.org.onap.ccsdk.sli.plugins.restapicall;
import java.util.HashMap;
import java.util.Map;
+
import org.junit.Test;
import org.onap.ccsdk.sli.core.sli.SvcLogicContext;
import org.onap.ccsdk.sli.core.sli.SvcLogicException;
@@ -229,7 +230,9 @@ public class TestRestapiCallNode {
ctx.setAttribute("prop.l3vpn.ac1_id", "a8098c1a-f86e-11da-bd1a-00112444be1b");
ctx.setAttribute("prop.l3vpn.ac1-peer-ip", "192.168.1.1");
ctx.setAttribute("prop.l3vpn.ac1-ip", "192.168.1.2");
- ctx.setAttribute("prop.l3vpn.sna1-route", "192.168.1.4/24");
+ ctx.setAttribute("prop.l3vpn.ac1_protocol", "static");
+ ctx.setAttribute("prop.l3vpn.sna1-route.ip-prefix", "192.168.1.1/24");
+ ctx.setAttribute("prop.l3vpn.sna1-route.next-hop", "192.168.1.4");
ctx.setAttribute("prop.l3vpn.site2_name", "10000000-0000-0000-0000-000000000005");
ctx.setAttribute("prop.l3vpn.vpn-policy2-id", "10000000-0000-0000-0000-000000000006");
@@ -239,7 +242,9 @@ public class TestRestapiCallNode {
ctx.setAttribute("prop.l3vpn.ac2_id", "a8098c1a-f86e-11da-bd1a-00112444be1c");
ctx.setAttribute("prop.l3vpn.ac2-peer-ip", "192.168.1.5");
ctx.setAttribute("prop.l3vpn.ac2-ip", "192.168.1.5");
- ctx.setAttribute("prop.l3vpn.sna2-route", "192.168.1.8/24");
+ ctx.setAttribute("prop.l3vpn.ac2_protocol", "bgp");
+ ctx.setAttribute("prop.l3vpn.peer2-ip", "192.168.1.5");
+ ctx.setAttribute("prop.l3vpn.ac2_protocol_bgp_as", "200");
Map<String, String> p = new HashMap<String, String>();
p.put("templateFileName", "src/test/resources/l3smsitetemplate.json");
@@ -256,6 +261,30 @@ public class TestRestapiCallNode {
}
@Test
+ public void testVrfJsonTemplate() throws SvcLogicException {
+ SvcLogicContext ctx = new SvcLogicContext();
+ ctx.setAttribute("prop.l3vpn.vrf1-id", "10000000-0000-0000-0000-000000000007");
+ ctx.setAttribute("prop.l3vpn.vpn-policy1-id", "10000000-0000-0000-0000-000000000003");
+ ctx.setAttribute("prop.l3vpn.pe1_id", "a8098c1a-f86e-11da-bd1a-00112444be1e");
+ ctx.setAttribute("prop.l3vpn.vrf2-id", "10000000-0000-0000-0000-000000000009");
+ ctx.setAttribute("prop.l3vpn.vpn-policy2-id", "10000000-0000-0000-0000-000000000006");
+ ctx.setAttribute("prop.l3vpn.pe2_id", "a8098c1a-f86e-11da-bd1a-00112444be1a");
+
+ Map<String, String> p = new HashMap<String, String>();
+ p.put("templateFileName", "src/test/resources/l3smvrftemplate.json");
+ p.put("restapiUrl", "http://ipwan:18002/restconf/data/huawei-ac-net-l3vpn-svc:l3vpn-svc-cfg/vrf-attributes");
+ p.put("restapiUser", "admin");
+ p.put("restapiPassword", "admin123");
+ p.put("format", "json");
+ p.put("httpMethod", "post");
+ 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();
ctx.setAttribute("prop.dci-connects.id", "Id1");