+ // error reading the xml file bundled into the jar
+ throw new RuntimeException("Error while opening local resource " + resource, e);
+ }
+ }
+
+ static class EditAndCommitResponse {
+ private final NetconfMessage editResponse, commitResponse;
+
+ EditAndCommitResponse(NetconfMessage editResponse, NetconfMessage commitResponse) {
+ this.editResponse = editResponse;
+ this.commitResponse = commitResponse;
+ }
+
+ public NetconfMessage getEditResponse() {
+ return editResponse;
+ }
+
+ public NetconfMessage getCommitResponse() {
+ return commitResponse;
+ }
+
+ @Override
+ public String toString() {
+ return "EditAndCommitResponse{" +
+ "editResponse=" + editResponse +
+ ", commitResponse=" + commitResponse +
+ '}';
+ }
+ }
+
+
+ static class EditAndCommitResponseWithRetries {
+ private final EditAndCommitResponse editAndCommitResponse;
+ private final int retries;
+
+ EditAndCommitResponseWithRetries(EditAndCommitResponse editAndCommitResponse, int retries) {
+ this.editAndCommitResponse = editAndCommitResponse;
+ this.retries = retries;
+ }
+
+ public int getRetries() {
+ return retries;
+ }
+
+ public EditAndCommitResponse getEditAndCommitResponse() {
+ return editAndCommitResponse;
+ }
+
+ @Override
+ public String toString() {
+ return "EditAndCommitResponseWithRetries{" +
+ "editAndCommitResponse=" + editAndCommitResponse +
+ ", retries=" + retries +
+ '}';