conf: rename virDomainLifecycleAction enum functions

Reviewed-by: John Ferlan <jferlan@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
Pavel Hrdina 2017-10-10 14:32:58 +02:00
parent 21068580d6
commit 55c63295b2
5 changed files with 16 additions and 16 deletions

View File

@ -208,7 +208,7 @@ VIR_ENUM_IMPL(virDomainCapsFeature, VIR_DOMAIN_CAPS_FEATURE_LAST,
"syslog", "syslog",
"wake_alarm") "wake_alarm")
VIR_ENUM_IMPL(virDomainLifecycle, VIR_DOMAIN_LIFECYCLE_ACTION_LAST, VIR_ENUM_IMPL(virDomainLifecycleAction, VIR_DOMAIN_LIFECYCLE_ACTION_LAST,
"destroy", "destroy",
"restart", "restart",
"rename-restart", "rename-restart",
@ -18594,14 +18594,14 @@ virDomainDefParseXML(xmlDocPtr xml,
"string(./on_reboot[1])", "string(./on_reboot[1])",
&def->onReboot, &def->onReboot,
VIR_DOMAIN_LIFECYCLE_ACTION_RESTART, VIR_DOMAIN_LIFECYCLE_ACTION_RESTART,
virDomainLifecycleTypeFromString) < 0) virDomainLifecycleActionTypeFromString) < 0)
goto error; goto error;
if (virDomainEventActionParseXML(ctxt, "on_poweroff", if (virDomainEventActionParseXML(ctxt, "on_poweroff",
"string(./on_poweroff[1])", "string(./on_poweroff[1])",
&def->onPoweroff, &def->onPoweroff,
VIR_DOMAIN_LIFECYCLE_ACTION_DESTROY, VIR_DOMAIN_LIFECYCLE_ACTION_DESTROY,
virDomainLifecycleTypeFromString) < 0) virDomainLifecycleActionTypeFromString) < 0)
goto error; goto error;
if (virDomainEventActionParseXML(ctxt, "on_crash", if (virDomainEventActionParseXML(ctxt, "on_crash",
@ -25863,11 +25863,11 @@ virDomainDefFormatInternal(virDomainDefPtr def,
if (virDomainEventActionDefFormat(buf, def->onPoweroff, if (virDomainEventActionDefFormat(buf, def->onPoweroff,
"on_poweroff", "on_poweroff",
virDomainLifecycleTypeToString) < 0) virDomainLifecycleActionTypeToString) < 0)
goto error; goto error;
if (virDomainEventActionDefFormat(buf, def->onReboot, if (virDomainEventActionDefFormat(buf, def->onReboot,
"on_reboot", "on_reboot",
virDomainLifecycleTypeToString) < 0) virDomainLifecycleActionTypeToString) < 0)
goto error; goto error;
if (virDomainEventActionDefFormat(buf, def->onCrash, if (virDomainEventActionDefFormat(buf, def->onCrash,
"on_crash", "on_crash",

View File

@ -3211,7 +3211,7 @@ VIR_ENUM_DECL(virDomainBoot)
VIR_ENUM_DECL(virDomainFeature) VIR_ENUM_DECL(virDomainFeature)
VIR_ENUM_DECL(virDomainCapabilitiesPolicy) VIR_ENUM_DECL(virDomainCapabilitiesPolicy)
VIR_ENUM_DECL(virDomainCapsFeature) VIR_ENUM_DECL(virDomainCapsFeature)
VIR_ENUM_DECL(virDomainLifecycle) VIR_ENUM_DECL(virDomainLifecycleAction)
VIR_ENUM_DECL(virDomainLifecycleCrash) VIR_ENUM_DECL(virDomainLifecycleCrash)
VIR_ENUM_DECL(virDomainDevice) VIR_ENUM_DECL(virDomainDevice)
VIR_ENUM_DECL(virDomainDeviceAddress) VIR_ENUM_DECL(virDomainDeviceAddress)

View File

@ -401,10 +401,10 @@ virDomainLeaseInsertPreAlloc;
virDomainLeaseInsertPreAlloced; virDomainLeaseInsertPreAlloced;
virDomainLeaseRemove; virDomainLeaseRemove;
virDomainLeaseRemoveAt; virDomainLeaseRemoveAt;
virDomainLifecycleActionTypeFromString;
virDomainLifecycleActionTypeToString;
virDomainLifecycleCrashTypeFromString; virDomainLifecycleCrashTypeFromString;
virDomainLifecycleCrashTypeToString; virDomainLifecycleCrashTypeToString;
virDomainLifecycleTypeFromString;
virDomainLifecycleTypeToString;
virDomainLoaderDefFree; virDomainLoaderDefFree;
virDomainLoaderTypeFromString; virDomainLoaderTypeFromString;
virDomainLoaderTypeToString; virDomainLoaderTypeToString;

View File

@ -361,7 +361,7 @@ xenParseEventsActions(virConfPtr conf, virDomainDefPtr def)
if (xenConfigGetString(conf, "on_poweroff", &str, "destroy") < 0) if (xenConfigGetString(conf, "on_poweroff", &str, "destroy") < 0)
return -1; return -1;
if ((def->onPoweroff = virDomainLifecycleTypeFromString(str)) < 0) { if ((def->onPoweroff = virDomainLifecycleActionTypeFromString(str)) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
_("unexpected value %s for on_poweroff"), str); _("unexpected value %s for on_poweroff"), str);
return -1; return -1;
@ -370,7 +370,7 @@ xenParseEventsActions(virConfPtr conf, virDomainDefPtr def)
if (xenConfigGetString(conf, "on_reboot", &str, "restart") < 0) if (xenConfigGetString(conf, "on_reboot", &str, "restart") < 0)
return -1; return -1;
if ((def->onReboot = virDomainLifecycleTypeFromString(str)) < 0) { if ((def->onReboot = virDomainLifecycleActionTypeFromString(str)) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
_("unexpected value %s for on_reboot"), str); _("unexpected value %s for on_reboot"), str);
return -1; return -1;
@ -1449,7 +1449,7 @@ xenFormatEventActions(virConfPtr conf, virDomainDefPtr def)
{ {
const char *lifecycle = NULL; const char *lifecycle = NULL;
if (!(lifecycle = virDomainLifecycleTypeToString(def->onPoweroff))) { if (!(lifecycle = virDomainLifecycleActionTypeToString(def->onPoweroff))) {
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
_("unexpected lifecycle action %d"), def->onPoweroff); _("unexpected lifecycle action %d"), def->onPoweroff);
return -1; return -1;
@ -1458,7 +1458,7 @@ xenFormatEventActions(virConfPtr conf, virDomainDefPtr def)
return -1; return -1;
if (!(lifecycle = virDomainLifecycleTypeToString(def->onReboot))) { if (!(lifecycle = virDomainLifecycleActionTypeToString(def->onReboot))) {
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
_("unexpected lifecycle action %d"), def->onReboot); _("unexpected lifecycle action %d"), def->onReboot);
return -1; return -1;

View File

@ -1240,7 +1240,7 @@ xenParseSxpr(const struct sexpr *root,
tmp = sexpr_node(root, "domain/on_poweroff"); tmp = sexpr_node(root, "domain/on_poweroff");
if (tmp != NULL) { if (tmp != NULL) {
if ((def->onPoweroff = virDomainLifecycleTypeFromString(tmp)) < 0) { if ((def->onPoweroff = virDomainLifecycleActionTypeFromString(tmp)) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
_("unknown lifecycle type %s"), tmp); _("unknown lifecycle type %s"), tmp);
goto error; goto error;
@ -1251,7 +1251,7 @@ xenParseSxpr(const struct sexpr *root,
tmp = sexpr_node(root, "domain/on_reboot"); tmp = sexpr_node(root, "domain/on_reboot");
if (tmp != NULL) { if (tmp != NULL) {
if ((def->onReboot = virDomainLifecycleTypeFromString(tmp)) < 0) { if ((def->onReboot = virDomainLifecycleActionTypeFromString(tmp)) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
_("unknown lifecycle type %s"), tmp); _("unknown lifecycle type %s"), tmp);
goto error; goto error;
@ -2209,14 +2209,14 @@ xenFormatSxpr(virConnectPtr conn, virDomainDefPtr def)
virBufferEscapeSexpr(&buf, "(bootloader_args '%s')", def->os.bootloaderArgs); virBufferEscapeSexpr(&buf, "(bootloader_args '%s')", def->os.bootloaderArgs);
} }
if (!(tmp = virDomainLifecycleTypeToString(def->onPoweroff))) { if (!(tmp = virDomainLifecycleActionTypeToString(def->onPoweroff))) {
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
_("unexpected lifecycle value %d"), def->onPoweroff); _("unexpected lifecycle value %d"), def->onPoweroff);
goto error; goto error;
} }
virBufferAsprintf(&buf, "(on_poweroff '%s')", tmp); virBufferAsprintf(&buf, "(on_poweroff '%s')", tmp);
if (!(tmp = virDomainLifecycleTypeToString(def->onReboot))) { if (!(tmp = virDomainLifecycleActionTypeToString(def->onReboot))) {
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
_("unexpected lifecycle value %d"), def->onReboot); _("unexpected lifecycle value %d"), def->onReboot);
goto error; goto error;