json_reformat uses two spaces for when indenting nested objects, let's
do the same. The result of virJSONValueToString will be exactly the same
as json_reformat would produce.
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
src/util/virjson.c | 4 +-
.../virnetdaemondata/output-data-admin-nomdns.json | 254 ++++++++++-----------
.../output-data-admin-server-names.json | 254 ++++++++++-----------
.../virnetdaemondata/output-data-anon-clients.json | 128 +++++------
tests/virnetdaemondata/output-data-client-ids.json | 128 +++++------
.../output-data-client-timestamp.json | 132 +++++------
.../output-data-initial-nomdns.json | 128 +++++------
tests/virnetdaemondata/output-data-initial.json | 130 +++++------
.../output-data-no-keepalive-required.json | 254 ++++++++++-----------
9 files changed, 706 insertions(+), 706 deletions(-)
diff --git a/src/util/virjson.c b/src/util/virjson.c
index ae6362b..1022cfc 100644
--- a/src/util/virjson.c
+++ b/src/util/virjson.c
@@ -1756,7 +1756,7 @@ virJSONValueToString(virJSONValuePtr object,
char *ret = NULL;
yajl_size_t len;
# ifndef WITH_YAJL2
- yajl_gen_config conf = { pretty ? 1 : 0, pretty ? " " : " "};
+ yajl_gen_config conf = { pretty ? 1 : 0, pretty ? " " : " "};
# endif
VIR_DEBUG("object=%p", object);
@@ -1765,7 +1765,7 @@ virJSONValueToString(virJSONValuePtr object,
g = yajl_gen_alloc(NULL);
if (g) {
yajl_gen_config(g, yajl_gen_beautify, pretty ? 1 : 0);
- yajl_gen_config(g, yajl_gen_indent_string, pretty ? " " : "
");
+ yajl_gen_config(g, yajl_gen_indent_string, pretty ? " " : "
");
yajl_gen_config(g, yajl_gen_validate_utf8, 1);
}
# else
diff --git a/tests/virnetdaemondata/output-data-admin-nomdns.json
b/tests/virnetdaemondata/output-data-admin-nomdns.json
index ca3acd1..fc960f0 100644
--- a/tests/virnetdaemondata/output-data-admin-nomdns.json
+++ b/tests/virnetdaemondata/output-data-admin-nomdns.json
@@ -1,132 +1,132 @@
{
- "servers": {
- "testServer0": {
- "min_workers": 10,
- "max_workers": 50,
- "priority_workers": 5,
- "max_clients": 100,
- "max_anonymous_clients": 100,
- "keepaliveInterval": 120,
- "keepaliveCount": 5,
- "next_client_id": 3,
- "services": [
- {
- "auth": 0,
- "readonly": true,
- "nrequests_client_max": 2,
- "socks": [
- {
- "fd": 100,
- "errfd": -1,
- "pid": 0,
- "isClient": false
- }
- ]
- },
- {
- "auth": 2,
- "readonly": false,
- "nrequests_client_max": 5,
- "socks": [
- {
- "fd": 101,
- "errfd": -1,
- "pid": 0,
- "isClient": false
- }
- ]
- }
- ],
- "clients": [
- {
- "id": 1,
- "auth": 1,
- "readonly": true,
- "nrequests_max": 15,
- "sock": {
- "fd": 102,
- "errfd": -1,
- "pid": -1,
- "isClient": true
- }
- },
- {
- "id": 2,
- "auth": 2,
- "readonly": true,
- "nrequests_max": 66,
- "sock": {
- "fd": 103,
- "errfd": -1,
- "pid": -1,
- "isClient": true
- }
- }
- ]
+ "servers": {
+ "testServer0": {
+ "min_workers": 10,
+ "max_workers": 50,
+ "priority_workers": 5,
+ "max_clients": 100,
+ "max_anonymous_clients": 100,
+ "keepaliveInterval": 120,
+ "keepaliveCount": 5,
+ "next_client_id": 3,
+ "services": [
+ {
+ "auth": 0,
+ "readonly": true,
+ "nrequests_client_max": 2,
+ "socks": [
+ {
+ "fd": 100,
+ "errfd": -1,
+ "pid": 0,
+ "isClient": false
+ }
+ ]
},
- "testServer1": {
- "min_workers": 2,
- "max_workers": 50,
- "priority_workers": 5,
- "max_clients": 100,
- "max_anonymous_clients": 100,
- "keepaliveInterval": 120,
- "keepaliveCount": 5,
- "next_client_id": 3,
- "services": [
- {
- "auth": 0,
- "readonly": true,
- "nrequests_client_max": 2,
- "socks": [
- {
- "fd": 100,
- "errfd": -1,
- "pid": 0,
- "isClient": false
- }
- ]
- },
- {
- "auth": 2,
- "readonly": false,
- "nrequests_client_max": 5,
- "socks": [
- {
- "fd": 101,
- "errfd": -1,
- "pid": 0,
- "isClient": false
- }
- ]
- }
- ],
- "clients": [
- {
- "id": 1,
- "auth": 1,
- "readonly": true,
- "nrequests_max": 15,
- "sock": {
- "fd": 102,
- "errfd": -1,
- "pid": -1,
- "isClient": true
- }
- },
- {
- "id": 2,
- "auth": 2,
- "readonly": true,
- "nrequests_max": 66,
- "sock": {
- "fd": 103,
- "errfd": -1,
- "pid": -1,
- "isClient": true
- }
- }
- ]
+ {
+ "auth": 2,
+ "readonly": false,
+ "nrequests_client_max": 5,
+ "socks": [
+ {
+ "fd": 101,
+ "errfd": -1,
+ "pid": 0,
+ "isClient": false
+ }
+ ]
}
+ ],
+ "clients": [
+ {
+ "id": 1,
+ "auth": 1,
+ "readonly": true,
+ "nrequests_max": 15,
+ "sock": {
+ "fd": 102,
+ "errfd": -1,
+ "pid": -1,
+ "isClient": true
+ }
+ },
+ {
+ "id": 2,
+ "auth": 2,
+ "readonly": true,
+ "nrequests_max": 66,
+ "sock": {
+ "fd": 103,
+ "errfd": -1,
+ "pid": -1,
+ "isClient": true
+ }
+ }
+ ]
+ },
+ "testServer1": {
+ "min_workers": 2,
+ "max_workers": 50,
+ "priority_workers": 5,
+ "max_clients": 100,
+ "max_anonymous_clients": 100,
+ "keepaliveInterval": 120,
+ "keepaliveCount": 5,
+ "next_client_id": 3,
+ "services": [
+ {
+ "auth": 0,
+ "readonly": true,
+ "nrequests_client_max": 2,
+ "socks": [
+ {
+ "fd": 100,
+ "errfd": -1,
+ "pid": 0,
+ "isClient": false
+ }
+ ]
+ },
+ {
+ "auth": 2,
+ "readonly": false,
+ "nrequests_client_max": 5,
+ "socks": [
+ {
+ "fd": 101,
+ "errfd": -1,
+ "pid": 0,
+ "isClient": false
+ }
+ ]
+ }
+ ],
+ "clients": [
+ {
+ "id": 1,
+ "auth": 1,
+ "readonly": true,
+ "nrequests_max": 15,
+ "sock": {
+ "fd": 102,
+ "errfd": -1,
+ "pid": -1,
+ "isClient": true
+ }
+ },
+ {
+ "id": 2,
+ "auth": 2,
+ "readonly": true,
+ "nrequests_max": 66,
+ "sock": {
+ "fd": 103,
+ "errfd": -1,
+ "pid": -1,
+ "isClient": true
+ }
+ }
+ ]
}
+ }
}
diff --git a/tests/virnetdaemondata/output-data-admin-server-names.json
b/tests/virnetdaemondata/output-data-admin-server-names.json
index ca3acd1..fc960f0 100644
--- a/tests/virnetdaemondata/output-data-admin-server-names.json
+++ b/tests/virnetdaemondata/output-data-admin-server-names.json
@@ -1,132 +1,132 @@
{
- "servers": {
- "testServer0": {
- "min_workers": 10,
- "max_workers": 50,
- "priority_workers": 5,
- "max_clients": 100,
- "max_anonymous_clients": 100,
- "keepaliveInterval": 120,
- "keepaliveCount": 5,
- "next_client_id": 3,
- "services": [
- {
- "auth": 0,
- "readonly": true,
- "nrequests_client_max": 2,
- "socks": [
- {
- "fd": 100,
- "errfd": -1,
- "pid": 0,
- "isClient": false
- }
- ]
- },
- {
- "auth": 2,
- "readonly": false,
- "nrequests_client_max": 5,
- "socks": [
- {
- "fd": 101,
- "errfd": -1,
- "pid": 0,
- "isClient": false
- }
- ]
- }
- ],
- "clients": [
- {
- "id": 1,
- "auth": 1,
- "readonly": true,
- "nrequests_max": 15,
- "sock": {
- "fd": 102,
- "errfd": -1,
- "pid": -1,
- "isClient": true
- }
- },
- {
- "id": 2,
- "auth": 2,
- "readonly": true,
- "nrequests_max": 66,
- "sock": {
- "fd": 103,
- "errfd": -1,
- "pid": -1,
- "isClient": true
- }
- }
- ]
+ "servers": {
+ "testServer0": {
+ "min_workers": 10,
+ "max_workers": 50,
+ "priority_workers": 5,
+ "max_clients": 100,
+ "max_anonymous_clients": 100,
+ "keepaliveInterval": 120,
+ "keepaliveCount": 5,
+ "next_client_id": 3,
+ "services": [
+ {
+ "auth": 0,
+ "readonly": true,
+ "nrequests_client_max": 2,
+ "socks": [
+ {
+ "fd": 100,
+ "errfd": -1,
+ "pid": 0,
+ "isClient": false
+ }
+ ]
},
- "testServer1": {
- "min_workers": 2,
- "max_workers": 50,
- "priority_workers": 5,
- "max_clients": 100,
- "max_anonymous_clients": 100,
- "keepaliveInterval": 120,
- "keepaliveCount": 5,
- "next_client_id": 3,
- "services": [
- {
- "auth": 0,
- "readonly": true,
- "nrequests_client_max": 2,
- "socks": [
- {
- "fd": 100,
- "errfd": -1,
- "pid": 0,
- "isClient": false
- }
- ]
- },
- {
- "auth": 2,
- "readonly": false,
- "nrequests_client_max": 5,
- "socks": [
- {
- "fd": 101,
- "errfd": -1,
- "pid": 0,
- "isClient": false
- }
- ]
- }
- ],
- "clients": [
- {
- "id": 1,
- "auth": 1,
- "readonly": true,
- "nrequests_max": 15,
- "sock": {
- "fd": 102,
- "errfd": -1,
- "pid": -1,
- "isClient": true
- }
- },
- {
- "id": 2,
- "auth": 2,
- "readonly": true,
- "nrequests_max": 66,
- "sock": {
- "fd": 103,
- "errfd": -1,
- "pid": -1,
- "isClient": true
- }
- }
- ]
+ {
+ "auth": 2,
+ "readonly": false,
+ "nrequests_client_max": 5,
+ "socks": [
+ {
+ "fd": 101,
+ "errfd": -1,
+ "pid": 0,
+ "isClient": false
+ }
+ ]
}
+ ],
+ "clients": [
+ {
+ "id": 1,
+ "auth": 1,
+ "readonly": true,
+ "nrequests_max": 15,
+ "sock": {
+ "fd": 102,
+ "errfd": -1,
+ "pid": -1,
+ "isClient": true
+ }
+ },
+ {
+ "id": 2,
+ "auth": 2,
+ "readonly": true,
+ "nrequests_max": 66,
+ "sock": {
+ "fd": 103,
+ "errfd": -1,
+ "pid": -1,
+ "isClient": true
+ }
+ }
+ ]
+ },
+ "testServer1": {
+ "min_workers": 2,
+ "max_workers": 50,
+ "priority_workers": 5,
+ "max_clients": 100,
+ "max_anonymous_clients": 100,
+ "keepaliveInterval": 120,
+ "keepaliveCount": 5,
+ "next_client_id": 3,
+ "services": [
+ {
+ "auth": 0,
+ "readonly": true,
+ "nrequests_client_max": 2,
+ "socks": [
+ {
+ "fd": 100,
+ "errfd": -1,
+ "pid": 0,
+ "isClient": false
+ }
+ ]
+ },
+ {
+ "auth": 2,
+ "readonly": false,
+ "nrequests_client_max": 5,
+ "socks": [
+ {
+ "fd": 101,
+ "errfd": -1,
+ "pid": 0,
+ "isClient": false
+ }
+ ]
+ }
+ ],
+ "clients": [
+ {
+ "id": 1,
+ "auth": 1,
+ "readonly": true,
+ "nrequests_max": 15,
+ "sock": {
+ "fd": 102,
+ "errfd": -1,
+ "pid": -1,
+ "isClient": true
+ }
+ },
+ {
+ "id": 2,
+ "auth": 2,
+ "readonly": true,
+ "nrequests_max": 66,
+ "sock": {
+ "fd": 103,
+ "errfd": -1,
+ "pid": -1,
+ "isClient": true
+ }
+ }
+ ]
}
+ }
}
diff --git a/tests/virnetdaemondata/output-data-anon-clients.json
b/tests/virnetdaemondata/output-data-anon-clients.json
index 1a1909f..9f1c635 100644
--- a/tests/virnetdaemondata/output-data-anon-clients.json
+++ b/tests/virnetdaemondata/output-data-anon-clients.json
@@ -1,68 +1,68 @@
{
- "servers": {
- "testServer0": {
- "min_workers": 10,
- "max_workers": 50,
- "priority_workers": 5,
- "max_clients": 100,
- "max_anonymous_clients": 10,
- "keepaliveInterval": 120,
- "keepaliveCount": 5,
- "next_client_id": 3,
- "services": [
- {
- "auth": 0,
- "readonly": true,
- "nrequests_client_max": 2,
- "socks": [
- {
- "fd": 100,
- "errfd": -1,
- "pid": 0,
- "isClient": false
- }
- ]
- },
- {
- "auth": 2,
- "readonly": false,
- "nrequests_client_max": 5,
- "socks": [
- {
- "fd": 101,
- "errfd": -1,
- "pid": 0,
- "isClient": false
- }
- ]
- }
- ],
- "clients": [
- {
- "id": 1,
- "auth": 1,
- "readonly": true,
- "nrequests_max": 15,
- "sock": {
- "fd": 102,
- "errfd": -1,
- "pid": -1,
- "isClient": true
- }
- },
- {
- "id": 2,
- "auth": 2,
- "readonly": true,
- "nrequests_max": 66,
- "sock": {
- "fd": 103,
- "errfd": -1,
- "pid": -1,
- "isClient": true
- }
- }
- ]
+ "servers": {
+ "testServer0": {
+ "min_workers": 10,
+ "max_workers": 50,
+ "priority_workers": 5,
+ "max_clients": 100,
+ "max_anonymous_clients": 10,
+ "keepaliveInterval": 120,
+ "keepaliveCount": 5,
+ "next_client_id": 3,
+ "services": [
+ {
+ "auth": 0,
+ "readonly": true,
+ "nrequests_client_max": 2,
+ "socks": [
+ {
+ "fd": 100,
+ "errfd": -1,
+ "pid": 0,
+ "isClient": false
+ }
+ ]
+ },
+ {
+ "auth": 2,
+ "readonly": false,
+ "nrequests_client_max": 5,
+ "socks": [
+ {
+ "fd": 101,
+ "errfd": -1,
+ "pid": 0,
+ "isClient": false
+ }
+ ]
}
+ ],
+ "clients": [
+ {
+ "id": 1,
+ "auth": 1,
+ "readonly": true,
+ "nrequests_max": 15,
+ "sock": {
+ "fd": 102,
+ "errfd": -1,
+ "pid": -1,
+ "isClient": true
+ }
+ },
+ {
+ "id": 2,
+ "auth": 2,
+ "readonly": true,
+ "nrequests_max": 66,
+ "sock": {
+ "fd": 103,
+ "errfd": -1,
+ "pid": -1,
+ "isClient": true
+ }
+ }
+ ]
}
+ }
}
diff --git a/tests/virnetdaemondata/output-data-client-ids.json
b/tests/virnetdaemondata/output-data-client-ids.json
index 7caa2cc..43c61cc 100644
--- a/tests/virnetdaemondata/output-data-client-ids.json
+++ b/tests/virnetdaemondata/output-data-client-ids.json
@@ -1,68 +1,68 @@
{
- "servers": {
- "testServer0": {
- "min_workers": 10,
- "max_workers": 50,
- "priority_workers": 5,
- "max_clients": 100,
- "max_anonymous_clients": 10,
- "keepaliveInterval": 120,
- "keepaliveCount": 5,
- "next_client_id": 5,
- "services": [
- {
- "auth": 0,
- "readonly": true,
- "nrequests_client_max": 2,
- "socks": [
- {
- "fd": 100,
- "errfd": -1,
- "pid": 0,
- "isClient": false
- }
- ]
- },
- {
- "auth": 2,
- "readonly": false,
- "nrequests_client_max": 5,
- "socks": [
- {
- "fd": 101,
- "errfd": -1,
- "pid": 0,
- "isClient": false
- }
- ]
- }
- ],
- "clients": [
- {
- "id": 2,
- "auth": 1,
- "readonly": true,
- "nrequests_max": 15,
- "sock": {
- "fd": 102,
- "errfd": -1,
- "pid": -1,
- "isClient": true
- }
- },
- {
- "id": 3,
- "auth": 2,
- "readonly": true,
- "nrequests_max": 66,
- "sock": {
- "fd": 103,
- "errfd": -1,
- "pid": -1,
- "isClient": true
- }
- }
- ]
+ "servers": {
+ "testServer0": {
+ "min_workers": 10,
+ "max_workers": 50,
+ "priority_workers": 5,
+ "max_clients": 100,
+ "max_anonymous_clients": 10,
+ "keepaliveInterval": 120,
+ "keepaliveCount": 5,
+ "next_client_id": 5,
+ "services": [
+ {
+ "auth": 0,
+ "readonly": true,
+ "nrequests_client_max": 2,
+ "socks": [
+ {
+ "fd": 100,
+ "errfd": -1,
+ "pid": 0,
+ "isClient": false
+ }
+ ]
+ },
+ {
+ "auth": 2,
+ "readonly": false,
+ "nrequests_client_max": 5,
+ "socks": [
+ {
+ "fd": 101,
+ "errfd": -1,
+ "pid": 0,
+ "isClient": false
+ }
+ ]
}
+ ],
+ "clients": [
+ {
+ "id": 2,
+ "auth": 1,
+ "readonly": true,
+ "nrequests_max": 15,
+ "sock": {
+ "fd": 102,
+ "errfd": -1,
+ "pid": -1,
+ "isClient": true
+ }
+ },
+ {
+ "id": 3,
+ "auth": 2,
+ "readonly": true,
+ "nrequests_max": 66,
+ "sock": {
+ "fd": 103,
+ "errfd": -1,
+ "pid": -1,
+ "isClient": true
+ }
+ }
+ ]
}
+ }
}
diff --git a/tests/virnetdaemondata/output-data-client-timestamp.json
b/tests/virnetdaemondata/output-data-client-timestamp.json
index d069997..b706c14 100644
--- a/tests/virnetdaemondata/output-data-client-timestamp.json
+++ b/tests/virnetdaemondata/output-data-client-timestamp.json
@@ -1,70 +1,70 @@
{
- "servers": {
- "testServer0": {
- "min_workers": 10,
- "max_workers": 50,
- "priority_workers": 5,
- "max_clients": 100,
- "max_anonymous_clients": 10,
- "keepaliveInterval": 120,
- "keepaliveCount": 5,
- "next_client_id": 3,
- "services": [
- {
- "auth": 0,
- "readonly": true,
- "nrequests_client_max": 2,
- "socks": [
- {
- "fd": 100,
- "errfd": -1,
- "pid": 0,
- "isClient": false
- }
- ]
- },
- {
- "auth": 2,
- "readonly": false,
- "nrequests_client_max": 5,
- "socks": [
- {
- "fd": 101,
- "errfd": -1,
- "pid": 0,
- "isClient": false
- }
- ]
- }
- ],
- "clients": [
- {
- "id": 1,
- "auth": 1,
- "readonly": true,
- "nrequests_max": 15,
- "conn_time": 1234567890,
- "sock": {
- "fd": 102,
- "errfd": -1,
- "pid": -1,
- "isClient": true
- }
- },
- {
- "id": 2,
- "auth": 2,
- "readonly": true,
- "nrequests_max": 66,
- "conn_time": 1234567890,
- "sock": {
- "fd": 103,
- "errfd": -1,
- "pid": -1,
- "isClient": true
- }
- }
- ]
+ "servers": {
+ "testServer0": {
+ "min_workers": 10,
+ "max_workers": 50,
+ "priority_workers": 5,
+ "max_clients": 100,
+ "max_anonymous_clients": 10,
+ "keepaliveInterval": 120,
+ "keepaliveCount": 5,
+ "next_client_id": 3,
+ "services": [
+ {
+ "auth": 0,
+ "readonly": true,
+ "nrequests_client_max": 2,
+ "socks": [
+ {
+ "fd": 100,
+ "errfd": -1,
+ "pid": 0,
+ "isClient": false
+ }
+ ]
+ },
+ {
+ "auth": 2,
+ "readonly": false,
+ "nrequests_client_max": 5,
+ "socks": [
+ {
+ "fd": 101,
+ "errfd": -1,
+ "pid": 0,
+ "isClient": false
+ }
+ ]
}
+ ],
+ "clients": [
+ {
+ "id": 1,
+ "auth": 1,
+ "readonly": true,
+ "nrequests_max": 15,
+ "conn_time": 1234567890,
+ "sock": {
+ "fd": 102,
+ "errfd": -1,
+ "pid": -1,
+ "isClient": true
+ }
+ },
+ {
+ "id": 2,
+ "auth": 2,
+ "readonly": true,
+ "nrequests_max": 66,
+ "conn_time": 1234567890,
+ "sock": {
+ "fd": 103,
+ "errfd": -1,
+ "pid": -1,
+ "isClient": true
+ }
+ }
+ ]
}
+ }
}
diff --git a/tests/virnetdaemondata/output-data-initial-nomdns.json
b/tests/virnetdaemondata/output-data-initial-nomdns.json
index da007f3..ca6b995 100644
--- a/tests/virnetdaemondata/output-data-initial-nomdns.json
+++ b/tests/virnetdaemondata/output-data-initial-nomdns.json
@@ -1,68 +1,68 @@
{
- "servers": {
- "testServer0": {
- "min_workers": 10,
- "max_workers": 50,
- "priority_workers": 5,
- "max_clients": 100,
- "max_anonymous_clients": 100,
- "keepaliveInterval": 120,
- "keepaliveCount": 5,
- "next_client_id": 3,
- "services": [
- {
- "auth": 0,
- "readonly": true,
- "nrequests_client_max": 2,
- "socks": [
- {
- "fd": 100,
- "errfd": -1,
- "pid": 0,
- "isClient": false
- }
- ]
- },
- {
- "auth": 2,
- "readonly": false,
- "nrequests_client_max": 5,
- "socks": [
- {
- "fd": 101,
- "errfd": -1,
- "pid": 0,
- "isClient": false
- }
- ]
- }
- ],
- "clients": [
- {
- "id": 1,
- "auth": 1,
- "readonly": true,
- "nrequests_max": 15,
- "sock": {
- "fd": 102,
- "errfd": -1,
- "pid": -1,
- "isClient": true
- }
- },
- {
- "id": 2,
- "auth": 2,
- "readonly": true,
- "nrequests_max": 66,
- "sock": {
- "fd": 103,
- "errfd": -1,
- "pid": -1,
- "isClient": true
- }
- }
- ]
+ "servers": {
+ "testServer0": {
+ "min_workers": 10,
+ "max_workers": 50,
+ "priority_workers": 5,
+ "max_clients": 100,
+ "max_anonymous_clients": 100,
+ "keepaliveInterval": 120,
+ "keepaliveCount": 5,
+ "next_client_id": 3,
+ "services": [
+ {
+ "auth": 0,
+ "readonly": true,
+ "nrequests_client_max": 2,
+ "socks": [
+ {
+ "fd": 100,
+ "errfd": -1,
+ "pid": 0,
+ "isClient": false
+ }
+ ]
+ },
+ {
+ "auth": 2,
+ "readonly": false,
+ "nrequests_client_max": 5,
+ "socks": [
+ {
+ "fd": 101,
+ "errfd": -1,
+ "pid": 0,
+ "isClient": false
+ }
+ ]
}
+ ],
+ "clients": [
+ {
+ "id": 1,
+ "auth": 1,
+ "readonly": true,
+ "nrequests_max": 15,
+ "sock": {
+ "fd": 102,
+ "errfd": -1,
+ "pid": -1,
+ "isClient": true
+ }
+ },
+ {
+ "id": 2,
+ "auth": 2,
+ "readonly": true,
+ "nrequests_max": 66,
+ "sock": {
+ "fd": 103,
+ "errfd": -1,
+ "pid": -1,
+ "isClient": true
+ }
+ }
+ ]
}
+ }
}
diff --git a/tests/virnetdaemondata/output-data-initial.json
b/tests/virnetdaemondata/output-data-initial.json
index cdd02c2..a8df633 100644
--- a/tests/virnetdaemondata/output-data-initial.json
+++ b/tests/virnetdaemondata/output-data-initial.json
@@ -1,69 +1,69 @@
{
- "servers": {
- "testServer0": {
- "min_workers": 10,
- "max_workers": 50,
- "priority_workers": 5,
- "max_clients": 100,
- "max_anonymous_clients": 100,
- "keepaliveInterval": 120,
- "keepaliveCount": 5,
- "next_client_id": 3,
- "mdnsGroupName": "libvirtTest",
- "services": [
- {
- "auth": 0,
- "readonly": true,
- "nrequests_client_max": 2,
- "socks": [
- {
- "fd": 100,
- "errfd": -1,
- "pid": 0,
- "isClient": false
- }
- ]
- },
- {
- "auth": 2,
- "readonly": false,
- "nrequests_client_max": 5,
- "socks": [
- {
- "fd": 101,
- "errfd": -1,
- "pid": 0,
- "isClient": false
- }
- ]
- }
- ],
- "clients": [
- {
- "id": 1,
- "auth": 1,
- "readonly": true,
- "nrequests_max": 15,
- "sock": {
- "fd": 102,
- "errfd": -1,
- "pid": -1,
- "isClient": true
- }
- },
- {
- "id": 2,
- "auth": 2,
- "readonly": true,
- "nrequests_max": 66,
- "sock": {
- "fd": 103,
- "errfd": -1,
- "pid": -1,
- "isClient": true
- }
- }
- ]
+ "servers": {
+ "testServer0": {
+ "min_workers": 10,
+ "max_workers": 50,
+ "priority_workers": 5,
+ "max_clients": 100,
+ "max_anonymous_clients": 100,
+ "keepaliveInterval": 120,
+ "keepaliveCount": 5,
+ "next_client_id": 3,
+ "mdnsGroupName": "libvirtTest",
+ "services": [
+ {
+ "auth": 0,
+ "readonly": true,
+ "nrequests_client_max": 2,
+ "socks": [
+ {
+ "fd": 100,
+ "errfd": -1,
+ "pid": 0,
+ "isClient": false
+ }
+ ]
+ },
+ {
+ "auth": 2,
+ "readonly": false,
+ "nrequests_client_max": 5,
+ "socks": [
+ {
+ "fd": 101,
+ "errfd": -1,
+ "pid": 0,
+ "isClient": false
+ }
+ ]
}
+ ],
+ "clients": [
+ {
+ "id": 1,
+ "auth": 1,
+ "readonly": true,
+ "nrequests_max": 15,
+ "sock": {
+ "fd": 102,
+ "errfd": -1,
+ "pid": -1,
+ "isClient": true
+ }
+ },
+ {
+ "id": 2,
+ "auth": 2,
+ "readonly": true,
+ "nrequests_max": 66,
+ "sock": {
+ "fd": 103,
+ "errfd": -1,
+ "pid": -1,
+ "isClient": true
+ }
+ }
+ ]
}
+ }
}
diff --git a/tests/virnetdaemondata/output-data-no-keepalive-required.json
b/tests/virnetdaemondata/output-data-no-keepalive-required.json
index ca3acd1..fc960f0 100644
--- a/tests/virnetdaemondata/output-data-no-keepalive-required.json
+++ b/tests/virnetdaemondata/output-data-no-keepalive-required.json
@@ -1,132 +1,132 @@
{
- "servers": {
- "testServer0": {
- "min_workers": 10,
- "max_workers": 50,
- "priority_workers": 5,
- "max_clients": 100,
- "max_anonymous_clients": 100,
- "keepaliveInterval": 120,
- "keepaliveCount": 5,
- "next_client_id": 3,
- "services": [
- {
- "auth": 0,
- "readonly": true,
- "nrequests_client_max": 2,
- "socks": [
- {
- "fd": 100,
- "errfd": -1,
- "pid": 0,
- "isClient": false
- }
- ]
- },
- {
- "auth": 2,
- "readonly": false,
- "nrequests_client_max": 5,
- "socks": [
- {
- "fd": 101,
- "errfd": -1,
- "pid": 0,
- "isClient": false
- }
- ]
- }
- ],
- "clients": [
- {
- "id": 1,
- "auth": 1,
- "readonly": true,
- "nrequests_max": 15,
- "sock": {
- "fd": 102,
- "errfd": -1,
- "pid": -1,
- "isClient": true
- }
- },
- {
- "id": 2,
- "auth": 2,
- "readonly": true,
- "nrequests_max": 66,
- "sock": {
- "fd": 103,
- "errfd": -1,
- "pid": -1,
- "isClient": true
- }
- }
- ]
+ "servers": {
+ "testServer0": {
+ "min_workers": 10,
+ "max_workers": 50,
+ "priority_workers": 5,
+ "max_clients": 100,
+ "max_anonymous_clients": 100,
+ "keepaliveInterval": 120,
+ "keepaliveCount": 5,
+ "next_client_id": 3,
+ "services": [
+ {
+ "auth": 0,
+ "readonly": true,
+ "nrequests_client_max": 2,
+ "socks": [
+ {
+ "fd": 100,
+ "errfd": -1,
+ "pid": 0,
+ "isClient": false
+ }
+ ]
},
- "testServer1": {
- "min_workers": 2,
- "max_workers": 50,
- "priority_workers": 5,
- "max_clients": 100,
- "max_anonymous_clients": 100,
- "keepaliveInterval": 120,
- "keepaliveCount": 5,
- "next_client_id": 3,
- "services": [
- {
- "auth": 0,
- "readonly": true,
- "nrequests_client_max": 2,
- "socks": [
- {
- "fd": 100,
- "errfd": -1,
- "pid": 0,
- "isClient": false
- }
- ]
- },
- {
- "auth": 2,
- "readonly": false,
- "nrequests_client_max": 5,
- "socks": [
- {
- "fd": 101,
- "errfd": -1,
- "pid": 0,
- "isClient": false
- }
- ]
- }
- ],
- "clients": [
- {
- "id": 1,
- "auth": 1,
- "readonly": true,
- "nrequests_max": 15,
- "sock": {
- "fd": 102,
- "errfd": -1,
- "pid": -1,
- "isClient": true
- }
- },
- {
- "id": 2,
- "auth": 2,
- "readonly": true,
- "nrequests_max": 66,
- "sock": {
- "fd": 103,
- "errfd": -1,
- "pid": -1,
- "isClient": true
- }
- }
- ]
+ {
+ "auth": 2,
+ "readonly": false,
+ "nrequests_client_max": 5,
+ "socks": [
+ {
+ "fd": 101,
+ "errfd": -1,
+ "pid": 0,
+ "isClient": false
+ }
+ ]
}
+ ],
+ "clients": [
+ {
+ "id": 1,
+ "auth": 1,
+ "readonly": true,
+ "nrequests_max": 15,
+ "sock": {
+ "fd": 102,
+ "errfd": -1,
+ "pid": -1,
+ "isClient": true
+ }
+ },
+ {
+ "id": 2,
+ "auth": 2,
+ "readonly": true,
+ "nrequests_max": 66,
+ "sock": {
+ "fd": 103,
+ "errfd": -1,
+ "pid": -1,
+ "isClient": true
+ }
+ }
+ ]
+ },
+ "testServer1": {
+ "min_workers": 2,
+ "max_workers": 50,
+ "priority_workers": 5,
+ "max_clients": 100,
+ "max_anonymous_clients": 100,
+ "keepaliveInterval": 120,
+ "keepaliveCount": 5,
+ "next_client_id": 3,
+ "services": [
+ {
+ "auth": 0,
+ "readonly": true,
+ "nrequests_client_max": 2,
+ "socks": [
+ {
+ "fd": 100,
+ "errfd": -1,
+ "pid": 0,
+ "isClient": false
+ }
+ ]
+ },
+ {
+ "auth": 2,
+ "readonly": false,
+ "nrequests_client_max": 5,
+ "socks": [
+ {
+ "fd": 101,
+ "errfd": -1,
+ "pid": 0,
+ "isClient": false
+ }
+ ]
+ }
+ ],
+ "clients": [
+ {
+ "id": 1,
+ "auth": 1,
+ "readonly": true,
+ "nrequests_max": 15,
+ "sock": {
+ "fd": 102,
+ "errfd": -1,
+ "pid": -1,
+ "isClient": true
+ }
+ },
+ {
+ "id": 2,
+ "auth": 2,
+ "readonly": true,
+ "nrequests_max": 66,
+ "sock": {
+ "fd": 103,
+ "errfd": -1,
+ "pid": -1,
+ "isClient": true
+ }
+ }
+ ]
}
+ }
}
--
2.8.2