Call-Home provider migration to transport-api
[netconf.git] / apps / callhome-provider / src / main / java / org / opendaylight / netconf / callhome / mount / CallHomeTopology.java
1 /*
2  * Copyright (c) 2016 Brocade Communication Systems and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.netconf.callhome.mount;
9
10 import io.netty.util.Timer;
11 import java.util.concurrent.Executor;
12 import org.opendaylight.mdsal.binding.api.DataBroker;
13 import org.opendaylight.mdsal.dom.api.DOMMountPointService;
14 import org.opendaylight.netconf.client.NetconfClientFactory;
15 import org.opendaylight.netconf.client.mdsal.api.BaseNetconfSchemas;
16 import org.opendaylight.netconf.client.mdsal.api.DeviceActionFactory;
17 import org.opendaylight.netconf.client.mdsal.api.SchemaResourceManager;
18 import org.opendaylight.netconf.topology.spi.AbstractNetconfTopology;
19 import org.opendaylight.netconf.topology.spi.NetconfClientConfigurationBuilderFactory;
20 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId;
21 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node;
22
23 // Non-final for mocking
24 class CallHomeTopology extends AbstractNetconfTopology {
25     CallHomeTopology(final String topologyId, final NetconfClientFactory clientFactory, final Timer timer,
26             final Executor processingExecutor, final SchemaResourceManager schemaRepositoryProvider,
27             final DataBroker dataBroker, final DOMMountPointService mountPointService,
28             final NetconfClientConfigurationBuilderFactory builderFactory, final BaseNetconfSchemas baseSchemas,
29             final DeviceActionFactory deviceActionFactory) {
30         super(topologyId, clientFactory, timer, processingExecutor, schemaRepositoryProvider, dataBroker,
31             mountPointService, builderFactory, deviceActionFactory, baseSchemas);
32     }
33
34     void disableNode(final NodeId nodeId) {
35         deleteNode(nodeId);
36     }
37
38     void enableNode(final Node node) {
39         ensureNode(node);
40     }
41 }