Integrate netconf-mapping-api into netconf-server
[netconf.git] / netconf / tools / netconf-testtool / src / main / java / org / opendaylight / netconf / test / tool / monitoring / NetconfMonitoringOperationService.java
1 /*
2  * Copyright (c) 2013 Cisco Systems, Inc. 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.test.tool.monitoring;
9
10 import java.util.Set;
11 import org.opendaylight.controller.config.yang.netconf.mdsal.monitoring.GetSchema;
12 import org.opendaylight.netconf.api.monitoring.NetconfMonitoringService;
13 import org.opendaylight.netconf.server.api.operations.NetconfOperation;
14 import org.opendaylight.netconf.server.api.operations.NetconfOperationService;
15
16 public class NetconfMonitoringOperationService implements NetconfOperationService {
17     private final NetconfMonitoringService monitor;
18
19     public NetconfMonitoringOperationService(final NetconfMonitoringService monitor) {
20         this.monitor = monitor;
21     }
22
23     @Override
24     public Set<NetconfOperation> getNetconfOperations() {
25         return Set.of(new Get(monitor), new GetSchema("testtool-session", monitor));
26     }
27
28     @Override
29     public void close() {
30         // No-op
31     }
32 }