fixed RESTConf, added scripts and removed REST api
diff --git a/apps/fpcagent/BUCK b/apps/fpcagent/BUCK
index c57ddf9..a3d15fb 100644
--- a/apps/fpcagent/BUCK
+++ b/apps/fpcagent/BUCK
@@ -4,8 +4,8 @@
'//lib:KRYO',
'//models/fpcagent:onos-models-fpcagent',
'//models/common:onos-models-common',
- '//apps/config:onos-apps-config',
'//lib:onos-yang-model',
+ '//apps/config:onos-apps-config',
'//core/api:onos-api',
'//lib:javax.ws.rs-api',
'//utils/rest:onlab-rest',
@@ -41,11 +41,6 @@
osgi_jar_with_tests(
deps = COMPILE_DEPS,
test_deps = TEST_DEPS,
- web_context = '/onos/fpcagent',
- api_title = 'FPC Agent REST API',
- api_package = 'org.onosproject.fpcagent.rest',
- api_version = '1.0',
- api_description = 'FPC Agent REST API',
)
onos_app(
diff --git a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/Configure.java b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/Configure.java
deleted file mode 100644
index d6b277a..0000000
--- a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/Configure.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package org.onosproject.fpcagent;
-
-import org.onosproject.yang.gen.v1.fpc.rev20150105.FpcService;
-import org.onosproject.yang.gen.v1.ietfdmmfpcagent.rev20160803.IetfDmmFpcagentService;
-
-public interface Configure extends IetfDmmFpcagentService, FpcService {
-}
diff --git a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/FpcManager.java b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/FpcManager.java
index 31ca0f0..6b4e016 100644
--- a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/FpcManager.java
+++ b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/FpcManager.java
@@ -18,34 +18,38 @@
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
-import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.exception.ExceptionUtils;
import org.apache.felix.scr.annotations.*;
import org.onlab.packet.Ip4Address;
import org.onlab.packet.Ip4Prefix;
+import org.onosproject.config.DynamicConfigService;
import org.onosproject.core.ApplicationId;
import org.onosproject.core.CoreService;
-import org.onosproject.fpcagent.dto.configure.Context;
-import org.onosproject.fpcagent.dto.dpn.AddDpn;
import org.onosproject.fpcagent.helpers.ConfigHelper;
import org.onosproject.fpcagent.helpers.DpnApi;
import org.onosproject.fpcagent.workers.ZMQSBPublisherManager;
import org.onosproject.fpcagent.workers.ZMQSBSubscriberManager;
import org.onosproject.net.config.*;
import org.onosproject.net.config.basics.SubjectFactories;
-import org.onosproject.yang.gen.v1.fpc.rev20150105.fpc.deregisterclient.DeregisterClientInput;
-import org.onosproject.yang.gen.v1.fpc.rev20150105.fpc.registerclient.RegisterClientInput;
-import org.onosproject.yang.gen.v1.ietfdmmfpcagent.rev20160803.ietfdmmfpcagent.configure.ConfigureInput;
+import org.onosproject.yang.gen.v1.ietfdmmfpcagent.rev20160803.IetfDmmFpcagentOpParam;
+import org.onosproject.yang.gen.v1.ietfdmmfpcagent.rev20160803.IetfDmmFpcagentService;
+import org.onosproject.yang.gen.v1.ietfdmmfpcagent.rev20160803.ietfdmmfpcagent.DefaultTenants;
+import org.onosproject.yang.gen.v1.ietfdmmfpcagent.rev20160803.ietfdmmfpcagent.Result;
+import org.onosproject.yang.gen.v1.ietfdmmfpcagent.rev20160803.ietfdmmfpcagent.configure.DefaultConfigureInput;
+import org.onosproject.yang.gen.v1.ietfdmmfpcagent.rev20160803.ietfdmmfpcagent.configure.DefaultConfigureOutput;
+import org.onosproject.yang.gen.v1.ietfdmmfpcagent.rev20160803.ietfdmmfpcagent.configuredpn.DefaultConfigureDpnInput;
+import org.onosproject.yang.gen.v1.ietfdmmfpcagent.rev20160803.ietfdmmfpcagent.configuredpn.DefaultConfigureDpnOutput;
import org.onosproject.yang.gen.v1.ietfdmmfpcagent.rev20160803.ietfdmmfpcagent.instructions.instructions.instrtype.Instr3GppMob;
import org.onosproject.yang.gen.v1.ietfdmmfpcagent.rev20160803.ietfdmmfpcagent.opheader.OpTypeEnum;
import org.onosproject.yang.gen.v1.ietfdmmfpcagent.rev20160803.ietfdmmfpcagent.opinput.opbody.CreateOrUpdate;
import org.onosproject.yang.gen.v1.ietfdmmfpcagent.rev20160803.ietfdmmfpcagent.opinput.opbody.DeleteOrQuery;
import org.onosproject.yang.gen.v1.ietfdmmfpcagent.rev20160803.ietfdmmfpcagent.payload.Contexts;
+import org.onosproject.yang.gen.v1.ietfdmmfpcagent.rev20160803.ietfdmmfpcagent.result.ResultEnum;
+import org.onosproject.yang.gen.v1.ietfdmmfpcagent.rev20160803.ietfdmmfpcagent.resultbody.resulttype.DefaultCommonSuccess;
+import org.onosproject.yang.gen.v1.ietfdmmfpcagent.rev20160803.ietfdmmfpcagent.resultbodydpn.resulttype.DefaultEmptyCase;
import org.onosproject.yang.gen.v1.ietfdmmfpcbase.rev20160803.ietfdmmfpcbase.mobilityinfo.mobprofileparameters.ThreegppTunnel;
import org.onosproject.yang.gen.v1.ietfdmmthreegpp.rev20160803.ietfdmmthreegpp.threegppinstr.Bits;
-import org.onosproject.yang.model.RpcInput;
-import org.onosproject.yang.model.RpcOutput;
-import org.onosproject.yang.model.RpcRegistry;
+import org.onosproject.yang.model.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -61,7 +65,7 @@
*/
@Component(immediate = true)
@Service
-public class FpcManager implements Configure, FpcService {
+public class FpcManager implements IetfDmmFpcagentService, FpcService {
static final Logger log = LoggerFactory.getLogger(FpcManager.class);
private static final String FPC_APP_ID = "org.onosproject.fpcagent";
@@ -69,13 +73,19 @@
private final InternalNetworkConfigListener configListener =
new InternalNetworkConfigListener();
+ /* Services */
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
protected TenantService tenantService;
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
+ ModelConverter modelConverter;
+
+ @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
+ DynamicConfigService dynamicConfigService;
+
+ @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
private RpcRegistry rpcRegistry;
- /* Services */
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
private NetworkConfigRegistry registry;
@@ -85,18 +95,12 @@
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
private CoreService coreService;
-// @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
-// protected ModelConverter modelConverter;
-//
-// @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
-// protected DynamicConfigService dynamicConfigService;
-
/* Variables */
private ApplicationId appId;
private FpcConfig fpcConfig;
+ private IetfDmmFpcagentOpParam fpcData;
private HashMap<String, ArrayList<Contexts>> sessionContextsMap = Maps.newHashMap();
- private HashMap<String, ArrayList<Context>> sessionContextsRestMap = Maps.newHashMap();
private HashMap<String, String> nodeNetworkMap = Maps.newHashMap();
/* Config */
@@ -115,10 +119,28 @@
configService.addListener(configListener);
registry.registerConfigFactory(fpcConfigConfigFactory);
+ fpcData = new IetfDmmFpcagentOpParam();
+
rpcRegistry.registerRpcService(this);
tenantService.addTenant(getFpcIdentity.apply("default"));
+ DefaultTenants defaultTenants = new DefaultTenants();
+ fpcData.tenants(defaultTenants);
+ defaultTenants.addToTenant(tenantService.getTenant(getFpcIdentity.apply("default")).get());
+
+ ResourceData dataNode = modelConverter.createDataNode(
+ DefaultModelObjectData.builder()
+ .addModelObject(defaultTenants)
+ .build()
+ );
+
+
+ log.info("resourceData {} ", dataNode.dataNodes().size());
+ dataNode.dataNodes().forEach(
+ node -> dynamicConfigService.createNode(dataNode.resourceId(), node)
+ );
+
log.info("FPC Agent Started");
}
@@ -136,8 +158,7 @@
log.info("FPC Agent Stopped");
}
- public void init() {
-
+ private void init() {
fpcConfig.getConfig().ifPresent(
helper -> {
ZMQSBSubscriberManager.createInstance(
@@ -165,6 +186,295 @@
return fpcConfig != null ? fpcConfig.getConfig() : Optional.empty();
}
+ @Override
+ public RpcOutput configureDpn(RpcInput rpcInput) {
+ log.info("RPC configure {}", rpcInput);
+
+ DefaultConfigureDpnOutput defaultConfigureDpnOutput = new DefaultConfigureDpnOutput();
+ defaultConfigureDpnOutput.result(Result.of(ResultEnum.OK));
+ defaultConfigureDpnOutput.resultType(new DefaultEmptyCase());
+
+ try {
+ ResourceData data = DefaultResourceData.builder()
+ .addDataNode(rpcInput.data())
+ .resourceId(
+ ResourceId.builder()
+ .addBranchPointSchema("configureDpn", "urn:ietf:params:xml:ns:yang:fpcagent")
+ .build())
+ .build();
+
+ ModelObjectData model = modelConverter.createModel(data);
+ model.modelObjects().parallelStream().forEach(
+ modelObject -> {
+ DefaultConfigureDpnInput input = (DefaultConfigureDpnInput) modelObject;
+ String dpnId = input.inputDpnId().fpcIdentity().union().string();
+ switch (input.operation().enumeration()) {
+ case ADD:
+ log.info("Adding DPN {}", dpnId);
+ nodeNetworkMap.put(dpnId, dpnId + "/" + dpnId);
+ break;
+ case REMOVE:
+ log.info("Removing DPN {}", dpnId);
+ nodeNetworkMap.remove(dpnId);
+ break;
+ }
+ });
+ } catch (Exception e) {
+ log.error(ExceptionUtils.getFullStackTrace(e));
+ }
+
+ ResourceData dataNode = modelConverter.createDataNode(
+ DefaultModelObjectData.builder().addModelObject(defaultConfigureDpnOutput).build()
+ );
+ return new RpcOutput(RpcOutput.Status.RPC_SUCCESS, dataNode.dataNodes().get(0));
+ }
+
+ @Override
+ public RpcOutput configure(RpcInput rpcInput) {
+ log.info("RPC configure {}", rpcInput);
+
+ DefaultConfigureOutput configureOutput = new DefaultConfigureOutput();
+ configureOutput.result(Result.of(ResultEnum.OK));
+ configureOutput.resultType(new DefaultCommonSuccess());
+
+ try {
+ ResourceData data = DefaultResourceData.builder()
+ .addDataNode(rpcInput.data())
+ .resourceId(
+ ResourceId.builder()
+ .addBranchPointSchema("configure", "urn:ietf:params:xml:ns:yang:fpcagent")
+ .build())
+ .build();
+
+ ModelObjectData model = modelConverter.createModel(data);
+ model.modelObjects().parallelStream().forEach(
+ modelObject -> {
+ DefaultConfigureInput input = (DefaultConfigureInput) modelObject;
+ configureOutput.opId(input.opId());
+ switch (input.opType()) {
+ case CREATE:
+ case UPDATE:
+ if (input.opBody() instanceof CreateOrUpdate) {
+ log.info("Create Or Update");
+ CreateOrUpdate createOrUpdate = (CreateOrUpdate) input.opBody();
+ createOrUpdate.contexts().forEach(
+ context -> {
+ log.info("Context {}", context);
+ String key = context.contextId().fpcIdentity().union().string();
+ sessionContextsMap.computeIfAbsent(key, k -> new ArrayList<>()).add(context);
+ context.dpns().forEach(
+ dpn -> {
+ if (context.instructions().instrType() instanceof Instr3GppMob) {
+ log.info("3GPP Instructions");
+ Instr3GppMob instr3GppMob = (Instr3GppMob) context.instructions().instrType();
+ String commands = Bits.toString(instr3GppMob.instr3GppMob().bits());
+
+ Ip4Address ulLocalAddress = Ip4Address.valueOf(context.ul().tunnelLocalAddress().toString()),
+ dlRemoteAddress = Ip4Address.valueOf(context.dl().tunnelRemoteAddress().toString()),
+ dlLocalAddress = Ip4Address.valueOf(context.dl().tunnelLocalAddress().toString());
+
+ long s1u_sgw_gtpu_teid, s1u_enb_gtpu_teid,
+ clientId = input.clientId().fpcIdentity().union().int64(),
+ contextId = context.contextId().fpcIdentity().union().int64();
+
+ BigInteger opId = input.opId().uint64(),
+ imsi = context.imsi().uint64();
+
+ short ebi = context.ebi().uint8(),
+ lbi = context.lbi().uint8();
+
+ Short dpnTopic = DpnApi.getTopicFromNode(nodeNetworkMap.get(dpn.dpnId().fpcIdentity().union().string()));
+
+ if (context.ul().mobilityTunnelParameters().mobprofileParameters() instanceof ThreegppTunnel) {
+ s1u_sgw_gtpu_teid = ((ThreegppTunnel) context.ul().mobilityTunnelParameters().mobprofileParameters()).tunnelIdentifier();
+ } else {
+ return;
+ }
+ if (context.dl().mobilityTunnelParameters().mobprofileParameters() instanceof ThreegppTunnel) {
+ s1u_enb_gtpu_teid = ((ThreegppTunnel) context.dl().mobilityTunnelParameters().mobprofileParameters()).tunnelIdentifier();
+ } else {
+ return;
+ }
+
+ if (input.opType().equals(OpTypeEnum.CREATE)) {
+ if (commands.contains("session")) {
+ log.info("CREATE session");
+ DpnApi.create_session(
+ dpnTopic,
+ imsi,
+ Ip4Prefix.valueOf(context.delegatingIpPrefixes().get(0).toString()).address(),
+ ebi,
+ ulLocalAddress,
+ s1u_sgw_gtpu_teid,
+ clientId,
+ opId,
+ contextId
+ );
+
+ if (commands.contains("downlink")) {
+ log.info("CREATE session downlink");
+ DpnApi.modify_bearer_dl(
+ dpnTopic,
+ s1u_sgw_gtpu_teid,
+ dlRemoteAddress,
+ s1u_enb_gtpu_teid,
+ clientId,
+ opId
+ );
+ }
+ } else if (commands.contains("indirect-forward")) {
+ // TODO - Modify API for Indirect Forwarding to/from another SGW
+ } else if (commands.contains("uplink")) {
+ log.info("CREATE uplink");
+ DpnApi.create_bearer_ul(
+ dpnTopic,
+ imsi,
+ lbi,
+ ebi,
+ ulLocalAddress,
+ s1u_sgw_gtpu_teid
+ );
+ }
+ } else {
+ if (commands.contains("downlink")) {
+ log.info("UPDATE downlink");
+ if (context.dl().lifetime() >= 0L) {
+ DpnApi.modify_bearer_dl(
+ dpnTopic,
+ dlRemoteAddress,
+ s1u_enb_gtpu_teid,
+ dlLocalAddress,
+ clientId,
+ opId,
+ contextId
+ );
+ } else {
+ DpnApi.delete_bearer(
+ dpnTopic,
+ s1u_enb_gtpu_teid
+ );
+ }
+ }
+ if (commands.contains("uplink")) {
+ log.info("UPDATE uplink");
+ if (context.ul().lifetime() >= 0L) {
+ DpnApi.modify_bearer_ul(
+ dpnTopic,
+ ulLocalAddress,
+ s1u_enb_gtpu_teid,
+ s1u_sgw_gtpu_teid
+ );
+ } else {
+ DpnApi.delete_bearer(
+ dpnTopic,
+ s1u_sgw_gtpu_teid
+ );
+ }
+ }
+ }
+ }
+ }
+ );
+ }
+ );
+ }
+ break;
+ case QUERY:
+ break;
+ case DELETE:
+ if (input.opBody() instanceof DeleteOrQuery) {
+ DeleteOrQuery deleteOrQuery = (DeleteOrQuery) input.opBody();
+ log.info("Delete Or Query");
+
+ deleteOrQuery.targets().forEach(
+ target -> {
+ log.info("target {}", target);
+ String targetStr = target.target().union().string();
+ sessionContextsMap.getOrDefault(targetStr, Lists.newArrayList()).parallelStream().forEach(
+ context -> {
+ log.info("context {}", context);
+ context.dpns().forEach(
+ dpn -> {
+ log.info("DPN {}", dpn);
+ Long teid;
+ if (context.ul().mobilityTunnelParameters().mobprofileParameters() instanceof ThreegppTunnel) {
+ teid = ((ThreegppTunnel) context.ul().mobilityTunnelParameters().mobprofileParameters()).tunnelIdentifier();
+ } else {
+ return;
+ }
+
+ Short dpnTopic = DpnApi.getTopicFromNode(nodeNetworkMap.get(dpn.dpnId().fpcIdentity().union().string()));
+
+ if (targetStr.endsWith("ul") || targetStr.endsWith("dl")) {
+ log.info("DELETE Bearer");
+ DpnApi.delete_bearer(
+ dpnTopic,
+ teid
+ );
+ } else {
+ log.info("DELETE session");
+ DpnApi.delete_session(
+ dpnTopic,
+ context.lbi().uint8(),
+ teid,
+ input.clientId().fpcIdentity().union().int64(),
+ input.opId().uint64(),
+ context.contextId().fpcIdentity().union().int64()
+ );
+ }
+ }
+ );
+ }
+ );
+ }
+ );
+ }
+ break;
+ }
+ }
+ );
+
+
+ } catch (Exception e) {
+ log.error(ExceptionUtils.getFullStackTrace(e));
+ }
+
+ ResourceData dataNode = modelConverter.createDataNode(
+ DefaultModelObjectData.builder().addModelObject(configureOutput).build()
+ );
+ return new RpcOutput(RpcOutput.Status.RPC_SUCCESS, dataNode.dataNodes().get(0));
+ }
+
+ @Override
+ public RpcOutput configureBundles(RpcInput rpcInput) {
+ return null;
+ }
+
+ @Override
+ public RpcOutput eventRegister(RpcInput rpcInput) {
+ return null;
+ }
+
+ @Override
+ public RpcOutput eventDeregister(RpcInput rpcInput) {
+ return null;
+ }
+
+ @Override
+ public RpcOutput probe(RpcInput rpcInput) {
+ return null;
+ }
+
+// @Override
+// public void registerClient(RegisterClientInput input) {
+// tenantService.registerClient(input.clientId(), input.tenantId());
+// }
+//
+// @Override
+// public void deregisterClient(DeregisterClientInput input) {
+// tenantService.deregisterClient(input.clientId());
+// }
+
private class InternalNetworkConfigListener implements NetworkConfigListener {
@Override
@@ -196,371 +506,4 @@
}
}
-
- @Override
- public RpcOutput configureDpn(RpcInput rpcInput) {
- return null;
- }
-
- @Override
- public RpcOutput configure(RpcInput rpcInput) {
- ConfigureInput input = (ConfigureInput) rpcInput;
- switch (input.opType()) {
- case CREATE:
- case UPDATE:
- if (input.opBody() instanceof CreateOrUpdate) {
- CreateOrUpdate createOrUpdate = (CreateOrUpdate) input.opBody();
- createOrUpdate.contexts().forEach(
- context -> {
- String key = context.contextId().fpcIdentity().union().string();
- sessionContextsMap.computeIfAbsent(key, k -> new ArrayList<>())
- .add(context);
- context.dpns().forEach(
- dpn -> {
- if (input.instructions().instrType() instanceof Instr3GppMob) {
-
- Instr3GppMob instr3GppMob = (Instr3GppMob) input.instructions().instrType();
- String commands = Bits.toString(instr3GppMob.instr3GppMob().bits());
-
- Ip4Address ulLocalAddress = Ip4Address.valueOf(context.ul().tunnelLocalAddress().toString()),
- dlRemoteAddress = Ip4Address.valueOf(context.dl().tunnelRemoteAddress().toString()),
- dlLocalAddress = Ip4Address.valueOf(context.dl().tunnelLocalAddress().toString());
-
- long s1u_sgw_gtpu_teid, s1u_enb_gtpu_teid,
- clientId = input.clientId().fpcIdentity().union().int64(),
- contextId = context.contextId().fpcIdentity().union().int64();
-
- BigInteger opId = input.opId().uint64(),
- imsi = context.imsi().uint64();
-
- short ebi = context.ebi().uint8(),
- lbi = context.lbi().uint8();
-
- Short dpnTopic = DpnApi.getTopicFromNode(nodeNetworkMap.get(dpn.dpnId().fpcIdentity().union().string()));
-
- if (context.ul().mobilityTunnelParameters().mobprofileParameters() instanceof ThreegppTunnel) {
- s1u_sgw_gtpu_teid = ((ThreegppTunnel) context.ul().mobilityTunnelParameters().mobprofileParameters()).tunnelIdentifier();
- } else {
- return;
- }
- if (context.dl().mobilityTunnelParameters().mobprofileParameters() instanceof ThreegppTunnel) {
- s1u_enb_gtpu_teid = ((ThreegppTunnel) context.dl().mobilityTunnelParameters().mobprofileParameters()).tunnelIdentifier();
- } else {
- return;
- }
-
- if (input.opType().equals(OpTypeEnum.CREATE)) {
- if (commands.contains("session")) {
- DpnApi.create_session(
- dpnTopic,
- imsi,
- Ip4Prefix.valueOf(context.delegatingIpPrefixes().get(0).toString()).address(),
- ebi,
- ulLocalAddress,
- s1u_sgw_gtpu_teid,
- clientId,
- opId,
- contextId
- );
-
-
- if (commands.contains("downlink")) {
- DpnApi.modify_bearer_dl(
- dpnTopic,
- s1u_sgw_gtpu_teid,
- dlRemoteAddress,
- s1u_enb_gtpu_teid,
- clientId,
- opId
- );
- }
- } else if (commands.contains("indirect-forward")) {
- // TODO - Modify API for Indirect Forwarding to/from another SGW
- } else if (commands.contains("uplink")) {
- DpnApi.create_bearer_ul(
- dpnTopic,
- imsi,
- lbi,
- ebi,
- ulLocalAddress,
- s1u_sgw_gtpu_teid
- );
- }
- } else {
- if (commands.contains("downlink")) {
- if (context.dl().lifetime() >= 0L) {
- DpnApi.modify_bearer_dl(
- dpnTopic,
- dlRemoteAddress,
- s1u_enb_gtpu_teid,
- dlLocalAddress,
- clientId,
- opId,
- contextId
- );
- } else {
- DpnApi.delete_bearer(
- dpnTopic,
- s1u_enb_gtpu_teid
- );
- }
- }
- if (commands.contains("uplink")) {
- if (context.ul().lifetime() >= 0L) {
- DpnApi.modify_bearer_ul(
- dpnTopic,
- ulLocalAddress,
- s1u_enb_gtpu_teid,
- s1u_sgw_gtpu_teid
- );
- } else {
- DpnApi.delete_bearer(
- dpnTopic,
- s1u_sgw_gtpu_teid
- );
- }
- }
- }
- }
- }
- );
- }
- );
- }
- break;
- case QUERY:
- break;
- case DELETE:
- if (input.opBody() instanceof DeleteOrQuery) {
- DeleteOrQuery deleteOrQuery = (DeleteOrQuery) input.opBody();
-
- deleteOrQuery.targets().forEach(
- target -> {
- String targetStr = target.target().union().string();
- sessionContextsMap.getOrDefault(targetStr, Lists.newArrayList()).parallelStream().forEach(
- context -> context.dpns().forEach(
- dpn -> {
- Long teid;
- if (context.ul().mobilityTunnelParameters().mobprofileParameters() instanceof ThreegppTunnel) {
- teid = ((ThreegppTunnel) context.ul().mobilityTunnelParameters().mobprofileParameters()).tunnelIdentifier();
- } else {
- return;
- }
-
- Short dpnTopic = DpnApi.getTopicFromNode(nodeNetworkMap.get(dpn.dpnId().fpcIdentity().union().string()));
-
- if (targetStr.endsWith("ul") || targetStr.endsWith("dl")) {
- DpnApi.delete_bearer(
- dpnTopic,
- teid
- );
- } else {
- DpnApi.delete_session(
- dpnTopic,
- context.lbi().uint8(),
- teid,
- input.clientId().fpcIdentity().union().int64(),
- input.opId().uint64(),
- context.contextId().fpcIdentity().union().int64()
- );
- }
- }
- )
- );
- }
- );
- }
- break;
- }
-
- return null;
- }
-
- @Override
- public RpcOutput configureBundles(RpcInput rpcInput) {
- return null;
- }
-
- @Override
- public RpcOutput eventRegister(RpcInput rpcInput) {
- return null;
- }
-
- @Override
- public RpcOutput eventDeregister(RpcInput rpcInput) {
- return null;
- }
-
- @Override
- public RpcOutput probe(RpcInput rpcInput) {
- return null;
- }
-
- @Override
- public RpcOutput registerClient(RpcInput rpcInput) {
- return null;
- }
-
- @Override
- public RpcOutput deregisterClient(RpcInput rpcInput) {
- return null;
- }
-
- @Override
- public void configure(org.onosproject.fpcagent.dto.configure.Configure configure) {
- org.onosproject.fpcagent.dto.configure.ConfigureInput configureInput = configure.getConfigureInput();
- if (configureInput.getOp_type().equals("create") || configureInput.getOp_type().equals("update")) {
-
- configureInput.getContexts().forEach(
- context -> {
- String key = String.valueOf(context.getContext_id());
- sessionContextsRestMap.computeIfAbsent(key, k -> new ArrayList<>()).add(context);
- context.getDpns().forEach(dpn -> {
- try {
- String commands = context.getInstructions().getInstr_3gpp_mob();
-
- Ip4Address ulLocalAddress = Ip4Address.valueOf(context.getUl().getTunnel_local_address()),
- dlRemoteAddress = Ip4Address.valueOf(context.getDl().getTunnel_remote_address());
-
- long s1u_sgw_gtpu_teid, s1u_enb_gtpu_teid,
- clientId = Long.parseLong(configureInput.getClient_id()),
- contextId = context.getContext_id();
-
- BigInteger opId = BigInteger.valueOf(Long.parseLong(configureInput.getOp_id())),
- imsi = BigInteger.valueOf(Long.parseLong(context.getImsi()));
-
- short ebi = Short.parseShort(context.getEbi()),
- lbi = Short.parseShort(context.getLbi());
-
- Short dpnTopic = DpnApi.getTopicFromNode(nodeNetworkMap.get(dpn.getDpn_id()));
-
-
- s1u_sgw_gtpu_teid = Long.parseLong(context.getUl().getMobility_tunnel_parameters().getTunnel_identifier());
- s1u_enb_gtpu_teid = Long.parseLong(context.getDl().getMobility_tunnel_parameters().getTunnel_identifier());
-
- if (configureInput.getOp_type().equals("create")) {
- if (commands.contains("session")) {
- DpnApi.create_session(
- dpnTopic,
- imsi,
- Ip4Prefix.valueOf(context.getDelegating_ip_prefixes().get(0)).address(),
- ebi,
- ulLocalAddress,
- s1u_sgw_gtpu_teid,
- clientId,
- opId,
- contextId
- );
-
-
- if (commands.contains("downlink")) {
- DpnApi.modify_bearer_dl(
- dpnTopic,
- s1u_sgw_gtpu_teid,
- dlRemoteAddress,
- s1u_enb_gtpu_teid,
- clientId,
- opId
- );
- }
- } else if (commands.contains("indirect-forward")) {
- // TODO - Modify API for Indirect Forwarding to/from another SGW
- } else if (commands.contains("uplink")) {
- DpnApi.create_bearer_ul(
- dpnTopic,
- imsi,
- lbi,
- ebi,
- ulLocalAddress,
- s1u_sgw_gtpu_teid
- );
- }
- } else {
- if (commands.contains("downlink")) {
- DpnApi.delete_bearer(
- dpnTopic,
- s1u_enb_gtpu_teid
- );
- }
- if (commands.contains("uplink")) {
- DpnApi.delete_bearer(
- dpnTopic,
- s1u_sgw_gtpu_teid
- );
- }
- }
- } catch (Exception e) {
- log.error(ExceptionUtils.getFullStackTrace(e));
- }
- }
- );
- }
- );
-
- } else if (configureInput.getOp_type().equals("delete") || configureInput.getOp_type().equals("query")) {
- configureInput.getTargets().forEach(
- target -> {
- String targetStr = target.getTarget();
- String s = StringUtils.substringBetween(targetStr, "contexts/", "/");
- if (s == null) {
- s = StringUtils.substringAfter(targetStr, "contexts/");
- }
- sessionContextsRestMap.getOrDefault(s, Lists.newArrayList()).forEach(
- context -> context.getDpns().forEach(
- dpn -> {
- Long teid = Long.valueOf(context.getUl().getMobility_tunnel_parameters().getTunnel_identifier());
- Short dpnTopic = DpnApi.getTopicFromNode(nodeNetworkMap.get(dpn.getDpn_id()));
-
- if (targetStr.endsWith("ul") || targetStr.endsWith("dl")) {
- DpnApi.delete_bearer(
- dpnTopic,
- teid
- );
- } else {
- DpnApi.delete_session(
- dpnTopic,
- Short.valueOf(context.getLbi()),
- teid,
- Long.valueOf(configureInput.getClient_id()),
- BigInteger.valueOf(Long.parseLong(configureInput.getOp_id())),
- Long.valueOf(context.getContext_id())
- );
- }
- }
- )
- );
- }
- );
- }
- }
-
- @Override
- public void registerClient(RegisterClientInput input) {
- tenantService.registerClient(input.clientId(), input.tenantId());
- }
-
- @Override
- public void deregisterClient(DeregisterClientInput input) {
- tenantService.deregisterClient(input.clientId());
- }
-
- @Override
- public void addDpn(AddDpn addDpn) {
- addDpn.getDpns().forEach(
- dpn -> {
- try {
- log.info("Addind DPN {}", dpn.getDpn_id());
- nodeNetworkMap.put(dpn.getDpn_id(), dpn.getNode_id() + "/" + dpn.getNetwork_id());
- } catch (Exception e) {
- log.error(ExceptionUtils.getFullStackTrace(e));
- }
- }
- );
- }
-
- @Override
- public void deleteDpn(String dpn) {
- log.info("Removing DPN {}", dpn);
- nodeNetworkMap.remove(dpn);
- }
}
diff --git a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/FpcService.java b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/FpcService.java
index 9ff298a..5e4e152 100644
--- a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/FpcService.java
+++ b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/FpcService.java
@@ -1,24 +1,10 @@
package org.onosproject.fpcagent;
-import org.onosproject.fpcagent.dto.configure.Configure;
-import org.onosproject.fpcagent.dto.dpn.AddDpn;
import org.onosproject.fpcagent.helpers.ConfigHelper;
-import org.onosproject.yang.gen.v1.fpc.rev20150105.fpc.deregisterclient.DeregisterClientInput;
-import org.onosproject.yang.gen.v1.fpc.rev20150105.fpc.registerclient.RegisterClientInput;
import java.util.Optional;
public interface FpcService {
Optional<ConfigHelper> getConfig();
-
- void configure(Configure configure);
-
- void registerClient(RegisterClientInput input);
-
- void deregisterClient(DeregisterClientInput input);
-
- void addDpn(AddDpn addDpn);
-
- void deleteDpn(String dpn);
}
diff --git a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/client/BindClient.java b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/client/BindClient.java
deleted file mode 100755
index 5817772..0000000
--- a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/client/BindClient.java
+++ /dev/null
@@ -1,128 +0,0 @@
-
-package org.onosproject.fpcagent.dto.client;
-
-import com.fasterxml.jackson.annotation.*;
-import org.apache.commons.lang.builder.EqualsBuilder;
-import org.apache.commons.lang.builder.HashCodeBuilder;
-import org.apache.commons.lang.builder.ToStringBuilder;
-import org.onosproject.fpcagent.dto.configure.ConfigureInput;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonPropertyOrder({
- "client-id",
- "tenant-id",
- "supported-features",
- "endpoint-uri"
-})
-public class BindClient {
-
- @JsonProperty("client-id")
- private String client_id;
- @JsonProperty("tenant-id")
- private String tenant_id;
- @JsonProperty("supported-features")
- private List<String> supported_features = null;
- @JsonProperty("endpoint-uri")
- private String endpoint_uri;
- @JsonIgnore
- private Map<String, Object> additionalProperties = new HashMap<String, Object>();
-
- /**
- * No args constructor for use in serialization
- *
- */
- public BindClient() {
- }
-
- /**
- *
- * @param endpoint_uri
- * @param supported_features
- * @param tenant_id
- * @param client_id
- */
- public BindClient(String client_id, String tenant_id, List<String> supported_features, String endpoint_uri) {
- super();
- this.client_id = client_id;
- this.tenant_id = tenant_id;
- this.supported_features = supported_features;
- this.endpoint_uri = endpoint_uri;
- }
-
- @JsonProperty("client-id")
- public String getClient_id() {
- return client_id;
- }
-
- @JsonProperty("client-id")
- public void setClient_id(String client_id) {
- this.client_id = client_id;
- }
-
- @JsonProperty("tenant-id")
- public String getTenant_id() {
- return tenant_id;
- }
-
- @JsonProperty("tenant-id")
- public void setTenant_id(String tenant_id) {
- this.tenant_id = tenant_id;
- }
-
- @JsonProperty("supported-features")
- public List<String> getSupported_features() {
- return supported_features;
- }
-
- @JsonProperty("supported-features")
- public void setSupported_features(List<String> supported_features) {
- this.supported_features = supported_features;
- }
-
- @JsonProperty("endpoint-uri")
- public String getEndpoint_uri() {
- return endpoint_uri;
- }
-
- @JsonProperty("endpoint-uri")
- public void setEndpoint_uri(String endpoint_uri) {
- this.endpoint_uri = endpoint_uri;
- }
-
- @JsonAnyGetter
- public Map<String, Object> getAdditionalProperties() {
- return this.additionalProperties;
- }
-
- @JsonAnySetter
- public void setAdditionalProperty(String name, Object value) {
- this.additionalProperties.put(name, value);
- }
-
- @Override
- public String toString() {
- return new ToStringBuilder(this).append("client_id", client_id).append("tenant_id", tenant_id).append("supported_features", supported_features).append("endpoint_uri", endpoint_uri).append("additionalProperties", additionalProperties).toString();
- }
-
- @Override
- public int hashCode() {
- return new HashCodeBuilder().append(additionalProperties).append(endpoint_uri).append(supported_features).append(tenant_id).append(client_id).toHashCode();
- }
-
- @Override
- public boolean equals(Object other) {
- if (other == this) {
- return true;
- }
- if ((other instanceof ConfigureInput) == false) {
- return false;
- }
- BindClient rhs = ((BindClient) other);
- return new EqualsBuilder().append(additionalProperties, rhs.additionalProperties).append(endpoint_uri, rhs.endpoint_uri).append(supported_features, rhs.supported_features).append(tenant_id, rhs.tenant_id).append(client_id, rhs.client_id).isEquals();
- }
-
-}
diff --git a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Configure.java b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Configure.java
deleted file mode 100755
index b79600f..0000000
--- a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Configure.java
+++ /dev/null
@@ -1,81 +0,0 @@
-
-package org.onosproject.fpcagent.dto.configure;
-
-import com.fasterxml.jackson.annotation.*;
-import org.apache.commons.lang.builder.EqualsBuilder;
-import org.apache.commons.lang.builder.HashCodeBuilder;
-import org.apache.commons.lang.builder.ToStringBuilder;
-
-import java.util.HashMap;
-import java.util.Map;
-
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonPropertyOrder({
- "input"
-})
-public class Configure {
-
- @JsonProperty("input")
- private ConfigureInput configureInput;
- @JsonIgnore
- private Map<String, Object> additionalProperties = new HashMap<String, Object>();
-
- /**
- * No args constructor for use in serialization
- *
- */
- public Configure() {
- }
-
- /**
- *
- * @param configureInput
- */
- public Configure(ConfigureInput configureInput) {
- super();
- this.configureInput = configureInput;
- }
-
- @JsonProperty("input")
- public ConfigureInput getConfigureInput() {
- return configureInput;
- }
-
- @JsonProperty("input")
- public void setConfigureInput(ConfigureInput configureInput) {
- this.configureInput = configureInput;
- }
-
- @JsonAnyGetter
- public Map<String, Object> getAdditionalProperties() {
- return this.additionalProperties;
- }
-
- @JsonAnySetter
- public void setAdditionalProperty(String name, Object value) {
- this.additionalProperties.put(name, value);
- }
-
- @Override
- public String toString() {
- return new ToStringBuilder(this).append("input", configureInput).append("additionalProperties", additionalProperties).toString();
- }
-
- @Override
- public int hashCode() {
- return new HashCodeBuilder().append(configureInput).append(additionalProperties).toHashCode();
- }
-
- @Override
- public boolean equals(Object other) {
- if (other == this) {
- return true;
- }
- if ((other instanceof Configure) == false) {
- return false;
- }
- Configure rhs = ((Configure) other);
- return new EqualsBuilder().append(configureInput, rhs.configureInput).append(additionalProperties, rhs.additionalProperties).isEquals();
- }
-
-}
diff --git a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/ConfigureInput.java b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/ConfigureInput.java
deleted file mode 100755
index 919052d..0000000
--- a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/ConfigureInput.java
+++ /dev/null
@@ -1,162 +0,0 @@
-package org.onosproject.fpcagent.dto.configure;
-
-import com.fasterxml.jackson.annotation.*;
-import org.apache.commons.lang.builder.EqualsBuilder;
-import org.apache.commons.lang.builder.HashCodeBuilder;
-import org.apache.commons.lang.builder.ToStringBuilder;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonPropertyOrder({
- "op-id",
- "targets",
- "contexts",
- "client-id",
- "session-state",
- "admin-state",
- "op-type",
- "op-ref-scope"
-})
-public class ConfigureInput {
-
- @JsonProperty("op-id")
- private String op_id;
- @JsonProperty("targets")
- private List<Target> targets = null;
- @JsonProperty("contexts")
- private List<Context> contexts = null;
- @JsonProperty("client-id")
- private String client_id;
- @JsonProperty("session-state")
- private String session_state;
- @JsonProperty("admin-state")
- private String admin_state;
- @JsonProperty("op-type")
- private String op_type;
- @JsonProperty("op-ref-scope")
- private String op_ref_scope;
- @JsonIgnore
- private Map<String, Object> additionalProperties = new HashMap<String, Object>();
-
- /**
- * No args constructor for use in serialization
- */
- public ConfigureInput() {
- }
-
- @JsonProperty("op-id")
- public String getOp_id() {
- return op_id;
- }
-
- @JsonProperty("op-id")
- public void setOp_id(String op_id) {
- this.op_id = op_id;
- }
-
- @JsonProperty("targets")
- public List<Target> getTargets() {
- return targets;
- }
-
- @JsonProperty("targets")
- public void setTargets(List<Target> targets) {
- this.targets = targets;
- }
-
- @JsonProperty("contexts")
- public List<Context> getContexts() {
- return contexts;
- }
-
- @JsonProperty("contexts")
- public void setContexts(List<Context> contexts) {
- this.contexts = contexts;
- }
-
- @JsonProperty("client-id")
- public String getClient_id() {
- return client_id;
- }
-
- @JsonProperty("client-id")
- public void setClient_id(String client_id) {
- this.client_id = client_id;
- }
-
- @JsonProperty("session-state")
- public String getSession_state() {
- return session_state;
- }
-
- @JsonProperty("session-state")
- public void setSession_state(String session_state) {
- this.session_state = session_state;
- }
-
- @JsonProperty("admin-state")
- public String getAdmin_state() {
- return admin_state;
- }
-
- @JsonProperty("admin-state")
- public void setAdmin_state(String admin_state) {
- this.admin_state = admin_state;
- }
-
- @JsonProperty("op-type")
- public String getOp_type() {
- return op_type;
- }
-
- @JsonProperty("op-type")
- public void setOp_type(String op_type) {
- this.op_type = op_type;
- }
-
- @JsonProperty("op-ref-scope")
- public String getOp_ref_scope() {
- return op_ref_scope;
- }
-
- @JsonProperty("op-ref-scope")
- public void setOp_ref_scope(String op_ref_scope) {
- this.op_ref_scope = op_ref_scope;
- }
-
- @JsonAnyGetter
- public Map<String, Object> getAdditionalProperties() {
- return this.additionalProperties;
- }
-
- @JsonAnySetter
- public void setAdditionalProperty(String name, Object value) {
- this.additionalProperties.put(name, value);
- }
-
- @Override
- public String toString() {
- return new ToStringBuilder(this).append("op_id", op_id).append("targets", targets).append("contexts", contexts).append("client_id", client_id).append("session_state", session_state).append("admin_state", admin_state).append("op_type", op_type).append("op_ref_scope", op_ref_scope).append("additionalProperties", additionalProperties).toString();
- }
-
- @Override
- public int hashCode() {
- return new HashCodeBuilder().append(session_state).append(op_id).append(additionalProperties).append(admin_state).append(op_type).append(op_ref_scope).append(contexts).append(client_id).toHashCode();
- }
-
- @Override
- public boolean equals(Object other) {
- if (other == this) {
- return true;
- }
- if ((other instanceof ConfigureInput) == false) {
- return false;
- }
- ConfigureInput rhs = ((ConfigureInput) other);
- return new EqualsBuilder().append(session_state, rhs.session_state).append(op_id, rhs.op_id).append(additionalProperties, rhs.additionalProperties).append(admin_state, rhs.admin_state).append(op_type, rhs.op_type).append(op_ref_scope, rhs.op_ref_scope).append(contexts, rhs.contexts).append(client_id, rhs.client_id).isEquals();
- }
-
-}
diff --git a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Context.java b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Context.java
deleted file mode 100755
index 2dfaafa..0000000
--- a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Context.java
+++ /dev/null
@@ -1,217 +0,0 @@
-
-package org.onosproject.fpcagent.dto.configure;
-
-import com.fasterxml.jackson.annotation.*;
-import org.apache.commons.lang.builder.EqualsBuilder;
-import org.apache.commons.lang.builder.HashCodeBuilder;
-import org.apache.commons.lang.builder.ToStringBuilder;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonPropertyOrder({
- "instructions",
- "context-id",
- "dpn-group",
- "delegating-ip-prefixes",
- "ul",
- "dl",
- "dpns",
- "imsi",
- "ebi",
- "lbi"
-})
-public class Context {
-
- @JsonProperty("instructions")
- private Instructions instructions;
- @JsonProperty("context-id")
- private Integer context_id;
- @JsonProperty("dpn-group")
- private String dpn_group;
- @JsonProperty("delegating-ip-prefixes")
- private List<String> delegating_ip_prefixes = null;
- @JsonProperty("ul")
- private Ul ul;
- @JsonProperty("dl")
- private Dl dl;
- @JsonProperty("dpns")
- private List<Dpn> dpns = null;
- @JsonProperty("imsi")
- private String imsi;
- @JsonProperty("ebi")
- private String ebi;
- @JsonProperty("lbi")
- private String lbi;
- @JsonIgnore
- private Map<String, Object> additionalProperties = new HashMap<String, Object>();
-
- /**
- * No args constructor for use in serialization
- *
- */
- public Context() {
- }
-
- /**
- *
- * @param lbi
- * @param dpns
- * @param ul
- * @param dpn_group
- * @param context_id
- * @param instructions
- * @param dl
- * @param delegating_ip_prefixes
- * @param imsi
- * @param ebi
- */
- public Context(Instructions instructions, Integer context_id, String dpn_group, List<String> delegating_ip_prefixes, Ul ul, Dl dl, List<Dpn> dpns, String imsi, String ebi, String lbi) {
- super();
- this.instructions = instructions;
- this.context_id = context_id;
- this.dpn_group = dpn_group;
- this.delegating_ip_prefixes = delegating_ip_prefixes;
- this.ul = ul;
- this.dl = dl;
- this.dpns = dpns;
- this.imsi = imsi;
- this.ebi = ebi;
- this.lbi = lbi;
- }
-
- @JsonProperty("instructions")
- public Instructions getInstructions() {
- return instructions;
- }
-
- @JsonProperty("instructions")
- public void setInstructions(Instructions instructions) {
- this.instructions = instructions;
- }
-
- @JsonProperty("context-id")
- public Integer getContext_id() {
- return context_id;
- }
-
- @JsonProperty("context-id")
- public void setContext_id(Integer context_id) {
- this.context_id = context_id;
- }
-
- @JsonProperty("dpn-group")
- public String getDpn_group() {
- return dpn_group;
- }
-
- @JsonProperty("dpn-group")
- public void setDpn_group(String dpn_group) {
- this.dpn_group = dpn_group;
- }
-
- @JsonProperty("delegating-ip-prefixes")
- public List<String> getDelegating_ip_prefixes() {
- return delegating_ip_prefixes;
- }
-
- @JsonProperty("delegating-ip-prefixes")
- public void setDelegating_ip_prefixes(List<String> delegating_ip_prefixes) {
- this.delegating_ip_prefixes = delegating_ip_prefixes;
- }
-
- @JsonProperty("ul")
- public Ul getUl() {
- return ul;
- }
-
- @JsonProperty("ul")
- public void setUl(Ul ul) {
- this.ul = ul;
- }
-
- @JsonProperty("dl")
- public Dl getDl() {
- return dl;
- }
-
- @JsonProperty("dl")
- public void setDl(Dl dl) {
- this.dl = dl;
- }
-
- @JsonProperty("dpns")
- public List<Dpn> getDpns() {
- return dpns;
- }
-
- @JsonProperty("dpns")
- public void setDpns(List<Dpn> dpns) {
- this.dpns = dpns;
- }
-
- @JsonProperty("imsi")
- public String getImsi() {
- return imsi;
- }
-
- @JsonProperty("imsi")
- public void setImsi(String imsi) {
- this.imsi = imsi;
- }
-
- @JsonProperty("ebi")
- public String getEbi() {
- return ebi;
- }
-
- @JsonProperty("ebi")
- public void setEbi(String ebi) {
- this.ebi = ebi;
- }
-
- @JsonProperty("lbi")
- public String getLbi() {
- return lbi;
- }
-
- @JsonProperty("lbi")
- public void setLbi(String lbi) {
- this.lbi = lbi;
- }
-
- @JsonAnyGetter
- public Map<String, Object> getAdditionalProperties() {
- return this.additionalProperties;
- }
-
- @JsonAnySetter
- public void setAdditionalProperty(String name, Object value) {
- this.additionalProperties.put(name, value);
- }
-
- @Override
- public String toString() {
- return new ToStringBuilder(this).append("instructions", instructions).append("context_id", context_id).append("dpn_group", dpn_group).append("delegating_ip_prefixes", delegating_ip_prefixes).append("ul", ul).append("dl", dl).append("dpns", dpns).append("imsi", imsi).append("ebi", ebi).append("lbi", lbi).append("additionalProperties", additionalProperties).toString();
- }
-
- @Override
- public int hashCode() {
- return new HashCodeBuilder().append(lbi).append(dpns).append(ul).append(dpn_group).append(context_id).append(instructions).append(additionalProperties).append(dl).append(delegating_ip_prefixes).append(imsi).append(ebi).toHashCode();
- }
-
- @Override
- public boolean equals(Object other) {
- if (other == this) {
- return true;
- }
- if ((other instanceof Context) == false) {
- return false;
- }
- Context rhs = ((Context) other);
- return new EqualsBuilder().append(lbi, rhs.lbi).append(dpns, rhs.dpns).append(ul, rhs.ul).append(dpn_group, rhs.dpn_group).append(context_id, rhs.context_id).append(instructions, rhs.instructions).append(additionalProperties, rhs.additionalProperties).append(dl, rhs.dl).append(delegating_ip_prefixes, rhs.delegating_ip_prefixes).append(imsi, rhs.imsi).append(ebi, rhs.ebi).isEquals();
- }
-
-}
diff --git a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Dl.java b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Dl.java
deleted file mode 100755
index f372a5b..0000000
--- a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Dl.java
+++ /dev/null
@@ -1,130 +0,0 @@
-
-package org.onosproject.fpcagent.dto.configure;
-
-import java.util.HashMap;
-import java.util.Map;
-import com.fasterxml.jackson.annotation.JsonAnyGetter;
-import com.fasterxml.jackson.annotation.JsonAnySetter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import org.apache.commons.lang.builder.EqualsBuilder;
-import org.apache.commons.lang.builder.HashCodeBuilder;
-import org.apache.commons.lang.builder.ToStringBuilder;
-
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonPropertyOrder({
- "tunnel-local-address",
- "tunnel-remote-address",
- "mobility-tunnel-parameters",
- "dpn-parameters"
-})
-public class Dl {
-
- @JsonProperty("tunnel-local-address")
- private String tunnel_local_address;
- @JsonProperty("tunnel-remote-address")
- private String tunnel_remote_address;
- @JsonProperty("mobility-tunnel-parameters")
- private Mobility_tunnel_parameters_ mobility_tunnel_parameters;
- @JsonProperty("dpn-parameters")
- private Dpn_parameters_ dpn_parameters;
- @JsonIgnore
- private Map<String, Object> additionalProperties = new HashMap<String, Object>();
-
- /**
- * No args constructor for use in serialization
- *
- */
- public Dl() {
- }
-
- /**
- *
- * @param tunnel_remote_address
- * @param dpn_parameters
- * @param tunnel_local_address
- * @param mobility_tunnel_parameters
- */
- public Dl(String tunnel_local_address, String tunnel_remote_address, Mobility_tunnel_parameters_ mobility_tunnel_parameters, Dpn_parameters_ dpn_parameters) {
- super();
- this.tunnel_local_address = tunnel_local_address;
- this.tunnel_remote_address = tunnel_remote_address;
- this.mobility_tunnel_parameters = mobility_tunnel_parameters;
- this.dpn_parameters = dpn_parameters;
- }
-
- @JsonProperty("tunnel-local-address")
- public String getTunnel_local_address() {
- return tunnel_local_address;
- }
-
- @JsonProperty("tunnel-local-address")
- public void setTunnel_local_address(String tunnel_local_address) {
- this.tunnel_local_address = tunnel_local_address;
- }
-
- @JsonProperty("tunnel-remote-address")
- public String getTunnel_remote_address() {
- return tunnel_remote_address;
- }
-
- @JsonProperty("tunnel-remote-address")
- public void setTunnel_remote_address(String tunnel_remote_address) {
- this.tunnel_remote_address = tunnel_remote_address;
- }
-
- @JsonProperty("mobility-tunnel-parameters")
- public Mobility_tunnel_parameters_ getMobility_tunnel_parameters() {
- return mobility_tunnel_parameters;
- }
-
- @JsonProperty("mobility-tunnel-parameters")
- public void setMobility_tunnel_parameters(Mobility_tunnel_parameters_ mobility_tunnel_parameters) {
- this.mobility_tunnel_parameters = mobility_tunnel_parameters;
- }
-
- @JsonProperty("dpn-parameters")
- public Dpn_parameters_ getDpn_parameters() {
- return dpn_parameters;
- }
-
- @JsonProperty("dpn-parameters")
- public void setDpn_parameters(Dpn_parameters_ dpn_parameters) {
- this.dpn_parameters = dpn_parameters;
- }
-
- @JsonAnyGetter
- public Map<String, Object> getAdditionalProperties() {
- return this.additionalProperties;
- }
-
- @JsonAnySetter
- public void setAdditionalProperty(String name, Object value) {
- this.additionalProperties.put(name, value);
- }
-
- @Override
- public String toString() {
- return new ToStringBuilder(this).append("tunnel_local_address", tunnel_local_address).append("tunnel_remote_address", tunnel_remote_address).append("mobility_tunnel_parameters", mobility_tunnel_parameters).append("dpn_parameters", dpn_parameters).append("additionalProperties", additionalProperties).toString();
- }
-
- @Override
- public int hashCode() {
- return new HashCodeBuilder().append(tunnel_remote_address).append(dpn_parameters).append(additionalProperties).append(tunnel_local_address).append(mobility_tunnel_parameters).toHashCode();
- }
-
- @Override
- public boolean equals(Object other) {
- if (other == this) {
- return true;
- }
- if ((other instanceof Dl) == false) {
- return false;
- }
- Dl rhs = ((Dl) other);
- return new EqualsBuilder().append(tunnel_remote_address, rhs.tunnel_remote_address).append(dpn_parameters, rhs.dpn_parameters).append(additionalProperties, rhs.additionalProperties).append(tunnel_local_address, rhs.tunnel_local_address).append(mobility_tunnel_parameters, rhs.mobility_tunnel_parameters).isEquals();
- }
-
-}
diff --git a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Dpn.java b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Dpn.java
deleted file mode 100755
index 795da24..0000000
--- a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Dpn.java
+++ /dev/null
@@ -1,111 +0,0 @@
-
-package org.onosproject.fpcagent.dto.configure;
-
-import com.fasterxml.jackson.annotation.*;
-import org.apache.commons.lang.builder.EqualsBuilder;
-import org.apache.commons.lang.builder.HashCodeBuilder;
-import org.apache.commons.lang.builder.ToStringBuilder;
-
-import java.util.HashMap;
-import java.util.Map;
-
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonPropertyOrder({
- "dpn-id",
- "direction",
- "dpn-parameters"
-})
-public class Dpn {
-
- @JsonProperty("dpn-id")
- private String dpn_id;
- @JsonProperty("direction")
- private String direction;
- @JsonProperty("dpn-parameters")
- private Dpn_parameters__ dpn_parameters;
- @JsonIgnore
- private Map<String, Object> additionalProperties = new HashMap<String, Object>();
-
- /**
- * No args constructor for use in serialization
- *
- */
- public Dpn() {
- }
-
- /**
- *
- * @param dpn_parameters
- * @param direction
- * @param dpn_id
- */
- public Dpn(String dpn_id, String direction, Dpn_parameters__ dpn_parameters) {
- super();
- this.dpn_id = dpn_id;
- this.direction = direction;
- this.dpn_parameters = dpn_parameters;
- }
-
- @JsonProperty("dpn-id")
- public String getDpn_id() {
- return dpn_id;
- }
-
- @JsonProperty("dpn-id")
- public void setDpn_id(String dpn_id) {
- this.dpn_id = dpn_id;
- }
-
- @JsonProperty("direction")
- public String getDirection() {
- return direction;
- }
-
- @JsonProperty("direction")
- public void setDirection(String direction) {
- this.direction = direction;
- }
-
- @JsonProperty("dpn-parameters")
- public Dpn_parameters__ getDpn_parameters() {
- return dpn_parameters;
- }
-
- @JsonProperty("dpn-parameters")
- public void setDpn_parameters(Dpn_parameters__ dpn_parameters) {
- this.dpn_parameters = dpn_parameters;
- }
-
- @JsonAnyGetter
- public Map<String, Object> getAdditionalProperties() {
- return this.additionalProperties;
- }
-
- @JsonAnySetter
- public void setAdditionalProperty(String name, Object value) {
- this.additionalProperties.put(name, value);
- }
-
- @Override
- public String toString() {
- return new ToStringBuilder(this).append("dpn_id", dpn_id).append("direction", direction).append("dpn_parameters", dpn_parameters).append("additionalProperties", additionalProperties).toString();
- }
-
- @Override
- public int hashCode() {
- return new HashCodeBuilder().append(dpn_parameters).append(additionalProperties).append(direction).append(dpn_id).toHashCode();
- }
-
- @Override
- public boolean equals(Object other) {
- if (other == this) {
- return true;
- }
- if ((other instanceof Dpn) == false) {
- return false;
- }
- Dpn rhs = ((Dpn) other);
- return new EqualsBuilder().append(dpn_parameters, rhs.dpn_parameters).append(additionalProperties, rhs.additionalProperties).append(direction, rhs.direction).append(dpn_id, rhs.dpn_id).isEquals();
- }
-
-}
diff --git a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Dpn_parameters.java b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Dpn_parameters.java
deleted file mode 100755
index e8fea8d..0000000
--- a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Dpn_parameters.java
+++ /dev/null
@@ -1,56 +0,0 @@
-
-package org.onosproject.fpcagent.dto.configure;
-
-import java.util.HashMap;
-import java.util.Map;
-import com.fasterxml.jackson.annotation.JsonAnyGetter;
-import com.fasterxml.jackson.annotation.JsonAnySetter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import org.apache.commons.lang.builder.EqualsBuilder;
-import org.apache.commons.lang.builder.HashCodeBuilder;
-import org.apache.commons.lang.builder.ToStringBuilder;
-
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonPropertyOrder({
-
-})
-public class Dpn_parameters {
-
- @JsonIgnore
- private Map<String, Object> additionalProperties = new HashMap<String, Object>();
-
- @JsonAnyGetter
- public Map<String, Object> getAdditionalProperties() {
- return this.additionalProperties;
- }
-
- @JsonAnySetter
- public void setAdditionalProperty(String name, Object value) {
- this.additionalProperties.put(name, value);
- }
-
- @Override
- public String toString() {
- return new ToStringBuilder(this).append("additionalProperties", additionalProperties).toString();
- }
-
- @Override
- public int hashCode() {
- return new HashCodeBuilder().append(additionalProperties).toHashCode();
- }
-
- @Override
- public boolean equals(Object other) {
- if (other == this) {
- return true;
- }
- if ((other instanceof Dpn_parameters) == false) {
- return false;
- }
- Dpn_parameters rhs = ((Dpn_parameters) other);
- return new EqualsBuilder().append(additionalProperties, rhs.additionalProperties).isEquals();
- }
-
-}
diff --git a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Dpn_parameters_.java b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Dpn_parameters_.java
deleted file mode 100755
index 0e00c6f..0000000
--- a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Dpn_parameters_.java
+++ /dev/null
@@ -1,56 +0,0 @@
-
-package org.onosproject.fpcagent.dto.configure;
-
-import java.util.HashMap;
-import java.util.Map;
-import com.fasterxml.jackson.annotation.JsonAnyGetter;
-import com.fasterxml.jackson.annotation.JsonAnySetter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import org.apache.commons.lang.builder.EqualsBuilder;
-import org.apache.commons.lang.builder.HashCodeBuilder;
-import org.apache.commons.lang.builder.ToStringBuilder;
-
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonPropertyOrder({
-
-})
-public class Dpn_parameters_ {
-
- @JsonIgnore
- private Map<String, Object> additionalProperties = new HashMap<String, Object>();
-
- @JsonAnyGetter
- public Map<String, Object> getAdditionalProperties() {
- return this.additionalProperties;
- }
-
- @JsonAnySetter
- public void setAdditionalProperty(String name, Object value) {
- this.additionalProperties.put(name, value);
- }
-
- @Override
- public String toString() {
- return new ToStringBuilder(this).append("additionalProperties", additionalProperties).toString();
- }
-
- @Override
- public int hashCode() {
- return new HashCodeBuilder().append(additionalProperties).toHashCode();
- }
-
- @Override
- public boolean equals(Object other) {
- if (other == this) {
- return true;
- }
- if ((other instanceof Dpn_parameters_) == false) {
- return false;
- }
- Dpn_parameters_ rhs = ((Dpn_parameters_) other);
- return new EqualsBuilder().append(additionalProperties, rhs.additionalProperties).isEquals();
- }
-
-}
diff --git a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Dpn_parameters__.java b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Dpn_parameters__.java
deleted file mode 100755
index 009e5e8..0000000
--- a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Dpn_parameters__.java
+++ /dev/null
@@ -1,53 +0,0 @@
-
-package org.onosproject.fpcagent.dto.configure;
-
-import com.fasterxml.jackson.annotation.*;
-import org.apache.commons.lang.builder.EqualsBuilder;
-import org.apache.commons.lang.builder.HashCodeBuilder;
-import org.apache.commons.lang.builder.ToStringBuilder;
-
-import java.util.HashMap;
-import java.util.Map;
-
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonPropertyOrder({
-
-})
-public class Dpn_parameters__ {
-
- @JsonIgnore
- private Map<String, Object> additionalProperties = new HashMap<String, Object>();
-
- @JsonAnyGetter
- public Map<String, Object> getAdditionalProperties() {
- return this.additionalProperties;
- }
-
- @JsonAnySetter
- public void setAdditionalProperty(String name, Object value) {
- this.additionalProperties.put(name, value);
- }
-
- @Override
- public String toString() {
- return new ToStringBuilder(this).append("additionalProperties", additionalProperties).toString();
- }
-
- @Override
- public int hashCode() {
- return new HashCodeBuilder().append(additionalProperties).toHashCode();
- }
-
- @Override
- public boolean equals(Object other) {
- if (other == this) {
- return true;
- }
- if ((other instanceof Dpn_parameters__) == false) {
- return false;
- }
- Dpn_parameters__ rhs = ((Dpn_parameters__) other);
- return new EqualsBuilder().append(additionalProperties, rhs.additionalProperties).isEquals();
- }
-
-}
diff --git a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Instructions.java b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Instructions.java
deleted file mode 100755
index 043755d..0000000
--- a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Instructions.java
+++ /dev/null
@@ -1,85 +0,0 @@
-
-package org.onosproject.fpcagent.dto.configure;
-
-import java.util.HashMap;
-import java.util.Map;
-import com.fasterxml.jackson.annotation.JsonAnyGetter;
-import com.fasterxml.jackson.annotation.JsonAnySetter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import org.apache.commons.lang.builder.EqualsBuilder;
-import org.apache.commons.lang.builder.HashCodeBuilder;
-import org.apache.commons.lang.builder.ToStringBuilder;
-
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonPropertyOrder({
- "instr-3gpp-mob"
-})
-public class Instructions {
-
- @JsonProperty("instr-3gpp-mob")
- private String instr_3gpp_mob;
- @JsonIgnore
- private Map<String, Object> additionalProperties = new HashMap<String, Object>();
-
- /**
- * No args constructor for use in serialization
- *
- */
- public Instructions() {
- }
-
- /**
- *
- * @param instr_3gpp_mob
- */
- public Instructions(String instr_3gpp_mob) {
- super();
- this.instr_3gpp_mob = instr_3gpp_mob;
- }
-
- @JsonProperty("instr-3gpp-mob")
- public String getInstr_3gpp_mob() {
- return instr_3gpp_mob;
- }
-
- @JsonProperty("instr-3gpp-mob")
- public void setInstr_3gpp_mob(String instr_3gpp_mob) {
- this.instr_3gpp_mob = instr_3gpp_mob;
- }
-
- @JsonAnyGetter
- public Map<String, Object> getAdditionalProperties() {
- return this.additionalProperties;
- }
-
- @JsonAnySetter
- public void setAdditionalProperty(String name, Object value) {
- this.additionalProperties.put(name, value);
- }
-
- @Override
- public String toString() {
- return new ToStringBuilder(this).append("instr_3gpp_mob", instr_3gpp_mob).append("additionalProperties", additionalProperties).toString();
- }
-
- @Override
- public int hashCode() {
- return new HashCodeBuilder().append(additionalProperties).append(instr_3gpp_mob).toHashCode();
- }
-
- @Override
- public boolean equals(Object other) {
- if (other == this) {
- return true;
- }
- if ((other instanceof Instructions) == false) {
- return false;
- }
- Instructions rhs = ((Instructions) other);
- return new EqualsBuilder().append(additionalProperties, rhs.additionalProperties).append(instr_3gpp_mob, rhs.instr_3gpp_mob).isEquals();
- }
-
-}
diff --git a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Mobility_tunnel_parameters.java b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Mobility_tunnel_parameters.java
deleted file mode 100755
index d58f547..0000000
--- a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Mobility_tunnel_parameters.java
+++ /dev/null
@@ -1,96 +0,0 @@
-
-package org.onosproject.fpcagent.dto.configure;
-
-import com.fasterxml.jackson.annotation.*;
-import org.apache.commons.lang.builder.EqualsBuilder;
-import org.apache.commons.lang.builder.HashCodeBuilder;
-import org.apache.commons.lang.builder.ToStringBuilder;
-
-import java.util.HashMap;
-import java.util.Map;
-
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonPropertyOrder({
- "tunnel-type",
- "tunnel-identifier"
-})
-public class Mobility_tunnel_parameters {
-
- @JsonProperty("tunnel-type")
- private String tunnel_type;
- @JsonProperty("tunnel-identifier")
- private String tunnel_identifier;
- @JsonIgnore
- private Map<String, Object> additionalProperties = new HashMap<String, Object>();
-
- /**
- * No args constructor for use in serialization
- *
- */
- public Mobility_tunnel_parameters() {
- }
-
- /**
- *
- * @param tunnel_type
- * @param tunnel_identifier
- */
- public Mobility_tunnel_parameters(String tunnel_type, String tunnel_identifier) {
- super();
- this.tunnel_type = tunnel_type;
- this.tunnel_identifier = tunnel_identifier;
- }
-
- @JsonProperty("tunnel-type")
- public String getTunnel_type() {
- return tunnel_type;
- }
-
- @JsonProperty("tunnel-type")
- public void setTunnel_type(String tunnel_type) {
- this.tunnel_type = tunnel_type;
- }
-
- @JsonProperty("tunnel-identifier")
- public String getTunnel_identifier() {
- return tunnel_identifier;
- }
-
- @JsonProperty("tunnel-identifier")
- public void setTunnel_identifier(String tunnel_identifier) {
- this.tunnel_identifier = tunnel_identifier;
- }
-
- @JsonAnyGetter
- public Map<String, Object> getAdditionalProperties() {
- return this.additionalProperties;
- }
-
- @JsonAnySetter
- public void setAdditionalProperty(String name, Object value) {
- this.additionalProperties.put(name, value);
- }
-
- @Override
- public String toString() {
- return new ToStringBuilder(this).append("tunnel_type", tunnel_type).append("tunnel_identifier", tunnel_identifier).append("additionalProperties", additionalProperties).toString();
- }
-
- @Override
- public int hashCode() {
- return new HashCodeBuilder().append(additionalProperties).append(tunnel_type).append(tunnel_identifier).toHashCode();
- }
-
- @Override
- public boolean equals(Object other) {
- if (other == this) {
- return true;
- }
- if ((other instanceof Mobility_tunnel_parameters) == false) {
- return false;
- }
- Mobility_tunnel_parameters rhs = ((Mobility_tunnel_parameters) other);
- return new EqualsBuilder().append(additionalProperties, rhs.additionalProperties).append(tunnel_type, rhs.tunnel_type).append(tunnel_identifier, rhs.tunnel_identifier).isEquals();
- }
-
-}
diff --git a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Mobility_tunnel_parameters_.java b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Mobility_tunnel_parameters_.java
deleted file mode 100755
index deb615c..0000000
--- a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Mobility_tunnel_parameters_.java
+++ /dev/null
@@ -1,100 +0,0 @@
-
-package org.onosproject.fpcagent.dto.configure;
-
-import java.util.HashMap;
-import java.util.Map;
-import com.fasterxml.jackson.annotation.JsonAnyGetter;
-import com.fasterxml.jackson.annotation.JsonAnySetter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import org.apache.commons.lang.builder.EqualsBuilder;
-import org.apache.commons.lang.builder.HashCodeBuilder;
-import org.apache.commons.lang.builder.ToStringBuilder;
-
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonPropertyOrder({
- "tunnel-type",
- "tunnel-identifier"
-})
-public class Mobility_tunnel_parameters_ {
-
- @JsonProperty("tunnel-type")
- private String tunnel_type;
- @JsonProperty("tunnel-identifier")
- private String tunnel_identifier;
- @JsonIgnore
- private Map<String, Object> additionalProperties = new HashMap<String, Object>();
-
- /**
- * No args constructor for use in serialization
- *
- */
- public Mobility_tunnel_parameters_() {
- }
-
- /**
- *
- * @param tunnel_type
- * @param tunnel_identifier
- */
- public Mobility_tunnel_parameters_(String tunnel_type, String tunnel_identifier) {
- super();
- this.tunnel_type = tunnel_type;
- this.tunnel_identifier = tunnel_identifier;
- }
-
- @JsonProperty("tunnel-type")
- public String getTunnel_type() {
- return tunnel_type;
- }
-
- @JsonProperty("tunnel-type")
- public void setTunnel_type(String tunnel_type) {
- this.tunnel_type = tunnel_type;
- }
-
- @JsonProperty("tunnel-identifier")
- public String getTunnel_identifier() {
- return tunnel_identifier;
- }
-
- @JsonProperty("tunnel-identifier")
- public void setTunnel_identifier(String tunnel_identifier) {
- this.tunnel_identifier = tunnel_identifier;
- }
-
- @JsonAnyGetter
- public Map<String, Object> getAdditionalProperties() {
- return this.additionalProperties;
- }
-
- @JsonAnySetter
- public void setAdditionalProperty(String name, Object value) {
- this.additionalProperties.put(name, value);
- }
-
- @Override
- public String toString() {
- return new ToStringBuilder(this).append("tunnel_type", tunnel_type).append("tunnel_identifier", tunnel_identifier).append("additionalProperties", additionalProperties).toString();
- }
-
- @Override
- public int hashCode() {
- return new HashCodeBuilder().append(additionalProperties).append(tunnel_type).append(tunnel_identifier).toHashCode();
- }
-
- @Override
- public boolean equals(Object other) {
- if (other == this) {
- return true;
- }
- if ((other instanceof Mobility_tunnel_parameters_) == false) {
- return false;
- }
- Mobility_tunnel_parameters_ rhs = ((Mobility_tunnel_parameters_) other);
- return new EqualsBuilder().append(additionalProperties, rhs.additionalProperties).append(tunnel_type, rhs.tunnel_type).append(tunnel_identifier, rhs.tunnel_identifier).isEquals();
- }
-
-}
diff --git a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Target.java b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Target.java
deleted file mode 100755
index db67e91..0000000
--- a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Target.java
+++ /dev/null
@@ -1,81 +0,0 @@
-
-package org.onosproject.fpcagent.dto.configure;
-
-import com.fasterxml.jackson.annotation.*;
-import org.apache.commons.lang.builder.EqualsBuilder;
-import org.apache.commons.lang.builder.HashCodeBuilder;
-import org.apache.commons.lang.builder.ToStringBuilder;
-
-import java.util.HashMap;
-import java.util.Map;
-
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonPropertyOrder({
- "target"
-})
-public class Target {
-
- @JsonProperty("target")
- private String target;
- @JsonIgnore
- private Map<String, Object> additionalProperties = new HashMap<String, Object>();
-
- /**
- * No args constructor for use in serialization
- *
- */
- public Target() {
- }
-
- /**
- *
- * @param target
- */
- public Target(String target) {
- super();
- this.target = target;
- }
-
- @JsonProperty("target")
- public String getTarget() {
- return target;
- }
-
- @JsonProperty("target")
- public void setTarget(String target) {
- this.target = target;
- }
-
- @JsonAnyGetter
- public Map<String, Object> getAdditionalProperties() {
- return this.additionalProperties;
- }
-
- @JsonAnySetter
- public void setAdditionalProperty(String name, Object value) {
- this.additionalProperties.put(name, value);
- }
-
- @Override
- public String toString() {
- return new ToStringBuilder(this).append("target", target).append("additionalProperties", additionalProperties).toString();
- }
-
- @Override
- public int hashCode() {
- return new HashCodeBuilder().append(additionalProperties).append(target).toHashCode();
- }
-
- @Override
- public boolean equals(Object other) {
- if (other == this) {
- return true;
- }
- if ((other instanceof Target) == false) {
- return false;
- }
- Target rhs = ((Target) other);
- return new EqualsBuilder().append(additionalProperties, rhs.additionalProperties).append(target, rhs.target).isEquals();
- }
-
-}
diff --git a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Ul.java b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Ul.java
deleted file mode 100755
index 8f2090e..0000000
--- a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Ul.java
+++ /dev/null
@@ -1,130 +0,0 @@
-
-package org.onosproject.fpcagent.dto.configure;
-
-import java.util.HashMap;
-import java.util.Map;
-import com.fasterxml.jackson.annotation.JsonAnyGetter;
-import com.fasterxml.jackson.annotation.JsonAnySetter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import org.apache.commons.lang.builder.EqualsBuilder;
-import org.apache.commons.lang.builder.HashCodeBuilder;
-import org.apache.commons.lang.builder.ToStringBuilder;
-
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonPropertyOrder({
- "tunnel-local-address",
- "tunnel-remote-address",
- "mobility-tunnel-parameters",
- "dpn-parameters"
-})
-public class Ul {
-
- @JsonProperty("tunnel-local-address")
- private String tunnel_local_address;
- @JsonProperty("tunnel-remote-address")
- private String tunnel_remote_address;
- @JsonProperty("mobility-tunnel-parameters")
- private Mobility_tunnel_parameters mobility_tunnel_parameters;
- @JsonProperty("dpn-parameters")
- private Dpn_parameters dpn_parameters;
- @JsonIgnore
- private Map<String, Object> additionalProperties = new HashMap<String, Object>();
-
- /**
- * No args constructor for use in serialization
- *
- */
- public Ul() {
- }
-
- /**
- *
- * @param tunnel_remote_address
- * @param dpn_parameters
- * @param tunnel_local_address
- * @param mobility_tunnel_parameters
- */
- public Ul(String tunnel_local_address, String tunnel_remote_address, Mobility_tunnel_parameters mobility_tunnel_parameters, Dpn_parameters dpn_parameters) {
- super();
- this.tunnel_local_address = tunnel_local_address;
- this.tunnel_remote_address = tunnel_remote_address;
- this.mobility_tunnel_parameters = mobility_tunnel_parameters;
- this.dpn_parameters = dpn_parameters;
- }
-
- @JsonProperty("tunnel-local-address")
- public String getTunnel_local_address() {
- return tunnel_local_address;
- }
-
- @JsonProperty("tunnel-local-address")
- public void setTunnel_local_address(String tunnel_local_address) {
- this.tunnel_local_address = tunnel_local_address;
- }
-
- @JsonProperty("tunnel-remote-address")
- public String getTunnel_remote_address() {
- return tunnel_remote_address;
- }
-
- @JsonProperty("tunnel-remote-address")
- public void setTunnel_remote_address(String tunnel_remote_address) {
- this.tunnel_remote_address = tunnel_remote_address;
- }
-
- @JsonProperty("mobility-tunnel-parameters")
- public Mobility_tunnel_parameters getMobility_tunnel_parameters() {
- return mobility_tunnel_parameters;
- }
-
- @JsonProperty("mobility-tunnel-parameters")
- public void setMobility_tunnel_parameters(Mobility_tunnel_parameters mobility_tunnel_parameters) {
- this.mobility_tunnel_parameters = mobility_tunnel_parameters;
- }
-
- @JsonProperty("dpn-parameters")
- public Dpn_parameters getDpn_parameters() {
- return dpn_parameters;
- }
-
- @JsonProperty("dpn-parameters")
- public void setDpn_parameters(Dpn_parameters dpn_parameters) {
- this.dpn_parameters = dpn_parameters;
- }
-
- @JsonAnyGetter
- public Map<String, Object> getAdditionalProperties() {
- return this.additionalProperties;
- }
-
- @JsonAnySetter
- public void setAdditionalProperty(String name, Object value) {
- this.additionalProperties.put(name, value);
- }
-
- @Override
- public String toString() {
- return new ToStringBuilder(this).append("tunnel_local_address", tunnel_local_address).append("tunnel_remote_address", tunnel_remote_address).append("mobility_tunnel_parameters", mobility_tunnel_parameters).append("dpn_parameters", dpn_parameters).append("additionalProperties", additionalProperties).toString();
- }
-
- @Override
- public int hashCode() {
- return new HashCodeBuilder().append(tunnel_remote_address).append(dpn_parameters).append(additionalProperties).append(tunnel_local_address).append(mobility_tunnel_parameters).toHashCode();
- }
-
- @Override
- public boolean equals(Object other) {
- if (other == this) {
- return true;
- }
- if ((other instanceof Ul) == false) {
- return false;
- }
- Ul rhs = ((Ul) other);
- return new EqualsBuilder().append(tunnel_remote_address, rhs.tunnel_remote_address).append(dpn_parameters, rhs.dpn_parameters).append(additionalProperties, rhs.additionalProperties).append(tunnel_local_address, rhs.tunnel_local_address).append(mobility_tunnel_parameters, rhs.mobility_tunnel_parameters).isEquals();
- }
-
-}
diff --git a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/dpn/AddDpn.java b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/dpn/AddDpn.java
deleted file mode 100755
index 3c166ad..0000000
--- a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/dpn/AddDpn.java
+++ /dev/null
@@ -1,82 +0,0 @@
-
-package org.onosproject.fpcagent.dto.dpn;
-
-import com.fasterxml.jackson.annotation.*;
-import org.apache.commons.lang.builder.EqualsBuilder;
-import org.apache.commons.lang.builder.HashCodeBuilder;
-import org.apache.commons.lang.builder.ToStringBuilder;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonPropertyOrder({
- "dpns"
-})
-public class AddDpn {
-
- @JsonProperty("dpns")
- private List<Dpn> dpns = null;
- @JsonIgnore
- private Map<String, Object> additionalProperties = new HashMap<String, Object>();
-
- /**
- * No args constructor for use in serialization
- *
- */
- public AddDpn() {
- }
-
- /**
- *
- * @param dpns
- */
- public AddDpn(List<Dpn> dpns) {
- super();
- this.dpns = dpns;
- }
-
- @JsonProperty("dpns")
- public List<Dpn> getDpns() {
- return dpns;
- }
-
- @JsonProperty("dpns")
- public void setDpns(List<Dpn> dpns) {
- this.dpns = dpns;
- }
-
- @JsonAnyGetter
- public Map<String, Object> getAdditionalProperties() {
- return this.additionalProperties;
- }
-
- @JsonAnySetter
- public void setAdditionalProperty(String name, Object value) {
- this.additionalProperties.put(name, value);
- }
-
- @Override
- public String toString() {
- return new ToStringBuilder(this).append("dpns", dpns).append("additionalProperties", additionalProperties).toString();
- }
-
- @Override
- public int hashCode() {
- return new HashCodeBuilder().append(dpns).append(additionalProperties).toHashCode();
- }
-
- @Override
- public boolean equals(Object other) {
- if (other == this) {
- return true;
- }
- if ((other instanceof AddDpn) == false) {
- return false;
- }
- AddDpn rhs = ((AddDpn) other);
- return new EqualsBuilder().append(dpns, rhs.dpns).append(additionalProperties, rhs.additionalProperties).isEquals();
- }
-
-}
diff --git a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/dpn/Dpn.java b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/dpn/Dpn.java
deleted file mode 100755
index f71df67..0000000
--- a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/dpn/Dpn.java
+++ /dev/null
@@ -1,142 +0,0 @@
-
-package org.onosproject.fpcagent.dto.dpn;
-
-import com.fasterxml.jackson.annotation.*;
-import org.apache.commons.lang.builder.EqualsBuilder;
-import org.apache.commons.lang.builder.HashCodeBuilder;
-import org.apache.commons.lang.builder.ToStringBuilder;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonPropertyOrder({
- "dpn-id",
- "dpn-name",
- "dpn-groups",
- "node-id",
- "network-id"
-})
-public class Dpn {
-
- @JsonProperty("dpn-id")
- private String dpn_id;
- @JsonProperty("dpn-name")
- private String dpn_name;
- @JsonProperty("dpn-groups")
- private List<String> dpn_groups = null;
- @JsonProperty("node-id")
- private String node_id;
- @JsonProperty("network-id")
- private String network_id;
- @JsonIgnore
- private Map<String, Object> additionalProperties = new HashMap<String, Object>();
-
- /**
- * No args constructor for use in serialization
- *
- */
- public Dpn() {
- }
-
- /**
- *
- * @param dpn_name
- * @param network_id
- * @param dpn_groups
- * @param dpn_id
- * @param node_id
- */
- public Dpn(String dpn_id, String dpn_name, List<String> dpn_groups, String node_id, String network_id) {
- super();
- this.dpn_id = dpn_id;
- this.dpn_name = dpn_name;
- this.dpn_groups = dpn_groups;
- this.node_id = node_id;
- this.network_id = network_id;
- }
-
- @JsonProperty("dpn-id")
- public String getDpn_id() {
- return dpn_id;
- }
-
- @JsonProperty("dpn-id")
- public void setDpn_id(String dpn_id) {
- this.dpn_id = dpn_id;
- }
-
- @JsonProperty("dpn-name")
- public String getDpn_name() {
- return dpn_name;
- }
-
- @JsonProperty("dpn-name")
- public void setDpn_name(String dpn_name) {
- this.dpn_name = dpn_name;
- }
-
- @JsonProperty("dpn-groups")
- public List<String> getDpn_groups() {
- return dpn_groups;
- }
-
- @JsonProperty("dpn-groups")
- public void setDpn_groups(List<String> dpn_groups) {
- this.dpn_groups = dpn_groups;
- }
-
- @JsonProperty("node-id")
- public String getNode_id() {
- return node_id;
- }
-
- @JsonProperty("node-id")
- public void setNode_id(String node_id) {
- this.node_id = node_id;
- }
-
- @JsonProperty("network-id")
- public String getNetwork_id() {
- return network_id;
- }
-
- @JsonProperty("network-id")
- public void setNetwork_id(String network_id) {
- this.network_id = network_id;
- }
-
- @JsonAnyGetter
- public Map<String, Object> getAdditionalProperties() {
- return this.additionalProperties;
- }
-
- @JsonAnySetter
- public void setAdditionalProperty(String name, Object value) {
- this.additionalProperties.put(name, value);
- }
-
- @Override
- public String toString() {
- return new ToStringBuilder(this).append("dpn_id", dpn_id).append("dpn_name", dpn_name).append("dpn_groups", dpn_groups).append("node_id", node_id).append("network_id", network_id).append("additionalProperties", additionalProperties).toString();
- }
-
- @Override
- public int hashCode() {
- return new HashCodeBuilder().append(dpn_name).append(network_id).append(dpn_groups).append(additionalProperties).append(dpn_id).append(node_id).toHashCode();
- }
-
- @Override
- public boolean equals(Object other) {
- if (other == this) {
- return true;
- }
- if ((other instanceof Dpn) == false) {
- return false;
- }
- Dpn rhs = ((Dpn) other);
- return new EqualsBuilder().append(dpn_name, rhs.dpn_name).append(network_id, rhs.network_id).append(dpn_groups, rhs.dpn_groups).append(additionalProperties, rhs.additionalProperties).append(dpn_id, rhs.dpn_id).append(node_id, rhs.node_id).isEquals();
- }
-
-}
diff --git a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/helpers/DpnApi.java b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/helpers/DpnApi.java
index f50a985..4ea7b39 100644
--- a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/helpers/DpnApi.java
+++ b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/helpers/DpnApi.java
@@ -84,6 +84,7 @@
BigInteger opIdentifier,
Long sessionId
) {
+ // TODO: check if subscriber is open.
ByteBuffer bb = ByteBuffer.allocate(41)
.put(toUint8(dpn))
.put(CREATE_SESSION_TYPE)
@@ -425,6 +426,7 @@
* @return - ZMQ Topic
*/
public static Short getTopicFromNode(String Key) {
+ if (Key == null) return 1;
Short aShort = topicToNodeMap.get(Key);
return aShort != null ? aShort : (short) 1;
}
diff --git a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/rest/AppWebApplication.java b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/rest/AppWebApplication.java
deleted file mode 100644
index d4e68fc..0000000
--- a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/rest/AppWebApplication.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package org.onosproject.fpcagent.rest;
-
-import org.onlab.rest.AbstractWebApplication;
-
-import java.util.Set;
-
-/**
- * Sample REST API web application.
- */
-public class AppWebApplication extends AbstractWebApplication {
- @Override
- public Set<Class<?>> getClasses() {
- return getClasses(AppWebResource.class);
- }
-}
diff --git a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/rest/AppWebResource.java b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/rest/AppWebResource.java
deleted file mode 100644
index 12de2ed..0000000
--- a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/rest/AppWebResource.java
+++ /dev/null
@@ -1,81 +0,0 @@
-package org.onosproject.fpcagent.rest;
-
-import com.fasterxml.jackson.databind.node.ObjectNode;
-import org.apache.commons.lang.exception.ExceptionUtils;
-import org.onosproject.core.ApplicationId;
-import org.onosproject.core.CoreService;
-import org.onosproject.fpcagent.FpcService;
-import org.onosproject.fpcagent.dto.configure.Configure;
-import org.onosproject.fpcagent.dto.dpn.AddDpn;
-import org.onosproject.rest.AbstractWebResource;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import java.io.IOException;
-import java.io.InputStream;
-
-@Path("/")
-public class AppWebResource extends AbstractWebResource {
- private static final Logger log = LoggerFactory.getLogger(AppWebResource.class);
-
- protected CoreService coreService = get(CoreService.class);
- private FpcService fpcService;
-
- public AppWebResource() {
- ApplicationId appId = coreService.getAppId("org.onosproject.fpcagent");
- fpcService = get(FpcService.class);
- }
-
- @POST
- @Path("configure")
- @Consumes(MediaType.APPLICATION_JSON)
- public Response configure(InputStream stream) {
- try {
- ObjectNode node = (ObjectNode) mapper().readTree(stream);
- Configure configure = mapper().readValue(node.toString(), Configure.class);
- fpcService.configure(configure);
- } catch (IOException e) {
- log.error(ExceptionUtils.getFullStackTrace(e));
- }
- return Response.ok().build();
- }
-
- @POST
- @Path("dpns/add_dpn")
- @Consumes(MediaType.APPLICATION_JSON)
- public Response addDpn(InputStream stream) {
- try {
- ObjectNode node = (ObjectNode) mapper().readTree(stream);
- AddDpn dpns = mapper().readValue(node.toString(), AddDpn.class);
- fpcService.addDpn(dpns);
- } catch (IOException e) {
- log.error(ExceptionUtils.getFullStackTrace(e));
- }
- return Response.ok().build();
- }
-
- @DELETE
- @Path("dpns/{dpn}")
- public Response deleteDpn(@PathParam("dpn") String dpn) {
- if (dpn != null) {
- fpcService.deleteDpn(dpn);
- return Response.ok().build();
- }
- return Response.ok().build();
- }
-
- @POST
- @Path("register_client")
- @Consumes(MediaType.APPLICATION_JSON)
- public Response registerClient(InputStream stream) {
-
- return Response.ok().build();
- }
-}
diff --git a/apps/fpcagent/src/main/webapp/WEB-INF/web.xml b/apps/fpcagent/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index 92d9960..0000000
--- a/apps/fpcagent/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright 2016-present Open Networking Laboratory
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
- id="ONOS" version="2.5">
- <display-name>FPC Agent REST API</display-name>
-
- <security-constraint>
- <web-resource-collection>
- <web-resource-name>Secured</web-resource-name>
- <url-pattern>/*</url-pattern>
- </web-resource-collection>
- <auth-constraint>
- <role-name>admin</role-name>
- </auth-constraint>
- </security-constraint>
-
- <security-role>
- <role-name>admin</role-name>
- </security-role>
-
- <login-config>
- <auth-method>BASIC</auth-method>
- <realm-name>karaf</realm-name>
- </login-config>
-
- <servlet>
- <servlet-name>JAX-RS Service</servlet-name>
- <servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
- <init-param>
- <param-name>javax.ws.rs.Application</param-name>
- <param-value>org.onosproject.fpcagent.rest.AppWebApplication</param-value>
- </init-param>
- <load-on-startup>1</load-on-startup>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>JAX-RS Service</servlet-name>
- <url-pattern>/*</url-pattern>
- </servlet-mapping>
-</web-app>
\ No newline at end of file
diff --git a/models/fpcagent/BUCK b/models/fpcagent/BUCK
index 2615870..70f780a 100644
--- a/models/fpcagent/BUCK
+++ b/models/fpcagent/BUCK
@@ -1,4 +1,5 @@
COMPILE_DEPS = [
+ '//lib:CORE_DEPS',
'//models/common:onos-models-common',
]
@@ -9,6 +10,7 @@
yang_model(
app_name = 'org.onosproject.models.fpcagent',
title = 'FPC Agent YANG Models',
+ custom_registrator = True,
deps = COMPILE_DEPS,
required_apps = APPS,
)
diff --git a/models/fpcagent/pom.xml b/models/fpcagent/pom.xml
new file mode 100644
index 0000000..a82844e
--- /dev/null
+++ b/models/fpcagent/pom.xml
@@ -0,0 +1,165 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright 2017-present Open Networking Foundation
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.onosproject</groupId>
+ <artifactId>onos-models</artifactId>
+ <version>1.13.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>onos-models-fpcagent</artifactId>
+ <packaging>bundle</packaging>
+
+ <properties>
+ <onos.app.name>org.onosproject.models.fpcagent</onos.app.name>
+ </properties>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.onosproject</groupId>
+ <artifactId>onos-yang-model</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.onosproject</groupId>
+ <artifactId>onos-models-common</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.onosproject</groupId>
+ <artifactId>onos-apps-yang</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <plugins>
+
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions combine.children="append">
+ <Include-Resource>yang/resources/YangMetaData.ser=target/classes/yang/resources/YangMetaData.ser</Include-Resource>
+ </instructions>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.onosproject</groupId>
+ <artifactId>onos-yang-compiler-maven-plugin</artifactId>
+ </plugin>
+
+ <plugin>
+ <groupId>org.onosproject</groupId>
+ <artifactId>onos-maven-plugin</artifactId>
+ </plugin>
+
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <version>3.0.0</version>
+ <executions>
+ <execution>
+ <id>add-source</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>add-source</goal>
+ </goals>
+ <configuration>
+ <sources>
+ <source>${project.build.directory}/generated-sources</source>
+ </sources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-clean-plugin</artifactId>
+ <version>3.0.0</version>
+ <executions>
+ <execution>
+ <id>onos-yang-plugin-workaround</id>
+ <!-- yang plugin cannot handle non-clean compilation -->
+ <phase>initialize</phase>
+ <goals>
+ <goal>clean</goal>
+ </goals>
+ <configuration>
+ <excludeDefaultDirectories>true</excludeDefaultDirectories>
+ <filesets>
+ <fileset>
+ <directory>target/generated-sources</directory>
+ </fileset>
+ </filesets>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+
+ </plugins>
+
+ <pluginManagement>
+ <plugins>
+ <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
+ <plugin>
+ <groupId>org.eclipse.m2e</groupId>
+ <artifactId>lifecycle-mapping</artifactId>
+ <version>1.0.0</version>
+ <configuration>
+ <lifecycleMappingMetadata>
+ <pluginExecutions>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>
+ org.apache.maven.plugins
+ </groupId>
+ <artifactId>
+ maven-clean-plugin
+ </artifactId>
+ <versionRange>
+ [3.0.0,)
+ </versionRange>
+ <goals>
+ <goal>clean</goal>
+ </goals>
+ </pluginExecutionFilter>
+ <action>
+ <ignore></ignore>
+ </action>
+ </pluginExecution>
+ </pluginExecutions>
+ </lifecycleMappingMetadata>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+
+</project>
diff --git a/models/fpcagent/src/main/java/org.onosproject.models.fpcagent/FpcAgentModelRegistrator.java b/models/fpcagent/src/main/java/org.onosproject.models.fpcagent/FpcAgentModelRegistrator.java
new file mode 100644
index 0000000..64ea413
--- /dev/null
+++ b/models/fpcagent/src/main/java/org.onosproject.models.fpcagent/FpcAgentModelRegistrator.java
@@ -0,0 +1,72 @@
+/*
+ * Copyright 2017-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onosproject.models.fpcagent;
+
+import com.google.common.collect.ImmutableMap;
+import org.apache.felix.scr.annotations.Component;
+import org.onosproject.yang.AbstractYangModelRegistrator;
+import org.onosproject.yang.gen.v1.fpc.rev20150105.FpcService;
+import org.onosproject.yang.gen.v1.fpcconfig.rev20160927.FpcConfig;
+import org.onosproject.yang.gen.v1.ietfdmmfpcagent.rev20160803.IetfDmmFpcagent;
+import org.onosproject.yang.gen.v1.ietfdmmfpcbase.rev20160803.IetfDmmFpcbase;
+import org.onosproject.yang.gen.v1.ietfdmmfpcpmip.rev20160119.IetfDmmFpcPmip;
+import org.onosproject.yang.gen.v1.ietfdmmfpcpolicyext.rev20160803.IetfDmmFpcPolicyext;
+import org.onosproject.yang.gen.v1.ietfdmmthreegpp.rev20160803.IetfDmmThreegpp;
+import org.onosproject.yang.gen.v1.ietfpmipqos.rev20160210.IetfPmipQos;
+import org.onosproject.yang.gen.v1.ietftrafficselectortypes.rev20160114.IetfTrafficSelectorTypes;
+import org.onosproject.yang.model.DefaultYangModuleId;
+import org.onosproject.yang.model.YangModuleId;
+import org.onosproject.yang.runtime.AppModuleInfo;
+import org.onosproject.yang.runtime.DefaultAppModuleInfo;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.HashMap;
+import java.util.Map;
+
+@Component(immediate = true)
+public class FpcAgentModelRegistrator extends AbstractYangModelRegistrator {
+ static final Logger log = LoggerFactory.getLogger(FpcAgentModelRegistrator.class);
+
+ public FpcAgentModelRegistrator() {
+ super(FpcAgentModelRegistrator.class, getAppInfo());
+ }
+
+ private static Map<YangModuleId, AppModuleInfo> getAppInfo() {
+ Map<YangModuleId, AppModuleInfo> appInfo = new HashMap<>();
+ appInfo.put(new DefaultYangModuleId("ietf-dmm-fpcagent", "2016-08-03"),
+ new DefaultAppModuleInfo(IetfDmmFpcagent.class, null));
+ appInfo.put(new DefaultYangModuleId("ietf-dmm-fpcbase", "2016-08-03"),
+ new DefaultAppModuleInfo(IetfDmmFpcbase.class, null));
+ appInfo.put(new DefaultYangModuleId("fpc", "2015-01-05"),
+ new DefaultAppModuleInfo(FpcService.class, null));
+ appInfo.put(new DefaultYangModuleId("fpc-config", "2016-09-27"),
+ new DefaultAppModuleInfo(FpcConfig.class, null));
+ appInfo.put(new DefaultYangModuleId("ietf-dmm-fpc-pmip", "2016-01-19"),
+ new DefaultAppModuleInfo(IetfDmmFpcPmip.class, null));
+ appInfo.put(new DefaultYangModuleId("ietf-dmm-fpc-policyext", "2016-08-03"),
+ new DefaultAppModuleInfo(IetfDmmFpcPolicyext.class, null));
+ appInfo.put(new DefaultYangModuleId("ietf-dmm-threegpp", "2016-08-03"),
+ new DefaultAppModuleInfo(IetfDmmThreegpp.class, null));
+ appInfo.put(new DefaultYangModuleId("ietf-pmip-qos", "2016-02-10"),
+ new DefaultAppModuleInfo(IetfPmipQos.class, null));
+ appInfo.put(new DefaultYangModuleId("ietf-traffic-selector-types", "2016-01-14"),
+ new DefaultAppModuleInfo(IetfTrafficSelectorTypes.class, null));
+
+ return ImmutableMap.copyOf(appInfo);
+ }
+}
diff --git a/models/fpcagent/src/main/java/org.onosproject.models.fpcagent/package-info.java b/models/fpcagent/src/main/java/org.onosproject.models.fpcagent/package-info.java
new file mode 100644
index 0000000..3a46d78
--- /dev/null
+++ b/models/fpcagent/src/main/java/org.onosproject.models.fpcagent/package-info.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2017-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * FPC Agent YANG models.
+ */
+package org.onosproject.models.fpcagent;
\ No newline at end of file
diff --git a/models/fpcagent/src/main/yang/ietf-dmm-fpcagent.yang b/models/fpcagent/src/main/yang/ietf-dmm-fpcagent.yang
index 1b1ddd6..1e5a7fc 100644
--- a/models/fpcagent/src/main/yang/ietf-dmm-fpcagent.yang
+++ b/models/fpcagent/src/main/yang/ietf-dmm-fpcagent.yang
@@ -415,8 +415,7 @@
grouping result-body-dpn {
leaf result {
- type result;
- }
+ type result; }
choice result-type {
case err {
leaf error-type-id {
diff --git a/modules.defs b/modules.defs
new file mode 100644
index 0000000..ad0e561
--- /dev/null
+++ b/modules.defs
@@ -0,0 +1,275 @@
+UTILS = [
+ '//utils/osgi:onlab-osgi',
+ '//utils/junit:onlab-junit',
+ '//utils/misc:onlab-misc',
+ '//utils/rest:onlab-rest',
+ '//tools/build/conf:onos-build-conf',
+]
+
+API = [
+ '//core/api:onos-api',
+ '//incubator/api:onos-incubator-api',
+]
+
+CORE = UTILS + API + [
+ '//core/net:onos-core-net',
+ '//core/common:onos-core-common',
+ '//core/store/primitives:onos-core-primitives',
+ '//core/store/serializers:onos-core-serializers',
+ '//core/store/dist:onos-core-dist',
+ '//core/security:onos-security',
+ '//core/store/persistence:onos-core-persistence',
+
+ '//incubator/net:onos-incubator-net',
+ '//incubator/store:onos-incubator-store',
+ '//incubator/rpc:onos-incubator-rpc',
+
+ '//cli:onos-cli',
+
+ '//protocols/rest/api:onos-protocols-rest-api',
+ '//protocols/rest/ctl:onos-protocols-rest-ctl',
+ '//protocols/bgp/bgpio:onos-protocols-bgp-bgpio',
+ '//protocols/bgp/api:onos-protocols-bgp-api',
+ '//protocols/bgp/ctl:onos-protocols-bgp-ctl',
+ '//protocols/netconf/api:onos-protocols-netconf-api',
+ '//protocols/netconf/ctl:onos-protocols-netconf-ctl',
+ '//protocols/openflow/api:onos-protocols-openflow-api',
+ '//protocols/openflow/ctl:onos-protocols-openflow-ctl',
+ '//protocols/ospf/api:onos-protocols-ospf-api',
+ '//protocols/ospf/protocol:onos-protocols-ospf-protocol',
+ '//protocols/ospf/ctl:onos-protocols-ospf-ctl',
+ '//protocols/ovsdb/rfc:onos-protocols-ovsdb-rfc',
+ '//protocols/ovsdb/api:onos-protocols-ovsdb-api',
+ '//protocols/ovsdb/ctl:onos-protocols-ovsdb-ctl',
+ '//protocols/pcep/pcepio:onos-protocols-pcep-pcepio',
+ '//protocols/pcep/server/api:onos-protocols-pcep-server-api',
+ '//protocols/pcep/server/ctl:onos-protocols-pcep-server-ctl',
+ '//protocols/snmp/api:onos-protocols-snmp-api',
+ '//protocols/snmp/ctl:onos-protocols-snmp-ctl',
+ '//protocols/isis/api:onos-protocols-isis-api',
+ '//protocols/isis/ctl:onos-protocols-isis-ctl',
+ '//protocols/isis/isisio:onos-protocols-isis-isisio',
+ '//protocols/lisp/api:onos-protocols-lisp-api',
+ '//protocols/lisp/ctl:onos-protocols-lisp-ctl',
+ '//protocols/lisp/msg:onos-protocols-lisp-msg',
+ '//protocols/tl1/api:onos-protocols-tl1-api',
+ '//protocols/tl1/ctl:onos-protocols-tl1-ctl',
+ '//protocols/restconf/client/api:onos-protocols-restconf-client-api',
+ '//protocols/restconf/client/ctl:onos-protocols-restconf-client-ctl',
+
+ '//drivers/utilities:onos-drivers-utilities',
+
+ '//providers/netconf/device:onos-providers-netconf-device',
+ '//providers/openflow/device:onos-providers-openflow-device',
+ '//providers/openflow/packet:onos-providers-openflow-packet',
+ '//providers/openflow/flow:onos-providers-openflow-flow',
+ '//providers/openflow/group:onos-providers-openflow-group',
+ '//providers/openflow/meter:onos-providers-openflow-meter',
+ '//providers/ovsdb/device:onos-providers-ovsdb-device',
+ '//providers/ovsdb/tunnel:onos-providers-ovsdb-tunnel',
+ '//providers/rest/device:onos-providers-rest-device',
+ '//providers/snmp/device:onos-providers-snmp-device',
+ '//providers/isis/cfg:onos-providers-isis-cfg',
+ '//providers/isis/topology:onos-providers-isis-topology',
+ '//providers/lisp/device:onos-providers-lisp-device',
+ '//providers/tl1/device:onos-providers-tl1-device',
+ '//providers/general/device:onos-providers-general-device',
+ '//providers/p4runtime/packet:onos-providers-p4runtime-packet',
+
+ '//web/api:onos-rest',
+ '//web/gui:onos-gui',
+
+ '//incubator/protobuf/models:onos-incubator-protobuf-models',
+ '//incubator/protobuf/services/nb:onos-incubator-protobuf-services-nb',
+]
+
+ONOS_DRIVERS = [
+ # Drivers
+ '//drivers/default:onos-drivers-default-oar',
+ '//drivers/arista:onos-drivers-arista-oar',
+ # TODO ONOS-5554 excluding from the build
+ #'//drivers/bti:onos-drivers-bti-oar',
+ '//drivers/ciena:onos-drivers-ciena-oar',
+ '//drivers/cisco/netconf:onos-drivers-cisco-netconf-oar',
+ '//drivers/cisco/rest:onos-drivers-cisco-rest-oar',
+ '//drivers/corsa:onos-drivers-corsa-oar',
+ '//drivers/fujitsu:onos-drivers-fujitsu-oar',
+ '//drivers/lumentum:onos-drivers-lumentum-oar',
+ '//drivers/netconf:onos-drivers-netconf-oar',
+ '//drivers/optical:onos-drivers-optical-oar',
+ '//drivers/ovsdb:onos-drivers-ovsdb-oar',
+ '//drivers/juniper:onos-drivers-juniper-oar',
+ '//drivers/lisp:onos-drivers-lisp-oar',
+ '//drivers/flowspec:onos-drivers-flowspec-oar',
+ '//drivers/huawei:onos-drivers-huawei-oar',
+ '//drivers/microsemi:onos-drivers-microsemi-oar',
+ '//drivers/oplink:onos-drivers-oplink-oar',
+ '//drivers/bmv2:onos-drivers-bmv2-oar',
+ '//drivers/barefoot:onos-drivers-barefoot-oar',
+ '//drivers/hp:onos-drivers-hp-oar',
+ '//drivers/p4runtime:onos-drivers-p4runtime-oar',
+ '//drivers/polatis/netconf:onos-drivers-polatis-netconf-oar',
+]
+
+ONOS_PROVIDERS = [
+ # Providers
+ '//providers/bgp:onos-providers-bgp-oar',
+ '//providers/bgpcep:onos-providers-bgpcep-oar',
+ '//providers/host:onos-providers-host-oar',
+ '//providers/lldp:onos-providers-lldp-oar',
+ '//providers/netcfghost:onos-providers-netcfghost-oar',
+ '//providers/netcfglinks:onos-providers-netcfglinks-oar',
+ '//providers/netconf:onos-providers-netconf-oar',
+ '//providers/openflow/message:onos-providers-openflow-message-oar',
+ '//providers/ovsdb:onos-providers-ovsdb-oar',
+ '//providers/ovsdb/host:onos-providers-ovsdb-host-oar',
+ '//providers/ovsdb/base:onos-providers-ovsdb-base-oar',
+ '//providers/pcep:onos-providers-pcep-oar',
+ '//providers/null:onos-providers-null-oar',
+ '//providers/openflow/base:onos-providers-openflow-base-oar',
+ '//providers/openflow/app:onos-providers-openflow-app-oar',
+ '//providers/rest:onos-providers-rest-oar',
+ '//providers/isis:onos-providers-isis-oar',
+ '//providers/snmp:onos-providers-snmp-oar',
+ '//providers/link:onos-providers-link-oar',
+ '//providers/lisp:onos-providers-lisp-oar',
+ '//providers/tl1:onos-providers-tl1-oar',
+ '//providers/general:onos-providers-general-oar',
+ '//providers/p4runtime:onos-providers-p4runtime-oar',
+# '//providers/ietfte:onos-providers-ietfte-oar',
+]
+
+ONOS_APPS = [
+ # Apps
+ '//apps/dhcp:onos-apps-dhcp-oar',
+ '//apps/dhcprelay:onos-apps-dhcprelay-oar',
+ '//apps/fwd:onos-apps-fwd-oar',
+ '//apps/packet-stats:onos-apps-packet-stats-oar',
+ '//apps/acl:onos-apps-acl-oar',
+ '//apps/bgprouter:onos-apps-bgprouter-oar',
+ '//apps/cip:onos-apps-cip-oar',
+ '//apps/drivermatrix:onos-apps-drivermatrix-oar',
+ '//apps/events:onos-apps-events-oar',
+ '//apps/proxyarp:onos-apps-proxyarp-oar',
+ '//apps/segmentrouting:onos-apps-segmentrouting-oar',
+ '//apps/gangliametrics:onos-apps-gangliametrics-oar',
+ '//apps/graphitemetrics:onos-apps-graphitemetrics-oar',
+ '//apps/flowanalyzer:onos-apps-flowanalyzer-oar',
+ '//apps/intentsync:onos-apps-intentsync-oar',
+ '//apps/influxdbmetrics:onos-apps-influxdbmetrics-oar',
+ '//apps/metrics:onos-apps-metrics-oar',
+ '//apps/mfwd:onos-apps-mfwd-oar',
+ '//apps/mlb:onos-apps-mlb-oar',
+ '//apps/openstacknetworking:onos-apps-openstacknetworking-oar',
+ '//apps/mobility:onos-apps-mobility-oar',
+ '//apps/newoptical:onos-apps-newoptical-oar',
+ '//apps/optical-model:onos-apps-optical-model-oar',
+ '//apps/optical-rest:onos-apps-optical-rest-oar',
+ '//apps/pathpainter:onos-apps-pathpainter-oar',
+ '//apps/pcep-api:onos-apps-pcep-api-oar',
+ '//apps/pim:onos-apps-pim-oar',
+ '//apps/linkprops:onos-apps-linkprops-oar',
+ '//apps/reactive-routing:onos-apps-reactive-routing-oar',
+ '//apps/roadm:onos-apps-roadm-oar',
+ '//apps/sdnip:onos-apps-sdnip-oar',
+ '//apps/test/demo:onos-apps-test-demo-oar',
+ '//apps/test/distributed-primitives:onos-apps-test-distributed-primitives-oar',
+ '//apps/test/election:onos-apps-test-election-oar',
+ '//apps/test/flow-perf:onos-apps-test-flow-perf-oar',
+ '//apps/test/intent-perf:onos-apps-test-intent-perf-oar',
+ '//apps/test/loadtest:onos-apps-test-loadtest-oar',
+ '//apps/test/netcfg-monitor:onos-apps-test-netcfg-monitor-oar',
+ '//apps/test/messaging-perf:onos-apps-test-messaging-perf-oar',
+ '//apps/test/primitive-perf:onos-apps-test-primitive-perf-oar',
+ '//apps/test/transaction-perf:onos-apps-test-transaction-perf-oar',
+ '//apps/virtualbng:onos-apps-virtualbng-oar',
+ '//apps/vpls:onos-apps-vpls-oar',
+ '//apps/vrouter:onos-apps-vrouter-oar',
+ '//apps/routing/fibinstaller:onos-apps-routing-fibinstaller-oar',
+ '//apps/routing/cpr:onos-apps-routing-cpr-oar',
+ '//apps/routing/fpm:onos-apps-routing-fpm-oar',
+ '//apps/vtn:onos-apps-vtn-oar',
+ '//apps/faultmanagement:onos-apps-faultmanagement-oar',
+ '//apps/openstacknode:onos-apps-openstacknode-oar',
+ '//apps/cpman/app:onos-apps-cpman-app-oar',
+ '//apps/scalablegateway:onos-apps-scalablegateway-oar',
+ '//apps/castor:onos-apps-castor-oar',
+# '//apps/yms:onos-apps-yms-oar',
+ '//apps/ofagent:onos-apps-ofagent-oar',
+ '//apps/mappingmanagement:onos-apps-mappingmanagement-oar',
+ '//apps/config:onos-apps-config-oar',
+ '//apps/configsync:onos-apps-configsync-oar',
+ '//apps/configsync-netconf:onos-apps-configsync-netconf-oar',
+ '//apps/netconf/client:onos-apps-netconf-client-oar',
+ '//apps/tetopology:onos-apps-tetopology-oar',
+ '//apps/tetunnel:onos-apps-tetunnel-oar',
+# '//apps/tenbi/yangmodel:onos-apps-tenbi-yangmodel-feature',
+# '//apps/tenbi:onos-apps-tenbi-oar',
+ '//protocols/restconf/server:onos-protocols-restconf-server-oar',
+ '//apps/restconf:onos-apps-restconf-oar',
+ '//apps/flowspec-api:onos-apps-flowspec-api-oar',
+ '//apps/yang:onos-apps-yang-oar',
+ '//apps/yang-gui:onos-apps-yang-gui-oar',
+ '//apps/cord-support:onos-apps-cord-support-oar',
+ '//apps/network-troubleshoot:onos-apps-network-troubleshoot-oar',
+ '//apps/l3vpn:onos-apps-l3vpn-oar',
+ '//apps/openroadm:onos-apps-openroadm-oar',
+ '//apps/artemis:onos-apps-artemis-oar',
+ '//apps/pi-demo/ecmp:onos-apps-pi-demo-ecmp-oar',
+ '//apps/gluon:onos-apps-gluon-oar',
+ '//apps/evpnopenflow:onos-apps-evpnopenflow-oar',
+ '//apps/route-service:onos-apps-route-service-oar',
+ '//apps/evpn-route-service:onos-apps-evpn-route-service-oar',
+ '//incubator/protobuf/registry:onos-incubator-protobuf-registry-oar',
+ '//incubator/protobuf/services/nb:onos-incubator-protobuf-services-nb-oar',
+ '//apps/openstacknetworkingui:onos-apps-openstacknetworkingui-oar',
+ '//apps/p4-tutorial/pipeconf:onos-apps-p4-tutorial-pipeconf-oar',
+ '//apps/p4-tutorial/icmpdropper:onos-apps-p4-tutorial-icmpdropper-oar',
+ '//apps/cfm:onos-apps-cfm-oar',
+ '//apps/routeradvertisement:onos-apps-routeradvertisement-oar',
+ '//apps/powermanagement:onos-apps-powermanagement-oar',
+ '//apps/t3:onos-apps-t3-oar',
+ '//apps/fpcagent:onos-apps-fpcagent-oar',
+]
+
+PROTOCOL_APPS = [
+ '//protocols/grpc:onos-protocols-grpc-oar',
+ '//protocols/p4runtime:onos-protocols-p4runtime-oar',
+]
+
+MODELS = [
+ '//models/common:onos-models-common-oar',
+ '//models/huawei:onos-models-huawei-oar',
+ '//models/openconfig:onos-models-openconfig-oar',
+ '//models/openroadm:onos-models-openroadm-oar',
+ '//models/tapi:onos-models-tapi-oar',
+ '//models/l3vpn:onos-models-l3vpn-oar',
+ '//models/microsemi:onos-models-microsemi-oar',
+ '//models/polatis:onos-models-polatis-oar',
+ '//models/fpcagent:onos-models-fpcagent-oar',
+]
+
+PIPELINES = [
+ '//pipelines/basic:onos-pipelines-basic-oar',
+ '//pipelines/fabric:onos-pipelines-fabric-oar',
+]
+
+APP_JARS = [
+ '//apps/cpman/api:onos-apps-cpman-api',
+ '//apps/routing-api:onos-apps-routing-api',
+ '//apps/dhcp/api:onos-apps-dhcp-api',
+ '//apps/dhcp/app:onos-apps-dhcp-app',
+ '//apps/dhcprelay:onos-apps-dhcprelay',
+ '//apps/fwd:onos-apps-fwd',
+ '//apps/iptopology-api:onos-apps-iptopology-api',
+ '//apps/routing/common:onos-apps-routing-common',
+ '//apps/vtn/vtnrsc:onos-apps-vtn-vtnrsc',
+ '//apps/vtn/sfcmgr:onos-apps-vtn-sfcmgr',
+ '//apps/vtn/vtnmgr:onos-apps-vtn-vtnmgr',
+ '//apps/vtn/vtnweb:onos-apps-vtn-vtnweb',
+# '//apps/p4runtime-test:onos-apps-p4runtime-test',
+]
+
+APPS = ONOS_DRIVERS + ONOS_PROVIDERS + ONOS_APPS + MODELS + PIPELINES \
+ + PROTOCOL_APPS
+
diff --git a/scripts/addDPN.sh b/scripts/addDPN.sh
new file mode 100644
index 0000000..00f0609
--- /dev/null
+++ b/scripts/addDPN.sh
@@ -0,0 +1,13 @@
+curl -i --header "Content-type: application/json" --request POST -u onos:rocks --data '{
+ "dpns": [
+ {
+ "dpn-id": "dpn1",
+ "dpn-name": "site1-anchor1",
+ "dpn-groups": [
+ "foo"
+ ],
+ "node-id": "node1",
+ "network-id": "network1"
+ }
+ ]
+}' http://localhost:8181/onos/restconf/data/ietf-dmm-fpcagent:tenants/tenant=default/fpc-topology
\ No newline at end of file
diff --git a/scripts/createRPC.sh b/scripts/createRPC.sh
new file mode 100644
index 0000000..dc2fb9e
--- /dev/null
+++ b/scripts/createRPC.sh
@@ -0,0 +1,51 @@
+#!/bin/bash
+curl -X POST --header 'Content-Type: application/json' -u onos:rocks --header 'Accept: application/json' -d '{
+ "input": {
+ "admin-state": "enabled",
+ "client-id": "1",
+ "contexts": [
+ {
+ "context-id": 202374885,
+ "delegating-ip-prefixes": [
+ "192.168.1.5/32"
+ ],
+ "dl": {
+ "dpn-parameters": {},
+ "mobility-tunnel-parameters": {
+ "tunnel-identifier": "2222",
+ "tunnel-type": "gtpv1"
+ },
+ "tunnel-local-address": "192.168.1.1",
+ "tunnel-remote-address": "10.1.1.1"
+ },
+ "dpn-group": "foo",
+ "dpns": [
+ {
+ "direction": "uplink",
+ "dpn-id": "1",
+ "dpn-parameters": {}
+ }
+ ],
+ "ebi": "5",
+ "imsi": "9135551234",
+ "instructions": {
+ "instr-3gpp-mob": "session uplink"
+ },
+ "lbi": "5",
+ "ul": {
+ "dpn-parameters": {},
+ "mobility-tunnel-parameters": {
+ "tunnel-identifier": "1111",
+ "tunnel-type": "gtpv1"
+ },
+ "tunnel-local-address": "192.168.1.1",
+ "tunnel-remote-address": "10.1.1.1"
+ }
+ }
+ ],
+ "op-id": "1",
+ "op-ref-scope": "op",
+ "op-type": "create",
+ "session-state": "complete"
+ }
+}' 'http://localhost:8181/onos/restconf/operations/ietf-dmm-fpcagent:configure'
diff --git a/scripts/deleteDPN.sh b/scripts/deleteDPN.sh
new file mode 100644
index 0000000..570da07
--- /dev/null
+++ b/scripts/deleteDPN.sh
@@ -0,0 +1,2 @@
+#!/bin/bash
+curl -X DELETE -u onos:rocks 'http://localhost:8181/onos/restconf/data/ietf-dmm-fpcagent:tenants/tenant=default/fpc-topology/dpns=dpn1'
\ No newline at end of file
diff --git a/scripts/deleteRPC.sh b/scripts/deleteRPC.sh
new file mode 100644
index 0000000..d2f49ce
--- /dev/null
+++ b/scripts/deleteRPC.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+curl -X POST --header 'Content-Type: application/json' -u onos:rocks --header 'Accept: application/json' -d '{
+ "input": {
+ "op-id": "3",
+ "targets": [
+ {
+ "target": "/ietf-dmm-fpcagent:tenants/tenant/default/fpc-mobility/contexts/202374885"
+ }
+ ],
+ "client-id": "1",
+ "session-state": "complete",
+ "admin-state": "enabled",
+ "op-type": "delete",
+ "op-ref-scope": "none"
+ }
+}' 'http://localhost:8181/onos/restconf/operations/ietf-dmm-fpcagent:configure'
diff --git a/scripts/getTenants.sh b/scripts/getTenants.sh
new file mode 100644
index 0000000..bf4b6e1
--- /dev/null
+++ b/scripts/getTenants.sh
@@ -0,0 +1,2 @@
+#!/bin/bash
+curl -u onos:rocks http://localhost:8181/onos/restconf/data/ietf-dmm-fpcagent:tenants
\ No newline at end of file