this.dataBroker = dataBroker;
this.realLocations = new HashMap<>();
this.listenerRegistation = dataBroker.registerDataTreeChangeListener(
- new DataTreeIdentifier<>(LogicalDatastoreType.OPERATIONAL,
+ new DataTreeIdentifier<>(LogicalDatastoreType.CONFIGURATION,
InstanceIdentifier.builder(LocationProviders.class).child(LocationProvider.class).build()),
this);
}
.child(LocationProvider.class, provider.getKey())
.build();
WriteTransaction wtx = dataBroker.newWriteOnlyTransaction();
- wtx.put(LogicalDatastoreType.OPERATIONAL, iid, provider);
+ wtx.put(LogicalDatastoreType.CONFIGURATION, iid, provider);
wtx.submit().get();
ReadOnlyTransaction rtx = dataBroker.newReadOnlyTransaction();
.child(LocationProvider.class, provider.getKey())
.build();
WriteTransaction wtx = dataBroker.newWriteOnlyTransaction();
- wtx.put(LogicalDatastoreType.OPERATIONAL, iid, provider);
+ wtx.put(LogicalDatastoreType.CONFIGURATION, iid, provider);
wtx.submit().get();
ReadOnlyTransaction rtx = dataBroker.newReadOnlyTransaction();
.child(LocationProvider.class, new LocationProviderKey(new ProviderName(PROVIDER_NAME)))
.build();
WriteTransaction wtx = dataBroker.newWriteOnlyTransaction();
- wtx.delete(LogicalDatastoreType.OPERATIONAL, iid);
+ wtx.delete(LogicalDatastoreType.CONFIGURATION, iid);
wtx.submit().get();
ReadOnlyTransaction rtx = dataBroker.newReadOnlyTransaction();
.child(AbsoluteLocation.class)
.build();
WriteTransaction wtx = dataBroker.newWriteOnlyTransaction();
- wtx.put(LogicalDatastoreType.OPERATIONAL, iid, absoluteLocation);
+ wtx.put(LogicalDatastoreType.CONFIGURATION, iid, absoluteLocation);
wtx.submit().get();
ReadOnlyTransaction rtx = dataBroker.newReadOnlyTransaction();
.providerAddressEndpointLocationIid(NE_LOCATION_PROVIDER_NAME, IpPrefixType.class,
endpoint.getAddress(), endpoint.getContextType(), endpoint.getContextId())
.child(AbsoluteLocation.class);
- wtx.put(LogicalDatastoreType.OPERATIONAL, iid, createRealLocation(ne.getIid(), iface.getIid()),
+ wtx.put(LogicalDatastoreType.CONFIGURATION, iid, createRealLocation(ne.getIid(), iface.getIid()),
true);
LOG.debug("New location created for endpoint {}", endpoint);
return;
.providerAddressEndpointLocationIid(NE_LOCATION_PROVIDER_NAME, IpPrefixType.class,
endpoint.getAddress(), endpoint.getContextType(), endpoint.getContextId())
.child(AbsoluteLocation.class);
- wtx.delete(LogicalDatastoreType.OPERATIONAL, iid);
+ wtx.delete(LogicalDatastoreType.CONFIGURATION, iid);
LOG.debug("Location deleted for endpoint {}", endpoint);
return;
}
.providerAddressEndpointLocationIid(NE_LOCATION_PROVIDER_NAME, IpPrefixType.class,
endpoint.getAddress(), endpoint.getContextType(), endpoint.getContextId())
.child(AbsoluteLocation.class);
- wtx.put(LogicalDatastoreType.OPERATIONAL, iid, createRealLocation(nodeIID, connectorIID), true);
+ wtx.put(LogicalDatastoreType.CONFIGURATION, iid, createRealLocation(nodeIID, connectorIID), true);
LOG.debug("New location created for endpoint {}", endpoint);
return;
}
.providerAddressEndpointLocationIid(NE_LOCATION_PROVIDER_NAME, IpPrefixType.class,
endpoint.getAddress(), endpoint.getContextType(), endpoint.getContextId())
.child(AbsoluteLocation.class);
- wtx.delete(LogicalDatastoreType.OPERATIONAL, iid);
+ wtx.delete(LogicalDatastoreType.CONFIGURATION, iid);
LOG.debug("Location deleted for endpoint {}", endpoint);
return;
}
ReadOnlyTransaction rtx = dataBroker.newReadOnlyTransaction();
InstanceIdentifier<LocationProviders> locationIid = InstanceIdentifier.builder(LocationProviders.class).build();
CheckedFuture<Optional<LocationProviders>, ReadFailedException> read =
- rtx.read(LogicalDatastoreType.OPERATIONAL, locationIid);
+ rtx.read(LogicalDatastoreType.CONFIGURATION, locationIid);
assertTrue(read.get().isPresent());
rtx.close();
LocationProviders locations = read.get().get();
ReadOnlyTransaction rtx = dataBroker.newReadOnlyTransaction();
InstanceIdentifier<LocationProviders> locationIid = InstanceIdentifier.builder(LocationProviders.class).build();
CheckedFuture<Optional<LocationProviders>, ReadFailedException> read =
- rtx.read(LogicalDatastoreType.OPERATIONAL, locationIid);
+ rtx.read(LogicalDatastoreType.CONFIGURATION, locationIid);
assertTrue(read.get().isPresent());
rtx.close();
LocationProviders locations = read.get().get();
ReadOnlyTransaction rtx = dataBroker.newReadOnlyTransaction();
InstanceIdentifier<LocationProviders> locationIid = InstanceIdentifier.builder(LocationProviders.class).build();
CheckedFuture<Optional<LocationProviders>, ReadFailedException> read =
- rtx.read(LogicalDatastoreType.OPERATIONAL, locationIid);
+ rtx.read(LogicalDatastoreType.CONFIGURATION, locationIid);
assertTrue(read.get().isPresent());
rtx.close();
LocationProviders locations = read.get().get();