Skip to content
This repository has been archived by the owner on Jul 13, 2020. It is now read-only.

Commit

Permalink
add "showSvcStatus" CLI command (#29)
Browse files Browse the repository at this point in the history
requires https://git.opendaylight.org/gerrit/#/c/76810/

which requires #19

TODO This is only a first cheap, and while it will provide "ready"
status, it does not yet register real ServiceStatusProvider
(but we don't have any real ones anyway).
  • Loading branch information
vorburger committed Oct 11, 2018
1 parent 9dced2f commit 28b91f7
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,18 @@

import com.google.inject.AbstractModule;
import com.google.inject.TypeLiteral;
import com.google.inject.multibindings.Multibinder;
import java.util.Collections;
import java.util.List;
import org.apache.karaf.shell.api.action.Action;
import org.opendaylight.infrautils.diagstatus.ClusterMemberInfo;
import org.opendaylight.infrautils.diagstatus.DiagStatusService;
import org.opendaylight.infrautils.diagstatus.DiagStatusServiceMBean;
import org.opendaylight.infrautils.diagstatus.ServiceStatusProvider;
import org.opendaylight.infrautils.diagstatus.internal.DiagStatusServiceImpl;
import org.opendaylight.infrautils.diagstatus.internal.DiagStatusServiceMBeanImpl;
import org.opendaylight.infrautils.diagstatus.shell.DiagStatusCommand;
import org.opendaylight.infrautils.diagstatus.spi.NoClusterMemberInfo;
import org.opendaylight.infrautils.diagstatus.web.WebInitializer;

public class DiagStatusWiring extends AbstractModule {
Expand All @@ -28,5 +35,14 @@ protected void configure() {
bind(DiagStatusService.class).to(DiagStatusServiceImpl.class);
bind(new TypeLiteral<List<ServiceStatusProvider>>() {}).toInstance(Collections.emptyList());
bind(WebInitializer.class);
// TODO when using CDS: bind(ClusterMemberInfo.class).to(ClusterMemberInfoImpl.class);
bind(ClusterMemberInfo.class).to(NoClusterMemberInfo.class);
bind(DiagStatusServiceMBean.class).to(DiagStatusServiceMBeanImpl.class);
// TODO figure out how to use Guice multibindings to inject all real ServiceStatusProvider impls
bind(new TypeLiteral<List<ServiceStatusProvider>>() {}).toInstance(Collections.emptyList());

// Commands
Multibinder<Action> actionsBinder = Multibinder.newSetBinder(binder(), Action.class);
actionsBinder.addBinding().to(DiagStatusCommand.class);
}
}

0 comments on commit 28b91f7

Please sign in to comment.