Add auxiliary private function that calls the apropriate driver's domainMigrateOpenTunnel function. Signed-off-by: Pavel Boldin <pboldin@xxxxxxxxxxxx> --- docs/apibuild.py | 1 + docs/hvsupport.pl | 1 + src/libvirt-domain.c | 43 +++++++++++++++++++++++++++++++++++++++++++ src/libvirt_internal.h | 6 ++++++ src/libvirt_private.syms | 1 + 5 files changed, 52 insertions(+) diff --git a/docs/apibuild.py b/docs/apibuild.py index f934fb2..6e60093 100755 --- a/docs/apibuild.py +++ b/docs/apibuild.py @@ -102,6 +102,7 @@ ignored_functions = { "virDomainMigratePrepare3Params": "private function for migration", "virDomainMigrateConfirm3Params": "private function for migration", "virDomainMigratePrepareTunnel3Params": "private function for tunnelled migration", + "virDomainMigrateOpenTunnel": "private function for tunnelled migration", "virErrorCopyNew": "private", } diff --git a/docs/hvsupport.pl b/docs/hvsupport.pl index 44a30ce..3b6ee65 100755 --- a/docs/hvsupport.pl +++ b/docs/hvsupport.pl @@ -200,6 +200,7 @@ $apis{virDomainMigratePerform3Params}->{vers} = "1.1.0"; $apis{virDomainMigrateFinish3Params}->{vers} = "1.1.0"; $apis{virDomainMigrateConfirm3Params}->{vers} = "1.1.0"; +$apis{virDomainMigrateOpenTunnel}->{vers} = "1.2.XX"; # Now we want to get the mapping between public APIs diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index de7eb04..3037c01 100644 --- a/src/libvirt-domain.c +++ b/src/libvirt-domain.c @@ -11595,3 +11595,46 @@ virDomainInterfaceFree(virDomainInterfacePtr iface) VIR_FREE(iface); } + + +/* + * Not for public use. This function is part of the internal + * implementation of migration in the remote case. + */ +int +virDomainMigrateOpenTunnel(virConnectPtr conn, + virStreamPtr st, + unsigned char uuid[VIR_UUID_BUFLEN], + unsigned int flags) +{ + char uuidstr[VIR_UUID_STRING_BUFLEN]; + + virUUIDFormat(uuid, uuidstr); + VIR_DEBUG("conn=%p, stream=%p, uuid=%s, flags=%x", + conn, st, uuidstr, flags); + + virResetLastError(); + + virCheckConnectReturn(conn, -1); + virCheckReadOnlyGoto(conn->flags, error); + + if (conn != st->conn) { + virReportInvalidArg(conn, "%s", + _("conn must match stream connection")); + goto error; + } + + if (conn->driver->domainMigrateOpenTunnel) { + int rv; + rv = conn->driver->domainMigrateOpenTunnel(conn, st, uuid, flags); + if (rv < 0) + goto error; + return rv; + } + + virReportUnsupportedError(); + + error: + virDispatchError(conn); + return -1; +} diff --git a/src/libvirt_internal.h b/src/libvirt_internal.h index 1313b58..bbfba0b 100644 --- a/src/libvirt_internal.h +++ b/src/libvirt_internal.h @@ -289,4 +289,10 @@ virTypedParameterValidateSet(virConnectPtr conn, virTypedParameterPtr params, int nparams); +int +virDomainMigrateOpenTunnel(virConnectPtr conn, + virStreamPtr st, + unsigned char uuid[VIR_UUID_BUFLEN], + unsigned int flags); + #endif diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index a835f18..cf5725c 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -952,6 +952,7 @@ virDomainMigrateFinish; virDomainMigrateFinish2; virDomainMigrateFinish3; virDomainMigrateFinish3Params; +virDomainMigrateOpenTunnel; virDomainMigratePerform; virDomainMigratePerform3; virDomainMigratePerform3Params; -- 1.9.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list