[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH v2 5/8] Added job type VIR_DOMAIN_JOB_PHASE1_COMPLETED



Some jobs feature several phases. For example, post-copy migration is
composed of a first phase, from migration start to switching to
post-copy, and a second phase, to migration completion. This
job type allows to flag that the job has completed the first phase,
but is not yet fully completed.

Signed-off-by: Cristian Klein <cristian klein cs umu se>
---
 include/libvirt/libvirt.h.in | 1 +
 tools/virsh-domain.c         | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in
index 84cd5a4..81044f0 100644
--- a/include/libvirt/libvirt.h.in
+++ b/include/libvirt/libvirt.h.in
@@ -4307,6 +4307,7 @@ typedef enum {
     VIR_DOMAIN_JOB_COMPLETED = 3, /* Job has finished, but isn't cleaned up */
     VIR_DOMAIN_JOB_FAILED    = 4, /* Job hit error, but isn't cleaned up */
     VIR_DOMAIN_JOB_CANCELLED = 5, /* Job was aborted, but isn't cleaned up */
+    VIR_DOMAIN_JOB_PHASE1_COMPLETED = 6, /* Job completed first phase, e.g., post-copy activation */
 
 #ifdef VIR_ENUM_SENTINELS
     VIR_DOMAIN_JOB_LAST
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index ce59406..36a6d52 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -5407,7 +5407,8 @@ VIR_ENUM_IMPL(vshDomainJob,
               N_("Unbounded"),
               N_("Completed"),
               N_("Failed"),
-              N_("Cancelled"))
+              N_("Cancelled"),
+              N_("InPhase2"))
 
 static const char *
 vshDomainJobToString(int type)
-- 
1.9.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]