Search in sources :

Example 1 with EidLispAddressBuilder

use of org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.map.register.cache.metadata.container.map.register.cache.metadata.EidLispAddressBuilder in project lispflowmapping by opendaylight.

the class LispSouthboundHandler method provideEidPrefixesFromMessage.

private List<EidLispAddress> provideEidPrefixesFromMessage(final MapRegister mapRegister) {
    List<EidLispAddress> eidsResult = new ArrayList<>();
    for (MappingRecordItem mappingRecordItem : mapRegister.getMappingRecordItem()) {
        final EidLispAddressBuilder eidLispAddressBuilder = new EidLispAddressBuilder();
        final Eid eid = mappingRecordItem.getMappingRecord().getEid();
        eidLispAddressBuilder.setEidLispAddressId(LispAddressStringifier.getString(eid));
        eidLispAddressBuilder.setEid(eid);
        eidsResult.add(eidLispAddressBuilder.build());
    }
    return eidsResult;
}
Also used : Eid(org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.eid.container.Eid) EidLispAddress(org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.map.register.cache.metadata.container.map.register.cache.metadata.EidLispAddress) MappingRecordItem(org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.mapping.record.list.MappingRecordItem) ArrayList(java.util.ArrayList) EidLispAddressBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.map.register.cache.metadata.container.map.register.cache.metadata.EidLispAddressBuilder)

Example 2 with EidLispAddressBuilder

use of org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.map.register.cache.metadata.container.map.register.cache.metadata.EidLispAddressBuilder in project lispflowmapping by opendaylight.

the class LispMappingServiceTest method getDefaultMapRegisterCacheMetadata.

private static MapRegisterCacheMetadata getDefaultMapRegisterCacheMetadata() {
    final EidLispAddress eidLispAddress_1 = new EidLispAddressBuilder().setEidLispAddressId("id-1").setEid(IPV4_EID_1).build();
    final EidLispAddress eidLispAddress_2 = new EidLispAddressBuilder().setEidLispAddressId("id-2").setEid(IPV4_EID_2).build();
    return new MapRegisterCacheMetadataBuilder().setEidLispAddress(Lists.newArrayList(eidLispAddress_1, eidLispAddress_2)).setTimestamp(TIMESTAMP).build();
}
Also used : MapRegisterCacheMetadataBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.map.register.cache.metadata.container.MapRegisterCacheMetadataBuilder) EidLispAddress(org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.map.register.cache.metadata.container.map.register.cache.metadata.EidLispAddress) EidLispAddressBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.map.register.cache.metadata.container.map.register.cache.metadata.EidLispAddressBuilder)

Aggregations

EidLispAddress (org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.map.register.cache.metadata.container.map.register.cache.metadata.EidLispAddress)2 EidLispAddressBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.map.register.cache.metadata.container.map.register.cache.metadata.EidLispAddressBuilder)2 ArrayList (java.util.ArrayList)1 Eid (org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.eid.container.Eid)1 MapRegisterCacheMetadataBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.map.register.cache.metadata.container.MapRegisterCacheMetadataBuilder)1 MappingRecordItem (org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.mapping.record.list.MappingRecordItem)1