Remove GraphModel Config init. in datastore 16/89316/4
authorOlivier Dugeon <olivier.dugeon@orange.com>
Thu, 23 Apr 2020 13:34:53 +0000 (15:34 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Mon, 3 Aug 2020 10:11:15 +0000 (12:11 +0200)
Both Configuration and Operation GraphModels are initialized within
the same single transaction in ConnnectedGraphServer class. Remove
unnecessary initialization of GraphModel Configuration.

JIRA: BGPCEP-904
Change-Id: If5988b916a23d85c9e0b8a8c9c378bd5e6931fba
Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
graph/graph-impl/src/main/java/org/opendaylight/graph/impl/ConnectedGraphServer.java

index c12b53b8e5834028a8981b33d69953d59ed62129..891b07a339a66dbe40bdee9164c8e7b6b08570ac 100644 (file)
@@ -88,11 +88,7 @@ public class ConnectedGraphServer implements ConnectedGraphProvider, Transaction
         requireNonNull(this.chain, "A valid transaction chain must be provided.");
         final WriteTransaction trans = this.chain.newWriteOnlyTransaction();
         LOG.info("Create Graph Model at top level in Operational DataStore: {}", this.graphTopologyIdentifier);
-        trans.put(LogicalDatastoreType.OPERATIONAL, this.graphTopologyIdentifier,
-                new GraphTopologyBuilder().build());
-        trans.put(LogicalDatastoreType.CONFIGURATION, this.graphTopologyIdentifier,
-                new GraphTopologyBuilder().build());
-        LOG.info("Create Graph Model at top level in Configuration DataStore: {}", this.graphTopologyIdentifier);
+        trans.put(LogicalDatastoreType.OPERATIONAL, this.graphTopologyIdentifier, new GraphTopologyBuilder().build());
         trans.commit().addCallback(new FutureCallback<CommitInfo>() {
             @Override
             public void onSuccess(final CommitInfo result) {