import org.opendaylight.netconf.sal.connect.api.DeviceActionFactory;
import org.opendaylight.netconf.sal.connect.api.RemoteDeviceHandler;
import org.opendaylight.netconf.sal.connect.netconf.listener.NetconfSessionPreferences;
+import org.opendaylight.netconf.sal.connect.netconf.schema.mapping.BaseNetconfSchemas;
import org.opendaylight.netconf.sal.connect.util.RemoteDeviceId;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.optional.rev190614.NetconfNodeAugmentedOptional;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.NetconfNode;
private NetconfNode node;
private EventExecutor eventExecutor;
private NetconfNodeAugmentedOptional nodeOptional;
+ private BaseNetconfSchemas baseSchemas;
public NetconfDeviceBuilder() {
}
return this;
}
+ public NetconfDeviceBuilder setBaseSchemas(final BaseNetconfSchemas baseSchemas) {
+ this.baseSchemas = requireNonNull(baseSchemas);
+ return this;
+ }
+
public NetconfDevice build() {
validation();
- return new NetconfDevice(this.schemaResourcesDTO, this.id, this.salFacade, this.globalProcessingExecutor,
- this.reconnectOnSchemasChange, this.deviceActionFactory, this.node, this.eventExecutor,
- this.nodeOptional);
+ return new NetconfDevice(this.schemaResourcesDTO, this.baseSchemas, this.id, this.salFacade,
+ this.globalProcessingExecutor, this.reconnectOnSchemasChange, this.deviceActionFactory, this.node,
+ this.eventExecutor, this.nodeOptional);
}
private void validation() {
+ requireNonNull(this.baseSchemas, "BaseSchemas is not initialized");
requireNonNull(this.id, "RemoteDeviceId is not initialized");
requireNonNull(this.salFacade, "RemoteDeviceHandler is not initialized");
requireNonNull(this.globalProcessingExecutor, "ExecutorService is not initialized");