You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ch...@apache.org on 2012/08/29 22:01:07 UTC
[12/36] Patch from Devdeep Singh: Importing the updated xenserver sdk
source that comes with BSD license.
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/7d59e669/deps/XenServerJava/src/com/xensource/xenapi/Types.java
----------------------------------------------------------------------
diff --git a/deps/XenServerJava/src/com/xensource/xenapi/Types.java b/deps/XenServerJava/src/com/xensource/xenapi/Types.java
new file mode 100644
index 0000000..31ac11a
--- /dev/null
+++ b/deps/XenServerJava/src/com/xensource/xenapi/Types.java
@@ -0,0 +1,11096 @@
+/* Copyright (c) Citrix Systems, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1) Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2) Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package com.xensource.xenapi;
+
+import java.util.Date;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Set;
+import java.util.LinkedHashSet;
+import java.io.IOException;
+
+import java.util.regex.Pattern;
+import java.util.regex.Matcher;
+
+import org.apache.xmlrpc.XmlRpcException;
+
+/**
+ * This class holds vital marshalling functions, enum types and exceptions.
+ *
+ * @author Citrix Systems, Inc.
+ */
+public class Types
+{
+ /**
+ * Interface for all Record classes
+ */
+ public static interface Record
+ {
+ /**
+ * Convert a Record to a Map
+ */
+ Map<String, Object> toMap();
+ }
+
+ /**
+ * Helper method.
+ */
+ private static String[] ObjectArrayToStringArray(Object[] objArray)
+ {
+ String[] result = new String[objArray.length];
+ for (int i = 0; i < objArray.length; i++)
+ {
+ result[i] = (String) objArray[i];
+ }
+ return result;
+ }
+
+ /**
+ * Base class for all XenAPI Exceptions
+ */
+ public static class XenAPIException extends IOException {
+ public final String shortDescription;
+ public final String[] errorDescription;
+
+ XenAPIException(String shortDescription)
+ {
+ this.shortDescription = shortDescription;
+ this.errorDescription = null;
+ }
+
+ XenAPIException(String[] errorDescription)
+ {
+ this.errorDescription = errorDescription;
+
+ if (errorDescription.length > 0)
+ {
+ shortDescription = errorDescription[0];
+ } else
+ {
+ shortDescription = "";
+ }
+ }
+
+ public String toString()
+ {
+ if (errorDescription == null)
+ {
+ return shortDescription;
+ } else if (errorDescription.length == 0)
+ {
+ return "";
+ }
+ StringBuilder sb = new StringBuilder();
+ for (int i = 0; i < errorDescription.length - 1; i++)
+ {
+ sb.append(errorDescription[i]);
+ }
+ sb.append(errorDescription[errorDescription.length - 1]);
+
+ return sb.toString();
+ }
+ }
+ /**
+ * Thrown if the response from the server contains an invalid status.
+ */
+ public static class BadServerResponse extends XenAPIException
+ {
+ public BadServerResponse(Map response)
+ {
+ super(ObjectArrayToStringArray((Object[]) response.get("ErrorDescription")));
+ }
+ }
+
+ public static class BadAsyncResult extends XenAPIException
+ {
+ public final String result;
+
+ public BadAsyncResult(String result)
+ {
+ super(result);
+ this.result = result;
+ }
+ }
+
+ /*
+ * A call has been made which should not be made against this version of host.
+ * Probably the host is out of date and cannot handle this call, or is
+ * unable to comply with the details of the call. For instance SR.create
+ * on Miami (4.1) hosts takes an smConfig parameter, which must be an empty map
+ * when making this call on Rio (4.0) hosts.
+ */
+ public static class VersionException extends XenAPIException
+ {
+ public final String result;
+
+ public VersionException(String result)
+ {
+ super(result);
+ this.result = result;
+ }
+ }
+
+ private static String parseResult(String result) throws BadAsyncResult
+ {
+ Pattern pattern = Pattern.compile("<value>(.*)</value>");
+ Matcher matcher = pattern.matcher(result);
+ matcher.find();
+
+ if (matcher.groupCount() != 1)
+ {
+ throw new Types.BadAsyncResult("Can't interpret: " + result);
+ }
+
+ return matcher.group(1);
+ }
+ /**
+ * Checks the provided server response was successful. If the call failed, throws a XenAPIException. If the server
+ * returned an invalid response, throws a BadServerResponse. Otherwise, returns the server response as passed in.
+ */
+ static Map checkResponse(Map response) throws XenAPIException, BadServerResponse
+ {
+ if (response.get("Status").equals("Success"))
+ {
+ return response;
+ }
+
+ if (response.get("Status").equals("Failure"))
+ {
+ String[] ErrorDescription = ObjectArrayToStringArray((Object[]) response.get("ErrorDescription"));
+
+ if (ErrorDescription[0].equals("RESTORE_TARGET_MISSING_DEVICE"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.RestoreTargetMissingDevice(p1);
+ }
+ if (ErrorDescription[0].equals("WLB_TIMEOUT"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.WlbTimeout(p1);
+ }
+ if (ErrorDescription[0].equals("MAC_DOES_NOT_EXIST"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.MacDoesNotExist(p1);
+ }
+ if (ErrorDescription[0].equals("HANDLE_INVALID"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ throw new Types.HandleInvalid(p1, p2);
+ }
+ if (ErrorDescription[0].equals("DEVICE_ALREADY_ATTACHED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.DeviceAlreadyAttached(p1);
+ }
+ if (ErrorDescription[0].equals("INVALID_IP_ADDRESS_SPECIFIED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.InvalidIpAddressSpecified(p1);
+ }
+ if (ErrorDescription[0].equals("SR_NOT_EMPTY"))
+ {
+ throw new Types.SrNotEmpty();
+ }
+ if (ErrorDescription[0].equals("VM_HVM_REQUIRED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.VmHvmRequired(p1);
+ }
+ if (ErrorDescription[0].equals("PIF_TUNNEL_STILL_EXISTS"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.PifTunnelStillExists(p1);
+ }
+ if (ErrorDescription[0].equals("PIF_BOND_NEEDS_MORE_MEMBERS"))
+ {
+ throw new Types.PifBondNeedsMoreMembers();
+ }
+ if (ErrorDescription[0].equals("PIF_ALREADY_BONDED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.PifAlreadyBonded(p1);
+ }
+ if (ErrorDescription[0].equals("VLAN_TAG_INVALID"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.VlanTagInvalid(p1);
+ }
+ if (ErrorDescription[0].equals("HOST_IS_SLAVE"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.HostIsSlave(p1);
+ }
+ if (ErrorDescription[0].equals("SR_HAS_MULTIPLE_PBDS"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.SrHasMultiplePbds(p1);
+ }
+ if (ErrorDescription[0].equals("POOL_AUTH_ENABLE_FAILED_INVALID_OU"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ throw new Types.PoolAuthEnableFailedInvalidOu(p1, p2);
+ }
+ if (ErrorDescription[0].equals("IMPORT_ERROR_SOME_CHECKSUMS_FAILED"))
+ {
+ throw new Types.ImportErrorSomeChecksumsFailed();
+ }
+ if (ErrorDescription[0].equals("OPENVSWITCH_NOT_ACTIVE"))
+ {
+ throw new Types.OpenvswitchNotActive();
+ }
+ if (ErrorDescription[0].equals("CANNOT_FIND_OEM_BACKUP_PARTITION"))
+ {
+ throw new Types.CannotFindOemBackupPartition();
+ }
+ if (ErrorDescription[0].equals("PIF_DEVICE_NOT_FOUND"))
+ {
+ throw new Types.PifDeviceNotFound();
+ }
+ if (ErrorDescription[0].equals("DOMAIN_BUILDER_ERROR"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ String p3 = ErrorDescription.length > 3 ? ErrorDescription[3] : "";
+ throw new Types.DomainBuilderError(p1, p2, p3);
+ }
+ if (ErrorDescription[0].equals("PATCH_PRECHECK_FAILED_VM_RUNNING"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.PatchPrecheckFailedVmRunning(p1);
+ }
+ if (ErrorDescription[0].equals("HA_HOST_CANNOT_SEE_PEERS"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ String p3 = ErrorDescription.length > 3 ? ErrorDescription[3] : "";
+ throw new Types.HaHostCannotSeePeers(p1, p2, p3);
+ }
+ if (ErrorDescription[0].equals("POOL_AUTH_DISABLE_FAILED_PERMISSION_DENIED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ throw new Types.PoolAuthDisableFailedPermissionDenied(p1, p2);
+ }
+ if (ErrorDescription[0].equals("PERMISSION_DENIED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.PermissionDenied(p1);
+ }
+ if (ErrorDescription[0].equals("SSL_VERIFY_ERROR"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.SslVerifyError(p1);
+ }
+ if (ErrorDescription[0].equals("SR_ATTACH_FAILED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.SrAttachFailed(p1);
+ }
+ if (ErrorDescription[0].equals("SUBJECT_ALREADY_EXISTS"))
+ {
+ throw new Types.SubjectAlreadyExists();
+ }
+ if (ErrorDescription[0].equals("HA_LOST_STATEFILE"))
+ {
+ throw new Types.HaLostStatefile();
+ }
+ if (ErrorDescription[0].equals("HA_NOT_ENABLED"))
+ {
+ throw new Types.HaNotEnabled();
+ }
+ if (ErrorDescription[0].equals("HA_HEARTBEAT_DAEMON_STARTUP_FAILED"))
+ {
+ throw new Types.HaHeartbeatDaemonStartupFailed();
+ }
+ if (ErrorDescription[0].equals("SESSION_NOT_REGISTERED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.SessionNotRegistered(p1);
+ }
+ if (ErrorDescription[0].equals("VM_NO_SUSPEND_SR"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.VmNoSuspendSr(p1);
+ }
+ if (ErrorDescription[0].equals("PATCH_APPLY_FAILED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.PatchApplyFailed(p1);
+ }
+ if (ErrorDescription[0].equals("VDI_READONLY"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.VdiReadonly(p1);
+ }
+ if (ErrorDescription[0].equals("SR_FULL"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ throw new Types.SrFull(p1, p2);
+ }
+ if (ErrorDescription[0].equals("VDI_NOT_AVAILABLE"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.VdiNotAvailable(p1);
+ }
+ if (ErrorDescription[0].equals("XMLRPC_UNMARSHAL_FAILURE"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ throw new Types.XmlrpcUnmarshalFailure(p1, p2);
+ }
+ if (ErrorDescription[0].equals("CRL_ALREADY_EXISTS"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.CrlAlreadyExists(p1);
+ }
+ if (ErrorDescription[0].equals("HOST_MASTER_CANNOT_TALK_BACK"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.HostMasterCannotTalkBack(p1);
+ }
+ if (ErrorDescription[0].equals("XAPI_HOOK_FAILED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ String p3 = ErrorDescription.length > 3 ? ErrorDescription[3] : "";
+ String p4 = ErrorDescription.length > 4 ? ErrorDescription[4] : "";
+ throw new Types.XapiHookFailed(p1, p2, p3, p4);
+ }
+ if (ErrorDescription[0].equals("IMPORT_INCOMPATIBLE_VERSION"))
+ {
+ throw new Types.ImportIncompatibleVersion();
+ }
+ if (ErrorDescription[0].equals("UNKNOWN_BOOTLOADER"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ throw new Types.UnknownBootloader(p1, p2);
+ }
+ if (ErrorDescription[0].equals("XEN_VSS_REQ_ERROR_PROV_NOT_LOADED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ throw new Types.XenVssReqErrorProvNotLoaded(p1, p2);
+ }
+ if (ErrorDescription[0].equals("SR_VDI_LOCKING_FAILED"))
+ {
+ throw new Types.SrVdiLockingFailed();
+ }
+ if (ErrorDescription[0].equals("PIF_IS_PHYSICAL"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.PifIsPhysical(p1);
+ }
+ if (ErrorDescription[0].equals("MAP_DUPLICATE_KEY"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ String p3 = ErrorDescription.length > 3 ? ErrorDescription[3] : "";
+ String p4 = ErrorDescription.length > 4 ? ErrorDescription[4] : "";
+ throw new Types.MapDuplicateKey(p1, p2, p3, p4);
+ }
+ if (ErrorDescription[0].equals("MISSING_CONNECTION_DETAILS"))
+ {
+ throw new Types.MissingConnectionDetails();
+ }
+ if (ErrorDescription[0].equals("XEN_VSS_REQ_ERROR_CREATING_SNAPSHOT_XML_STRING"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ throw new Types.XenVssReqErrorCreatingSnapshotXmlString(p1, p2);
+ }
+ if (ErrorDescription[0].equals("BOOTLOADER_FAILED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ throw new Types.BootloaderFailed(p1, p2);
+ }
+ if (ErrorDescription[0].equals("WLB_XENSERVER_MALFORMED_RESPONSE"))
+ {
+ throw new Types.WlbXenserverMalformedResponse();
+ }
+ if (ErrorDescription[0].equals("POOL_AUTH_ENABLE_FAILED_DUPLICATE_HOSTNAME"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ throw new Types.PoolAuthEnableFailedDuplicateHostname(p1, p2);
+ }
+ if (ErrorDescription[0].equals("SYSTEM_STATUS_RETRIEVAL_FAILED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.SystemStatusRetrievalFailed(p1);
+ }
+ if (ErrorDescription[0].equals("VDI_IN_USE"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ throw new Types.VdiInUse(p1, p2);
+ }
+ if (ErrorDescription[0].equals("HOST_NOT_LIVE"))
+ {
+ throw new Types.HostNotLive();
+ }
+ if (ErrorDescription[0].equals("CERTIFICATE_ALREADY_EXISTS"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.CertificateAlreadyExists(p1);
+ }
+ if (ErrorDescription[0].equals("SR_HAS_NO_PBDS"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.SrHasNoPbds(p1);
+ }
+ if (ErrorDescription[0].equals("INVALID_PATCH"))
+ {
+ throw new Types.InvalidPatch();
+ }
+ if (ErrorDescription[0].equals("SR_INDESTRUCTIBLE"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.SrIndestructible(p1);
+ }
+ if (ErrorDescription[0].equals("HA_ABORT_NEW_MASTER"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.HaAbortNewMaster(p1);
+ }
+ if (ErrorDescription[0].equals("WLB_MALFORMED_RESPONSE"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ String p3 = ErrorDescription.length > 3 ? ErrorDescription[3] : "";
+ throw new Types.WlbMalformedResponse(p1, p2, p3);
+ }
+ if (ErrorDescription[0].equals("POOL_JOINING_HOST_MUST_HAVE_PHYSICAL_MANAGEMENT_NIC"))
+ {
+ throw new Types.PoolJoiningHostMustHavePhysicalManagementNic();
+ }
+ if (ErrorDescription[0].equals("WLB_XENSERVER_AUTHENTICATION_FAILED"))
+ {
+ throw new Types.WlbXenserverAuthenticationFailed();
+ }
+ if (ErrorDescription[0].equals("CANNOT_RESET_CONTROL_DOMAIN"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.CannotResetControlDomain(p1);
+ }
+ if (ErrorDescription[0].equals("PATCH_PRECHECK_FAILED_UNKNOWN_ERROR"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ throw new Types.PatchPrecheckFailedUnknownError(p1, p2);
+ }
+ if (ErrorDescription[0].equals("HOST_CANNOT_ATTACH_NETWORK"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ throw new Types.HostCannotAttachNetwork(p1, p2);
+ }
+ if (ErrorDescription[0].equals("WLB_URL_INVALID"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.WlbUrlInvalid(p1);
+ }
+ if (ErrorDescription[0].equals("DUPLICATE_VM"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.DuplicateVm(p1);
+ }
+ if (ErrorDescription[0].equals("HOST_CANNOT_DESTROY_SELF"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.HostCannotDestroySelf(p1);
+ }
+ if (ErrorDescription[0].equals("HOST_BROKEN"))
+ {
+ throw new Types.HostBroken();
+ }
+ if (ErrorDescription[0].equals("VM_CHECKPOINT_RESUME_FAILED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.VmCheckpointResumeFailed(p1);
+ }
+ if (ErrorDescription[0].equals("VM_TOO_MANY_VCPUS"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.VmTooManyVcpus(p1);
+ }
+ if (ErrorDescription[0].equals("HOST_IS_LIVE"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.HostIsLive(p1);
+ }
+ if (ErrorDescription[0].equals("IMPORT_ERROR_ATTACHED_DISKS_NOT_FOUND"))
+ {
+ throw new Types.ImportErrorAttachedDisksNotFound();
+ }
+ if (ErrorDescription[0].equals("VBD_NOT_UNPLUGGABLE"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.VbdNotUnpluggable(p1);
+ }
+ if (ErrorDescription[0].equals("XEN_VSS_REQ_ERROR_CREATING_SNAPSHOT"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ throw new Types.XenVssReqErrorCreatingSnapshot(p1, p2);
+ }
+ if (ErrorDescription[0].equals("CANNOT_ENABLE_REDO_LOG"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.CannotEnableRedoLog(p1);
+ }
+ if (ErrorDescription[0].equals("CANNOT_EVACUATE_HOST"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.CannotEvacuateHost(p1);
+ }
+ if (ErrorDescription[0].equals("NO_HOSTS_AVAILABLE"))
+ {
+ throw new Types.NoHostsAvailable();
+ }
+ if (ErrorDescription[0].equals("DEVICE_ATTACH_TIMEOUT"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ throw new Types.DeviceAttachTimeout(p1, p2);
+ }
+ if (ErrorDescription[0].equals("INVALID_DEVICE"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.InvalidDevice(p1);
+ }
+ if (ErrorDescription[0].equals("PBD_EXISTS"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ String p3 = ErrorDescription.length > 3 ? ErrorDescription[3] : "";
+ throw new Types.PbdExists(p1, p2, p3);
+ }
+ if (ErrorDescription[0].equals("WLB_XENSERVER_CONNECTION_REFUSED"))
+ {
+ throw new Types.WlbXenserverConnectionRefused();
+ }
+ if (ErrorDescription[0].equals("HOST_CANNOT_READ_METRICS"))
+ {
+ throw new Types.HostCannotReadMetrics();
+ }
+ if (ErrorDescription[0].equals("POOL_AUTH_ENABLE_FAILED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ throw new Types.PoolAuthEnableFailed(p1, p2);
+ }
+ if (ErrorDescription[0].equals("VM_SNAPSHOT_WITH_QUIESCE_NOT_SUPPORTED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ throw new Types.VmSnapshotWithQuiesceNotSupported(p1, p2);
+ }
+ if (ErrorDescription[0].equals("LICENSE_DOES_NOT_SUPPORT_POOLING"))
+ {
+ throw new Types.LicenseDoesNotSupportPooling();
+ }
+ if (ErrorDescription[0].equals("HOST_UNKNOWN_TO_MASTER"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.HostUnknownToMaster(p1);
+ }
+ if (ErrorDescription[0].equals("WLB_CONNECTION_REFUSED"))
+ {
+ throw new Types.WlbConnectionRefused();
+ }
+ if (ErrorDescription[0].equals("VM_SNAPSHOT_WITH_QUIESCE_PLUGIN_DEOS_NOT_RESPOND"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.VmSnapshotWithQuiescePluginDeosNotRespond(p1);
+ }
+ if (ErrorDescription[0].equals("VM_REQUIRES_SR"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ throw new Types.VmRequiresSr(p1, p2);
+ }
+ if (ErrorDescription[0].equals("VM_NO_CRASHDUMP_SR"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.VmNoCrashdumpSr(p1);
+ }
+ if (ErrorDescription[0].equals("HA_NOT_INSTALLED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.HaNotInstalled(p1);
+ }
+ if (ErrorDescription[0].equals("DUPLICATE_PIF_DEVICE_NAME"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.DuplicatePifDeviceName(p1);
+ }
+ if (ErrorDescription[0].equals("VM_BAD_POWER_STATE"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ String p3 = ErrorDescription.length > 3 ? ErrorDescription[3] : "";
+ throw new Types.VmBadPowerState(p1, p2, p3);
+ }
+ if (ErrorDescription[0].equals("WLB_DISABLED"))
+ {
+ throw new Types.WlbDisabled();
+ }
+ if (ErrorDescription[0].equals("POOL_JOINING_EXTERNAL_AUTH_MISMATCH"))
+ {
+ throw new Types.PoolJoiningExternalAuthMismatch();
+ }
+ if (ErrorDescription[0].equals("VM_BIOS_STRINGS_ALREADY_SET"))
+ {
+ throw new Types.VmBiosStringsAlreadySet();
+ }
+ if (ErrorDescription[0].equals("WLB_XENSERVER_UNKNOWN_HOST"))
+ {
+ throw new Types.WlbXenserverUnknownHost();
+ }
+ if (ErrorDescription[0].equals("HA_HOST_CANNOT_ACCESS_STATEFILE"))
+ {
+ throw new Types.HaHostCannotAccessStatefile();
+ }
+ if (ErrorDescription[0].equals("VM_FAILED_SHUTDOWN_ACKNOWLEDGMENT"))
+ {
+ throw new Types.VmFailedShutdownAcknowledgment();
+ }
+ if (ErrorDescription[0].equals("AUTH_SERVICE_ERROR"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.AuthServiceError(p1);
+ }
+ if (ErrorDescription[0].equals("HOST_IN_EMERGENCY_MODE"))
+ {
+ throw new Types.HostInEmergencyMode();
+ }
+ if (ErrorDescription[0].equals("HOST_DISABLED_UNTIL_REBOOT"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.HostDisabledUntilReboot(p1);
+ }
+ if (ErrorDescription[0].equals("DEFAULT_SR_NOT_FOUND"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.DefaultSrNotFound(p1);
+ }
+ if (ErrorDescription[0].equals("DEVICE_ALREADY_EXISTS"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.DeviceAlreadyExists(p1);
+ }
+ if (ErrorDescription[0].equals("SR_NOT_SHARABLE"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ throw new Types.SrNotSharable(p1, p2);
+ }
+ if (ErrorDescription[0].equals("AUTH_DISABLE_FAILED_PERMISSION_DENIED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.AuthDisableFailedPermissionDenied(p1);
+ }
+ if (ErrorDescription[0].equals("LICENSE_CANNOT_DOWNGRADE_WHILE_IN_POOL"))
+ {
+ throw new Types.LicenseCannotDowngradeWhileInPool();
+ }
+ if (ErrorDescription[0].equals("RBAC_PERMISSION_DENIED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ throw new Types.RbacPermissionDenied(p1, p2);
+ }
+ if (ErrorDescription[0].equals("TOO_MANY_PENDING_TASKS"))
+ {
+ throw new Types.TooManyPendingTasks();
+ }
+ if (ErrorDescription[0].equals("VM_SNAPSHOT_WITH_QUIESCE_TIMEOUT"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.VmSnapshotWithQuiesceTimeout(p1);
+ }
+ if (ErrorDescription[0].equals("PATCH_ALREADY_APPLIED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.PatchAlreadyApplied(p1);
+ }
+ if (ErrorDescription[0].equals("SR_UUID_EXISTS"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.SrUuidExists(p1);
+ }
+ if (ErrorDescription[0].equals("AUTH_ENABLE_FAILED_DOMAIN_LOOKUP_FAILED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.AuthEnableFailedDomainLookupFailed(p1);
+ }
+ if (ErrorDescription[0].equals("INVALID_FEATURE_STRING"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.InvalidFeatureString(p1);
+ }
+ if (ErrorDescription[0].equals("WLB_NOT_INITIALIZED"))
+ {
+ throw new Types.WlbNotInitialized();
+ }
+ if (ErrorDescription[0].equals("OPERATION_BLOCKED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ throw new Types.OperationBlocked(p1, p2);
+ }
+ if (ErrorDescription[0].equals("PROVISION_ONLY_ALLOWED_ON_TEMPLATE"))
+ {
+ throw new Types.ProvisionOnlyAllowedOnTemplate();
+ }
+ if (ErrorDescription[0].equals("VM_SHUTDOWN_TIMEOUT"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ throw new Types.VmShutdownTimeout(p1, p2);
+ }
+ if (ErrorDescription[0].equals("NETWORK_CONTAINS_PIF"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.NetworkContainsPif(p1);
+ }
+ if (ErrorDescription[0].equals("ROLE_ALREADY_EXISTS"))
+ {
+ throw new Types.RoleAlreadyExists();
+ }
+ if (ErrorDescription[0].equals("JOINING_HOST_SERVICE_FAILED"))
+ {
+ throw new Types.JoiningHostServiceFailed();
+ }
+ if (ErrorDescription[0].equals("VDI_MISSING"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ throw new Types.VdiMissing(p1, p2);
+ }
+ if (ErrorDescription[0].equals("VBD_TRAY_LOCKED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.VbdTrayLocked(p1);
+ }
+ if (ErrorDescription[0].equals("POOL_AUTH_ENABLE_FAILED_PERMISSION_DENIED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ throw new Types.PoolAuthEnableFailedPermissionDenied(p1, p2);
+ }
+ if (ErrorDescription[0].equals("UUID_INVALID"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ throw new Types.UuidInvalid(p1, p2);
+ }
+ if (ErrorDescription[0].equals("LICENCE_RESTRICTION"))
+ {
+ throw new Types.LicenceRestriction();
+ }
+ if (ErrorDescription[0].equals("VIF_IN_USE"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ throw new Types.VifInUse(p1, p2);
+ }
+ if (ErrorDescription[0].equals("ONLY_ALLOWED_ON_OEM_EDITION"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.OnlyAllowedOnOemEdition(p1);
+ }
+ if (ErrorDescription[0].equals("VDI_IS_A_PHYSICAL_DEVICE"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.VdiIsAPhysicalDevice(p1);
+ }
+ if (ErrorDescription[0].equals("LICENSE_PROCESSING_ERROR"))
+ {
+ throw new Types.LicenseProcessingError();
+ }
+ if (ErrorDescription[0].equals("CRL_DOES_NOT_EXIST"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.CrlDoesNotExist(p1);
+ }
+ if (ErrorDescription[0].equals("TASK_CANCELLED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.TaskCancelled(p1);
+ }
+ if (ErrorDescription[0].equals("VM_CRASHED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.VmCrashed(p1);
+ }
+ if (ErrorDescription[0].equals("POOL_AUTH_ENABLE_FAILED_DOMAIN_LOOKUP_FAILED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ throw new Types.PoolAuthEnableFailedDomainLookupFailed(p1, p2);
+ }
+ if (ErrorDescription[0].equals("HA_SHOULD_BE_FENCED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.HaShouldBeFenced(p1);
+ }
+ if (ErrorDescription[0].equals("VM_UNSAFE_BOOT"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.VmUnsafeBoot(p1);
+ }
+ if (ErrorDescription[0].equals("PIF_HAS_NO_NETWORK_CONFIGURATION"))
+ {
+ throw new Types.PifHasNoNetworkConfiguration();
+ }
+ if (ErrorDescription[0].equals("TOO_BUSY"))
+ {
+ throw new Types.TooBusy();
+ }
+ if (ErrorDescription[0].equals("VALUE_NOT_SUPPORTED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ String p3 = ErrorDescription.length > 3 ? ErrorDescription[3] : "";
+ throw new Types.ValueNotSupported(p1, p2, p3);
+ }
+ if (ErrorDescription[0].equals("SESSION_INVALID"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.SessionInvalid(p1);
+ }
+ if (ErrorDescription[0].equals("HA_CONSTRAINT_VIOLATION_NETWORK_NOT_SHARED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.HaConstraintViolationNetworkNotShared(p1);
+ }
+ if (ErrorDescription[0].equals("HA_FAILED_TO_FORM_LIVESET"))
+ {
+ throw new Types.HaFailedToFormLiveset();
+ }
+ if (ErrorDescription[0].equals("PIF_CANNOT_BOND_CROSS_HOST"))
+ {
+ throw new Types.PifCannotBondCrossHost();
+ }
+ if (ErrorDescription[0].equals("SR_REQUIRES_UPGRADE"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.SrRequiresUpgrade(p1);
+ }
+ if (ErrorDescription[0].equals("CERTIFICATE_DOES_NOT_EXIST"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.CertificateDoesNotExist(p1);
+ }
+ if (ErrorDescription[0].equals("HA_OPERATION_WOULD_BREAK_FAILOVER_PLAN"))
+ {
+ throw new Types.HaOperationWouldBreakFailoverPlan();
+ }
+ if (ErrorDescription[0].equals("CANNOT_FETCH_PATCH"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.CannotFetchPatch(p1);
+ }
+ if (ErrorDescription[0].equals("CANNOT_FIND_PATCH"))
+ {
+ throw new Types.CannotFindPatch();
+ }
+ if (ErrorDescription[0].equals("DB_UNIQUENESS_CONSTRAINT_VIOLATION"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ String p3 = ErrorDescription.length > 3 ? ErrorDescription[3] : "";
+ throw new Types.DbUniquenessConstraintViolation(p1, p2, p3);
+ }
+ if (ErrorDescription[0].equals("VM_REQUIRES_NETWORK"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ throw new Types.VmRequiresNetwork(p1, p2);
+ }
+ if (ErrorDescription[0].equals("VBD_NOT_EMPTY"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.VbdNotEmpty(p1);
+ }
+ if (ErrorDescription[0].equals("HOST_NOT_ENOUGH_FREE_MEMORY"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ throw new Types.HostNotEnoughFreeMemory(p1, p2);
+ }
+ if (ErrorDescription[0].equals("VM_MIGRATE_FAILED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ String p3 = ErrorDescription.length > 3 ? ErrorDescription[3] : "";
+ String p4 = ErrorDescription.length > 4 ? ErrorDescription[4] : "";
+ throw new Types.VmMigrateFailed(p1, p2, p3, p4);
+ }
+ if (ErrorDescription[0].equals("SR_OPERATION_NOT_SUPPORTED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.SrOperationNotSupported(p1);
+ }
+ if (ErrorDescription[0].equals("DEVICE_NOT_ATTACHED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.DeviceNotAttached(p1);
+ }
+ if (ErrorDescription[0].equals("HOST_DISABLED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.HostDisabled(p1);
+ }
+ if (ErrorDescription[0].equals("SYSTEM_STATUS_MUST_USE_TAR_ON_OEM"))
+ {
+ throw new Types.SystemStatusMustUseTarOnOem();
+ }
+ if (ErrorDescription[0].equals("XEN_VSS_REQ_ERROR_PREPARING_WRITERS"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ throw new Types.XenVssReqErrorPreparingWriters(p1, p2);
+ }
+ if (ErrorDescription[0].equals("AUTH_ENABLE_FAILED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.AuthEnableFailed(p1);
+ }
+ if (ErrorDescription[0].equals("JOINING_HOST_CANNOT_CONTAIN_SHARED_SRS"))
+ {
+ throw new Types.JoiningHostCannotContainSharedSrs();
+ }
+ if (ErrorDescription[0].equals("VM_NO_VCPUS"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.VmNoVcpus(p1);
+ }
+ if (ErrorDescription[0].equals("INVALID_PATCH_WITH_LOG"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.InvalidPatchWithLog(p1);
+ }
+ if (ErrorDescription[0].equals("SR_DEVICE_IN_USE"))
+ {
+ throw new Types.SrDeviceInUse();
+ }
+ if (ErrorDescription[0].equals("HOST_CD_DRIVE_EMPTY"))
+ {
+ throw new Types.HostCdDriveEmpty();
+ }
+ if (ErrorDescription[0].equals("HA_HOST_IS_ARMED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.HaHostIsArmed(p1);
+ }
+ if (ErrorDescription[0].equals("LICENSE_EXPIRED"))
+ {
+ throw new Types.LicenseExpired();
+ }
+ if (ErrorDescription[0].equals("SESSION_AUTHENTICATION_FAILED"))
+ {
+ throw new Types.SessionAuthenticationFailed();
+ }
+ if (ErrorDescription[0].equals("PIF_IS_VLAN"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.PifIsVlan(p1);
+ }
+ if (ErrorDescription[0].equals("VMPP_ARCHIVE_MORE_FREQUENT_THAN_BACKUP"))
+ {
+ throw new Types.VmppArchiveMoreFrequentThanBackup();
+ }
+ if (ErrorDescription[0].equals("JOINING_HOST_CANNOT_BE_MASTER_OF_OTHER_HOSTS"))
+ {
+ throw new Types.JoiningHostCannotBeMasterOfOtherHosts();
+ }
+ if (ErrorDescription[0].equals("HOST_HAS_RESIDENT_VMS"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.HostHasResidentVms(p1);
+ }
+ if (ErrorDescription[0].equals("VM_CHECKPOINT_SUSPEND_FAILED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.VmCheckpointSuspendFailed(p1);
+ }
+ if (ErrorDescription[0].equals("PIF_IS_MANAGEMENT_INTERFACE"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.PifIsManagementInterface(p1);
+ }
+ if (ErrorDescription[0].equals("MAC_INVALID"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.MacInvalid(p1);
+ }
+ if (ErrorDescription[0].equals("XEN_VSS_REQ_ERROR_START_SNAPSHOT_SET_FAILED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ throw new Types.XenVssReqErrorStartSnapshotSetFailed(p1, p2);
+ }
+ if (ErrorDescription[0].equals("VBD_IS_EMPTY"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.VbdIsEmpty(p1);
+ }
+ if (ErrorDescription[0].equals("PATCH_PRECHECK_FAILED_WRONG_SERVER_VERSION"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ String p3 = ErrorDescription.length > 3 ? ErrorDescription[3] : "";
+ throw new Types.PatchPrecheckFailedWrongServerVersion(p1, p2, p3);
+ }
+ if (ErrorDescription[0].equals("CANNOT_FIND_STATE_PARTITION"))
+ {
+ throw new Types.CannotFindStatePartition();
+ }
+ if (ErrorDescription[0].equals("AUTH_UNKNOWN_TYPE"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.AuthUnknownType(p1);
+ }
+ if (ErrorDescription[0].equals("WLB_AUTHENTICATION_FAILED"))
+ {
+ throw new Types.WlbAuthenticationFailed();
+ }
+ if (ErrorDescription[0].equals("NOT_IN_EMERGENCY_MODE"))
+ {
+ throw new Types.NotInEmergencyMode();
+ }
+ if (ErrorDescription[0].equals("AUTH_DISABLE_FAILED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.AuthDisableFailed(p1);
+ }
+ if (ErrorDescription[0].equals("NETWORK_ALREADY_CONNECTED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ throw new Types.NetworkAlreadyConnected(p1, p2);
+ }
+ if (ErrorDescription[0].equals("VDI_INCOMPATIBLE_TYPE"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ throw new Types.VdiIncompatibleType(p1, p2);
+ }
+ if (ErrorDescription[0].equals("WLB_UNKNOWN_HOST"))
+ {
+ throw new Types.WlbUnknownHost();
+ }
+ if (ErrorDescription[0].equals("IMPORT_ERROR"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.ImportError(p1);
+ }
+ if (ErrorDescription[0].equals("SR_UNKNOWN_DRIVER"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.SrUnknownDriver(p1);
+ }
+ if (ErrorDescription[0].equals("AUTH_DISABLE_FAILED_WRONG_CREDENTIALS"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.AuthDisableFailedWrongCredentials(p1);
+ }
+ if (ErrorDescription[0].equals("VM_HALTED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.VmHalted(p1);
+ }
+ if (ErrorDescription[0].equals("FEATURE_RESTRICTED"))
+ {
+ throw new Types.FeatureRestricted();
+ }
+ if (ErrorDescription[0].equals("CRL_NAME_INVALID"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.CrlNameInvalid(p1);
+ }
+ if (ErrorDescription[0].equals("HOST_POWER_ON_MODE_DISABLED"))
+ {
+ throw new Types.HostPowerOnModeDisabled();
+ }
+ if (ErrorDescription[0].equals("ACTIVATION_WHILE_NOT_FREE"))
+ {
+ throw new Types.ActivationWhileNotFree();
+ }
+ if (ErrorDescription[0].equals("XENAPI_PLUGIN_FAILURE"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ String p3 = ErrorDescription.length > 3 ? ErrorDescription[3] : "";
+ throw new Types.XenapiPluginFailure(p1, p2, p3);
+ }
+ if (ErrorDescription[0].equals("MAC_STILL_EXISTS"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.MacStillExists(p1);
+ }
+ if (ErrorDescription[0].equals("HOST_IN_USE"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ String p3 = ErrorDescription.length > 3 ? ErrorDescription[3] : "";
+ throw new Types.HostInUse(p1, p2, p3);
+ }
+ if (ErrorDescription[0].equals("HA_TOO_FEW_HOSTS"))
+ {
+ throw new Types.HaTooFewHosts();
+ }
+ if (ErrorDescription[0].equals("WLB_CONNECTION_RESET"))
+ {
+ throw new Types.WlbConnectionReset();
+ }
+ if (ErrorDescription[0].equals("POOL_AUTH_ENABLE_FAILED_WRONG_CREDENTIALS"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ throw new Types.PoolAuthEnableFailedWrongCredentials(p1, p2);
+ }
+ if (ErrorDescription[0].equals("PATCH_IS_APPLIED"))
+ {
+ throw new Types.PatchIsApplied();
+ }
+ if (ErrorDescription[0].equals("SR_HAS_PBD"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.SrHasPbd(p1);
+ }
+ if (ErrorDescription[0].equals("HOST_STILL_BOOTING"))
+ {
+ throw new Types.HostStillBooting();
+ }
+ if (ErrorDescription[0].equals("WLB_MALFORMED_REQUEST"))
+ {
+ throw new Types.WlbMalformedRequest();
+ }
+ if (ErrorDescription[0].equals("OBJECT_NOLONGER_EXISTS"))
+ {
+ throw new Types.ObjectNolongerExists();
+ }
+ if (ErrorDescription[0].equals("HOSTS_NOT_HOMOGENEOUS"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.HostsNotHomogeneous(p1);
+ }
+ if (ErrorDescription[0].equals("POOL_JOINING_HOST_MUST_HAVE_SAME_PRODUCT_VERSION"))
+ {
+ throw new Types.PoolJoiningHostMustHaveSameProductVersion();
+ }
+ if (ErrorDescription[0].equals("PIF_VLAN_EXISTS"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.PifVlanExists(p1);
+ }
+ if (ErrorDescription[0].equals("LICENSE_CHECKOUT_ERROR"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.LicenseCheckoutError(p1);
+ }
+ if (ErrorDescription[0].equals("CERTIFICATE_LIBRARY_CORRUPT"))
+ {
+ throw new Types.CertificateLibraryCorrupt();
+ }
+ if (ErrorDescription[0].equals("VDI_NOT_MANAGED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.VdiNotManaged(p1);
+ }
+ if (ErrorDescription[0].equals("INVALID_EDITION"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.InvalidEdition(p1);
+ }
+ if (ErrorDescription[0].equals("PATCH_ALREADY_EXISTS"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.PatchAlreadyExists(p1);
+ }
+ if (ErrorDescription[0].equals("OUT_OF_SPACE"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.OutOfSpace(p1);
+ }
+ if (ErrorDescription[0].equals("IMPORT_ERROR_PREMATURE_EOF"))
+ {
+ throw new Types.ImportErrorPrematureEof();
+ }
+ if (ErrorDescription[0].equals("VM_MEMORY_SIZE_TOO_LOW"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.VmMemorySizeTooLow(p1);
+ }
+ if (ErrorDescription[0].equals("VMPP_HAS_VM"))
+ {
+ throw new Types.VmppHasVm();
+ }
+ if (ErrorDescription[0].equals("HOST_NOT_DISABLED"))
+ {
+ throw new Types.HostNotDisabled();
+ }
+ if (ErrorDescription[0].equals("FIELD_TYPE_ERROR"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.FieldTypeError(p1);
+ }
+ if (ErrorDescription[0].equals("SLAVE_REQUIRES_MANAGEMENT_INTERFACE"))
+ {
+ throw new Types.SlaveRequiresManagementInterface();
+ }
+ if (ErrorDescription[0].equals("VM_IS_TEMPLATE"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.VmIsTemplate(p1);
+ }
+ if (ErrorDescription[0].equals("VM_IS_PROTECTED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.VmIsProtected(p1);
+ }
+ if (ErrorDescription[0].equals("JOINING_HOST_CANNOT_HAVE_RUNNING_VMS"))
+ {
+ throw new Types.JoiningHostCannotHaveRunningVms();
+ }
+ if (ErrorDescription[0].equals("VM_REQUIRES_VDI"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ throw new Types.VmRequiresVdi(p1, p2);
+ }
+ if (ErrorDescription[0].equals("VBD_CDS_MUST_BE_READONLY"))
+ {
+ throw new Types.VbdCdsMustBeReadonly();
+ }
+ if (ErrorDescription[0].equals("LICENSE_FILE_DEPRECATED"))
+ {
+ throw new Types.LicenseFileDeprecated();
+ }
+ if (ErrorDescription[0].equals("CANNOT_CREATE_STATE_FILE"))
+ {
+ throw new Types.CannotCreateStateFile();
+ }
+ if (ErrorDescription[0].equals("JOINING_HOST_CANNOT_HAVE_VMS_WITH_CURRENT_OPERATIONS"))
+ {
+ throw new Types.JoiningHostCannotHaveVmsWithCurrentOperations();
+ }
+ if (ErrorDescription[0].equals("MESSAGE_PARAMETER_COUNT_MISMATCH"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ String p3 = ErrorDescription.length > 3 ? ErrorDescription[3] : "";
+ throw new Types.MessageParameterCountMismatch(p1, p2, p3);
+ }
+ if (ErrorDescription[0].equals("POOL_AUTH_ALREADY_ENABLED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.PoolAuthAlreadyEnabled(p1);
+ }
+ if (ErrorDescription[0].equals("RESTORE_INCOMPATIBLE_VERSION"))
+ {
+ throw new Types.RestoreIncompatibleVersion();
+ }
+ if (ErrorDescription[0].equals("DEVICE_DETACH_REJECTED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ String p3 = ErrorDescription.length > 3 ? ErrorDescription[3] : "";
+ throw new Types.DeviceDetachRejected(p1, p2, p3);
+ }
+ if (ErrorDescription[0].equals("AUTH_IS_DISABLED"))
+ {
+ throw new Types.AuthIsDisabled();
+ }
+ if (ErrorDescription[0].equals("JOINING_HOST_CANNOT_HAVE_RUNNING_OR_SUSPENDED_VMS"))
+ {
+ throw new Types.JoiningHostCannotHaveRunningOrSuspendedVms();
+ }
+ if (ErrorDescription[0].equals("PATCH_PRECHECK_FAILED_PREREQUISITE_MISSING"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ throw new Types.PatchPrecheckFailedPrerequisiteMissing(p1, p2);
+ }
+ if (ErrorDescription[0].equals("WLB_XENSERVER_TIMEOUT"))
+ {
+ throw new Types.WlbXenserverTimeout();
+ }
+ if (ErrorDescription[0].equals("VM_SNAPSHOT_WITH_QUIESCE_FAILED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.VmSnapshotWithQuiesceFailed(p1);
+ }
+ if (ErrorDescription[0].equals("POOL_AUTH_DISABLE_FAILED_WRONG_CREDENTIALS"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ throw new Types.PoolAuthDisableFailedWrongCredentials(p1, p2);
+ }
+ if (ErrorDescription[0].equals("CERTIFICATE_CORRUPT"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.CertificateCorrupt(p1);
+ }
+ if (ErrorDescription[0].equals("WLB_INTERNAL_ERROR"))
+ {
+ throw new Types.WlbInternalError();
+ }
+ if (ErrorDescription[0].equals("VM_REBOOTED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.VmRebooted(p1);
+ }
+ if (ErrorDescription[0].equals("CANNOT_CONTACT_HOST"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.CannotContactHost(p1);
+ }
+ if (ErrorDescription[0].equals("XEN_VSS_REQ_ERROR_NO_VOLUMES_SUPPORTED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ throw new Types.XenVssReqErrorNoVolumesSupported(p1, p2);
+ }
+ if (ErrorDescription[0].equals("HOST_ITS_OWN_SLAVE"))
+ {
+ throw new Types.HostItsOwnSlave();
+ }
+ if (ErrorDescription[0].equals("REDO_LOG_IS_ENABLED"))
+ {
+ throw new Types.RedoLogIsEnabled();
+ }
+ if (ErrorDescription[0].equals("VM_MISSING_PV_DRIVERS"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.VmMissingPvDrivers(p1);
+ }
+ if (ErrorDescription[0].equals("CERTIFICATE_NAME_INVALID"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.CertificateNameInvalid(p1);
+ }
+ if (ErrorDescription[0].equals("IMPORT_ERROR_FAILED_TO_FIND_OBJECT"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.ImportErrorFailedToFindObject(p1);
+ }
+ if (ErrorDescription[0].equals("VDI_LOCATION_MISSING"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ throw new Types.VdiLocationMissing(p1, p2);
+ }
+ if (ErrorDescription[0].equals("AUTH_ENABLE_FAILED_PERMISSION_DENIED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.AuthEnableFailedPermissionDenied(p1);
+ }
+ if (ErrorDescription[0].equals("PIF_VLAN_STILL_EXISTS"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.PifVlanStillExists(p1);
+ }
+ if (ErrorDescription[0].equals("VMS_FAILED_TO_COOPERATE"))
+ {
+ throw new Types.VmsFailedToCooperate();
+ }
+ if (ErrorDescription[0].equals("NETWORK_CONTAINS_VIF"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.NetworkContainsVif(p1);
+ }
+ if (ErrorDescription[0].equals("INVALID_VALUE"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ throw new Types.InvalidValue(p1, p2);
+ }
+ if (ErrorDescription[0].equals("XENAPI_MISSING_PLUGIN"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.XenapiMissingPlugin(p1);
+ }
+ if (ErrorDescription[0].equals("RESTORE_TARGET_MGMT_IF_NOT_IN_BACKUP"))
+ {
+ throw new Types.RestoreTargetMgmtIfNotInBackup();
+ }
+ if (ErrorDescription[0].equals("IS_TUNNEL_ACCESS_PIF"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.IsTunnelAccessPif(p1);
+ }
+ if (ErrorDescription[0].equals("JOINING_HOST_CONNECTION_FAILED"))
+ {
+ throw new Types.JoiningHostConnectionFailed();
+ }
+ if (ErrorDescription[0].equals("XEN_VSS_REQ_ERROR_ADDING_VOLUME_TO_SNAPSET_FAILED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ throw new Types.XenVssReqErrorAddingVolumeToSnapsetFailed(p1, p2);
+ }
+ if (ErrorDescription[0].equals("SUBJECT_CANNOT_BE_RESOLVED"))
+ {
+ throw new Types.SubjectCannotBeResolved();
+ }
+ if (ErrorDescription[0].equals("PROVISION_FAILED_OUT_OF_SPACE"))
+ {
+ throw new Types.ProvisionFailedOutOfSpace();
+ }
+ if (ErrorDescription[0].equals("VDI_IS_NOT_ISO"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ throw new Types.VdiIsNotIso(p1, p2);
+ }
+ if (ErrorDescription[0].equals("MESSAGE_METHOD_UNKNOWN"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.MessageMethodUnknown(p1);
+ }
+ if (ErrorDescription[0].equals("VM_CANNOT_DELETE_DEFAULT_TEMPLATE"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.VmCannotDeleteDefaultTemplate(p1);
+ }
+ if (ErrorDescription[0].equals("ROLE_NOT_FOUND"))
+ {
+ throw new Types.RoleNotFound();
+ }
+ if (ErrorDescription[0].equals("NOT_ALLOWED_ON_OEM_EDITION"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.NotAllowedOnOemEdition(p1);
+ }
+ if (ErrorDescription[0].equals("RESTORE_SCRIPT_FAILED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.RestoreScriptFailed(p1);
+ }
+ if (ErrorDescription[0].equals("INTERNAL_ERROR"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.InternalError(p1);
+ }
+ if (ErrorDescription[0].equals("LICENSE_DOES_NOT_SUPPORT_XHA"))
+ {
+ throw new Types.LicenseDoesNotSupportXha();
+ }
+ if (ErrorDescription[0].equals("DEVICE_ALREADY_DETACHED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.DeviceAlreadyDetached(p1);
+ }
+ if (ErrorDescription[0].equals("AUTH_ENABLE_FAILED_UNAVAILABLE"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.AuthEnableFailedUnavailable(p1);
+ }
+ if (ErrorDescription[0].equals("VBD_NOT_REMOVABLE_MEDIA"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.VbdNotRemovableMedia(p1);
+ }
+ if (ErrorDescription[0].equals("LOCATION_NOT_UNIQUE"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ throw new Types.LocationNotUnique(p1, p2);
+ }
+ if (ErrorDescription[0].equals("NOT_IMPLEMENTED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.NotImplemented(p1);
+ }
+ if (ErrorDescription[0].equals("CANNOT_PLUG_VIF"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.CannotPlugVif(p1);
+ }
+ if (ErrorDescription[0].equals("USER_IS_NOT_LOCAL_SUPERUSER"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.UserIsNotLocalSuperuser(p1);
+ }
+ if (ErrorDescription[0].equals("BACKUP_SCRIPT_FAILED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.BackupScriptFailed(p1);
+ }
+ if (ErrorDescription[0].equals("IMPORT_ERROR_UNEXPECTED_FILE"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ throw new Types.ImportErrorUnexpectedFile(p1, p2);
+ }
+ if (ErrorDescription[0].equals("AUTH_ALREADY_ENABLED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ throw new Types.AuthAlreadyEnabled(p1, p2);
+ }
+ if (ErrorDescription[0].equals("OPERATION_NOT_ALLOWED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.OperationNotAllowed(p1);
+ }
+ if (ErrorDescription[0].equals("HA_NO_PLAN"))
+ {
+ throw new Types.HaNoPlan();
+ }
+ if (ErrorDescription[0].equals("EVENTS_LOST"))
+ {
+ throw new Types.EventsLost();
+ }
+ if (ErrorDescription[0].equals("SR_BACKEND_FAILURE"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ String p3 = ErrorDescription.length > 3 ? ErrorDescription[3] : "";
+ throw new Types.SrBackendFailure(p1, p2, p3);
+ }
+ if (ErrorDescription[0].equals("DEVICE_DETACH_TIMEOUT"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ throw new Types.DeviceDetachTimeout(p1, p2);
+ }
+ if (ErrorDescription[0].equals("VM_DUPLICATE_VBD_DEVICE"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ String p3 = ErrorDescription.length > 3 ? ErrorDescription[3] : "";
+ throw new Types.VmDuplicateVbdDevice(p1, p2, p3);
+ }
+ if (ErrorDescription[0].equals("CRL_CORRUPT"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.CrlCorrupt(p1);
+ }
+ if (ErrorDescription[0].equals("VM_OLD_PV_DRIVERS"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ String p3 = ErrorDescription.length > 3 ? ErrorDescription[3] : "";
+ throw new Types.VmOldPvDrivers(p1, p2, p3);
+ }
+ if (ErrorDescription[0].equals("PIF_DOES_NOT_ALLOW_UNPLUG"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.PifDoesNotAllowUnplug(p1);
+ }
+ if (ErrorDescription[0].equals("CHANGE_PASSWORD_REJECTED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.ChangePasswordRejected(p1);
+ }
+ if (ErrorDescription[0].equals("OTHER_OPERATION_IN_PROGRESS"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ throw new Types.OtherOperationInProgress(p1, p2);
+ }
+ if (ErrorDescription[0].equals("XEN_VSS_REQ_ERROR_INIT_FAILED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ throw new Types.XenVssReqErrorInitFailed(p1, p2);
+ }
+ if (ErrorDescription[0].equals("CPU_FEATURE_MASKING_NOT_SUPPORTED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.CpuFeatureMaskingNotSupported(p1);
+ }
+ if (ErrorDescription[0].equals("VM_NOT_RESIDENT_HERE"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ throw new Types.VmNotResidentHere(p1, p2);
+ }
+ if (ErrorDescription[0].equals("HOST_OFFLINE"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.HostOffline(p1);
+ }
+ if (ErrorDescription[0].equals("POOL_AUTH_DISABLE_FAILED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ throw new Types.PoolAuthDisableFailed(p1, p2);
+ }
+ if (ErrorDescription[0].equals("HOST_HAS_NO_MANAGEMENT_IP"))
+ {
+ throw new Types.HostHasNoManagementIp();
+ }
+ if (ErrorDescription[0].equals("TRANSPORT_PIF_NOT_CONFIGURED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.TransportPifNotConfigured(p1);
+ }
+ if (ErrorDescription[0].equals("HA_IS_ENABLED"))
+ {
+ throw new Types.HaIsEnabled();
+ }
+ if (ErrorDescription[0].equals("VM_REVERT_FAILED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ throw new Types.VmRevertFailed(p1, p2);
+ }
+ if (ErrorDescription[0].equals("HOST_NAME_INVALID"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.HostNameInvalid(p1);
+ }
+ if (ErrorDescription[0].equals("DOMAIN_EXISTS"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ throw new Types.DomainExists(p1, p2);
+ }
+ if (ErrorDescription[0].equals("HA_POOL_IS_ENABLED_BUT_HOST_IS_DISABLED"))
+ {
+ throw new Types.HaPoolIsEnabledButHostIsDisabled();
+ }
+ if (ErrorDescription[0].equals("MESSAGE_DEPRECATED"))
+ {
+ throw new Types.MessageDeprecated();
+ }
+ if (ErrorDescription[0].equals("HA_CONSTRAINT_VIOLATION_SR_NOT_SHARED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.HaConstraintViolationSrNotShared(p1);
+ }
+ if (ErrorDescription[0].equals("IMPORT_ERROR_CANNOT_HANDLE_CHUNKED"))
+ {
+ throw new Types.ImportErrorCannotHandleChunked();
+ }
+ if (ErrorDescription[0].equals("VM_ATTACHED_TO_MORE_THAN_ONE_VDI_WITH_TIMEOFFSET_MARKED_AS_RESET_ON_BOOT"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.VmAttachedToMoreThanOneVdiWithTimeoffsetMarkedAsResetOnBoot(p1);
+ }
+ if (ErrorDescription[0].equals("NOT_SUPPORTED_DURING_UPGRADE"))
+ {
+ throw new Types.NotSupportedDuringUpgrade();
+ }
+ if (ErrorDescription[0].equals("PIF_CONFIGURATION_ERROR"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
+ throw new Types.PifConfigurationError(p1, p2);
+ }
+ if (ErrorDescription[0].equals("INTERFACE_HAS_NO_IP"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.InterfaceHasNoIp(p1);
+ }
+ if (ErrorDescription[0].equals("AUTH_ENABLE_FAILED_WRONG_CREDENTIALS"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.AuthEnableFailedWrongCredentials(p1);
+ }
+
+ // An unknown error occurred
+ throw new Types.XenAPIException(ErrorDescription);
+ }
+
+ throw new BadServerResponse(response);
+ }
+
+ public enum VdiOperations {
+ /**
+ * The value does not belong to this enumeration
+ */
+ UNRECOGNIZED,
+ /**
+ * Scanning backends for new or deleted VDIs
+ */
+ SCAN,
+ /**
+ * Cloning the VDI
+ */
+ CLONE,
+ /**
+ * Copying the VDI
+ */
+ COPY,
+ /**
+ * Resizing the VDI
+ */
+ RESIZE,
+ /**
+ * Resizing the VDI which may or may not be online
+ */
+ RESIZE_ONLINE,
+ /**
+ * Snapshotting the VDI
+ */
+ SNAPSHOT,
+ /**
+ * Destroying the VDI
+ */
+ DESTROY,
+ /**
+ * Forget about the VDI
+ */
+ FORGET,
+ /**
+ * Refreshing the fields of the VDI
+ */
+ UPDATE,
+ /**
+ * Forcibly unlocking the VDI
+ */
+ FORCE_UNLOCK,
+ /**
+ * Generating static configuration
+ */
+ GENERATE_CONFIG,
+ /**
+ * Operations on this VDI are temporarily blocked
+ */
+ BLOCKED
+ };
+
+ public enum Cls {
+ /**
+ * The value does not belong to this enumeration
+ */
+ UNRECOGNIZED,
+ /**
+ * VM
+ */
+ VM,
+ /**
+ * Host
+ */
+ HOST,
+ /**
+ * SR
+ */
+ SR,
+ /**
+ * Pool
+ */
+ POOL,
+ /**
+ * VMPP
+ */
+ VMPP
+ };
+
+ public enum VdiType {
+ /**
+ * The value does not belong to this enumeration
+ */
+ UNRECOGNIZED,
+ /**
+ * a disk that may be replaced on upgrade
+ */
+ SYSTEM,
+ /**
+ * a disk that is always preserved on upgrade
+ */
+ USER,
+ /**
+ * a disk that may be reformatted on upgrade
+ */
+ EPHEMERAL,
+ /**
+ * a disk that stores a suspend image
+ */
+ SUSPEND,
+ /**
+ * a disk that stores VM crashdump information
+ */
+ CRASHDUMP,
+ /**
+ * a disk used for HA storage heartbeating
+ */
+ HA_STATEFILE,
+ /**
+ * a disk used for HA Pool metadata
+ */
+ METADATA,
+ /**
+ * a disk used for a general metadata redo-log
+ */
+ REDO_LOG
+ };
+
+ public enum AfterApplyGuidance {
+ /**
+ * The value does not belong to this enumeration
+ */
+ UNRECOGNIZED,
+ /**
+ * This patch requires HVM guests to be restarted once applied.
+ */
+ RESTARTHVM,
+ /**
+ * This patch requires PV guests to be restarted once applied.
+ */
+ RESTARTPV,
+ /**
+ * This patch requires the host to be restarted once applied.
+ */
+ RESTARTHOST,
+ /**
+ * This patch requires XAPI to be restarted once applied.
+ */
+ RESTARTXAPI
+ };
+
+ public enum EventOperation {
+ /**
+ * The value does not belong to this enumeration
+ */
+ UNRECOGNIZED,
+ /**
+ * An object has been created
+ */
+ ADD,
+ /**
+ * An object has been deleted
+ */
+ DEL,
+ /**
+ * An object has been modified
+ */
+ MOD
+ };
+
+ public enum TaskAllowedOperations {
+ /**
+ * The value does not belong to this enumeration
+ */
+ UNRECOGNIZED,
+ /**
+ * refers to the operation "cancel"
+ */
+ CANCEL
+ };
+
+ public enum TaskStatusType {
+ /**
+ * The value does not belong to this enumeration
+ */
+ UNRECOGNIZED,
+ /**
+ * task is in progress
+ */
+ PENDING,
+ /**
+ * task was completed successfully
+ */
+ SUCCESS,
+ /**
+ * task has failed
+ */
+ FAILURE,
+ /**
+ * task is being cancelled
+ */
+ CANCELLING,
+ /**
+ * task has been cancelled
+ */
+ CANCELLED
+ };
+
+ public enum NetworkOperations {
+ /**
+ * The value does not belong to this enumeration
+ */
+ UNRECOGNIZED,
+ /**
+ * Indicates this network is attaching to a VIF or PIF
+ */
+ ATTACHING
+ };
+
+ public enum ConsoleProtocol {
+ /**
+ * The value does not belong to this enumeration
+ */
+ UNRECOGNIZED,
+ /**
+ * VT100 terminal
+ */
+ VT100,
+ /**
+ * Remote FrameBuffer protocol (as used in VNC)
+ */
+ RFB,
+ /**
+ * Remote Desktop Protocol
+ */
+ RDP
+ };
+
+ public enum OnCrashBehaviour {
+ /**
+ * The value does not belong to this enumeration
+ */
+ UNRECOGNIZED,
+ /**
+ * destroy the VM state
+ */
+ DESTROY,
+ /**
+ * record a coredump and then destroy the VM state
+ */
+ COREDUMP_AND_DESTROY,
+ /**
+ * restart the VM
+ */
+ RESTART,
+ /**
+ * record a coredump and then restart the VM
+ */
+ COREDUMP_AND_RESTART,
+ /**
+ * leave the crashed VM paused
+ */
+ PRESERVE,
+ /**
+ * rename the crashed VM and start a new copy
+ */
+ RENAME_RESTART
+ };
+
+ public enum VmppBackupType {
+ /**
+ * The value does not belong to this enumeration
+ */
+ UNRECOGNIZED,
+ /**
+ * The backup is a snapshot
+ */
+ SNAPSHOT,
+ /**
+ * The backup is a checkpoint
+ */
+ CHECKPOINT
+ };
+
+ public enum OnNormalExit {
+ /**
+ * The value does not belong to this enumeration
+ */
+ UNRECOGNIZED,
+ /**
+ * destroy the VM state
+ */
+ DESTROY,
+ /**
+ * restart the VM
+ */
+ RESTART
+ };
+
+ public enum VifOperations {
+ /**
+ * The value does not belong to this enumeration
+ */
+ UNRECOGNIZED,
+ /**
+ * Attempting to attach this VIF to a VM
+ */
+ ATTACH,
+ /**
+ * Attempting to hotplug this VIF
+ */
+ PLUG,
+ /**
+ * Attempting to hot unplug this VIF
+ */
+ UNPLUG
+ };
+
+ public enum XenAPIObjects {
+ /**
+ * The value does not belong to this enumeration
+ */
+ UNRECOGNIZED,
+ /**
+ * A session
+ */
+ SESSION,
+
<TRUNCATED>