import java.util.Hashtable;
import org.opendaylight.controller.sal.binding.api.BindingAwareBroker;
+import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceRegistration;
private static final Logger log = LoggerFactory.getLogger(BrokerActivator.class);
private BindingAwareBrokerImpl baSal;
private ServiceRegistration<BindingAwareBroker> baSalRegistration;
-
+ private HashMapDataStore store = new HashMapDataStore();
+ private InstanceIdentifier<?> root = InstanceIdentifier.builder().toInstance();
+
@Override
public void start(BundleContext context) throws Exception {
log.info("Binding Aware Broker initialized");
baSal = new BindingAwareBrokerImpl();
baSal.setBrokerBundleContext(context);
baSal.start();
+ baSal.getDataBroker().registerDataReader(root, store);
+ baSal.getDataBroker().registerCommitHandler(root, store);
BindingAwareBroker baSalService = baSal;
Hashtable<String, String> properties = new Hashtable<>();