Resolve Bug:448 - Remove yang-store api and impl.
[controller.git] / opendaylight / netconf / config-netconf-connector / src / main / java / org / opendaylight / controller / netconf / confignetconfconnector / operations / runtimerpc / RuntimeRpc.java
index 7463bdd429e4dc9552dfc390d59bcaba32fe5e5b..a7b42889b6180aded5b123e86b3adae71ac4a5f3 100644 (file)
@@ -8,11 +8,13 @@
 
 package org.opendaylight.controller.netconf.confignetconfconnector.operations.runtimerpc;
 
-import com.google.common.base.Optional;
-import com.google.common.base.Preconditions;
-import com.google.common.collect.Maps;
+import java.util.Map;
+
+import javax.management.ObjectName;
+import javax.management.openmbean.OpenType;
+
 import org.opendaylight.controller.config.util.ConfigRegistryClient;
-import org.opendaylight.controller.config.yang.store.api.YangStoreSnapshot;
+import org.opendaylight.controller.netconf.confignetconfconnector.osgi.YangStoreSnapshot;
 import org.opendaylight.controller.config.yangjmxgenerator.ModuleMXBeanEntry;
 import org.opendaylight.controller.config.yangjmxgenerator.RuntimeBeanEntry;
 import org.opendaylight.controller.config.yangjmxgenerator.RuntimeBeanEntry.Rpc;
@@ -36,9 +38,9 @@ import org.slf4j.LoggerFactory;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
-import javax.management.ObjectName;
-import javax.management.openmbean.OpenType;
-import java.util.Map;
+import com.google.common.base.Optional;
+import com.google.common.base.Preconditions;
+import com.google.common.collect.Maps;
 
 public class RuntimeRpc extends AbstractConfigNetconfOperation {
 
@@ -64,7 +66,7 @@ public class RuntimeRpc extends AbstractConfigNetconfOperation {
         // Either allow List of Elements to be returned from NetconfOperation or
         // pass reference to parent output xml element for netconf operations to
         // append result(s) on their own
-        Element tempParent = doc.createElementNS(XmlNetconfConstants.RFC4741_TARGET_NAMESPACE, "output");
+        Element tempParent = doc.createElementNS(XmlNetconfConstants.URN_IETF_PARAMS_XML_NS_NETCONF_BASE_1_0, "output");
         new ObjectXmlWriter().prepareWritingStrategy(elementName, returnType, doc).writeElement(tempParent, namespace, mappedAttributeOpt.get());
 
         XmlElement xmlElement = XmlElement.fromDomElement(tempParent);
@@ -127,7 +129,6 @@ public class RuntimeRpc extends AbstractConfigNetconfOperation {
         if (contextInstanceElement.isPresent() == false)
             return HandlingPriority.CANNOT_HANDLE;
 
-        // FIXME update xpath to instance to conform to config-api yang
         final RuntimeRpcElementResolved id = RuntimeRpcElementResolved.fromXpath(contextInstanceElement.get()
                 .getTextContent(), netconfOperationName, netconfOperationNamespace);
 
@@ -162,7 +163,7 @@ public class RuntimeRpc extends AbstractConfigNetconfOperation {
     }
 
     @Override
-    protected Element handle(Document document, XmlElement xml) throws NetconfDocumentedException {
+    protected Element handleWithNoSubsequentOperations(Document document, XmlElement xml) throws NetconfDocumentedException {
 
         // TODO exception handling
         // TODO check for namespaces and unknown elements
@@ -174,7 +175,7 @@ public class RuntimeRpc extends AbstractConfigNetconfOperation {
         final Object result = executeOperation(configRegistryClient, execution.on, execution.operationName,
                 execution.attributes);
 
-        logger.info("Operation {} called successfully on {} with arguments {} with result {}", execution.operationName,
+        logger.trace("Operation {} called successfully on {} with arguments {} with result {}", execution.operationName,
                 execution.on, execution.attributes, result);
 
         if (execution.isVoid()) {