Integrate netconf-mapping-api into netconf-server
[netconf.git] / netconf / tools / netconf-testtool / src / main / java / org / opendaylight / netconf / test / tool / monitoring / Get.java
index b47b9e74443b9cd1a4916a161ece1af723b9778b..57432bebb11c6c60ea52972e4bc308bca8d4e8de 100644 (file)
@@ -12,9 +12,9 @@ import org.opendaylight.netconf.api.DocumentedException;
 import org.opendaylight.netconf.api.monitoring.NetconfMonitoringService;
 import org.opendaylight.netconf.api.xml.XmlElement;
 import org.opendaylight.netconf.api.xml.XmlNetconfConstants;
-import org.opendaylight.netconf.mapping.api.HandlingPriority;
-import org.opendaylight.netconf.mapping.api.NetconfOperationChainedExecution;
-import org.opendaylight.netconf.util.mapping.AbstractNetconfOperation;
+import org.opendaylight.netconf.server.api.operations.AbstractNetconfOperation;
+import org.opendaylight.netconf.server.api.operations.HandlingPriority;
+import org.opendaylight.netconf.server.api.operations.NetconfOperationChainedExecution;
 import org.opendaylight.yangtools.yang.common.ErrorSeverity;
 import org.opendaylight.yangtools.yang.common.ErrorTag;
 import org.opendaylight.yangtools.yang.common.ErrorType;
@@ -24,8 +24,8 @@ import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
 public class Get extends AbstractNetconfOperation {
-
     private static final Logger LOG = LoggerFactory.getLogger(Get.class);
+
     private final NetconfMonitoringService netconfMonitor;
 
     public Get(final NetconfMonitoringService netconfMonitor) {
@@ -33,14 +33,6 @@ public class Get extends AbstractNetconfOperation {
         this.netconfMonitor = netconfMonitor;
     }
 
-    private Element getPlaceholder(final Document innerResult)
-            throws DocumentedException {
-        final XmlElement rootElement = XmlElement.fromDomElementWithExpected(
-                innerResult.getDocumentElement(), XmlNetconfConstants.RPC_REPLY_KEY,
-                XmlNetconfConstants.URN_IETF_PARAMS_XML_NS_NETCONF_BASE_1_0);
-        return rootElement.getOnlyChildElement(XmlNetconfConstants.DATA_KEY).getDomElement();
-    }
-
     @Override
     protected String getOperationName() {
         return XmlNetconfConstants.GET;
@@ -87,4 +79,11 @@ public class Get extends AbstractNetconfOperation {
                              final NetconfOperationChainedExecution subsequentOperation) {
         throw new UnsupportedOperationException("Never gets called");
     }
+
+    private static Element getPlaceholder(final Document innerResult) throws DocumentedException {
+        return XmlElement.fromDomElementWithExpected(innerResult.getDocumentElement(),
+            XmlNetconfConstants.RPC_REPLY_KEY, XmlNetconfConstants.URN_IETF_PARAMS_XML_NS_NETCONF_BASE_1_0)
+            .getOnlyChildElement(XmlNetconfConstants.DATA_KEY)
+            .getDomElement();
+    }
 }