use of org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.eid.container.Eid in project lispflowmapping by opendaylight.
the class AuthKeyDb method getAuthenticationKey.
/*
* Retrieves authentication key from the database. As opposed to the mapping cache, Source/Dest keys are treated as
* exact match keys here, and a two level longest prefix match is NOT performed.
*/
@Override
public MappingAuthkey getAuthenticationKey(Eid eid) {
ILispDAO table = getVniTable(eid);
if (table == null) {
return null;
}
if (MaskUtil.isMaskable(eid.getAddress()) && !(eid.getAddress() instanceof SourceDestKey)) {
return getAuthKeyLpm(eid, table);
} else {
Eid key = MaskUtil.normalize(eid);
Object password = table.getSpecific(key, SubKeys.AUTH_KEY);
if (password != null && password instanceof MappingAuthkey) {
return (MappingAuthkey) password;
} else {
LOG.warn("Failed to find password!");
return null;
}
}
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.eid.container.Eid in project lispflowmapping by opendaylight.
the class FlatMapCache method addMapping.
@Override
public void addMapping(Eid eid, Object value) {
Eid key = MaskUtil.normalize(eid);
dao.put(key, new MappingEntry<>(SubKeys.RECORD, value));
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.eid.container.Eid in project lispflowmapping by opendaylight.
the class FlatMapCache method removeData.
@Override
public void removeData(Eid eid, String subKey) {
Eid key = MaskUtil.normalize(eid);
dao.removeSpecific(key, subKey);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.eid.container.Eid in project lispflowmapping by opendaylight.
the class FlatMapCache method addData.
@Override
public void addData(Eid eid, String subKey, Object value) {
Eid key = MaskUtil.normalize(eid);
dao.put(key, new MappingEntry<>(subKey, value));
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.eid.container.Eid in project lispflowmapping by opendaylight.
the class MultiTableMapCache method removeData.
@Override
public void removeData(Eid eid, String subKey) {
Eid key = MaskUtil.normalize(eid);
ILispDAO table = getVniTable(key);
if (table == null) {
return;
}
if (key.getAddress() instanceof SourceDestKey) {
ILispDAO db = getSDInnerDao(key, table);
if (db != null) {
db.removeSpecific(SourceDestKeyHelper.getSrcBinary(key), subKey);
if (db.isEmpty()) {
removeSDInnerDao(key, table);
}
}
} else {
table.removeSpecific(key, subKey);
}
if (table.isEmpty()) {
removeVniTable(eid);
}
}
Aggregations