]> xenbits.xensource.com Git - libvirt.git/commit
rpc: virnetserverclient: Introduce new attribute conn_time to client
authorErik Skultety <eskultet@redhat.com>
Tue, 12 Apr 2016 17:21:43 +0000 (19:21 +0200)
committerErik Skultety <eskultet@redhat.com>
Mon, 2 May 2016 20:25:52 +0000 (22:25 +0200)
commita32135b3b120f9442c44d0e484daa92894233be0
tree94d88be4fa8f43a69285a302241d3e1985f8a343
parent5841d64d2557a88ae7340a69005f8e0ca73898be
rpc: virnetserverclient: Introduce new attribute conn_time to client

Besides ID, libvirt should provide several parameters to help the user
distinguish two clients from each other. One of them is the connection
timestamp. This patch also adds a testcase for proper JSON formatting of the
new attribute too (proper formatting of older clients that did not support
this attribute yet is included in the existing tests) - in order to
testGenerateJSON to work, a mock of time_t time(time_t *timer) needed to be
created.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
src/rpc/virnetserverclient.c
src/rpc/virnetserverclient.h
tests/Makefile.am
tests/virnetdaemondata/input-data-client-timestamp.json [new file with mode: 0644]
tests/virnetdaemondata/output-data-client-timestamp.json [new file with mode: 0644]
tests/virnetdaemonmock.c [new file with mode: 0644]
tests/virnetdaemontest.c