Code Review
/
sdnc
/
northbound.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Updates for ODL Argon
[sdnc/northbound.git]
/
generic-resource-api
/
provider
/
src
/
main
/
java
/
org
/
onap
/
sdnc
/
northbound
/
GenericResourceApiProvider.java
diff --git
a/generic-resource-api/provider/src/main/java/org/onap/sdnc/northbound/GenericResourceApiProvider.java
b/generic-resource-api/provider/src/main/java/org/onap/sdnc/northbound/GenericResourceApiProvider.java
index
7eb4f2b
..
a8f1ee9
100644
(file)
--- a/
generic-resource-api/provider/src/main/java/org/onap/sdnc/northbound/GenericResourceApiProvider.java
+++ b/
generic-resource-api/provider/src/main/java/org/onap/sdnc/northbound/GenericResourceApiProvider.java
@@
-226,23
+226,29
@@
public class GenericResourceApiProvider implements AutoCloseable, GENERICRESOURC
private void createContainers() {
private void createContainers() {
- final WriteTransaction t = dataBroker.newReadWriteTransaction();
+ final WriteTransaction configT = dataBroker.newReadWriteTransaction();
+ final WriteTransaction operT = dataBroker.newReadWriteTransaction();
+
+
// Create the service-instance container
// Create the service-instance container
-
t
.merge(LogicalDatastoreType.CONFIGURATION, InstanceIdentifier.create(Services.class),
+
configT
.merge(LogicalDatastoreType.CONFIGURATION, InstanceIdentifier.create(Services.class),
new ServicesBuilder().build());
new ServicesBuilder().build());
-
t
.merge(LogicalDatastoreType.OPERATIONAL, InstanceIdentifier.create(Services.class),
+
operT
.merge(LogicalDatastoreType.OPERATIONAL, InstanceIdentifier.create(Services.class),
new ServicesBuilder().build());
// Create the PreloadInformation container
new ServicesBuilder().build());
// Create the PreloadInformation container
-
t
.merge(LogicalDatastoreType.CONFIGURATION, InstanceIdentifier.create(PreloadInformation.class),
+
configT
.merge(LogicalDatastoreType.CONFIGURATION, InstanceIdentifier.create(PreloadInformation.class),
new PreloadInformationBuilder().build());
new PreloadInformationBuilder().build());
-
t
.merge(LogicalDatastoreType.OPERATIONAL, InstanceIdentifier.create(PreloadInformation.class),
+
operT
.merge(LogicalDatastoreType.OPERATIONAL, InstanceIdentifier.create(PreloadInformation.class),
new PreloadInformationBuilder().build());
try {
new PreloadInformationBuilder().build());
try {
- FluentFuture<? extends @NonNull CommitInfo> checkedFuture = t.commit();
- checkedFuture.get();
+ FluentFuture<? extends @NonNull CommitInfo> configCheckedFuture = configT.commit();
+ configCheckedFuture.get();
+ FluentFuture<? extends @NonNull CommitInfo> operCheckedFuture = operT.commit();
+ operCheckedFuture.get();
+
log.info("Create containers succeeded!");
} catch (InterruptedException | ExecutionException e) {
log.info("Create containers succeeded!");
} catch (InterruptedException | ExecutionException e) {