From ed73dbf357aff41edcbab401a94e5fbc266d9391 Mon Sep 17 00:00:00 2001 From: Mufaddal Makati Date: Fri, 7 Aug 2015 13:09:49 -0700 Subject: First Commit --- evc/evcbase/pom.xml | 29 +++ .../vcpe/evc/evcbase/client/EvcClient.java | 149 +++++++++++ .../com/cablelabs/vcpe/evc/evcbase/model/Evc.java | 235 +++++++++++++++++ .../vcpe/evc/evcbase/model/EvcPerformance.java | 102 ++++++++ .../evc/evcbase/repository/EvcRespository.java | 21 ++ .../evcbase/repository/EvcRespositoryInMem.java | 91 +++++++ .../vcpe/evc/evcbase/client/EvcClientTest.java | 163 ++++++++++++ .../evc/evcbase/repository/EvcRepositoryTest.java | 120 +++++++++ .../vcpe/evc/evcbase/client/EvcClient$1.class | Bin 0 -> 748 bytes .../vcpe/evc/evcbase/client/EvcClient.class | Bin 0 -> 4135 bytes .../vcpe/evc/evcbase/model/Evc$EvcType.class | Bin 0 -> 1548 bytes .../vcpe/evc/evcbase/model/Evc$FrameDelivery.class | Bin 0 -> 1566 bytes .../com/cablelabs/vcpe/evc/evcbase/model/Evc.class | Bin 0 -> 8811 bytes .../vcpe/evc/evcbase/model/EvcPerformance.class | Bin 0 -> 3899 bytes .../evc/evcbase/repository/EvcRespository.class | Bin 0 -> 534 bytes .../evcbase/repository/EvcRespositoryInMem.class | Bin 0 -> 3649 bytes evc/evcbase/target/evcbase.jar | Bin 0 -> 13723 bytes evc/evcbase/target/maven-archiver/pom.properties | 5 + .../vcpe/evc/evcbase/client/EvcClientTest.class | Bin 0 -> 5561 bytes .../evc/evcbase/repository/EvcRepositoryTest.class | Bin 0 -> 3935 bytes evc/evcmgr/pom.xml | 39 +++ .../vcpe/evc/evcmgr/CORSResponseFilter.java | 24 ++ .../vcpe/evc/evcmgr/EvcJaxRsApplication.java | 18 ++ .../com/cablelabs/vcpe/evc/evcmgr/EvcService.java | 286 +++++++++++++++++++++ evc/evcmgr/src/main/webapp/WEB-INF/web.xml | 22 ++ evc/evcmgr/src/main/webapp/index.jsp | 8 + .../vcpe/evc/evcmgr/CORSResponseFilter.class | Bin 0 -> 1384 bytes .../vcpe/evc/evcmgr/EvcJaxRsApplication.class | Bin 0 -> 689 bytes .../cablelabs/vcpe/evc/evcmgr/EvcService$1.class | Bin 0 -> 905 bytes .../com/cablelabs/vcpe/evc/evcmgr/EvcService.class | Bin 0 -> 9613 bytes evc/evcmgr/target/evcmgr.war | Bin 0 -> 9835473 bytes .../vcpe/evc/evcmgr/CORSResponseFilter.class | Bin 0 -> 1384 bytes .../vcpe/evc/evcmgr/EvcJaxRsApplication.class | Bin 0 -> 689 bytes .../cablelabs/vcpe/evc/evcmgr/EvcService$1.class | Bin 0 -> 905 bytes .../com/cablelabs/vcpe/evc/evcmgr/EvcService.class | Bin 0 -> 9613 bytes .../WEB-INF/lib/asm-all-repackaged-2.2.0-b14.jar | Bin 0 -> 320127 bytes .../target/evcmgr/WEB-INF/lib/cglib-2.2.0-b14.jar | Bin 0 -> 282815 bytes .../evcmgr/WEB-INF/lib/common-1.0-SNAPSHOT.jar | Bin 0 -> 2690 bytes .../evcmgr/WEB-INF/lib/cosbase-1.0-SNAPSHOT.jar | Bin 0 -> 9554 bytes .../evcmgr/WEB-INF/lib/evcbase-1.0-SNAPSHOT.jar | Bin 0 -> 13723 bytes .../target/evcmgr/WEB-INF/lib/guava-14.0.1.jar | Bin 0 -> 2189117 bytes .../evcmgr/WEB-INF/lib/hk2-api-2.2.0-b14.jar | Bin 0 -> 126233 bytes .../evcmgr/WEB-INF/lib/hk2-locator-2.2.0-b14.jar | Bin 0 -> 133345 bytes .../evcmgr/WEB-INF/lib/hk2-utils-2.2.0-b14.jar | Bin 0 -> 53381 bytes .../WEB-INF/lib/javax.annotation-api-1.2.jar | Bin 0 -> 26366 bytes .../evcmgr/WEB-INF/lib/javax.inject-2.2.0-b14.jar | Bin 0 -> 5987 bytes .../evcmgr/WEB-INF/lib/javax.ws.rs-api-2.0.jar | Bin 0 -> 112758 bytes .../evcmgr/WEB-INF/lib/jersey-client-2.2.jar | Bin 0 -> 117090 bytes .../evcmgr/WEB-INF/lib/jersey-common-2.2.jar | Bin 0 -> 600514 bytes .../lib/jersey-container-servlet-core-2.2.jar | Bin 0 -> 52819 bytes .../evcmgr/WEB-INF/lib/jersey-media-moxy-2.2.jar | Bin 0 -> 15591 bytes .../evcmgr/WEB-INF/lib/jersey-server-2.2.jar | Bin 0 -> 801094 bytes .../lib/org.eclipse.persistence.antlr-2.5.0.jar | Bin 0 -> 189645 bytes .../lib/org.eclipse.persistence.asm-2.5.0.jar | Bin 0 -> 271208 bytes .../lib/org.eclipse.persistence.core-2.5.0.jar | Bin 0 -> 4977121 bytes .../lib/org.eclipse.persistence.moxy-2.5.0.jar | Bin 0 -> 488045 bytes .../WEB-INF/lib/osgi-resource-locator-1.0.1.jar | Bin 0 -> 20235 bytes .../evcmgr/WEB-INF/lib/unibase-1.0-SNAPSHOT.jar | Bin 0 -> 18351 bytes .../WEB-INF/lib/validation-api-1.1.0.Final.jar | Bin 0 -> 63777 bytes evc/evcmgr/target/evcmgr/WEB-INF/web.xml | 22 ++ evc/evcmgr/target/evcmgr/index.jsp | 8 + evc/evcmgr/target/maven-archiver/pom.properties | 5 + evc/pom.xml | 24 ++ 63 files changed, 1371 insertions(+) create mode 100644 evc/evcbase/pom.xml create mode 100644 evc/evcbase/src/main/java/com/cablelabs/vcpe/evc/evcbase/client/EvcClient.java create mode 100644 evc/evcbase/src/main/java/com/cablelabs/vcpe/evc/evcbase/model/Evc.java create mode 100644 evc/evcbase/src/main/java/com/cablelabs/vcpe/evc/evcbase/model/EvcPerformance.java create mode 100644 evc/evcbase/src/main/java/com/cablelabs/vcpe/evc/evcbase/repository/EvcRespository.java create mode 100644 evc/evcbase/src/main/java/com/cablelabs/vcpe/evc/evcbase/repository/EvcRespositoryInMem.java create mode 100644 evc/evcbase/src/test/java/com/cablelabs/vcpe/evc/evcbase/client/EvcClientTest.java create mode 100644 evc/evcbase/src/test/java/com/cablelabs/vcpe/evc/evcbase/repository/EvcRepositoryTest.java create mode 100644 evc/evcbase/target/classes/com/cablelabs/vcpe/evc/evcbase/client/EvcClient$1.class create mode 100644 evc/evcbase/target/classes/com/cablelabs/vcpe/evc/evcbase/client/EvcClient.class create mode 100644 evc/evcbase/target/classes/com/cablelabs/vcpe/evc/evcbase/model/Evc$EvcType.class create mode 100644 evc/evcbase/target/classes/com/cablelabs/vcpe/evc/evcbase/model/Evc$FrameDelivery.class create mode 100644 evc/evcbase/target/classes/com/cablelabs/vcpe/evc/evcbase/model/Evc.class create mode 100644 evc/evcbase/target/classes/com/cablelabs/vcpe/evc/evcbase/model/EvcPerformance.class create mode 100644 evc/evcbase/target/classes/com/cablelabs/vcpe/evc/evcbase/repository/EvcRespository.class create mode 100644 evc/evcbase/target/classes/com/cablelabs/vcpe/evc/evcbase/repository/EvcRespositoryInMem.class create mode 100644 evc/evcbase/target/evcbase.jar create mode 100644 evc/evcbase/target/maven-archiver/pom.properties create mode 100644 evc/evcbase/target/test-classes/com/cablelabs/vcpe/evc/evcbase/client/EvcClientTest.class create mode 100644 evc/evcbase/target/test-classes/com/cablelabs/vcpe/evc/evcbase/repository/EvcRepositoryTest.class create mode 100644 evc/evcmgr/pom.xml create mode 100644 evc/evcmgr/src/main/java/com/cablelabs/vcpe/evc/evcmgr/CORSResponseFilter.java create mode 100644 evc/evcmgr/src/main/java/com/cablelabs/vcpe/evc/evcmgr/EvcJaxRsApplication.java create mode 100644 evc/evcmgr/src/main/java/com/cablelabs/vcpe/evc/evcmgr/EvcService.java create mode 100644 evc/evcmgr/src/main/webapp/WEB-INF/web.xml create mode 100644 evc/evcmgr/src/main/webapp/index.jsp create mode 100644 evc/evcmgr/target/classes/com/cablelabs/vcpe/evc/evcmgr/CORSResponseFilter.class create mode 100644 evc/evcmgr/target/classes/com/cablelabs/vcpe/evc/evcmgr/EvcJaxRsApplication.class create mode 100644 evc/evcmgr/target/classes/com/cablelabs/vcpe/evc/evcmgr/EvcService$1.class create mode 100644 evc/evcmgr/target/classes/com/cablelabs/vcpe/evc/evcmgr/EvcService.class create mode 100644 evc/evcmgr/target/evcmgr.war create mode 100644 evc/evcmgr/target/evcmgr/WEB-INF/classes/com/cablelabs/vcpe/evc/evcmgr/CORSResponseFilter.class create mode 100644 evc/evcmgr/target/evcmgr/WEB-INF/classes/com/cablelabs/vcpe/evc/evcmgr/EvcJaxRsApplication.class create mode 100644 evc/evcmgr/target/evcmgr/WEB-INF/classes/com/cablelabs/vcpe/evc/evcmgr/EvcService$1.class create mode 100644 evc/evcmgr/target/evcmgr/WEB-INF/classes/com/cablelabs/vcpe/evc/evcmgr/EvcService.class create mode 100644 evc/evcmgr/target/evcmgr/WEB-INF/lib/asm-all-repackaged-2.2.0-b14.jar create mode 100644 evc/evcmgr/target/evcmgr/WEB-INF/lib/cglib-2.2.0-b14.jar create mode 100644 evc/evcmgr/target/evcmgr/WEB-INF/lib/common-1.0-SNAPSHOT.jar create mode 100644 evc/evcmgr/target/evcmgr/WEB-INF/lib/cosbase-1.0-SNAPSHOT.jar create mode 100644 evc/evcmgr/target/evcmgr/WEB-INF/lib/evcbase-1.0-SNAPSHOT.jar create mode 100644 evc/evcmgr/target/evcmgr/WEB-INF/lib/guava-14.0.1.jar create mode 100644 evc/evcmgr/target/evcmgr/WEB-INF/lib/hk2-api-2.2.0-b14.jar create mode 100644 evc/evcmgr/target/evcmgr/WEB-INF/lib/hk2-locator-2.2.0-b14.jar create mode 100644 evc/evcmgr/target/evcmgr/WEB-INF/lib/hk2-utils-2.2.0-b14.jar create mode 100644 evc/evcmgr/target/evcmgr/WEB-INF/lib/javax.annotation-api-1.2.jar create mode 100644 evc/evcmgr/target/evcmgr/WEB-INF/lib/javax.inject-2.2.0-b14.jar create mode 100644 evc/evcmgr/target/evcmgr/WEB-INF/lib/javax.ws.rs-api-2.0.jar create mode 100644 evc/evcmgr/target/evcmgr/WEB-INF/lib/jersey-client-2.2.jar create mode 100644 evc/evcmgr/target/evcmgr/WEB-INF/lib/jersey-common-2.2.jar create mode 100644 evc/evcmgr/target/evcmgr/WEB-INF/lib/jersey-container-servlet-core-2.2.jar create mode 100644 evc/evcmgr/target/evcmgr/WEB-INF/lib/jersey-media-moxy-2.2.jar create mode 100644 evc/evcmgr/target/evcmgr/WEB-INF/lib/jersey-server-2.2.jar create mode 100644 evc/evcmgr/target/evcmgr/WEB-INF/lib/org.eclipse.persistence.antlr-2.5.0.jar create mode 100644 evc/evcmgr/target/evcmgr/WEB-INF/lib/org.eclipse.persistence.asm-2.5.0.jar create mode 100644 evc/evcmgr/target/evcmgr/WEB-INF/lib/org.eclipse.persistence.core-2.5.0.jar create mode 100644 evc/evcmgr/target/evcmgr/WEB-INF/lib/org.eclipse.persistence.moxy-2.5.0.jar create mode 100644 evc/evcmgr/target/evcmgr/WEB-INF/lib/osgi-resource-locator-1.0.1.jar create mode 100644 evc/evcmgr/target/evcmgr/WEB-INF/lib/unibase-1.0-SNAPSHOT.jar create mode 100644 evc/evcmgr/target/evcmgr/WEB-INF/lib/validation-api-1.1.0.Final.jar create mode 100644 evc/evcmgr/target/evcmgr/WEB-INF/web.xml create mode 100644 evc/evcmgr/target/evcmgr/index.jsp create mode 100644 evc/evcmgr/target/maven-archiver/pom.properties create mode 100644 evc/pom.xml (limited to 'evc') diff --git a/evc/evcbase/pom.xml b/evc/evcbase/pom.xml new file mode 100644 index 0000000..07c6464 --- /dev/null +++ b/evc/evcbase/pom.xml @@ -0,0 +1,29 @@ + + + + com.cablelabs.vcpe + evc + 1.0-SNAPSHOT + + + 4.0.0 + + com.cablelabs.vcpe + evcbase + jar + 1.0-SNAPSHOT + + + evcbase + + + + + com.cablelabs.vcpe + cosbase + 1.0-SNAPSHOT + + + + diff --git a/evc/evcbase/src/main/java/com/cablelabs/vcpe/evc/evcbase/client/EvcClient.java b/evc/evcbase/src/main/java/com/cablelabs/vcpe/evc/evcbase/client/EvcClient.java new file mode 100644 index 0000000..25fae8b --- /dev/null +++ b/evc/evcbase/src/main/java/com/cablelabs/vcpe/evc/evcbase/client/EvcClient.java @@ -0,0 +1,149 @@ +package com.cablelabs.vcpe.evc.evcbase.client; + +import com.cablelabs.vcpe.evc.evcbase.model.Evc; + +import javax.ws.rs.client.Client; +import javax.ws.rs.client.ClientBuilder; +import javax.ws.rs.client.Entity; +import javax.ws.rs.client.WebTarget; +import javax.ws.rs.core.GenericType; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; +import java.util.List; + +/** + * Created by steve on 6/8/15. + */ +public class EvcClient { + + private Client client; // provided by Jersey + + public EvcClient() { + client = ClientBuilder.newClient(); + } + + //-------------------------------------------------------- + public Evc create(Evc evc) + //-------------------------------------------------------- + { + WebTarget target =client.target("http://localhost:9090/evcmgr/webapi/"); + Response response = target.path("evc") + .request(MediaType.APPLICATION_JSON) + .post(Entity.entity(evc, MediaType.APPLICATION_JSON)); + + if (response.getStatus() != 200 ) // figure out how to use Status.OK + { + // in production you can be more specific based on reponse code, id, etc + throw new RuntimeException(response.getStatus() + ": there was an error on the server."); + } + return response.readEntity(Evc.class); + } + + //-------------------------------------------------------- + public Evc update(Evc evc) + //-------------------------------------------------------- + { + WebTarget target =client.target("http://localhost:9090/evcmgr/webapi/"); + Response response = target.path("evc/"+evc.getId()) + .request(MediaType.APPLICATION_JSON) + .put(Entity.entity(evc, MediaType.APPLICATION_JSON)); + + if (response.getStatus() != 200 ) // figure out how to use Status.OK + { + // in production you can be more specific based on reponse code, id, etc + throw new RuntimeException(response.getStatus() + ": there was an error on the server."); + } + return response.readEntity(Evc.class); + } + + //-------------------------------------------------------- + public Evc get(String evcId) + //-------------------------------------------------------- + // get Evc of specified ID + + { + WebTarget target = client.target("http://localhost:9090/evcmgr/webapi/"); + + Response response = target.path("evc/"+evcId).request(MediaType.APPLICATION_JSON).get(Response.class); + if (response.getStatus() != 200) // figure out how to use Status.OK + { + // in production you can be more specific based on reponse code, id, etc + throw new RuntimeException(response.getStatus() + ": there was an error on the server."); + } + + //return response; + return response.readEntity(Evc.class); + } + + //-------------------------------------------------------- + public List getAll() + //-------------------------------------------------------- + // get a list of all Evc instances + { + + WebTarget target = client.target("http://localhost:9090/evcmgr/webapi/"); + + // Can I do this with a Response, so that I can check for errors + List response = target.path("evc/list") + .request(MediaType.APPLICATION_JSON) + .get(new GenericType>() { + }); + if (response == null) // figure out how to use Status.OK + { + // in production you can be more specific based on reponse code, id, etc + throw new RuntimeException("there was an error on the server."); + } + return response; + } + + //-------------------------------------------------------- + public void delete(String evcId) + //-------------------------------------------------------- + // delete Evc of specified ID + { + WebTarget target = client.target("http://localhost:9090/evcmgr/webapi/"); + Response response = target.path("evc/"+evcId).request(MediaType.APPLICATION_JSON).delete(); + if (response.getStatus() != 200) // figure out how to use Status.OK + { + // in production you can be more specific based on reponse code, id, etc + throw new RuntimeException(response.getStatus() + ": there was an error on the server."); + } + } + + //-------------------------------------------------------- + public Evc testGet() + //-------------------------------------------------------- + // test marshaling of Evc class from server json + + { + WebTarget target = client.target("http://localhost:9090/evcmgr/webapi/"); + + Response response = target.path("evc").request(MediaType.APPLICATION_JSON).get(Response.class); + if (response.getStatus() != 200) // figure out how to use Status.OK + { + // in production you can be more specific based on reponse code, id, etc + throw new RuntimeException(response.getStatus() + ": there was an error on the server."); + } + + //return response; + return response.readEntity(Evc.class); + } + + //-------------------------------------------------------- + public String ping() + //-------------------------------------------------------- + // test connectivity + { + + WebTarget target = client.target("http://localhost:9090/evcmgr/webapi/"); + + Response response = target.path("evc").request(MediaType.TEXT_PLAIN).get(); + if (response.getStatus() != 200) // figure out how to use Status.OK + { + // in production you can be more specific based on reponse code, id, etc + throw new RuntimeException(response.getStatus() + ": there was an error on the server."); + } + + return response.readEntity(String.class); + } +} diff --git a/evc/evcbase/src/main/java/com/cablelabs/vcpe/evc/evcbase/model/Evc.java b/evc/evcbase/src/main/java/com/cablelabs/vcpe/evc/evcbase/model/Evc.java new file mode 100644 index 0000000..f44af27 --- /dev/null +++ b/evc/evcbase/src/main/java/com/cablelabs/vcpe/evc/evcbase/model/Evc.java @@ -0,0 +1,235 @@ +package com.cablelabs.vcpe.evc.evcbase.model; + +import com.cablelabs.vcpe.common.Dbg; + +import javax.xml.bind.annotation.XmlRootElement; +import java.util.List; + +/** + * Created by steve on 5/24/15. + */ + +@XmlRootElement +public class Evc +{ + // set up so that we can use the ENUM's as strings for REST calls & dbg prints + + public enum EvcType { + + UNASSIGNED ("UNASSIGNED"), + POINT_TO_POINT ("POINT_TO_POINT"), + MULTIPOINT_TO_MULTIPOINT ("MULTIPOINT_TO_MULTIPOINT"), + ROOTED_MULTIPOINT ("ROOTED_MULTIPOINT"); + private final String s; + private EvcType(final String s) {this.s = s;} + @Override public String toString() { return s; } + } + public enum FrameDelivery { // may belong in more general location eventually + + UNASSIGNED ("UNASSIGNED"), + DISCARD ("DISCARD"), + UNCONDITIONAL ("UNCONDITIONAL"), + CONDITIONAL ("CONDITIONAL"); + private final String s; + private FrameDelivery(final String s) {this.s = s;} + @Override public String toString() { return s; } + } + + private String id; + private EvcType evcType; + private long maxUnis; + private FrameDelivery unicastFrameDelivery; + private FrameDelivery multicastFrameDelivery; + private FrameDelivery broadcastFrameDelivery; + private List uniIdList = null; + private List uniIpList = null; + private List uniMacList = null; + private boolean ceVLanIdPreservation; + private boolean ceVlanCosPreservation; + private long evcMaxSvcFrameSize; // at least 1522, should be > 1600 byte + private String cosId; // CoS Attributes serving as EVCPerformance attr for now + //private EvcPerf evcPerf = null; + + // EVC Perf params + private double oneWayFrameDelay; // milliseconds + private double oneWayFrameLossRatio; // percentage + private double oneWayAvailability; // percentage + + // zero argument constructor required for JAX-RS + public Evc() { + id = "unset"; + evcType = EvcType.UNASSIGNED; + maxUnis = -1; + unicastFrameDelivery = FrameDelivery.UNASSIGNED; + multicastFrameDelivery = FrameDelivery.UNASSIGNED;; + broadcastFrameDelivery = FrameDelivery.UNASSIGNED;; + uniIdList = null; + uniIpList = null; + uniMacList = null; + ceVLanIdPreservation = false; + ceVlanCosPreservation = false; + evcMaxSvcFrameSize = -1; + cosId = "unset"; + + //evcPerf = new EvcPerf(); + oneWayFrameDelay = -1.0; + oneWayFrameLossRatio = -1.0; + oneWayAvailability = -1.0; + } + + // Utility methods + + public void setAllNonPerfProps(String id, EvcType evcType, long maxUnis, + List uniIdList, List uniMacList, List uniIpList, + FrameDelivery unicastFrameDelivery, + FrameDelivery multicastFrameDelivery, + FrameDelivery broadcastFrameDelivery, + boolean ceVLanIdPreservation, boolean ceVlanCosPreservation, + long evcMaxSvcFrameSize, String cosId) { + this.id = id; + this.evcType = evcType; + this.uniIdList = uniIdList; + this.uniMacList = uniMacList; + this.uniIpList = uniIpList; + this.maxUnis = maxUnis; + this.unicastFrameDelivery = unicastFrameDelivery; + this.multicastFrameDelivery = multicastFrameDelivery; + this.broadcastFrameDelivery = broadcastFrameDelivery; + this.ceVLanIdPreservation = ceVLanIdPreservation; + this.ceVlanCosPreservation = ceVlanCosPreservation; + this.evcMaxSvcFrameSize = evcMaxSvcFrameSize; + this.cosId = cosId; + } + + public void setAllPerfProps( double oneWayFrameDelay, + double oneWayFrameLossRatio, + double oneWayAvailability ) + { + this.oneWayFrameDelay = oneWayFrameDelay; + this.oneWayFrameLossRatio = oneWayFrameLossRatio; + this.oneWayAvailability = oneWayAvailability; + } + + public void dump() { dump(0); } + public void dump(int tab) { + Dbg.p(tab, "id: " + this.id); + Dbg.p(tab, "cosId: " + this.cosId); + Dbg.p(tab, "evcType: " + this.evcType); + Dbg.p(tab, "maxUnis: " + this.maxUnis); + Dbg.p(tab, "Uni ID List:"); + for (String uniId : uniIdList) + Dbg.p(tab+1, uniId); + Dbg.p(tab, "Uni Mac List:"); + for (String macId : uniMacList) + Dbg.p(tab+1, macId); + Dbg.p(tab, "Uni IP List:"); + for (String ipAddr : uniIpList) + Dbg.p(tab+1, ipAddr); + Dbg.p(tab, "UnicastFrameDelivery: " + this.unicastFrameDelivery); + Dbg.p(tab, "MulticastFrameDelivery: " + this.multicastFrameDelivery); + Dbg.p(tab, "BroadcastFrameDelivery: " + this.broadcastFrameDelivery); + Dbg.p(tab, "CeVLanIdPreservation: " + this.ceVLanIdPreservation); + Dbg.p(tab, "CeVlanCosPreservation: " + this.ceVlanCosPreservation); + Dbg.p(tab, "EvcMaxSvcFrameSize: " + this.evcMaxSvcFrameSize); + Dbg.p(tab, "--- EVC Performance Params"); + Dbg.p(tab+1, "oneWayFrameDelay: " + this.oneWayFrameDelay); + Dbg.p(tab+1, "oneWayFrameLossRatio: " + this.oneWayFrameLossRatio); + Dbg.p(tab+1, "oneWayAvailability: " + this.oneWayAvailability); + } + + public static void dumpList(List evcList) { dumpList(0, evcList); } + public static void dumpList(int tab, List evcList) { + int numEvc = 0; + Dbg.p("----- Evc List : [" + evcList.size() + "] elements"); + for (Evc curEvc : evcList) { + numEvc++; + Dbg.p(tab+1, ""); + curEvc.dump(tab+2); + } + } + + // Getters & Setters + + public String getId() { return id; } + public void setId(String id) { this.id = id; } + + public EvcType getEvcType() { return evcType; } + public void setEvcType(EvcType evcType) { this.evcType = evcType; } + + public long getMaxUnis() { return maxUnis; } + + public void setMaxUnis(long maxUnis) { this.maxUnis = maxUnis; } + + public FrameDelivery getUnicastFrameDelivery() { return unicastFrameDelivery; } + public void setUnicastFrameDelivery(FrameDelivery unicastFrameDelivery) { + this.unicastFrameDelivery = unicastFrameDelivery; } + + public FrameDelivery getMulticastFrameDelivery() { return multicastFrameDelivery; } + public void setMulticastFrameDelivery(FrameDelivery multicastFrameDelivery) { + this.multicastFrameDelivery = multicastFrameDelivery; } + + public FrameDelivery getBroadcastFrameDelivery() { return broadcastFrameDelivery; } + public void setBroadcastFrameDelivery(FrameDelivery broadcastFrameDelivery) { + this.broadcastFrameDelivery = broadcastFrameDelivery; } + + public List getUniIdList() { return uniIdList; } + public void setUniIdList(List uniIdList) { this.uniIdList = uniIdList; } + + public List getUniMacList() { return uniMacList; } + public void setUniMacList(List uniMacList) { this.uniMacList = uniMacList; } + + + public List getUniIpList() { return uniIpList; } + public void setUniIpList(List uniIpList) { this.uniIpList = uniIpList; } + + public boolean isCeVLanIdPreservation() { return ceVLanIdPreservation; } + public void setCeVLanIdPreservation(boolean ceVLanIdPreservation) { + this.ceVLanIdPreservation = ceVLanIdPreservation; } + + public boolean isCeVlanCosPreservation() { return ceVlanCosPreservation; } + + public void setCeVlanCosPreservation(boolean ceVlanCosPreservation) { + this.ceVlanCosPreservation = ceVlanCosPreservation; } + + public long getEvcMaxSvcFrameSize() { return evcMaxSvcFrameSize; } + public void setEvcMaxSvcFrameSize(long evcMaxSvcFrameSize) { + this.evcMaxSvcFrameSize = evcMaxSvcFrameSize; } + + public String getCosId() { return cosId; } + public void setCosId(String cosId) { this.cosId = cosId; } + + public double getOneWayFrameDelay() { return oneWayFrameDelay; } + public void setOneWayFrameDelay(double oneWayFrameDelay) { this.oneWayFrameDelay = oneWayFrameDelay; } + + public double getOneWayFrameLossRatio() { return oneWayFrameLossRatio; } + public void setOneWayFrameLossRatio(double oneWayFrameLossRatio) { this.oneWayFrameLossRatio = oneWayFrameLossRatio; } + + public double getOneWayAvailability() { return oneWayAvailability; } + public void setOneWayAvailability(double oneWayAvailability) { this.oneWayAvailability = oneWayAvailability; } + + + // Someday might make sense to put all EVC Perf params in seperate class +// private class EvcPerf { +// private long oneWayFrameDelay; // milliseconds +// private long oneWayFrameDelayRange; // milliseconds +// +// +// public EvcPerf () { +// this.oneWayFrameDelay = -333; +// this.oneWayFrameDelayRange = -333; +// } +// +// public void setAllParams (long oneWayFrameDelay, long oneWayFrameDelayRange) { +// this.oneWayFrameDelay = oneWayFrameDelay; +// this.oneWayFrameDelayRange = oneWayFrameDelayRange; +// } +// +// public long getOneWayFrameDelay() { return oneWayFrameDelay; } +// public void setOneWayFrameDelay(long oneWayFrameDelay) { +// this.oneWayFrameDelay = oneWayFrameDelay; } +// +// public long getOneWayFrameDelayRange() { return oneWayFrameDelayRange; } +// public void setOneWayFrameDelayRange(long oneWayFrameDelayRange) { +// this.oneWayFrameDelayRange = oneWayFrameDelayRange; } +// } +} diff --git a/evc/evcbase/src/main/java/com/cablelabs/vcpe/evc/evcbase/model/EvcPerformance.java b/evc/evcbase/src/main/java/com/cablelabs/vcpe/evc/evcbase/model/EvcPerformance.java new file mode 100644 index 0000000..e1bd19e --- /dev/null +++ b/evc/evcbase/src/main/java/com/cablelabs/vcpe/evc/evcbase/model/EvcPerformance.java @@ -0,0 +1,102 @@ +package com.cablelabs.vcpe.evc.evcbase.model; + +import com.cablelabs.vcpe.common.Dbg; + +/** + * Created by steve on 6/9/15. + */ +public class EvcPerformance { + + private String cosId; // associated CoS + private long oneWayFrameDelay; // milliseconds + private long oneWayFrameDelayRange; // milliseconds + private long oneWayMeanFrameDelay; // milliseconds + private long oneWayInterFrameDelayVariation; // milliseconds + private double oneWayFrameLossRatio; // percentage + private double oneWayAvailability; // percentage + private long oneWayResilHighLossIntervals; //count + private long oneWayResilConsecHighLossIntervals; //count + + // zero argument constructor required for JAX-RS + public EvcPerformance() { + oneWayFrameDelay = -1; + oneWayFrameDelayRange = -1; + oneWayMeanFrameDelay = -1; + oneWayInterFrameDelayVariation = -1; + oneWayFrameLossRatio = -1.0; + oneWayAvailability = -1.0; + oneWayResilHighLossIntervals = -1; + oneWayResilConsecHighLossIntervals = -1; + } + + public void setAllProps (String cosId, long oneWayFrameDelay, long oneWayFrameDelayRange, + long oneWayMeanFrameDelay, long oneWayInterFrameDelayVariation, + double oneWayFrameLossRatio, double oneWayAvailability, + long oneWayResilHighLossIntervals, long oneWayResilConsecHighLossIntervals) + { + this.cosId = cosId; + this.oneWayFrameDelay = oneWayFrameDelay; + this.oneWayFrameDelayRange = oneWayFrameDelayRange; + this.oneWayMeanFrameDelay = oneWayMeanFrameDelay; + this.oneWayInterFrameDelayVariation = oneWayInterFrameDelayVariation; + this.oneWayFrameLossRatio = oneWayFrameLossRatio; + this.oneWayAvailability = oneWayAvailability; + this.oneWayResilHighLossIntervals = oneWayResilHighLossIntervals; + this.oneWayResilConsecHighLossIntervals = oneWayResilConsecHighLossIntervals; + } + + + // util fxns + + public void dump() { dump(0); } + public void dump(int tab) { + Dbg.p(tab, "cosId: " + this.cosId); + Dbg.p(tab, "oneWayFrameDelay: " + this.oneWayFrameDelay); + Dbg.p(tab, "oneWayFrameDelayRange: " + this.oneWayFrameDelayRange); + Dbg.p(tab, "oneWayMeanFrameDelay: " + this.oneWayMeanFrameDelay); + Dbg.p(tab, "oneWayFrameLossRatio: " + this.oneWayFrameLossRatio); + Dbg.p(tab, "oneWayAvailability: " + this.oneWayAvailability); + Dbg.p(tab, "oneWayInterFrameDelayVariation: " + this.oneWayInterFrameDelayVariation); + Dbg.p(tab, "oneWayResilHighLossIntervals: " + this.oneWayResilHighLossIntervals); + Dbg.p(tab, "oneWayResilConsecHighLossIntervals: " + this.oneWayResilConsecHighLossIntervals); + } + + // Getters and setters + + public String getCosId() { return cosId; } + public void setCosId(String cosId) { this.cosId = cosId; } + + public long getOneWayFrameDelay() { return oneWayFrameDelay; } + public void setOneWayFrameDelay(long oneWayFrameDelay) { + this.oneWayFrameDelay = oneWayFrameDelay; } + + public long getOneWayFrameDelayRange() { return oneWayFrameDelayRange; } + public void setOneWayFrameDelayRange(long oneWayFrameDelayRange) { + this.oneWayFrameDelayRange = oneWayFrameDelayRange; } + + public long getOneWayMeanFrameDelay() { return oneWayMeanFrameDelay; } + public void setOneWayMeanFrameDelay(long oneWayMeanFrameDelay) { + this.oneWayMeanFrameDelay = oneWayMeanFrameDelay; } + + public long getOneWayInterFrameDelayVariation() { return oneWayInterFrameDelayVariation; } + public void setOneWayInterFrameDelayVariation(long oneWayInterFrameDelayVariation) { + this.oneWayInterFrameDelayVariation = oneWayInterFrameDelayVariation; } + + public double getOneWayFrameLossRatio() { return oneWayFrameLossRatio; } + public void setOneWayFrameLossRatio(double oneWayFrameLossRatio) { + this.oneWayFrameLossRatio = oneWayFrameLossRatio; } + + public double getOneWayAvailability() { return oneWayAvailability; } + public void setOneWayAvailability(double oneWayAvailability) { + this.oneWayAvailability = oneWayAvailability; } + + public long getOneWayResilHighLossIntervals() { return oneWayResilHighLossIntervals; } + public void setOneWayResilHighLossIntervals(long oneWayResilHighLossIntervals) { + this.oneWayResilHighLossIntervals = oneWayResilHighLossIntervals; } + + public long getOneWayResilConsecHighLossIntervals() { return oneWayResilConsecHighLossIntervals; } + public void setOneWayResilConsecHighLossIntervals(long oneWayResilConsecHighLossIntervals) { + this.oneWayResilConsecHighLossIntervals = oneWayResilConsecHighLossIntervals; } + + +} diff --git a/evc/evcbase/src/main/java/com/cablelabs/vcpe/evc/evcbase/repository/EvcRespository.java b/evc/evcbase/src/main/java/com/cablelabs/vcpe/evc/evcbase/repository/EvcRespository.java new file mode 100644 index 0000000..80bebc7 --- /dev/null +++ b/evc/evcbase/src/main/java/com/cablelabs/vcpe/evc/evcbase/repository/EvcRespository.java @@ -0,0 +1,21 @@ +package com.cablelabs.vcpe.evc.evcbase.repository; + +import com.cablelabs.vcpe.evc.evcbase.model.Evc; + +import java.util.List; + +/** + * Created by steve on 5/25/15. + */ +public interface EvcRespository +{ + // TODO add exceptions + + Evc add(Evc evc); // returns null if already exists, otherwise returns stored evc + Evc get(String evcId); // returns null if not found, otherwise stored evc + Evc update(Evc evc); // returns null if did not exit, otherwise evc as it was previous to update (put in any case) + Evc delete(String evcId); // returns null if not found, otherwise evc as it was previous to delete + int count(); // number of Evc stored in the repo + public void dump(int tab); // print out contents of the repo + List getAll(); +} diff --git a/evc/evcbase/src/main/java/com/cablelabs/vcpe/evc/evcbase/repository/EvcRespositoryInMem.java b/evc/evcbase/src/main/java/com/cablelabs/vcpe/evc/evcbase/repository/EvcRespositoryInMem.java new file mode 100644 index 0000000..158ae3f --- /dev/null +++ b/evc/evcbase/src/main/java/com/cablelabs/vcpe/evc/evcbase/repository/EvcRespositoryInMem.java @@ -0,0 +1,91 @@ +package com.cablelabs.vcpe.evc.evcbase.repository; + +import com.cablelabs.vcpe.common.Dbg; +import com.cablelabs.vcpe.evc.evcbase.model.Evc; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; + +/** + * Created by steve on 5/24/15. + */ + + +/* + Singleton that contains a hashmap which holds instances of Evc objects, indexed by CiS ID + */ + +public enum EvcRespositoryInMem implements EvcRespository { + INSTANCE; // Singleton + + private Map evcDB = new ConcurrentHashMap<>(); + + @Override + //-------------------------------------------------------- + public Evc add(Evc evc) + //-------------------------------------------------------- + { + if ( this.get(evc.getId()) != null ) { + return null; + } + evcDB.put(evc.getId(), evc ); + return evc; + } + + @Override + //-------------------------------------------------------- + public Evc get(String evcId) { + return evcDB.get(evcId); + } + //-------------------------------------------------------- + + @Override + //-------------------------------------------------------- + public Evc update(Evc evc) + //-------------------------------------------------------- + { + // put returns null if evc did not exist, other returns evc as it stood prior to put + return evcDB.put(evc.getId(), evc); + } + + @Override + //-------------------------------------------------------- + public Evc delete(String evcId) + //-------------------------------------------------------- + { + // remove returns null if evc did not exist, other returns evc as it stood prior to remove + return evcDB.remove(evcId); + } + + @Override + //-------------------------------------------------------- + public int count() { + return evcDB.size(); + } + //-------------------------------------------------------- + + @Override + //-------------------------------------------------------- + public List getAll() + //-------------------------------------------------------- + { + List evcList = new ArrayList(evcDB.values()); + return evcList; + } + + @Override + //-------------------------------------------------------- + public void dump(int tab) + //-------------------------------------------------------- + { + Dbg.p(tab, "Evc Repo: " + evcDB.size() + " entrie(s)"); + int numEvc = 0; + for (Evc curEvc : evcDB.values()) { + numEvc++; + Dbg.p(tab+1, ""); + curEvc.dump(tab+2); + } + } +} diff --git a/evc/evcbase/src/test/java/com/cablelabs/vcpe/evc/evcbase/client/EvcClientTest.java b/evc/evcbase/src/test/java/com/cablelabs/vcpe/evc/evcbase/client/EvcClientTest.java new file mode 100644 index 0000000..3f62320 --- /dev/null +++ b/evc/evcbase/src/test/java/com/cablelabs/vcpe/evc/evcbase/client/EvcClientTest.java @@ -0,0 +1,163 @@ +package com.cablelabs.vcpe.evc.evcbase.client; + +import com.cablelabs.vcpe.common.Dbg; +import com.cablelabs.vcpe.cos.cosbase.client.CoSClient; +import com.cablelabs.vcpe.cos.cosbase.model.CoS; +import com.cablelabs.vcpe.evc.evcbase.model.Evc; + +import org.junit.Test; +import static org.junit.Assert.*; + +import java.util.ArrayList; +import java.util.List; + + +/** + * Created by steve on 6/8/15. + */ +public class EvcClientTest { + + @Test + public void testAll() throws Exception { + + // We have to have a CoS for Evc to referece + CoSClient coSClient = new CoSClient(); + + // Add gold service to CoS layer + CoS gold = new CoS(); + gold.setAllProps("gold", 100, 0.99, 17.43, 2.43, 0.01); + Dbg.p("gold svc being created in CoS"); + + gold = coSClient.create(gold); + assertNotNull(gold); + + Evc evc_1 = new Evc(); + + List uniIdList1 = new ArrayList(); + uniIdList1.add("unset-id-1"); + uniIdList1.add("unset-id-1"); + + List uniMacList1 = new ArrayList(); + uniMacList1.add("11:00:11:11:11:11"); + uniMacList1.add("11:00:22:22:22:22"); + + List ipList1 = new ArrayList(); + ipList1.add("192.168.1.1"); + ipList1.add("192.168.1.2"); + + evc_1.setAllNonPerfProps("id-unset-1", + Evc.EvcType.POINT_TO_POINT, 2, uniIdList1, uniMacList1, ipList1, + Evc.FrameDelivery.UNCONDITIONAL, + Evc.FrameDelivery.UNCONDITIONAL, + Evc.FrameDelivery.UNCONDITIONAL, + true, true, 1600, gold.getId()); + + EvcClient evcClient = new EvcClient(); + Dbg.p(evc_1.getId()+" being created via evcmgr"); + evc_1.dump(1); + + evc_1 = evcClient.create(evc_1); + assertNotNull(evc_1); + + Evc retrievedEvc = evcClient.get(evc_1.getId()); + assertNotNull(retrievedEvc); + Dbg.p("evc just retrieved from Evc Service"); + retrievedEvc.dump(1); + retrievedEvc = null; + + evc_1.setBroadcastFrameDelivery(Evc.FrameDelivery.DISCARD); + Dbg.p("EVC["+ evc_1.getId()+ "] : about to be updated"); + evc_1.dump(1); + assertNotNull(evcClient.update(evc_1)); + retrievedEvc = evcClient.get(evc_1.getId()); + assertNotNull(retrievedEvc); + Dbg.p("EVC["+ evc_1.getId()+ "] : retrieved after the update"); + retrievedEvc.dump(1); + + Evc evc_2 = new Evc(); + Evc evc_3 = new Evc(); + + List uniIdList2 = new ArrayList(); + uniIdList2.add("unset-id-11"); + uniIdList2.add("unset-id-22"); + + List uniIdList3 = new ArrayList(); + uniIdList3.add("unset-id-111"); + uniIdList3.add("unset-id-222"); + + List uniMacList2 = new ArrayList(); + uniMacList2.add("22:00:11:11:11:11"); + uniMacList2.add("22:00:22:22:22:22"); + + List uniMacList3 = new ArrayList(); + uniMacList3.add("33:00:11:11:11:11"); + uniMacList3.add("33:00:22:22:22:22"); + + List ipList2 = new ArrayList(); + ipList2.add("192.168.2.1"); + ipList2.add("192.168.2.2"); + + List ipList3 = new ArrayList(); + ipList3.add("192.168.3.1"); + ipList3.add("192.168.3.2"); + + evc_2.setAllNonPerfProps("id-unset-2", + Evc.EvcType.ROOTED_MULTIPOINT, 2, uniIdList2, uniMacList2, ipList2, + Evc.FrameDelivery.CONDITIONAL, + Evc.FrameDelivery.CONDITIONAL, + Evc.FrameDelivery.CONDITIONAL, + true, false, 1111, gold.getId()); + + evc_3.setAllNonPerfProps("id-unset-3", + Evc.EvcType.MULTIPOINT_TO_MULTIPOINT, 2, uniIdList3, uniMacList2, ipList3, + Evc.FrameDelivery.DISCARD, + Evc.FrameDelivery.DISCARD, + Evc.FrameDelivery.DISCARD, + false, true, 2222, gold.getId()); + + evc_2 = evcClient.create(evc_2); + assertNotNull(evc_2); + + evc_3 = evcClient.create(evc_3); + assertNotNull(evc_3); + + List evcList = evcClient.getAll(); + assertNotNull(evcList); + assertEquals(evcList.size(), 3); + + Evc.dumpList(evcList); + + evcClient.delete(evc_3.getId()); + evcList = evcClient.getAll(); + assertNotNull(evcList); + assertEquals(evcList.size(),2); + Evc.dumpList(evcList); + + evcClient.delete(evc_2.getId()); + evcList = evcClient.getAll(); + assertNotNull(evcList); + assertEquals(evcList.size(),1); + Evc.dumpList(evcList); + + evcClient.delete(evc_1.getId()); + evcList = evcClient.getAll(); + assertNotNull(evcList); + assertEquals(evcList.size(),0); + Evc.dumpList(evcList); + } + + @Test + public void testTestGet() throws Exception { + EvcClient evcClient = new EvcClient(); + Evc evc = evcClient.testGet(); + evc.dump();; + } + + @Test + public void testPing() throws Exception { + + EvcClient evcClient = new EvcClient(); + String resp = evcClient.ping(); + Dbg.p(resp); + } +} diff --git a/evc/evcbase/src/test/java/com/cablelabs/vcpe/evc/evcbase/repository/EvcRepositoryTest.java b/evc/evcbase/src/test/java/com/cablelabs/vcpe/evc/evcbase/repository/EvcRepositoryTest.java new file mode 100644 index 0000000..402d20b --- /dev/null +++ b/evc/evcbase/src/test/java/com/cablelabs/vcpe/evc/evcbase/repository/EvcRepositoryTest.java @@ -0,0 +1,120 @@ +package com.cablelabs.vcpe.evc.evcbase.repository; + +import com.cablelabs.vcpe.cos.cosbase.model.CoS; +import com.cablelabs.vcpe.evc.evcbase.model.Evc; + +import org.junit.Test; + +import java.util.ArrayList; +import java.util.List; + +import static org.junit.Assert.*; + +/** + * Created by steve on 5/25/15. + */ +public class EvcRepositoryTest +{ + + @Test + public void test() { + + // First, create a couple of CoS's to reference + CoS gold = new CoS(); + CoS silver = new CoS(); + CoS bronze = new CoS(); + + // id CIR/MBS avail delay jitter frameloss + gold.setAllProps("gold", 100, 0.99, 17.43, 2.43, 0.01); + silver.setAllProps("silver", 50, 0.95, 27.43, 2.43, 0.02); + bronze.setAllProps("bronze", 25, 0.90, 37.43, 2.43, 0.03); + + Evc evc_1 = new Evc(); + Evc evc_2 = new Evc(); + Evc evc_3 = new Evc(); + + List uniIdList = new ArrayList(); + uniIdList.add("UNI-1"); + uniIdList.add("UNI-2"); + + List uniMacList = new ArrayList(); + uniMacList.add("11:11:11:11:11:11"); + uniMacList.add("22:22:22:22:22:22"); + + List uniIpList = new ArrayList(); + uniIpList.add("192.168.1.1"); + uniIpList.add("192.168.1.2"); + + evc_1.setAllNonPerfProps("evc_1", + Evc.EvcType.POINT_TO_POINT, 2, uniIdList, uniMacList, uniIpList, + Evc.FrameDelivery.UNCONDITIONAL, + Evc.FrameDelivery.UNCONDITIONAL, + Evc.FrameDelivery.UNCONDITIONAL, + true, true, 1600, gold.getId()); + evc_2.setAllNonPerfProps("evc_2", + Evc.EvcType.POINT_TO_POINT, 2, uniIdList, uniMacList, uniIpList, + Evc.FrameDelivery.UNCONDITIONAL, + Evc.FrameDelivery.UNCONDITIONAL, + Evc.FrameDelivery.UNCONDITIONAL, + true, true, 1500, silver.getId()); + evc_3.setAllNonPerfProps("evc_3", + Evc.EvcType.POINT_TO_POINT, 2, uniIdList, uniMacList, uniIpList, + Evc.FrameDelivery.UNCONDITIONAL, + Evc.FrameDelivery.UNCONDITIONAL, + Evc.FrameDelivery.UNCONDITIONAL, + true, true, 1400, bronze.getId()); + + evc_1.dump(); + evc_2.dump(); + evc_3.dump(); + + EvcRespository repo = EvcRespositoryInMem.INSTANCE; + + assertNotNull(repo.add(evc_1)); + assertNotNull(repo.add(evc_2)); + assertNotNull(repo.add(evc_3)); + assertNull(repo.add(evc_3)); // duplicate + assertEquals(repo.count(), 3); + + assertNotNull(repo.get(evc_1.getId())); + assertNotNull(repo.get(evc_2.getId())); + assertNotNull(repo.get(evc_3.getId())); + + assertNotNull(repo.delete(evc_2.getId())); + assertNull(repo.delete(evc_2.getId())); + assertNull(repo.delete("not-in-repo")); + assertEquals(repo.count(), 2); + + assertEquals(repo.get(evc_1.getId()).getEvcMaxSvcFrameSize(), 1600); + assertNotEquals(repo.get(evc_3.getId()).getEvcMaxSvcFrameSize(), 1600); + + Evc evc_4 = new Evc(); + evc_4.setAllNonPerfProps("evc_4", + Evc.EvcType.POINT_TO_POINT, 2, uniIdList, uniMacList, uniIpList, + Evc.FrameDelivery.UNCONDITIONAL, + Evc.FrameDelivery.UNCONDITIONAL, + Evc.FrameDelivery.UNCONDITIONAL, + true, true, 1200, bronze.getId()); + + assertNull(repo.update(evc_4)); // update non-existent cos + assertEquals(repo.count(), 3); + assertEquals(repo.get("evc_4").getEvcMaxSvcFrameSize(), 1200); + + evc_4.setEvcMaxSvcFrameSize(1250); + assertNotNull(repo.update(evc_4)); // update existing evc, same object + assertEquals(repo.get(evc_4.getId()).getEvcMaxSvcFrameSize(), 1250); + + evc_4.dump(); + + Evc evc_4_2 = new Evc(); + evc_4_2.setAllNonPerfProps("evc_4", + Evc.EvcType.POINT_TO_POINT, 2, uniIdList, uniMacList, uniIpList, + Evc.FrameDelivery.UNCONDITIONAL, + Evc.FrameDelivery.UNCONDITIONAL, + Evc.FrameDelivery.UNCONDITIONAL, + true, true, 500, bronze.getId()); + + assertNotNull(repo.update(evc_4_2)); // update evc, new object + assertEquals(repo.get(evc_4_2.getId()).getEvcMaxSvcFrameSize(), 500); + } +} diff --git a/evc/evcbase/target/classes/com/cablelabs/vcpe/evc/evcbase/client/EvcClient$1.class b/evc/evcbase/target/classes/com/cablelabs/vcpe/evc/evcbase/client/EvcClient$1.class new file mode 100644 index 0000000..dc9831c Binary files /dev/null and b/evc/evcbase/target/classes/com/cablelabs/vcpe/evc/evcbase/client/EvcClient$1.class differ diff --git a/evc/evcbase/target/classes/com/cablelabs/vcpe/evc/evcbase/client/EvcClient.class b/evc/evcbase/target/classes/com/cablelabs/vcpe/evc/evcbase/client/EvcClient.class new file mode 100644 index 0000000..cd2b87f Binary files /dev/null and b/evc/evcbase/target/classes/com/cablelabs/vcpe/evc/evcbase/client/EvcClient.class differ diff --git a/evc/evcbase/target/classes/com/cablelabs/vcpe/evc/evcbase/model/Evc$EvcType.class b/evc/evcbase/target/classes/com/cablelabs/vcpe/evc/evcbase/model/Evc$EvcType.class new file mode 100644 index 0000000..f08d7f9 Binary files /dev/null and b/evc/evcbase/target/classes/com/cablelabs/vcpe/evc/evcbase/model/Evc$EvcType.class differ diff --git a/evc/evcbase/target/classes/com/cablelabs/vcpe/evc/evcbase/model/Evc$FrameDelivery.class b/evc/evcbase/target/classes/com/cablelabs/vcpe/evc/evcbase/model/Evc$FrameDelivery.class new file mode 100644 index 0000000..d0622b1 Binary files /dev/null and b/evc/evcbase/target/classes/com/cablelabs/vcpe/evc/evcbase/model/Evc$FrameDelivery.class differ diff --git a/evc/evcbase/target/classes/com/cablelabs/vcpe/evc/evcbase/model/Evc.class b/evc/evcbase/target/classes/com/cablelabs/vcpe/evc/evcbase/model/Evc.class new file mode 100644 index 0000000..7f317d0 Binary files /dev/null and b/evc/evcbase/target/classes/com/cablelabs/vcpe/evc/evcbase/model/Evc.class differ diff --git a/evc/evcbase/target/classes/com/cablelabs/vcpe/evc/evcbase/model/EvcPerformance.class b/evc/evcbase/target/classes/com/cablelabs/vcpe/evc/evcbase/model/EvcPerformance.class new file mode 100644 index 0000000..c377b6e Binary files /dev/null and b/evc/evcbase/target/classes/com/cablelabs/vcpe/evc/evcbase/model/EvcPerformance.class differ diff --git a/evc/evcbase/target/classes/com/cablelabs/vcpe/evc/evcbase/repository/EvcRespository.class b/evc/evcbase/target/classes/com/cablelabs/vcpe/evc/evcbase/repository/EvcRespository.class new file mode 100644 index 0000000..9aee4c8 Binary files /dev/null and b/evc/evcbase/target/classes/com/cablelabs/vcpe/evc/evcbase/repository/EvcRespository.class differ diff --git a/evc/evcbase/target/classes/com/cablelabs/vcpe/evc/evcbase/repository/EvcRespositoryInMem.class b/evc/evcbase/target/classes/com/cablelabs/vcpe/evc/evcbase/repository/EvcRespositoryInMem.class new file mode 100644 index 0000000..5fc5a14 Binary files /dev/null and b/evc/evcbase/target/classes/com/cablelabs/vcpe/evc/evcbase/repository/EvcRespositoryInMem.class differ diff --git a/evc/evcbase/target/evcbase.jar b/evc/evcbase/target/evcbase.jar new file mode 100644 index 0000000..f4f5b3a Binary files /dev/null and b/evc/evcbase/target/evcbase.jar differ diff --git a/evc/evcbase/target/maven-archiver/pom.properties b/evc/evcbase/target/maven-archiver/pom.properties new file mode 100644 index 0000000..2831fc8 --- /dev/null +++ b/evc/evcbase/target/maven-archiver/pom.properties @@ -0,0 +1,5 @@ +#Generated by Maven +#Thu Aug 06 14:01:19 PDT 2015 +version=1.0-SNAPSHOT +groupId=com.cablelabs.vcpe +artifactId=evcbase diff --git a/evc/evcbase/target/test-classes/com/cablelabs/vcpe/evc/evcbase/client/EvcClientTest.class b/evc/evcbase/target/test-classes/com/cablelabs/vcpe/evc/evcbase/client/EvcClientTest.class new file mode 100644 index 0000000..e7190fc Binary files /dev/null and b/evc/evcbase/target/test-classes/com/cablelabs/vcpe/evc/evcbase/client/EvcClientTest.class differ diff --git a/evc/evcbase/target/test-classes/com/cablelabs/vcpe/evc/evcbase/repository/EvcRepositoryTest.class b/evc/evcbase/target/test-classes/com/cablelabs/vcpe/evc/evcbase/repository/EvcRepositoryTest.class new file mode 100644 index 0000000..c9cf627 Binary files /dev/null and b/evc/evcbase/target/test-classes/com/cablelabs/vcpe/evc/evcbase/repository/EvcRepositoryTest.class differ diff --git a/evc/evcmgr/pom.xml b/evc/evcmgr/pom.xml new file mode 100644 index 0000000..1a16633 --- /dev/null +++ b/evc/evcmgr/pom.xml @@ -0,0 +1,39 @@ + + + + com.cablelabs.vcpe + evc + 1.0-SNAPSHOT + + + 4.0.0 + + com.cablelabs.vcpe + evcmgr + war + 1.0-SNAPSHOT + + + evcmgr + + + + + com.cablelabs.vcpe + evcbase + 1.0-SNAPSHOT + + + com.cablelabs.vcpe + cosbase + 1.0-SNAPSHOT + + + com.cablelabs.vcpe + unibase + 1.0-SNAPSHOT + + + + diff --git a/evc/evcmgr/src/main/java/com/cablelabs/vcpe/evc/evcmgr/CORSResponseFilter.java b/evc/evcmgr/src/main/java/com/cablelabs/vcpe/evc/evcmgr/CORSResponseFilter.java new file mode 100644 index 0000000..c224252 --- /dev/null +++ b/evc/evcmgr/src/main/java/com/cablelabs/vcpe/evc/evcmgr/CORSResponseFilter.java @@ -0,0 +1,24 @@ +package com.cablelabs.vcpe.evc.evcmgr; + +import javax.ws.rs.container.ContainerRequestContext; +import javax.ws.rs.container.ContainerResponseContext; +import javax.ws.rs.container.ContainerResponseFilter; +import javax.ws.rs.core.MultivaluedMap; +import java.io.IOException; + +// +// enable cross origin responses, otherwise we can't send rest requests from domain different than that of the server hosting our service +// + +public class CORSResponseFilter implements ContainerResponseFilter { + + public void filter(ContainerRequestContext requestContext, ContainerResponseContext responseContext) + throws IOException { + + MultivaluedMap headers = responseContext.getHeaders(); + headers.add("Access-Control-Allow-Origin", "*"); + headers.add("Access-Control-Allow-Methods", "GET, POST, DELETE, PUT"); + headers.add("Access-Control-Allow-Headers", "X-Requested-With, Content-Type, X-Codingpedia"); + } + +} diff --git a/evc/evcmgr/src/main/java/com/cablelabs/vcpe/evc/evcmgr/EvcJaxRsApplication.java b/evc/evcmgr/src/main/java/com/cablelabs/vcpe/evc/evcmgr/EvcJaxRsApplication.java new file mode 100644 index 0000000..5d46297 --- /dev/null +++ b/evc/evcmgr/src/main/java/com/cablelabs/vcpe/evc/evcmgr/EvcJaxRsApplication.java @@ -0,0 +1,18 @@ +package com.cablelabs.vcpe.evc.evcmgr; + +import org.glassfish.jersey.server.ResourceConfig; + +// +// In order to avoid CORS issues, register our CORS Response filter +// + +public class EvcJaxRsApplication extends ResourceConfig { + + /** + * Register JAX-RS application components. + */ + public EvcJaxRsApplication() { + packages("com.cablelabs.vcpe.cos.cosmgr"); + register(CORSResponseFilter.class); + } +} \ No newline at end of file diff --git a/evc/evcmgr/src/main/java/com/cablelabs/vcpe/evc/evcmgr/EvcService.java b/evc/evcmgr/src/main/java/com/cablelabs/vcpe/evc/evcmgr/EvcService.java new file mode 100644 index 0000000..a9943fd --- /dev/null +++ b/evc/evcmgr/src/main/java/com/cablelabs/vcpe/evc/evcmgr/EvcService.java @@ -0,0 +1,286 @@ +package com.cablelabs.vcpe.evc.evcmgr; + +import com.cablelabs.vcpe.common.Dbg; +import com.cablelabs.vcpe.cos.cosbase.model.CoS; +import com.cablelabs.vcpe.cos.cosbase.client.CoSClient; +import com.cablelabs.vcpe.uni.unibase.client.EvcPathClient; +import com.cablelabs.vcpe.uni.unibase.model.EvcPath; +import com.cablelabs.vcpe.uni.unibase.model.Uni; +import com.cablelabs.vcpe.uni.unibase.client.UniClient; +import com.cablelabs.vcpe.evc.evcbase.model.Evc; +import com.cablelabs.vcpe.evc.evcbase.repository.EvcRespositoryInMem; + +import javax.ws.rs.*; +import javax.ws.rs.core.GenericEntity; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; +import java.util.ArrayList; +import java.util.List; + +/** + * Root resource (exposed at "evc" path) + */ + +//public class EvcService implements EvcServiceJAXRS { + +@Path("evc") +public class EvcService { + + // for proof of concept, evc ID will be unique via this counter. For projecution of course + // that does not scale, and does not survive restart, and another method will be needed + static private long evcIdCounter = 1; + static private long uniIdCounter = 1; + + + @POST + @Consumes(MediaType.APPLICATION_JSON) + @Produces(MediaType.APPLICATION_JSON) + //-------------------------------------------------------- + public Response create(Evc evc) throws Exception + //-------------------------------------------------------- + { + if ( evc == null || + evc.getUniMacList() == null || + evc.getUniIdList() == null || + evc.getUniMacList().size() != 2 || + evc.getUniIdList().size() != 2 || + evc.getUniIpList().size() != 2 ) + { + return Response.status(Response.Status.BAD_REQUEST).build(); + } + + Dbg.p("\nADDING [" + evc.getId() + "] to evc repo"); + + // Need to get cos params based on incoming cos ID + CoSClient cosClient = new CoSClient(); + CoS cos = cosClient.get(evc.getCosId()); + if (cos == null) { + return Response.status(Response.Status.NOT_FOUND).build(); + } + + // set the evc Perf properties according to CoS + evc.setAllPerfProps( cos.getFrameDelay(), + cos.getFrameLoss(), + cos.getAvailbility()); + + Dbg.p("... EVC SVC: retrieved following cos info"); + cos.dump(1); + + // We need a unique EVC ID, using internal counter for the prototype + evc.setId("evc-"+ evcIdCounter++); + + // + // Create the two unis in ODL + // + + Uni.SvcSpeed svcSpeed = Uni.cirToSvcSpeed( cos.getCommitedInfoRate()); + Uni.PhysMedium physMedium = Uni.svcSpeedToPhysMedium(svcSpeed ); // just for demo + // for production need to pull from host + Uni uni1 = new Uni(); + uni1.setAllProps("uni-" + uniIdCounter++, + svcSpeed, + evc.getUniIpList().get(0), + evc.getUniMacList().get(0), + physMedium, + Uni.MacLayer.IEEE_802_3, + Uni.SyncMode.ENABLED, + Uni.Type.UNITYPE, + 1600); + + Uni uni2 = new Uni(); + uni2.setAllProps("uni-" + uniIdCounter++, + svcSpeed, + evc.getUniIpList().get(1), + evc.getUniMacList().get(1), + physMedium, + Uni.MacLayer.IEEE_802_3, + Uni.SyncMode.ENABLED, + Uni.Type.UNITYPE, + 1600); + + // RESTCONF expecting PUT on create, so do an update instead of create + UniClient uniClient = new UniClient(); + uniClient.update(uni1); + uniClient.update(uni2); + + // Give ODL a chance to finish creating the UNIs before moving on + // NOTE: Should be fixed on ODL side eventually via synchronized message handling + try{ + Thread.sleep(1000); + } catch(InterruptedException ex) + {Thread.currentThread().interrupt(); + } + + // + // Create the evc path in ODL + // + + EvcPath evcPath = new EvcPath( evc.getId(), uni1, uni2, + svcSpeed, svcSpeed, cos.getId()); + EvcPathClient evcPathClient = new EvcPathClient(); + evcPathClient.update(evcPath); + + // + // Finish up with the evc + // + + // Set our UNI IDs for the EVC here + // eventually they will be generated and returned by ODL + evc.getUniIdList().set(0,uni1.getId()); + evc.getUniIdList().set(1,uni2.getId()); + + EvcRespositoryInMem.INSTANCE.add(evc); + EvcRespositoryInMem.INSTANCE.dump(0); + return Response.ok().entity(evc).build(); + } + + @PUT + @Path("{evcId}") + @Consumes(MediaType.APPLICATION_JSON) + @Produces(MediaType.APPLICATION_JSON) + //-------------------------------------------------------- + public Response update(Evc evc) + //-------------------------------------------------------- + { + Dbg.p("\nUPDATING [" + evc.getId()+"]"); + + // Need to get cos params based on incoming cos ID + CoSClient cosClient = new CoSClient(); + CoS cos = cosClient.get(evc.getCosId()); + if (cos == null) { + return Response.status(Response.Status.NOT_FOUND).build(); + } + + evc.setOneWayFrameDelay(cos.getFrameDelay()); + evc.setOneWayFrameLossRatio(cos.getFrameLoss()); + evc.setOneWayAvailability(cos.getAvailbility()); + + EvcRespositoryInMem.INSTANCE.update(evc); + EvcRespositoryInMem.INSTANCE.dump(0); + return Response.ok().entity(evc).build(); + } + + @GET + @Path("{evcId}") + @Produces(MediaType.APPLICATION_JSON) + //-------------------------------------------------------- + public Response get( @PathParam("evcId") String evcId ) + //-------------------------------------------------------- + { + if ( evcId == null) { + return Response.status(Response.Status.BAD_REQUEST).build(); + } + Dbg.p("\nRETRIEVING ["+evcId+"]"); + Evc evc = EvcRespositoryInMem.INSTANCE.get(evcId); + if (evc == null) { + return Response.status(Response.Status.NOT_FOUND).build(); + } + evc.dump(1); + return Response.ok().entity(evc).build(); + } + + @GET + @Path("list") + @Produces(MediaType.APPLICATION_JSON) + //-------------------------------------------------------- + public Response evcList() + //-------------------------------------------------------- + + // get a list of all Evc objects + { + Dbg.p("\nEVC GET ALL:"); + List evcList = EvcRespositoryInMem.INSTANCE.getAll(); + if (evcList == null ) + { + return Response.status(Response.Status.NOT_FOUND).build(); + } + return Response.ok().entity(new GenericEntity>(evcList) {}).build(); + } + + @DELETE + @Path("{evcId}") + //-------------------------------------------------------- + public Response delete(@PathParam("evcId") String evcId) + throws Exception + //-------------------------------------------------------- + { + if ( evcId == null) { + return Response.status(Response.Status.BAD_REQUEST).build(); + } + Dbg.p("\nDELETE:" + evcId); + + Evc evcToDel = EvcRespositoryInMem.INSTANCE.get(evcId); + List uniIdList = evcToDel.getUniIdList(); + + // Delete EvcPath first (unis can exists independent of EVC, but not vica-versa) + EvcPathClient evcPathClient = new EvcPathClient(); + evcPathClient.delete(evcToDel.getId()); + + // Give ODL a chance to finish deleting the evc Path + // NOTE: Should be fixed on ODL side eventually via synchronized message handling + try{ + Thread.sleep(1000); + } catch(InterruptedException ex) + {Thread.currentThread().interrupt(); + } + + // Delete the UNI's in ODL + UniClient uniClient = new UniClient(); + if ( uniIdList != null && uniIdList.size() > 0 ) + uniClient.delete(uniIdList.get(0)); + if ( uniIdList != null && uniIdList.size() > 1 ) + uniClient.delete(uniIdList.get(1)); + + // OK, now we can delete the EVC itself + EvcRespositoryInMem.INSTANCE.delete(evcId); + EvcRespositoryInMem.INSTANCE.dump(0); + return Response.ok().build(); + } + + @GET + @Produces(MediaType.APPLICATION_JSON) + //-------------------------------------------------------- + public Evc testGet() + //-------------------------------------------------------- + // simple get to check out json format + { + List uniList = new ArrayList(); + uniList.add("UNI-1"); + uniList.add("UNI-2"); + + List uniMacList = new ArrayList(); + uniMacList.add("11:00:11:11:11:11"); + uniMacList.add("11:00:22:22:22:22"); + + List uniIpList = new ArrayList(); + uniIpList.add("192.168.1.1"); + uniIpList.add("192.168.1.2"); + + + Evc evc = new Evc(); + evc.setAllNonPerfProps("Eve", // id + Evc.EvcType.POINT_TO_POINT, // evcType + 2, // maxUnis + uniList, uniMacList, uniIpList, + Evc.FrameDelivery.UNCONDITIONAL, // unicastFrameDelivery + Evc.FrameDelivery.UNCONDITIONAL, // multicastFrameDelivery + Evc.FrameDelivery.UNCONDITIONAL, // broadcastFrameDelivery + true, // ceVLanIdPreservation + true, // ceVlanCosPreservation + 1600, // evcMaxSvcFrameSize + "gold"); // cosId + return evc; + } + + @GET + @Produces(MediaType.TEXT_PLAIN) + //-------------------------------------------------------- + public String ping() + //-------------------------------------------------------- + // simple ping to check connectivity + + { + Dbg.p("In Evc Service: ping test"); + return "... pingEvc reponse"; + } +} diff --git a/evc/evcmgr/src/main/webapp/WEB-INF/web.xml b/evc/evcmgr/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000..dfb5cd5 --- /dev/null +++ b/evc/evcmgr/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,22 @@ + + + + + Jersey Web Application + org.glassfish.jersey.servlet.ServletContainer + + jersey.config.server.provider.packages + com.cablelabs.vcpe.evc + + + javax.ws.rs.Application + com.cablelabs.vcpe.evc.evcmgr.EvcJaxRsApplication + + 1 + + + Jersey Web Application + /webapi/* + + diff --git a/evc/evcmgr/src/main/webapp/index.jsp b/evc/evcmgr/src/main/webapp/index.jsp new file mode 100644 index 0000000..a064b45 --- /dev/null +++ b/evc/evcmgr/src/main/webapp/index.jsp @@ -0,0 +1,8 @@ + + +

Jersey RESTful Web Application!

+

Jersey resource +

Visit Project Jersey website + for more information on Jersey! + + diff --git a/evc/evcmgr/target/classes/com/cablelabs/vcpe/evc/evcmgr/CORSResponseFilter.class b/evc/evcmgr/target/classes/com/cablelabs/vcpe/evc/evcmgr/CORSResponseFilter.class new file mode 100644 index 0000000..380cd0d Binary files /dev/null and b/evc/evcmgr/target/classes/com/cablelabs/vcpe/evc/evcmgr/CORSResponseFilter.class differ diff --git a/evc/evcmgr/target/classes/com/cablelabs/vcpe/evc/evcmgr/EvcJaxRsApplication.class b/evc/evcmgr/target/classes/com/cablelabs/vcpe/evc/evcmgr/EvcJaxRsApplication.class new file mode 100644 index 0000000..165390a Binary files /dev/null and b/evc/evcmgr/target/classes/com/cablelabs/vcpe/evc/evcmgr/EvcJaxRsApplication.class differ diff --git a/evc/evcmgr/target/classes/com/cablelabs/vcpe/evc/evcmgr/EvcService$1.class b/evc/evcmgr/target/classes/com/cablelabs/vcpe/evc/evcmgr/EvcService$1.class new file mode 100644 index 0000000..9b07071 Binary files /dev/null and b/evc/evcmgr/target/classes/com/cablelabs/vcpe/evc/evcmgr/EvcService$1.class differ diff --git a/evc/evcmgr/target/classes/com/cablelabs/vcpe/evc/evcmgr/EvcService.class b/evc/evcmgr/target/classes/com/cablelabs/vcpe/evc/evcmgr/EvcService.class new file mode 100644 index 0000000..0d77695 Binary files /dev/null and b/evc/evcmgr/target/classes/com/cablelabs/vcpe/evc/evcmgr/EvcService.class differ diff --git a/evc/evcmgr/target/evcmgr.war b/evc/evcmgr/target/evcmgr.war new file mode 100644 index 0000000..5afd5ec Binary files /dev/null and b/evc/evcmgr/target/evcmgr.war differ diff --git a/evc/evcmgr/target/evcmgr/WEB-INF/classes/com/cablelabs/vcpe/evc/evcmgr/CORSResponseFilter.class b/evc/evcmgr/target/evcmgr/WEB-INF/classes/com/cablelabs/vcpe/evc/evcmgr/CORSResponseFilter.class new file mode 100644 index 0000000..380cd0d Binary files /dev/null and b/evc/evcmgr/target/evcmgr/WEB-INF/classes/com/cablelabs/vcpe/evc/evcmgr/CORSResponseFilter.class differ diff --git a/evc/evcmgr/target/evcmgr/WEB-INF/classes/com/cablelabs/vcpe/evc/evcmgr/EvcJaxRsApplication.class b/evc/evcmgr/target/evcmgr/WEB-INF/classes/com/cablelabs/vcpe/evc/evcmgr/EvcJaxRsApplication.class new file mode 100644 index 0000000..165390a Binary files /dev/null and b/evc/evcmgr/target/evcmgr/WEB-INF/classes/com/cablelabs/vcpe/evc/evcmgr/EvcJaxRsApplication.class differ diff --git a/evc/evcmgr/target/evcmgr/WEB-INF/classes/com/cablelabs/vcpe/evc/evcmgr/EvcService$1.class b/evc/evcmgr/target/evcmgr/WEB-INF/classes/com/cablelabs/vcpe/evc/evcmgr/EvcService$1.class new file mode 100644 index 0000000..9b07071 Binary files /dev/null and b/evc/evcmgr/target/evcmgr/WEB-INF/classes/com/cablelabs/vcpe/evc/evcmgr/EvcService$1.class differ diff --git a/evc/evcmgr/target/evcmgr/WEB-INF/classes/com/cablelabs/vcpe/evc/evcmgr/EvcService.class b/evc/evcmgr/target/evcmgr/WEB-INF/classes/com/cablelabs/vcpe/evc/evcmgr/EvcService.class new file mode 100644 index 0000000..0d77695 Binary files /dev/null and b/evc/evcmgr/target/evcmgr/WEB-INF/classes/com/cablelabs/vcpe/evc/evcmgr/EvcService.class differ diff --git a/evc/evcmgr/target/evcmgr/WEB-INF/lib/asm-all-repackaged-2.2.0-b14.jar b/evc/evcmgr/target/evcmgr/WEB-INF/lib/asm-all-repackaged-2.2.0-b14.jar new file mode 100644 index 0000000..9c1f40d Binary files /dev/null and b/evc/evcmgr/target/evcmgr/WEB-INF/lib/asm-all-repackaged-2.2.0-b14.jar differ diff --git a/evc/evcmgr/target/evcmgr/WEB-INF/lib/cglib-2.2.0-b14.jar b/evc/evcmgr/target/evcmgr/WEB-INF/lib/cglib-2.2.0-b14.jar new file mode 100644 index 0000000..7d6963b Binary files /dev/null and b/evc/evcmgr/target/evcmgr/WEB-INF/lib/cglib-2.2.0-b14.jar differ diff --git a/evc/evcmgr/target/evcmgr/WEB-INF/lib/common-1.0-SNAPSHOT.jar b/evc/evcmgr/target/evcmgr/WEB-INF/lib/common-1.0-SNAPSHOT.jar new file mode 100644 index 0000000..267b07a Binary files /dev/null and b/evc/evcmgr/target/evcmgr/WEB-INF/lib/common-1.0-SNAPSHOT.jar differ diff --git a/evc/evcmgr/target/evcmgr/WEB-INF/lib/cosbase-1.0-SNAPSHOT.jar b/evc/evcmgr/target/evcmgr/WEB-INF/lib/cosbase-1.0-SNAPSHOT.jar new file mode 100644 index 0000000..d991659 Binary files /dev/null and b/evc/evcmgr/target/evcmgr/WEB-INF/lib/cosbase-1.0-SNAPSHOT.jar differ diff --git a/evc/evcmgr/target/evcmgr/WEB-INF/lib/evcbase-1.0-SNAPSHOT.jar b/evc/evcmgr/target/evcmgr/WEB-INF/lib/evcbase-1.0-SNAPSHOT.jar new file mode 100644 index 0000000..f4f5b3a Binary files /dev/null and b/evc/evcmgr/target/evcmgr/WEB-INF/lib/evcbase-1.0-SNAPSHOT.jar differ diff --git a/evc/evcmgr/target/evcmgr/WEB-INF/lib/guava-14.0.1.jar b/evc/evcmgr/target/evcmgr/WEB-INF/lib/guava-14.0.1.jar new file mode 100644 index 0000000..3a3d925 Binary files /dev/null and b/evc/evcmgr/target/evcmgr/WEB-INF/lib/guava-14.0.1.jar differ diff --git a/evc/evcmgr/target/evcmgr/WEB-INF/lib/hk2-api-2.2.0-b14.jar b/evc/evcmgr/target/evcmgr/WEB-INF/lib/hk2-api-2.2.0-b14.jar new file mode 100644 index 0000000..acec5bc Binary files /dev/null and b/evc/evcmgr/target/evcmgr/WEB-INF/lib/hk2-api-2.2.0-b14.jar differ diff --git a/evc/evcmgr/target/evcmgr/WEB-INF/lib/hk2-locator-2.2.0-b14.jar b/evc/evcmgr/target/evcmgr/WEB-INF/lib/hk2-locator-2.2.0-b14.jar new file mode 100644 index 0000000..fb2687f Binary files /dev/null and b/evc/evcmgr/target/evcmgr/WEB-INF/lib/hk2-locator-2.2.0-b14.jar differ diff --git a/evc/evcmgr/target/evcmgr/WEB-INF/lib/hk2-utils-2.2.0-b14.jar b/evc/evcmgr/target/evcmgr/WEB-INF/lib/hk2-utils-2.2.0-b14.jar new file mode 100644 index 0000000..2c8df43 Binary files /dev/null and b/evc/evcmgr/target/evcmgr/WEB-INF/lib/hk2-utils-2.2.0-b14.jar differ diff --git a/evc/evcmgr/target/evcmgr/WEB-INF/lib/javax.annotation-api-1.2.jar b/evc/evcmgr/target/evcmgr/WEB-INF/lib/javax.annotation-api-1.2.jar new file mode 100644 index 0000000..9ab39ff Binary files /dev/null and b/evc/evcmgr/target/evcmgr/WEB-INF/lib/javax.annotation-api-1.2.jar differ diff --git a/evc/evcmgr/target/evcmgr/WEB-INF/lib/javax.inject-2.2.0-b14.jar b/evc/evcmgr/target/evcmgr/WEB-INF/lib/javax.inject-2.2.0-b14.jar new file mode 100644 index 0000000..21463e7 Binary files /dev/null and b/evc/evcmgr/target/evcmgr/WEB-INF/lib/javax.inject-2.2.0-b14.jar differ diff --git a/evc/evcmgr/target/evcmgr/WEB-INF/lib/javax.ws.rs-api-2.0.jar b/evc/evcmgr/target/evcmgr/WEB-INF/lib/javax.ws.rs-api-2.0.jar new file mode 100644 index 0000000..b7d364b Binary files /dev/null and b/evc/evcmgr/target/evcmgr/WEB-INF/lib/javax.ws.rs-api-2.0.jar differ diff --git a/evc/evcmgr/target/evcmgr/WEB-INF/lib/jersey-client-2.2.jar b/evc/evcmgr/target/evcmgr/WEB-INF/lib/jersey-client-2.2.jar new file mode 100644 index 0000000..cab47b0 Binary files /dev/null and b/evc/evcmgr/target/evcmgr/WEB-INF/lib/jersey-client-2.2.jar differ diff --git a/evc/evcmgr/target/evcmgr/WEB-INF/lib/jersey-common-2.2.jar b/evc/evcmgr/target/evcmgr/WEB-INF/lib/jersey-common-2.2.jar new file mode 100644 index 0000000..55d27ed Binary files /dev/null and b/evc/evcmgr/target/evcmgr/WEB-INF/lib/jersey-common-2.2.jar differ diff --git a/evc/evcmgr/target/evcmgr/WEB-INF/lib/jersey-container-servlet-core-2.2.jar b/evc/evcmgr/target/evcmgr/WEB-INF/lib/jersey-container-servlet-core-2.2.jar new file mode 100644 index 0000000..e03b5f9 Binary files /dev/null and b/evc/evcmgr/target/evcmgr/WEB-INF/lib/jersey-container-servlet-core-2.2.jar differ diff --git a/evc/evcmgr/target/evcmgr/WEB-INF/lib/jersey-media-moxy-2.2.jar b/evc/evcmgr/target/evcmgr/WEB-INF/lib/jersey-media-moxy-2.2.jar new file mode 100644 index 0000000..786290a Binary files /dev/null and b/evc/evcmgr/target/evcmgr/WEB-INF/lib/jersey-media-moxy-2.2.jar differ diff --git a/evc/evcmgr/target/evcmgr/WEB-INF/lib/jersey-server-2.2.jar b/evc/evcmgr/target/evcmgr/WEB-INF/lib/jersey-server-2.2.jar new file mode 100644 index 0000000..37b3410 Binary files /dev/null and b/evc/evcmgr/target/evcmgr/WEB-INF/lib/jersey-server-2.2.jar differ diff --git a/evc/evcmgr/target/evcmgr/WEB-INF/lib/org.eclipse.persistence.antlr-2.5.0.jar b/evc/evcmgr/target/evcmgr/WEB-INF/lib/org.eclipse.persistence.antlr-2.5.0.jar new file mode 100644 index 0000000..cff0ef8 Binary files /dev/null and b/evc/evcmgr/target/evcmgr/WEB-INF/lib/org.eclipse.persistence.antlr-2.5.0.jar differ diff --git a/evc/evcmgr/target/evcmgr/WEB-INF/lib/org.eclipse.persistence.asm-2.5.0.jar b/evc/evcmgr/target/evcmgr/WEB-INF/lib/org.eclipse.persistence.asm-2.5.0.jar new file mode 100644 index 0000000..832e18e Binary files /dev/null and b/evc/evcmgr/target/evcmgr/WEB-INF/lib/org.eclipse.persistence.asm-2.5.0.jar differ diff --git a/evc/evcmgr/target/evcmgr/WEB-INF/lib/org.eclipse.persistence.core-2.5.0.jar b/evc/evcmgr/target/evcmgr/WEB-INF/lib/org.eclipse.persistence.core-2.5.0.jar new file mode 100644 index 0000000..01bb838 Binary files /dev/null and b/evc/evcmgr/target/evcmgr/WEB-INF/lib/org.eclipse.persistence.core-2.5.0.jar differ diff --git a/evc/evcmgr/target/evcmgr/WEB-INF/lib/org.eclipse.persistence.moxy-2.5.0.jar b/evc/evcmgr/target/evcmgr/WEB-INF/lib/org.eclipse.persistence.moxy-2.5.0.jar new file mode 100644 index 0000000..29a1057 Binary files /dev/null and b/evc/evcmgr/target/evcmgr/WEB-INF/lib/org.eclipse.persistence.moxy-2.5.0.jar differ diff --git a/evc/evcmgr/target/evcmgr/WEB-INF/lib/osgi-resource-locator-1.0.1.jar b/evc/evcmgr/target/evcmgr/WEB-INF/lib/osgi-resource-locator-1.0.1.jar new file mode 100644 index 0000000..bd6aa17 Binary files /dev/null and b/evc/evcmgr/target/evcmgr/WEB-INF/lib/osgi-resource-locator-1.0.1.jar differ diff --git a/evc/evcmgr/target/evcmgr/WEB-INF/lib/unibase-1.0-SNAPSHOT.jar b/evc/evcmgr/target/evcmgr/WEB-INF/lib/unibase-1.0-SNAPSHOT.jar new file mode 100644 index 0000000..46cc4d4 Binary files /dev/null and b/evc/evcmgr/target/evcmgr/WEB-INF/lib/unibase-1.0-SNAPSHOT.jar differ diff --git a/evc/evcmgr/target/evcmgr/WEB-INF/lib/validation-api-1.1.0.Final.jar b/evc/evcmgr/target/evcmgr/WEB-INF/lib/validation-api-1.1.0.Final.jar new file mode 100644 index 0000000..de85403 Binary files /dev/null and b/evc/evcmgr/target/evcmgr/WEB-INF/lib/validation-api-1.1.0.Final.jar differ diff --git a/evc/evcmgr/target/evcmgr/WEB-INF/web.xml b/evc/evcmgr/target/evcmgr/WEB-INF/web.xml new file mode 100644 index 0000000..dfb5cd5 --- /dev/null +++ b/evc/evcmgr/target/evcmgr/WEB-INF/web.xml @@ -0,0 +1,22 @@ + + + + + Jersey Web Application + org.glassfish.jersey.servlet.ServletContainer + + jersey.config.server.provider.packages + com.cablelabs.vcpe.evc + + + javax.ws.rs.Application + com.cablelabs.vcpe.evc.evcmgr.EvcJaxRsApplication + + 1 + + + Jersey Web Application + /webapi/* + + diff --git a/evc/evcmgr/target/evcmgr/index.jsp b/evc/evcmgr/target/evcmgr/index.jsp new file mode 100644 index 0000000..a064b45 --- /dev/null +++ b/evc/evcmgr/target/evcmgr/index.jsp @@ -0,0 +1,8 @@ + + +

Jersey RESTful Web Application!

+

Jersey resource +

Visit Project Jersey website + for more information on Jersey! + + diff --git a/evc/evcmgr/target/maven-archiver/pom.properties b/evc/evcmgr/target/maven-archiver/pom.properties new file mode 100644 index 0000000..26a731f --- /dev/null +++ b/evc/evcmgr/target/maven-archiver/pom.properties @@ -0,0 +1,5 @@ +#Generated by Maven +#Thu Aug 06 14:01:19 PDT 2015 +version=1.0-SNAPSHOT +groupId=com.cablelabs.vcpe +artifactId=evcmgr diff --git a/evc/pom.xml b/evc/pom.xml new file mode 100644 index 0000000..0f73c1e --- /dev/null +++ b/evc/pom.xml @@ -0,0 +1,24 @@ + + + + com.cablelabs.vcpe + vcpe-services + 1.0-SNAPSHOT + + + 4.0.0 + + com.cablelabs.vcpe + evc + pom + 1.0-SNAPSHOT + + + evcbase + evcmgr + + + + + -- cgit 1.2.3-korg