- throw new NetconfDocumentedException("Missing attribute" + rootNode.getNodeName(),
- NetconfDocumentedException.ErrorType.protocol, NetconfDocumentedException.ErrorTag.missing_attribute,
- NetconfDocumentedException.ErrorSeverity.error, ImmutableMap.of(NetconfDocumentedException.ErrorTag.missing_attribute.toString(),
- XmlNetconfConstants.MESSAGE_ID));
- }
-
- private static boolean isCloseSession(final NetconfMessage incomingDocument) {
- final Document document = incomingDocument.getDocument();
- XmlElement rpcElement = XmlElement.fromDomDocument(document);
- if (rpcElement.getOnlyChildElementOptionally(DefaultCloseSession.CLOSE_SESSION).isPresent()) {
- return true;
- }
-
- return false;
+ throw new DocumentedException("Missing attribute" + rootNode.getNodeName(),
+ DocumentedException.ErrorType.protocol, DocumentedException.ErrorTag.missing_attribute,
+ DocumentedException.ErrorSeverity.error,
+ ImmutableMap.of(DocumentedException.ErrorTag.missing_attribute.toString(),
+ XmlNetconfConstants.MESSAGE_ID));