Search in sources :

Example 6 with DefaultMappingEntry

use of org.onosproject.mapping.DefaultMappingEntry 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

DefaultMappingEntry (org.onosproject.mapping.DefaultMappingEntry)6 DefaultMapping (org.onosproject.mapping.DefaultMapping)5 Mapping (org.onosproject.mapping.Mapping)5 MappingEntry (org.onosproject.mapping.MappingEntry)4 Test (org.junit.Test)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 MappingAction (org.onosproject.mapping.actions.MappingAction)2 MappingAddress (org.onosproject.mapping.addresses.MappingAddress)2 ObjectNode (com.fasterxml.jackson.databind.node.ObjectNode)1 Before (org.junit.Before)1 IpPrefix (org.onlab.packet.IpPrefix)1 StoredMappingEntry (org.onosproject.mapping.StoredMappingEntry)1 MappingInstruction (org.onosproject.mapping.instructions.MappingInstruction)1 TestStorageService (org.onosproject.store.service.TestStorageService)1