Search in sources :

Example 6 with XtrIdMapping

use of org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.db.instance.mapping.XtrIdMapping in project lispflowmapping by opendaylight.

the class DataStoreBackEnd method removeXtrIdMapping.

public void removeXtrIdMapping(XtrIdMapping mapping) {
    XtrId xtrId = mapping.getMappingRecord().getXtrId();
    Preconditions.checkNotNull(xtrId, "Make sure you only call addXtrIdMapping when the MappingRecord " + "contains an xTR-ID");
    if (LOG.isDebugEnabled()) {
        LOG.debug("MD-SAL: Removing mapping for {}, xTR-ID {}", LispAddressStringifier.getString(mapping.getMappingRecord().getEid()), xtrId);
    }
    InstanceIdentifier<XtrIdMapping> path = InstanceIdentifierUtil.createXtrIdMappingIid(mapping.getMappingRecord().getEid(), MappingOrigin.Southbound, xtrId);
    deleteTransaction(path, LogicalDatastoreType.OPERATIONAL, "Deleting xTR-ID mapping from MD-SAL datastore failed");
}
Also used : XtrIdMapping(org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.db.instance.mapping.XtrIdMapping) XtrId(org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.XtrId)

Aggregations

XtrIdMapping (org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.db.instance.mapping.XtrIdMapping)5 XtrIdUri (org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.XtrIdUri)4 MappingKey (org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.db.instance.MappingKey)3 XtrIdMappingBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.db.instance.mapping.XtrIdMappingBuilder)3 XtrIdMappingKey (org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.db.instance.mapping.XtrIdMappingKey)3 Test (org.junit.Test)2 XtrId (org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.XtrId)2 PrepareForTest (org.powermock.core.classloader.annotations.PrepareForTest)2 MappingRecord (org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.mapping.record.container.MappingRecord)1 EidUri (org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.EidUri)1 MappingDatabase (org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.MappingDatabase)1 VniUri (org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.VniUri)1 Mapping (org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.db.instance.Mapping)1 VirtualNetworkIdentifierKey (org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.mapping.database.VirtualNetworkIdentifierKey)1