use of org.opendaylight.infrautils.diagstatus.ServiceDescriptor in project infrautils by opendaylight.
the class DiagStatusIT method testDiagStatusPushModel.
@Test
public void testDiagStatusPushModel() {
String testService1 = "testService";
diagStatusService.register(testService1);
// Verify if "testService" got registered with STARTING state.
ServiceDescriptor serviceDescriptor = diagStatusService.getServiceDescriptor(testService1);
Assert.assertEquals(serviceDescriptor.getServiceState(), ServiceState.STARTING);
// Verify if "testService" status is updated as OPERATIONAL.
diagStatusService.report(new ServiceDescriptor(testService1, ServiceState.OPERATIONAL, "service is UP"));
serviceDescriptor = diagStatusService.getServiceDescriptor(testService1);
Assert.assertEquals(serviceDescriptor.getServiceState(), ServiceState.OPERATIONAL);
}
use of org.opendaylight.infrautils.diagstatus.ServiceDescriptor in project genius by opendaylight.
the class ItmDiagStatusProvider method close.
@PreDestroy
public void close() {
serviceDescriptor = new ServiceDescriptor(ITMConstants.ITM_SERVICE_NAME, ServiceState.UNREGISTERED, "Service Closed");
diagStatusService.report(serviceDescriptor);
}
use of org.opendaylight.infrautils.diagstatus.ServiceDescriptor in project genius by opendaylight.
the class IfmDiagStatusProvider method close.
@PreDestroy
public void close() {
serviceDescriptor = new ServiceDescriptor(IfmConstants.INTERFACE_SERVICE_NAME, ServiceState.UNREGISTERED, "Service Closed");
diagStatusService.report(serviceDescriptor);
}
use of org.opendaylight.infrautils.diagstatus.ServiceDescriptor in project genius by opendaylight.
the class DatastoreServiceStatusProvider method close.
@PreDestroy
public void close() {
serviceDescriptor = new ServiceDescriptor(DATASTORE_SERVICE_NAME, ServiceState.UNREGISTERED, "Service Closed");
diagStatusService.report(serviceDescriptor);
}
use of org.opendaylight.infrautils.diagstatus.ServiceDescriptor in project netvirt by opendaylight.
the class ElanDiagStatusProvider method close.
@PreDestroy
public void close() {
serviceDescriptor = new ServiceDescriptor(ElanConstants.ELAN_SERVICE_NAME, ServiceState.UNREGISTERED, "Service Closed");
diagStatusService.report(serviceDescriptor);
}
Aggregations