@Test public void initTopology_2() throws Exception { SxpControllerInstance.initTopology(datastoreAccess, LogicalDatastoreType.OPERATIONAL); verify(writeTransaction, times(2)) .put(eq(LogicalDatastoreType.OPERATIONAL), any(InstanceIdentifier.class), any(DataObject.class)); }
static synchronized void initTopology(final DatastoreAccess datastoreAccess, final LogicalDatastoreType datastoreType) { InstanceIdentifier<NetworkTopology> networkTopologyIndentifier = InstanceIdentifier.builder(NetworkTopology.class).build(); datastoreAccess.putIfNotExists(networkTopologyIndentifier, new NetworkTopologyBuilder().build(), datastoreType); datastoreAccess.putIfNotExists(NodeIdentityListener.SUBSCRIBED_PATH, new TopologyBuilder().withKey(new TopologyKey(new TopologyId(Configuration.TOPOLOGY_NAME))).build(), datastoreType); }
SxpControllerInstance implements ClusterSingletonService, AutoCloseable { static synchronized void initTopology(final DatastoreAccess datastoreAccess, final LogicalDatastoreType datastoreType) { InstanceIdentifier<NetworkTopology> networkTopologyIndentifier = InstanceIdentifier.builder(NetworkTopology.class).build(); datastoreAccess.putIfNotExists(networkTopologyIndentifier, new NetworkTopologyBuilder().build(), datastoreType); datastoreAccess.putIfNotExists(NodeIdentityListener.SUBSCRIBED_PATH, new TopologyBuilder().withKey(new TopologyKey(new TopologyId(Configuration.TOPOLOGY_NAME))).build(), datastoreType); } }
SxpControllerInstance implements ClusterSingletonService, AutoCloseable { static synchronized void initTopology(final DatastoreAccess datastoreAccess, final LogicalDatastoreType datastoreType) { InstanceIdentifier<NetworkTopology> networkTopologyIndentifier = InstanceIdentifier.builder(NetworkTopology.class).build(); datastoreAccess.putIfNotExists(networkTopologyIndentifier, new NetworkTopologyBuilder().build(), datastoreType); datastoreAccess.putIfNotExists(NodeIdentityListener.SUBSCRIBED_PATH, new TopologyBuilder().withKey(new TopologyKey(new TopologyId(Configuration.TOPOLOGY_NAME))).build(), datastoreType); }  }
SxpControllerInstance implements ClusterSingletonService, AutoCloseable { static synchronized void initTopology(final DatastoreAccess datastoreAccess, final LogicalDatastoreType datastoreType) { InstanceIdentifier<NetworkTopology> networkTopologyIndentifier = InstanceIdentifier.builder(NetworkTopology.class).build(); datastoreAccess.putIfNotExists(networkTopologyIndentifier, new NetworkTopologyBuilder().build(), datastoreType); datastoreAccess.putIfNotExists(NodeIdentityListener.SUBSCRIBED_PATH, new TopologyBuilder().withKey(new TopologyKey(new TopologyId(Configuration.TOPOLOGY_NAME))).build(), datastoreType); }  void init(); @Override synchronized void instantiateServiceInstance(); @Override synchronized ListenableFuture<Void> closeServiceInstance(); @Override ServiceGroupIdentifier getIdentifier(); @Override synchronized void close(); void setDataBroker(DataBroker dataBroker); void setClusteringServiceProvider(ClusterSingletonServiceProvider clusteringServiceProvider); void setRpcProviderService(RpcProviderService rpcProviderService); }
SxpControllerInstance implements ClusterSingletonService, AutoCloseable { static synchronized void initTopology(final DatastoreAccess datastoreAccess, final LogicalDatastoreType datastoreType) { InstanceIdentifier<NetworkTopology> networkTopologyIndentifier = InstanceIdentifier.builder(NetworkTopology.class).build(); datastoreAccess.putIfNotExists(networkTopologyIndentifier, new NetworkTopologyBuilder().build(), datastoreType); datastoreAccess.putIfNotExists(NodeIdentityListener.SUBSCRIBED_PATH, new TopologyBuilder().withKey(new TopologyKey(new TopologyId(Configuration.TOPOLOGY_NAME))).build(), datastoreType); }  void init(); @Override synchronized void instantiateServiceInstance(); @Override synchronized ListenableFuture<Void> closeServiceInstance(); @Override ServiceGroupIdentifier getIdentifier(); @Override synchronized void close(); void setDataBroker(DataBroker dataBroker); void setClusteringServiceProvider(ClusterSingletonServiceProvider clusteringServiceProvider); void setRpcProviderService(RpcProviderService rpcProviderService); static final ServiceGroupIdentifier IDENTIFIER; }