Search in sources :

Example 1 with LispMappingExtensionCodecRegistrator

use of org.onosproject.drivers.lisp.extensions.LispMappingExtensionCodecRegistrator in project onos by opennetworkinglab.

the class LispAppDataAddressCodecTest method setUp.

/**
 * Sets up for each test.
 * Creates a context and fetches the LispAppDataAddress codec.
 */
@Before
public void setUp() {
    CodecManager manager = new CodecManager();
    registrator = new LispMappingExtensionCodecRegistrator();
    registrator.codecService = manager;
    registrator.activate();
    context = new LispMappingExtensionCodecContextAdapter(registrator.codecService);
    appDataAddressCodec = context.codec(LispAppDataAddress.class);
    assertThat(appDataAddressCodec, notNullValue());
}
Also used : LispAppDataAddress(org.onosproject.drivers.lisp.extensions.LispAppDataAddress) CodecManager(org.onosproject.codec.impl.CodecManager) LispMappingExtensionCodecRegistrator(org.onosproject.drivers.lisp.extensions.LispMappingExtensionCodecRegistrator) Before(org.junit.Before)

Example 2 with LispMappingExtensionCodecRegistrator

use of org.onosproject.drivers.lisp.extensions.LispMappingExtensionCodecRegistrator in project onos by opennetworkinglab.

the class LispSegmentAddressCodecTest method setUp.

/**
 * Sets up for each test.
 * Creates a context and fetches the LispSegmentAddress codec.
 */
@Before
public void setUp() {
    CodecManager manager = new CodecManager();
    registrator = new LispMappingExtensionCodecRegistrator();
    registrator.codecService = manager;
    registrator.activate();
    context = new LispMappingExtensionCodecContextAdapter(registrator.codecService);
    segmentAddressCodec = context.codec(LispSegmentAddress.class);
    assertThat("segment address codec should not be null", segmentAddressCodec, notNullValue());
}
Also used : LispSegmentAddress(org.onosproject.drivers.lisp.extensions.LispSegmentAddress) CodecManager(org.onosproject.codec.impl.CodecManager) LispMappingExtensionCodecRegistrator(org.onosproject.drivers.lisp.extensions.LispMappingExtensionCodecRegistrator) Before(org.junit.Before)

Example 3 with LispMappingExtensionCodecRegistrator

use of org.onosproject.drivers.lisp.extensions.LispMappingExtensionCodecRegistrator in project onos by opennetworkinglab.

the class LispTeAddressCodecTest method setUp.

/**
 * Sets up for each test.
 * Creates a context and fetches the LispTeAddress codec.
 */
@Before
public void setUp() {
    CodecManager manager = new CodecManager();
    registrator = new LispMappingExtensionCodecRegistrator();
    registrator.codecService = manager;
    registrator.activate();
    context = new LispMappingExtensionCodecContextAdapter(registrator.codecService);
    teAddressCodec = context.codec(LispTeAddress.class);
    assertThat("Traffic Engineering address codec should not be null", teAddressCodec, notNullValue());
    record1 = new LispTeAddress.TeRecord.Builder().withIsLookup(LOOKUP_1).withIsRlocProbe(RLOC_PROBE_1).withIsStrict(STRICT_1).withRtrRlocAddress(MappingAddresses.ipv4MappingAddress(IPV4_ADDRESS_1)).build();
    record2 = new LispTeAddress.TeRecord.Builder().withIsLookup(LOOKUP_2).withIsRlocProbe(RLOC_PROBE_2).withIsStrict(STRICT_2).withRtrRlocAddress(MappingAddresses.ipv4MappingAddress(IPV4_ADDRESS_2)).build();
}
Also used : LispTeAddress(org.onosproject.drivers.lisp.extensions.LispTeAddress) CodecManager(org.onosproject.codec.impl.CodecManager) LispMappingExtensionCodecRegistrator(org.onosproject.drivers.lisp.extensions.LispMappingExtensionCodecRegistrator) Before(org.junit.Before)

Example 4 with LispMappingExtensionCodecRegistrator

use of org.onosproject.drivers.lisp.extensions.LispMappingExtensionCodecRegistrator in project onos by opennetworkinglab.

the class LispNonceAddressCodecTest method setUp.

/**
 * Sets up for each test.
 * Creates a context and fetches the LispNonceAddress codec.
 */
@Before
public void setUp() {
    CodecManager manager = new CodecManager();
    registrator = new LispMappingExtensionCodecRegistrator();
    registrator.codecService = manager;
    registrator.activate();
    context = new LispMappingExtensionCodecContextAdapter(registrator.codecService);
    nonceAddressCodec = context.codec(LispNonceAddress.class);
    assertThat("nonce address codec should not be null", nonceAddressCodec, notNullValue());
}
Also used : LispNonceAddress(org.onosproject.drivers.lisp.extensions.LispNonceAddress) CodecManager(org.onosproject.codec.impl.CodecManager) LispMappingExtensionCodecRegistrator(org.onosproject.drivers.lisp.extensions.LispMappingExtensionCodecRegistrator) Before(org.junit.Before)

Example 5 with LispMappingExtensionCodecRegistrator

use of org.onosproject.drivers.lisp.extensions.LispMappingExtensionCodecRegistrator in project onos by opennetworkinglab.

the class LispSrcDstAddressCodecTest method setUp.

/**
 * Sets up for each test.
 * Creates a context and fetches the LispSrcDstAddress codec.
 */
@Before
public void setUp() {
    CodecManager manager = new CodecManager();
    registrator = new LispMappingExtensionCodecRegistrator();
    registrator.codecService = manager;
    registrator.activate();
    context = new LispMappingExtensionCodecContextAdapter(registrator.codecService);
    srcDstAddressCodec = context.codec(LispSrcDstAddress.class);
    assertThat("Source and Destination address codec should not be null", srcDstAddressCodec, notNullValue());
}
Also used : LispSrcDstAddress(org.onosproject.drivers.lisp.extensions.LispSrcDstAddress) CodecManager(org.onosproject.codec.impl.CodecManager) LispMappingExtensionCodecRegistrator(org.onosproject.drivers.lisp.extensions.LispMappingExtensionCodecRegistrator) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)10 CodecManager (org.onosproject.codec.impl.CodecManager)10 LispMappingExtensionCodecRegistrator (org.onosproject.drivers.lisp.extensions.LispMappingExtensionCodecRegistrator)10 LispAppDataAddress (org.onosproject.drivers.lisp.extensions.LispAppDataAddress)1 LispAsAddress (org.onosproject.drivers.lisp.extensions.LispAsAddress)1 LispGcAddress (org.onosproject.drivers.lisp.extensions.LispGcAddress)1 LispListAddress (org.onosproject.drivers.lisp.extensions.LispListAddress)1 LispMulticastAddress (org.onosproject.drivers.lisp.extensions.LispMulticastAddress)1 LispNatAddress (org.onosproject.drivers.lisp.extensions.LispNatAddress)1 LispNonceAddress (org.onosproject.drivers.lisp.extensions.LispNonceAddress)1 LispSegmentAddress (org.onosproject.drivers.lisp.extensions.LispSegmentAddress)1 LispSrcDstAddress (org.onosproject.drivers.lisp.extensions.LispSrcDstAddress)1 LispTeAddress (org.onosproject.drivers.lisp.extensions.LispTeAddress)1