Remove duplicate netconf namespace constant 23/5523/1
authorMaros Marsalek <mmarsale@cisco.com>
Tue, 4 Mar 2014 14:30:10 +0000 (15:30 +0100)
committerMaros Marsalek <mmarsale@cisco.com>
Tue, 4 Mar 2014 14:30:10 +0000 (15:30 +0100)
Change-Id: I7af2cb2631136fb4ae947f7150ad2e5d8f2df567
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/operations/runtimerpc/RuntimeRpc.java
opendaylight/netconf/netconf-monitoring/src/main/java/org/opendaylight/controller/netconf/monitoring/Get.java
opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/xml/XMLNetconfUtil.java
opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/xml/XmlNetconfConstants.java

index b33eb1d796ab5a49fb06a61a3804df9b3a4e57d8..5b7c575e2fa637fbdda320eb911d464fcb69562c 100644 (file)
@@ -66,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
         // 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);
         new ObjectXmlWriter().prepareWritingStrategy(elementName, returnType, doc).writeElement(tempParent, namespace, mappedAttributeOpt.get());
 
         XmlElement xmlElement = XmlElement.fromDomElement(tempParent);
index 1b32b52e53476917e4ca57b6f25905fcc5bbd537..08da36148fa235cf20e8b006c052f985342e4dbf 100644 (file)
@@ -40,7 +40,7 @@ public class Get extends AbstractNetconfOperation {
     private Element getPlaceholder(Document innerResult) {
         try {
             XmlElement rootElement = XmlElement.fromDomElementWithExpected(innerResult.getDocumentElement(),
     private Element getPlaceholder(Document innerResult) {
         try {
             XmlElement rootElement = XmlElement.fromDomElementWithExpected(innerResult.getDocumentElement(),
-                    XmlNetconfConstants.RPC_REPLY_KEY, XmlNetconfConstants.RFC4741_TARGET_NAMESPACE);
+                    XmlNetconfConstants.RPC_REPLY_KEY, XmlNetconfConstants.URN_IETF_PARAMS_XML_NS_NETCONF_BASE_1_0);
             return rootElement.getOnlyChildElement(XmlNetconfConstants.DATA_KEY).getDomElement();
         } catch (RuntimeException e) {
             throw new IllegalArgumentException(String.format(
             return rootElement.getOnlyChildElement(XmlNetconfConstants.DATA_KEY).getDomElement();
         } catch (RuntimeException e) {
             throw new IllegalArgumentException(String.format(
index 3247e0f7a0e034402fcedda91b2b1e5ece7a1fe8..02ced96bf30d6cc6f6ae619f3b32053dbe17f4d8 100644 (file)
@@ -21,7 +21,7 @@ public final class XMLNetconfUtil {
         final XPathFactory xPathfactory = XPathFactory.newInstance();
         final XPath xpath = xPathfactory.newXPath();
         xpath.setNamespaceContext(new HardcodedNamespaceResolver("netconf",
         final XPathFactory xPathfactory = XPathFactory.newInstance();
         final XPath xpath = xPathfactory.newXPath();
         xpath.setNamespaceContext(new HardcodedNamespaceResolver("netconf",
-                XmlNetconfConstants.RFC4741_TARGET_NAMESPACE));
+                XmlNetconfConstants.URN_IETF_PARAMS_XML_NS_NETCONF_BASE_1_0));
         try {
             return xpath.compile(xPath);
         } catch (final XPathExpressionException e) {
         try {
             return xpath.compile(xPath);
         } catch (final XPathExpressionException e) {
index f32179a1e9682190a7a2a0700431c479c1ceefc9..c9f3a8a53b31dedf67b4f0560e9925f18cb2bf75 100644 (file)
@@ -38,10 +38,7 @@ public final class XmlNetconfConstants {
     public static final String PREFIX = "prefix";
 
     //
     public static final String PREFIX = "prefix";
 
     //
-    // TODO duplicate
-    public static final String RFC4741_TARGET_NAMESPACE = "urn:ietf:params:xml:ns:netconf:base:1.0";
     public static final String URN_IETF_PARAMS_XML_NS_NETCONF_BASE_1_0 = "urn:ietf:params:xml:ns:netconf:base:1.0";
     public static final String URN_IETF_PARAMS_XML_NS_NETCONF_BASE_1_0 = "urn:ietf:params:xml:ns:netconf:base:1.0";
-
     public static final String URN_IETF_PARAMS_XML_NS_YANG_IETF_NETCONF_MONITORING = "urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring";
     // TODO where to store namespace of config ?
     public static final String URN_OPENDAYLIGHT_PARAMS_XML_NS_YANG_CONTROLLER_CONFIG = "urn:opendaylight:params:xml:ns:yang:controller:config";
     public static final String URN_IETF_PARAMS_XML_NS_YANG_IETF_NETCONF_MONITORING = "urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring";
     // TODO where to store namespace of config ?
     public static final String URN_OPENDAYLIGHT_PARAMS_XML_NS_YANG_CONTROLLER_CONFIG = "urn:opendaylight:params:xml:ns:yang:controller:config";