This should be emitted whenever a domain is renamed.
Signed-off-by: Tomas Meszaros <exo(a)tty.sk>
---
examples/object-events/event-test.c | 2 ++
include/libvirt/libvirt-domain.h | 1 +
tools/virsh-domain.c | 3 ++-
3 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/examples/object-events/event-test.c b/examples/object-events/event-test.c
index 4f17273..c62bd56 100644
--- a/examples/object-events/event-test.c
+++ b/examples/object-events/event-test.c
@@ -108,6 +108,8 @@ static const char *eventDetailToString(int event, int detail) {
ret = "Added";
else if (detail == VIR_DOMAIN_EVENT_DEFINED_UPDATED)
ret = "Updated";
+ else if (detail == VIR_DOMAIN_EVENT_DEFINED_RENAMED)
+ ret = "Renamed";
break;
case VIR_DOMAIN_EVENT_UNDEFINED:
if (detail == VIR_DOMAIN_EVENT_UNDEFINED_REMOVED)
diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h
index 2ddc47d..d43ec27 100644
--- a/include/libvirt/libvirt-domain.h
+++ b/include/libvirt/libvirt-domain.h
@@ -2322,6 +2322,7 @@ typedef enum {
typedef enum {
VIR_DOMAIN_EVENT_DEFINED_ADDED = 0, /* Newly created config file */
VIR_DOMAIN_EVENT_DEFINED_UPDATED = 1, /* Changed config file */
+ VIR_DOMAIN_EVENT_DEFINED_RENAMED = 2, /* Domain was renamed */
# ifdef VIR_ENUM_SENTINELS
VIR_DOMAIN_EVENT_DEFINED_LAST
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index c7e218f..7291980 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -11763,7 +11763,8 @@ VIR_ENUM_DECL(vshDomainEventDefined)
VIR_ENUM_IMPL(vshDomainEventDefined,
VIR_DOMAIN_EVENT_DEFINED_LAST,
N_("Added"),
- N_("Updated"))
+ N_("Updated"),
+ N_("Renamed"))
VIR_ENUM_DECL(vshDomainEventUndefined)
VIR_ENUM_IMPL(vshDomainEventUndefined,
--
2.1.0