mod_netconf: support for generic NETCONF operation
diff --git a/src/test-client.c b/src/test-client.c
index 7dc121f..2ff337e 100644
--- a/src/test-client.c
+++ b/src/test-client.c
@@ -69,7 +69,8 @@
MSG_LOCK,
MSG_UNLOCK,
MSG_KILL,
- MSG_INFO
+ MSG_INFO,
+ MSG_GENERIC
} MSG_TYPE;
void print_help(char* progname)
@@ -87,6 +88,7 @@
printf("\tlock\n");
printf("\tunlock\n");
printf("\tinfo\n");
+ printf("\tgeneric\n");
}
int main (int argc, char* argv[])
@@ -314,6 +316,20 @@
getline (&line, &len, stdin);
line[(strlen(line)-1)] = 0;
json_object_object_add(msg, "session", json_object_new_string(line));
+ } else if (strcmp(argv[1], "generic") == 0) {
+ /*
+ * Generic NETCONF request
+ */
+ msg = json_object_new_object();
+ json_object_object_add(msg, "type", json_object_new_int(MSG_GENERIC));
+ printf("Session: ");
+ getline (&line, &len, stdin);
+ line[(strlen(line)-1)] = 0;
+ json_object_object_add(msg, "session", json_object_new_string(line));
+ printf("NETCONF <rpc> content: ");
+ getline(&line, &len, stdin);
+ line[(strlen(line) - 1)] = 0;
+ json_object_object_add(msg, "content", json_object_new_string(line));
} else {
/*
* Unknown request