void addFlowExample() { DataBrokerService dataService = context.getSALService(DataBrokerService.class); DataModificationTransaction transaction = dataService.beginTransaction(); Flow flow = createSampleFlow("foo", null); InstanceIdentifier<Flow> path = InstanceIdentifier.builder().node(Flows.class).node(Flow.class, flow.getKey()) .toInstance(); transaction.putConfigurationData(path, flow); transaction.commit(); dataService.readConfigurationData(path); }
public InstanceIdentifier<Flows> apply() { InstanceIdentifierBuilder<? extends Object> _builder = InstanceIdentifier.builder(); InstanceIdentifierBuilder<Flows> _node = _builder.<Flows>node(Flows.class); InstanceIdentifier<Flows> _instance = _node.toInstance(); return _instance; } }.apply();