Search in sources :

Example 6 with ServiceDirectory

use of org.onlab.osgi.ServiceDirectory in project onos by opennetworkinglab.

the class ControlMetricsResourceTest method setUpTest.

/**
 * Sets up the global values for all the tests.
 */
@Before
public void setUpTest() {
    final CodecManager codecService = new CodecManager();
    codecService.activate();
    codecService.registerCodec(ControlLoadSnapshot.class, new ControlLoadSnapshotCodec());
    ServiceDirectory testDirectory = new TestServiceDirectory().add(ControlPlaneMonitorService.class, mockControlPlaneMonitorService).add(ClusterService.class, mockClusterService).add(CodecService.class, codecService);
    setServiceDirectory(testDirectory);
    nodeId = new NodeId("1");
    mockControlLoad = new MockControlLoad();
    ControllerNode mockControllerNode = new MockControllerNode(nodeId);
    expect(mockClusterService.getLocalNode()).andReturn(mockControllerNode).anyTimes();
    replay(mockClusterService);
}
Also used : ClusterService(org.onosproject.cluster.ClusterService) ControlLoadSnapshotCodec(org.onosproject.cpman.codec.ControlLoadSnapshotCodec) ServiceDirectory(org.onlab.osgi.ServiceDirectory) TestServiceDirectory(org.onlab.osgi.TestServiceDirectory) TestServiceDirectory(org.onlab.osgi.TestServiceDirectory) NodeId(org.onosproject.cluster.NodeId) ControllerNode(org.onosproject.cluster.ControllerNode) CodecManager(org.onosproject.codec.impl.CodecManager) Before(org.junit.Before)

Example 7 with ServiceDirectory

use of org.onlab.osgi.ServiceDirectory in project onos by opennetworkinglab.

the class AlarmsWebResourceTest method setUpMock.

@Before
public void setUpMock() {
    CodecManager codecService = new CodecManager();
    codecService.activate();
    ServiceDirectory testDirectory = new TestServiceDirectory().add(CodecService.class, codecService);
    setServiceDirectory(testDirectory);
}
Also used : TestServiceDirectory(org.onlab.osgi.TestServiceDirectory) ServiceDirectory(org.onlab.osgi.ServiceDirectory) TestServiceDirectory(org.onlab.osgi.TestServiceDirectory) CodecManager(org.onosproject.codec.impl.CodecManager) Before(org.junit.Before)

Example 8 with ServiceDirectory

use of org.onlab.osgi.ServiceDirectory in project onos by opennetworkinglab.

the class OpenstackFloatingIpWebResourceTest method setUpTest.

/**
 * Sets up the global values for all tests.
 */
@Before
public void setUpTest() {
    ServiceDirectory testDirectory = new TestServiceDirectory().add(OpenstackRouterAdminService.class, mockOpenstackRouterAdminService).add(OpenstackHaService.class, mockOpenstackHaService);
    setServiceDirectory(testDirectory);
}
Also used : ServiceDirectory(org.onlab.osgi.ServiceDirectory) TestServiceDirectory(org.onlab.osgi.TestServiceDirectory) OpenstackRouterAdminService(org.onosproject.openstacknetworking.api.OpenstackRouterAdminService) TestServiceDirectory(org.onlab.osgi.TestServiceDirectory) Before(org.junit.Before)

Example 9 with ServiceDirectory

use of org.onlab.osgi.ServiceDirectory in project onos by opennetworkinglab.

the class OpenstackNetworkWebResourceTest method setUpTest.

/**
 * Sets up the global values for all tests.
 */
@Before
public void setUpTest() {
    ServiceDirectory testDirectory = new TestServiceDirectory().add(OpenstackNetworkAdminService.class, mockOpenstackNetworkAdminService).add(OpenstackHaService.class, mockOpenstackHaService);
    setServiceDirectory(testDirectory);
}
Also used : ServiceDirectory(org.onlab.osgi.ServiceDirectory) TestServiceDirectory(org.onlab.osgi.TestServiceDirectory) TestServiceDirectory(org.onlab.osgi.TestServiceDirectory) OpenstackNetworkAdminService(org.onosproject.openstacknetworking.api.OpenstackNetworkAdminService) Before(org.junit.Before)

Example 10 with ServiceDirectory

use of org.onlab.osgi.ServiceDirectory in project onos by opennetworkinglab.

the class OpenstackPortWebResourceTest method setUpTest.

/**
 * Sets up the global values for all tests.
 */
@Before
public void setUpTest() {
    ServiceDirectory testDirectory = new TestServiceDirectory().add(OpenstackNetworkAdminService.class, mockOpenstackNetworkAdminService).add(OpenstackNodeService.class, mockOpenstackNodeService).add(OpenstackHaService.class, mockOpenstackHaService);
    setServiceDirectory(testDirectory);
}
Also used : OpenstackNodeService(org.onosproject.openstacknode.api.OpenstackNodeService) ServiceDirectory(org.onlab.osgi.ServiceDirectory) TestServiceDirectory(org.onlab.osgi.TestServiceDirectory) TestServiceDirectory(org.onlab.osgi.TestServiceDirectory) Before(org.junit.Before)

Aggregations

ServiceDirectory (org.onlab.osgi.ServiceDirectory)54 Before (org.junit.Before)51 TestServiceDirectory (org.onlab.osgi.TestServiceDirectory)51 CodecManager (org.onosproject.codec.impl.CodecManager)30 DeviceService (org.onosproject.net.device.DeviceService)7 CfmCodecContext (org.onosproject.cfm.CfmCodecContext)5 CodecService (org.onosproject.codec.CodecService)5 CoreService (org.onosproject.core.CoreService)3 CfmMdService (org.onosproject.incubator.net.l2monitoring.cfm.service.CfmMdService)3 OpenstackRouterAdminService (org.onosproject.openstacknetworking.api.OpenstackRouterAdminService)3 ObjectNode (com.fasterxml.jackson.databind.node.ObjectNode)2 DefaultServiceDirectory (org.onlab.osgi.DefaultServiceDirectory)2 ClusterService (org.onosproject.cluster.ClusterService)2 SoamService (org.onosproject.incubator.net.l2monitoring.soam.SoamService)2 K8sNetworkAdminService (org.onosproject.k8snetworking.api.K8sNetworkAdminService)2 GroupService (org.onosproject.net.group.GroupService)2 OpenstackNetworkAdminService (org.onosproject.openstacknetworking.api.OpenstackNetworkAdminService)2 OpenstackSecurityGroupAdminService (org.onosproject.openstacknetworking.api.OpenstackSecurityGroupAdminService)2 RemovalNotification (com.google.common.cache.RemovalNotification)1 MetricsService (org.onlab.metrics.MetricsService)1