- fix NPE issue in NbiNotificationsHandler
- fix message issue in PceNotificationHandler of service handler
- add small delay in functional test execution to let the notification
being sent in kafka broker
- fix issue when uninstalling the feature (publisher sessions with
kafka server remained open)
JIRA: TRNSPRTPCE-790
Signed-off-by: Gilles Thouenon <gilles.thouenon@orange.com>
Change-Id: I914f3c2313e17ec25b36633ef8af26ff8f8394bf
*/
package org.opendaylight.transportpce.nbinotifications.impl;
*/
package org.opendaylight.transportpce.nbinotifications.impl;
-import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.List;
import java.util.Map;
import java.util.Optional;
}
private static final Logger LOG = LoggerFactory.getLogger(NbiNotificationsProvider.class);
}
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;
private Registration listenerRegistration;
private Registration rpcRegistration;
private NetworkTransactionService networkTransactionService;
}
JsonStringConverter<NotificationTapiService> converterTapiService =
new JsonStringConverter<>(bindingDOMCodecServices);
}
JsonStringConverter<NotificationTapiService> converterTapiService =
new JsonStringConverter<>(bindingDOMCodecServices);
- LOG.info("baozhi tapi converter: {}", converterTapiService);
+ LOG.info("tapi converter: {}", converterTapiService);
topicManager.setTapiConverter(converterTapiService);
rpcRegistration = rpcProviderService.registerRpcImplementations(
topicManager.setTapiConverter(converterTapiService);
rpcRegistration = rpcProviderService.registerRpcImplementations(
listenerRegistration = notificationService.registerCompositeListener(
notificationsListener.getCompositeListener());
topicManager.setNbiNotificationsListener(notificationsListener);
listenerRegistration = notificationService.registerCompositeListener(
notificationsListener.getCompositeListener());
topicManager.setNbiNotificationsListener(notificationsListener);
+ publishersServiceMap = topicManager.getProcessTopicMap();
+ publishersAlarmMap = topicManager.getAlarmTopicMap();
LOG.info("NbiNotificationsProvider Session Initiated");
}
LOG.info("NbiNotificationsProvider Session Initiated");
}
.setServiceName(notification.getServiceName())
.setServiceZEnd(notification.getServiceZEnd());
.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());
// 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());
sendNbiNotification(
nbiNotificationBuilder
.setResponseFailed("")
sendNbiNotification(
nbiNotificationBuilder
.setResponseFailed("")
- .setMessage("{} Service deleted !")
+ .setMessage("Service deleted !")
.setOperationalState(State.Degraded)
.build());
} else {
.setOperationalState(State.Degraded)
.build());
} else {
"administrative-state": "outOfService",
"port-qual": "roadm-external"
}))
"administrative-state": "outOfService",
"port-qual": "roadm-external"
}))
def test_19_get_notifications_alarm_service1(self):
response = test_utils.transportpce_api_rpc_request(
def test_19_get_notifications_alarm_service1(self):
response = test_utils.transportpce_api_rpc_request(
"administrative-state": "inService",
"port-qual": "roadm-external"
}))
"administrative-state": "inService",
"port-qual": "roadm-external"
}))
def test_21_get_notifications_alarm_service1(self):
self.test_17_get_notifications_alarm_service1()
def test_21_get_notifications_alarm_service1(self):
self.test_17_get_notifications_alarm_service1()