Search in sources :

Example 1 with SchemaResourcesDTO

use of org.opendaylight.netconf.sal.connect.netconf.NetconfDevice.SchemaResourcesDTO in project netconf by opendaylight.

the class DefaultSchemaResourceManager method createResources.

@NonNull
private SchemaResourcesDTO createResources(final String subdir) {
    // Setup the baseline empty registry
    final SharedSchemaRepository repository = new SharedSchemaRepository(subdir, parserFactory);
    // Teach the registry how to transform YANG text to IRSchemaSource internally
    repository.registerSchemaSourceListener(TextToIRTransformer.create(repository, repository));
    // Attach a soft cache of IRSchemaSource instances. This is important during convergence when we are fishing
    // for a consistent set of modules, as it skips the need to re-parse the text sources multiple times. It also
    // helps establishing different sets of contexts, as they can share this pre-made cache.
    repository.registerSchemaSourceListener(// FIXME: add knobs to control cache lifetime explicitly
    GuavaSchemaSourceCache.createSoftCache(repository, IRSchemaSource.class));
    // Attach the filesystem cache, providing persistence capability, so that restarts do not require us to
    // re-populate the cache. This also acts as a side-load capability, as anything pre-populated into that
    // directory will not be fetched from the device.
    repository.registerSchemaSourceListener(new FilesystemSchemaSourceCache<>(repository, YangTextSchemaSource.class, new File(rootDirectory + File.separator + subdir)));
    return new SchemaResourcesDTO(repository, repository, repository.createEffectiveModelContextFactory(SchemaContextFactoryConfiguration.getDefault()), new NetconfStateSchemasResolverImpl());
}
Also used : IRSchemaSource(org.opendaylight.yangtools.yang.parser.rfc7950.ir.IRSchemaSource) YangTextSchemaSource(org.opendaylight.yangtools.yang.model.repo.api.YangTextSchemaSource) NetconfStateSchemasResolverImpl(org.opendaylight.netconf.sal.connect.netconf.NetconfStateSchemasResolverImpl) File(java.io.File) SharedSchemaRepository(org.opendaylight.yangtools.yang.parser.repo.SharedSchemaRepository) SchemaResourcesDTO(org.opendaylight.netconf.sal.connect.netconf.NetconfDevice.SchemaResourcesDTO) Objects.requireNonNull(java.util.Objects.requireNonNull) NonNull(org.eclipse.jdt.annotation.NonNull)

Example 2 with SchemaResourcesDTO

use of org.opendaylight.netconf.sal.connect.netconf.NetconfDevice.SchemaResourcesDTO in project netconf by opendaylight.

the class NetconfNodeActorTest method registerSlaveMountPoint.

private ActorRef registerSlaveMountPoint() {
    SchemaResourcesDTO schemaResourceDTO2 = mock(SchemaResourcesDTO.class);
    doReturn(mockRegistry).when(schemaResourceDTO2).getSchemaRegistry();
    doReturn(mockSchemaRepository).when(schemaResourceDTO2).getSchemaRepository();
    final ActorRef slaveRef = system.actorOf(NetconfNodeActor.props(NetconfTopologySetupBuilder.create().setSchemaResourceDTO(schemaResourceDTO2).setActorSystem(system).setBaseSchemas(BASE_SCHEMAS).build(), remoteDeviceId, TIMEOUT, mockMountPointService));
    doReturn(Futures.immediateFuture(mockSchemaContext)).when(mockSchemaContextFactory).createEffectiveModelContext(anyCollection());
    slaveRef.tell(new RegisterMountPoint(ImmutableList.of(SOURCE_IDENTIFIER1, SOURCE_IDENTIFIER2), masterRef), testKit.getRef());
    verify(mockMountPointBuilder, timeout(5000)).register();
    verify(mockMountPointBuilder).addService(eq(DOMSchemaService.class), any());
    verify(mockMountPointBuilder).addService(eq(DOMDataBroker.class), any());
    verify(mockMountPointBuilder).addService(eq(NetconfDataTreeService.class), any());
    verify(mockMountPointBuilder).addService(eq(DOMRpcService.class), any());
    verify(mockMountPointBuilder).addService(eq(DOMNotificationService.class), any());
    testKit.expectMsgClass(Success.class);
    return slaveRef;
}
Also used : NetconfDataTreeService(org.opendaylight.netconf.dom.api.NetconfDataTreeService) DOMRpcService(org.opendaylight.mdsal.dom.api.DOMRpcService) ActorRef(akka.actor.ActorRef) TestActorRef(akka.testkit.TestActorRef) RegisterMountPoint(org.opendaylight.netconf.topology.singleton.messages.RegisterMountPoint) DOMDataBroker(org.opendaylight.mdsal.dom.api.DOMDataBroker) DOMSchemaService(org.opendaylight.mdsal.dom.api.DOMSchemaService) SchemaResourcesDTO(org.opendaylight.netconf.sal.connect.netconf.NetconfDevice.SchemaResourcesDTO) DOMNotificationService(org.opendaylight.mdsal.dom.api.DOMNotificationService)

Example 3 with SchemaResourcesDTO

use of org.opendaylight.netconf.sal.connect.netconf.NetconfDevice.SchemaResourcesDTO in project netconf by opendaylight.

the class NetconfNodeActorTest method testRegisterMountPointWithSchemaFailures.

@SuppressWarnings("unchecked")
@Test
public void testRegisterMountPointWithSchemaFailures() throws Exception {
    SchemaResourcesDTO schemaResourceDTO2 = mock(SchemaResourcesDTO.class);
    doReturn(mockRegistry).when(schemaResourceDTO2).getSchemaRegistry();
    doReturn(mockSchemaRepository).when(schemaResourceDTO2).getSchemaRepository();
    final NetconfTopologySetup setup = NetconfTopologySetupBuilder.create().setSchemaResourceDTO(schemaResourceDTO2).setBaseSchemas(BASE_SCHEMAS).setActorSystem(system).build();
    final ActorRef slaveRef = system.actorOf(NetconfNodeActor.props(setup, remoteDeviceId, TIMEOUT, mockMountPointService));
    // Test unrecoverable failure.
    doReturn(Futures.immediateFailedFuture(new SchemaResolutionException("mock"))).when(mockSchemaContextFactory).createEffectiveModelContext(anyCollection());
    slaveRef.tell(new RegisterMountPoint(ImmutableList.of(SOURCE_IDENTIFIER1, SOURCE_IDENTIFIER2), masterRef), testKit.getRef());
    testKit.expectMsgClass(Success.class);
    verify(mockRegistry, timeout(5000)).registerSchemaSource(any(), withSourceId(SOURCE_IDENTIFIER1));
    verify(mockRegistry, timeout(5000)).registerSchemaSource(any(), withSourceId(SOURCE_IDENTIFIER2));
    verify(mockMountPointBuilder, after(1000).never()).register();
    verify(mockSchemaSourceReg1, timeout(1000)).close();
    verify(mockSchemaSourceReg2, timeout(1000)).close();
    // Test recoverable AskTimeoutException - schema context resolution should be retried.
    reset(mockSchemaSourceReg1, mockSchemaSourceReg2);
    doReturn(Futures.immediateFailedFuture(new SchemaResolutionException("mock", new AskTimeoutException("timeout")))).doReturn(Futures.immediateFuture(mockSchemaContext)).when(mockSchemaContextFactory).createEffectiveModelContext(anyCollection());
    slaveRef.tell(new RegisterMountPoint(ImmutableList.of(SOURCE_IDENTIFIER1, SOURCE_IDENTIFIER2), masterRef), testKit.getRef());
    testKit.expectMsgClass(Success.class);
    verify(mockMountPointBuilder, timeout(5000)).register();
    verifyNoMoreInteractions(mockSchemaSourceReg1, mockSchemaSourceReg2);
    // Test AskTimeoutException with an interleaved successful registration. The first schema context resolution
    // attempt should not be retried.
    reset(mockSchemaSourceReg1, mockSchemaSourceReg2, mockSchemaRepository, mockSchemaContextFactory);
    resetMountPointMocks();
    final EffectiveModelContextFactory mockSchemaContextFactorySuccess = mock(EffectiveModelContextFactory.class);
    doReturn(Futures.immediateFuture(mockSchemaContext)).when(mockSchemaContextFactorySuccess).createEffectiveModelContext(anyCollection());
    doAnswer(unused -> {
        SettableFuture<SchemaContext> future = SettableFuture.create();
        new Thread(() -> {
            doReturn(mockSchemaContextFactorySuccess).when(mockSchemaRepository).createEffectiveModelContextFactory();
            slaveRef.tell(new RegisterMountPoint(ImmutableList.of(SOURCE_IDENTIFIER1, SOURCE_IDENTIFIER2), masterRef), testKit.getRef());
            future.setException(new SchemaResolutionException("mock", new AskTimeoutException("timeout")));
        }).start();
        return future;
    }).when(mockSchemaContextFactory).createEffectiveModelContext(anyCollection());
    doReturn(mockSchemaContextFactory).when(mockSchemaRepository).createEffectiveModelContextFactory();
    slaveRef.tell(new RegisterMountPoint(ImmutableList.of(SOURCE_IDENTIFIER1, SOURCE_IDENTIFIER2), masterRef), testKit.getRef());
    verify(mockMountPointBuilder, timeout(5000)).register();
    verify(mockSchemaRepository, times(2)).createEffectiveModelContextFactory();
}
Also used : SchemaResolutionException(org.opendaylight.yangtools.yang.model.repo.api.SchemaResolutionException) ActorRef(akka.actor.ActorRef) TestActorRef(akka.testkit.TestActorRef) EffectiveModelContextFactory(org.opendaylight.yangtools.yang.model.repo.api.EffectiveModelContextFactory) RegisterMountPoint(org.opendaylight.netconf.topology.singleton.messages.RegisterMountPoint) AskTimeoutException(akka.pattern.AskTimeoutException) SchemaContext(org.opendaylight.yangtools.yang.model.api.SchemaContext) SchemaResourcesDTO(org.opendaylight.netconf.sal.connect.netconf.NetconfDevice.SchemaResourcesDTO) NetconfTopologySetup(org.opendaylight.netconf.topology.singleton.impl.utils.NetconfTopologySetup) Test(org.junit.Test)

Example 4 with SchemaResourcesDTO

use of org.opendaylight.netconf.sal.connect.netconf.NetconfDevice.SchemaResourcesDTO in project netconf by opendaylight.

the class NetconfNodeActorTest method testMissingSchemaSourceOnMissingProvider.

@Test(expected = MissingSchemaSourceException.class)
public void testMissingSchemaSourceOnMissingProvider() throws Exception {
    final SharedSchemaRepository repository = new SharedSchemaRepository("test");
    SchemaResourcesDTO schemaResourceDTO2 = mock(SchemaResourcesDTO.class);
    doReturn(repository).when(schemaResourceDTO2).getSchemaRegistry();
    doReturn(repository).when(schemaResourceDTO2).getSchemaRepository();
    final NetconfTopologySetup setup = NetconfTopologySetupBuilder.create().setActorSystem(system).setSchemaResourceDTO(schemaResourceDTO2).setIdleTimeout(Duration.apply(1, TimeUnit.SECONDS)).setBaseSchemas(BASE_SCHEMAS).build();
    final Props props = NetconfNodeActor.props(setup, remoteDeviceId, TIMEOUT, mockMountPointService);
    ActorRef actor = TestActorRef.create(system, props, "master_messages_2");
    final SourceIdentifier sourceIdentifier = RevisionSourceIdentifier.create("testID");
    final ProxyYangTextSourceProvider proxyYangProvider = new ProxyYangTextSourceProvider(actor, system.dispatcher(), TIMEOUT);
    final Future<YangTextSchemaSourceSerializationProxy> resolvedSchemaFuture = proxyYangProvider.getYangTextSchemaSource(sourceIdentifier);
    Await.result(resolvedSchemaFuture, TIMEOUT.duration());
}
Also used : ActorRef(akka.actor.ActorRef) TestActorRef(akka.testkit.TestActorRef) SourceIdentifier(org.opendaylight.yangtools.yang.model.repo.api.SourceIdentifier) RevisionSourceIdentifier(org.opendaylight.yangtools.yang.model.repo.api.RevisionSourceIdentifier) YangTextSchemaSourceSerializationProxy(org.opendaylight.controller.cluster.schema.provider.impl.YangTextSchemaSourceSerializationProxy) Props(akka.actor.Props) SharedSchemaRepository(org.opendaylight.yangtools.yang.parser.repo.SharedSchemaRepository) SchemaResourcesDTO(org.opendaylight.netconf.sal.connect.netconf.NetconfDevice.SchemaResourcesDTO) NetconfTopologySetup(org.opendaylight.netconf.topology.singleton.impl.utils.NetconfTopologySetup) Test(org.junit.Test)

Example 5 with SchemaResourcesDTO

use of org.opendaylight.netconf.sal.connect.netconf.NetconfDevice.SchemaResourcesDTO in project netconf by opendaylight.

the class MountPointEndToEndTest method setupMaster.

private void setupMaster() throws Exception {
    AbstractConcurrentDataBrokerTest dataBrokerTest = newDataBrokerTest();
    masterDataBroker = dataBrokerTest.getDataBroker();
    deviceDOMDataBroker = dataBrokerTest.getDomBroker();
    bindingToNormalized = dataBrokerTest.getDataBrokerTestCustomizer().getAdapterContext().currentSerializer();
    masterSystem = ActorSystem.create(ACTOR_SYSTEM_NAME, ConfigFactory.load().getConfig("Master"));
    masterClusterSingletonServiceProvider = new DOMClusterSingletonServiceProviderImpl();
    masterClusterSingletonServiceProvider.initializeProvider();
    doReturn(masterSystem).when(mockMasterActorSystemProvider).getActorSystem();
    doReturn(MoreExecutors.newDirectExecutorService()).when(mockThreadPool).getExecutor();
    final SchemaResourcesDTO resources = resourceManager.getSchemaResources(new NetconfNodeBuilder().setSchemaCacheDirectory(TEST_DEFAULT_SUBDIR).build(), "test");
    resources.getSchemaRegistry().registerSchemaSource(id -> Futures.immediateFuture(YangTextSchemaSource.delegateForByteSource(id, topModuleInfo.getYangTextByteSource())), PotentialSchemaSource.create(RevisionSourceIdentifier.create(TOP_MODULE_NAME, topModuleInfo.getName().getRevision()), YangTextSchemaSource.class, 1));
    masterNetconfTopologyManager = new NetconfTopologyManager(BASE_SCHEMAS, masterDataBroker, mockRpcProviderRegistry, mockActionProviderRegistry, masterClusterSingletonServiceProvider, mockKeepaliveExecutor, mockThreadPool, mockMasterActorSystemProvider, eventExecutor, mockClientDispatcher, TOPOLOGY_ID, config, masterMountPointService, mockEncryptionService, mockRpcProviderService, deviceActionFactory, resourceManager) {

        @Override
        protected NetconfTopologyContext newNetconfTopologyContext(final NetconfTopologySetup setup, final ServiceGroupIdentifier serviceGroupIdent, final Timeout actorResponseWaitTime, final DeviceActionFactory deviceActionFact) {
            NetconfTopologyContext context = super.newNetconfTopologyContext(setup, serviceGroupIdent, actorResponseWaitTime, deviceActionFact);
            NetconfTopologyContext spiedContext = spy(context);
            doAnswer(invocation -> {
                final MasterSalFacade spiedFacade = (MasterSalFacade) spy(invocation.callRealMethod());
                doReturn(deviceDOMDataBroker).when(spiedFacade).newDeviceDataBroker();
                masterSalFacadeFuture.set(spiedFacade);
                return spiedFacade;
            }).when(spiedContext).newMasterSalFacade();
            return spiedContext;
        }
    };
    masterNetconfTopologyManager.init();
    verifyTopologyNodesCreated(masterDataBroker);
}
Also used : DeviceActionFactory(org.opendaylight.netconf.sal.connect.api.DeviceActionFactory) SchemaResourceManager(org.opendaylight.netconf.sal.connect.api.SchemaResourceManager) ThreadPool(org.opendaylight.controller.config.threadpool.ThreadPool) ServiceGroupIdentifier(org.opendaylight.mdsal.singleton.common.api.ServiceGroupIdentifier) ConfigBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.topology.singleton.config.rev170419.ConfigBuilder) GetTopOutputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.list.rev140701.GetTopOutputBuilder) Mockito.doAnswer(org.mockito.Mockito.doAnswer) Map(java.util.Map) MapNode(org.opendaylight.yangtools.yang.data.api.schema.MapNode) DOMActionProviderService(org.opendaylight.mdsal.dom.api.DOMActionProviderService) PutTopInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.list.rev140701.PutTopInputBuilder) YangInstanceIdentifier(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier) Mockito.doReturn(org.mockito.Mockito.doReturn) ContainerNode(org.opendaylight.yangtools.yang.data.api.schema.ContainerNode) NodeBuilder(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.NodeBuilder) DOMActionService(org.opendaylight.mdsal.dom.api.DOMActionService) DOMDataTreeReadOperations(org.opendaylight.mdsal.dom.api.DOMDataTreeReadOperations) Awaitility.await(org.awaitility.Awaitility.await) Module(org.opendaylight.yangtools.yang.model.api.Module) ActorSystemProvider(org.opendaylight.controller.cluster.ActorSystemProvider) Set(java.util.Set) ErrorType(org.opendaylight.yangtools.yang.common.RpcError.ErrorType) DOMRpcIdentifier(org.opendaylight.mdsal.dom.api.DOMRpcIdentifier) NetworkTopology(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NetworkTopology) FluentFutures(org.opendaylight.yangtools.util.concurrent.FluentFutures) NetconfNodeConnectionStatus(org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.NetconfNodeConnectionStatus) Top(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.list.rev140701.Top) Assert.assertFalse(org.junit.Assert.assertFalse) PotentialSchemaSource(org.opendaylight.yangtools.yang.model.repo.spi.PotentialSchemaSource) NetconfSessionPreferences(org.opendaylight.netconf.sal.connect.netconf.listener.NetconfSessionPreferences) MapEntryNode(org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode) MockitoJUnitRunner(org.mockito.junit.MockitoJUnitRunner) Mockito.mock(org.mockito.Mockito.mock) EventExecutor(io.netty.util.concurrent.EventExecutor) YangTextSchemaSource(org.opendaylight.yangtools.yang.model.repo.api.YangTextSchemaSource) Mock(org.mockito.Mock) TransactionChainListener(org.opendaylight.mdsal.binding.api.TransactionChainListener) RpcDefinition(org.opendaylight.yangtools.yang.model.api.RpcDefinition) RunWith(org.junit.runner.RunWith) DOMMountPointService(org.opendaylight.mdsal.dom.api.DOMMountPointService) Mockito.spy(org.mockito.Mockito.spy) Timeout(akka.util.Timeout) ArrayList(java.util.ArrayList) ClusterSingletonServiceRegistration(org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServiceRegistration) Mockito.timeout(org.mockito.Mockito.timeout) Lists(com.google.common.collect.Lists) DefaultDOMRpcResult(org.opendaylight.mdsal.dom.spi.DefaultDOMRpcResult) Host(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Host) DOMRpcResult(org.opendaylight.mdsal.dom.api.DOMRpcResult) GetTopInput(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.list.rev140701.GetTopInput) Before(org.junit.Before) ReconnectFuture(org.opendaylight.netconf.nettyutil.ReconnectFuture) Node(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node) EmptyMountPointContext(org.opendaylight.yangtools.rfc8528.data.util.EmptyMountPointContext) WriteTransaction(org.opendaylight.mdsal.binding.api.WriteTransaction) Keystore(org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.keystore.rev171017.Keystore) Assert.assertTrue(org.junit.Assert.assertTrue) FileUtils(org.apache.commons.io.FileUtils) Test(org.junit.Test) TopLevelListKey(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.list.rev140701.two.level.list.TopLevelListKey) DOMRpcRouter(org.opendaylight.mdsal.dom.broker.DOMRpcRouter) NetconfMessageTransformUtil(org.opendaylight.netconf.sal.connect.netconf.util.NetconfMessageTransformUtil) File(java.io.File) QName(org.opendaylight.yangtools.yang.common.QName) ExecutionException(java.util.concurrent.ExecutionException) Topology(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.Topology) Mockito.never(org.mockito.Mockito.never) Futures(com.google.common.util.concurrent.Futures) NetconfTopologyUtils(org.opendaylight.netconf.topology.singleton.impl.utils.NetconfTopologyUtils) Assert.assertNull(org.junit.Assert.assertNull) InstanceIdentifier(org.opendaylight.yangtools.yang.binding.InstanceIdentifier) RpcProviderService(org.opendaylight.mdsal.binding.api.RpcProviderService) RevisionSourceIdentifier(org.opendaylight.yangtools.yang.model.repo.api.RevisionSourceIdentifier) LogicalDatastoreType(org.opendaylight.mdsal.common.api.LogicalDatastoreType) IpAddress(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress) KeyedInstanceIdentifier(org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier) DOMRpcProviderService(org.opendaylight.mdsal.dom.api.DOMRpcProviderService) Assert.assertEquals(org.junit.Assert.assertEquals) RpcError(org.opendaylight.yangtools.yang.common.RpcError) DataBroker(org.opendaylight.mdsal.binding.api.DataBroker) DefaultSchemaResourceManager(org.opendaylight.netconf.sal.connect.impl.DefaultSchemaResourceManager) DOMDataTreeWriteTransaction(org.opendaylight.mdsal.dom.api.DOMDataTreeWriteTransaction) ClusteringRpcException(org.opendaylight.netconf.topology.singleton.impl.utils.ClusteringRpcException) TopologyNetconf(org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.network.topology.topology.topology.types.TopologyNetconf) Config(org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.topology.singleton.config.rev170419.Config) BindingReflections(org.opendaylight.mdsal.binding.spec.reflect.BindingReflections) LoggerFactory(org.slf4j.LoggerFactory) TimeoutException(java.util.concurrent.TimeoutException) SettableFuture(com.google.common.util.concurrent.SettableFuture) AbstractConcurrentDataBrokerTest(org.opendaylight.mdsal.binding.dom.adapter.test.AbstractConcurrentDataBrokerTest) GlobalEventExecutor(io.netty.util.concurrent.GlobalEventExecutor) NetconfNode(org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.NetconfNode) ReadTransaction(org.opendaylight.mdsal.binding.api.ReadTransaction) NetconfNodeBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.NetconfNodeBuilder) After(org.junit.After) Assert.fail(org.junit.Assert.fail) BindingNormalizedNodeSerializer(org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer) LoginPasswordUnencryptedBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.netconf.node.credentials.credentials.login.pw.unencrypted.LoginPasswordUnencryptedBuilder) DOMDataTreeReadWriteTransaction(org.opendaylight.mdsal.dom.api.DOMDataTreeReadWriteTransaction) Ipv4Address(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address) LoginPwUnencryptedBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.netconf.node.credentials.credentials.LoginPwUnencryptedBuilder) DefaultYangParserFactory(org.opendaylight.yangtools.yang.parser.impl.DefaultYangParserFactory) NetconfTopologySetup(org.opendaylight.netconf.topology.singleton.impl.utils.NetconfTopologySetup) ImmutableSet(com.google.common.collect.ImmutableSet) ImmutableMap(com.google.common.collect.ImmutableMap) Uint16(org.opendaylight.yangtools.yang.common.Uint16) NetconfClientDispatcher(org.opendaylight.netconf.client.NetconfClientDispatcher) TransactionChain(org.opendaylight.mdsal.binding.api.TransactionChain) DOMDataBroker(org.opendaylight.mdsal.dom.api.DOMDataBroker) PortNumber(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.PortNumber) ImmutableNodes(org.opendaylight.yangtools.yang.data.impl.schema.ImmutableNodes) ActorSystem(akka.actor.ActorSystem) Entry(java.util.Map.Entry) Optional(java.util.Optional) TopLevelListBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.list.rev140701.two.level.list.TopLevelListBuilder) DOMService(org.opendaylight.mdsal.dom.api.DOMService) ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) MoreExecutors(com.google.common.util.concurrent.MoreExecutors) ListenableFuture(com.google.common.util.concurrent.ListenableFuture) DataTreeIdentifier(org.opendaylight.mdsal.binding.api.DataTreeIdentifier) DOMRpcImplementation(org.opendaylight.mdsal.dom.api.DOMRpcImplementation) TopLevelList(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.list.rev140701.two.level.list.TopLevelList) NodeId(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId) ImmutableList(com.google.common.collect.ImmutableList) ScheduledThreadPool(org.opendaylight.controller.config.threadpool.ScheduledThreadPool) DOMMountPointListener(org.opendaylight.mdsal.dom.api.DOMMountPointListener) ConfigFactory(com.typesafe.config.ConfigFactory) DataTreeModification(org.opendaylight.mdsal.binding.api.DataTreeModification) SimpleEntry(java.util.AbstractMap.SimpleEntry) DataObjectModification(org.opendaylight.mdsal.binding.api.DataObjectModification) Builders(org.opendaylight.yangtools.yang.data.impl.schema.Builders) DOMClusterSingletonServiceProviderImpl(org.opendaylight.mdsal.singleton.dom.impl.DOMClusterSingletonServiceProviderImpl) BindingRuntimeHelpers(org.opendaylight.mdsal.binding.runtime.spi.BindingRuntimeHelpers) ClusterSingletonServiceProvider(org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServiceProvider) Uint32(org.opendaylight.yangtools.yang.common.Uint32) Logger(org.slf4j.Logger) Iterator(java.util.Iterator) Assert.assertNotNull(org.junit.Assert.assertNotNull) DOMRpcService(org.opendaylight.mdsal.dom.api.DOMRpcService) TestKit(akka.testkit.javadsl.TestKit) EffectiveModelContext(org.opendaylight.yangtools.yang.model.api.EffectiveModelContext) Transaction(org.opendaylight.mdsal.binding.api.Transaction) Mockito.verify(org.mockito.Mockito.verify) TimeUnit(java.util.concurrent.TimeUnit) YangModuleInfo(org.opendaylight.yangtools.yang.binding.YangModuleInfo) AAAEncryptionService(org.opendaylight.aaa.encrypt.AAAEncryptionService) DOMMountPoint(org.opendaylight.mdsal.dom.api.DOMMountPoint) SchemaResourcesDTO(org.opendaylight.netconf.sal.connect.netconf.NetconfDevice.SchemaResourcesDTO) DOMMountPointServiceImpl(org.opendaylight.mdsal.dom.broker.DOMMountPointServiceImpl) RpcResultBuilder(org.opendaylight.yangtools.yang.common.RpcResultBuilder) NodeKey(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.NodeKey) NormalizedNode(org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode) FluentFuture(com.google.common.util.concurrent.FluentFuture) YangTextSchemaSource(org.opendaylight.yangtools.yang.model.repo.api.YangTextSchemaSource) NetconfNodeBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.NetconfNodeBuilder) Timeout(akka.util.Timeout) DeviceActionFactory(org.opendaylight.netconf.sal.connect.api.DeviceActionFactory) SchemaResourcesDTO(org.opendaylight.netconf.sal.connect.netconf.NetconfDevice.SchemaResourcesDTO) NetconfTopologySetup(org.opendaylight.netconf.topology.singleton.impl.utils.NetconfTopologySetup) DOMClusterSingletonServiceProviderImpl(org.opendaylight.mdsal.singleton.dom.impl.DOMClusterSingletonServiceProviderImpl) ServiceGroupIdentifier(org.opendaylight.mdsal.singleton.common.api.ServiceGroupIdentifier) AbstractConcurrentDataBrokerTest(org.opendaylight.mdsal.binding.dom.adapter.test.AbstractConcurrentDataBrokerTest)

Aggregations

SchemaResourcesDTO (org.opendaylight.netconf.sal.connect.netconf.NetconfDevice.SchemaResourcesDTO)7 ActorRef (akka.actor.ActorRef)3 TestActorRef (akka.testkit.TestActorRef)3 Test (org.junit.Test)3 NetconfTopologySetup (org.opendaylight.netconf.topology.singleton.impl.utils.NetconfTopologySetup)3 File (java.io.File)2 Objects.requireNonNull (java.util.Objects.requireNonNull)2 NetconfSessionPreferences (org.opendaylight.netconf.sal.connect.netconf.listener.NetconfSessionPreferences)2 Host (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Host)2 IpAddress (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress)2 RevisionSourceIdentifier (org.opendaylight.yangtools.yang.model.repo.api.RevisionSourceIdentifier)2 ActorSystem (akka.actor.ActorSystem)1 Props (akka.actor.Props)1 AskTimeoutException (akka.pattern.AskTimeoutException)1 TestKit (akka.testkit.javadsl.TestKit)1 Timeout (akka.util.Timeout)1 ImmutableList (com.google.common.collect.ImmutableList)1 ImmutableMap (com.google.common.collect.ImmutableMap)1 ImmutableSet (com.google.common.collect.ImmutableSet)1 Lists (com.google.common.collect.Lists)1