Search in sources :

Example 1 with MappingCodecRegistrator

use of org.onosproject.mapping.MappingCodecRegistrator in project onos by opennetworkinglab.

the class MappingActionCodecTest method setUp.

/**
 * Sets up for each test.
 * Creates a context and fetches the mapping action codec.
 */
@Before
public void setUp() {
    CodecManager manager = new CodecManager();
    registrator = new MappingCodecRegistrator();
    registrator.codecService = manager;
    registrator.activate();
    context = new MappingCodecContextAdapter(registrator.codecService);
    actionCodec = context.codec(MappingAction.class);
    assertThat(actionCodec, notNullValue());
}
Also used : MappingAction(org.onosproject.mapping.actions.MappingAction) NativeForwardMappingAction(org.onosproject.mapping.actions.NativeForwardMappingAction) DropMappingAction(org.onosproject.mapping.actions.DropMappingAction) ForwardMappingAction(org.onosproject.mapping.actions.ForwardMappingAction) NoMappingAction(org.onosproject.mapping.actions.NoMappingAction) MappingCodecRegistrator(org.onosproject.mapping.MappingCodecRegistrator) CodecManager(org.onosproject.codec.impl.CodecManager) Before(org.junit.Before)

Example 2 with MappingCodecRegistrator

use of org.onosproject.mapping.MappingCodecRegistrator in project onos by opennetworkinglab.

the class MappingAddressCodecTest method setUp.

/**
 * Sets up for each test.
 * Creates a context and fetches the mapping address codec.
 */
@Before
public void setUp() {
    CodecManager manager = new CodecManager();
    registrator = new MappingCodecRegistrator();
    registrator.codecService = manager;
    registrator.activate();
    context = new MappingCodecContextAdapter(registrator.codecService);
    addressCodec = context.codec(MappingAddress.class);
    assertThat(addressCodec, notNullValue());
}
Also used : MappingAddressJsonMatcher.matchesMappingAddress(org.onosproject.mapping.codec.MappingAddressJsonMatcher.matchesMappingAddress) MappingAddress(org.onosproject.mapping.addresses.MappingAddress) MappingCodecRegistrator(org.onosproject.mapping.MappingCodecRegistrator) CodecManager(org.onosproject.codec.impl.CodecManager) Before(org.junit.Before)

Example 3 with MappingCodecRegistrator

use of org.onosproject.mapping.MappingCodecRegistrator in project onos by opennetworkinglab.

the class MappingInstructionCodecTest method setUp.

/**
 * Sets up for each test.
 * Creates a context and fetches the mapping instruction codec.
 */
@Before
public void setUp() {
    CodecManager manager = new CodecManager();
    registrator = new MappingCodecRegistrator();
    registrator.codecService = manager;
    registrator.activate();
    context = new MappingCodecContextAdapter(registrator.codecService);
    instructionCodec = context.codec(MappingInstruction.class);
    assertThat(instructionCodec, notNullValue());
}
Also used : MappingCodecRegistrator(org.onosproject.mapping.MappingCodecRegistrator) CodecManager(org.onosproject.codec.impl.CodecManager) MulticastMappingInstruction(org.onosproject.mapping.instructions.MulticastMappingInstruction) MappingInstruction(org.onosproject.mapping.instructions.MappingInstruction) UnicastMappingInstruction(org.onosproject.mapping.instructions.UnicastMappingInstruction) Before(org.junit.Before)

Example 4 with MappingCodecRegistrator

use of org.onosproject.mapping.MappingCodecRegistrator in project onos by opennetworkinglab.

the class MappingKeyCodecTest method setUp.

/**
 * Sets up for each test.
 * Creates a context and fetches the mapping key codec.
 */
@Before
public void setUp() {
    CodecManager manager = new CodecManager();
    registrator = new MappingCodecRegistrator();
    registrator.codecService = manager;
    registrator.activate();
    context = new MappingCodecContextAdapter(registrator.codecService);
    keyCodec = context.codec(MappingKey.class);
    assertThat(keyCodec, notNullValue());
}
Also used : MappingCodecRegistrator(org.onosproject.mapping.MappingCodecRegistrator) CodecManager(org.onosproject.codec.impl.CodecManager) MappingKey(org.onosproject.mapping.MappingKey) DefaultMappingKey(org.onosproject.mapping.DefaultMappingKey) Before(org.junit.Before)

Example 5 with MappingCodecRegistrator

use of org.onosproject.mapping.MappingCodecRegistrator in project onos by opennetworkinglab.

the class MappingValueCodecTest method setUp.

/**
 * Sets up for each test.
 * Creates a context and fetches the mapping value codec.
 */
@Before
public void setUp() {
    CodecManager manager = new CodecManager();
    registrator = new MappingCodecRegistrator();
    registrator.codecService = manager;
    registrator.activate();
    context = new MappingCodecContextAdapter(registrator.codecService);
    valueCodec = context.codec(MappingValue.class);
    assertThat(valueCodec, notNullValue());
}
Also used : MappingCodecRegistrator(org.onosproject.mapping.MappingCodecRegistrator) CodecManager(org.onosproject.codec.impl.CodecManager) DefaultMappingValue(org.onosproject.mapping.DefaultMappingValue) MappingValue(org.onosproject.mapping.MappingValue) Before(org.junit.Before)

Aggregations

MappingCodecRegistrator (org.onosproject.mapping.MappingCodecRegistrator)8 Before (org.junit.Before)7 CodecManager (org.onosproject.codec.impl.CodecManager)7 LispAppDataAddressCodec (org.onosproject.drivers.lisp.extensions.codec.LispAppDataAddressCodec)1 LispAsAddressCodec (org.onosproject.drivers.lisp.extensions.codec.LispAsAddressCodec)1 LispGcAddressCodec (org.onosproject.drivers.lisp.extensions.codec.LispGcAddressCodec)1 LispListAddressCodec (org.onosproject.drivers.lisp.extensions.codec.LispListAddressCodec)1 LispMulticastAddressCodec (org.onosproject.drivers.lisp.extensions.codec.LispMulticastAddressCodec)1 LispNatAddressCodec (org.onosproject.drivers.lisp.extensions.codec.LispNatAddressCodec)1 LispNonceAddressCodec (org.onosproject.drivers.lisp.extensions.codec.LispNonceAddressCodec)1 LispSegmentAddressCodec (org.onosproject.drivers.lisp.extensions.codec.LispSegmentAddressCodec)1 LispSrcDstAddressCodec (org.onosproject.drivers.lisp.extensions.codec.LispSrcDstAddressCodec)1 LispTeAddressCodec (org.onosproject.drivers.lisp.extensions.codec.LispTeAddressCodec)1 LispTeRecordCodec (org.onosproject.drivers.lisp.extensions.codec.LispTeRecordCodec)1 DefaultMappingEntry (org.onosproject.mapping.DefaultMappingEntry)1 DefaultMappingKey (org.onosproject.mapping.DefaultMappingKey)1 DefaultMappingTreatment (org.onosproject.mapping.DefaultMappingTreatment)1 DefaultMappingValue (org.onosproject.mapping.DefaultMappingValue)1 MappingEntry (org.onosproject.mapping.MappingEntry)1 MappingKey (org.onosproject.mapping.MappingKey)1