Search in sources :

Example 1 with OpenstackVtapNetworkCodec

use of org.onosproject.openstackvtap.codec.OpenstackVtapNetworkCodec in project onos by opennetworkinglab.

the class OpenstackVtapNetworkWebResourceTest method setUpTest.

/**
 * Sets up the global values for all the tests.
 */
@Before
public void setUpTest() {
    final CodecManager codecService = new CodecManager();
    codecService.activate();
    codecService.registerCodec(OpenstackVtapNetwork.class, new OpenstackVtapNetworkCodec());
    ServiceDirectory testDirectory = new TestServiceDirectory().add(OpenstackVtapService.class, mockVtapService).add(CodecService.class, codecService);
    setServiceDirectory(testDirectory);
    vtapNetwork = DefaultOpenstackVtapNetwork.builder().mode(OpenstackVtapNetwork.Mode.VXLAN).networkId(1).serverIp(IpAddress.valueOf("10.10.10.1")).build();
}
Also used : OpenstackVtapService(org.onosproject.openstackvtap.api.OpenstackVtapService) OpenstackVtapNetworkCodec(org.onosproject.openstackvtap.codec.OpenstackVtapNetworkCodec) ServiceDirectory(org.onlab.osgi.ServiceDirectory) TestServiceDirectory(org.onlab.osgi.TestServiceDirectory) TestServiceDirectory(org.onlab.osgi.TestServiceDirectory) CodecManager(org.onosproject.codec.impl.CodecManager) Before(org.junit.Before)

Example 2 with OpenstackVtapNetworkCodec

use of org.onosproject.openstackvtap.codec.OpenstackVtapNetworkCodec in project onos by opennetworkinglab.

the class OpenstackVtapNetworkCodecRegister method activate.

@Activate
protected void activate() {
    codecService.registerCodec(OpenstackVtapNetwork.class, new OpenstackVtapNetworkCodec());
    codecService.registerCodec(OpenstackVtapCriterion.class, new OpenstackVtapCriterionCodec());
    log.info("Started");
}
Also used : OpenstackVtapCriterionCodec(org.onosproject.openstackvtap.codec.OpenstackVtapCriterionCodec) OpenstackVtapNetworkCodec(org.onosproject.openstackvtap.codec.OpenstackVtapNetworkCodec) Activate(org.osgi.service.component.annotations.Activate)

Aggregations

OpenstackVtapNetworkCodec (org.onosproject.openstackvtap.codec.OpenstackVtapNetworkCodec)2 Before (org.junit.Before)1 ServiceDirectory (org.onlab.osgi.ServiceDirectory)1 TestServiceDirectory (org.onlab.osgi.TestServiceDirectory)1 CodecManager (org.onosproject.codec.impl.CodecManager)1 OpenstackVtapService (org.onosproject.openstackvtap.api.OpenstackVtapService)1 OpenstackVtapCriterionCodec (org.onosproject.openstackvtap.codec.OpenstackVtapCriterionCodec)1 Activate (org.osgi.service.component.annotations.Activate)1