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

Commit

Permalink
add OvsdbModule & OvsdbModuleTest
Browse files Browse the repository at this point in the history
  • Loading branch information
vorburger committed Feb 4, 2019
1 parent 8f7621d commit d1db91d
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/main/java/org/opendaylight/ovsdb/simple/OvsdbModule.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
* Copyright (c) 2018 Red Hat, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
package org.opendaylight.ovsdb.simple;

import org.opendaylight.infrautils.inject.guice.AutoWiringModule;
import org.opendaylight.infrautils.inject.guice.GuiceClassPathBinder;

public class OvsdbModule extends AutoWiringModule {

public OvsdbModule(GuiceClassPathBinder classPathBinder) {
super(classPathBinder, "org.opendaylight.ovsdb");
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
* Copyright (c) 2018 Red Hat, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
package org.opendaylight.ovsdb.simple.test;

import javax.inject.Inject;
import org.junit.Rule;
import org.opendaylight.aaa.simple.CertModule;
import org.opendaylight.controller.simple.InMemoryControllerModule;
import org.opendaylight.infrautils.inject.guice.GuiceClassPathBinder;
import org.opendaylight.infrautils.inject.guice.testutils.AnnotationsModule;
import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule;
import org.opendaylight.infrautils.ready.guice.ReadyModule;
import org.opendaylight.infrautils.simple.DiagStatusModule;
import org.opendaylight.infrautils.simple.testutils.AbstractSimpleDistributionTest;
import org.opendaylight.infrautils.web.WebModule;
import org.opendaylight.ovsdb.hwvtepsouthbound.HwvtepSouthboundProvider;
import org.opendaylight.ovsdb.lib.OvsdbConnection;
import org.opendaylight.ovsdb.lib.impl.OvsdbConnectionService;
import org.opendaylight.ovsdb.simple.OvsdbModule;
import org.opendaylight.ovsdb.southbound.SouthboundProvider;

public class OvsdbModuleTest extends AbstractSimpleDistributionTest {

private static final GuiceClassPathBinder CLASS_PATH_BINDER = new GuiceClassPathBinder("org.opendaylight");

public @Rule GuiceRule guice = new GuiceRule(new OvsdbModule(CLASS_PATH_BINDER), new CertModule(),
new InMemoryControllerModule(), new DiagStatusModule(), new WebModule(), new ReadyModule(),
new AnnotationsModule());

@Inject OvsdbConnection ovsdbConnection;
@Inject SouthboundProvider southboundProvider;
@Inject OvsdbConnectionService ovsdbConnectionService;
@Inject HwvtepSouthboundProvider hwvtepSouthboundProvider;

}

0 comments on commit d1db91d

Please sign in to comment.