Implement the RPC protocol for the libvirt-lxc.la library

Add the infrastructure for the libvirt-lxc.la library to
the remote protocol client and daemon

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrange
2012-12-21 14:20:04 +00:00
parent 8bc18eaac6
commit 509eb51e7c
8 changed files with 237 additions and 26 deletions

View File

@@ -103,6 +103,7 @@ virNetSASLContextPtr saslCtxt = NULL;
#endif
virNetServerProgramPtr remoteProgram = NULL;
virNetServerProgramPtr qemuProgram = NULL;
virNetServerProgramPtr lxcProgram = NULL;
enum {
VIR_DAEMON_ERR_NONE = 0,
@@ -1370,6 +1371,18 @@ int main(int argc, char **argv) {
goto cleanup;
}
if (!(lxcProgram = virNetServerProgramNew(LXC_PROGRAM,
LXC_PROTOCOL_VERSION,
lxcProcs,
lxcNProcs))) {
ret = VIR_DAEMON_ERR_INIT;
goto cleanup;
}
if (virNetServerAddProgram(srv, lxcProgram) < 0) {
ret = VIR_DAEMON_ERR_INIT;
goto cleanup;
}
if (!(qemuProgram = virNetServerProgramNew(QEMU_PROGRAM,
QEMU_PROTOCOL_VERSION,
qemuProcs,
@@ -1475,6 +1488,7 @@ int main(int argc, char **argv) {
cleanup:
virNetlinkEventServiceStopAll();
virObjectUnref(remoteProgram);
virObjectUnref(lxcProgram);
virObjectUnref(qemuProgram);
virNetServerClose(srv);
virObjectUnref(srv);