Search in sources :

Example 36 with CodecManager

use of org.onosproject.codec.impl.CodecManager in project onos by opennetworkinglab.

the class LispExtensionMappingAddressInterpreterTest method setUp.

@Before
public void setUp() {
    interpreter = new LispExtensionMappingAddressInterpreter();
    initExtAddresses();
    initLcafAddresses();
    CodecManager manager = new CodecManager();
    registrator = new LispMappingExtensionCodecRegistrator();
    registrator.codecService = manager;
    registrator.activate();
    context = new LispMappingExtensionCodecContextAdapter(registrator.codecService);
}
Also used : CodecManager(org.onosproject.codec.impl.CodecManager) LispMappingExtensionCodecContextAdapter(org.onosproject.drivers.lisp.extensions.codec.LispMappingExtensionCodecContextAdapter) LispExtensionMappingAddressInterpreter(org.onosproject.drivers.lisp.extensions.LispExtensionMappingAddressInterpreter) Before(org.junit.Before)

Example 37 with CodecManager

use of org.onosproject.codec.impl.CodecManager in project onos by opennetworkinglab.

the class PortAnnotationConfigTest method setUpClass.

// TODO consolidate code-clone in ProtectionConfigTest, and define constants for field name
@BeforeClass
public static void setUpClass() throws TestUtilsException {
    directory = new TestServiceDirectory();
    CodecManager codecService = new CodecManager();
    codecService.activate();
    directory.add(CodecService.class, codecService);
    // replace service directory used by BaseConfig
    original = TestUtils.getField(BaseConfig.class, "services");
    TestUtils.setField(BaseConfig.class, "services", directory);
}
Also used : TestServiceDirectory(org.onlab.osgi.TestServiceDirectory) CodecManager(org.onosproject.codec.impl.CodecManager) BaseConfig(org.onosproject.net.config.BaseConfig) BeforeClass(org.junit.BeforeClass)

Example 38 with CodecManager

use of org.onosproject.codec.impl.CodecManager in project onos by opennetworkinglab.

the class DeviceAnnotationConfigTest method setUpClass.

// TODO consolidate code-clone in ProtectionConfigTest, and define constants for field name
@BeforeClass
public static void setUpClass() throws TestUtilsException {
    directory = new TestServiceDirectory();
    CodecManager codecService = new CodecManager();
    codecService.activate();
    directory.add(CodecService.class, codecService);
    // replace service directory used by BaseConfig
    original = TestUtils.getField(BaseConfig.class, "services");
    TestUtils.setField(BaseConfig.class, "services", directory);
}
Also used : TestServiceDirectory(org.onlab.osgi.TestServiceDirectory) CodecManager(org.onosproject.codec.impl.CodecManager) BaseConfig(org.onosproject.net.config.BaseConfig) BeforeClass(org.junit.BeforeClass)

Example 39 with CodecManager

use of org.onosproject.codec.impl.CodecManager in project onos by opennetworkinglab.

the class ProtectionEndpointIntentInstallerTest method setUpClass.

@BeforeClass
public static void setUpClass() throws TestUtils.TestUtilsException {
    directory = new TestServiceDirectory();
    CodecManager codecService = new CodecManager();
    codecService.activate();
    directory.add(CodecService.class, codecService);
    // replace service directory used by BaseConfig
    original = TestUtils.getField(BaseConfig.class, "services");
    TestUtils.setField(BaseConfig.class, "services", directory);
}
Also used : TestServiceDirectory(org.onlab.osgi.TestServiceDirectory) CodecManager(org.onosproject.codec.impl.CodecManager) BaseConfig(org.onosproject.net.config.BaseConfig) BeforeClass(org.junit.BeforeClass)

Example 40 with CodecManager

use of org.onosproject.codec.impl.CodecManager in project onos by opennetworkinglab.

the class LinksResourceTest method setUpTest.

/**
 * Initializes test mocks and environment.
 */
@Before
public void setUpTest() {
    mockLinkService = createMock(LinkService.class);
    // Register the services needed for the test
    CodecManager codecService = new CodecManager();
    codecService.activate();
    ServiceDirectory testDirectory = new TestServiceDirectory().add(LinkService.class, mockLinkService).add(CodecService.class, codecService);
    setServiceDirectory(testDirectory);
}
Also used : ServiceDirectory(org.onlab.osgi.ServiceDirectory) TestServiceDirectory(org.onlab.osgi.TestServiceDirectory) TestServiceDirectory(org.onlab.osgi.TestServiceDirectory) CodecManager(org.onosproject.codec.impl.CodecManager) LinkService(org.onosproject.net.link.LinkService) Before(org.junit.Before)

Aggregations

CodecManager (org.onosproject.codec.impl.CodecManager)55 Before (org.junit.Before)50 TestServiceDirectory (org.onlab.osgi.TestServiceDirectory)37 ServiceDirectory (org.onlab.osgi.ServiceDirectory)32 LispMappingExtensionCodecRegistrator (org.onosproject.drivers.lisp.extensions.LispMappingExtensionCodecRegistrator)10 MappingCodecRegistrator (org.onosproject.mapping.MappingCodecRegistrator)7 BeforeClass (org.junit.BeforeClass)5 CodecService (org.onosproject.codec.CodecService)5 BaseConfig (org.onosproject.net.config.BaseConfig)5 DeviceService (org.onosproject.net.device.DeviceService)5 CoreService (org.onosproject.core.CoreService)2 K8sNetworkAdminService (org.onosproject.k8snetworking.api.K8sNetworkAdminService)2 KubevirtHostRouteCodec (org.onosproject.kubevirtnetworking.codec.KubevirtHostRouteCodec)2 KubevirtIpPoolCodec (org.onosproject.kubevirtnetworking.codec.KubevirtIpPoolCodec)2 KubevirtNetworkCodec (org.onosproject.kubevirtnetworking.codec.KubevirtNetworkCodec)2 MetricsService (org.onlab.metrics.MetricsService)1 ApplicationAdminService (org.onosproject.app.ApplicationAdminService)1 ClusterService (org.onosproject.cluster.ClusterService)1 ControllerNode (org.onosproject.cluster.ControllerNode)1 NodeId (org.onosproject.cluster.NodeId)1