package org.ovirt.engine.core.common.businessentities.pm;

/**
 * Action available in all fence agents
 */
public enum FenceActionType {
    RESTART("reboot"),
    START("on"),
    STOP("off"),
    STATUS("status");

    /**
     * String representation of action
     */
    private final String value;

    FenceActionType(String value) {
        this.value = value;
    }

    /**
     * Returns string representation of fence action
     */
    public String getValue() {
        return this.value;
    }

    /**
     * Tries to parse fence action from string
     *
     * @param value
     *            string representation of fence action
     * @throws IllegalArgumentException
     *             if invalid value was specified
     * @return parsed fence action
     */
    public static FenceActionType forValue(String value) {
        if (value != null && value.length() > 0) {
            String lowerCase = value.toLowerCase();
            if ("reboot".equals(lowerCase)) {
                return RESTART;
            } else if ("on".equals(lowerCase)) {
                return START;
            } else if ("off".equals(lowerCase)) {
                return STOP;
            } else if ("status".equals(lowerCase)) {
                return STATUS;
            }
        }
        // TODO: Change to String.format() when this won't be needed in GWT
        throw new IllegalArgumentException("Invalid value '" + value + "'");
    }
}

@@ -134,31 +134,8 @@
 e %7B%0A
-    RESTART(%22reboot%22),%0A
     
@@ -932,93 +932,8 @@
  if 
-(%22reboot%22.equals(lowerCase)) %7B%0A                return RESTART;%0A            %7D else if 
 (%22on

Remove RESTART action from FenceActionType