Search in sources :

Example 6 with Mapping

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

the class MappingManagerTest method addMapping.

/**
 * Adds a new mapping into the mapping store.
 *
 * @param type mapping store type
 * @param tval test value
 * @return a mapping that has been added to the store
 */
private Mapping addMapping(Type type, int tval) {
    Mapping mapping = mapping(tval, tval);
    MappingEntry entry = new DefaultMappingEntry(mapping);
    adminService.storeMappingEntry(type, entry);
    assertNotNull("mapping should be found", service.getMappingEntries(type, LISP_DID));
    return mapping;
}
Also used : MappingEntry(org.onosproject.mapping.MappingEntry) DefaultMappingEntry(org.onosproject.mapping.DefaultMappingEntry) DefaultMapping(org.onosproject.mapping.DefaultMapping) Mapping(org.onosproject.mapping.Mapping) DefaultMappingEntry(org.onosproject.mapping.DefaultMappingEntry)

Aggregations

DefaultMapping (org.onosproject.mapping.DefaultMapping)6 Mapping (org.onosproject.mapping.Mapping)6 DefaultMappingEntry (org.onosproject.mapping.DefaultMappingEntry)5 MappingEntry (org.onosproject.mapping.MappingEntry)4 Test (org.junit.Test)3 MappingAction (org.onosproject.mapping.actions.MappingAction)3 MappingAddress (org.onosproject.mapping.addresses.MappingAddress)3 DefaultMappingKey (org.onosproject.mapping.DefaultMappingKey)2 DefaultMappingTreatment (org.onosproject.mapping.DefaultMappingTreatment)2 DefaultMappingValue (org.onosproject.mapping.DefaultMappingValue)2 MappingKey (org.onosproject.mapping.MappingKey)2 MappingTreatment (org.onosproject.mapping.MappingTreatment)2 MappingValue (org.onosproject.mapping.MappingValue)2 MappingInstruction (org.onosproject.mapping.instructions.MappingInstruction)2 ObjectNode (com.fasterxml.jackson.databind.node.ObjectNode)1 Before (org.junit.Before)1 IpPrefix (org.onlab.packet.IpPrefix)1 MappingEvent (org.onosproject.mapping.MappingEvent)1 MappingId (org.onosproject.mapping.MappingId)1 Serializer (org.onosproject.store.service.Serializer)1