use of org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.Ipv6Prefix in project lispflowmapping by opendaylight.
the class MappingMergeUtilTest method computeNbSbIntersectionTest_withMaskableSourceDestKeyEIDs_Ipv6SB.
/**
* Tests {@link MappingMergeUtil#computeNbSbIntersection} method with SourceDestKey Eid address type, Ipv6Prefix
* SB Eid, Nb mask less than SB mask.
*/
@Test
public void computeNbSbIntersectionTest_withMaskableSourceDestKeyEIDs_Ipv6SB() {
MappingRecord nbMappingRecord = getDefaultMappingRecordBuilder().setEid(SOURCE_DEST_KEY_EID_1).build();
MappingRecord sbMappingRecord = getDefaultMappingRecordBuilder().setEid(IPV6_PREFIX_EID).build();
MappingData nbMappingData = getDefaultMappingData(nbMappingRecord);
MappingData sbMappingData = getDefaultMappingData(sbMappingRecord);
// result
final MappingData result = MappingMergeUtil.computeNbSbIntersection(nbMappingData, sbMappingData);
final Eid eid = LispAddressUtil.asSrcDstEid(IPV4_STRING_3, IPV6_STRING, 24, 96, 1);
assertEquals(eid, result.getRecord().getEid());
}
use of org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.Ipv6Prefix in project genius by opendaylight.
the class ActionSetSourceIpv6Test method verifyAction.
private void verifyAction(Action action) {
assertTrue(action.getAction() instanceof SetFieldCase);
SetFieldCase actionCase = (SetFieldCase) action.getAction();
assertNotNull(actionCase.getSetField().getLayer3Match());
assertTrue(actionCase.getSetField().getLayer3Match() instanceof Ipv6Match);
Ipv6Match ipv6Match = (Ipv6Match) actionCase.getSetField().getLayer3Match();
assertEquals(new Ipv6Prefix(IP_ADDRESS + "/" + IP_MASK), ipv6Match.getIpv6Source());
}
Aggregations