*/
package org.opendaylight.transportpce.nbinotifications.impl;
-import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
}
private static final Logger LOG = LoggerFactory.getLogger(NbiNotificationsProvider.class);
- private static Map<String, Publisher<NotificationProcessService>> publishersServiceMap = new HashMap<>();
- private static Map<String, Publisher<NotificationAlarmService>> publishersAlarmMap = new HashMap<>();
+ private Map<String, Publisher<NotificationProcessService>> publishersServiceMap;
+ private Map<String, Publisher<NotificationAlarmService>> publishersAlarmMap;
private Registration listenerRegistration;
private Registration rpcRegistration;
private NetworkTransactionService networkTransactionService;
}
JsonStringConverter<NotificationTapiService> converterTapiService =
new JsonStringConverter<>(bindingDOMCodecServices);
- LOG.info("baozhi tapi converter: {}", converterTapiService);
+ LOG.info("tapi converter: {}", converterTapiService);
topicManager.setTapiConverter(converterTapiService);
rpcRegistration = rpcProviderService.registerRpcImplementations(
listenerRegistration = notificationService.registerCompositeListener(
notificationsListener.getCompositeListener());
topicManager.setNbiNotificationsListener(notificationsListener);
+ publishersServiceMap = topicManager.getProcessTopicMap();
+ publishersAlarmMap = topicManager.getAlarmTopicMap();
LOG.info("NbiNotificationsProvider Session Initiated");
}
.setServiceName(notification.getServiceName())
.setServiceZEnd(notification.getServiceZEnd());
- if (notification.getIsTempService()) {
+ if (notification.getIsTempService() == null || !notification.getIsTempService()) {
+ publisher.sendEvent(notificationProcessServiceBuilder
+ .build(), notification.getConnectionType().getName());
+ } else {
// A-to-Z and Z-to-A containers are only needed for temp-service-create notification
publisher.sendEvent(notificationProcessServiceBuilder
.setAToZ(notification.getAToZ())
.setZToA(notification.getZToA())
.build(), notification.getConnectionType().getName());
- } else {
- publisher.sendEvent(notificationProcessServiceBuilder
- .build(), notification.getConnectionType().getName());
}
}
"administrative-state": "outOfService",
"port-qual": "roadm-external"
}))
+ time.sleep(5)
def test_19_get_notifications_alarm_service1(self):
response = test_utils.transportpce_api_rpc_request(
"administrative-state": "inService",
"port-qual": "roadm-external"
}))
+ time.sleep(5)
def test_21_get_notifications_alarm_service1(self):
self.test_17_get_notifications_alarm_service1()