""";
private static final String EXPECTED_NOTIFICATION =
- "<notification xmlns=\"urn:ietf:params:netconf:capability:notification:1.0\">\n"
+ "<notification xmlns=\"urn:ietf:params:xml:ns:netconf:notification:1.0\">\n"
+ INNER_NOTIFICATION
+ " <eventTime>" + NotificationMessage.RFC3339_DATE_FORMATTER.apply(EVENT_TIME) + "</eventTime>\n"
+ "</notification>\n";
final Element baseNotification = notificationContent.getDocumentElement();
final Element entireNotification = notificationContent.createElementNS(
- XmlNetconfConstants.URN_IETF_PARAMS_NETCONF_CAPABILITY_NOTIFICATION_1_0,
+ XmlNetconfConstants.URN_IETF_PARAMS_XML_NS_NETCONF_NOTIFICATION_1_0,
XmlNetconfConstants.NOTIFICATION_ELEMENT_NAME);
entireNotification.appendChild(baseNotification);
final Element eventTimeElement = notificationContent.createElementNS(
- XmlNetconfConstants.URN_IETF_PARAMS_NETCONF_CAPABILITY_NOTIFICATION_1_0, XmlNetconfConstants.EVENT_TIME);
+ XmlNetconfConstants.URN_IETF_PARAMS_XML_NS_NETCONF_NOTIFICATION_1_0, XmlNetconfConstants.EVENT_TIME);
eventTimeElement.setTextContent(RFC3339_DATE_FORMATTER.apply(eventTime));
entireNotification.appendChild(eventTimeElement);
public static final String URN_IETF_PARAMS_NETCONF_BASE_1_0 = "urn:ietf:params:netconf:base:1.0";
public static final String URN_IETF_PARAMS_NETCONF_BASE_1_1 = "urn:ietf:params:netconf:base:1.1";
public static final String URN_IETF_PARAMS_XML_NS_NETCONF_EXI_1_0 = "urn:ietf:params:xml:ns:netconf:exi:1.0";
+ public static final String URN_IETF_PARAMS_XML_NS_NETCONF_NOTIFICATION_1_0 =
+ "urn:ietf:params:xml:ns:netconf:notification:1.0";
+
public static final String URN_IETF_PARAMS_NETCONF_CAPABILITY_NOTIFICATION_1_0 =
"urn:ietf:params:netconf:capability:notification:1.0";
public static final String URN_IETF_PARAMS_NETCONF_CAPABILITY_ROLLBACK_ON_ERROR_1_0 =
final NotificationMessage netconfNotification = new NotificationMessage(document, eventTime);
final Document resultDoc = netconfNotification.getDocument();
final NodeList nodeList = resultDoc.getElementsByTagNameNS(
- "urn:ietf:params:netconf:capability:notification:1.0", "notification");
+ "urn:ietf:params:xml:ns:netconf:notification:1.0", "notification");
assertNotNull(nodeList);
// expected only the one NOTIFICATION tag
final Element entireNotification = (Element) nodeList.item(0);
final NodeList childNodes = entireNotification.getElementsByTagNameNS(
- "urn:ietf:params:netconf:capability:notification:1.0", "eventTime");
+ "urn:ietf:params:xml:ns:netconf:notification:1.0", "eventTime");
assertNotNull(childNodes);
// expected only the one EVENT_TIME tag
}
private static void removeEventTimeNode(final Document document) {
- final Node eventTimeNode = document.getDocumentElement().getElementsByTagNameNS(XmlNetconfConstants
- .URN_IETF_PARAMS_NETCONF_CAPABILITY_NOTIFICATION_1_0, XmlNetconfConstants.EVENT_TIME).item(0);
+ final Node eventTimeNode = document.getDocumentElement()
+ .getElementsByTagNameNS(
+ XmlNetconfConstants.URN_IETF_PARAMS_XML_NS_NETCONF_NOTIFICATION_1_0, XmlNetconfConstants.EVENT_TIME)
+ .item(0);
document.getDocumentElement().removeChild(eventTimeNode);
}
<username>admin</username>
<session-id>2</session-id>
</netconf-session-end>
-
-
-
~ terms of the Eclipse Public License v1.0 which accompanies this distribution,
~ and is available at http://www.eclipse.org/legal/epl-v10.html
-->
-<notification xmlns="urn:ietf:params:netconf:capability:notification:1.0">
+<notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
<netconf-session-end xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-notifications">
<username>admin</username>
<session-id>2</session-id>
~ terms of the Eclipse Public License v1.0 which accompanies this distribution,
~ and is available at http://www.eclipse.org/legal/epl-v10.html
-->
-<notification xmlns="urn:ietf:params:netconf:capability:notification:1.0">
+<notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
<netconf-session-end xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-notifications">
<username>admin</username>
<session-id>2</session-id>
~ terms of the Eclipse Public License v1.0 which accompanies this distribution,
~ and is available at http://www.eclipse.org/legal/epl-v10.html
-->
-<notification xmlns="urn:ietf:params:netconf:capability:notification:1.0">
+<notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
<netconf-session-start xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-notifications">
<username>admin</username>
<session-id>2</session-id>
~ terms of the Eclipse Public License v1.0 which accompanies this distribution,
~ and is available at http://www.eclipse.org/legal/epl-v10.html
-->
-<notification xmlns="urn:ietf:params:netconf:capability:notification:1.0">
+<notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
<netconf-session-start xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-notifications">
<username>admin</username>
<session-id>2</session-id>
~ terms of the Eclipse Public License v1.0 which accompanies this distribution,
~ and is available at http://www.eclipse.org/legal/epl-v10.html
-->
-<notification xmlns="urn:ietf:params:netconf:capability:notification:1.0">
+<notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
<netconf-session-end xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-notifications">
<username>admin</username>
<session-id>2</session-id>