From 754851249b5722222a84e5a821f6edea095e72e7 Mon Sep 17 00:00:00 2001 From: Steven Saunders Date: Wed, 16 Dec 2015 14:31:40 -0700 Subject: make create, delete, get work with new topology based REST calls Change-Id: Iad6fa28971ad61003d34ed38ab2e2d8647dc31bd Signed-off-by: Steven Saunders --- .../com/cablelabs/vcpe/uni/unibase/client/EvcPathClient.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'uni/unibase/src/main/java/com/cablelabs/vcpe/uni/unibase/client/EvcPathClient.java') diff --git a/uni/unibase/src/main/java/com/cablelabs/vcpe/uni/unibase/client/EvcPathClient.java b/uni/unibase/src/main/java/com/cablelabs/vcpe/uni/unibase/client/EvcPathClient.java index 0fb47d1..50feb6c 100644 --- a/uni/unibase/src/main/java/com/cablelabs/vcpe/uni/unibase/client/EvcPathClient.java +++ b/uni/unibase/src/main/java/com/cablelabs/vcpe/uni/unibase/client/EvcPathClient.java @@ -29,9 +29,10 @@ import java.util.List; public class EvcPathClient { + // private String evcMgrServer = "10.36.0.20"; private String evcMgrServer = "localhost"; private String evcMgrPort = "8181"; - private String evcMgrCfgRESTPath = "/restconf/config/cl-vcpe-mef:evcs/"; + private String evcMgrCfgRESTPath = "/restconf/config/network-topology:network-topology/topology/unimgr:evc/link/"; private Client client; // provided by Jersey @@ -49,7 +50,7 @@ public class EvcPathClient { Dbg.p("\nEVC Create JSON:"); Dbg.p(json); - Response response = target.path("evc") + Response response = target.path("") .request(MediaType.APPLICATION_JSON) .post(Entity.entity(json, MediaType.APPLICATION_JSON)); @@ -74,7 +75,7 @@ public class EvcPathClient { Dbg.p("\nEVC Create/Update JSON:"); Dbg.p(json); - Response response = target.path("evc/"+evcPath.getId()) + Response response = target.path(evcPath.getId()) .request(MediaType.APPLICATION_JSON) .header("Authorization", authorizationHeaderValue) .put(Entity.entity(json, MediaType.APPLICATION_JSON)); @@ -97,7 +98,7 @@ public class EvcPathClient { String authorizationHeaderValue = "Basic " + DatatypeConverter.printBase64Binary(uNameAndPass.getBytes("UTF-8")); - Response response = target.path("evc/" + evcPathId) + Response response = target.path(evcPathId) .request(MediaType.APPLICATION_JSON) .header("Authorization", authorizationHeaderValue) .delete(); -- cgit 1.2.3-korg