Change-Id: I7af2cb2631136fb4ae947f7150ad2e5d8f2df567
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
// 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);
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(
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) {
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";