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 b33eb1d..5b7c575 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
-        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);
index 1b32b52..08da361 100644 (file)
@@ -40,7 +40,7 @@ public class Get extends AbstractNetconfOperation {
     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(
index 3247e0f..02ced96 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",
-                XmlNetconfConstants.RFC4741_TARGET_NAMESPACE));
+                XmlNetconfConstants.URN_IETF_PARAMS_XML_NS_NETCONF_BASE_1_0));
         try {
             return xpath.compile(xPath);
         } catch (final XPathExpressionException e) {
index f32179a..c9f3a8a 100644 (file)
@@ -38,10 +38,7 @@ public final class XmlNetconfConstants {
     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_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";