todos;
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 3447f83..1f8a96f 100644
--- a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/FpcManager.java
+++ b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/FpcManager.java
@@ -98,6 +98,7 @@
/* Variables */
private FpcConfig fpcConfig;
private ConcurrentMap<ClientIdentifier, DefaultRegisterClientInput> clientInfo = Maps.newConcurrentMap();
+ private boolean started = false;
/* Config */
private ConfigFactory<ApplicationId, FpcConfig> fpcConfigConfigFactory =
@@ -125,9 +126,10 @@
configService.removeListener(configListener);
registry.unregisterConfigFactory(fpcConfigConfigFactory);
- // TODO check if null before closing
- ZMQSBSubscriberManager.getInstance().close();
- ZMQSBPublisherManager.getInstance().close();
+ if (started) {
+ ZMQSBSubscriberManager.getInstance().close();
+ ZMQSBPublisherManager.getInstance().close();
+ }
rpcRegistry.unregisterRpcService(this);
@@ -142,6 +144,7 @@
private void init() {
fpcConfig.getConfig().ifPresent(
helper -> {
+ started = true;
ZMQSBSubscriberManager.createInstance(
helper.dpnSubscriberUri(),
helper.zmqBroadcastAll(),
@@ -317,6 +320,7 @@
@Override
public RpcOutput eventRegister(RpcInput rpcInput) {
Stopwatch timer = Stopwatch.createStarted();
+ // TODO implement
log.debug("Time Elapsed {} ms", timer.stop().elapsed(TimeUnit.MILLISECONDS));
return null;
}
@@ -324,6 +328,7 @@
@Override
public RpcOutput eventDeregister(RpcInput rpcInput) {
Stopwatch timer = Stopwatch.createStarted();
+ // TODO implement
log.debug("Time Elapsed {} ms", timer.stop().elapsed(TimeUnit.MILLISECONDS));
return null;
}
@@ -331,6 +336,7 @@
@Override
public RpcOutput probe(RpcInput rpcInput) {
Stopwatch timer = Stopwatch.createStarted();
+ // TODO implement
log.debug("Time Elapsed {} ms", timer.stop().elapsed(TimeUnit.MILLISECONDS));
return null;
}
@@ -354,7 +360,7 @@
registerClientOutput.supportsAckModel(input.supportsAckModel());
registerClientOutput.tenantId(input.tenantId());
-// tenantService.createNode();
+ // TODO create node to DCS
}
} catch (Exception e) {
// if there is an exception respond with an error.
@@ -389,6 +395,8 @@
DefaultConnections defaultConnections = new DefaultConnections();
defaultConnections.clientId(input.clientId().toString());
+
+ // TODO delete node from DCS
}
} catch (Exception e) {
// if there is an exception respond with an error.
diff --git a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/TenantManager.java b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/TenantManager.java
index 19b0960..77bfc4a 100644
--- a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/TenantManager.java
+++ b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/TenantManager.java
@@ -154,16 +154,6 @@
.findFirst();
}
- public Optional<DefaultTenant> getDefaultTenant() {
- Filter filter = Filter.builder().build();
- DataNode dataNode = dynamicConfigService.readNode(defaultTenant, filter);
-
- return getModelObjects(dataNode, tenants)
- .stream()
- .map(modelObject -> (DefaultTenant) modelObject)
- .findFirst();
- }
-
@Override
public Optional<DefaultTenant> getTenant(ClientIdentifier clientId) {
return Optional.empty();