Introduce new VIR_DOMAIN_EVENT_DEFINED_RENAMED event

This should be emitted whenever a domain is renamed.

Signed-off-by: Tomas Meszaros <exo@tty.sk>
This commit is contained in:
Tomas Meszaros 2015-08-10 21:59:17 +02:00 committed by Michal Privoznik
parent 28257dc2be
commit 9877d8406c
3 changed files with 10 additions and 2 deletions

View File

@ -108,10 +108,14 @@ static const char *eventDetailToString(int event, int detail) {
ret = "Added"; ret = "Added";
else if (detail == VIR_DOMAIN_EVENT_DEFINED_UPDATED) else if (detail == VIR_DOMAIN_EVENT_DEFINED_UPDATED)
ret = "Updated"; ret = "Updated";
else if (detail == VIR_DOMAIN_EVENT_DEFINED_RENAMED)
ret = "Renamed";
break; break;
case VIR_DOMAIN_EVENT_UNDEFINED: case VIR_DOMAIN_EVENT_UNDEFINED:
if (detail == VIR_DOMAIN_EVENT_UNDEFINED_REMOVED) if (detail == VIR_DOMAIN_EVENT_UNDEFINED_REMOVED)
ret = "Removed"; ret = "Removed";
else if (detail == VIR_DOMAIN_EVENT_UNDEFINED_RENAMED)
ret = "Renamed";
break; break;
case VIR_DOMAIN_EVENT_STARTED: case VIR_DOMAIN_EVENT_STARTED:
switch ((virDomainEventStartedDetailType) detail) { switch ((virDomainEventStartedDetailType) detail) {

View File

@ -2329,6 +2329,7 @@ typedef enum {
typedef enum { typedef enum {
VIR_DOMAIN_EVENT_DEFINED_ADDED = 0, /* Newly created config file */ VIR_DOMAIN_EVENT_DEFINED_ADDED = 0, /* Newly created config file */
VIR_DOMAIN_EVENT_DEFINED_UPDATED = 1, /* Changed config file */ VIR_DOMAIN_EVENT_DEFINED_UPDATED = 1, /* Changed config file */
VIR_DOMAIN_EVENT_DEFINED_RENAMED = 2, /* Domain was renamed */
# ifdef VIR_ENUM_SENTINELS # ifdef VIR_ENUM_SENTINELS
VIR_DOMAIN_EVENT_DEFINED_LAST VIR_DOMAIN_EVENT_DEFINED_LAST
@ -2342,6 +2343,7 @@ typedef enum {
*/ */
typedef enum { typedef enum {
VIR_DOMAIN_EVENT_UNDEFINED_REMOVED = 0, /* Deleted the config file */ VIR_DOMAIN_EVENT_UNDEFINED_REMOVED = 0, /* Deleted the config file */
VIR_DOMAIN_EVENT_UNDEFINED_RENAMED = 1, /* Domain was renamed */
# ifdef VIR_ENUM_SENTINELS # ifdef VIR_ENUM_SENTINELS
VIR_DOMAIN_EVENT_UNDEFINED_LAST VIR_DOMAIN_EVENT_UNDEFINED_LAST

View File

@ -11785,12 +11785,14 @@ VIR_ENUM_DECL(vshDomainEventDefined)
VIR_ENUM_IMPL(vshDomainEventDefined, VIR_ENUM_IMPL(vshDomainEventDefined,
VIR_DOMAIN_EVENT_DEFINED_LAST, VIR_DOMAIN_EVENT_DEFINED_LAST,
N_("Added"), N_("Added"),
N_("Updated")) N_("Updated"),
N_("Renamed"))
VIR_ENUM_DECL(vshDomainEventUndefined) VIR_ENUM_DECL(vshDomainEventUndefined)
VIR_ENUM_IMPL(vshDomainEventUndefined, VIR_ENUM_IMPL(vshDomainEventUndefined,
VIR_DOMAIN_EVENT_UNDEFINED_LAST, VIR_DOMAIN_EVENT_UNDEFINED_LAST,
N_("Removed")) N_("Removed"),
N_("Renamed"))
VIR_ENUM_DECL(vshDomainEventStarted) VIR_ENUM_DECL(vshDomainEventStarted)
VIR_ENUM_IMPL(vshDomainEventStarted, VIR_ENUM_IMPL(vshDomainEventStarted,