Bump upstreams
[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.netconf.server.api.monitoring.NetconfMonitoringService;
12 import org.opendaylight.netconf.server.api.operations.NetconfOperation;
13 import org.opendaylight.netconf.server.api.operations.NetconfOperationService;
14 import org.opendaylight.netconf.server.mdsal.monitoring.GetSchema;
15 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netconf.base._1._0.rev110601.SessionIdType;
16
17 public class NetconfMonitoringOperationService implements NetconfOperationService {
18     private final NetconfMonitoringService monitor;
19     private final SessionIdType sessionId;
20
21     public NetconfMonitoringOperationService(final SessionIdType sessionId, final NetconfMonitoringService monitor) {
22         this.sessionId = sessionId;
23         this.monitor = monitor;
24     }
25
26     @Override
27     public Set<NetconfOperation> getNetconfOperations() {
28         return Set.of(new Get(sessionId, monitor), new GetSchema(sessionId, monitor));
29     }
30
31     @Override
32     public void close() {
33         // No-op
34     }
35 }