import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.notification.rev221121.notification.context.NotifSubscription;
import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.notification.rev221121.notification.context.NotifSubscriptionBuilder;
import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.notification.rev221121.notification.context.NotifSubscriptionKey;
+import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.notification.rev221121.notification.context.Notification;
+import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.notification.rev221121.notification.context.NotificationKey;
import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.notification.rev221121.notification.subscription.service.SubscriptionFilter;
import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.notification.rev221121.notification.subscription.service.SubscriptionFilterBuilder;
-import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.notification.rev221121.notification.subscription.service.SubscriptionFilterKey;
import org.opendaylight.yangtools.yang.common.ErrorType;
import org.opendaylight.yangtools.yang.common.RpcResult;
import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
@Override
public ListenableFuture<RpcResult<CreateNotificationSubscriptionServiceOutput>> invoke(
CreateNotificationSubscriptionServiceInput input) {
- for (Uuid uuid:input.getSubscriptionFilter().getRequestedObjectIdentifier()) {
+ for (Uuid uuid : input.getSubscriptionFilter().getRequestedObjectIdentifier()) {
LOG.info("Adding T-API topic: {} to Kafka server", uuid.getValue());
this.topicManager.addTapiTopic(uuid.getValue());
}
+ Uuid notifSubscriptionUuid = new Uuid(UUID.randomUUID().toString());
SubscriptionFilter subscriptionFilter = new SubscriptionFilterBuilder()
.setName(input.getSubscriptionFilter().getName())
.setLocalId(input.getSubscriptionFilter().getLocalId())
.setRequestedObjectIdentifier(input.getSubscriptionFilter().getRequestedObjectIdentifier())
.setRequestedObjectTypes(input.getSubscriptionFilter().getRequestedObjectTypes())
.build();
- Uuid notifSubscriptionUuid = new Uuid(UUID.randomUUID().toString());
- Map<SubscriptionFilterKey, SubscriptionFilter> sfmap = new HashMap<>();
- sfmap.put(subscriptionFilter.key(), subscriptionFilter);
SubscriptionService subscriptionService = new SubscriptionServiceBuilder()
- .setSubscriptionFilter(sfmap)
- .setSubscriptionState(input.getSubscriptionState())
.setUuid(notifSubscriptionUuid)
+ .setSubscriptionFilter(new HashMap<>(Map.of(subscriptionFilter.key(), subscriptionFilter)))
+ .setSubscriptionState(input.getSubscriptionState())
.build();
-
- NotifSubscriptionKey notifSubscriptionKey = new NotifSubscriptionKey(notifSubscriptionUuid);
- NotifSubscription notifSubscription = new NotifSubscriptionBuilder()
- .setSubscriptionState(subscriptionService.getSubscriptionState())
- .setSubscriptionFilter(subscriptionService.getSubscriptionFilter())
- .setUuid(notifSubscriptionUuid)
+ Map<NotifSubscriptionKey, NotifSubscription> notifSubscriptions = new HashMap<>(Map.of(
+ new NotifSubscriptionKey(notifSubscriptionUuid),
+ new NotifSubscriptionBuilder()
+ .setSubscriptionState(subscriptionService.getSubscriptionState())
+ .setSubscriptionFilter(subscriptionService.getSubscriptionFilter())
+ .setUuid(notifSubscriptionUuid)
// Following 2 items are no more in notification-context with T-API 2.4
-// .setSupportedNotificationTypes(notificationTypes)
-// .setSupportedObjectTypes(objectTypes)
- .setName(subscriptionService.getName())
- .build();
+// .setSupportedNotificationTypes(notificationTypes)
+// .setSupportedObjectTypes(objectTypes)
+ .setName(subscriptionService.getName())
+ .build()));
+ Map<NotificationKey, Notification> notifications;
NotificationContext notificationContext = nbiNotifications.getNotificationContext();
- Map<NotifSubscriptionKey, NotifSubscription> notifSubscriptions = new HashMap<>();
- if (notificationContext != null && notificationContext.getNotifSubscription() != null) {
- notifSubscriptions.putAll(notificationContext.getNotifSubscription());
+ if (notificationContext == null) {
+ notifications = new HashMap<>();
+ } else {
+ notifications = notificationContext.getNotification();
+ var subsc = notificationContext.getNotifSubscription();
+ if (subsc != null) {
+ notifSubscriptions.putAll(subsc);
+ }
}
- notifSubscriptions.put(notifSubscriptionKey, notifSubscription);
- NotificationContext notificationContext1 = new NotificationContextBuilder()
- .setNotification(notificationContext == null ? new HashMap<>() : notificationContext.getNotification())
- .setNotifSubscription(notifSubscriptions)
- .build();
- if (!nbiNotifications.updateNotificationContext(notificationContext1)) {
- LOG.error("Failed to update Notification context");
- return RpcResultBuilder.<CreateNotificationSubscriptionServiceOutput>failed()
- .withError(ErrorType.RPC, "Failed to update notification context").buildFuture();
+ if (nbiNotifications.updateNotificationContext(
+ new NotificationContextBuilder()
+ .setNotification(notifications)
+ .setNotifSubscription(notifSubscriptions)
+ .build())) {
+ return RpcResultBuilder
+ .success(
+ new CreateNotificationSubscriptionServiceOutputBuilder()
+ .setSubscriptionService(subscriptionService)
+ .build())
+ .buildFuture();
}
- CreateNotificationSubscriptionServiceOutput serviceOutput =
- new CreateNotificationSubscriptionServiceOutputBuilder()
- .setSubscriptionService(subscriptionService)
- .build();
- return RpcResultBuilder.success(serviceOutput).buildFuture();
+ LOG.error("Failed to update Notification context");
+ return RpcResultBuilder.<CreateNotificationSubscriptionServiceOutput>failed()
+ .withError(ErrorType.RPC, "Failed to update notification context")
+ .buildFuture();
}
-
}
private final NetworkTransactionService networkTransactionService;
private final TopicManager topicManager;
- public DeleteNotificationSubscriptionServiceImpl(NetworkTransactionService networkTransactionService,
- TopicManager topicManager) {
+ public DeleteNotificationSubscriptionServiceImpl(
+ NetworkTransactionService networkTransactionService, TopicManager topicManager) {
this.networkTransactionService = networkTransactionService;
this.topicManager = topicManager;
}
if (input == null || input.getUuid() == null) {
LOG.warn("Missing mandatory params for input {}", input);
return RpcResultBuilder.<DeleteNotificationSubscriptionServiceOutput>failed()
- .withError(ErrorType.RPC, "Missing input parameters").buildFuture();
+ .withError(ErrorType.RPC, "Missing input parameters")
+ .buildFuture();
}
Uuid notifSubsUuid = input.getUuid();
InstanceIdentifier<NotifSubscription> notifSubscriptionIID = InstanceIdentifier.builder(Context.class)
- .augmentation(Context1.class).child(NotificationContext.class).child(NotifSubscription.class,
- new NotifSubscriptionKey(notifSubsUuid)).build();
- Optional<NotifSubscription> optionalNotifSub = this.networkTransactionService.read(
- LogicalDatastoreType.OPERATIONAL, notifSubscriptionIID).get();
-
+ .augmentation(Context1.class)
+ .child(NotificationContext.class)
+ .child(NotifSubscription.class, new NotifSubscriptionKey(notifSubsUuid))
+ .build();
+ Optional<NotifSubscription> optionalNotifSub = this.networkTransactionService
+ .read(LogicalDatastoreType.OPERATIONAL, notifSubscriptionIID)
+ .get();
if (optionalNotifSub.isEmpty()) {
return RpcResultBuilder.<DeleteNotificationSubscriptionServiceOutput>failed()
- .withError(ErrorType.APPLICATION,
- "Notification subscription doesnt exist").buildFuture();
+ .withError(ErrorType.APPLICATION, "Notification subscription doesnt exist")
+ .buildFuture();
}
NotifSubscription notifSubscription = optionalNotifSub.orElseThrow();
this.networkTransactionService.delete(LogicalDatastoreType.OPERATIONAL, notifSubscriptionIID);
this.networkTransactionService.commit().get();
- for (Map.Entry<SubscriptionFilterKey, SubscriptionFilter> sfEntry : notifSubscription
- .getSubscriptionFilter().entrySet()) {
+ for (Map.Entry<SubscriptionFilterKey, SubscriptionFilter> sfEntry :
+ notifSubscription.getSubscriptionFilter().entrySet()) {
for (Uuid objectUuid:sfEntry.getValue().getRequestedObjectIdentifier()) {
this.topicManager.deleteTapiTopic(objectUuid.getValue());
}
}
-// for (Uuid objectUuid:notifSubscription.getSubscriptionFilter().getRequestedObjectIdentifier()) {
-// this.topicManager.deleteTapiTopic(objectUuid.getValue());
-// }
- return RpcResultBuilder.success(new DeleteNotificationSubscriptionServiceOutputBuilder().build())
+ return RpcResultBuilder
+ .success(new DeleteNotificationSubscriptionServiceOutputBuilder().build())
.buildFuture();
} catch (InterruptedException | ExecutionException | NoSuchElementException e) {
LOG.error("Failed to delete Notification subscription service", e);
}
return RpcResultBuilder.<DeleteNotificationSubscriptionServiceOutput>failed()
- .withError(ErrorType.APPLICATION,
- "Failed to delete notification subscription service").buildFuture();
+ .withError(ErrorType.APPLICATION, "Failed to delete notification subscription service")
+ .buildFuture();
}
-
}
LOG.info("RPC getNotificationList received");
if (input == null || input.getSubscriptionId() == null) {
LOG.warn("Missing mandatory params for input {}", input);
- return RpcResultBuilder.<GetNotificationListOutput>failed().withError(ErrorType.RPC,
- "Missing input parameters").buildFuture();
+ return RpcResultBuilder.<GetNotificationListOutput>failed()
+ .withError(ErrorType.RPC, "Missing input parameters")
+ .buildFuture();
}
Uuid notifSubsUuid = input.getSubscriptionId();
- InstanceIdentifier<NotifSubscription> notifSubscriptionIID = InstanceIdentifier.builder(Context.class)
- .augmentation(Context1.class).child(NotificationContext.class).child(NotifSubscription.class,
- new NotifSubscriptionKey(notifSubsUuid)).build();
- Optional<NotifSubscription> optionalNotifSub = this.networkTransactionService.read(
- LogicalDatastoreType.OPERATIONAL, notifSubscriptionIID).get();
-
+ Optional<NotifSubscription> optionalNotifSub = this.networkTransactionService
+ .read(
+ LogicalDatastoreType.OPERATIONAL,
+ InstanceIdentifier.builder(Context.class).augmentation(Context1.class)
+ .child(NotificationContext.class)
+ .child(NotifSubscription.class, new NotifSubscriptionKey(notifSubsUuid))
+ .build())
+ .get();
if (optionalNotifSub.isEmpty()) {
return RpcResultBuilder.<GetNotificationListOutput>failed()
- .withError(ErrorType.APPLICATION,
- "Notification subscription doesnt exist").buildFuture();
+ .withError(ErrorType.APPLICATION, "Notification subscription doesnt exist")
+ .buildFuture();
}
NotifSubscription notifSubscription = optionalNotifSub.orElseThrow();
List<Notification> notificationTapiList = new ArrayList<>();
- for (Map.Entry<SubscriptionFilterKey, SubscriptionFilter> sfEntry : notifSubscription
- .getSubscriptionFilter().entrySet()) {
+ for (Map.Entry<SubscriptionFilterKey, SubscriptionFilter> sfEntry :
+ notifSubscription.getSubscriptionFilter().entrySet()) {
for (Uuid objectUuid:sfEntry.getValue().getRequestedObjectIdentifier()) {
if (!this.topicManager.getTapiTopicMap().containsKey(objectUuid.getValue())) {
LOG.warn("Topic doesnt exist for {}", objectUuid.getValue());
notificationTapiList.addAll(subscriber.subscribe(objectUuid.getValue(), Notification.QNAME));
}
}
-// for (Uuid objectUuid:notifSubscription.getSubscriptionFilter().getRequestedObjectIdentifier()) {
-// if (!this.topicManager.getTapiTopicMap().containsKey(objectUuid.getValue())) {
-// LOG.warn("Topic doesnt exist for {}", objectUuid.getValue());
-// continue;
-// }
-// LOG.info("Going to get notifications for topic {}", objectUuid.getValue());
-// Subscriber<NotificationTapiService, Notification> subscriber = new Subscriber<>(
-// objectUuid.getValue(), objectUuid.getValue(), server, converterTapiService,
-// TapiNotificationDeserializer.class);
-// notificationTapiList.addAll(subscriber.subscribe(objectUuid.getValue(), Notification.QNAME));
-// }
LOG.info("TAPI notifications = {}", notificationTapiList);
Map<NotificationKey, Notification> notificationMap = new HashMap<>();
for (Notification notif:notificationTapiList) {
notificationMap.put(notif.key(), notif);
}
- return RpcResultBuilder.success(new GetNotificationListOutputBuilder()
- .setNotification(notificationMap).build()).buildFuture();
+ return RpcResultBuilder
+ .success(new GetNotificationListOutputBuilder().setNotification(notificationMap).build())
+ .buildFuture();
} catch (InterruptedException | ExecutionException | NoSuchElementException e) {
LOG.error("Failed to get Notifications from Kafka", e);
}
return RpcResultBuilder.<GetNotificationListOutput>failed()
- .withError(ErrorType.APPLICATION,
- "Notifications couldnt be retrieved from Kafka server").buildFuture();
+ .withError(ErrorType.APPLICATION, "Notifications couldnt be retrieved from Kafka server")
+ .buildFuture();
}
}
import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.notification.rev221121.GetNotificationSubscriptionServiceDetailsOutput;
import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.notification.rev221121.GetNotificationSubscriptionServiceDetailsOutputBuilder;
import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.notification.rev221121.context.NotificationContext;
+import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.notification.rev221121.get.notification.subscription.service.details.output.SubscriptionServiceBuilder;
import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.notification.rev221121.notification.context.NotifSubscriptionKey;
import org.opendaylight.yangtools.yang.common.ErrorType;
import org.opendaylight.yangtools.yang.common.RpcResult;
if (input == null || input.getUuid() == null) {
LOG.warn("Missing mandatory params for input {}", input);
return RpcResultBuilder.<GetNotificationSubscriptionServiceDetailsOutput>failed()
- .withError(ErrorType.RPC, "Missing input parameters").buildFuture();
+ .withError(ErrorType.RPC, "Missing input parameters")
+ .buildFuture();
}
Uuid notifSubsUuid = input.getUuid();
NotificationContext notificationContext = nbiNotifications.getNotificationContext();
.withError(ErrorType.APPLICATION, "Notification context is empty")
.buildFuture();
}
- if (notificationContext.getNotifSubscription() == null) {
- return RpcResultBuilder.success(new GetNotificationSubscriptionServiceDetailsOutputBuilder()
- .setSubscriptionService(new org.opendaylight.yang.gen.v1
- .urn.onf.otcc.yang.tapi.notification.rev221121.get.notification.subscription.service
- .details.output.SubscriptionServiceBuilder().build()).build()).buildFuture();
+ var subsc = notificationContext.getNotifSubscription();
+ if (subsc == null) {
+ return RpcResultBuilder
+ .success(
+ new GetNotificationSubscriptionServiceDetailsOutputBuilder()
+ .setSubscriptionService(new SubscriptionServiceBuilder().build())
+ .build())
+ .buildFuture();
}
- if (!notificationContext.getNotifSubscription().containsKey(new NotifSubscriptionKey(notifSubsUuid))) {
- return RpcResultBuilder.<GetNotificationSubscriptionServiceDetailsOutput>failed()
- .withError(ErrorType.APPLICATION,
- "Notification subscription service doesnt exist").buildFuture();
+ if (subsc.containsKey(new NotifSubscriptionKey(notifSubsUuid))) {
+ return RpcResultBuilder
+ .success(
+ new GetNotificationSubscriptionServiceDetailsOutputBuilder()
+ .setSubscriptionService(
+ new SubscriptionServiceBuilder(subsc.get(new NotifSubscriptionKey(notifSubsUuid))).build())
+ .build())
+ .buildFuture();
}
- return RpcResultBuilder.success(new GetNotificationSubscriptionServiceDetailsOutputBuilder()
- .setSubscriptionService(new org.opendaylight.yang.gen.v1.urn
- .onf.otcc.yang.tapi.notification.rev221121.get.notification.subscription.service.details.output
- .SubscriptionServiceBuilder(notificationContext.getNotifSubscription().get(
- new NotifSubscriptionKey(notifSubsUuid))).build()).build()).buildFuture();
+ return RpcResultBuilder.<GetNotificationSubscriptionServiceDetailsOutput>failed()
+ .withError(ErrorType.APPLICATION, "Notification subscription service doesnt exist")
+ .buildFuture();
+
}
}
import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.notification.rev221121.GetNotificationSubscriptionServiceListOutput;
import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.notification.rev221121.GetNotificationSubscriptionServiceListOutputBuilder;
import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.notification.rev221121.context.NotificationContext;
+import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.notification.rev221121.get.notification.subscription.service.list.output.SubscriptionService;
+import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.notification.rev221121.get.notification.subscription.service.list.output.SubscriptionServiceBuilder;
import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.notification.rev221121.get.notification.subscription.service.list.output.SubscriptionServiceKey;
import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.notification.rev221121.notification.context.NotifSubscription;
import org.opendaylight.yangtools.yang.common.ErrorType;
.buildFuture();
}
if (notificationContext.getNotifSubscription() == null) {
- return RpcResultBuilder.success(new GetNotificationSubscriptionServiceListOutputBuilder()
- .setSubscriptionService(new HashMap<>()).build()).buildFuture();
+ return RpcResultBuilder
+ .success(new GetNotificationSubscriptionServiceListOutputBuilder()
+ .setSubscriptionService(new HashMap<>())
+ .build())
+ .buildFuture();
}
- Map<SubscriptionServiceKey, org.opendaylight.yang.gen.v1.urn.onf.otcc.yang
- .tapi.notification.rev221121.get.notification.subscription.service.list.output.SubscriptionService>
- notifSubsMap = new HashMap<>();
+ Map<SubscriptionServiceKey, SubscriptionService> notifSubsMap = new HashMap<>();
for (NotifSubscription notifSubscription:notificationContext.getNotifSubscription().values()) {
- org.opendaylight.yang.gen.v1.urn.onf.otcc.yang
- .tapi.notification.rev221121.get.notification.subscription.service.list.output.SubscriptionService
- subscriptionService = new org.opendaylight.yang.gen.v1
- .urn.onf.otcc.yang.tapi.notification.rev221121.get.notification.subscription.service
- .list.output.SubscriptionServiceBuilder(notifSubscription).build();
+ SubscriptionService subscriptionService = new SubscriptionServiceBuilder(notifSubscription).build();
notifSubsMap.put(subscriptionService.key(), subscriptionService);
}
- return RpcResultBuilder.success(new GetNotificationSubscriptionServiceListOutputBuilder()
- .setSubscriptionService(notifSubsMap).build()).buildFuture();
+ return RpcResultBuilder
+ .success(
+ new GetNotificationSubscriptionServiceListOutputBuilder().setSubscriptionService(notifSubsMap).build())
+ .buildFuture();
}
}
package org.opendaylight.transportpce.nbinotifications.impl.rpc;
import com.google.common.util.concurrent.ListenableFuture;
-import java.util.List;
import org.opendaylight.transportpce.common.converter.JsonStringConverter;
import org.opendaylight.transportpce.nbinotifications.consumer.Subscriber;
import org.opendaylight.transportpce.nbinotifications.serialization.NotificationAlarmServiceDeserializer;
LOG.warn("Missing mandatory params for input {}", input);
return RpcResultBuilder.success(new GetNotificationsAlarmServiceOutputBuilder().build()).buildFuture();
}
- Subscriber<NotificationAlarmService, NotificationsAlarmService> subscriber = new Subscriber<>(
- input.getIdConsumer(), input.getGroupId(), server, converterAlarmService,
- NotificationAlarmServiceDeserializer.class);
- List<NotificationsAlarmService> notificationAlarmServiceList = subscriber
- .subscribe("alarm" + input.getConnectionType().getName(), NotificationsAlarmService.QNAME);
- return RpcResultBuilder.success(new GetNotificationsAlarmServiceOutputBuilder()
- .setNotificationsAlarmService(notificationAlarmServiceList).build()).buildFuture();
+ return RpcResultBuilder
+ .success(new GetNotificationsAlarmServiceOutputBuilder()
+ .setNotificationsAlarmService(
+ new Subscriber<NotificationAlarmService, NotificationsAlarmService>(
+ input.getIdConsumer(), input.getGroupId(), server, converterAlarmService,
+ NotificationAlarmServiceDeserializer.class)
+ .subscribe("alarm" + input.getConnectionType().getName(), NotificationsAlarmService.QNAME))
+ .build())
+ .buildFuture();
}
}
package org.opendaylight.transportpce.nbinotifications.impl.rpc;
import com.google.common.util.concurrent.ListenableFuture;
-import java.util.List;
import org.opendaylight.transportpce.common.converter.JsonStringConverter;
import org.opendaylight.transportpce.nbinotifications.consumer.Subscriber;
import org.opendaylight.transportpce.nbinotifications.serialization.NotificationServiceDeserializer;
LOG.warn("Missing mandatory params for input {}", input);
return RpcResultBuilder.success(new GetNotificationsProcessServiceOutputBuilder().build()).buildFuture();
}
- Subscriber<NotificationProcessService, NotificationsProcessService> subscriber = new Subscriber<>(
- input.getIdConsumer(), input.getGroupId(), server, converterService,
- NotificationServiceDeserializer.class);
- List<NotificationsProcessService> notificationServiceList = subscriber
- .subscribe(input.getConnectionType().getName(), NotificationsProcessService.QNAME);
- return RpcResultBuilder.success(new GetNotificationsProcessServiceOutputBuilder()
- .setNotificationsProcessService(notificationServiceList).build()).buildFuture();
+ return RpcResultBuilder
+ .success(
+ new GetNotificationsProcessServiceOutputBuilder()
+ .setNotificationsProcessService(
+ new Subscriber<NotificationProcessService, NotificationsProcessService>(
+ input.getIdConsumer(), input.getGroupId(), server, converterService,
+ NotificationServiceDeserializer.class)
+ .subscribe(input.getConnectionType().getName(), NotificationsProcessService.QNAME))
+ .build())
+ .buildFuture();
}
-
}
@Test
void getNotificationsServiceEmptyDataTest() throws InterruptedException, ExecutionException {
ListenableFuture<RpcResult<GetNotificationsProcessServiceOutput>> result =
- new GetNotificationsProcessServiceImpl(converterProcess, "localhost:8080").invoke(
- new GetNotificationsProcessServiceInputBuilder().build());
+ new GetNotificationsProcessServiceImpl(converterProcess, "localhost:8080")
+ .invoke(new GetNotificationsProcessServiceInputBuilder().build());
assertNull(result.get().getResult().getNotificationsProcessService(), "Should be null");
}
@Test
void getNotificationsServiceTest() throws InterruptedException, ExecutionException {
ListenableFuture<RpcResult<GetNotificationsProcessServiceOutput>> result =
- new GetNotificationsProcessServiceImpl(converterProcess, "localhost:8080")
- .invoke(new GetNotificationsProcessServiceInputBuilder()
+ new GetNotificationsProcessServiceImpl(converterProcess, "localhost:8080")
+ .invoke(new GetNotificationsProcessServiceInputBuilder()
.setGroupId("groupId")
.setIdConsumer("consumerId")
.setConnectionType(ConnectionType.Service)
@Test
void getNotificationsAlarmServiceTest() throws InterruptedException, ExecutionException {
ListenableFuture<RpcResult<GetNotificationsAlarmServiceOutput>> result =
- new GetNotificationsAlarmServiceImpl(converterAlarm, "localhost:8080")
- .invoke(new GetNotificationsAlarmServiceInputBuilder()
+ new GetNotificationsAlarmServiceImpl(converterAlarm, "localhost:8080")
+ .invoke(new GetNotificationsAlarmServiceInputBuilder()
.setGroupId("groupId")
.setIdConsumer("consumerId")
.setConnectionType(ConnectionType.Service)
@Test
void createTapiNotificationSubscriptionServiceTest() throws InterruptedException, ExecutionException {
ListenableFuture<RpcResult<CreateNotificationSubscriptionServiceOutput>> result =
- new CreateNotificationSubscriptionServiceImpl(nbiNotifications, topicManager)
- .invoke(NotificationServiceDataUtils.buildNotificationSubscriptionServiceInputBuilder().build());
+ new CreateNotificationSubscriptionServiceImpl(nbiNotifications, topicManager)
+ .invoke(NotificationServiceDataUtils.buildNotificationSubscriptionServiceInputBuilder().build());
assertNotNull(result.get().getResult().getSubscriptionService().getUuid().toString(),
"Should receive UUID for subscription service");
}
new CreateNotificationSubscriptionServiceImpl(nbiNotifications, topicManager)
.invoke(NotificationServiceDataUtils.buildNotificationSubscriptionServiceInputBuilder().build());
ListenableFuture<RpcResult<GetNotificationListOutput>> result2 =
- new GetNotificationListImpl(converterTapi, "localhost:8080", networkTransactionService, topicManager)
- .invoke(new GetNotificationListInputBuilder()
+ new GetNotificationListImpl(converterTapi, "localhost:8080", networkTransactionService, topicManager)
+ .invoke(new GetNotificationListInputBuilder()
.setTimeRange(null)
.setSubscriptionId(result.get().getResult().getSubscriptionService().getUuid())
.build());