...
 
Commits (3)
......@@ -2038,7 +2038,7 @@ func (c *Connect) DomainSaveImageDefineXML(file string, xml string, flags Domain
}
// See also https://libvirt.org/html/libvirt-libvirt-domain.html#virDomainSaveImageGetXMLDesc
func (c *Connect) DomainSaveImageGetXMLDesc(file string, flags DomainXMLFlags) (string, error) {
func (c *Connect) DomainSaveImageGetXMLDesc(file string, flags DomainSaveImageXMLFlags) (string, error) {
cfile := C.CString(file)
defer C.free(unsafe.Pointer(cfile))
......
......@@ -817,6 +817,12 @@ const (
MIGRATE_MAX_SPEED_POSTCOPY = DomainMigrateMaxSpeedFlags(C.VIR_DOMAIN_MIGRATE_MAX_SPEED_POSTCOPY)
)
type DomainSaveImageXMLFlags int
const (
VIR_DOMAIN_SAVE_IMAGE_XML_SECURE = DomainSaveImageXMLFlags(C.VIR_DOMAIN_SAVE_IMAGE_XML_SECURE)
)
type VcpuState int
const (
......@@ -4677,7 +4683,7 @@ func (d *Domain) ManagedSaveDefineXML(xml string, flags uint32) error {
}
// See also https://libvirt.org/html/libvirt-libvirt-domain.html#virDomainManagedSaveGetXMLDesc
func (d *Domain) ManagedSaveGetXMLDesc(flags uint32) (string, error) {
func (d *Domain) ManagedSaveGetXMLDesc(flags DomainSaveImageXMLFlags) (string, error) {
if C.LIBVIR_VERSION_NUMBER < 3007000 {
return "", makeNotImplementedError("virDomainManagedSaveGetXMLDesc")
}
......
......@@ -948,4 +948,12 @@ struct _virDomainInterface {
#define VIR_DOMAIN_MIGRATE_MAX_SPEED_POSTCOPY (1 << 0)
#endif
#ifndef VIR_DOMAIN_SNAPSHOT_XML_SECURE
#define VIR_DOMAIN_SNAPSHOT_XML_SECURE (1 << 0)
#endif
#ifndef VIR_DOMAIN_SAVE_IMAGE_XML_SECURE
#define VIR_DOMAIN_SAVE_IMAGE_XML_SECURE (1 << 0)
#endif
#endif /* LIBVIRT_GO_DOMAIN_COMPAT_H__ */
......@@ -84,6 +84,12 @@ const (
DOMAIN_SNAPSHOT_DELETE_CHILDREN_ONLY = DomainSnapshotDeleteFlags(C.VIR_DOMAIN_SNAPSHOT_DELETE_CHILDREN_ONLY)
)
type DomainSnapshotXMLFlags int
const (
DOMAIN_SNAPSHOT_XML_SECURE = DomainSnapshotXMLFlags(C.VIR_DOMAIN_SNAPSHOT_XML_SECURE)
)
type DomainSnapshot struct {
ptr C.virDomainSnapshotPtr
}
......@@ -155,7 +161,7 @@ func (s *DomainSnapshot) HasMetadata(flags uint32) (bool, error) {
}
// See also https://libvirt.org/html/libvirt-libvirt-domain-snapshot.html#virDomainSnapshotGetXMLDesc
func (s *DomainSnapshot) GetXMLDesc(flags DomainXMLFlags) (string, error) {
func (s *DomainSnapshot) GetXMLDesc(flags DomainSnapshotXMLFlags) (string, error) {
var err C.virError
result := C.virDomainSnapshotGetXMLDescWrapper(s.ptr, C.uint(flags), &err)
if result == nil {
......
......@@ -28,7 +28,7 @@
#include <libvirt/libvirt.h>
#include <libvirt/virterror.h>
#include "domain_compat.h"
int
virDomainRevertToSnapshotWrapper(virDomainSnapshotPtr snapshot,
......