import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.MappingDatabase;
import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.db.instance.AuthenticationKey;
import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.db.instance.Mapping;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.mapping.database.InstanceId;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.mapping.database.VirtualNetworkIdentifier;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
}
public void addAuthenticationKey(AuthenticationKey authenticationKey) {
- LOG.debug("MD-SAL: Adding authentication key '{}' for {}", authenticationKey.getAuthkey(),
- LispAddressStringifier.getString(authenticationKey.getLispAddressContainer()));
+ LOG.debug("MD-SAL: Adding authentication key '{}' for {}", authenticationKey.getMappingAuthkey().getKeyString(),
+ LispAddressStringifier.getString(authenticationKey.getEid()));
InstanceIdentifier<AuthenticationKey> path = InstanceIdentifierUtil
- .createAuthenticationKeyIid(authenticationKey.getLispAddressContainer());
+ .createAuthenticationKeyIid(authenticationKey.getEid());
writePutTransaction(path, authenticationKey, LogicalDatastoreType.CONFIGURATION,
"Adding authentication key to config datastrore failed");
}
public void addMapping(Mapping mapping) {
LOG.debug("MD-SAL: Adding mapping for {}",
- LispAddressStringifier.getString(mapping.getLispAddressContainer()));
+ LispAddressStringifier.getString(mapping.getMappingRecord().getEid()));
InstanceIdentifier<Mapping> path = InstanceIdentifierUtil
- .createMappingIid(mapping.getLispAddressContainer(), mapping.getOrigin());
+ .createMappingIid(mapping.getMappingRecord().getEid(), mapping.getOrigin());
writePutTransaction(path, mapping, LogicalDatastoreType.CONFIGURATION,
"Adding mapping to config datastrore failed");
}
public void removeAuthenticationKey(AuthenticationKey authenticationKey) {
LOG.debug("MD-SAL: Removing authentication key for {}",
- LispAddressStringifier.getString(authenticationKey.getLispAddressContainer()));
+ LispAddressStringifier.getString(authenticationKey.getEid()));
InstanceIdentifier<AuthenticationKey> path = InstanceIdentifierUtil
- .createAuthenticationKeyIid(authenticationKey.getLispAddressContainer());
+ .createAuthenticationKeyIid(authenticationKey.getEid());
deleteTransaction(path, LogicalDatastoreType.CONFIGURATION,
"Deleting authentication key from config datastrore failed");
}
public void removeMapping(Mapping mapping) {
LOG.debug("MD-SAL: Removing mapping for {}",
- LispAddressStringifier.getString(mapping.getLispAddressContainer()));
+ LispAddressStringifier.getString(mapping.getMappingRecord().getEid()));
InstanceIdentifier<Mapping> path = InstanceIdentifierUtil
- .createMappingIid(mapping.getLispAddressContainer(), mapping.getOrigin());
+ .createMappingIid(mapping.getMappingRecord().getEid(), mapping.getOrigin());
deleteTransaction(path, LogicalDatastoreType.CONFIGURATION, "Deleting mapping from config datastrore failed");
}
public void updateAuthenticationKey(AuthenticationKey authenticationKey) {
LOG.debug("MD-SAL: Updating authentication key for {} with '{}'",
- LispAddressStringifier.getString(authenticationKey.getLispAddressContainer()),
- authenticationKey.getAuthkey());
+ LispAddressStringifier.getString(authenticationKey.getEid()),
+ authenticationKey.getMappingAuthkey().getKeyString());
InstanceIdentifier<AuthenticationKey> path = InstanceIdentifierUtil
- .createAuthenticationKeyIid(authenticationKey.getLispAddressContainer());
+ .createAuthenticationKeyIid(authenticationKey.getEid());
writePutTransaction(path, authenticationKey, LogicalDatastoreType.CONFIGURATION,
"Updating authentication key in config datastrore failed");
}
public void updateMapping(Mapping mapping) {
LOG.debug("MD-SAL: Updating mapping for {}",
- LispAddressStringifier.getString(mapping.getLispAddressContainer()));
+ LispAddressStringifier.getString(mapping.getMappingRecord().getEid()));
InstanceIdentifier<Mapping> path = InstanceIdentifierUtil
- .createMappingIid(mapping.getLispAddressContainer(), mapping.getOrigin());
+ .createMappingIid(mapping.getMappingRecord().getEid(), mapping.getOrigin());
writePutTransaction(path, mapping, LogicalDatastoreType.CONFIGURATION,
"Updating mapping in config datastrore failed");
}
MappingDatabase mdb = readTransaction(path, LogicalDatastoreType.CONFIGURATION);
if (mdb != null) {
- for (InstanceId id : mdb.getInstanceId()) {
+ for (VirtualNetworkIdentifier id : mdb.getVirtualNetworkIdentifier()) {
List<Mapping> ms = id.getMapping();
if (ms != null) {
mappings.addAll(ms);
MappingDatabase mdb = readTransaction(path, LogicalDatastoreType.CONFIGURATION);
if (mdb != null) {
- for (InstanceId id : mdb.getInstanceId()) {
+ for (VirtualNetworkIdentifier id : mdb.getVirtualNetworkIdentifier()) {
List<AuthenticationKey> keys = id.getAuthenticationKey();
if (keys != null) {
authKeys.addAll(keys);