From 1dc718300064040600725b5a52615c31d5455ae5 Mon Sep 17 00:00:00 2001
From: Stefan Majer <stefan.majer@gmail.com>
Date: Tue, 19 Jun 2012 09:23:54 +0200
Subject: [PATCH 2/2] Added domain flags up to libvirt-0.9.12


diff --git a/src/main/java/org/libvirt/Domain.java b/src/main/java/org/libvirt/Domain.java
index 3b0298b..c82e0d5 100644
--- a/src/main/java/org/libvirt/Domain.java
+++ b/src/main/java/org/libvirt/Domain.java
@@ -23,13 +23,42 @@ public class Domain {
 
     static final class CreateFlags {
         static final int VIR_DOMAIN_NONE = 0;
+        static final int VIR_DOMAIN_SNAPSHOT_CREATE_REDEFINE    = (1 << 0); /* Restore or alter
+                                                                               metadata */
+        static final int VIR_DOMAIN_SNAPSHOT_CREATE_CURRENT     = (1 << 1); /* With redefine, make
+                                                                               snapshot current */
+        static final int VIR_DOMAIN_SNAPSHOT_CREATE_NO_METADATA = (1 << 2); /* Make snapshot without
+                                                                               remembering it */
+        static final int VIR_DOMAIN_SNAPSHOT_CREATE_HALT        = (1 << 3); /* Stop running guest
+                                                                               after snapshot */
+        static final int VIR_DOMAIN_SNAPSHOT_CREATE_DISK_ONLY   = (1 << 4); /* disk snapshot, not
+                                                                               system checkpoint */
+        static final int VIR_DOMAIN_SNAPSHOT_CREATE_REUSE_EXT   = (1 << 5); /* reuse any existing
+                                                                               external files */
+        static final int VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE     = (1 << 6); /* use guest agent to
+                                                                               quiesce all mounted
+                                                                               file systems within
+                                                                               the domain */
+        static final int VIR_DOMAIN_SNAPSHOT_CREATE_ATOMIC      = (1 << 7); /* atomically avoid
+                                                                               partial changes */
     }
 
     static final class MigrateFlags {
-        /**
-         * live migration
-         */
-        static final int VIR_MIGRATE_LIVE = 1;
+        static final int VIR_MIGRATE_LIVE              = (1 << 0); /* live migration */
+        static final int VIR_MIGRATE_PEER2PEER         = (1 << 1); /* direct source -> dest host control channel */
+        /* Note the less-common spelling that we're stuck with:
+           VIR_MIGRATE_TUNNELLED should be VIR_MIGRATE_TUNNELED */
+        static final int VIR_MIGRATE_TUNNELLED         = (1 << 2); /* tunnel migration data over libvirtd connection */
+        static final int VIR_MIGRATE_PERSIST_DEST      = (1 << 3); /* persist the VM on the destination */
+        static final int VIR_MIGRATE_UNDEFINE_SOURCE   = (1 << 4); /* undefine the VM on the source */
+        static final int VIR_MIGRATE_PAUSED            = (1 << 5); /* pause on remote side */
+        static final int VIR_MIGRATE_NON_SHARED_DISK   = (1 << 6); /* migration with non-shared storage with full disk copy */
+        static final int VIR_MIGRATE_NON_SHARED_INC    = (1 << 7); /* migration with non-shared storage with incremental copy */
+                                                                   /* (same base image shared between source and destination) */
+        static final int VIR_MIGRATE_CHANGE_PROTECTION = (1 << 8); /* protect for changing domain configuration through the
+                                                                    * whole migration process; this will be used automatically
+                                                                    * when supported */
+        static final int VIR_MIGRATE_UNSAFE            = (1 << 9); /* force migration even if it is considered unsafe */
     }
 
     static final class XMLFlags {
@@ -41,6 +70,7 @@ public class Domain {
          * dump inactive domain information
          */
         static final int VIR_DOMAIN_XML_INACTIVE = 2;
+        static final int VIR_DOMAIN_XML_UPDATE_CPU   = (1 << 2); /* update guest CPU requirements according to host CPU */
     }
 
     /**
-- 
1.7.9.5

