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";
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)
ret = "Removed";
else if (detail == VIR_DOMAIN_EVENT_UNDEFINED_RENAMED)
ret = "Renamed";
break;
case VIR_DOMAIN_EVENT_STARTED:
switch ((virDomainEventStartedDetailType) detail) {

View File

@ -2329,6 +2329,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
@ -2342,6 +2343,7 @@ typedef enum {
*/
typedef enum {
VIR_DOMAIN_EVENT_UNDEFINED_REMOVED = 0, /* Deleted the config file */
VIR_DOMAIN_EVENT_UNDEFINED_RENAMED = 1, /* Domain was renamed */
# ifdef VIR_ENUM_SENTINELS
VIR_DOMAIN_EVENT_UNDEFINED_LAST

View File

@ -11785,12 +11785,14 @@ 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,
VIR_DOMAIN_EVENT_UNDEFINED_LAST,
N_("Removed"))
N_("Removed"),
N_("Renamed"))
VIR_ENUM_DECL(vshDomainEventStarted)
VIR_ENUM_IMPL(vshDomainEventStarted,