...
 
Commits (2)
......@@ -811,6 +811,12 @@ const (
MIGRATE_TLS = DomainMigrateFlags(C.VIR_MIGRATE_TLS)
)
type DomainMigrateMaxSpeedFlags int
const (
MIGRATE_MAX_SPEED_POSTCOPY = DomainMigrateMaxSpeedFlags(C.VIR_DOMAIN_MIGRATE_MAX_SPEED_POSTCOPY)
)
type VcpuState int
const (
......@@ -2309,6 +2315,10 @@ func getMigrateParameterFieldInfo(params *DomainMigrateParameters) map[string]ty
set: &params.BandwidthSet,
ul: &params.Bandwidth,
},
C.VIR_MIGRATE_PARAM_BANDWIDTH_POSTCOPY: typedParamsFieldInfo{
set: &params.BandwidthSet,
ul: &params.Bandwidth,
},
C.VIR_MIGRATE_PARAM_GRAPHICS_URI: typedParamsFieldInfo{
set: &params.GraphicsURISet,
s: &params.GraphicsURI,
......@@ -2480,7 +2490,7 @@ func (d *Domain) MigrateSetCompressionCache(size uint64, flags uint32) error {
}
// See also https://libvirt.org/html/libvirt-libvirt-domain.html#virDomainMigrateGetMaxSpeed
func (d *Domain) MigrateGetMaxSpeed(flags uint32) (uint64, error) {
func (d *Domain) MigrateGetMaxSpeed(flags DomainMigrateMaxSpeedFlags) (uint64, error) {
var maxSpeed C.ulong
var err C.virError
......@@ -2493,7 +2503,7 @@ func (d *Domain) MigrateGetMaxSpeed(flags uint32) (uint64, error) {
}
// See also https://libvirt.org/html/libvirt-libvirt-domain.html#virDomainMigrateSetMaxSpeed
func (d *Domain) MigrateSetMaxSpeed(speed uint64, flags uint32) error {
func (d *Domain) MigrateSetMaxSpeed(speed uint64, flags DomainMigrateMaxSpeedFlags) error {
var err C.virError
ret := C.virDomainMigrateSetMaxSpeedWrapper(d.ptr, C.ulong(speed), C.uint(flags), &err)
if ret == -1 {
......
......@@ -939,4 +939,13 @@ struct _virDomainInterface {
#define VIR_DOMAIN_JOB_MEMORY_POSTCOPY_REQS "memory_postcopy_requests"
#endif
/* 5.1.0 */
#ifndef VIR_MIGRATE_PARAM_BANDWIDTH_POSTCOPY
#define VIR_MIGRATE_PARAM_BANDWIDTH_POSTCOPY "bandwidth.postcopy"
#endif
#ifndef VIR_DOMAIN_MIGRATE_MAX_SPEED_POSTCOPY
#define VIR_DOMAIN_MIGRATE_MAX_SPEED_POSTCOPY (1 << 0)
#endif
#endif /* LIBVIRT_GO_DOMAIN_COMPAT_H__ */