@Override protected Element handleWithNoSubsequentOperations( final Document document, final XmlElement operationElement) throws DocumentedException { boolean commitStatus = transactionProvider.commitTransaction(); LOG.trace("Transaction commited succesfuly {}", commitStatus); return XmlUtil.createElement(document, XmlNetconfConstants.OK, Optional.<String>absent()); }
@VisibleForTesting Element getResponseInternal(final Document document, final ConfigExecution configExecution) throws DocumentedException { try { getConfigSubsystemFacade().executeConfigExecution(configExecution); } catch (final ValidationException e) { LOG.warn("Test phase for {} failed", EditConfigXmlParser.EDIT_CONFIG, e); final Map<String, String> errorInfo = new HashMap<>(); errorInfo.put(ErrorTag.OPERATION_FAILED.name(), e.getMessage()); throw new DocumentedException( "Test phase: " + e.getMessage(), e, ErrorType.APPLICATION, ErrorTag.OPERATION_FAILED, ErrorSeverity.ERROR, errorInfo); } LOG.trace("Operation {} successful", EditConfigXmlParser.EDIT_CONFIG); return XmlUtil.createElement(document, XmlNetconfConstants.OK, Optional.<String>absent()); }