diff --git a/deps/XenServerJava/src/LICENSE.Apache-2.0.txt b/deps/XenServerJava/src/LICENSE.Apache-2.0.txt new file mode 100755 index 00000000000..261eeb9e9f8 --- /dev/null +++ b/deps/XenServerJava/src/LICENSE.Apache-2.0.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/deps/XenServerJava/src/LICENSE.txt b/deps/XenServerJava/src/LICENSE.txt new file mode 100755 index 00000000000..76c4a2240fa --- /dev/null +++ b/deps/XenServerJava/src/LICENSE.txt @@ -0,0 +1,26 @@ +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. \ No newline at end of file diff --git a/deps/XenServerJava/src/README.txt b/deps/XenServerJava/src/README.txt new file mode 100755 index 00000000000..2e6fa457cd0 --- /dev/null +++ b/deps/XenServerJava/src/README.txt @@ -0,0 +1,57 @@ +XenServerJava +============= + +NOTE: This is a modified version of Citrix XenServer's SDK. This version of +XenServerJava includes some customization which is required to make it work +with CloudStack. + + +Version 6.2.0-1. + +XenServerJava is a complete SDK for Citrix XenServer, exposing the XenServer +API as Java classes. + +For XenServer documentation, see http://docs.xensource.com. +XenServerJava includes a class for every XenServer class, and a method for +each XenServer API call, so API documentation and examples written for +for other languages will apply equally well to Java. +In particular, the SDK Guide and API Documentation are ideal for developers +wishing to use XenServerJava. + +For community content, blogs, and downloads, visit the XenServer Developer +Network at http://community.citrix.com/cdn/xs. + +XenServerJava is free sofware. You can redistribute and modify it under the +terms of the BSD license. See LICENSE.txt for details. + +This library may be accompanied by pedagogical examples. These do not form +part of this library, and are licensed for redistribution and modification +under the BSD license. Such examples are licensed clearly at the top +of each file. + + +Dependencies +------------ + +XenServerJava is dependent upon Apache XML-RPC and WS-Commons, both by The +Apache Software Foundation. We would like to thank the ASF and the +Apache XML-RPC development team in particular. +Both are licensed under the Apache Software License 2.0; see +LICENSE.Apache-2.0.txt for details. + +We test with version 3.1 of Apache XML-RPC, and version 1.0.2 of WS-Commons. +We recommend that you use these versions, though others may work. + + +Downloads +--------- + +XenServerJava is available in the XenServer-6.2.0-SDK.zip in three separate +folders, one for the compiled binaries, one for the source code, +and one containing sample code. + +The XenServer-6.2.0-SDK.zip is available from +http://www.citrix.com/downloads/xenserver/. + +Apache XML-RPC is available from http://ws.apache.org/xmlrpc/. +WS-Commons is available from http://ws.apache.org/commons/. diff --git a/deps/XenServerJava/src/com/xensource/xenapi/APIVersion.java b/deps/XenServerJava/src/com/xensource/xenapi/APIVersion.java old mode 100644 new mode 100755 index 8d7247d4fc3..9dcdd9f151e --- a/deps/XenServerJava/src/com/xensource/xenapi/APIVersion.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/APIVersion.java @@ -1,18 +1,19 @@ -/* Copyright (c) Citrix Systems, Inc. +/* + * 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 @@ -31,16 +32,24 @@ package com.xensource.xenapi; public enum APIVersion { - API_1_1, API_1_2, API_1_3, API_1_4, API_1_5, API_1_6, API_1_7, API_1_8, API_1_9, API_1_10, UNKNOWN; + API_1_1, API_1_2, API_1_3, API_1_4, API_1_5, API_1_6, API_1_7, API_1_8, API_1_9, API_1_10, API_2_0, API_2_1, UNKNOWN; public static APIVersion latest() { - return API_1_10; + return API_2_1; } public static APIVersion fromMajorMinor(long major, long minor) { - if (major == 1 && minor == 10) + if (major == 2 && minor == 1) + { + return API_2_1; + } + else if (major == 2 && minor == 0) + { + return API_2_0; + } + else if (major == 1 && minor == 10) { return API_1_10; } @@ -91,28 +100,32 @@ public enum APIVersion { switch (this) { - case API_1_1: - return "1.1"; - case API_1_2: - return "1.2"; - case API_1_3: - return "1.3"; - case API_1_4: - return "1.4"; - case API_1_5: - return "1.5"; - case API_1_6: - return "1.6"; - case API_1_7: - return "1.7"; - case API_1_8: - return "1.8"; - case API_1_9: - return "1.9"; - case API_1_10: - return "1.10"; - default: - return "Unknown"; + case API_1_1: + return "1.1"; + case API_1_2: + return "1.2"; + case API_1_3: + return "1.3"; + case API_1_4: + return "1.4"; + case API_1_5: + return "1.5"; + case API_1_6: + return "1.6"; + case API_1_7: + return "1.7"; + case API_1_8: + return "1.8"; + case API_1_9: + return "1.9"; + case API_1_10: + return "1.10"; + case API_2_0: + return "2.0"; + case API_2_1: + return "2.1"; + default: + return "Unknown"; } } } diff --git a/deps/XenServerJava/src/com/xensource/xenapi/Auth.java b/deps/XenServerJava/src/com/xensource/xenapi/Auth.java index cffaaaca965..4778e6ab061 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/Auth.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/Auth.java @@ -1,19 +1,19 @@ /* * 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 @@ -28,6 +28,7 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ + package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -51,6 +52,7 @@ import org.apache.xmlrpc.XmlRpcException; */ public class Auth extends XenAPIObject { + public String toWireString() { return null; } @@ -62,15 +64,15 @@ public class Auth extends XenAPIObject { * @return the subject_identifier obtained from the external directory service */ public static String getSubjectIdentifier(Connection c, String subjectName) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "auth.get_subject_identifier"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(subjectName)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -80,15 +82,15 @@ public class Auth extends XenAPIObject { * @return key-value pairs containing at least a key called subject_name */ public static Map getSubjectInformationFromIdentifier(Connection c, String subjectIdentifier) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "auth.get_subject_information_from_identifier"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(subjectIdentifier)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -98,15 +100,15 @@ public class Auth extends XenAPIObject { * @return set of subject_identifiers that provides the group membership of subject_identifier passed as argument, it contains, recursively, all groups a subject_identifier is member of. */ public static Set getGroupMembership(Connection c, String subjectIdentifier) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "auth.get_group_membership"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(subjectIdentifier)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/Blob.java b/deps/XenServerJava/src/com/xensource/xenapi/Blob.java index 494b9286407..ec91d8788f6 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/Blob.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/Blob.java @@ -1,19 +1,19 @@ /* * 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 @@ -28,6 +28,7 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ + package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -60,14 +61,14 @@ public class Blob extends XenAPIObject { * For internal use only. */ Blob(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -78,7 +79,7 @@ public class Blob extends XenAPIObject { { if (obj != null && obj instanceof Blob) { - Blob other = (Blob)obj; + Blob other = (Blob) obj; return other.ref.equals(this.ref); } else { @@ -112,8 +113,8 @@ public class Blob extends XenAPIObject { /** * Convert a blob.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("name_label", this.nameLabel == null ? "" : this.nameLabel); map.put("name_description", this.nameDescription == null ? "" : this.nameDescription); @@ -160,15 +161,15 @@ public class Blob extends XenAPIObject { * @return all fields from the object */ public Blob.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "blob.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBlobRecord(result); + return Types.toBlobRecord(result); } /** @@ -178,15 +179,15 @@ public class Blob extends XenAPIObject { * @return reference to the object */ public static Blob getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "blob.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBlob(result); + return Types.toBlob(result); } /** @@ -196,15 +197,15 @@ public class Blob extends XenAPIObject { * @return references to objects with matching names */ public static Set getByNameLabel(Connection c, String label) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "blob.get_by_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(label)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfBlob(result); + return Types.toSetOfBlob(result); } /** @@ -213,15 +214,15 @@ public class Blob extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "blob.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -230,15 +231,15 @@ public class Blob extends XenAPIObject { * @return value of the field */ public String getNameLabel(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "blob.get_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -247,15 +248,15 @@ public class Blob extends XenAPIObject { * @return value of the field */ public String getNameDescription(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "blob.get_name_description"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -264,15 +265,15 @@ public class Blob extends XenAPIObject { * @return value of the field */ public Long getSize(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "blob.get_size"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -281,15 +282,15 @@ public class Blob extends XenAPIObject { * @return value of the field */ public Boolean getPublic(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "blob.get_public"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -298,15 +299,15 @@ public class Blob extends XenAPIObject { * @return value of the field */ public Date getLastUpdated(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "blob.get_last_updated"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDate(result); + return Types.toDate(result); } /** @@ -315,15 +316,15 @@ public class Blob extends XenAPIObject { * @return value of the field */ public String getMimeType(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "blob.get_mime_type"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -332,9 +333,9 @@ public class Blob extends XenAPIObject { * @param label New value to set */ public void setNameLabel(Connection c, String label) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "blob.set_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(label)}; @@ -348,9 +349,9 @@ public class Blob extends XenAPIObject { * @param description New value to set */ public void setNameDescription(Connection c, String description) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "blob.set_name_description"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(description)}; @@ -364,9 +365,9 @@ public class Blob extends XenAPIObject { * @param _public New value to set */ public void setPublic(Connection c, Boolean _public) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "blob.set_public"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(_public)}; @@ -382,25 +383,25 @@ public class Blob extends XenAPIObject { * @return The reference to the created blob */ public static Blob create(Connection c, String mimeType, Boolean _public) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "blob.create"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(mimeType), Marshalling.toXMLRPC(_public)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBlob(result); + return Types.toBlob(result); } /** - * + * * */ public void destroy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "blob.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -414,15 +415,15 @@ public class Blob extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "blob.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfBlob(result); + return Types.toSetOfBlob(result); } /** @@ -431,15 +432,15 @@ public class Blob extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "blob.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfBlobBlobRecord(result); + return Types.toMapOfBlobBlobRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/Bond.java b/deps/XenServerJava/src/com/xensource/xenapi/Bond.java index 935fd9847e5..5a54ad27920 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/Bond.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/Bond.java @@ -1,19 +1,19 @@ /* * 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 @@ -28,6 +28,7 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ + package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -45,7 +46,7 @@ import java.util.Set; import org.apache.xmlrpc.XmlRpcException; /** - * + * * * @author Citrix Systems, Inc. */ @@ -60,14 +61,14 @@ public class Bond extends XenAPIObject { * For internal use only. */ Bond(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -78,7 +79,7 @@ public class Bond extends XenAPIObject { { if (obj != null && obj instanceof Bond) { - Bond other = (Bond)obj; + Bond other = (Bond) obj; return other.ref.equals(this.ref); } else { @@ -113,8 +114,8 @@ public class Bond extends XenAPIObject { /** * Convert a Bond.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("master", this.master == null ? new PIF("OpaqueRef:NULL") : this.master); map.put("slaves", this.slaves == null ? new LinkedHashSet() : this.slaves); @@ -166,15 +167,15 @@ public class Bond extends XenAPIObject { * @return all fields from the object */ public Bond.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Bond.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBondRecord(result); + return Types.toBondRecord(result); } /** @@ -184,15 +185,15 @@ public class Bond extends XenAPIObject { * @return reference to the object */ public static Bond getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Bond.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBond(result); + return Types.toBond(result); } /** @@ -201,15 +202,15 @@ public class Bond extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Bond.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -218,15 +219,15 @@ public class Bond extends XenAPIObject { * @return value of the field */ public PIF getMaster(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Bond.get_master"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPIF(result); + return Types.toPIF(result); } /** @@ -235,15 +236,15 @@ public class Bond extends XenAPIObject { * @return value of the field */ public Set getSlaves(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Bond.get_slaves"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfPIF(result); + return Types.toSetOfPIF(result); } /** @@ -252,15 +253,15 @@ public class Bond extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Bond.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -269,15 +270,15 @@ public class Bond extends XenAPIObject { * @return value of the field */ public PIF getPrimarySlave(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Bond.get_primary_slave"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPIF(result); + return Types.toPIF(result); } /** @@ -286,15 +287,15 @@ public class Bond extends XenAPIObject { * @return value of the field */ public Types.BondMode getMode(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Bond.get_mode"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBondMode(result); + return Types.toBondMode(result); } /** @@ -303,15 +304,15 @@ public class Bond extends XenAPIObject { * @return value of the field */ public Map getProperties(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Bond.get_properties"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -320,15 +321,15 @@ public class Bond extends XenAPIObject { * @return value of the field */ public Long getLinksUp(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Bond.get_links_up"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -337,9 +338,9 @@ public class Bond extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Bond.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -354,9 +355,9 @@ public class Bond extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Bond.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -370,9 +371,9 @@ public class Bond extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Bond.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -391,13 +392,12 @@ public class Bond extends XenAPIObject { * @return Task */ public static Task createAsync(Connection c, Network network, Set members, String MAC, Types.BondMode mode, Map properties) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.Bond.create"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(network), Marshalling.toXMLRPC(members), Marshalling.toXMLRPC(MAC), - Marshalling.toXMLRPC(mode), Marshalling.toXMLRPC(properties)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(network), Marshalling.toXMLRPC(members), Marshalling.toXMLRPC(MAC), Marshalling.toXMLRPC(mode), Marshalling.toXMLRPC(properties)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); @@ -414,16 +414,15 @@ public class Bond extends XenAPIObject { * @return The reference of the created Bond object */ public static Bond create(Connection c, Network network, Set members, String MAC, Types.BondMode mode, Map properties) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Bond.create"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(network), Marshalling.toXMLRPC(members), Marshalling.toXMLRPC(MAC), - Marshalling.toXMLRPC(mode), Marshalling.toXMLRPC(properties)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(network), Marshalling.toXMLRPC(members), Marshalling.toXMLRPC(MAC), Marshalling.toXMLRPC(mode), Marshalling.toXMLRPC(properties)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBond(result); + return Types.toBond(result); } /** @@ -432,9 +431,9 @@ public class Bond extends XenAPIObject { * @return Task */ public Task destroyAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.Bond.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -448,9 +447,9 @@ public class Bond extends XenAPIObject { * */ public void destroy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Bond.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -465,9 +464,9 @@ public class Bond extends XenAPIObject { * @return Task */ public Task setModeAsync(Connection c, Types.BondMode value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.Bond.set_mode"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -482,9 +481,9 @@ public class Bond extends XenAPIObject { * @param value The new bond mode */ public void setMode(Connection c, Types.BondMode value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Bond.set_mode"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -500,9 +499,9 @@ public class Bond extends XenAPIObject { * @return Task */ public Task setPropertyAsync(Connection c, String name, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.Bond.set_property"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(value)}; @@ -518,9 +517,9 @@ public class Bond extends XenAPIObject { * @param value The property value */ public void setProperty(Connection c, String name, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Bond.set_property"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(value)}; @@ -534,15 +533,15 @@ public class Bond extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Bond.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfBond(result); + return Types.toSetOfBond(result); } /** @@ -551,15 +550,15 @@ public class Bond extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Bond.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfBondBondRecord(result); + return Types.toMapOfBondBondRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/Connection.java b/deps/XenServerJava/src/com/xensource/xenapi/Connection.java old mode 100644 new mode 100755 index a6524503609..63469df0118 --- a/deps/XenServerJava/src/com/xensource/xenapi/Connection.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/Connection.java @@ -1,18 +1,19 @@ -/* Copyright (c) Citrix Systems, Inc. +/* + * 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 @@ -38,7 +39,6 @@ import org.apache.xmlrpc.client.XmlRpcClient; import org.apache.xmlrpc.client.XmlRpcClientConfig; import org.apache.xmlrpc.client.XmlRpcClientConfigImpl; import org.apache.xmlrpc.client.XmlRpcHttpClientConfig; -import org.apache.xmlrpc.client.XmlRpcSun15HttpTransportFactory; import com.xensource.xenapi.Types.BadServerResponse; import com.xensource.xenapi.Types.SessionAuthenticationFailed; @@ -54,20 +54,10 @@ public class Connection /** * The version of the bindings that this class belongs to. */ - public static final String BINDINGS_VERSION = "6.1.0-1"; - - /** - * true if the connection is to the Rio edition of XenServer. Certain function calls are not allowed. - * - * @deprecated Use getAPIVersion() instead. - */ - @Deprecated - public Boolean rioConnection = false; - + public static final String BINDINGS_VERSION = "6.2.0-1"; + private APIVersion apiVersion; - protected int _wait = 600; - /** * Updated when Session.login_with_password() is called. */ @@ -91,47 +81,37 @@ public class Connection /** * Creates a connection to a particular server using a given username and password. This object can then be passed * in to any other API calls. - * + * * This constructor calls Session.loginWithPassword, passing itself as the first parameter. - * + * * When this constructor is used, a call to dispose() (also called in the Connection's finalizer) will attempt a * Session.logout on this connection. - * + * * @deprecated Use a constructor that takes a URL as the first parameter instead. */ @Deprecated public Connection(String client, String username, String password) throws java.net.MalformedURLException, - XmlRpcException, BadServerResponse, SessionAuthenticationFailed, XenAPIException + XmlRpcException, BadServerResponse, SessionAuthenticationFailed, XenAPIException { deprecatedConstructorUsed = true; - // To login normally we call login_with_password(username, password, "1.X"). On rio this call fails and we - // should use login_with_password(username,password) instead, and note that we are talking to a rio host so that we - // can refuse to make certain miami-specific calls final String ApiVersion = APIVersion.latest().toString(); this.client = getClientFromURL(new URL(client)); try { - //first try to login the modern way this.sessionReference = loginWithPassword(this.client, username, password, ApiVersion); } catch (BadServerResponse e) { - //oops, something went wrong String[] errDesc = e.errorDescription; - //was the problem that the host was running rio? If so it will have complained that it got three parameters - //instead of two. Let us carefully verify the details of this complaint + if (0 == errDesc[0].compareTo("MESSAGE_PARAMETER_COUNT_MISMATCH") - && 0 == errDesc[1].compareTo("session.login_with_password") - && 0 == errDesc[2].compareTo("2") - && 0 == errDesc[3].compareTo("3")) + && 0 == errDesc[1].compareTo("session.login_with_password") + && 0 == errDesc[2].compareTo("2") + && 0 == errDesc[3].compareTo("3")) { - //and if so, we can have another go, using the older login method, and see how that goes. this.sessionReference = loginWithPassword(this.client, username, password); - //success!. Note that we are talking to an old host on this connection - this.rioConnection = true; } else { - //Hmm... Can't solve this here. Let upstairs know about the problem. throw e; } } @@ -139,11 +119,13 @@ public class Connection try { setAPIVersion(new Session(sessionReference)); - } catch (XenAPIException exn) + } + catch (XenAPIException exn) { dispose(); throw exn; - } catch (XmlRpcException exn) + } + catch (XmlRpcException exn) { dispose(); throw exn; @@ -153,24 +135,24 @@ public class Connection /** * Creates a connection to a particular server using a given username and password. This object can then be passed * in to any other API calls. - * + * * Note this constructor does NOT call Session.loginWithPassword; the programmer is responsible for calling it, * passing the Connection as a parameter. No attempt to connect to the server is made until login is called. - * + * * When this constructor is used, a call to dispose() will do nothing. The programmer is responsible for manually * logging out the Session. */ - public Connection(URL url, int wait) + public Connection(URL url) { deprecatedConstructorUsed = false; - _wait = wait; + this.client = getClientFromURL(url); } /** * Creates a connection to a particular server using a given username and password. This object can then be passed * in to any other API calls. - * + * * The additional sessionReference parameter must be a reference to a logged-in Session. Any method calls on this * Connection will use it. This constructor does not call Session.loginWithPassword, and dispose() on the resulting * Connection object does not call Session.logout. The programmer is responsible for ensuring the Session is logged @@ -206,11 +188,12 @@ public class Connection if (sessionReference != null) { String method_call = "session.logout"; - Object[] method_params = {Marshalling.toXMLRPC(this.sessionReference)}; + Object[] method_params = { Marshalling.toXMLRPC(this.sessionReference) }; client.execute(method_call, method_params); sessionReference = null; } - } catch (XmlRpcException exn) + } + catch (XmlRpcException exn) { } } @@ -220,17 +203,17 @@ public class Connection */ @Deprecated private static String loginWithPassword(XmlRpcClient client, String username, String password) - throws BadServerResponse, XmlRpcException, SessionAuthenticationFailed + throws BadServerResponse, XmlRpcException, SessionAuthenticationFailed { String method_call = "session.login_with_password"; - Object[] method_params = {Marshalling.toXMLRPC(username), Marshalling.toXMLRPC(password)}; - Map response = (Map)client.execute(method_call, method_params); + Object[] method_params = { Marshalling.toXMLRPC(username), Marshalling.toXMLRPC(password) }; + Map response = (Map) client.execute(method_call, method_params); if (response.get("Status").equals("Success")) { - return (String)response.get("Value"); + return (String) response.get("Value"); } else if (response.get("Status").equals("Failure")) { - Object[] error = (Object[])response.get("ErrorDescription"); + Object[] error = (Object[]) response.get("ErrorDescription"); if (error[0].equals("SESSION_AUTHENTICATION_FAILED")) { throw new SessionAuthenticationFailed(); @@ -244,18 +227,18 @@ public class Connection */ @Deprecated private static String loginWithPassword(XmlRpcClient client, String username, String password, String ApiVersion) - throws BadServerResponse, XmlRpcException, SessionAuthenticationFailed + throws BadServerResponse, XmlRpcException, SessionAuthenticationFailed { String method_call = "session.login_with_password"; - Object[] method_params = {Marshalling.toXMLRPC(username), Marshalling.toXMLRPC(password), - Marshalling.toXMLRPC(ApiVersion)}; - Map response = (Map)client.execute(method_call, method_params); + Object[] method_params = { Marshalling.toXMLRPC(username), Marshalling.toXMLRPC(password), + Marshalling.toXMLRPC(ApiVersion) }; + Map response = (Map) client.execute(method_call, method_params); if (response.get("Status").equals("Success")) { - return (String)response.get("Value"); + return (String) response.get("Value"); } else if (response.get("Status").equals("Failure")) { - Object[] error = (Object[])response.get("ErrorDescription"); + Object[] error = (Object[]) response.get("ErrorDescription"); if (error[0].equals("SESSION_AUTHENTICATION_FAILED")) { throw new SessionAuthenticationFailed(); @@ -268,22 +251,19 @@ public class Connection public XmlRpcClientConfigImpl getConfig() { - return config; + return config; } - private XmlRpcClient getClientFromURL(URL url) { config.setTimeZone(TimeZone.getTimeZone("UTC")); config.setServerURL(url); - config.setReplyTimeout(_wait * 1000); - config.setConnectionTimeout(5000); XmlRpcClient client = new XmlRpcClient(); client.setConfig(config); return client; } /* - * Because the binding calls are constructing their own parameter lists, they need to be able to get to + * Because the binding calls are constructing their own parameter lists, they need to be able to get to * the session reference directly. This is all rather ugly and needs redone * Changed to public to allow easier integration with HTTP-level streaming interface, * see CA-15447 @@ -296,9 +276,9 @@ public class Connection /** * The (auto-generated parts of) the bindings dispatch XMLRPC calls on this Connection's client through this method. */ - protected Map dispatch(String method_call, Object[] method_params) throws XmlRpcException, XenAPIException + Map dispatch(String method_call, Object[] method_params) throws XmlRpcException, XenAPIException { - Map response = (Map)client.execute(method_call, method_params); + Map response = (Map) client.execute(method_call, method_params); if (!deprecatedConstructorUsed) { @@ -314,7 +294,7 @@ public class Connection setAPIVersion(session); } else if (method_call.equals("session.slave_local_login_with_password") && - response.get("Status").equals("Success")) + response.get("Status").equals("Success")) { // Store the Session reference and assume the latest API version. sessionReference = Types.toSession(response.get("Value")).ref; @@ -329,7 +309,7 @@ public class Connection // this session from the master instead. if (response.get("Status").equals("Failure")) { - Object[] error = (Object[])response.get("ErrorDescription"); + Object[] error = (Object[]) response.get("ErrorDescription"); if (error.length == 2 && error[0].equals("HOST_IS_SLAVE")) { try @@ -338,18 +318,20 @@ public class Connection ((XmlRpcHttpClientConfig)client.getClientConfig()).getServerURL(); Connection tmp_conn = new Connection(new URL(client_url.getProtocol(), - (String)error[1], - client_url.getPort(), - client_url.getFile()), _wait); + (String)error[1], + client_url.getPort(), + client_url.getFile())); tmp_conn.sessionReference = sessionReference; try { Session.logout(tmp_conn); - } finally + } + finally { tmp_conn.dispose(); } - } catch (Exception exn2) + } + catch (Exception exn2) { // Ignore -- we're going to throw HostIsSlave anyway. } @@ -364,6 +346,7 @@ public class Connection return Types.checkResponse(response); } + private void setAPIVersion(Session session) throws XenAPIException, XmlRpcException { try @@ -371,9 +354,10 @@ public class Connection long major = session.getThisHost(this).getAPIVersionMajor(this); long minor = session.getThisHost(this).getAPIVersionMinor(this); apiVersion = APIVersion.fromMajorMinor(major, minor); - } catch (BadServerResponse exn) + } + catch (BadServerResponse exn) { - apiVersion = APIVersion.API_1_1; + apiVersion = APIVersion.UNKNOWN; } } } diff --git a/deps/XenServerJava/src/com/xensource/xenapi/Console.java b/deps/XenServerJava/src/com/xensource/xenapi/Console.java index ac2c9a7ce8a..bb4440aebd4 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/Console.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/Console.java @@ -1,19 +1,19 @@ /* * 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 @@ -28,6 +28,7 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ + package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -60,14 +61,14 @@ public class Console extends XenAPIObject { * For internal use only. */ Console(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -78,7 +79,7 @@ public class Console extends XenAPIObject { { if (obj != null && obj instanceof Console) { - Console other = (Console)obj; + Console other = (Console) obj; return other.ref.equals(this.ref); } else { @@ -110,8 +111,8 @@ public class Console extends XenAPIObject { /** * Convert a console.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("protocol", this.protocol == null ? Types.ConsoleProtocol.UNRECOGNIZED : this.protocol); map.put("location", this.location == null ? "" : this.location); @@ -148,15 +149,15 @@ public class Console extends XenAPIObject { * @return all fields from the object */ public Console.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "console.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toConsoleRecord(result); + return Types.toConsoleRecord(result); } /** @@ -166,15 +167,15 @@ public class Console extends XenAPIObject { * @return reference to the object */ public static Console getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "console.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toConsole(result); + return Types.toConsole(result); } /** @@ -184,9 +185,9 @@ public class Console extends XenAPIObject { * @return Task */ public static Task createAsync(Connection c, Console.Record record) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.console.create"; String session = c.getSessionReference(); Map record_map = record.toMap(); @@ -203,16 +204,16 @@ public class Console extends XenAPIObject { * @return reference to the newly created object */ public static Console create(Connection c, Console.Record record) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "console.create"; String session = c.getSessionReference(); Map record_map = record.toMap(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(record_map)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toConsole(result); + return Types.toConsole(result); } /** @@ -221,9 +222,9 @@ public class Console extends XenAPIObject { * @return Task */ public Task destroyAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.console.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -237,9 +238,9 @@ public class Console extends XenAPIObject { * */ public void destroy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "console.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -253,15 +254,15 @@ public class Console extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "console.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -270,15 +271,15 @@ public class Console extends XenAPIObject { * @return value of the field */ public Types.ConsoleProtocol getProtocol(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "console.get_protocol"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toConsoleProtocol(result); + return Types.toConsoleProtocol(result); } /** @@ -287,15 +288,15 @@ public class Console extends XenAPIObject { * @return value of the field */ public String getLocation(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "console.get_location"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -304,15 +305,15 @@ public class Console extends XenAPIObject { * @return value of the field */ public VM getVM(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "console.get_VM"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVM(result); + return Types.toVM(result); } /** @@ -321,15 +322,15 @@ public class Console extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "console.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -338,9 +339,9 @@ public class Console extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "console.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -355,9 +356,9 @@ public class Console extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "console.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -371,9 +372,9 @@ public class Console extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "console.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -387,15 +388,15 @@ public class Console extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "console.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfConsole(result); + return Types.toSetOfConsole(result); } /** @@ -404,15 +405,15 @@ public class Console extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "console.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfConsoleConsoleRecord(result); + return Types.toMapOfConsoleConsoleRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/Crashdump.java b/deps/XenServerJava/src/com/xensource/xenapi/Crashdump.java index be11588cc25..1d40d4d994f 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/Crashdump.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/Crashdump.java @@ -1,19 +1,19 @@ /* * 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 @@ -28,6 +28,7 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ + package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -60,14 +61,14 @@ public class Crashdump extends XenAPIObject { * For internal use only. */ Crashdump(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -78,7 +79,7 @@ public class Crashdump extends XenAPIObject { { if (obj != null && obj instanceof Crashdump) { - Crashdump other = (Crashdump)obj; + Crashdump other = (Crashdump) obj; return other.ref.equals(this.ref); } else { @@ -109,8 +110,8 @@ public class Crashdump extends XenAPIObject { /** * Convert a crashdump.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("VM", this.VM == null ? new VM("OpaqueRef:NULL") : this.VM); map.put("VDI", this.VDI == null ? new VDI("OpaqueRef:NULL") : this.VDI); @@ -142,15 +143,15 @@ public class Crashdump extends XenAPIObject { * @return all fields from the object */ public Crashdump.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "crashdump.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toCrashdumpRecord(result); + return Types.toCrashdumpRecord(result); } /** @@ -160,15 +161,15 @@ public class Crashdump extends XenAPIObject { * @return reference to the object */ public static Crashdump getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "crashdump.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toCrashdump(result); + return Types.toCrashdump(result); } /** @@ -177,15 +178,15 @@ public class Crashdump extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "crashdump.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -194,15 +195,15 @@ public class Crashdump extends XenAPIObject { * @return value of the field */ public VM getVM(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "crashdump.get_VM"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVM(result); + return Types.toVM(result); } /** @@ -211,15 +212,15 @@ public class Crashdump extends XenAPIObject { * @return value of the field */ public VDI getVDI(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "crashdump.get_VDI"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVDI(result); + return Types.toVDI(result); } /** @@ -228,15 +229,15 @@ public class Crashdump extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "crashdump.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -245,9 +246,9 @@ public class Crashdump extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "crashdump.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -262,9 +263,9 @@ public class Crashdump extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "crashdump.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -278,9 +279,9 @@ public class Crashdump extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "crashdump.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -294,9 +295,9 @@ public class Crashdump extends XenAPIObject { * @return Task */ public Task destroyAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.crashdump.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -310,9 +311,9 @@ public class Crashdump extends XenAPIObject { * */ public void destroy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "crashdump.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -326,15 +327,15 @@ public class Crashdump extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "crashdump.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfCrashdump(result); + return Types.toSetOfCrashdump(result); } /** @@ -343,15 +344,15 @@ public class Crashdump extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "crashdump.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfCrashdumpCrashdumpRecord(result); + return Types.toMapOfCrashdumpCrashdumpRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/DRTask.java b/deps/XenServerJava/src/com/xensource/xenapi/DRTask.java index 14a5e4064a7..bbca81cb522 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/DRTask.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/DRTask.java @@ -1,19 +1,19 @@ /* * 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 @@ -28,6 +28,7 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ + package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -60,14 +61,14 @@ public class DRTask extends XenAPIObject { * For internal use only. */ DRTask(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -78,7 +79,7 @@ public class DRTask extends XenAPIObject { { if (obj != null && obj instanceof DRTask) { - DRTask other = (DRTask)obj; + DRTask other = (DRTask) obj; return other.ref.equals(this.ref); } else { @@ -107,8 +108,8 @@ public class DRTask extends XenAPIObject { /** * Convert a DR_task.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("introduced_SRs", this.introducedSRs == null ? new LinkedHashSet() : this.introducedSRs); return map; @@ -130,15 +131,15 @@ public class DRTask extends XenAPIObject { * @return all fields from the object */ public DRTask.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "DR_task.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDRTaskRecord(result); + return Types.toDRTaskRecord(result); } /** @@ -148,15 +149,15 @@ public class DRTask extends XenAPIObject { * @return reference to the object */ public static DRTask getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "DR_task.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDRTask(result); + return Types.toDRTask(result); } /** @@ -165,15 +166,15 @@ public class DRTask extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "DR_task.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -182,15 +183,15 @@ public class DRTask extends XenAPIObject { * @return value of the field */ public Set getIntroducedSRs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "DR_task.get_introduced_SRs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfSR(result); + return Types.toSetOfSR(result); } /** @@ -202,9 +203,9 @@ public class DRTask extends XenAPIObject { * @return Task */ public static Task createAsync(Connection c, String type, Map deviceConfig, Set whitelist) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.DR_task.create"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(deviceConfig), Marshalling.toXMLRPC(whitelist)}; @@ -222,15 +223,15 @@ public class DRTask extends XenAPIObject { * @return The reference to the created task */ public static DRTask create(Connection c, String type, Map deviceConfig, Set whitelist) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "DR_task.create"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(deviceConfig), Marshalling.toXMLRPC(whitelist)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDRTask(result); + return Types.toDRTask(result); } /** @@ -239,9 +240,9 @@ public class DRTask extends XenAPIObject { * @return Task */ public Task destroyAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.DR_task.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -255,9 +256,9 @@ public class DRTask extends XenAPIObject { * */ public void destroy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "DR_task.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -271,15 +272,15 @@ public class DRTask extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "DR_task.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfDRTask(result); + return Types.toSetOfDRTask(result); } /** @@ -288,15 +289,15 @@ public class DRTask extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "DR_task.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfDRTaskDRTaskRecord(result); + return Types.toMapOfDRTaskDRTaskRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/DataSource.java b/deps/XenServerJava/src/com/xensource/xenapi/DataSource.java index 5f777a32197..9a4bfcd6f74 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/DataSource.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/DataSource.java @@ -1,19 +1,19 @@ /* * 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 @@ -28,6 +28,7 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ + package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -60,14 +61,14 @@ public class DataSource extends XenAPIObject { * For internal use only. */ DataSource(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -78,7 +79,7 @@ public class DataSource extends XenAPIObject { { if (obj != null && obj instanceof DataSource) { - DataSource other = (DataSource)obj; + DataSource other = (DataSource) obj; return other.ref.equals(this.ref); } else { @@ -113,8 +114,8 @@ public class DataSource extends XenAPIObject { /** * Convert a data_source.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("name_label", this.nameLabel == null ? "" : this.nameLabel); map.put("name_description", this.nameDescription == null ? "" : this.nameDescription); map.put("enabled", this.enabled == null ? false : this.enabled); diff --git a/deps/XenServerJava/src/com/xensource/xenapi/Event.java b/deps/XenServerJava/src/com/xensource/xenapi/Event.java index ec438140fe2..3014ba09ebf 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/Event.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/Event.java @@ -1,19 +1,19 @@ /* * 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 @@ -28,6 +28,7 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ + package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -60,14 +61,14 @@ public class Event extends XenAPIObject { * For internal use only. */ Event(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -78,7 +79,7 @@ public class Event extends XenAPIObject { { if (obj != null && obj instanceof Event) { - Event other = (Event)obj; + Event other = (Event) obj; return other.ref.equals(this.ref); } else { @@ -112,8 +113,8 @@ public class Event extends XenAPIObject { /** * Convert a event.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("id", this.id == null ? 0 : this.id); map.put("timestamp", this.timestamp == null ? new Date(0) : this.timestamp); map.put("class", this.clazz == null ? "" : this.clazz); @@ -162,9 +163,9 @@ public class Event extends XenAPIObject { * @return Task */ public static Task registerAsync(Connection c, Set classes) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.event.register"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(classes)}; @@ -179,9 +180,9 @@ public class Event extends XenAPIObject { * @param classes register for events for the indicated classes */ public static void register(Connection c, Set classes) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "event.register"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(classes)}; @@ -196,9 +197,9 @@ public class Event extends XenAPIObject { * @return Task */ public static Task unregisterAsync(Connection c, Set classes) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.event.unregister"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(classes)}; @@ -213,9 +214,9 @@ public class Event extends XenAPIObject { * @param classes remove this session's registration for the indicated classes */ public static void unregister(Connection c, Set classes) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "event.unregister"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(classes)}; @@ -229,17 +230,17 @@ public class Event extends XenAPIObject { * @return the batch of events */ public static Set next(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.SessionNotRegistered, - Types.EventsLost { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.SessionNotRegistered, + Types.EventsLost { String method_call = "event.next"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfEventRecord(result); + return Types.toSetOfEventRecord(result); } /** @@ -251,17 +252,17 @@ public class Event extends XenAPIObject { * @return the batch of events */ public static Set from(Connection c, Set classes, String token, Double timeout) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.SessionNotRegistered, - Types.EventsLost { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.SessionNotRegistered, + Types.EventsLost { String method_call = "event.from"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(classes), Marshalling.toXMLRPC(token), Marshalling.toXMLRPC(timeout)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfEventRecord(result); + return Types.toSetOfEventRecord(result); } /** @@ -270,15 +271,15 @@ public class Event extends XenAPIObject { * @return the event ID */ public static Long getCurrentId(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "event.get_current_id"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -289,30 +290,15 @@ public class Event extends XenAPIObject { * @return the event ID */ public static String inject(Connection c, String clazz, String ref) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "event.inject"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(clazz), Marshalling.toXMLRPC(ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); - } - - public static Map properFrom(Connection c, Set classes, String token, Double timeout) throws BadServerResponse, XenAPIException, XmlRpcException, - Types.SessionNotRegistered, - Types.EventsLost { - String method_call = "event.from"; - String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(classes), Marshalling.toXMLRPC(token), Marshalling.toXMLRPC(timeout)}; - Map response = c.dispatch(method_call, method_params); - Object result = response.get("Value"); - Map value = (Map)result; - Map from = new HashMap(); - from.put("token", value.get("token")); - from.put("events", Types.toSetOfEventRecord(value.get("events"))); - return from; + return Types.toString(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/GPUGroup.java b/deps/XenServerJava/src/com/xensource/xenapi/GPUGroup.java index 90704462703..916d8b64aea 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/GPUGroup.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/GPUGroup.java @@ -1,19 +1,19 @@ /* * 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 @@ -28,6 +28,7 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ + package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -60,14 +61,14 @@ public class GPUGroup extends XenAPIObject { * For internal use only. */ GPUGroup(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -78,7 +79,7 @@ public class GPUGroup extends XenAPIObject { { if (obj != null && obj instanceof GPUGroup) { - GPUGroup other = (GPUGroup)obj; + GPUGroup other = (GPUGroup) obj; return other.ref.equals(this.ref); } else { @@ -106,14 +107,17 @@ public class GPUGroup extends XenAPIObject { print.printf("%1$20s: %2$s\n", "VGPUs", this.VGPUs); print.printf("%1$20s: %2$s\n", "GPUTypes", this.GPUTypes); print.printf("%1$20s: %2$s\n", "otherConfig", this.otherConfig); + print.printf("%1$20s: %2$s\n", "allocationAlgorithm", this.allocationAlgorithm); + print.printf("%1$20s: %2$s\n", "supportedVGPUTypes", this.supportedVGPUTypes); + print.printf("%1$20s: %2$s\n", "enabledVGPUTypes", this.enabledVGPUTypes); return writer.toString(); } /** * Convert a GPU_group.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("name_label", this.nameLabel == null ? "" : this.nameLabel); map.put("name_description", this.nameDescription == null ? "" : this.nameDescription); @@ -121,6 +125,9 @@ public class GPUGroup extends XenAPIObject { map.put("VGPUs", this.VGPUs == null ? new LinkedHashSet() : this.VGPUs); map.put("GPU_types", this.GPUTypes == null ? new LinkedHashSet() : this.GPUTypes); map.put("other_config", this.otherConfig == null ? new HashMap() : this.otherConfig); + map.put("allocation_algorithm", this.allocationAlgorithm == null ? Types.AllocationAlgorithm.UNRECOGNIZED : this.allocationAlgorithm); + map.put("supported_VGPU_types", this.supportedVGPUTypes == null ? new LinkedHashSet() : this.supportedVGPUTypes); + map.put("enabled_VGPU_types", this.enabledVGPUTypes == null ? new LinkedHashSet() : this.enabledVGPUTypes); return map; } @@ -152,6 +159,18 @@ public class GPUGroup extends XenAPIObject { * Additional configuration */ public Map otherConfig; + /** + * Current allocation of vGPUs to pGPUs for this group + */ + public Types.AllocationAlgorithm allocationAlgorithm; + /** + * vGPU types supported on at least one of the pGPUs in this group + */ + public Set supportedVGPUTypes; + /** + * vGPU types supported on at least one of the pGPUs in this group + */ + public Set enabledVGPUTypes; } /** @@ -160,15 +179,15 @@ public class GPUGroup extends XenAPIObject { * @return all fields from the object */ public GPUGroup.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "GPU_group.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toGPUGroupRecord(result); + return Types.toGPUGroupRecord(result); } /** @@ -178,15 +197,15 @@ public class GPUGroup extends XenAPIObject { * @return reference to the object */ public static GPUGroup getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "GPU_group.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toGPUGroup(result); + return Types.toGPUGroup(result); } /** @@ -196,15 +215,15 @@ public class GPUGroup extends XenAPIObject { * @return references to objects with matching names */ public static Set getByNameLabel(Connection c, String label) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "GPU_group.get_by_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(label)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfGPUGroup(result); + return Types.toSetOfGPUGroup(result); } /** @@ -213,15 +232,15 @@ public class GPUGroup extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "GPU_group.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -230,15 +249,15 @@ public class GPUGroup extends XenAPIObject { * @return value of the field */ public String getNameLabel(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "GPU_group.get_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -247,15 +266,15 @@ public class GPUGroup extends XenAPIObject { * @return value of the field */ public String getNameDescription(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "GPU_group.get_name_description"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -264,15 +283,15 @@ public class GPUGroup extends XenAPIObject { * @return value of the field */ public Set getPGPUs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "GPU_group.get_PGPUs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfPGPU(result); + return Types.toSetOfPGPU(result); } /** @@ -281,15 +300,15 @@ public class GPUGroup extends XenAPIObject { * @return value of the field */ public Set getVGPUs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "GPU_group.get_VGPUs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVGPU(result); + return Types.toSetOfVGPU(result); } /** @@ -298,15 +317,15 @@ public class GPUGroup extends XenAPIObject { * @return value of the field */ public Set getGPUTypes(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "GPU_group.get_GPU_types"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -315,15 +334,66 @@ public class GPUGroup extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "GPU_group.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); + } + + /** + * Get the allocation_algorithm field of the given GPU_group. + * + * @return value of the field + */ + public Types.AllocationAlgorithm getAllocationAlgorithm(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { + String method_call = "GPU_group.get_allocation_algorithm"; + String session = c.getSessionReference(); + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; + Map response = c.dispatch(method_call, method_params); + Object result = response.get("Value"); + return Types.toAllocationAlgorithm(result); + } + + /** + * Get the supported_VGPU_types field of the given GPU_group. + * + * @return value of the field + */ + public Set getSupportedVGPUTypes(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { + String method_call = "GPU_group.get_supported_VGPU_types"; + String session = c.getSessionReference(); + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; + Map response = c.dispatch(method_call, method_params); + Object result = response.get("Value"); + return Types.toSetOfVGPUType(result); + } + + /** + * Get the enabled_VGPU_types field of the given GPU_group. + * + * @return value of the field + */ + public Set getEnabledVGPUTypes(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { + String method_call = "GPU_group.get_enabled_VGPU_types"; + String session = c.getSessionReference(); + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; + Map response = c.dispatch(method_call, method_params); + Object result = response.get("Value"); + return Types.toSetOfVGPUType(result); } /** @@ -332,9 +402,9 @@ public class GPUGroup extends XenAPIObject { * @param label New value to set */ public void setNameLabel(Connection c, String label) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "GPU_group.set_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(label)}; @@ -348,9 +418,9 @@ public class GPUGroup extends XenAPIObject { * @param description New value to set */ public void setNameDescription(Connection c, String description) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "GPU_group.set_name_description"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(description)}; @@ -364,9 +434,9 @@ public class GPUGroup extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "GPU_group.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -381,9 +451,9 @@ public class GPUGroup extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "GPU_group.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -397,9 +467,9 @@ public class GPUGroup extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "GPU_group.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -407,21 +477,145 @@ public class GPUGroup extends XenAPIObject { return; } + /** + * Set the allocation_algorithm field of the given GPU_group. + * + * @param allocationAlgorithm New value to set + */ + public void setAllocationAlgorithm(Connection c, Types.AllocationAlgorithm allocationAlgorithm) throws + BadServerResponse, + XenAPIException, + XmlRpcException { + String method_call = "GPU_group.set_allocation_algorithm"; + String session = c.getSessionReference(); + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(allocationAlgorithm)}; + Map response = c.dispatch(method_call, method_params); + return; + } + + /** + * + * + * @param nameLabel + * @param nameDescription + * @param otherConfig + * @return Task + */ + public static Task createAsync(Connection c, String nameLabel, String nameDescription, Map otherConfig) throws + BadServerResponse, + XenAPIException, + XmlRpcException { + String method_call = "Async.GPU_group.create"; + String session = c.getSessionReference(); + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), Marshalling.toXMLRPC(otherConfig)}; + Map response = c.dispatch(method_call, method_params); + Object result = response.get("Value"); + return Types.toTask(result); + } + + /** + * + * + * @param nameLabel + * @param nameDescription + * @param otherConfig + * @return + */ + public static GPUGroup create(Connection c, String nameLabel, String nameDescription, Map otherConfig) throws + BadServerResponse, + XenAPIException, + XmlRpcException { + String method_call = "GPU_group.create"; + String session = c.getSessionReference(); + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), Marshalling.toXMLRPC(otherConfig)}; + Map response = c.dispatch(method_call, method_params); + Object result = response.get("Value"); + return Types.toGPUGroup(result); + } + + /** + * + * + * @return Task + */ + public Task destroyAsync(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { + String method_call = "Async.GPU_group.destroy"; + String session = c.getSessionReference(); + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; + Map response = c.dispatch(method_call, method_params); + Object result = response.get("Value"); + return Types.toTask(result); + } + + /** + * + * + */ + public void destroy(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { + String method_call = "GPU_group.destroy"; + String session = c.getSessionReference(); + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; + Map response = c.dispatch(method_call, method_params); + return; + } + + /** + * + * + * @param vgpuType The VGPU_type for which the remaining capacity will be calculated + * @return Task + */ + public Task getRemainingCapacityAsync(Connection c, VGPUType vgpuType) throws + BadServerResponse, + XenAPIException, + XmlRpcException { + String method_call = "Async.GPU_group.get_remaining_capacity"; + String session = c.getSessionReference(); + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(vgpuType)}; + Map response = c.dispatch(method_call, method_params); + Object result = response.get("Value"); + return Types.toTask(result); + } + + /** + * + * + * @param vgpuType The VGPU_type for which the remaining capacity will be calculated + * @return The number of VGPUs of the given type which can still be started on the PGPUs in the group + */ + public Long getRemainingCapacity(Connection c, VGPUType vgpuType) throws + BadServerResponse, + XenAPIException, + XmlRpcException { + String method_call = "GPU_group.get_remaining_capacity"; + String session = c.getSessionReference(); + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(vgpuType)}; + Map response = c.dispatch(method_call, method_params); + Object result = response.get("Value"); + return Types.toLong(result); + } + /** * Return a list of all the GPU_groups known to the system. * * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "GPU_group.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfGPUGroup(result); + return Types.toSetOfGPUGroup(result); } /** @@ -430,15 +624,15 @@ public class GPUGroup extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "GPU_group.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfGPUGroupGPUGroupRecord(result); + return Types.toMapOfGPUGroupGPUGroupRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/Host.java b/deps/XenServerJava/src/com/xensource/xenapi/Host.java index 21950482123..0bbae111641 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/Host.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/Host.java @@ -1,19 +1,19 @@ /* * 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 @@ -28,6 +28,7 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ + package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -60,14 +61,14 @@ public class Host extends XenAPIObject { * For internal use only. */ Host(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -78,7 +79,7 @@ public class Host extends XenAPIObject { { if (obj != null && obj instanceof Host) { - Host other = (Host)obj; + Host other = (Host) obj; return other.ref.equals(this.ref); } else { @@ -146,14 +147,15 @@ public class Host extends XenAPIObject { print.printf("%1$20s: %2$s\n", "chipsetInfo", this.chipsetInfo); print.printf("%1$20s: %2$s\n", "PCIs", this.PCIs); print.printf("%1$20s: %2$s\n", "PGPUs", this.PGPUs); + print.printf("%1$20s: %2$s\n", "guestVCPUsParams", this.guestVCPUsParams); return writer.toString(); } /** * Convert a host.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("name_label", this.nameLabel == null ? "" : this.nameLabel); map.put("name_description", this.nameDescription == null ? "" : this.nameDescription); @@ -163,8 +165,7 @@ public class Host extends XenAPIObject { map.put("API_version_major", this.APIVersionMajor == null ? 0 : this.APIVersionMajor); map.put("API_version_minor", this.APIVersionMinor == null ? 0 : this.APIVersionMinor); map.put("API_version_vendor", this.APIVersionVendor == null ? "" : this.APIVersionVendor); - map.put("API_version_vendor_implementation", this.APIVersionVendorImplementation == null ? new HashMap() - : this.APIVersionVendorImplementation); + map.put("API_version_vendor_implementation", this.APIVersionVendorImplementation == null ? new HashMap() : this.APIVersionVendorImplementation); map.put("enabled", this.enabled == null ? false : this.enabled); map.put("software_version", this.softwareVersion == null ? new HashMap() : this.softwareVersion); map.put("other_config", this.otherConfig == null ? new HashMap() : this.otherConfig); @@ -202,6 +203,7 @@ public class Host extends XenAPIObject { map.put("chipset_info", this.chipsetInfo == null ? new HashMap() : this.chipsetInfo); map.put("PCIs", this.PCIs == null ? new LinkedHashSet() : this.PCIs); map.put("PGPUs", this.PGPUs == null ? new LinkedHashSet() : this.PGPUs); + map.put("guest_VCPUs_params", this.guestVCPUsParams == null ? new HashMap() : this.guestVCPUsParams); return map; } @@ -393,6 +395,10 @@ public class Host extends XenAPIObject { * List of physical GPUs in the host */ public Set PGPUs; + /** + * VCPUs params to apply to all resident guests + */ + public Map guestVCPUsParams; } /** @@ -401,15 +407,15 @@ public class Host extends XenAPIObject { * @return all fields from the object */ public Host.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toHostRecord(result); + return Types.toHostRecord(result); } /** @@ -419,15 +425,15 @@ public class Host extends XenAPIObject { * @return reference to the object */ public static Host getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toHost(result); + return Types.toHost(result); } /** @@ -437,15 +443,15 @@ public class Host extends XenAPIObject { * @return references to objects with matching names */ public static Set getByNameLabel(Connection c, String label) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_by_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(label)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfHost(result); + return Types.toSetOfHost(result); } /** @@ -454,15 +460,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -471,15 +477,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public String getNameLabel(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -488,15 +494,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public String getNameDescription(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_name_description"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -505,15 +511,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Long getMemoryOverhead(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_memory_overhead"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -522,15 +528,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Set getAllowedOperations(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_allowed_operations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfHostAllowedOperations(result); + return Types.toSetOfHostAllowedOperations(result); } /** @@ -539,15 +545,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Map getCurrentOperations(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_current_operations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringHostAllowedOperations(result); + return Types.toMapOfStringHostAllowedOperations(result); } /** @@ -556,15 +562,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Long getAPIVersionMajor(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_API_version_major"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -573,15 +579,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Long getAPIVersionMinor(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_API_version_minor"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -590,15 +596,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public String getAPIVersionVendor(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_API_version_vendor"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -607,15 +613,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Map getAPIVersionVendorImplementation(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_API_version_vendor_implementation"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -624,15 +630,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Boolean getEnabled(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_enabled"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -641,15 +647,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Map getSoftwareVersion(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_software_version"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -658,15 +664,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -675,15 +681,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Set getCapabilities(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_capabilities"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -692,15 +698,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Map getCpuConfiguration(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_cpu_configuration"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -709,15 +715,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public String getSchedPolicy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_sched_policy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -726,15 +732,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Set getSupportedBootloaders(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_supported_bootloaders"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -743,15 +749,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Set getResidentVMs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_resident_VMs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVM(result); + return Types.toSetOfVM(result); } /** @@ -760,15 +766,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Map getLogging(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_logging"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -777,15 +783,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Set getPIFs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_PIFs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfPIF(result); + return Types.toSetOfPIF(result); } /** @@ -794,15 +800,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public SR getSuspendImageSr(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_suspend_image_sr"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSR(result); + return Types.toSR(result); } /** @@ -811,15 +817,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public SR getCrashDumpSr(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_crash_dump_sr"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSR(result); + return Types.toSR(result); } /** @@ -828,15 +834,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Set getCrashdumps(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_crashdumps"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfHostCrashdump(result); + return Types.toSetOfHostCrashdump(result); } /** @@ -845,15 +851,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Set getPatches(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_patches"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfHostPatch(result); + return Types.toSetOfHostPatch(result); } /** @@ -862,15 +868,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Set getPBDs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_PBDs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfPBD(result); + return Types.toSetOfPBD(result); } /** @@ -879,15 +885,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Set getHostCPUs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_host_CPUs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfHostCpu(result); + return Types.toSetOfHostCpu(result); } /** @@ -896,15 +902,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Map getCpuInfo(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_cpu_info"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -913,15 +919,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public String getHostname(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_hostname"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -930,15 +936,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public String getAddress(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_address"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -947,15 +953,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public HostMetrics getMetrics(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_metrics"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toHostMetrics(result); + return Types.toHostMetrics(result); } /** @@ -964,15 +970,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Map getLicenseParams(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_license_params"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -981,15 +987,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Set getHaStatefiles(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_ha_statefiles"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -998,15 +1004,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Set getHaNetworkPeers(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_ha_network_peers"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -1015,15 +1021,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Map getBlobs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_blobs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringBlob(result); + return Types.toMapOfStringBlob(result); } /** @@ -1032,15 +1038,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Set getTags(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_tags"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -1049,15 +1055,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public String getExternalAuthType(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_external_auth_type"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -1066,15 +1072,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public String getExternalAuthServiceName(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_external_auth_service_name"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -1083,15 +1089,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Map getExternalAuthConfiguration(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_external_auth_configuration"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -1100,15 +1106,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public String getEdition(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_edition"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -1117,15 +1123,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Map getLicenseServer(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_license_server"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -1134,15 +1140,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Map getBiosStrings(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_bios_strings"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -1151,15 +1157,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public String getPowerOnMode(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_power_on_mode"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -1168,15 +1174,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Map getPowerOnConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_power_on_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -1185,15 +1191,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public SR getLocalCacheSr(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_local_cache_sr"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSR(result); + return Types.toSR(result); } /** @@ -1202,15 +1208,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Map getChipsetInfo(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_chipset_info"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -1219,15 +1225,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Set getPCIs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_PCIs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfPCI(result); + return Types.toSetOfPCI(result); } /** @@ -1236,15 +1242,32 @@ public class Host extends XenAPIObject { * @return value of the field */ public Set getPGPUs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_PGPUs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfPGPU(result); + return Types.toSetOfPGPU(result); + } + + /** + * Get the guest_VCPUs_params field of the given host. + * + * @return value of the field + */ + public Map getGuestVCPUsParams(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { + String method_call = "host.get_guest_VCPUs_params"; + String session = c.getSessionReference(); + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; + Map response = c.dispatch(method_call, method_params); + Object result = response.get("Value"); + return Types.toMapOfStringString(result); } /** @@ -1253,9 +1276,9 @@ public class Host extends XenAPIObject { * @param label New value to set */ public void setNameLabel(Connection c, String label) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.set_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(label)}; @@ -1269,9 +1292,9 @@ public class Host extends XenAPIObject { * @param description New value to set */ public void setNameDescription(Connection c, String description) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.set_name_description"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(description)}; @@ -1285,9 +1308,9 @@ public class Host extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -1302,9 +1325,9 @@ public class Host extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -1318,9 +1341,9 @@ public class Host extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -1334,9 +1357,9 @@ public class Host extends XenAPIObject { * @param logging New value to set */ public void setLogging(Connection c, Map logging) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.set_logging"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(logging)}; @@ -1351,9 +1374,9 @@ public class Host extends XenAPIObject { * @param value Value to add */ public void addToLogging(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.add_to_logging"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -1367,9 +1390,9 @@ public class Host extends XenAPIObject { * @param key Key to remove */ public void removeFromLogging(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.remove_from_logging"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -1383,9 +1406,9 @@ public class Host extends XenAPIObject { * @param suspendImageSr New value to set */ public void setSuspendImageSr(Connection c, SR suspendImageSr) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.set_suspend_image_sr"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(suspendImageSr)}; @@ -1399,9 +1422,9 @@ public class Host extends XenAPIObject { * @param crashDumpSr New value to set */ public void setCrashDumpSr(Connection c, SR crashDumpSr) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.set_crash_dump_sr"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(crashDumpSr)}; @@ -1415,9 +1438,9 @@ public class Host extends XenAPIObject { * @param hostname New value to set */ public void setHostname(Connection c, String hostname) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.set_hostname"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(hostname)}; @@ -1431,9 +1454,9 @@ public class Host extends XenAPIObject { * @param address New value to set */ public void setAddress(Connection c, String address) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.set_address"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(address)}; @@ -1447,9 +1470,9 @@ public class Host extends XenAPIObject { * @param tags New value to set */ public void setTags(Connection c, Set tags) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.set_tags"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(tags)}; @@ -1463,9 +1486,9 @@ public class Host extends XenAPIObject { * @param value New value to add */ public void addTags(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.add_tags"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1479,9 +1502,9 @@ public class Host extends XenAPIObject { * @param value Value to remove */ public void removeTags(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.remove_tags"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1495,9 +1518,9 @@ public class Host extends XenAPIObject { * @param licenseServer New value to set */ public void setLicenseServer(Connection c, Map licenseServer) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.set_license_server"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(licenseServer)}; @@ -1512,9 +1535,9 @@ public class Host extends XenAPIObject { * @param value Value to add */ public void addToLicenseServer(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.add_to_license_server"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -1528,9 +1551,9 @@ public class Host extends XenAPIObject { * @param key Key to remove */ public void removeFromLicenseServer(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.remove_from_license_server"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -1538,15 +1561,64 @@ public class Host extends XenAPIObject { return; } + /** + * Set the guest_VCPUs_params field of the given host. + * + * @param guestVCPUsParams New value to set + */ + public void setGuestVCPUsParams(Connection c, Map guestVCPUsParams) throws + BadServerResponse, + XenAPIException, + XmlRpcException { + String method_call = "host.set_guest_VCPUs_params"; + String session = c.getSessionReference(); + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(guestVCPUsParams)}; + Map response = c.dispatch(method_call, method_params); + return; + } + + /** + * Add the given key-value pair to the guest_VCPUs_params field of the given host. + * + * @param key Key to add + * @param value Value to add + */ + public void addToGuestVCPUsParams(Connection c, String key, String value) throws + BadServerResponse, + XenAPIException, + XmlRpcException { + String method_call = "host.add_to_guest_VCPUs_params"; + String session = c.getSessionReference(); + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; + Map response = c.dispatch(method_call, method_params); + return; + } + + /** + * Remove the given key and its corresponding value from the guest_VCPUs_params field of the given host. If the key is not in that Map, then do nothing. + * + * @param key Key to remove + */ + public void removeFromGuestVCPUsParams(Connection c, String key) throws + BadServerResponse, + XenAPIException, + XmlRpcException { + String method_call = "host.remove_from_guest_VCPUs_params"; + String session = c.getSessionReference(); + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; + Map response = c.dispatch(method_call, method_params); + return; + } + /** * Puts the host into a state in which no new VMs can be started. Currently active VMs on the host continue to execute. * * @return Task */ public Task disableAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host.disable"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1560,9 +1632,9 @@ public class Host extends XenAPIObject { * */ public void disable(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.disable"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1576,9 +1648,9 @@ public class Host extends XenAPIObject { * @return Task */ public Task enableAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host.enable"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1592,9 +1664,9 @@ public class Host extends XenAPIObject { * */ public void enable(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.enable"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1608,9 +1680,9 @@ public class Host extends XenAPIObject { * @return Task */ public Task shutdownAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host.shutdown"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1624,9 +1696,9 @@ public class Host extends XenAPIObject { * */ public void shutdown(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.shutdown"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1640,9 +1712,9 @@ public class Host extends XenAPIObject { * @return Task */ public Task rebootAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host.reboot"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1656,9 +1728,9 @@ public class Host extends XenAPIObject { * */ public void reboot(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.reboot"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1672,9 +1744,9 @@ public class Host extends XenAPIObject { * @return Task */ public Task dmesgAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host.dmesg"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1689,15 +1761,15 @@ public class Host extends XenAPIObject { * @return dmesg string */ public String dmesg(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.dmesg"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -1706,9 +1778,9 @@ public class Host extends XenAPIObject { * @return Task */ public Task dmesgClearAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host.dmesg_clear"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1723,15 +1795,15 @@ public class Host extends XenAPIObject { * @return dmesg string */ public String dmesgClear(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.dmesg_clear"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -1740,9 +1812,9 @@ public class Host extends XenAPIObject { * @return Task */ public Task getLogAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host.get_log"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1757,15 +1829,15 @@ public class Host extends XenAPIObject { * @return The contents of the host's primary log file */ public String getLog(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_log"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -1775,9 +1847,9 @@ public class Host extends XenAPIObject { * @return Task */ public Task sendDebugKeysAsync(Connection c, String keys) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host.send_debug_keys"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(keys)}; @@ -1792,9 +1864,9 @@ public class Host extends XenAPIObject { * @param keys The keys to send */ public void sendDebugKeys(Connection c, String keys) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.send_debug_keys"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(keys)}; @@ -1810,9 +1882,9 @@ public class Host extends XenAPIObject { * @return Task */ public Task bugreportUploadAsync(Connection c, String url, Map options) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host.bugreport_upload"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(url), Marshalling.toXMLRPC(options)}; @@ -1828,9 +1900,9 @@ public class Host extends XenAPIObject { * @param options Extra configuration operations */ public void bugreportUpload(Connection c, String url, Map options) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.bugreport_upload"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(url), Marshalling.toXMLRPC(options)}; @@ -1844,15 +1916,15 @@ public class Host extends XenAPIObject { * @return The name of every supported method. */ public static Set listMethods(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.list_methods"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -1862,10 +1934,10 @@ public class Host extends XenAPIObject { * @return Task */ public Task licenseApplyAsync(Connection c, String contents) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.LicenseProcessingError { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.LicenseProcessingError { String method_call = "Async.host.license_apply"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(contents)}; @@ -1880,10 +1952,10 @@ public class Host extends XenAPIObject { * @param contents The contents of the license file, base64 encoded */ public void licenseApply(Connection c, String contents) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.LicenseProcessingError { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.LicenseProcessingError { String method_call = "host.license_apply"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(contents)}; @@ -1897,9 +1969,9 @@ public class Host extends XenAPIObject { * @return Task */ public Task destroyAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1913,9 +1985,9 @@ public class Host extends XenAPIObject { * */ public void destroy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1929,9 +2001,9 @@ public class Host extends XenAPIObject { * @return Task */ public Task powerOnAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host.power_on"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1945,9 +2017,9 @@ public class Host extends XenAPIObject { * */ public void powerOn(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.power_on"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1960,9 +2032,9 @@ public class Host extends XenAPIObject { * */ public static void emergencyHaDisable(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.emergency_ha_disable"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; @@ -1971,20 +2043,20 @@ public class Host extends XenAPIObject { } /** - * + * * * @return A set of data sources */ public Set getDataSources(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_data_sources"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfDataSourceRecord(result); + return Types.toSetOfDataSourceRecord(result); } /** @@ -1993,9 +2065,9 @@ public class Host extends XenAPIObject { * @param dataSource The data source to record */ public void recordDataSource(Connection c, String dataSource) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.record_data_source"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(dataSource)}; @@ -2010,15 +2082,15 @@ public class Host extends XenAPIObject { * @return The latest value, averaged over the last 5 seconds */ public Double queryDataSource(Connection c, String dataSource) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.query_data_source"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(dataSource)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDouble(result); + return Types.toDouble(result); } /** @@ -2027,9 +2099,9 @@ public class Host extends XenAPIObject { * @param dataSource The data source whose archives are to be forgotten */ public void forgetDataSourceArchives(Connection c, String dataSource) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.forget_data_source_archives"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(dataSource)}; @@ -2043,9 +2115,9 @@ public class Host extends XenAPIObject { * @return Task */ public Task assertCanEvacuateAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host.assert_can_evacuate"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -2059,9 +2131,9 @@ public class Host extends XenAPIObject { * */ public void assertCanEvacuate(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.assert_can_evacuate"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -2075,9 +2147,9 @@ public class Host extends XenAPIObject { * @return Task */ public Task getVmsWhichPreventEvacuationAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host.get_vms_which_prevent_evacuation"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -2092,15 +2164,15 @@ public class Host extends XenAPIObject { * @return VMs which block evacuation together with reasons */ public Map> getVmsWhichPreventEvacuation(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_vms_which_prevent_evacuation"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfVMSetOfString(result); + return Types.toMapOfVMSetOfString(result); } /** @@ -2109,11 +2181,10 @@ public class Host extends XenAPIObject { * * @return Task */ - @Deprecated - public Task getUncooperativeResidentVMsAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + @Deprecated public Task getUncooperativeResidentVMsAsync(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host.get_uncooperative_resident_VMs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -2128,17 +2199,16 @@ public class Host extends XenAPIObject { * * @return VMs which are not co-operating */ - @Deprecated - public Set getUncooperativeResidentVMs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + @Deprecated public Set getUncooperativeResidentVMs(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_uncooperative_resident_VMs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVM(result); + return Types.toSetOfVM(result); } /** @@ -2147,9 +2217,9 @@ public class Host extends XenAPIObject { * @return Task */ public Task evacuateAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host.evacuate"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -2163,9 +2233,9 @@ public class Host extends XenAPIObject { * */ public void evacuate(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.evacuate"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -2179,9 +2249,9 @@ public class Host extends XenAPIObject { * @return Task */ public Task syslogReconfigureAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host.syslog_reconfigure"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -2195,9 +2265,9 @@ public class Host extends XenAPIObject { * */ public void syslogReconfigure(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.syslog_reconfigure"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -2212,9 +2282,9 @@ public class Host extends XenAPIObject { * @return Task */ public static Task managementReconfigureAsync(Connection c, PIF pif) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host.management_reconfigure"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(pif)}; @@ -2229,9 +2299,9 @@ public class Host extends XenAPIObject { * @param pif reference to a PIF object corresponding to the management interface */ public static void managementReconfigure(Connection c, PIF pif) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.management_reconfigure"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(pif)}; @@ -2245,9 +2315,9 @@ public class Host extends XenAPIObject { * @param iface name of the interface to use as a management interface */ public static void localManagementReconfigure(Connection c, String iface) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.local_management_reconfigure"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(iface)}; @@ -2260,9 +2330,9 @@ public class Host extends XenAPIObject { * */ public static void managementDisable(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.management_disable"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; @@ -2276,9 +2346,9 @@ public class Host extends XenAPIObject { * @return Task */ public Task getManagementIfaceAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host.get_management_interface"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -2293,32 +2363,32 @@ public class Host extends XenAPIObject { * @return The managment interface for the host */ public PIF getManagementIface(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_management_interface"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPIF(result); + return Types.toPIF(result); } /** - * + * * * @return An XML fragment containing the system status capabilities. */ public String getSystemStatusCapabilities(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_system_status_capabilities"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -2327,9 +2397,9 @@ public class Host extends XenAPIObject { * @return Task */ public Task restartAgentAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host.restart_agent"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -2343,9 +2413,9 @@ public class Host extends XenAPIObject { * */ public void restartAgent(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.restart_agent"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -2358,9 +2428,9 @@ public class Host extends XenAPIObject { * */ public static void shutdownAgent(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.shutdown_agent"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; @@ -2374,10 +2444,10 @@ public class Host extends XenAPIObject { * @param hostname The new host name */ public void setHostnameLive(Connection c, String hostname) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.HostNameInvalid { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.HostNameInvalid { String method_call = "host.set_hostname_live"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(hostname)}; @@ -2391,9 +2461,9 @@ public class Host extends XenAPIObject { * @return Task */ public Task computeFreeMemoryAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host.compute_free_memory"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -2408,15 +2478,15 @@ public class Host extends XenAPIObject { * @return the amount of free memory on the host. */ public Long computeFreeMemory(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.compute_free_memory"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -2425,9 +2495,9 @@ public class Host extends XenAPIObject { * @return Task */ public Task computeMemoryOverheadAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host.compute_memory_overhead"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -2442,15 +2512,15 @@ public class Host extends XenAPIObject { * @return the virtualization memory overhead of the host. */ public Long computeMemoryOverhead(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.compute_memory_overhead"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -2458,9 +2528,9 @@ public class Host extends XenAPIObject { * */ public void syncData(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.sync_data"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -2474,9 +2544,9 @@ public class Host extends XenAPIObject { * @param delay Delay in seconds from when the call is received to perform the backup */ public void backupRrds(Connection c, Double delay) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.backup_rrds"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(delay)}; @@ -2493,13 +2563,12 @@ public class Host extends XenAPIObject { * @return Task */ public Task createNewBlobAsync(Connection c, String name, String mimeType, Boolean _public) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host.create_new_blob"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(mimeType), - Marshalling.toXMLRPC(_public)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(mimeType), Marshalling.toXMLRPC(_public)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); @@ -2514,16 +2583,15 @@ public class Host extends XenAPIObject { * @return The reference of the blob, needed for populating its data */ public Blob createNewBlob(Connection c, String name, String mimeType, Boolean _public) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.create_new_blob"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(mimeType), - Marshalling.toXMLRPC(_public)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(mimeType), Marshalling.toXMLRPC(_public)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBlob(result); + return Types.toBlob(result); } /** @@ -2535,13 +2603,12 @@ public class Host extends XenAPIObject { * @return Task */ public Task callPluginAsync(Connection c, String plugin, String fn, Map args) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host.call_plugin"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(plugin), Marshalling.toXMLRPC(fn), - Marshalling.toXMLRPC(args)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(plugin), Marshalling.toXMLRPC(fn), Marshalling.toXMLRPC(args)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); @@ -2556,16 +2623,15 @@ public class Host extends XenAPIObject { * @return Result from the plugin */ public String callPlugin(Connection c, String plugin, String fn, Map args) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.call_plugin"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(plugin), Marshalling.toXMLRPC(fn), - Marshalling.toXMLRPC(args)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(plugin), Marshalling.toXMLRPC(fn), Marshalling.toXMLRPC(args)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -2574,15 +2640,15 @@ public class Host extends XenAPIObject { * @return The current time */ public Date getServertime(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_servertime"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDate(result); + return Types.toDate(result); } /** @@ -2591,15 +2657,15 @@ public class Host extends XenAPIObject { * @return The current local time */ public Date getServerLocaltime(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_server_localtime"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDate(result); + return Types.toDate(result); } /** @@ -2610,13 +2676,12 @@ public class Host extends XenAPIObject { * @param authType The type of authentication (e.g. AD for Active Directory) */ public void enableExternalAuth(Connection c, Map config, String serviceName, String authType) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.enable_external_auth"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(config), Marshalling.toXMLRPC(serviceName), - Marshalling.toXMLRPC(authType)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(config), Marshalling.toXMLRPC(serviceName), Marshalling.toXMLRPC(authType)}; Map response = c.dispatch(method_call, method_params); return; } @@ -2627,9 +2692,9 @@ public class Host extends XenAPIObject { * @param config Optional parameters as a list of key-values containing the configuration data */ public void disableExternalAuth(Connection c, Map config) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.disable_external_auth"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(config)}; @@ -2643,9 +2708,9 @@ public class Host extends XenAPIObject { * @return Task */ public Task retrieveWlbEvacuateRecommendationsAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host.retrieve_wlb_evacuate_recommendations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -2660,15 +2725,15 @@ public class Host extends XenAPIObject { * @return VMs and the reasons why they would block evacuation, or their target host recommended by the wlb server */ public Map> retrieveWlbEvacuateRecommendations(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.retrieve_wlb_evacuate_recommendations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfVMSetOfString(result); + return Types.toMapOfVMSetOfString(result); } /** @@ -2677,9 +2742,9 @@ public class Host extends XenAPIObject { * @return Task */ public Task getServerCertificateAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host.get_server_certificate"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -2694,29 +2759,30 @@ public class Host extends XenAPIObject { * @return The installed server SSL certificate, in PEM form. */ public String getServerCertificate(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_server_certificate"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** * Change to another edition, or reactivate the current edition after a license has expired. This may be subject to the successful checkout of an appropriate license. * * @param edition The requested edition + * @param force Update the license params even if the apply call fails */ - public void applyEdition(Connection c, String edition) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + public void applyEdition(Connection c, String edition, Boolean force) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.apply_edition"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(edition)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(edition), Marshalling.toXMLRPC(force)}; Map response = c.dispatch(method_call, method_params); return; } @@ -2727,9 +2793,9 @@ public class Host extends XenAPIObject { * @return Task */ public Task refreshPackInfoAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host.refresh_pack_info"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -2743,9 +2809,9 @@ public class Host extends XenAPIObject { * */ public void refreshPackInfo(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.refresh_pack_info"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -2754,16 +2820,16 @@ public class Host extends XenAPIObject { } /** - * Set the power-on-mode, host, user and password + * Set the power-on-mode, host, user and password * * @param powerOnMode power-on-mode can be empty,iLO,wake-on-lan, DRAC or other * @param powerOnConfig Power on config * @return Task */ public Task setPowerOnModeAsync(Connection c, String powerOnMode, Map powerOnConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host.set_power_on_mode"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(powerOnMode), Marshalling.toXMLRPC(powerOnConfig)}; @@ -2773,15 +2839,15 @@ public class Host extends XenAPIObject { } /** - * Set the power-on-mode, host, user and password + * Set the power-on-mode, host, user and password * * @param powerOnMode power-on-mode can be empty,iLO,wake-on-lan, DRAC or other * @param powerOnConfig Power on config */ public void setPowerOnMode(Connection c, String powerOnMode, Map powerOnConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.set_power_on_mode"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(powerOnMode), Marshalling.toXMLRPC(powerOnConfig)}; @@ -2795,9 +2861,9 @@ public class Host extends XenAPIObject { * @param features The features string (32 hexadecimal digits) */ public void setCpuFeatures(Connection c, String features) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.set_cpu_features"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(features)}; @@ -2810,9 +2876,9 @@ public class Host extends XenAPIObject { * */ public void resetCpuFeatures(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.reset_cpu_features"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -2826,9 +2892,9 @@ public class Host extends XenAPIObject { * @param sr The SR to use as a local cache */ public void enableLocalStorageCaching(Connection c, SR sr) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.enable_local_storage_caching"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(sr)}; @@ -2841,9 +2907,9 @@ public class Host extends XenAPIObject { * */ public void disableLocalStorageCaching(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.disable_local_storage_caching"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -2859,9 +2925,9 @@ public class Host extends XenAPIObject { * @return Task */ public Task migrateReceiveAsync(Connection c, Network network, Map options) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host.migrate_receive"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(network), Marshalling.toXMLRPC(options)}; @@ -2878,15 +2944,47 @@ public class Host extends XenAPIObject { * @return A value which should be passed to VM.migrate */ public Map migrateReceive(Connection c, Network network, Map options) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.migrate_receive"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(network), Marshalling.toXMLRPC(options)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); + } + + /** + * Declare that a host is dead. This is a dangerous operation, and should only be called if the administrator is absolutely sure the host is definitely dead + * + * @return Task + */ + public Task declareDeadAsync(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { + String method_call = "Async.host.declare_dead"; + String session = c.getSessionReference(); + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; + Map response = c.dispatch(method_call, method_params); + Object result = response.get("Value"); + return Types.toTask(result); + } + + /** + * Declare that a host is dead. This is a dangerous operation, and should only be called if the administrator is absolutely sure the host is definitely dead + * + */ + public void declareDead(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { + String method_call = "host.declare_dead"; + String session = c.getSessionReference(); + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; + Map response = c.dispatch(method_call, method_params); + return; } /** @@ -2895,15 +2993,15 @@ public class Host extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfHost(result); + return Types.toSetOfHost(result); } /** @@ -2912,15 +3010,15 @@ public class Host extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfHostHostRecord(result); + return Types.toMapOfHostHostRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/HostCpu.java b/deps/XenServerJava/src/com/xensource/xenapi/HostCpu.java index 15fcfa7113f..0f802f88ee9 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/HostCpu.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/HostCpu.java @@ -1,19 +1,19 @@ /* * 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 @@ -28,6 +28,7 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ + package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -60,14 +61,14 @@ public class HostCpu extends XenAPIObject { * For internal use only. */ HostCpu(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -78,7 +79,7 @@ public class HostCpu extends XenAPIObject { { if (obj != null && obj instanceof HostCpu) { - HostCpu other = (HostCpu)obj; + HostCpu other = (HostCpu) obj; return other.ref.equals(this.ref); } else { @@ -118,8 +119,8 @@ public class HostCpu extends XenAPIObject { /** * Convert a host_cpu.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("host", this.host == null ? new Host("OpaqueRef:NULL") : this.host); map.put("number", this.number == null ? 0 : this.number); @@ -196,17 +197,16 @@ public class HostCpu extends XenAPIObject { * * @return all fields from the object */ - @Deprecated - public HostCpu.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + @Deprecated public HostCpu.Record getRecord(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_cpu.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toHostCpuRecord(result); + return Types.toHostCpuRecord(result); } /** @@ -216,17 +216,16 @@ public class HostCpu extends XenAPIObject { * @param uuid UUID of object to return * @return reference to the object */ - @Deprecated - public static HostCpu getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + @Deprecated public static HostCpu getByUuid(Connection c, String uuid) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_cpu.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toHostCpu(result); + return Types.toHostCpu(result); } /** @@ -235,15 +234,15 @@ public class HostCpu extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_cpu.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -252,15 +251,15 @@ public class HostCpu extends XenAPIObject { * @return value of the field */ public Host getHost(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_cpu.get_host"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toHost(result); + return Types.toHost(result); } /** @@ -269,15 +268,15 @@ public class HostCpu extends XenAPIObject { * @return value of the field */ public Long getNumber(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_cpu.get_number"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -286,15 +285,15 @@ public class HostCpu extends XenAPIObject { * @return value of the field */ public String getVendor(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_cpu.get_vendor"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -303,15 +302,15 @@ public class HostCpu extends XenAPIObject { * @return value of the field */ public Long getSpeed(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_cpu.get_speed"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -320,15 +319,15 @@ public class HostCpu extends XenAPIObject { * @return value of the field */ public String getModelname(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_cpu.get_modelname"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -337,15 +336,15 @@ public class HostCpu extends XenAPIObject { * @return value of the field */ public Long getFamily(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_cpu.get_family"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -354,15 +353,15 @@ public class HostCpu extends XenAPIObject { * @return value of the field */ public Long getModel(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_cpu.get_model"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -371,15 +370,15 @@ public class HostCpu extends XenAPIObject { * @return value of the field */ public String getStepping(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_cpu.get_stepping"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -388,15 +387,15 @@ public class HostCpu extends XenAPIObject { * @return value of the field */ public String getFlags(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_cpu.get_flags"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -405,15 +404,15 @@ public class HostCpu extends XenAPIObject { * @return value of the field */ public String getFeatures(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_cpu.get_features"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -422,15 +421,15 @@ public class HostCpu extends XenAPIObject { * @return value of the field */ public Double getUtilisation(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_cpu.get_utilisation"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDouble(result); + return Types.toDouble(result); } /** @@ -439,15 +438,15 @@ public class HostCpu extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_cpu.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -456,9 +455,9 @@ public class HostCpu extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_cpu.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -473,9 +472,9 @@ public class HostCpu extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_cpu.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -489,9 +488,9 @@ public class HostCpu extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_cpu.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -505,17 +504,16 @@ public class HostCpu extends XenAPIObject { * * @return references to all objects */ - @Deprecated - public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + @Deprecated public static Set getAll(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_cpu.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfHostCpu(result); + return Types.toSetOfHostCpu(result); } /** @@ -524,15 +522,15 @@ public class HostCpu extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_cpu.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfHostCpuHostCpuRecord(result); + return Types.toMapOfHostCpuHostCpuRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/HostCrashdump.java b/deps/XenServerJava/src/com/xensource/xenapi/HostCrashdump.java index 02c3bd943f6..e93240e6c2b 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/HostCrashdump.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/HostCrashdump.java @@ -1,19 +1,19 @@ /* * 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 @@ -28,6 +28,7 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ + package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -60,14 +61,14 @@ public class HostCrashdump extends XenAPIObject { * For internal use only. */ HostCrashdump(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -78,7 +79,7 @@ public class HostCrashdump extends XenAPIObject { { if (obj != null && obj instanceof HostCrashdump) { - HostCrashdump other = (HostCrashdump)obj; + HostCrashdump other = (HostCrashdump) obj; return other.ref.equals(this.ref); } else { @@ -110,8 +111,8 @@ public class HostCrashdump extends XenAPIObject { /** * Convert a host_crashdump.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("host", this.host == null ? new Host("OpaqueRef:NULL") : this.host); map.put("timestamp", this.timestamp == null ? new Date(0) : this.timestamp); @@ -148,15 +149,15 @@ public class HostCrashdump extends XenAPIObject { * @return all fields from the object */ public HostCrashdump.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_crashdump.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toHostCrashdumpRecord(result); + return Types.toHostCrashdumpRecord(result); } /** @@ -166,15 +167,15 @@ public class HostCrashdump extends XenAPIObject { * @return reference to the object */ public static HostCrashdump getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_crashdump.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toHostCrashdump(result); + return Types.toHostCrashdump(result); } /** @@ -183,15 +184,15 @@ public class HostCrashdump extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_crashdump.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -200,15 +201,15 @@ public class HostCrashdump extends XenAPIObject { * @return value of the field */ public Host getHost(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_crashdump.get_host"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toHost(result); + return Types.toHost(result); } /** @@ -217,15 +218,15 @@ public class HostCrashdump extends XenAPIObject { * @return value of the field */ public Date getTimestamp(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_crashdump.get_timestamp"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDate(result); + return Types.toDate(result); } /** @@ -234,15 +235,15 @@ public class HostCrashdump extends XenAPIObject { * @return value of the field */ public Long getSize(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_crashdump.get_size"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -251,15 +252,15 @@ public class HostCrashdump extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_crashdump.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -268,9 +269,9 @@ public class HostCrashdump extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_crashdump.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -285,9 +286,9 @@ public class HostCrashdump extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_crashdump.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -301,9 +302,9 @@ public class HostCrashdump extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_crashdump.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -317,9 +318,9 @@ public class HostCrashdump extends XenAPIObject { * @return Task */ public Task destroyAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host_crashdump.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -333,9 +334,9 @@ public class HostCrashdump extends XenAPIObject { * */ public void destroy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_crashdump.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -351,9 +352,9 @@ public class HostCrashdump extends XenAPIObject { * @return Task */ public Task uploadAsync(Connection c, String url, Map options) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host_crashdump.upload"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(url), Marshalling.toXMLRPC(options)}; @@ -369,9 +370,9 @@ public class HostCrashdump extends XenAPIObject { * @param options Extra configuration operations */ public void upload(Connection c, String url, Map options) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_crashdump.upload"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(url), Marshalling.toXMLRPC(options)}; @@ -385,15 +386,15 @@ public class HostCrashdump extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_crashdump.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfHostCrashdump(result); + return Types.toSetOfHostCrashdump(result); } /** @@ -402,15 +403,15 @@ public class HostCrashdump extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_crashdump.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfHostCrashdumpHostCrashdumpRecord(result); + return Types.toMapOfHostCrashdumpHostCrashdumpRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/HostMetrics.java b/deps/XenServerJava/src/com/xensource/xenapi/HostMetrics.java index b41277aeb05..261933fef60 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/HostMetrics.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/HostMetrics.java @@ -1,19 +1,19 @@ /* * 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 @@ -28,6 +28,7 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ + package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -60,14 +61,14 @@ public class HostMetrics extends XenAPIObject { * For internal use only. */ HostMetrics(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -78,7 +79,7 @@ public class HostMetrics extends XenAPIObject { { if (obj != null && obj instanceof HostMetrics) { - HostMetrics other = (HostMetrics)obj; + HostMetrics other = (HostMetrics) obj; return other.ref.equals(this.ref); } else { @@ -111,8 +112,8 @@ public class HostMetrics extends XenAPIObject { /** * Convert a host_metrics.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("memory_total", this.memoryTotal == null ? 0 : this.memoryTotal); map.put("memory_free", this.memoryFree == null ? 0 : this.memoryFree); @@ -154,15 +155,15 @@ public class HostMetrics extends XenAPIObject { * @return all fields from the object */ public HostMetrics.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_metrics.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toHostMetricsRecord(result); + return Types.toHostMetricsRecord(result); } /** @@ -172,15 +173,15 @@ public class HostMetrics extends XenAPIObject { * @return reference to the object */ public static HostMetrics getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_metrics.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toHostMetrics(result); + return Types.toHostMetrics(result); } /** @@ -189,15 +190,15 @@ public class HostMetrics extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_metrics.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -206,15 +207,15 @@ public class HostMetrics extends XenAPIObject { * @return value of the field */ public Long getMemoryTotal(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_metrics.get_memory_total"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -223,17 +224,16 @@ public class HostMetrics extends XenAPIObject { * * @return value of the field */ - @Deprecated - public Long getMemoryFree(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + @Deprecated public Long getMemoryFree(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_metrics.get_memory_free"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -242,15 +242,15 @@ public class HostMetrics extends XenAPIObject { * @return value of the field */ public Boolean getLive(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_metrics.get_live"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -259,15 +259,15 @@ public class HostMetrics extends XenAPIObject { * @return value of the field */ public Date getLastUpdated(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_metrics.get_last_updated"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDate(result); + return Types.toDate(result); } /** @@ -276,15 +276,15 @@ public class HostMetrics extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_metrics.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -293,9 +293,9 @@ public class HostMetrics extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_metrics.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -310,9 +310,9 @@ public class HostMetrics extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_metrics.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -326,9 +326,9 @@ public class HostMetrics extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_metrics.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -342,15 +342,15 @@ public class HostMetrics extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_metrics.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfHostMetrics(result); + return Types.toSetOfHostMetrics(result); } /** @@ -359,15 +359,15 @@ public class HostMetrics extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_metrics.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfHostMetricsHostMetricsRecord(result); + return Types.toMapOfHostMetricsHostMetricsRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/HostPatch.java b/deps/XenServerJava/src/com/xensource/xenapi/HostPatch.java index fa77588232a..0f229dc93a4 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/HostPatch.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/HostPatch.java @@ -1,19 +1,19 @@ /* * 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 @@ -28,6 +28,7 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ + package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -60,14 +61,14 @@ public class HostPatch extends XenAPIObject { * For internal use only. */ HostPatch(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -78,7 +79,7 @@ public class HostPatch extends XenAPIObject { { if (obj != null && obj instanceof HostPatch) { - HostPatch other = (HostPatch)obj; + HostPatch other = (HostPatch) obj; return other.ref.equals(this.ref); } else { @@ -115,8 +116,8 @@ public class HostPatch extends XenAPIObject { /** * Convert a host_patch.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("name_label", this.nameLabel == null ? "" : this.nameLabel); map.put("name_description", this.nameDescription == null ? "" : this.nameDescription); @@ -178,15 +179,15 @@ public class HostPatch extends XenAPIObject { * @return all fields from the object */ public HostPatch.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_patch.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toHostPatchRecord(result); + return Types.toHostPatchRecord(result); } /** @@ -196,15 +197,15 @@ public class HostPatch extends XenAPIObject { * @return reference to the object */ public static HostPatch getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_patch.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toHostPatch(result); + return Types.toHostPatch(result); } /** @@ -214,15 +215,15 @@ public class HostPatch extends XenAPIObject { * @return references to objects with matching names */ public static Set getByNameLabel(Connection c, String label) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_patch.get_by_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(label)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfHostPatch(result); + return Types.toSetOfHostPatch(result); } /** @@ -231,15 +232,15 @@ public class HostPatch extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_patch.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -248,15 +249,15 @@ public class HostPatch extends XenAPIObject { * @return value of the field */ public String getNameLabel(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_patch.get_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -265,15 +266,15 @@ public class HostPatch extends XenAPIObject { * @return value of the field */ public String getNameDescription(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_patch.get_name_description"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -282,15 +283,15 @@ public class HostPatch extends XenAPIObject { * @return value of the field */ public String getVersion(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_patch.get_version"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -299,15 +300,15 @@ public class HostPatch extends XenAPIObject { * @return value of the field */ public Host getHost(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_patch.get_host"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toHost(result); + return Types.toHost(result); } /** @@ -316,15 +317,15 @@ public class HostPatch extends XenAPIObject { * @return value of the field */ public Boolean getApplied(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_patch.get_applied"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -333,15 +334,15 @@ public class HostPatch extends XenAPIObject { * @return value of the field */ public Date getTimestampApplied(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_patch.get_timestamp_applied"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDate(result); + return Types.toDate(result); } /** @@ -350,15 +351,15 @@ public class HostPatch extends XenAPIObject { * @return value of the field */ public Long getSize(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_patch.get_size"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -367,15 +368,15 @@ public class HostPatch extends XenAPIObject { * @return value of the field */ public PoolPatch getPoolPatch(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_patch.get_pool_patch"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPoolPatch(result); + return Types.toPoolPatch(result); } /** @@ -384,15 +385,15 @@ public class HostPatch extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_patch.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -401,9 +402,9 @@ public class HostPatch extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_patch.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -418,9 +419,9 @@ public class HostPatch extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_patch.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -434,9 +435,9 @@ public class HostPatch extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_patch.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -450,11 +451,10 @@ public class HostPatch extends XenAPIObject { * * @return Task */ - @Deprecated - public Task destroyAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + @Deprecated public Task destroyAsync(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host_patch.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -468,11 +468,10 @@ public class HostPatch extends XenAPIObject { * @deprecated * */ - @Deprecated - public void destroy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + @Deprecated public void destroy(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_patch.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -486,11 +485,10 @@ public class HostPatch extends XenAPIObject { * * @return Task */ - @Deprecated - public Task applyAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + @Deprecated public Task applyAsync(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host_patch.apply"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -505,17 +503,16 @@ public class HostPatch extends XenAPIObject { * * @return the output of the patch application process */ - @Deprecated - public String apply(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + @Deprecated public String apply(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_patch.apply"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -524,15 +521,15 @@ public class HostPatch extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_patch.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfHostPatch(result); + return Types.toSetOfHostPatch(result); } /** @@ -541,15 +538,15 @@ public class HostPatch extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_patch.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfHostPatchHostPatchRecord(result); + return Types.toMapOfHostPatchHostPatchRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/Marshalling.java b/deps/XenServerJava/src/com/xensource/xenapi/Marshalling.java old mode 100644 new mode 100755 index 865bc16af11..b7483c1d0fa --- a/deps/XenServerJava/src/com/xensource/xenapi/Marshalling.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/Marshalling.java @@ -1,15 +1,33 @@ -// Copyright 2012 Citrix Systems, Inc. Licensed under the -// Apache License, Version 2.0 (the "License"); you may not use this -// file except in compliance with the License. Citrix Systems, Inc. -// reserves all rights not expressly granted by the License. -// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Automatically generated by addcopyright.py at 04/03/2012 +/* + * 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.*; @@ -29,8 +47,8 @@ public final class Marshalling { o instanceof Double || o instanceof Date) { return o; - } else if (o instanceof Long) { - return o.toString(); + } else if (o instanceof Long) { + return o.toString(); } else if (o instanceof Map) { Map result = new HashMap(); Map m = (Map)o; @@ -46,14 +64,14 @@ public final class Marshalling { result.add(toXMLRPC(e)); } return result; - } else if (o instanceof XenAPIObject) { - return ((XenAPIObject)o).toWireString(); - } else if (o instanceof Enum) { - return o.toString(); - } else if (o == null) { - return ""; + } else if (o instanceof XenAPIObject) { + return ((XenAPIObject) o).toWireString(); + } else if (o instanceof Enum) { + return o.toString(); + }else if (o == null){ + return ""; } else { - throw new RuntimeException("=============don't know how to marshall:({[" + o + "]})"); + throw new RuntimeException ("=============don't know how to marshall:({[" + o + "]})"); } } } diff --git a/deps/XenServerJava/src/com/xensource/xenapi/Message.java b/deps/XenServerJava/src/com/xensource/xenapi/Message.java index a3658e38344..8cb41276be0 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/Message.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/Message.java @@ -1,19 +1,19 @@ /* * 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 @@ -28,6 +28,7 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ + package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -60,14 +61,14 @@ public class Message extends XenAPIObject { * For internal use only. */ Message(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -78,7 +79,7 @@ public class Message extends XenAPIObject { { if (obj != null && obj instanceof Message) { - Message other = (Message)obj; + Message other = (Message) obj; return other.ref.equals(this.ref); } else { @@ -112,8 +113,8 @@ public class Message extends XenAPIObject { /** * Convert a message.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("name", this.name == null ? "" : this.name); map.put("priority", this.priority == null ? 0 : this.priority); @@ -155,7 +156,7 @@ public class Message extends XenAPIObject { } /** - * + * * * @param name The name of the message * @param priority The priority of the message @@ -165,26 +166,25 @@ public class Message extends XenAPIObject { * @return The reference of the created message */ public static Message create(Connection c, String name, Long priority, Types.Cls cls, String objUuid, String body) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "message.create"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(priority), Marshalling.toXMLRPC(cls), - Marshalling.toXMLRPC(objUuid), Marshalling.toXMLRPC(body)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(priority), Marshalling.toXMLRPC(cls), Marshalling.toXMLRPC(objUuid), Marshalling.toXMLRPC(body)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMessage(result); + return Types.toMessage(result); } /** - * + * * */ public void destroy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "message.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -193,7 +193,7 @@ public class Message extends XenAPIObject { } /** - * + * * * @param cls The class of object * @param objUuid The uuid of the object @@ -201,120 +201,120 @@ public class Message extends XenAPIObject { * @return The relevant messages */ public static Map get(Connection c, Types.Cls cls, String objUuid, Date since) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "message.get"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(cls), Marshalling.toXMLRPC(objUuid), Marshalling.toXMLRPC(since)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfMessageMessageRecord(result); + return Types.toMapOfMessageMessageRecord(result); } /** - * + * * * @return The references to the messages */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "message.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfMessage(result); + return Types.toSetOfMessage(result); } /** - * + * * * @param since The cutoff time * @return The relevant messages */ public static Map getSince(Connection c, Date since) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "message.get_since"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(since)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfMessageMessageRecord(result); + return Types.toMapOfMessageMessageRecord(result); } /** - * + * * * @return The message record */ public Message.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "message.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMessageRecord(result); + return Types.toMessageRecord(result); } /** - * + * * * @param uuid The uuid of the message * @return The message reference */ public static Message getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "message.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMessage(result); + return Types.toMessage(result); } /** - * + * * * @return The messages */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "message.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfMessageMessageRecord(result); + return Types.toMapOfMessageMessageRecord(result); } /** - * + * * * @param expr The expression to match (not currently used) * @return The messages */ public static Map getAllRecordsWhere(Connection c, String expr) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "message.get_all_records_where"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(expr)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfMessageMessageRecord(result); + return Types.toMapOfMessageMessageRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/Network.java b/deps/XenServerJava/src/com/xensource/xenapi/Network.java index e9194ef7103..9f8c929f900 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/Network.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/Network.java @@ -1,19 +1,19 @@ /* * 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 @@ -28,6 +28,7 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ + package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -60,14 +61,14 @@ public class Network extends XenAPIObject { * For internal use only. */ Network(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -78,7 +79,7 @@ public class Network extends XenAPIObject { { if (obj != null && obj instanceof Network) { - Network other = (Network)obj; + Network other = (Network) obj; return other.ref.equals(this.ref); } else { @@ -118,8 +119,8 @@ public class Network extends XenAPIObject { /** * Convert a network.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("name_label", this.nameLabel == null ? "" : this.nameLabel); map.put("name_description", this.nameDescription == null ? "" : this.nameDescription); @@ -196,15 +197,15 @@ public class Network extends XenAPIObject { * @return all fields from the object */ public Network.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toNetworkRecord(result); + return Types.toNetworkRecord(result); } /** @@ -214,15 +215,15 @@ public class Network extends XenAPIObject { * @return reference to the object */ public static Network getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toNetwork(result); + return Types.toNetwork(result); } /** @@ -232,9 +233,9 @@ public class Network extends XenAPIObject { * @return Task */ public static Task createAsync(Connection c, Network.Record record) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.network.create"; String session = c.getSessionReference(); Map record_map = record.toMap(); @@ -251,16 +252,16 @@ public class Network extends XenAPIObject { * @return reference to the newly created object */ public static Network create(Connection c, Network.Record record) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.create"; String session = c.getSessionReference(); Map record_map = record.toMap(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(record_map)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toNetwork(result); + return Types.toNetwork(result); } /** @@ -269,9 +270,9 @@ public class Network extends XenAPIObject { * @return Task */ public Task destroyAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.network.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -285,9 +286,9 @@ public class Network extends XenAPIObject { * */ public void destroy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -302,15 +303,15 @@ public class Network extends XenAPIObject { * @return references to objects with matching names */ public static Set getByNameLabel(Connection c, String label) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.get_by_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(label)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfNetwork(result); + return Types.toSetOfNetwork(result); } /** @@ -319,15 +320,15 @@ public class Network extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -336,15 +337,15 @@ public class Network extends XenAPIObject { * @return value of the field */ public String getNameLabel(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.get_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -353,15 +354,15 @@ public class Network extends XenAPIObject { * @return value of the field */ public String getNameDescription(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.get_name_description"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -370,15 +371,15 @@ public class Network extends XenAPIObject { * @return value of the field */ public Set getAllowedOperations(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.get_allowed_operations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfNetworkOperations(result); + return Types.toSetOfNetworkOperations(result); } /** @@ -387,15 +388,15 @@ public class Network extends XenAPIObject { * @return value of the field */ public Map getCurrentOperations(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.get_current_operations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringNetworkOperations(result); + return Types.toMapOfStringNetworkOperations(result); } /** @@ -404,15 +405,15 @@ public class Network extends XenAPIObject { * @return value of the field */ public Set getVIFs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.get_VIFs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVIF(result); + return Types.toSetOfVIF(result); } /** @@ -421,15 +422,15 @@ public class Network extends XenAPIObject { * @return value of the field */ public Set getPIFs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.get_PIFs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfPIF(result); + return Types.toSetOfPIF(result); } /** @@ -438,15 +439,15 @@ public class Network extends XenAPIObject { * @return value of the field */ public Long getMTU(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.get_MTU"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -455,15 +456,15 @@ public class Network extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -472,15 +473,15 @@ public class Network extends XenAPIObject { * @return value of the field */ public String getBridge(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.get_bridge"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -489,15 +490,15 @@ public class Network extends XenAPIObject { * @return value of the field */ public Map getBlobs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.get_blobs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringBlob(result); + return Types.toMapOfStringBlob(result); } /** @@ -506,15 +507,15 @@ public class Network extends XenAPIObject { * @return value of the field */ public Set getTags(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.get_tags"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -523,15 +524,15 @@ public class Network extends XenAPIObject { * @return value of the field */ public Types.NetworkDefaultLockingMode getDefaultLockingMode(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.get_default_locking_mode"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toNetworkDefaultLockingMode(result); + return Types.toNetworkDefaultLockingMode(result); } /** @@ -540,9 +541,9 @@ public class Network extends XenAPIObject { * @param label New value to set */ public void setNameLabel(Connection c, String label) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.set_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(label)}; @@ -556,9 +557,9 @@ public class Network extends XenAPIObject { * @param description New value to set */ public void setNameDescription(Connection c, String description) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.set_name_description"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(description)}; @@ -572,9 +573,9 @@ public class Network extends XenAPIObject { * @param MTU New value to set */ public void setMTU(Connection c, Long MTU) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.set_MTU"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(MTU)}; @@ -588,9 +589,9 @@ public class Network extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -605,9 +606,9 @@ public class Network extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -621,9 +622,9 @@ public class Network extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -637,9 +638,9 @@ public class Network extends XenAPIObject { * @param tags New value to set */ public void setTags(Connection c, Set tags) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.set_tags"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(tags)}; @@ -653,9 +654,9 @@ public class Network extends XenAPIObject { * @param value New value to add */ public void addTags(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.add_tags"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -669,9 +670,9 @@ public class Network extends XenAPIObject { * @param value Value to remove */ public void removeTags(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.remove_tags"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -688,13 +689,12 @@ public class Network extends XenAPIObject { * @return Task */ public Task createNewBlobAsync(Connection c, String name, String mimeType, Boolean _public) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.network.create_new_blob"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(mimeType), - Marshalling.toXMLRPC(_public)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(mimeType), Marshalling.toXMLRPC(_public)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); @@ -709,16 +709,15 @@ public class Network extends XenAPIObject { * @return The reference of the blob, needed for populating its data */ public Blob createNewBlob(Connection c, String name, String mimeType, Boolean _public) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.create_new_blob"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(mimeType), - Marshalling.toXMLRPC(_public)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(mimeType), Marshalling.toXMLRPC(_public)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBlob(result); + return Types.toBlob(result); } /** @@ -728,9 +727,9 @@ public class Network extends XenAPIObject { * @return Task */ public Task setDefaultLockingModeAsync(Connection c, Types.NetworkDefaultLockingMode value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.network.set_default_locking_mode"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -745,9 +744,9 @@ public class Network extends XenAPIObject { * @param value The default locking mode for VIFs attached to this network. */ public void setDefaultLockingMode(Connection c, Types.NetworkDefaultLockingMode value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.set_default_locking_mode"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -761,15 +760,15 @@ public class Network extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfNetwork(result); + return Types.toSetOfNetwork(result); } /** @@ -778,15 +777,15 @@ public class Network extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfNetworkNetworkRecord(result); + return Types.toMapOfNetworkNetworkRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/PBD.java b/deps/XenServerJava/src/com/xensource/xenapi/PBD.java index d2898247572..bae095f8d1f 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/PBD.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/PBD.java @@ -1,19 +1,19 @@ /* * 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 @@ -28,6 +28,7 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ + package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -60,14 +61,14 @@ public class PBD extends XenAPIObject { * For internal use only. */ PBD(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -78,7 +79,7 @@ public class PBD extends XenAPIObject { { if (obj != null && obj instanceof PBD) { - PBD other = (PBD)obj; + PBD other = (PBD) obj; return other.ref.equals(this.ref); } else { @@ -111,8 +112,8 @@ public class PBD extends XenAPIObject { /** * Convert a PBD.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("host", this.host == null ? new Host("OpaqueRef:NULL") : this.host); map.put("SR", this.SR == null ? new SR("OpaqueRef:NULL") : this.SR); @@ -154,15 +155,15 @@ public class PBD extends XenAPIObject { * @return all fields from the object */ public PBD.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PBD.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPBDRecord(result); + return Types.toPBDRecord(result); } /** @@ -172,15 +173,15 @@ public class PBD extends XenAPIObject { * @return reference to the object */ public static PBD getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PBD.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPBD(result); + return Types.toPBD(result); } /** @@ -190,9 +191,9 @@ public class PBD extends XenAPIObject { * @return Task */ public static Task createAsync(Connection c, PBD.Record record) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.PBD.create"; String session = c.getSessionReference(); Map record_map = record.toMap(); @@ -209,16 +210,16 @@ public class PBD extends XenAPIObject { * @return reference to the newly created object */ public static PBD create(Connection c, PBD.Record record) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PBD.create"; String session = c.getSessionReference(); Map record_map = record.toMap(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(record_map)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPBD(result); + return Types.toPBD(result); } /** @@ -227,9 +228,9 @@ public class PBD extends XenAPIObject { * @return Task */ public Task destroyAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.PBD.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -243,9 +244,9 @@ public class PBD extends XenAPIObject { * */ public void destroy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PBD.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -259,15 +260,15 @@ public class PBD extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PBD.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -276,15 +277,15 @@ public class PBD extends XenAPIObject { * @return value of the field */ public Host getHost(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PBD.get_host"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toHost(result); + return Types.toHost(result); } /** @@ -293,15 +294,15 @@ public class PBD extends XenAPIObject { * @return value of the field */ public SR getSR(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PBD.get_SR"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSR(result); + return Types.toSR(result); } /** @@ -310,15 +311,15 @@ public class PBD extends XenAPIObject { * @return value of the field */ public Map getDeviceConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PBD.get_device_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -327,15 +328,15 @@ public class PBD extends XenAPIObject { * @return value of the field */ public Boolean getCurrentlyAttached(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PBD.get_currently_attached"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -344,15 +345,15 @@ public class PBD extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PBD.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -361,9 +362,9 @@ public class PBD extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PBD.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -378,9 +379,9 @@ public class PBD extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PBD.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -394,9 +395,9 @@ public class PBD extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PBD.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -410,10 +411,10 @@ public class PBD extends XenAPIObject { * @return Task */ public Task plugAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.SrUnknownDriver { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.SrUnknownDriver { String method_call = "Async.PBD.plug"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -427,10 +428,10 @@ public class PBD extends XenAPIObject { * */ public void plug(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.SrUnknownDriver { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.SrUnknownDriver { String method_call = "PBD.plug"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -444,9 +445,9 @@ public class PBD extends XenAPIObject { * @return Task */ public Task unplugAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.PBD.unplug"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -460,9 +461,9 @@ public class PBD extends XenAPIObject { * */ public void unplug(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PBD.unplug"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -477,9 +478,9 @@ public class PBD extends XenAPIObject { * @return Task */ public Task setDeviceConfigAsync(Connection c, Map value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.PBD.set_device_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -494,9 +495,9 @@ public class PBD extends XenAPIObject { * @param value The new value of the PBD's device_config */ public void setDeviceConfig(Connection c, Map value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PBD.set_device_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -510,15 +511,15 @@ public class PBD extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PBD.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfPBD(result); + return Types.toSetOfPBD(result); } /** @@ -527,15 +528,15 @@ public class PBD extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PBD.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfPBDPBDRecord(result); + return Types.toMapOfPBDPBDRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/PCI.java b/deps/XenServerJava/src/com/xensource/xenapi/PCI.java index e11230a6289..fbee50a81b6 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/PCI.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/PCI.java @@ -1,19 +1,19 @@ /* * 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 @@ -28,6 +28,7 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ + package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -60,14 +61,14 @@ public class PCI extends XenAPIObject { * For internal use only. */ PCI(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -78,7 +79,7 @@ public class PCI extends XenAPIObject { { if (obj != null && obj instanceof PCI) { - PCI other = (PCI)obj; + PCI other = (PCI) obj; return other.ref.equals(this.ref); } else { @@ -113,8 +114,8 @@ public class PCI extends XenAPIObject { /** * Convert a PCI.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("class_name", this.clazzName == null ? "" : this.clazzName); map.put("vendor_name", this.vendorName == null ? "" : this.vendorName); @@ -166,15 +167,15 @@ public class PCI extends XenAPIObject { * @return all fields from the object */ public PCI.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PCI.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPCIRecord(result); + return Types.toPCIRecord(result); } /** @@ -184,15 +185,15 @@ public class PCI extends XenAPIObject { * @return reference to the object */ public static PCI getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PCI.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPCI(result); + return Types.toPCI(result); } /** @@ -201,15 +202,15 @@ public class PCI extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PCI.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -218,15 +219,15 @@ public class PCI extends XenAPIObject { * @return value of the field */ public String getClazzName(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PCI.get_class_name"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -235,15 +236,15 @@ public class PCI extends XenAPIObject { * @return value of the field */ public String getVendorName(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PCI.get_vendor_name"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -252,15 +253,15 @@ public class PCI extends XenAPIObject { * @return value of the field */ public String getDeviceName(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PCI.get_device_name"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -269,15 +270,15 @@ public class PCI extends XenAPIObject { * @return value of the field */ public Host getHost(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PCI.get_host"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toHost(result); + return Types.toHost(result); } /** @@ -286,15 +287,15 @@ public class PCI extends XenAPIObject { * @return value of the field */ public String getPciId(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PCI.get_pci_id"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -303,15 +304,15 @@ public class PCI extends XenAPIObject { * @return value of the field */ public Set getDependencies(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PCI.get_dependencies"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfPCI(result); + return Types.toSetOfPCI(result); } /** @@ -320,15 +321,15 @@ public class PCI extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PCI.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -337,9 +338,9 @@ public class PCI extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PCI.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -354,9 +355,9 @@ public class PCI extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PCI.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -370,9 +371,9 @@ public class PCI extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PCI.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -386,15 +387,15 @@ public class PCI extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PCI.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfPCI(result); + return Types.toSetOfPCI(result); } /** @@ -403,15 +404,15 @@ public class PCI extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PCI.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfPCIPCIRecord(result); + return Types.toMapOfPCIPCIRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/PGPU.java b/deps/XenServerJava/src/com/xensource/xenapi/PGPU.java index 0f5ddb4bdf9..43eadf53b60 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/PGPU.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/PGPU.java @@ -1,19 +1,19 @@ /* * 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 @@ -28,6 +28,7 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ + package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -60,14 +61,14 @@ public class PGPU extends XenAPIObject { * For internal use only. */ PGPU(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -78,7 +79,7 @@ public class PGPU extends XenAPIObject { { if (obj != null && obj instanceof PGPU) { - PGPU other = (PGPU)obj; + PGPU other = (PGPU) obj; return other.ref.equals(this.ref); } else { @@ -104,19 +105,27 @@ public class PGPU extends XenAPIObject { print.printf("%1$20s: %2$s\n", "GPUGroup", this.GPUGroup); print.printf("%1$20s: %2$s\n", "host", this.host); print.printf("%1$20s: %2$s\n", "otherConfig", this.otherConfig); + print.printf("%1$20s: %2$s\n", "supportedVGPUTypes", this.supportedVGPUTypes); + print.printf("%1$20s: %2$s\n", "enabledVGPUTypes", this.enabledVGPUTypes); + print.printf("%1$20s: %2$s\n", "residentVGPUs", this.residentVGPUs); + print.printf("%1$20s: %2$s\n", "supportedVGPUMaxCapacities", this.supportedVGPUMaxCapacities); return writer.toString(); } /** * Convert a PGPU.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("PCI", this.PCI == null ? new PCI("OpaqueRef:NULL") : this.PCI); map.put("GPU_group", this.GPUGroup == null ? new GPUGroup("OpaqueRef:NULL") : this.GPUGroup); map.put("host", this.host == null ? new Host("OpaqueRef:NULL") : this.host); map.put("other_config", this.otherConfig == null ? new HashMap() : this.otherConfig); + map.put("supported_VGPU_types", this.supportedVGPUTypes == null ? new LinkedHashSet() : this.supportedVGPUTypes); + map.put("enabled_VGPU_types", this.enabledVGPUTypes == null ? new LinkedHashSet() : this.enabledVGPUTypes); + map.put("resident_VGPUs", this.residentVGPUs == null ? new LinkedHashSet() : this.residentVGPUs); + map.put("supported_VGPU_max_capacities", this.supportedVGPUMaxCapacities == null ? new HashMap() : this.supportedVGPUMaxCapacities); return map; } @@ -140,6 +149,22 @@ public class PGPU extends XenAPIObject { * Additional configuration */ public Map otherConfig; + /** + * List of VGPU types supported by the underlying hardware + */ + public Set supportedVGPUTypes; + /** + * List of VGPU types which have been enabled for this PGPU + */ + public Set enabledVGPUTypes; + /** + * List of VGPUs running on this PGPU + */ + public Set residentVGPUs; + /** + * A map relating each VGPU type supported on this GPU to the maximum number of VGPUs of that type which can run simultaneously on this GPU + */ + public Map supportedVGPUMaxCapacities; } /** @@ -148,15 +173,15 @@ public class PGPU extends XenAPIObject { * @return all fields from the object */ public PGPU.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PGPU.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPGPURecord(result); + return Types.toPGPURecord(result); } /** @@ -166,15 +191,15 @@ public class PGPU extends XenAPIObject { * @return reference to the object */ public static PGPU getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PGPU.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPGPU(result); + return Types.toPGPU(result); } /** @@ -183,15 +208,15 @@ public class PGPU extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PGPU.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -200,15 +225,15 @@ public class PGPU extends XenAPIObject { * @return value of the field */ public PCI getPCI(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PGPU.get_PCI"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPCI(result); + return Types.toPCI(result); } /** @@ -217,15 +242,15 @@ public class PGPU extends XenAPIObject { * @return value of the field */ public GPUGroup getGPUGroup(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PGPU.get_GPU_group"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toGPUGroup(result); + return Types.toGPUGroup(result); } /** @@ -234,15 +259,15 @@ public class PGPU extends XenAPIObject { * @return value of the field */ public Host getHost(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PGPU.get_host"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toHost(result); + return Types.toHost(result); } /** @@ -251,15 +276,83 @@ public class PGPU extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PGPU.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); + } + + /** + * Get the supported_VGPU_types field of the given PGPU. + * + * @return value of the field + */ + public Set getSupportedVGPUTypes(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { + String method_call = "PGPU.get_supported_VGPU_types"; + String session = c.getSessionReference(); + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; + Map response = c.dispatch(method_call, method_params); + Object result = response.get("Value"); + return Types.toSetOfVGPUType(result); + } + + /** + * Get the enabled_VGPU_types field of the given PGPU. + * + * @return value of the field + */ + public Set getEnabledVGPUTypes(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { + String method_call = "PGPU.get_enabled_VGPU_types"; + String session = c.getSessionReference(); + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; + Map response = c.dispatch(method_call, method_params); + Object result = response.get("Value"); + return Types.toSetOfVGPUType(result); + } + + /** + * Get the resident_VGPUs field of the given PGPU. + * + * @return value of the field + */ + public Set getResidentVGPUs(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { + String method_call = "PGPU.get_resident_VGPUs"; + String session = c.getSessionReference(); + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; + Map response = c.dispatch(method_call, method_params); + Object result = response.get("Value"); + return Types.toSetOfVGPU(result); + } + + /** + * Get the supported_VGPU_max_capacities field of the given PGPU. + * + * @return value of the field + */ + public Map getSupportedVGPUMaxCapacities(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { + String method_call = "PGPU.get_supported_VGPU_max_capacities"; + String session = c.getSessionReference(); + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; + Map response = c.dispatch(method_call, method_params); + Object result = response.get("Value"); + return Types.toMapOfVGPUTypeLong(result); } /** @@ -268,9 +361,9 @@ public class PGPU extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PGPU.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -285,9 +378,9 @@ public class PGPU extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PGPU.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -301,9 +394,9 @@ public class PGPU extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PGPU.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -311,21 +404,193 @@ public class PGPU extends XenAPIObject { return; } + /** + * + * + * @param value The VGPU type to enable + * @return Task + */ + public Task addEnabledVGPUTypesAsync(Connection c, VGPUType value) throws + BadServerResponse, + XenAPIException, + XmlRpcException { + String method_call = "Async.PGPU.add_enabled_VGPU_types"; + String session = c.getSessionReference(); + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; + Map response = c.dispatch(method_call, method_params); + Object result = response.get("Value"); + return Types.toTask(result); + } + + /** + * + * + * @param value The VGPU type to enable + */ + public void addEnabledVGPUTypes(Connection c, VGPUType value) throws + BadServerResponse, + XenAPIException, + XmlRpcException { + String method_call = "PGPU.add_enabled_VGPU_types"; + String session = c.getSessionReference(); + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; + Map response = c.dispatch(method_call, method_params); + return; + } + + /** + * + * + * @param value The VGPU type to disable + * @return Task + */ + public Task removeEnabledVGPUTypesAsync(Connection c, VGPUType value) throws + BadServerResponse, + XenAPIException, + XmlRpcException { + String method_call = "Async.PGPU.remove_enabled_VGPU_types"; + String session = c.getSessionReference(); + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; + Map response = c.dispatch(method_call, method_params); + Object result = response.get("Value"); + return Types.toTask(result); + } + + /** + * + * + * @param value The VGPU type to disable + */ + public void removeEnabledVGPUTypes(Connection c, VGPUType value) throws + BadServerResponse, + XenAPIException, + XmlRpcException { + String method_call = "PGPU.remove_enabled_VGPU_types"; + String session = c.getSessionReference(); + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; + Map response = c.dispatch(method_call, method_params); + return; + } + + /** + * + * + * @param value The VGPU types to enable + * @return Task + */ + public Task setEnabledVGPUTypesAsync(Connection c, Set value) throws + BadServerResponse, + XenAPIException, + XmlRpcException { + String method_call = "Async.PGPU.set_enabled_VGPU_types"; + String session = c.getSessionReference(); + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; + Map response = c.dispatch(method_call, method_params); + Object result = response.get("Value"); + return Types.toTask(result); + } + + /** + * + * + * @param value The VGPU types to enable + */ + public void setEnabledVGPUTypes(Connection c, Set value) throws + BadServerResponse, + XenAPIException, + XmlRpcException { + String method_call = "PGPU.set_enabled_VGPU_types"; + String session = c.getSessionReference(); + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; + Map response = c.dispatch(method_call, method_params); + return; + } + + /** + * + * + * @param value The group to which the PGPU will be moved + * @return Task + */ + public Task setGPUGroupAsync(Connection c, GPUGroup value) throws + BadServerResponse, + XenAPIException, + XmlRpcException { + String method_call = "Async.PGPU.set_GPU_group"; + String session = c.getSessionReference(); + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; + Map response = c.dispatch(method_call, method_params); + Object result = response.get("Value"); + return Types.toTask(result); + } + + /** + * + * + * @param value The group to which the PGPU will be moved + */ + public void setGPUGroup(Connection c, GPUGroup value) throws + BadServerResponse, + XenAPIException, + XmlRpcException { + String method_call = "PGPU.set_GPU_group"; + String session = c.getSessionReference(); + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; + Map response = c.dispatch(method_call, method_params); + return; + } + + /** + * + * + * @param vgpuType The VGPU type for which we want to find the number of VGPUs which can still be started on this PGPU + * @return Task + */ + public Task getRemainingCapacityAsync(Connection c, VGPUType vgpuType) throws + BadServerResponse, + XenAPIException, + XmlRpcException { + String method_call = "Async.PGPU.get_remaining_capacity"; + String session = c.getSessionReference(); + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(vgpuType)}; + Map response = c.dispatch(method_call, method_params); + Object result = response.get("Value"); + return Types.toTask(result); + } + + /** + * + * + * @param vgpuType The VGPU type for which we want to find the number of VGPUs which can still be started on this PGPU + * @return The number of VGPUs of the specified type which can still be started on this PGPU + */ + public Long getRemainingCapacity(Connection c, VGPUType vgpuType) throws + BadServerResponse, + XenAPIException, + XmlRpcException { + String method_call = "PGPU.get_remaining_capacity"; + String session = c.getSessionReference(); + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(vgpuType)}; + Map response = c.dispatch(method_call, method_params); + Object result = response.get("Value"); + return Types.toLong(result); + } + /** * Return a list of all the PGPUs known to the system. * * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PGPU.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfPGPU(result); + return Types.toSetOfPGPU(result); } /** @@ -334,15 +599,15 @@ public class PGPU extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PGPU.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfPGPUPGPURecord(result); + return Types.toMapOfPGPUPGPURecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/PIF.java b/deps/XenServerJava/src/com/xensource/xenapi/PIF.java index 27618b4105b..e75b5656185 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/PIF.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/PIF.java @@ -1,19 +1,19 @@ /* * 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 @@ -28,6 +28,7 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ + package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -60,14 +61,14 @@ public class PIF extends XenAPIObject { * For internal use only. */ PIF(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -78,7 +79,7 @@ public class PIF extends XenAPIObject { { if (obj != null && obj instanceof PIF) { - PIF other = (PIF)obj; + PIF other = (PIF) obj; return other.ref.equals(this.ref); } else { @@ -127,14 +128,15 @@ public class PIF extends XenAPIObject { print.printf("%1$20s: %2$s\n", "IPv6", this.IPv6); print.printf("%1$20s: %2$s\n", "ipv6Gateway", this.ipv6Gateway); print.printf("%1$20s: %2$s\n", "primaryAddressType", this.primaryAddressType); + print.printf("%1$20s: %2$s\n", "managed", this.managed); return writer.toString(); } /** * Convert a PIF.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("device", this.device == null ? "" : this.device); map.put("network", this.network == null ? new Network("OpaqueRef:NULL") : this.network); @@ -163,6 +165,7 @@ public class PIF extends XenAPIObject { map.put("IPv6", this.IPv6 == null ? new LinkedHashSet() : this.IPv6); map.put("ipv6_gateway", this.ipv6Gateway == null ? "" : this.ipv6Gateway); map.put("primary_address_type", this.primaryAddressType == null ? Types.PrimaryAddressType.UNRECOGNIZED : this.primaryAddressType); + map.put("managed", this.managed == null ? false : this.managed); return map; } @@ -278,6 +281,10 @@ public class PIF extends XenAPIObject { * Which protocol should define the primary address of this interface */ public Types.PrimaryAddressType primaryAddressType; + /** + * Indicates whether the interface is managed by xapi. If it is not, then xapi will not configure the interface, the commands PIF.plug/unplug/reconfigure_ip(v6) can not be used, nor can the interface be bonded or have VLANs based on top through xapi. + */ + public Boolean managed; } /** @@ -286,15 +293,15 @@ public class PIF extends XenAPIObject { * @return all fields from the object */ public PIF.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPIFRecord(result); + return Types.toPIFRecord(result); } /** @@ -304,15 +311,15 @@ public class PIF extends XenAPIObject { * @return reference to the object */ public static PIF getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPIF(result); + return Types.toPIF(result); } /** @@ -321,15 +328,15 @@ public class PIF extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -338,15 +345,15 @@ public class PIF extends XenAPIObject { * @return value of the field */ public String getDevice(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_device"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -355,15 +362,15 @@ public class PIF extends XenAPIObject { * @return value of the field */ public Network getNetwork(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_network"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toNetwork(result); + return Types.toNetwork(result); } /** @@ -372,15 +379,15 @@ public class PIF extends XenAPIObject { * @return value of the field */ public Host getHost(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_host"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toHost(result); + return Types.toHost(result); } /** @@ -389,15 +396,15 @@ public class PIF extends XenAPIObject { * @return value of the field */ public String getMAC(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_MAC"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -406,15 +413,15 @@ public class PIF extends XenAPIObject { * @return value of the field */ public Long getMTU(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_MTU"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -423,15 +430,15 @@ public class PIF extends XenAPIObject { * @return value of the field */ public Long getVLAN(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_VLAN"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -440,15 +447,15 @@ public class PIF extends XenAPIObject { * @return value of the field */ public PIFMetrics getMetrics(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_metrics"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPIFMetrics(result); + return Types.toPIFMetrics(result); } /** @@ -457,15 +464,15 @@ public class PIF extends XenAPIObject { * @return value of the field */ public Boolean getPhysical(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_physical"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -474,15 +481,15 @@ public class PIF extends XenAPIObject { * @return value of the field */ public Boolean getCurrentlyAttached(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_currently_attached"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -491,15 +498,15 @@ public class PIF extends XenAPIObject { * @return value of the field */ public Types.IpConfigurationMode getIpConfigurationMode(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_ip_configuration_mode"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toIpConfigurationMode(result); + return Types.toIpConfigurationMode(result); } /** @@ -508,15 +515,15 @@ public class PIF extends XenAPIObject { * @return value of the field */ public String getIP(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_IP"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -525,15 +532,15 @@ public class PIF extends XenAPIObject { * @return value of the field */ public String getNetmask(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_netmask"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -542,15 +549,15 @@ public class PIF extends XenAPIObject { * @return value of the field */ public String getGateway(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_gateway"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -559,15 +566,15 @@ public class PIF extends XenAPIObject { * @return value of the field */ public String getDNS(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_DNS"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -576,15 +583,15 @@ public class PIF extends XenAPIObject { * @return value of the field */ public Bond getBondSlaveOf(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_bond_slave_of"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBond(result); + return Types.toBond(result); } /** @@ -593,15 +600,15 @@ public class PIF extends XenAPIObject { * @return value of the field */ public Set getBondMasterOf(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_bond_master_of"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfBond(result); + return Types.toSetOfBond(result); } /** @@ -610,15 +617,15 @@ public class PIF extends XenAPIObject { * @return value of the field */ public VLAN getVLANMasterOf(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_VLAN_master_of"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVLAN(result); + return Types.toVLAN(result); } /** @@ -627,15 +634,15 @@ public class PIF extends XenAPIObject { * @return value of the field */ public Set getVLANSlaveOf(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_VLAN_slave_of"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVLAN(result); + return Types.toSetOfVLAN(result); } /** @@ -644,15 +651,15 @@ public class PIF extends XenAPIObject { * @return value of the field */ public Boolean getManagement(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_management"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -661,15 +668,15 @@ public class PIF extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -678,15 +685,15 @@ public class PIF extends XenAPIObject { * @return value of the field */ public Boolean getDisallowUnplug(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_disallow_unplug"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -695,15 +702,15 @@ public class PIF extends XenAPIObject { * @return value of the field */ public Set getTunnelAccessPIFOf(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_tunnel_access_PIF_of"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfTunnel(result); + return Types.toSetOfTunnel(result); } /** @@ -712,15 +719,15 @@ public class PIF extends XenAPIObject { * @return value of the field */ public Set getTunnelTransportPIFOf(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_tunnel_transport_PIF_of"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfTunnel(result); + return Types.toSetOfTunnel(result); } /** @@ -729,15 +736,15 @@ public class PIF extends XenAPIObject { * @return value of the field */ public Types.Ipv6ConfigurationMode getIpv6ConfigurationMode(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_ipv6_configuration_mode"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toIpv6ConfigurationMode(result); + return Types.toIpv6ConfigurationMode(result); } /** @@ -746,15 +753,15 @@ public class PIF extends XenAPIObject { * @return value of the field */ public Set getIPv6(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_IPv6"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -763,15 +770,15 @@ public class PIF extends XenAPIObject { * @return value of the field */ public String getIpv6Gateway(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_ipv6_gateway"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -780,15 +787,32 @@ public class PIF extends XenAPIObject { * @return value of the field */ public Types.PrimaryAddressType getPrimaryAddressType(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_primary_address_type"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPrimaryAddressType(result); + return Types.toPrimaryAddressType(result); + } + + /** + * Get the managed field of the given PIF. + * + * @return value of the field + */ + public Boolean getManaged(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { + String method_call = "PIF.get_managed"; + String session = c.getSessionReference(); + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; + Map response = c.dispatch(method_call, method_params); + Object result = response.get("Value"); + return Types.toBoolean(result); } /** @@ -797,9 +821,9 @@ public class PIF extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -814,9 +838,9 @@ public class PIF extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -830,9 +854,9 @@ public class PIF extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -846,9 +870,9 @@ public class PIF extends XenAPIObject { * @param disallowUnplug New value to set */ public void setDisallowUnplug(Connection c, Boolean disallowUnplug) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.set_disallow_unplug"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(disallowUnplug)}; @@ -866,16 +890,14 @@ public class PIF extends XenAPIObject { * @param VLAN VLAN tag for the new interface * @return Task */ - @Deprecated - public static Task createVLANAsync(Connection c, String device, Network network, Host host, Long VLAN) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VlanTagInvalid { + @Deprecated public static Task createVLANAsync(Connection c, String device, Network network, Host host, Long VLAN) throws + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VlanTagInvalid { String method_call = "Async.PIF.create_VLAN"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(device), Marshalling.toXMLRPC(network), Marshalling.toXMLRPC(host), - Marshalling.toXMLRPC(VLAN)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(device), Marshalling.toXMLRPC(network), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(VLAN)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); @@ -891,19 +913,17 @@ public class PIF extends XenAPIObject { * @param VLAN VLAN tag for the new interface * @return The reference of the created PIF object */ - @Deprecated - public static PIF createVLAN(Connection c, String device, Network network, Host host, Long VLAN) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VlanTagInvalid { + @Deprecated public static PIF createVLAN(Connection c, String device, Network network, Host host, Long VLAN) throws + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VlanTagInvalid { String method_call = "PIF.create_VLAN"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(device), Marshalling.toXMLRPC(network), Marshalling.toXMLRPC(host), - Marshalling.toXMLRPC(VLAN)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(device), Marshalling.toXMLRPC(network), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(VLAN)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPIF(result); + return Types.toPIF(result); } /** @@ -912,12 +932,11 @@ public class PIF extends XenAPIObject { * * @return Task */ - @Deprecated - public Task destroyAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.PifIsPhysical { + @Deprecated public Task destroyAsync(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.PifIsPhysical { String method_call = "Async.PIF.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -931,12 +950,11 @@ public class PIF extends XenAPIObject { * @deprecated * */ - @Deprecated - public void destroy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.PifIsPhysical { + @Deprecated public void destroy(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.PifIsPhysical { String method_call = "PIF.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -955,13 +973,12 @@ public class PIF extends XenAPIObject { * @return Task */ public Task reconfigureIpAsync(Connection c, Types.IpConfigurationMode mode, String IP, String netmask, String gateway, String DNS) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.PIF.reconfigure_ip"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(mode), Marshalling.toXMLRPC(IP), - Marshalling.toXMLRPC(netmask), Marshalling.toXMLRPC(gateway), Marshalling.toXMLRPC(DNS)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(mode), Marshalling.toXMLRPC(IP), Marshalling.toXMLRPC(netmask), Marshalling.toXMLRPC(gateway), Marshalling.toXMLRPC(DNS)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); @@ -977,13 +994,12 @@ public class PIF extends XenAPIObject { * @param DNS the new DNS settings */ public void reconfigureIp(Connection c, Types.IpConfigurationMode mode, String IP, String netmask, String gateway, String DNS) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.reconfigure_ip"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(mode), Marshalling.toXMLRPC(IP), - Marshalling.toXMLRPC(netmask), Marshalling.toXMLRPC(gateway), Marshalling.toXMLRPC(DNS)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(mode), Marshalling.toXMLRPC(IP), Marshalling.toXMLRPC(netmask), Marshalling.toXMLRPC(gateway), Marshalling.toXMLRPC(DNS)}; Map response = c.dispatch(method_call, method_params); return; } @@ -998,13 +1014,12 @@ public class PIF extends XenAPIObject { * @return Task */ public Task reconfigureIpv6Async(Connection c, Types.Ipv6ConfigurationMode mode, String IPv6, String gateway, String DNS) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.PIF.reconfigure_ipv6"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(mode), Marshalling.toXMLRPC(IPv6), - Marshalling.toXMLRPC(gateway), Marshalling.toXMLRPC(DNS)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(mode), Marshalling.toXMLRPC(IPv6), Marshalling.toXMLRPC(gateway), Marshalling.toXMLRPC(DNS)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); @@ -1019,13 +1034,12 @@ public class PIF extends XenAPIObject { * @param DNS the new DNS settings */ public void reconfigureIpv6(Connection c, Types.Ipv6ConfigurationMode mode, String IPv6, String gateway, String DNS) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.reconfigure_ipv6"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(mode), Marshalling.toXMLRPC(IPv6), - Marshalling.toXMLRPC(gateway), Marshalling.toXMLRPC(DNS)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(mode), Marshalling.toXMLRPC(IPv6), Marshalling.toXMLRPC(gateway), Marshalling.toXMLRPC(DNS)}; Map response = c.dispatch(method_call, method_params); return; } @@ -1037,9 +1051,9 @@ public class PIF extends XenAPIObject { * @return Task */ public Task setPrimaryAddressTypeAsync(Connection c, Types.PrimaryAddressType primaryAddressType) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.PIF.set_primary_address_type"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(primaryAddressType)}; @@ -1054,9 +1068,9 @@ public class PIF extends XenAPIObject { * @param primaryAddressType Whether to prefer IPv4 or IPv6 connections */ public void setPrimaryAddressType(Connection c, Types.PrimaryAddressType primaryAddressType) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.set_primary_address_type"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(primaryAddressType)}; @@ -1071,9 +1085,9 @@ public class PIF extends XenAPIObject { * @return Task */ public static Task scanAsync(Connection c, Host host) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.PIF.scan"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host)}; @@ -1088,9 +1102,9 @@ public class PIF extends XenAPIObject { * @param host The host on which to scan */ public static void scan(Connection c, Host host) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.scan"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host)}; @@ -1104,15 +1118,16 @@ public class PIF extends XenAPIObject { * @param host The host on which the interface exists * @param MAC The MAC address of the interface * @param device The device name to use for the interface + * @param managed Indicates whether the interface is managed by xapi (defaults to "true") * @return Task */ - public static Task introduceAsync(Connection c, Host host, String MAC, String device) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + public static Task introduceAsync(Connection c, Host host, String MAC, String device, Boolean managed) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.PIF.introduce"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(MAC), Marshalling.toXMLRPC(device)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(MAC), Marshalling.toXMLRPC(device), Marshalling.toXMLRPC(managed)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); @@ -1124,18 +1139,19 @@ public class PIF extends XenAPIObject { * @param host The host on which the interface exists * @param MAC The MAC address of the interface * @param device The device name to use for the interface + * @param managed Indicates whether the interface is managed by xapi (defaults to "true") * @return The reference of the created PIF object */ - public static PIF introduce(Connection c, Host host, String MAC, String device) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + public static PIF introduce(Connection c, Host host, String MAC, String device, Boolean managed) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.introduce"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(MAC), Marshalling.toXMLRPC(device)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(MAC), Marshalling.toXMLRPC(device), Marshalling.toXMLRPC(managed)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPIF(result); + return Types.toPIF(result); } /** @@ -1144,10 +1160,10 @@ public class PIF extends XenAPIObject { * @return Task */ public Task forgetAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.PifTunnelStillExists { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.PifTunnelStillExists { String method_call = "Async.PIF.forget"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1161,10 +1177,10 @@ public class PIF extends XenAPIObject { * */ public void forget(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.PifTunnelStillExists { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.PifTunnelStillExists { String method_call = "PIF.forget"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1178,9 +1194,9 @@ public class PIF extends XenAPIObject { * @return Task */ public Task unplugAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.PIF.unplug"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1194,9 +1210,9 @@ public class PIF extends XenAPIObject { * */ public void unplug(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.unplug"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1210,10 +1226,10 @@ public class PIF extends XenAPIObject { * @return Task */ public Task plugAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.TransportPifNotConfigured { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.TransportPifNotConfigured { String method_call = "Async.PIF.plug"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1227,10 +1243,10 @@ public class PIF extends XenAPIObject { * */ public void plug(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.TransportPifNotConfigured { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.TransportPifNotConfigured { String method_call = "PIF.plug"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1241,43 +1257,37 @@ public class PIF extends XenAPIObject { /** * Create a new PIF record in the database only * - * @param device - * @param network - * @param host - * @param MAC - * @param MTU - * @param VLAN - * @param physical - * @param ipConfigurationMode - * @param IP - * @param netmask - * @param gateway - * @param DNS - * @param bondSlaveOf - * @param VLANMasterOf - * @param management - * @param otherConfig - * @param disallowUnplug - * @param ipv6ConfigurationMode - * @param IPv6 - * @param ipv6Gateway - * @param primaryAddressType + * @param device + * @param network + * @param host + * @param MAC + * @param MTU + * @param VLAN + * @param physical + * @param ipConfigurationMode + * @param IP + * @param netmask + * @param gateway + * @param DNS + * @param bondSlaveOf + * @param VLANMasterOf + * @param management + * @param otherConfig + * @param disallowUnplug + * @param ipv6ConfigurationMode + * @param IPv6 + * @param ipv6Gateway + * @param primaryAddressType + * @param managed * @return Task */ - public static Task dbIntroduceAsync(Connection c, String device, Network network, Host host, String MAC, Long MTU, Long VLAN, Boolean physical, - Types.IpConfigurationMode ipConfigurationMode, String IP, String netmask, String gateway, String DNS, Bond bondSlaveOf, VLAN VLANMasterOf, Boolean management, - Map otherConfig, Boolean disallowUnplug, Types.Ipv6ConfigurationMode ipv6ConfigurationMode, Set IPv6, String ipv6Gateway, - Types.PrimaryAddressType primaryAddressType) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + public static Task dbIntroduceAsync(Connection c, String device, Network network, Host host, String MAC, Long MTU, Long VLAN, Boolean physical, Types.IpConfigurationMode ipConfigurationMode, String IP, String netmask, String gateway, String DNS, Bond bondSlaveOf, VLAN VLANMasterOf, Boolean management, Map otherConfig, Boolean disallowUnplug, Types.Ipv6ConfigurationMode ipv6ConfigurationMode, Set IPv6, String ipv6Gateway, Types.PrimaryAddressType primaryAddressType, Boolean managed) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.PIF.db_introduce"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(device), Marshalling.toXMLRPC(network), Marshalling.toXMLRPC(host), - Marshalling.toXMLRPC(MAC), Marshalling.toXMLRPC(MTU), Marshalling.toXMLRPC(VLAN), Marshalling.toXMLRPC(physical), Marshalling.toXMLRPC(ipConfigurationMode), - Marshalling.toXMLRPC(IP), Marshalling.toXMLRPC(netmask), Marshalling.toXMLRPC(gateway), Marshalling.toXMLRPC(DNS), Marshalling.toXMLRPC(bondSlaveOf), - Marshalling.toXMLRPC(VLANMasterOf), Marshalling.toXMLRPC(management), Marshalling.toXMLRPC(otherConfig), Marshalling.toXMLRPC(disallowUnplug), - Marshalling.toXMLRPC(ipv6ConfigurationMode), Marshalling.toXMLRPC(IPv6), Marshalling.toXMLRPC(ipv6Gateway), Marshalling.toXMLRPC(primaryAddressType)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(device), Marshalling.toXMLRPC(network), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(MAC), Marshalling.toXMLRPC(MTU), Marshalling.toXMLRPC(VLAN), Marshalling.toXMLRPC(physical), Marshalling.toXMLRPC(ipConfigurationMode), Marshalling.toXMLRPC(IP), Marshalling.toXMLRPC(netmask), Marshalling.toXMLRPC(gateway), Marshalling.toXMLRPC(DNS), Marshalling.toXMLRPC(bondSlaveOf), Marshalling.toXMLRPC(VLANMasterOf), Marshalling.toXMLRPC(management), Marshalling.toXMLRPC(otherConfig), Marshalling.toXMLRPC(disallowUnplug), Marshalling.toXMLRPC(ipv6ConfigurationMode), Marshalling.toXMLRPC(IPv6), Marshalling.toXMLRPC(ipv6Gateway), Marshalling.toXMLRPC(primaryAddressType), Marshalling.toXMLRPC(managed)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); @@ -1286,46 +1296,40 @@ public class PIF extends XenAPIObject { /** * Create a new PIF record in the database only * - * @param device - * @param network - * @param host - * @param MAC - * @param MTU - * @param VLAN - * @param physical - * @param ipConfigurationMode - * @param IP - * @param netmask - * @param gateway - * @param DNS - * @param bondSlaveOf - * @param VLANMasterOf - * @param management - * @param otherConfig - * @param disallowUnplug - * @param ipv6ConfigurationMode - * @param IPv6 - * @param ipv6Gateway - * @param primaryAddressType + * @param device + * @param network + * @param host + * @param MAC + * @param MTU + * @param VLAN + * @param physical + * @param ipConfigurationMode + * @param IP + * @param netmask + * @param gateway + * @param DNS + * @param bondSlaveOf + * @param VLANMasterOf + * @param management + * @param otherConfig + * @param disallowUnplug + * @param ipv6ConfigurationMode + * @param IPv6 + * @param ipv6Gateway + * @param primaryAddressType + * @param managed * @return The ref of the newly created PIF record. */ - public static PIF dbIntroduce(Connection c, String device, Network network, Host host, String MAC, Long MTU, Long VLAN, Boolean physical, - Types.IpConfigurationMode ipConfigurationMode, String IP, String netmask, String gateway, String DNS, Bond bondSlaveOf, VLAN VLANMasterOf, Boolean management, - Map otherConfig, Boolean disallowUnplug, Types.Ipv6ConfigurationMode ipv6ConfigurationMode, Set IPv6, String ipv6Gateway, - Types.PrimaryAddressType primaryAddressType) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + public static PIF dbIntroduce(Connection c, String device, Network network, Host host, String MAC, Long MTU, Long VLAN, Boolean physical, Types.IpConfigurationMode ipConfigurationMode, String IP, String netmask, String gateway, String DNS, Bond bondSlaveOf, VLAN VLANMasterOf, Boolean management, Map otherConfig, Boolean disallowUnplug, Types.Ipv6ConfigurationMode ipv6ConfigurationMode, Set IPv6, String ipv6Gateway, Types.PrimaryAddressType primaryAddressType, Boolean managed) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.db_introduce"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(device), Marshalling.toXMLRPC(network), Marshalling.toXMLRPC(host), - Marshalling.toXMLRPC(MAC), Marshalling.toXMLRPC(MTU), Marshalling.toXMLRPC(VLAN), Marshalling.toXMLRPC(physical), Marshalling.toXMLRPC(ipConfigurationMode), - Marshalling.toXMLRPC(IP), Marshalling.toXMLRPC(netmask), Marshalling.toXMLRPC(gateway), Marshalling.toXMLRPC(DNS), Marshalling.toXMLRPC(bondSlaveOf), - Marshalling.toXMLRPC(VLANMasterOf), Marshalling.toXMLRPC(management), Marshalling.toXMLRPC(otherConfig), Marshalling.toXMLRPC(disallowUnplug), - Marshalling.toXMLRPC(ipv6ConfigurationMode), Marshalling.toXMLRPC(IPv6), Marshalling.toXMLRPC(ipv6Gateway), Marshalling.toXMLRPC(primaryAddressType)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(device), Marshalling.toXMLRPC(network), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(MAC), Marshalling.toXMLRPC(MTU), Marshalling.toXMLRPC(VLAN), Marshalling.toXMLRPC(physical), Marshalling.toXMLRPC(ipConfigurationMode), Marshalling.toXMLRPC(IP), Marshalling.toXMLRPC(netmask), Marshalling.toXMLRPC(gateway), Marshalling.toXMLRPC(DNS), Marshalling.toXMLRPC(bondSlaveOf), Marshalling.toXMLRPC(VLANMasterOf), Marshalling.toXMLRPC(management), Marshalling.toXMLRPC(otherConfig), Marshalling.toXMLRPC(disallowUnplug), Marshalling.toXMLRPC(ipv6ConfigurationMode), Marshalling.toXMLRPC(IPv6), Marshalling.toXMLRPC(ipv6Gateway), Marshalling.toXMLRPC(primaryAddressType), Marshalling.toXMLRPC(managed)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPIF(result); + return Types.toPIF(result); } /** @@ -1334,9 +1338,9 @@ public class PIF extends XenAPIObject { * @return Task */ public Task dbForgetAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.PIF.db_forget"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1350,9 +1354,9 @@ public class PIF extends XenAPIObject { * */ public void dbForget(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.db_forget"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1366,15 +1370,15 @@ public class PIF extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfPIF(result); + return Types.toSetOfPIF(result); } /** @@ -1383,15 +1387,15 @@ public class PIF extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfPIFPIFRecord(result); + return Types.toMapOfPIFPIFRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/PIFMetrics.java b/deps/XenServerJava/src/com/xensource/xenapi/PIFMetrics.java index ab6268ee8f7..7d153931f0e 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/PIFMetrics.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/PIFMetrics.java @@ -1,19 +1,19 @@ /* * 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 @@ -28,6 +28,7 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ + package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -60,14 +61,14 @@ public class PIFMetrics extends XenAPIObject { * For internal use only. */ PIFMetrics(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -78,7 +79,7 @@ public class PIFMetrics extends XenAPIObject { { if (obj != null && obj instanceof PIFMetrics) { - PIFMetrics other = (PIFMetrics)obj; + PIFMetrics other = (PIFMetrics) obj; return other.ref.equals(this.ref); } else { @@ -118,8 +119,8 @@ public class PIFMetrics extends XenAPIObject { /** * Convert a PIF_metrics.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("io_read_kbs", this.ioReadKbs == null ? 0.0 : this.ioReadKbs); map.put("io_write_kbs", this.ioWriteKbs == null ? 0.0 : this.ioWriteKbs); @@ -196,15 +197,15 @@ public class PIFMetrics extends XenAPIObject { * @return all fields from the object */ public PIFMetrics.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF_metrics.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPIFMetricsRecord(result); + return Types.toPIFMetricsRecord(result); } /** @@ -214,15 +215,15 @@ public class PIFMetrics extends XenAPIObject { * @return reference to the object */ public static PIFMetrics getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF_metrics.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPIFMetrics(result); + return Types.toPIFMetrics(result); } /** @@ -231,15 +232,15 @@ public class PIFMetrics extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF_metrics.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -248,15 +249,15 @@ public class PIFMetrics extends XenAPIObject { * @return value of the field */ public Double getIoReadKbs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF_metrics.get_io_read_kbs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDouble(result); + return Types.toDouble(result); } /** @@ -265,15 +266,15 @@ public class PIFMetrics extends XenAPIObject { * @return value of the field */ public Double getIoWriteKbs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF_metrics.get_io_write_kbs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDouble(result); + return Types.toDouble(result); } /** @@ -282,15 +283,15 @@ public class PIFMetrics extends XenAPIObject { * @return value of the field */ public Boolean getCarrier(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF_metrics.get_carrier"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -299,15 +300,15 @@ public class PIFMetrics extends XenAPIObject { * @return value of the field */ public String getVendorId(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF_metrics.get_vendor_id"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -316,15 +317,15 @@ public class PIFMetrics extends XenAPIObject { * @return value of the field */ public String getVendorName(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF_metrics.get_vendor_name"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -333,15 +334,15 @@ public class PIFMetrics extends XenAPIObject { * @return value of the field */ public String getDeviceId(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF_metrics.get_device_id"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -350,15 +351,15 @@ public class PIFMetrics extends XenAPIObject { * @return value of the field */ public String getDeviceName(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF_metrics.get_device_name"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -367,15 +368,15 @@ public class PIFMetrics extends XenAPIObject { * @return value of the field */ public Long getSpeed(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF_metrics.get_speed"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -384,15 +385,15 @@ public class PIFMetrics extends XenAPIObject { * @return value of the field */ public Boolean getDuplex(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF_metrics.get_duplex"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -401,15 +402,15 @@ public class PIFMetrics extends XenAPIObject { * @return value of the field */ public String getPciBusPath(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF_metrics.get_pci_bus_path"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -418,15 +419,15 @@ public class PIFMetrics extends XenAPIObject { * @return value of the field */ public Date getLastUpdated(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF_metrics.get_last_updated"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDate(result); + return Types.toDate(result); } /** @@ -435,15 +436,15 @@ public class PIFMetrics extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF_metrics.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -452,9 +453,9 @@ public class PIFMetrics extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF_metrics.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -469,9 +470,9 @@ public class PIFMetrics extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF_metrics.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -485,9 +486,9 @@ public class PIFMetrics extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF_metrics.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -501,15 +502,15 @@ public class PIFMetrics extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF_metrics.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfPIFMetrics(result); + return Types.toSetOfPIFMetrics(result); } /** @@ -518,15 +519,15 @@ public class PIFMetrics extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF_metrics.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfPIFMetricsPIFMetricsRecord(result); + return Types.toMapOfPIFMetricsPIFMetricsRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/Pool.java b/deps/XenServerJava/src/com/xensource/xenapi/Pool.java index 7ceebb02d56..8b5c94db04a 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/Pool.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/Pool.java @@ -1,19 +1,19 @@ /* * 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 @@ -28,6 +28,7 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ + package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -60,14 +61,14 @@ public class Pool extends XenAPIObject { * For internal use only. */ Pool(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -78,7 +79,7 @@ public class Pool extends XenAPIObject { { if (obj != null && obj instanceof Pool) { - Pool other = (Pool)obj; + Pool other = (Pool) obj; return other.ref.equals(this.ref); } else { @@ -132,8 +133,8 @@ public class Pool extends XenAPIObject { /** * Convert a pool.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("name_label", this.nameLabel == null ? "" : this.nameLabel); map.put("name_description", this.nameDescription == null ? "" : this.nameDescription); @@ -280,15 +281,15 @@ public class Pool extends XenAPIObject { * @return all fields from the object */ public Pool.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPoolRecord(result); + return Types.toPoolRecord(result); } /** @@ -298,15 +299,15 @@ public class Pool extends XenAPIObject { * @return reference to the object */ public static Pool getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPool(result); + return Types.toPool(result); } /** @@ -315,15 +316,15 @@ public class Pool extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -332,15 +333,15 @@ public class Pool extends XenAPIObject { * @return value of the field */ public String getNameLabel(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -349,15 +350,15 @@ public class Pool extends XenAPIObject { * @return value of the field */ public String getNameDescription(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_name_description"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -366,15 +367,15 @@ public class Pool extends XenAPIObject { * @return value of the field */ public Host getMaster(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_master"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toHost(result); + return Types.toHost(result); } /** @@ -383,15 +384,15 @@ public class Pool extends XenAPIObject { * @return value of the field */ public SR getDefaultSR(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_default_SR"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSR(result); + return Types.toSR(result); } /** @@ -400,15 +401,15 @@ public class Pool extends XenAPIObject { * @return value of the field */ public SR getSuspendImageSR(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_suspend_image_SR"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSR(result); + return Types.toSR(result); } /** @@ -417,15 +418,15 @@ public class Pool extends XenAPIObject { * @return value of the field */ public SR getCrashDumpSR(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_crash_dump_SR"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSR(result); + return Types.toSR(result); } /** @@ -434,15 +435,15 @@ public class Pool extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -451,15 +452,15 @@ public class Pool extends XenAPIObject { * @return value of the field */ public Boolean getHaEnabled(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_ha_enabled"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -468,15 +469,15 @@ public class Pool extends XenAPIObject { * @return value of the field */ public Map getHaConfiguration(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_ha_configuration"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -485,15 +486,15 @@ public class Pool extends XenAPIObject { * @return value of the field */ public Set getHaStatefiles(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_ha_statefiles"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -502,15 +503,15 @@ public class Pool extends XenAPIObject { * @return value of the field */ public Long getHaHostFailuresToTolerate(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_ha_host_failures_to_tolerate"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -519,15 +520,15 @@ public class Pool extends XenAPIObject { * @return value of the field */ public Long getHaPlanExistsFor(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_ha_plan_exists_for"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -536,15 +537,15 @@ public class Pool extends XenAPIObject { * @return value of the field */ public Boolean getHaAllowOvercommit(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_ha_allow_overcommit"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -553,15 +554,15 @@ public class Pool extends XenAPIObject { * @return value of the field */ public Boolean getHaOvercommitted(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_ha_overcommitted"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -570,15 +571,15 @@ public class Pool extends XenAPIObject { * @return value of the field */ public Map getBlobs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_blobs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringBlob(result); + return Types.toMapOfStringBlob(result); } /** @@ -587,15 +588,15 @@ public class Pool extends XenAPIObject { * @return value of the field */ public Set getTags(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_tags"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -604,15 +605,15 @@ public class Pool extends XenAPIObject { * @return value of the field */ public Map getGuiConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_gui_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -621,15 +622,15 @@ public class Pool extends XenAPIObject { * @return value of the field */ public String getWlbUrl(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_wlb_url"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -638,15 +639,15 @@ public class Pool extends XenAPIObject { * @return value of the field */ public String getWlbUsername(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_wlb_username"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -655,15 +656,15 @@ public class Pool extends XenAPIObject { * @return value of the field */ public Boolean getWlbEnabled(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_wlb_enabled"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -672,15 +673,15 @@ public class Pool extends XenAPIObject { * @return value of the field */ public Boolean getWlbVerifyCert(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_wlb_verify_cert"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -689,15 +690,15 @@ public class Pool extends XenAPIObject { * @return value of the field */ public Boolean getRedoLogEnabled(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_redo_log_enabled"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -706,15 +707,15 @@ public class Pool extends XenAPIObject { * @return value of the field */ public VDI getRedoLogVdi(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_redo_log_vdi"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVDI(result); + return Types.toVDI(result); } /** @@ -723,15 +724,15 @@ public class Pool extends XenAPIObject { * @return value of the field */ public String getVswitchController(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_vswitch_controller"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -740,15 +741,15 @@ public class Pool extends XenAPIObject { * @return value of the field */ public Map getRestrictions(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_restrictions"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -757,15 +758,15 @@ public class Pool extends XenAPIObject { * @return value of the field */ public Set getMetadataVDIs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_metadata_VDIs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVDI(result); + return Types.toSetOfVDI(result); } /** @@ -774,9 +775,9 @@ public class Pool extends XenAPIObject { * @param nameLabel New value to set */ public void setNameLabel(Connection c, String nameLabel) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.set_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(nameLabel)}; @@ -790,9 +791,9 @@ public class Pool extends XenAPIObject { * @param nameDescription New value to set */ public void setNameDescription(Connection c, String nameDescription) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.set_name_description"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(nameDescription)}; @@ -806,9 +807,9 @@ public class Pool extends XenAPIObject { * @param defaultSR New value to set */ public void setDefaultSR(Connection c, SR defaultSR) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.set_default_SR"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(defaultSR)}; @@ -822,9 +823,9 @@ public class Pool extends XenAPIObject { * @param suspendImageSR New value to set */ public void setSuspendImageSR(Connection c, SR suspendImageSR) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.set_suspend_image_SR"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(suspendImageSR)}; @@ -838,9 +839,9 @@ public class Pool extends XenAPIObject { * @param crashDumpSR New value to set */ public void setCrashDumpSR(Connection c, SR crashDumpSR) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.set_crash_dump_SR"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(crashDumpSR)}; @@ -854,9 +855,9 @@ public class Pool extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -871,9 +872,9 @@ public class Pool extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -887,9 +888,9 @@ public class Pool extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -903,9 +904,9 @@ public class Pool extends XenAPIObject { * @param haAllowOvercommit New value to set */ public void setHaAllowOvercommit(Connection c, Boolean haAllowOvercommit) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.set_ha_allow_overcommit"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(haAllowOvercommit)}; @@ -919,9 +920,9 @@ public class Pool extends XenAPIObject { * @param tags New value to set */ public void setTags(Connection c, Set tags) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.set_tags"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(tags)}; @@ -935,9 +936,9 @@ public class Pool extends XenAPIObject { * @param value New value to add */ public void addTags(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.add_tags"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -951,9 +952,9 @@ public class Pool extends XenAPIObject { * @param value Value to remove */ public void removeTags(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.remove_tags"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -967,9 +968,9 @@ public class Pool extends XenAPIObject { * @param guiConfig New value to set */ public void setGuiConfig(Connection c, Map guiConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.set_gui_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(guiConfig)}; @@ -984,9 +985,9 @@ public class Pool extends XenAPIObject { * @param value Value to add */ public void addToGuiConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.add_to_gui_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -1000,9 +1001,9 @@ public class Pool extends XenAPIObject { * @param key Key to remove */ public void removeFromGuiConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.remove_from_gui_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -1016,9 +1017,9 @@ public class Pool extends XenAPIObject { * @param wlbEnabled New value to set */ public void setWlbEnabled(Connection c, Boolean wlbEnabled) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.set_wlb_enabled"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(wlbEnabled)}; @@ -1032,9 +1033,9 @@ public class Pool extends XenAPIObject { * @param wlbVerifyCert New value to set */ public void setWlbVerifyCert(Connection c, Boolean wlbVerifyCert) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.set_wlb_verify_cert"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(wlbVerifyCert)}; @@ -1051,14 +1052,13 @@ public class Pool extends XenAPIObject { * @return Task */ public static Task joinAsync(Connection c, String masterAddress, String masterUsername, String masterPassword) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.JoiningHostCannotContainSharedSrs { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.JoiningHostCannotContainSharedSrs { String method_call = "Async.pool.join"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(masterAddress), Marshalling.toXMLRPC(masterUsername), - Marshalling.toXMLRPC(masterPassword)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(masterAddress), Marshalling.toXMLRPC(masterUsername), Marshalling.toXMLRPC(masterPassword)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); @@ -1072,14 +1072,13 @@ public class Pool extends XenAPIObject { * @param masterPassword The password for the master (for initial authentication) */ public static void join(Connection c, String masterAddress, String masterUsername, String masterPassword) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.JoiningHostCannotContainSharedSrs { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.JoiningHostCannotContainSharedSrs { String method_call = "pool.join"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(masterAddress), Marshalling.toXMLRPC(masterUsername), - Marshalling.toXMLRPC(masterPassword)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(masterAddress), Marshalling.toXMLRPC(masterUsername), Marshalling.toXMLRPC(masterPassword)}; Map response = c.dispatch(method_call, method_params); return; } @@ -1093,13 +1092,12 @@ public class Pool extends XenAPIObject { * @return Task */ public static Task joinForceAsync(Connection c, String masterAddress, String masterUsername, String masterPassword) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool.join_force"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(masterAddress), Marshalling.toXMLRPC(masterUsername), - Marshalling.toXMLRPC(masterPassword)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(masterAddress), Marshalling.toXMLRPC(masterUsername), Marshalling.toXMLRPC(masterPassword)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); @@ -1113,13 +1111,12 @@ public class Pool extends XenAPIObject { * @param masterPassword The password for the master (for initial authentication) */ public static void joinForce(Connection c, String masterAddress, String masterUsername, String masterPassword) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.join_force"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(masterAddress), Marshalling.toXMLRPC(masterUsername), - Marshalling.toXMLRPC(masterPassword)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(masterAddress), Marshalling.toXMLRPC(masterUsername), Marshalling.toXMLRPC(masterPassword)}; Map response = c.dispatch(method_call, method_params); return; } @@ -1131,9 +1128,9 @@ public class Pool extends XenAPIObject { * @return Task */ public static Task ejectAsync(Connection c, Host host) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool.eject"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host)}; @@ -1148,9 +1145,9 @@ public class Pool extends XenAPIObject { * @param host The host to eject */ public static void eject(Connection c, Host host) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.eject"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host)}; @@ -1163,9 +1160,9 @@ public class Pool extends XenAPIObject { * */ public static void emergencyTransitionToMaster(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.emergency_transition_to_master"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; @@ -1179,9 +1176,9 @@ public class Pool extends XenAPIObject { * @param masterAddress The hostname of the master */ public static void emergencyResetMaster(Connection c, String masterAddress) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.emergency_reset_master"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(masterAddress)}; @@ -1195,9 +1192,9 @@ public class Pool extends XenAPIObject { * @return Task */ public static Task recoverSlavesAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool.recover_slaves"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; @@ -1212,15 +1209,15 @@ public class Pool extends XenAPIObject { * @return list of hosts whose master address were succesfully reset */ public static Set recoverSlaves(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.recover_slaves"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfHost(result); + return Types.toSetOfHost(result); } /** @@ -1232,10 +1229,10 @@ public class Pool extends XenAPIObject { * @return Task */ public static Task createVLANAsync(Connection c, String device, Network network, Long VLAN) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VlanTagInvalid { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VlanTagInvalid { String method_call = "Async.pool.create_VLAN"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(device), Marshalling.toXMLRPC(network), Marshalling.toXMLRPC(VLAN)}; @@ -1253,16 +1250,16 @@ public class Pool extends XenAPIObject { * @return The references of the created PIF objects */ public static Set createVLAN(Connection c, String device, Network network, Long VLAN) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VlanTagInvalid { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VlanTagInvalid { String method_call = "pool.create_VLAN"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(device), Marshalling.toXMLRPC(network), Marshalling.toXMLRPC(VLAN)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfPIF(result); + return Types.toSetOfPIF(result); } /** @@ -1274,10 +1271,10 @@ public class Pool extends XenAPIObject { * @return Task */ public static Task createVLANFromPIFAsync(Connection c, PIF pif, Network network, Long VLAN) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VlanTagInvalid { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VlanTagInvalid { String method_call = "Async.pool.create_VLAN_from_PIF"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(pif), Marshalling.toXMLRPC(network), Marshalling.toXMLRPC(VLAN)}; @@ -1295,16 +1292,16 @@ public class Pool extends XenAPIObject { * @return The references of the created PIF objects */ public static Set createVLANFromPIF(Connection c, PIF pif, Network network, Long VLAN) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VlanTagInvalid { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VlanTagInvalid { String method_call = "pool.create_VLAN_from_PIF"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(pif), Marshalling.toXMLRPC(network), Marshalling.toXMLRPC(VLAN)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfPIF(result); + return Types.toSetOfPIF(result); } /** @@ -1315,9 +1312,9 @@ public class Pool extends XenAPIObject { * @return Task */ public static Task enableHaAsync(Connection c, Set heartbeatSrs, Map configuration) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool.enable_ha"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(heartbeatSrs), Marshalling.toXMLRPC(configuration)}; @@ -1333,9 +1330,9 @@ public class Pool extends XenAPIObject { * @param configuration Detailed HA configuration to apply */ public static void enableHa(Connection c, Set heartbeatSrs, Map configuration) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.enable_ha"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(heartbeatSrs), Marshalling.toXMLRPC(configuration)}; @@ -1349,9 +1346,9 @@ public class Pool extends XenAPIObject { * @return Task */ public static Task disableHaAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool.disable_ha"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; @@ -1365,9 +1362,9 @@ public class Pool extends XenAPIObject { * */ public static void disableHa(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.disable_ha"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; @@ -1381,9 +1378,9 @@ public class Pool extends XenAPIObject { * @return Task */ public static Task syncDatabaseAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool.sync_database"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; @@ -1397,9 +1394,9 @@ public class Pool extends XenAPIObject { * */ public static void syncDatabase(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.sync_database"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; @@ -1414,9 +1411,9 @@ public class Pool extends XenAPIObject { * @return Task */ public static Task designateNewMasterAsync(Connection c, Host host) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool.designate_new_master"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host)}; @@ -1431,9 +1428,9 @@ public class Pool extends XenAPIObject { * @param host The host who should become the new master */ public static void designateNewMaster(Connection c, Host host) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.designate_new_master"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host)}; @@ -1447,9 +1444,9 @@ public class Pool extends XenAPIObject { * @param seconds The number of seconds to block the restart thread for */ public static void haPreventRestartsFor(Connection c, Long seconds) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.ha_prevent_restarts_for"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(seconds)}; @@ -1464,15 +1461,15 @@ public class Pool extends XenAPIObject { * @return true if a failover plan exists for the supplied number of host failures */ public static Boolean haFailoverPlanExists(Connection c, Long n) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.ha_failover_plan_exists"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(n)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -1481,15 +1478,15 @@ public class Pool extends XenAPIObject { * @return maximum value for ha_host_failures_to_tolerate given current configuration */ public static Long haComputeMaxHostFailuresToTolerate(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.ha_compute_max_host_failures_to_tolerate"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -1499,15 +1496,15 @@ public class Pool extends XenAPIObject { * @return maximum value for ha_host_failures_to_tolerate given provided configuration */ public static Long haComputeHypotheticalMaxHostFailuresToTolerate(Connection c, Map configuration) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.ha_compute_hypothetical_max_host_failures_to_tolerate"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(configuration)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -1518,15 +1515,15 @@ public class Pool extends XenAPIObject { * @return VM failover plan: a map of VM to host to restart the host on */ public static Map> haComputeVmFailoverPlan(Connection c, Set failedHosts, Set failedVms) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.ha_compute_vm_failover_plan"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(failedHosts), Marshalling.toXMLRPC(failedVms)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfVMMapOfStringString(result); + return Types.toMapOfVMMapOfStringString(result); } /** @@ -1536,9 +1533,9 @@ public class Pool extends XenAPIObject { * @return Task */ public Task setHaHostFailuresToTolerateAsync(Connection c, Long value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool.set_ha_host_failures_to_tolerate"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1553,9 +1550,9 @@ public class Pool extends XenAPIObject { * @param value New number of host failures to consider */ public void setHaHostFailuresToTolerate(Connection c, Long value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.set_ha_host_failures_to_tolerate"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1572,13 +1569,12 @@ public class Pool extends XenAPIObject { * @return Task */ public Task createNewBlobAsync(Connection c, String name, String mimeType, Boolean _public) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool.create_new_blob"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(mimeType), - Marshalling.toXMLRPC(_public)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(mimeType), Marshalling.toXMLRPC(_public)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); @@ -1593,16 +1589,15 @@ public class Pool extends XenAPIObject { * @return The reference of the blob, needed for populating its data */ public Blob createNewBlob(Connection c, String name, String mimeType, Boolean _public) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.create_new_blob"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(mimeType), - Marshalling.toXMLRPC(_public)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(mimeType), Marshalling.toXMLRPC(_public)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBlob(result); + return Types.toBlob(result); } /** @@ -1613,13 +1608,12 @@ public class Pool extends XenAPIObject { * @param authType The type of authentication (e.g. AD for Active Directory) */ public void enableExternalAuth(Connection c, Map config, String serviceName, String authType) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.enable_external_auth"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(config), Marshalling.toXMLRPC(serviceName), - Marshalling.toXMLRPC(authType)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(config), Marshalling.toXMLRPC(serviceName), Marshalling.toXMLRPC(authType)}; Map response = c.dispatch(method_call, method_params); return; } @@ -1630,9 +1624,9 @@ public class Pool extends XenAPIObject { * @param config Optional parameters as a list of key-values containing the configuration data */ public void disableExternalAuth(Connection c, Map config) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.disable_external_auth"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(config)}; @@ -1645,9 +1639,9 @@ public class Pool extends XenAPIObject { * */ public void detectNonhomogeneousExternalAuth(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.detect_nonhomogeneous_external_auth"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1666,13 +1660,12 @@ public class Pool extends XenAPIObject { * @return Task */ public static Task initializeWlbAsync(Connection c, String wlbUrl, String wlbUsername, String wlbPassword, String xenserverUsername, String xenserverPassword) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool.initialize_wlb"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(wlbUrl), Marshalling.toXMLRPC(wlbUsername), Marshalling.toXMLRPC(wlbPassword), - Marshalling.toXMLRPC(xenserverUsername), Marshalling.toXMLRPC(xenserverPassword)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(wlbUrl), Marshalling.toXMLRPC(wlbUsername), Marshalling.toXMLRPC(wlbPassword), Marshalling.toXMLRPC(xenserverUsername), Marshalling.toXMLRPC(xenserverPassword)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); @@ -1688,13 +1681,12 @@ public class Pool extends XenAPIObject { * @param xenserverPassword The password used by the wlb server to authenticate with the xenserver */ public static void initializeWlb(Connection c, String wlbUrl, String wlbUsername, String wlbPassword, String xenserverUsername, String xenserverPassword) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.initialize_wlb"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(wlbUrl), Marshalling.toXMLRPC(wlbUsername), Marshalling.toXMLRPC(wlbPassword), - Marshalling.toXMLRPC(xenserverUsername), Marshalling.toXMLRPC(xenserverPassword)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(wlbUrl), Marshalling.toXMLRPC(wlbUsername), Marshalling.toXMLRPC(wlbPassword), Marshalling.toXMLRPC(xenserverUsername), Marshalling.toXMLRPC(xenserverPassword)}; Map response = c.dispatch(method_call, method_params); return; } @@ -1705,9 +1697,9 @@ public class Pool extends XenAPIObject { * @return Task */ public static Task deconfigureWlbAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool.deconfigure_wlb"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; @@ -1721,9 +1713,9 @@ public class Pool extends XenAPIObject { * */ public static void deconfigureWlb(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.deconfigure_wlb"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; @@ -1738,9 +1730,9 @@ public class Pool extends XenAPIObject { * @return Task */ public static Task sendWlbConfigurationAsync(Connection c, Map config) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool.send_wlb_configuration"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(config)}; @@ -1755,9 +1747,9 @@ public class Pool extends XenAPIObject { * @param config The configuration to use in optimizing this pool */ public static void sendWlbConfiguration(Connection c, Map config) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.send_wlb_configuration"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(config)}; @@ -1771,9 +1763,9 @@ public class Pool extends XenAPIObject { * @return Task */ public static Task retrieveWlbConfigurationAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool.retrieve_wlb_configuration"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; @@ -1788,15 +1780,15 @@ public class Pool extends XenAPIObject { * @return The configuration used in optimizing this pool */ public static Map retrieveWlbConfiguration(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.retrieve_wlb_configuration"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -1805,9 +1797,9 @@ public class Pool extends XenAPIObject { * @return Task */ public static Task retrieveWlbRecommendationsAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool.retrieve_wlb_recommendations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; @@ -1822,29 +1814,29 @@ public class Pool extends XenAPIObject { * @return The list of vm migration recommendations */ public static Map> retrieveWlbRecommendations(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.retrieve_wlb_recommendations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfVMSetOfString(result); + return Types.toMapOfVMSetOfString(result); } /** * Send the given body to the given host and port, using HTTPS, and print the response. This is used for debugging the SSL layer. * - * @param host - * @param port - * @param body + * @param host + * @param port + * @param body * @return Task */ public static Task sendTestPostAsync(Connection c, String host, Long port, String body) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool.send_test_post"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(port), Marshalling.toXMLRPC(body)}; @@ -1856,21 +1848,21 @@ public class Pool extends XenAPIObject { /** * Send the given body to the given host and port, using HTTPS, and print the response. This is used for debugging the SSL layer. * - * @param host - * @param port - * @param body + * @param host + * @param port + * @param body * @return The response */ public static String sendTestPost(Connection c, String host, Long port, String body) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.send_test_post"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(port), Marshalling.toXMLRPC(body)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -1881,9 +1873,9 @@ public class Pool extends XenAPIObject { * @return Task */ public static Task certificateInstallAsync(Connection c, String name, String cert) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool.certificate_install"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(cert)}; @@ -1899,9 +1891,9 @@ public class Pool extends XenAPIObject { * @param cert The certificate */ public static void certificateInstall(Connection c, String name, String cert) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.certificate_install"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(cert)}; @@ -1916,9 +1908,9 @@ public class Pool extends XenAPIObject { * @return Task */ public static Task certificateUninstallAsync(Connection c, String name) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool.certificate_uninstall"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(name)}; @@ -1933,9 +1925,9 @@ public class Pool extends XenAPIObject { * @param name The certificate name */ public static void certificateUninstall(Connection c, String name) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.certificate_uninstall"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(name)}; @@ -1949,9 +1941,9 @@ public class Pool extends XenAPIObject { * @return Task */ public static Task certificateListAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool.certificate_list"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; @@ -1966,15 +1958,15 @@ public class Pool extends XenAPIObject { * @return All installed certificates */ public static Set certificateList(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.certificate_list"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -1985,9 +1977,9 @@ public class Pool extends XenAPIObject { * @return Task */ public static Task crlInstallAsync(Connection c, String name, String cert) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool.crl_install"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(cert)}; @@ -2003,9 +1995,9 @@ public class Pool extends XenAPIObject { * @param cert The CRL */ public static void crlInstall(Connection c, String name, String cert) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.crl_install"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(cert)}; @@ -2020,9 +2012,9 @@ public class Pool extends XenAPIObject { * @return Task */ public static Task crlUninstallAsync(Connection c, String name) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool.crl_uninstall"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(name)}; @@ -2037,9 +2029,9 @@ public class Pool extends XenAPIObject { * @param name The CRL name */ public static void crlUninstall(Connection c, String name) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.crl_uninstall"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(name)}; @@ -2053,9 +2045,9 @@ public class Pool extends XenAPIObject { * @return Task */ public static Task crlListAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool.crl_list"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; @@ -2070,15 +2062,15 @@ public class Pool extends XenAPIObject { * @return All installed CRLs */ public static Set crlList(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.crl_list"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -2087,9 +2079,9 @@ public class Pool extends XenAPIObject { * @return Task */ public static Task certificateSyncAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool.certificate_sync"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; @@ -2103,9 +2095,9 @@ public class Pool extends XenAPIObject { * */ public static void certificateSync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.certificate_sync"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; @@ -2120,9 +2112,9 @@ public class Pool extends XenAPIObject { * @return Task */ public static Task enableRedoLogAsync(Connection c, SR sr) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool.enable_redo_log"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(sr)}; @@ -2137,9 +2129,9 @@ public class Pool extends XenAPIObject { * @param sr SR to hold the redo log. */ public static void enableRedoLog(Connection c, SR sr) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.enable_redo_log"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(sr)}; @@ -2153,9 +2145,9 @@ public class Pool extends XenAPIObject { * @return Task */ public static Task disableRedoLogAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool.disable_redo_log"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; @@ -2169,9 +2161,9 @@ public class Pool extends XenAPIObject { * */ public static void disableRedoLog(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.disable_redo_log"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; @@ -2186,9 +2178,9 @@ public class Pool extends XenAPIObject { * @return Task */ public static Task setVswitchControllerAsync(Connection c, String address) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool.set_vswitch_controller"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(address)}; @@ -2203,9 +2195,9 @@ public class Pool extends XenAPIObject { * @param address IP address of the vswitch controller. */ public static void setVswitchController(Connection c, String address) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.set_vswitch_controller"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(address)}; @@ -2220,15 +2212,15 @@ public class Pool extends XenAPIObject { * @return An XMLRPC result */ public String testArchiveTarget(Connection c, Map config) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.test_archive_target"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(config)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -2237,9 +2229,9 @@ public class Pool extends XenAPIObject { * @return Task */ public Task enableLocalStorageCachingAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool.enable_local_storage_caching"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -2253,9 +2245,9 @@ public class Pool extends XenAPIObject { * */ public void enableLocalStorageCaching(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.enable_local_storage_caching"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -2269,9 +2261,9 @@ public class Pool extends XenAPIObject { * @return Task */ public Task disableLocalStorageCachingAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool.disable_local_storage_caching"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -2285,9 +2277,9 @@ public class Pool extends XenAPIObject { * */ public void disableLocalStorageCaching(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.disable_local_storage_caching"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -2295,21 +2287,89 @@ public class Pool extends XenAPIObject { return; } + /** + * This call returns the license state for the pool + * + * @return Task + */ + public Task getLicenseStateAsync(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { + String method_call = "Async.pool.get_license_state"; + String session = c.getSessionReference(); + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; + Map response = c.dispatch(method_call, method_params); + Object result = response.get("Value"); + return Types.toTask(result); + } + + /** + * This call returns the license state for the pool + * + * @return The pool's license state + */ + public Map getLicenseState(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { + String method_call = "pool.get_license_state"; + String session = c.getSessionReference(); + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; + Map response = c.dispatch(method_call, method_params); + Object result = response.get("Value"); + return Types.toMapOfStringString(result); + } + + /** + * Apply an edition to all hosts in the pool + * + * @param edition The requested edition + * @return Task + */ + public Task applyEditionAsync(Connection c, String edition) throws + BadServerResponse, + XenAPIException, + XmlRpcException { + String method_call = "Async.pool.apply_edition"; + String session = c.getSessionReference(); + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(edition)}; + Map response = c.dispatch(method_call, method_params); + Object result = response.get("Value"); + return Types.toTask(result); + } + + /** + * Apply an edition to all hosts in the pool + * + * @param edition The requested edition + */ + public void applyEdition(Connection c, String edition) throws + BadServerResponse, + XenAPIException, + XmlRpcException { + String method_call = "pool.apply_edition"; + String session = c.getSessionReference(); + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(edition)}; + Map response = c.dispatch(method_call, method_params); + return; + } + /** * Return a list of all the pools known to the system. * * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfPool(result); + return Types.toSetOfPool(result); } /** @@ -2318,15 +2378,15 @@ public class Pool extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfPoolPoolRecord(result); + return Types.toMapOfPoolPoolRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/PoolPatch.java b/deps/XenServerJava/src/com/xensource/xenapi/PoolPatch.java index 7361bc7da0e..99ac7e8d660 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/PoolPatch.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/PoolPatch.java @@ -1,19 +1,19 @@ /* * 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 @@ -28,6 +28,7 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ + package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -60,14 +61,14 @@ public class PoolPatch extends XenAPIObject { * For internal use only. */ PoolPatch(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -78,7 +79,7 @@ public class PoolPatch extends XenAPIObject { { if (obj != null && obj instanceof PoolPatch) { - PoolPatch other = (PoolPatch)obj; + PoolPatch other = (PoolPatch) obj; return other.ref.equals(this.ref); } else { @@ -114,8 +115,8 @@ public class PoolPatch extends XenAPIObject { /** * Convert a pool_patch.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("name_label", this.nameLabel == null ? "" : this.nameLabel); map.put("name_description", this.nameDescription == null ? "" : this.nameDescription); @@ -172,15 +173,15 @@ public class PoolPatch extends XenAPIObject { * @return all fields from the object */ public PoolPatch.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool_patch.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPoolPatchRecord(result); + return Types.toPoolPatchRecord(result); } /** @@ -190,15 +191,15 @@ public class PoolPatch extends XenAPIObject { * @return reference to the object */ public static PoolPatch getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool_patch.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPoolPatch(result); + return Types.toPoolPatch(result); } /** @@ -208,15 +209,15 @@ public class PoolPatch extends XenAPIObject { * @return references to objects with matching names */ public static Set getByNameLabel(Connection c, String label) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool_patch.get_by_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(label)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfPoolPatch(result); + return Types.toSetOfPoolPatch(result); } /** @@ -225,15 +226,15 @@ public class PoolPatch extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool_patch.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -242,15 +243,15 @@ public class PoolPatch extends XenAPIObject { * @return value of the field */ public String getNameLabel(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool_patch.get_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -259,15 +260,15 @@ public class PoolPatch extends XenAPIObject { * @return value of the field */ public String getNameDescription(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool_patch.get_name_description"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -276,15 +277,15 @@ public class PoolPatch extends XenAPIObject { * @return value of the field */ public String getVersion(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool_patch.get_version"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -293,15 +294,15 @@ public class PoolPatch extends XenAPIObject { * @return value of the field */ public Long getSize(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool_patch.get_size"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -310,15 +311,15 @@ public class PoolPatch extends XenAPIObject { * @return value of the field */ public Boolean getPoolApplied(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool_patch.get_pool_applied"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -327,15 +328,15 @@ public class PoolPatch extends XenAPIObject { * @return value of the field */ public Set getHostPatches(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool_patch.get_host_patches"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfHostPatch(result); + return Types.toSetOfHostPatch(result); } /** @@ -344,15 +345,15 @@ public class PoolPatch extends XenAPIObject { * @return value of the field */ public Set getAfterApplyGuidance(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool_patch.get_after_apply_guidance"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfAfterApplyGuidance(result); + return Types.toSetOfAfterApplyGuidance(result); } /** @@ -361,15 +362,15 @@ public class PoolPatch extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool_patch.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -378,9 +379,9 @@ public class PoolPatch extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool_patch.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -395,9 +396,9 @@ public class PoolPatch extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool_patch.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -411,9 +412,9 @@ public class PoolPatch extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool_patch.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -428,9 +429,9 @@ public class PoolPatch extends XenAPIObject { * @return Task */ public Task applyAsync(Connection c, Host host) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool_patch.apply"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(host)}; @@ -446,15 +447,15 @@ public class PoolPatch extends XenAPIObject { * @return the output of the patch application process */ public String apply(Connection c, Host host) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool_patch.apply"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(host)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -463,9 +464,9 @@ public class PoolPatch extends XenAPIObject { * @return Task */ public Task poolApplyAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool_patch.pool_apply"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -479,9 +480,9 @@ public class PoolPatch extends XenAPIObject { * */ public void poolApply(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool_patch.pool_apply"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -496,9 +497,9 @@ public class PoolPatch extends XenAPIObject { * @return Task */ public Task precheckAsync(Connection c, Host host) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool_patch.precheck"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(host)}; @@ -514,15 +515,15 @@ public class PoolPatch extends XenAPIObject { * @return the output of the patch prechecks */ public String precheck(Connection c, Host host) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool_patch.precheck"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(host)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -531,9 +532,9 @@ public class PoolPatch extends XenAPIObject { * @return Task */ public Task cleanAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool_patch.clean"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -547,9 +548,9 @@ public class PoolPatch extends XenAPIObject { * */ public void clean(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool_patch.clean"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -563,9 +564,9 @@ public class PoolPatch extends XenAPIObject { * @return Task */ public Task poolCleanAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool_patch.pool_clean"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -579,9 +580,9 @@ public class PoolPatch extends XenAPIObject { * */ public void poolClean(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool_patch.pool_clean"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -595,9 +596,9 @@ public class PoolPatch extends XenAPIObject { * @return Task */ public Task destroyAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool_patch.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -611,9 +612,9 @@ public class PoolPatch extends XenAPIObject { * */ public void destroy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool_patch.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -628,9 +629,9 @@ public class PoolPatch extends XenAPIObject { * @return Task */ public Task cleanOnHostAsync(Connection c, Host host) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool_patch.clean_on_host"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(host)}; @@ -645,9 +646,9 @@ public class PoolPatch extends XenAPIObject { * @param host The host on which to clean the patch */ public void cleanOnHost(Connection c, Host host) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool_patch.clean_on_host"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(host)}; @@ -661,15 +662,15 @@ public class PoolPatch extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool_patch.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfPoolPatch(result); + return Types.toSetOfPoolPatch(result); } /** @@ -678,15 +679,15 @@ public class PoolPatch extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool_patch.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfPoolPatchPoolPatchRecord(result); + return Types.toMapOfPoolPatchPoolPatchRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/Role.java b/deps/XenServerJava/src/com/xensource/xenapi/Role.java index 5808b13cdb2..c9eaeaa932a 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/Role.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/Role.java @@ -1,19 +1,19 @@ /* * 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 @@ -28,6 +28,7 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ + package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -60,14 +61,14 @@ public class Role extends XenAPIObject { * For internal use only. */ Role(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -78,7 +79,7 @@ public class Role extends XenAPIObject { { if (obj != null && obj instanceof Role) { - Role other = (Role)obj; + Role other = (Role) obj; return other.ref.equals(this.ref); } else { @@ -109,8 +110,8 @@ public class Role extends XenAPIObject { /** * Convert a role.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("name_label", this.nameLabel == null ? "" : this.nameLabel); map.put("name_description", this.nameDescription == null ? "" : this.nameDescription); @@ -142,15 +143,15 @@ public class Role extends XenAPIObject { * @return all fields from the object */ public Role.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "role.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toRoleRecord(result); + return Types.toRoleRecord(result); } /** @@ -160,15 +161,15 @@ public class Role extends XenAPIObject { * @return reference to the object */ public static Role getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "role.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toRole(result); + return Types.toRole(result); } /** @@ -178,15 +179,15 @@ public class Role extends XenAPIObject { * @return references to objects with matching names */ public static Set getByNameLabel(Connection c, String label) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "role.get_by_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(label)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfRole(result); + return Types.toSetOfRole(result); } /** @@ -195,15 +196,15 @@ public class Role extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "role.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -212,15 +213,15 @@ public class Role extends XenAPIObject { * @return value of the field */ public String getNameLabel(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "role.get_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -229,15 +230,15 @@ public class Role extends XenAPIObject { * @return value of the field */ public String getNameDescription(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "role.get_name_description"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -246,15 +247,15 @@ public class Role extends XenAPIObject { * @return value of the field */ public Set getSubroles(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "role.get_subroles"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfRole(result); + return Types.toSetOfRole(result); } /** @@ -263,15 +264,15 @@ public class Role extends XenAPIObject { * @return a list of permissions */ public Set getPermissions(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "role.get_permissions"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfRole(result); + return Types.toSetOfRole(result); } /** @@ -280,15 +281,15 @@ public class Role extends XenAPIObject { * @return a list of permission names */ public Set getPermissionsNameLabel(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "role.get_permissions_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -297,15 +298,15 @@ public class Role extends XenAPIObject { * @return a list of references to roles */ public Set getByPermission(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "role.get_by_permission"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfRole(result); + return Types.toSetOfRole(result); } /** @@ -315,15 +316,15 @@ public class Role extends XenAPIObject { * @return a list of references to roles */ public static Set getByPermissionNameLabel(Connection c, String label) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "role.get_by_permission_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(label)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfRole(result); + return Types.toSetOfRole(result); } /** @@ -332,15 +333,15 @@ public class Role extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "role.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfRole(result); + return Types.toSetOfRole(result); } /** @@ -349,15 +350,15 @@ public class Role extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "role.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfRoleRoleRecord(result); + return Types.toMapOfRoleRoleRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/SM.java b/deps/XenServerJava/src/com/xensource/xenapi/SM.java index 0ec362694b6..6950fcd16b6 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/SM.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/SM.java @@ -1,19 +1,19 @@ /* * 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 @@ -28,6 +28,7 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ + package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -60,14 +61,14 @@ public class SM extends XenAPIObject { * For internal use only. */ SM(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -78,7 +79,7 @@ public class SM extends XenAPIObject { { if (obj != null && obj instanceof SM) { - SM other = (SM)obj; + SM other = (SM) obj; return other.ref.equals(this.ref); } else { @@ -109,6 +110,7 @@ public class SM extends XenAPIObject { print.printf("%1$20s: %2$s\n", "requiredApiVersion", this.requiredApiVersion); print.printf("%1$20s: %2$s\n", "configuration", this.configuration); print.printf("%1$20s: %2$s\n", "capabilities", this.capabilities); + print.printf("%1$20s: %2$s\n", "features", this.features); print.printf("%1$20s: %2$s\n", "otherConfig", this.otherConfig); print.printf("%1$20s: %2$s\n", "driverFilename", this.driverFilename); return writer.toString(); @@ -117,8 +119,8 @@ public class SM extends XenAPIObject { /** * Convert a SM.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("name_label", this.nameLabel == null ? "" : this.nameLabel); map.put("name_description", this.nameDescription == null ? "" : this.nameDescription); @@ -129,6 +131,7 @@ public class SM extends XenAPIObject { map.put("required_api_version", this.requiredApiVersion == null ? "" : this.requiredApiVersion); map.put("configuration", this.configuration == null ? new HashMap() : this.configuration); map.put("capabilities", this.capabilities == null ? new LinkedHashSet() : this.capabilities); + map.put("features", this.features == null ? new HashMap() : this.features); map.put("other_config", this.otherConfig == null ? new HashMap() : this.otherConfig); map.put("driver_filename", this.driverFilename == null ? "" : this.driverFilename); return map; @@ -174,6 +177,10 @@ public class SM extends XenAPIObject { * capabilities of the SM plugin */ public Set capabilities; + /** + * capabilities of the SM plugin, with capability version numbers + */ + public Map features; /** * additional configuration */ @@ -190,15 +197,15 @@ public class SM extends XenAPIObject { * @return all fields from the object */ public SM.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SM.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSMRecord(result); + return Types.toSMRecord(result); } /** @@ -208,15 +215,15 @@ public class SM extends XenAPIObject { * @return reference to the object */ public static SM getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SM.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSM(result); + return Types.toSM(result); } /** @@ -226,15 +233,15 @@ public class SM extends XenAPIObject { * @return references to objects with matching names */ public static Set getByNameLabel(Connection c, String label) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SM.get_by_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(label)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfSM(result); + return Types.toSetOfSM(result); } /** @@ -243,15 +250,15 @@ public class SM extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SM.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -260,15 +267,15 @@ public class SM extends XenAPIObject { * @return value of the field */ public String getNameLabel(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SM.get_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -277,15 +284,15 @@ public class SM extends XenAPIObject { * @return value of the field */ public String getNameDescription(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SM.get_name_description"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -294,15 +301,15 @@ public class SM extends XenAPIObject { * @return value of the field */ public String getType(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SM.get_type"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -311,15 +318,15 @@ public class SM extends XenAPIObject { * @return value of the field */ public String getVendor(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SM.get_vendor"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -328,15 +335,15 @@ public class SM extends XenAPIObject { * @return value of the field */ public String getCopyright(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SM.get_copyright"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -345,15 +352,15 @@ public class SM extends XenAPIObject { * @return value of the field */ public String getVersion(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SM.get_version"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -362,15 +369,15 @@ public class SM extends XenAPIObject { * @return value of the field */ public String getRequiredApiVersion(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SM.get_required_api_version"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -379,32 +386,50 @@ public class SM extends XenAPIObject { * @return value of the field */ public Map getConfiguration(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SM.get_configuration"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** * Get the capabilities field of the given SM. + * @deprecated * * @return value of the field */ - public Set getCapabilities(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + @Deprecated public Set getCapabilities(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SM.get_capabilities"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); + } + + /** + * Get the features field of the given SM. + * + * @return value of the field + */ + public Map getFeatures(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { + String method_call = "SM.get_features"; + String session = c.getSessionReference(); + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; + Map response = c.dispatch(method_call, method_params); + Object result = response.get("Value"); + return Types.toMapOfStringLong(result); } /** @@ -413,15 +438,15 @@ public class SM extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SM.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -430,15 +455,15 @@ public class SM extends XenAPIObject { * @return value of the field */ public String getDriverFilename(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SM.get_driver_filename"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -447,9 +472,9 @@ public class SM extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SM.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -464,9 +489,9 @@ public class SM extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SM.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -480,9 +505,9 @@ public class SM extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SM.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -496,15 +521,15 @@ public class SM extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SM.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfSM(result); + return Types.toSetOfSM(result); } /** @@ -513,15 +538,15 @@ public class SM extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SM.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfSMSMRecord(result); + return Types.toMapOfSMSMRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/SR.java b/deps/XenServerJava/src/com/xensource/xenapi/SR.java index db6770fbe8f..899915859f3 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/SR.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/SR.java @@ -1,19 +1,19 @@ /* * 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 @@ -28,6 +28,7 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ + package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -60,14 +61,14 @@ public class SR extends XenAPIObject { * For internal use only. */ SR(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -78,7 +79,7 @@ public class SR extends XenAPIObject { { if (obj != null && obj instanceof SR) { - SR other = (SR)obj; + SR other = (SR) obj; return other.ref.equals(this.ref); } else { @@ -124,8 +125,8 @@ public class SR extends XenAPIObject { /** * Convert a SR.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("name_label", this.nameLabel == null ? "" : this.nameLabel); map.put("name_description", this.nameDescription == null ? "" : this.nameDescription); @@ -232,15 +233,15 @@ public class SR extends XenAPIObject { * @return all fields from the object */ public SR.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSRRecord(result); + return Types.toSRRecord(result); } /** @@ -250,15 +251,15 @@ public class SR extends XenAPIObject { * @return reference to the object */ public static SR getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSR(result); + return Types.toSR(result); } /** @@ -268,15 +269,15 @@ public class SR extends XenAPIObject { * @return references to objects with matching names */ public static Set getByNameLabel(Connection c, String label) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.get_by_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(label)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfSR(result); + return Types.toSetOfSR(result); } /** @@ -285,15 +286,15 @@ public class SR extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -302,15 +303,15 @@ public class SR extends XenAPIObject { * @return value of the field */ public String getNameLabel(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.get_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -319,15 +320,15 @@ public class SR extends XenAPIObject { * @return value of the field */ public String getNameDescription(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.get_name_description"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -336,15 +337,15 @@ public class SR extends XenAPIObject { * @return value of the field */ public Set getAllowedOperations(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.get_allowed_operations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfStorageOperations(result); + return Types.toSetOfStorageOperations(result); } /** @@ -353,15 +354,15 @@ public class SR extends XenAPIObject { * @return value of the field */ public Map getCurrentOperations(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.get_current_operations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringStorageOperations(result); + return Types.toMapOfStringStorageOperations(result); } /** @@ -370,15 +371,15 @@ public class SR extends XenAPIObject { * @return value of the field */ public Set getVDIs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.get_VDIs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVDI(result); + return Types.toSetOfVDI(result); } /** @@ -387,15 +388,15 @@ public class SR extends XenAPIObject { * @return value of the field */ public Set getPBDs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.get_PBDs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfPBD(result); + return Types.toSetOfPBD(result); } /** @@ -404,15 +405,15 @@ public class SR extends XenAPIObject { * @return value of the field */ public Long getVirtualAllocation(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.get_virtual_allocation"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -421,15 +422,15 @@ public class SR extends XenAPIObject { * @return value of the field */ public Long getPhysicalUtilisation(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.get_physical_utilisation"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -438,15 +439,15 @@ public class SR extends XenAPIObject { * @return value of the field */ public Long getPhysicalSize(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.get_physical_size"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -455,15 +456,15 @@ public class SR extends XenAPIObject { * @return value of the field */ public String getType(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.get_type"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -472,15 +473,15 @@ public class SR extends XenAPIObject { * @return value of the field */ public String getContentType(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.get_content_type"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -489,15 +490,15 @@ public class SR extends XenAPIObject { * @return value of the field */ public Boolean getShared(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.get_shared"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -506,15 +507,15 @@ public class SR extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -523,15 +524,15 @@ public class SR extends XenAPIObject { * @return value of the field */ public Set getTags(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.get_tags"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -540,15 +541,15 @@ public class SR extends XenAPIObject { * @return value of the field */ public Map getSmConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.get_sm_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -557,15 +558,15 @@ public class SR extends XenAPIObject { * @return value of the field */ public Map getBlobs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.get_blobs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringBlob(result); + return Types.toMapOfStringBlob(result); } /** @@ -574,15 +575,15 @@ public class SR extends XenAPIObject { * @return value of the field */ public Boolean getLocalCacheEnabled(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.get_local_cache_enabled"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -591,15 +592,15 @@ public class SR extends XenAPIObject { * @return value of the field */ public DRTask getIntroducedBy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.get_introduced_by"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDRTask(result); + return Types.toDRTask(result); } /** @@ -608,9 +609,9 @@ public class SR extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -625,9 +626,9 @@ public class SR extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -641,9 +642,9 @@ public class SR extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -657,9 +658,9 @@ public class SR extends XenAPIObject { * @param tags New value to set */ public void setTags(Connection c, Set tags) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.set_tags"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(tags)}; @@ -673,9 +674,9 @@ public class SR extends XenAPIObject { * @param value New value to add */ public void addTags(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.add_tags"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -689,9 +690,9 @@ public class SR extends XenAPIObject { * @param value Value to remove */ public void removeTags(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.remove_tags"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -705,9 +706,9 @@ public class SR extends XenAPIObject { * @param smConfig New value to set */ public void setSmConfig(Connection c, Map smConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.set_sm_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(smConfig)}; @@ -722,9 +723,9 @@ public class SR extends XenAPIObject { * @param value Value to add */ public void addToSmConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.add_to_sm_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -738,9 +739,9 @@ public class SR extends XenAPIObject { * @param key Key to remove */ public void removeFromSmConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.remove_from_sm_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -762,52 +763,14 @@ public class SR extends XenAPIObject { * @param smConfig Storage backend specific configuration options * @return Task */ - public static Task createAsync(Connection c, Host host, Map deviceConfig, Long physicalSize, String nameLabel, String nameDescription, String type, - String contentType, Boolean shared, Map smConfig) throws - BadServerResponse, - VersionException, - XenAPIException, - XmlRpcException, - Types.SrUnknownDriver { - - if (c.rioConnection) { - if (smConfig.isEmpty()) { - return rioCreateAsync(c, host, deviceConfig, physicalSize, nameLabel, nameDescription, type, contentType, shared); - } else { - throw new Types.VersionException("smConfig parameter must be empty map for Rio (legacy XenServer) host"); - } - } else { - return miamiCreateAsync(c, host, deviceConfig, physicalSize, nameLabel, nameDescription, type, contentType, shared, smConfig); - } - } - - private static Task rioCreateAsync(Connection c, Host host, Map deviceConfig, Long physicalSize, String nameLabel, String nameDescription, - String type, String contentType, Boolean shared) throws - BadServerResponse, - XmlRpcException, - XenAPIException, - Types.SrUnknownDriver { + public static Task createAsync(Connection c, Host host, Map deviceConfig, Long physicalSize, String nameLabel, String nameDescription, String type, String contentType, Boolean shared, Map smConfig) throws + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.SrUnknownDriver { String method_call = "Async.SR.create"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(deviceConfig), Marshalling.toXMLRPC(physicalSize), - Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(contentType), - Marshalling.toXMLRPC(shared)}; - Map response = c.dispatch(method_call, method_params); - Object result = response.get("Value"); - return Types.toTask(result); - } - - private static Task miamiCreateAsync(Connection c, Host host, Map deviceConfig, Long physicalSize, String nameLabel, String nameDescription, - String type, String contentType, Boolean shared, Map smConfig) throws - BadServerResponse, - XmlRpcException, - XenAPIException, - Types.SrUnknownDriver { - String method_call = "Async.SR.create"; - String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(deviceConfig), Marshalling.toXMLRPC(physicalSize), - Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(contentType), - Marshalling.toXMLRPC(shared), Marshalling.toXMLRPC(smConfig)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(deviceConfig), Marshalling.toXMLRPC(physicalSize), Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(contentType), Marshalling.toXMLRPC(shared), Marshalling.toXMLRPC(smConfig)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); @@ -827,55 +790,17 @@ public class SR extends XenAPIObject { * @param smConfig Storage backend specific configuration options * @return The reference of the newly created Storage Repository. */ - public static SR create(Connection c, Host host, Map deviceConfig, Long physicalSize, String nameLabel, String nameDescription, String type, - String contentType, Boolean shared, Map smConfig) throws - BadServerResponse, - VersionException, - XenAPIException, - XmlRpcException, - Types.SrUnknownDriver { - - if (c.rioConnection) { - if (smConfig.isEmpty()) { - return rioCreate(c, host, deviceConfig, physicalSize, nameLabel, nameDescription, type, contentType, shared); - } else { - throw new Types.VersionException("smConfig parameter must be empty map for Rio (legacy XenServer) host"); - } - } else { - return miamiCreate(c, host, deviceConfig, physicalSize, nameLabel, nameDescription, type, contentType, shared, smConfig); - } - } - - private static SR rioCreate(Connection c, Host host, Map deviceConfig, Long physicalSize, String nameLabel, String nameDescription, String type, - String contentType, Boolean shared) throws - BadServerResponse, - XmlRpcException, - XenAPIException, - Types.SrUnknownDriver { + public static SR create(Connection c, Host host, Map deviceConfig, Long physicalSize, String nameLabel, String nameDescription, String type, String contentType, Boolean shared, Map smConfig) throws + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.SrUnknownDriver { String method_call = "SR.create"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(deviceConfig), Marshalling.toXMLRPC(physicalSize), - Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(contentType), - Marshalling.toXMLRPC(shared)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(deviceConfig), Marshalling.toXMLRPC(physicalSize), Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(contentType), Marshalling.toXMLRPC(shared), Marshalling.toXMLRPC(smConfig)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSR(result); - } - - private static SR miamiCreate(Connection c, Host host, Map deviceConfig, Long physicalSize, String nameLabel, String nameDescription, String type, - String contentType, Boolean shared, Map smConfig) throws - BadServerResponse, - XmlRpcException, - XenAPIException, - Types.SrUnknownDriver { - String method_call = "SR.create"; - String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(deviceConfig), Marshalling.toXMLRPC(physicalSize), - Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(contentType), - Marshalling.toXMLRPC(shared), Marshalling.toXMLRPC(smConfig)}; - Map response = c.dispatch(method_call, method_params); - Object result = response.get("Value"); - return Types.toSR(result); + return Types.toSR(result); } /** @@ -890,46 +815,13 @@ public class SR extends XenAPIObject { * @param smConfig Storage backend specific configuration options * @return Task */ - public static Task introduceAsync(Connection c, String uuid, String nameLabel, String nameDescription, String type, String contentType, Boolean shared, - Map smConfig) throws - BadServerResponse, - VersionException, - XenAPIException, - XmlRpcException { - - if (c.rioConnection) { - if (smConfig.isEmpty()) { - return rioIntroduceAsync(c, uuid, nameLabel, nameDescription, type, contentType, shared); - } else { - throw new Types.VersionException("smConfig parameter must be empty map for Rio (legacy XenServer) host"); - } - } else { - return miamiIntroduceAsync(c, uuid, nameLabel, nameDescription, type, contentType, shared, smConfig); - } - } - - private static Task rioIntroduceAsync(Connection c, String uuid, String nameLabel, String nameDescription, String type, String contentType, Boolean shared) throws - BadServerResponse, - XmlRpcException, - XenAPIException { + public static Task introduceAsync(Connection c, String uuid, String nameLabel, String nameDescription, String type, String contentType, Boolean shared, Map smConfig) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.SR.introduce"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid), Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), - Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(contentType), Marshalling.toXMLRPC(shared)}; - Map response = c.dispatch(method_call, method_params); - Object result = response.get("Value"); - return Types.toTask(result); - } - - private static Task miamiIntroduceAsync(Connection c, String uuid, String nameLabel, String nameDescription, String type, String contentType, Boolean shared, - Map smConfig) throws - BadServerResponse, - XmlRpcException, - XenAPIException { - String method_call = "Async.SR.introduce"; - String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid), Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), - Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(contentType), Marshalling.toXMLRPC(shared), Marshalling.toXMLRPC(smConfig)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid), Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(contentType), Marshalling.toXMLRPC(shared), Marshalling.toXMLRPC(smConfig)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); @@ -947,49 +839,16 @@ public class SR extends XenAPIObject { * @param smConfig Storage backend specific configuration options * @return The reference of the newly introduced Storage Repository. */ - public static SR introduce(Connection c, String uuid, String nameLabel, String nameDescription, String type, String contentType, Boolean shared, - Map smConfig) throws - BadServerResponse, - VersionException, - XenAPIException, - XmlRpcException { - - if (c.rioConnection) { - if (smConfig.isEmpty()) { - return rioIntroduce(c, uuid, nameLabel, nameDescription, type, contentType, shared); - } else { - throw new Types.VersionException("smConfig parameter must be empty map for Rio (legacy XenServer) host"); - } - } else { - return miamiIntroduce(c, uuid, nameLabel, nameDescription, type, contentType, shared, smConfig); - } - } - - private static SR rioIntroduce(Connection c, String uuid, String nameLabel, String nameDescription, String type, String contentType, Boolean shared) throws - BadServerResponse, - XmlRpcException, - XenAPIException { + public static SR introduce(Connection c, String uuid, String nameLabel, String nameDescription, String type, String contentType, Boolean shared, Map smConfig) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.introduce"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid), Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), - Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(contentType), Marshalling.toXMLRPC(shared)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid), Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(contentType), Marshalling.toXMLRPC(shared), Marshalling.toXMLRPC(smConfig)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSR(result); - } - - private static SR miamiIntroduce(Connection c, String uuid, String nameLabel, String nameDescription, String type, String contentType, Boolean shared, - Map smConfig) throws - BadServerResponse, - XmlRpcException, - XenAPIException { - String method_call = "SR.introduce"; - String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid), Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), - Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(contentType), Marshalling.toXMLRPC(shared), Marshalling.toXMLRPC(smConfig)}; - Map response = c.dispatch(method_call, method_params); - Object result = response.get("Value"); - return Types.toSR(result); + return Types.toSR(result); } /** @@ -1006,51 +865,13 @@ public class SR extends XenAPIObject { * @param smConfig Storage backend specific configuration options * @return Task */ - @Deprecated - public static Task makeAsync(Connection c, Host host, Map deviceConfig, Long physicalSize, String nameLabel, String nameDescription, String type, - String contentType, Map smConfig) throws - BadServerResponse, - VersionException, - XenAPIException, - XmlRpcException { - - if (c.rioConnection) { - if (smConfig.isEmpty()) { - return rioMakeAsync(c, host, deviceConfig, physicalSize, nameLabel, nameDescription, type, contentType); - } else { - throw new Types.VersionException("smConfig parameter must be empty map for Rio (legacy XenServer) host"); - } - } else { - return miamiMakeAsync(c, host, deviceConfig, physicalSize, nameLabel, nameDescription, type, contentType, smConfig); - } - } - - @Deprecated - private static Task rioMakeAsync(Connection c, Host host, Map deviceConfig, Long physicalSize, String nameLabel, String nameDescription, String type, - String contentType) throws - BadServerResponse, - XmlRpcException, - XenAPIException { + @Deprecated public static Task makeAsync(Connection c, Host host, Map deviceConfig, Long physicalSize, String nameLabel, String nameDescription, String type, String contentType, Map smConfig) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.SR.make"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(deviceConfig), Marshalling.toXMLRPC(physicalSize), - Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(contentType)}; - Map response = c.dispatch(method_call, method_params); - Object result = response.get("Value"); - return Types.toTask(result); - } - - @Deprecated - private static Task miamiMakeAsync(Connection c, Host host, Map deviceConfig, Long physicalSize, String nameLabel, String nameDescription, - String type, String contentType, Map smConfig) throws - BadServerResponse, - XmlRpcException, - XenAPIException { - String method_call = "Async.SR.make"; - String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(deviceConfig), Marshalling.toXMLRPC(physicalSize), - Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(contentType), - Marshalling.toXMLRPC(smConfig)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(deviceConfig), Marshalling.toXMLRPC(physicalSize), Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(contentType), Marshalling.toXMLRPC(smConfig)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); @@ -1070,54 +891,16 @@ public class SR extends XenAPIObject { * @param smConfig Storage backend specific configuration options * @return The uuid of the newly created Storage Repository. */ - @Deprecated - public static String make(Connection c, Host host, Map deviceConfig, Long physicalSize, String nameLabel, String nameDescription, String type, - String contentType, Map smConfig) throws - BadServerResponse, - VersionException, - XenAPIException, - XmlRpcException { - - if (c.rioConnection) { - if (smConfig.isEmpty()) { - return rioMake(c, host, deviceConfig, physicalSize, nameLabel, nameDescription, type, contentType); - } else { - throw new Types.VersionException("smConfig parameter must be empty map for Rio (legacy XenServer) host"); - } - } else { - return miamiMake(c, host, deviceConfig, physicalSize, nameLabel, nameDescription, type, contentType, smConfig); - } - } - - @Deprecated - private static String rioMake(Connection c, Host host, Map deviceConfig, Long physicalSize, String nameLabel, String nameDescription, String type, - String contentType) throws - BadServerResponse, - XmlRpcException, - XenAPIException { + @Deprecated public static String make(Connection c, Host host, Map deviceConfig, Long physicalSize, String nameLabel, String nameDescription, String type, String contentType, Map smConfig) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.make"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(deviceConfig), Marshalling.toXMLRPC(physicalSize), - Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(contentType)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(deviceConfig), Marshalling.toXMLRPC(physicalSize), Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(contentType), Marshalling.toXMLRPC(smConfig)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); - } - - @Deprecated - private static String miamiMake(Connection c, Host host, Map deviceConfig, Long physicalSize, String nameLabel, String nameDescription, String type, - String contentType, Map smConfig) throws - BadServerResponse, - XmlRpcException, - XenAPIException { - String method_call = "SR.make"; - String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(deviceConfig), Marshalling.toXMLRPC(physicalSize), - Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(contentType), - Marshalling.toXMLRPC(smConfig)}; - Map response = c.dispatch(method_call, method_params); - Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -1126,10 +909,10 @@ public class SR extends XenAPIObject { * @return Task */ public Task destroyAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.SrHasPbd { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.SrHasPbd { String method_call = "Async.SR.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1143,10 +926,10 @@ public class SR extends XenAPIObject { * */ public void destroy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.SrHasPbd { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.SrHasPbd { String method_call = "SR.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1160,10 +943,10 @@ public class SR extends XenAPIObject { * @return Task */ public Task forgetAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.SrHasPbd { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.SrHasPbd { String method_call = "Async.SR.forget"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1177,10 +960,10 @@ public class SR extends XenAPIObject { * */ public void forget(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.SrHasPbd { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.SrHasPbd { String method_call = "SR.forget"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1194,9 +977,9 @@ public class SR extends XenAPIObject { * @return Task */ public Task updateAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.SR.update"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1210,9 +993,9 @@ public class SR extends XenAPIObject { * */ public void update(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.update"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1226,15 +1009,15 @@ public class SR extends XenAPIObject { * @return the supported SR types */ public static Set getSupportedTypes(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.get_supported_types"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -1243,9 +1026,9 @@ public class SR extends XenAPIObject { * @return Task */ public Task scanAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.SR.scan"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1259,9 +1042,9 @@ public class SR extends XenAPIObject { * */ public void scan(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.scan"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1279,13 +1062,12 @@ public class SR extends XenAPIObject { * @return Task */ public static Task probeAsync(Connection c, Host host, Map deviceConfig, String type, Map smConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.SR.probe"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(deviceConfig), Marshalling.toXMLRPC(type), - Marshalling.toXMLRPC(smConfig)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(deviceConfig), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(smConfig)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); @@ -1301,16 +1083,15 @@ public class SR extends XenAPIObject { * @return An XML fragment containing the scan results. These are specific to the scan being performed, and the backend. */ public static String probe(Connection c, Host host, Map deviceConfig, String type, Map smConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.probe"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(deviceConfig), Marshalling.toXMLRPC(type), - Marshalling.toXMLRPC(smConfig)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(deviceConfig), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(smConfig)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -1320,9 +1101,9 @@ public class SR extends XenAPIObject { * @return Task */ public Task setSharedAsync(Connection c, Boolean value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.SR.set_shared"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1337,9 +1118,9 @@ public class SR extends XenAPIObject { * @param value True if the SR is shared */ public void setShared(Connection c, Boolean value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.set_shared"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1354,9 +1135,9 @@ public class SR extends XenAPIObject { * @return Task */ public Task setNameLabelAsync(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.SR.set_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1371,9 +1152,9 @@ public class SR extends XenAPIObject { * @param value The name label for the SR */ public void setNameLabel(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.set_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1388,9 +1169,9 @@ public class SR extends XenAPIObject { * @return Task */ public Task setNameDescriptionAsync(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.SR.set_name_description"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1405,9 +1186,9 @@ public class SR extends XenAPIObject { * @param value The name description for the SR */ public void setNameDescription(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.set_name_description"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1424,13 +1205,12 @@ public class SR extends XenAPIObject { * @return Task */ public Task createNewBlobAsync(Connection c, String name, String mimeType, Boolean _public) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.SR.create_new_blob"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(mimeType), - Marshalling.toXMLRPC(_public)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(mimeType), Marshalling.toXMLRPC(_public)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); @@ -1445,16 +1225,15 @@ public class SR extends XenAPIObject { * @return The reference of the blob, needed for populating its data */ public Blob createNewBlob(Connection c, String name, String mimeType, Boolean _public) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.create_new_blob"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(mimeType), - Marshalling.toXMLRPC(_public)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(mimeType), Marshalling.toXMLRPC(_public)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBlob(result); + return Types.toBlob(result); } /** @@ -1463,9 +1242,9 @@ public class SR extends XenAPIObject { * @param value The new value of the SR's physical_size */ public void setPhysicalSize(Connection c, Long value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.set_physical_size"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1479,9 +1258,9 @@ public class SR extends XenAPIObject { * @param value The new value of the SR's virtual_allocation */ public void setVirtualAllocation(Connection c, Long value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.set_virtual_allocation"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1495,9 +1274,9 @@ public class SR extends XenAPIObject { * @param value The new value of the SR's physical utilisation */ public void setPhysicalUtilisation(Connection c, Long value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.set_physical_utilisation"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1511,9 +1290,9 @@ public class SR extends XenAPIObject { * @return Task */ public Task assertCanHostHaStatefileAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.SR.assert_can_host_ha_statefile"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1527,9 +1306,9 @@ public class SR extends XenAPIObject { * */ public void assertCanHostHaStatefile(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.assert_can_host_ha_statefile"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1543,9 +1322,9 @@ public class SR extends XenAPIObject { * @return Task */ public Task assertSupportsDatabaseReplicationAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.SR.assert_supports_database_replication"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1559,9 +1338,9 @@ public class SR extends XenAPIObject { * */ public void assertSupportsDatabaseReplication(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.assert_supports_database_replication"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1570,14 +1349,14 @@ public class SR extends XenAPIObject { } /** - * + * * * @return Task */ public Task enableDatabaseReplicationAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.SR.enable_database_replication"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1587,13 +1366,13 @@ public class SR extends XenAPIObject { } /** - * + * * */ public void enableDatabaseReplication(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.enable_database_replication"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1602,14 +1381,14 @@ public class SR extends XenAPIObject { } /** - * + * * * @return Task */ public Task disableDatabaseReplicationAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.SR.disable_database_replication"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1619,13 +1398,13 @@ public class SR extends XenAPIObject { } /** - * + * * */ public void disableDatabaseReplication(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.disable_database_replication"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1639,15 +1418,15 @@ public class SR extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfSR(result); + return Types.toSetOfSR(result); } /** @@ -1656,15 +1435,15 @@ public class SR extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfSRSRRecord(result); + return Types.toMapOfSRSRRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/Secret.java b/deps/XenServerJava/src/com/xensource/xenapi/Secret.java index 870725fda50..418bb883645 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/Secret.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/Secret.java @@ -1,19 +1,19 @@ /* * 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 @@ -28,6 +28,7 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ + package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -60,14 +61,14 @@ public class Secret extends XenAPIObject { * For internal use only. */ Secret(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -78,7 +79,7 @@ public class Secret extends XenAPIObject { { if (obj != null && obj instanceof Secret) { - Secret other = (Secret)obj; + Secret other = (Secret) obj; return other.ref.equals(this.ref); } else { @@ -108,8 +109,8 @@ public class Secret extends XenAPIObject { /** * Convert a secret.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("value", this.value == null ? "" : this.value); map.put("other_config", this.otherConfig == null ? new HashMap() : this.otherConfig); @@ -136,15 +137,15 @@ public class Secret extends XenAPIObject { * @return all fields from the object */ public Secret.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "secret.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSecretRecord(result); + return Types.toSecretRecord(result); } /** @@ -154,15 +155,15 @@ public class Secret extends XenAPIObject { * @return reference to the object */ public static Secret getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "secret.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSecret(result); + return Types.toSecret(result); } /** @@ -172,9 +173,9 @@ public class Secret extends XenAPIObject { * @return Task */ public static Task createAsync(Connection c, Secret.Record record) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.secret.create"; String session = c.getSessionReference(); Map record_map = record.toMap(); @@ -191,16 +192,16 @@ public class Secret extends XenAPIObject { * @return reference to the newly created object */ public static Secret create(Connection c, Secret.Record record) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "secret.create"; String session = c.getSessionReference(); Map record_map = record.toMap(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(record_map)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSecret(result); + return Types.toSecret(result); } /** @@ -209,9 +210,9 @@ public class Secret extends XenAPIObject { * @return Task */ public Task destroyAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.secret.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -225,9 +226,9 @@ public class Secret extends XenAPIObject { * */ public void destroy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "secret.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -241,15 +242,15 @@ public class Secret extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "secret.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -258,15 +259,15 @@ public class Secret extends XenAPIObject { * @return value of the field */ public String getValue(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "secret.get_value"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -275,15 +276,15 @@ public class Secret extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "secret.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -292,9 +293,9 @@ public class Secret extends XenAPIObject { * @param value New value to set */ public void setValue(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "secret.set_value"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -308,9 +309,9 @@ public class Secret extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "secret.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -325,9 +326,9 @@ public class Secret extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "secret.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -341,9 +342,9 @@ public class Secret extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "secret.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -357,15 +358,15 @@ public class Secret extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "secret.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfSecret(result); + return Types.toSetOfSecret(result); } /** @@ -374,15 +375,15 @@ public class Secret extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "secret.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfSecretSecretRecord(result); + return Types.toMapOfSecretSecretRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/Session.java b/deps/XenServerJava/src/com/xensource/xenapi/Session.java index bdf3b4cf80b..a00ab7dcfce 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/Session.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/Session.java @@ -1,19 +1,19 @@ /* * 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 @@ -28,6 +28,7 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ + package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -60,14 +61,14 @@ public class Session extends XenAPIObject { * For internal use only. */ Session(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -78,7 +79,7 @@ public class Session extends XenAPIObject { { if (obj != null && obj instanceof Session) { - Session other = (Session)obj; + Session other = (Session) obj; return other.ref.equals(this.ref); } else { @@ -119,8 +120,8 @@ public class Session extends XenAPIObject { /** * Convert a session.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("this_host", this.thisHost == null ? new Host("OpaqueRef:NULL") : this.thisHost); map.put("this_user", this.thisUser == null ? new User("OpaqueRef:NULL") : this.thisUser); @@ -202,15 +203,15 @@ public class Session extends XenAPIObject { * @return all fields from the object */ public Session.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "session.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSessionRecord(result); + return Types.toSessionRecord(result); } /** @@ -220,15 +221,15 @@ public class Session extends XenAPIObject { * @return reference to the object */ public static Session getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "session.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSession(result); + return Types.toSession(result); } /** @@ -237,15 +238,15 @@ public class Session extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "session.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -254,15 +255,15 @@ public class Session extends XenAPIObject { * @return value of the field */ public Host getThisHost(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "session.get_this_host"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toHost(result); + return Types.toHost(result); } /** @@ -271,15 +272,15 @@ public class Session extends XenAPIObject { * @return value of the field */ public User getThisUser(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "session.get_this_user"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toUser(result); + return Types.toUser(result); } /** @@ -288,15 +289,15 @@ public class Session extends XenAPIObject { * @return value of the field */ public Date getLastActive(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "session.get_last_active"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDate(result); + return Types.toDate(result); } /** @@ -305,15 +306,15 @@ public class Session extends XenAPIObject { * @return value of the field */ public Boolean getPool(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "session.get_pool"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -322,15 +323,15 @@ public class Session extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "session.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -339,15 +340,15 @@ public class Session extends XenAPIObject { * @return value of the field */ public Boolean getIsLocalSuperuser(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "session.get_is_local_superuser"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -356,15 +357,15 @@ public class Session extends XenAPIObject { * @return value of the field */ public Subject getSubject(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "session.get_subject"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSubject(result); + return Types.toSubject(result); } /** @@ -373,15 +374,15 @@ public class Session extends XenAPIObject { * @return value of the field */ public Date getValidationTime(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "session.get_validation_time"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDate(result); + return Types.toDate(result); } /** @@ -390,15 +391,15 @@ public class Session extends XenAPIObject { * @return value of the field */ public String getAuthUserSid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "session.get_auth_user_sid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -407,15 +408,15 @@ public class Session extends XenAPIObject { * @return value of the field */ public String getAuthUserName(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "session.get_auth_user_name"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -424,15 +425,15 @@ public class Session extends XenAPIObject { * @return value of the field */ public Set getRbacPermissions(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "session.get_rbac_permissions"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -441,15 +442,15 @@ public class Session extends XenAPIObject { * @return value of the field */ public Set getTasks(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "session.get_tasks"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfTask(result); + return Types.toSetOfTask(result); } /** @@ -458,15 +459,15 @@ public class Session extends XenAPIObject { * @return value of the field */ public Session getParent(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "session.get_parent"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSession(result); + return Types.toSession(result); } /** @@ -475,9 +476,9 @@ public class Session extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "session.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -492,9 +493,9 @@ public class Session extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "session.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -508,9 +509,9 @@ public class Session extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "session.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -527,15 +528,15 @@ public class Session extends XenAPIObject { * @return reference of newly created session */ public static Session loginWithPassword(Connection c, String uname, String pwd, String version) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.SessionAuthenticationFailed { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.SessionAuthenticationFailed { String method_call = "session.login_with_password"; Object[] method_params = {Marshalling.toXMLRPC(uname), Marshalling.toXMLRPC(pwd), Marshalling.toXMLRPC(version)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSession(result); + return Types.toSession(result); } /** @@ -543,9 +544,9 @@ public class Session extends XenAPIObject { * */ public static void logout(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "session.logout"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; @@ -560,9 +561,9 @@ public class Session extends XenAPIObject { * @param newPwd New password for account */ public static void changePassword(Connection c, String oldPwd, String newPwd) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "session.change_password"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(oldPwd), Marshalling.toXMLRPC(newPwd)}; @@ -578,14 +579,14 @@ public class Session extends XenAPIObject { * @return ID of newly created session */ public static Session slaveLocalLoginWithPassword(Connection c, String uname, String pwd) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "session.slave_local_login_with_password"; Object[] method_params = {Marshalling.toXMLRPC(uname), Marshalling.toXMLRPC(pwd)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSession(result); + return Types.toSession(result); } /** @@ -593,9 +594,9 @@ public class Session extends XenAPIObject { * */ public static void localLogout(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "session.local_logout"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; @@ -609,9 +610,9 @@ public class Session extends XenAPIObject { * @return Task */ public static Task getAllSubjectIdentifiersAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.session.get_all_subject_identifiers"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; @@ -626,15 +627,15 @@ public class Session extends XenAPIObject { * @return The list of user subject-identifiers of all existing sessions */ public static Set getAllSubjectIdentifiers(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "session.get_all_subject_identifiers"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -644,9 +645,9 @@ public class Session extends XenAPIObject { * @return Task */ public static Task logoutSubjectIdentifierAsync(Connection c, String subjectIdentifier) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.session.logout_subject_identifier"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(subjectIdentifier)}; @@ -661,9 +662,9 @@ public class Session extends XenAPIObject { * @param subjectIdentifier User subject-identifier of the sessions to be destroyed */ public static void logoutSubjectIdentifier(Connection c, String subjectIdentifier) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "session.logout_subject_identifier"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(subjectIdentifier)}; diff --git a/deps/XenServerJava/src/com/xensource/xenapi/Subject.java b/deps/XenServerJava/src/com/xensource/xenapi/Subject.java index a599f237be9..9a8fbfbd895 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/Subject.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/Subject.java @@ -1,19 +1,19 @@ /* * 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 @@ -28,6 +28,7 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ + package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -60,14 +61,14 @@ public class Subject extends XenAPIObject { * For internal use only. */ Subject(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -78,7 +79,7 @@ public class Subject extends XenAPIObject { { if (obj != null && obj instanceof Subject) { - Subject other = (Subject)obj; + Subject other = (Subject) obj; return other.ref.equals(this.ref); } else { @@ -109,8 +110,8 @@ public class Subject extends XenAPIObject { /** * Convert a subject.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("subject_identifier", this.subjectIdentifier == null ? "" : this.subjectIdentifier); map.put("other_config", this.otherConfig == null ? new HashMap() : this.otherConfig); @@ -142,15 +143,15 @@ public class Subject extends XenAPIObject { * @return all fields from the object */ public Subject.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "subject.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSubjectRecord(result); + return Types.toSubjectRecord(result); } /** @@ -160,15 +161,15 @@ public class Subject extends XenAPIObject { * @return reference to the object */ public static Subject getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "subject.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSubject(result); + return Types.toSubject(result); } /** @@ -178,9 +179,9 @@ public class Subject extends XenAPIObject { * @return Task */ public static Task createAsync(Connection c, Subject.Record record) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.subject.create"; String session = c.getSessionReference(); Map record_map = record.toMap(); @@ -197,16 +198,16 @@ public class Subject extends XenAPIObject { * @return reference to the newly created object */ public static Subject create(Connection c, Subject.Record record) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "subject.create"; String session = c.getSessionReference(); Map record_map = record.toMap(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(record_map)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSubject(result); + return Types.toSubject(result); } /** @@ -215,9 +216,9 @@ public class Subject extends XenAPIObject { * @return Task */ public Task destroyAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.subject.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -231,9 +232,9 @@ public class Subject extends XenAPIObject { * */ public void destroy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "subject.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -247,15 +248,15 @@ public class Subject extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "subject.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -264,15 +265,15 @@ public class Subject extends XenAPIObject { * @return value of the field */ public String getSubjectIdentifier(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "subject.get_subject_identifier"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -281,15 +282,15 @@ public class Subject extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "subject.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -298,15 +299,15 @@ public class Subject extends XenAPIObject { * @return value of the field */ public Set getRoles(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "subject.get_roles"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfRole(result); + return Types.toSetOfRole(result); } /** @@ -315,9 +316,9 @@ public class Subject extends XenAPIObject { * @param role The unique role reference */ public void addToRoles(Connection c, Role role) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "subject.add_to_roles"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(role)}; @@ -331,9 +332,9 @@ public class Subject extends XenAPIObject { * @param role The unique role reference in the subject's roles field */ public void removeFromRoles(Connection c, Role role) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "subject.remove_from_roles"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(role)}; @@ -347,15 +348,15 @@ public class Subject extends XenAPIObject { * @return a list of permission names */ public Set getPermissionsNameLabel(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "subject.get_permissions_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -364,15 +365,15 @@ public class Subject extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "subject.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfSubject(result); + return Types.toSetOfSubject(result); } /** @@ -381,15 +382,15 @@ public class Subject extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "subject.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfSubjectSubjectRecord(result); + return Types.toMapOfSubjectSubjectRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/Task.java b/deps/XenServerJava/src/com/xensource/xenapi/Task.java index 59d59f6131b..4a85dfedf60 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/Task.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/Task.java @@ -1,19 +1,19 @@ /* * 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 @@ -28,6 +28,7 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ + package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -60,14 +61,14 @@ public class Task extends XenAPIObject { * For internal use only. */ Task(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -78,7 +79,7 @@ public class Task extends XenAPIObject { { if (obj != null && obj instanceof Task) { - Task other = (Task)obj; + Task other = (Task) obj; return other.ref.equals(this.ref); } else { @@ -121,8 +122,8 @@ public class Task extends XenAPIObject { /** * Convert a task.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("name_label", this.nameLabel == null ? "" : this.nameLabel); map.put("name_description", this.nameDescription == null ? "" : this.nameDescription); @@ -214,15 +215,15 @@ public class Task extends XenAPIObject { * @return all fields from the object */ public Task.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "task.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toTaskRecord(result); + return Types.toTaskRecord(result); } /** @@ -232,15 +233,15 @@ public class Task extends XenAPIObject { * @return reference to the object */ public static Task getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "task.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toTask(result); + return Types.toTask(result); } /** @@ -250,15 +251,15 @@ public class Task extends XenAPIObject { * @return references to objects with matching names */ public static Set getByNameLabel(Connection c, String label) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "task.get_by_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(label)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfTask(result); + return Types.toSetOfTask(result); } /** @@ -267,15 +268,15 @@ public class Task extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "task.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -284,15 +285,15 @@ public class Task extends XenAPIObject { * @return value of the field */ public String getNameLabel(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "task.get_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -301,15 +302,15 @@ public class Task extends XenAPIObject { * @return value of the field */ public String getNameDescription(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "task.get_name_description"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -318,15 +319,15 @@ public class Task extends XenAPIObject { * @return value of the field */ public Set getAllowedOperations(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "task.get_allowed_operations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfTaskAllowedOperations(result); + return Types.toSetOfTaskAllowedOperations(result); } /** @@ -335,15 +336,15 @@ public class Task extends XenAPIObject { * @return value of the field */ public Map getCurrentOperations(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "task.get_current_operations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringTaskAllowedOperations(result); + return Types.toMapOfStringTaskAllowedOperations(result); } /** @@ -352,15 +353,15 @@ public class Task extends XenAPIObject { * @return value of the field */ public Date getCreated(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "task.get_created"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDate(result); + return Types.toDate(result); } /** @@ -369,15 +370,15 @@ public class Task extends XenAPIObject { * @return value of the field */ public Date getFinished(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "task.get_finished"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDate(result); + return Types.toDate(result); } /** @@ -386,15 +387,15 @@ public class Task extends XenAPIObject { * @return value of the field */ public Types.TaskStatusType getStatus(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "task.get_status"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toTaskStatusType(result); + return Types.toTaskStatusType(result); } /** @@ -403,15 +404,15 @@ public class Task extends XenAPIObject { * @return value of the field */ public Host getResidentOn(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "task.get_resident_on"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toHost(result); + return Types.toHost(result); } /** @@ -420,15 +421,15 @@ public class Task extends XenAPIObject { * @return value of the field */ public Double getProgress(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "task.get_progress"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDouble(result); + return Types.toDouble(result); } /** @@ -437,15 +438,15 @@ public class Task extends XenAPIObject { * @return value of the field */ public String getType(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "task.get_type"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -454,15 +455,15 @@ public class Task extends XenAPIObject { * @return value of the field */ public String getResult(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "task.get_result"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -471,15 +472,15 @@ public class Task extends XenAPIObject { * @return value of the field */ public Set getErrorInfo(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "task.get_error_info"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -488,15 +489,15 @@ public class Task extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "task.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -505,15 +506,15 @@ public class Task extends XenAPIObject { * @return value of the field */ public Task getSubtaskOf(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "task.get_subtask_of"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toTask(result); + return Types.toTask(result); } /** @@ -522,15 +523,15 @@ public class Task extends XenAPIObject { * @return value of the field */ public Set getSubtasks(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "task.get_subtasks"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfTask(result); + return Types.toSetOfTask(result); } /** @@ -539,9 +540,9 @@ public class Task extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "task.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -556,9 +557,9 @@ public class Task extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "task.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -572,9 +573,9 @@ public class Task extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "task.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -590,15 +591,15 @@ public class Task extends XenAPIObject { * @return The reference of the created task object */ public static Task create(Connection c, String label, String description) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "task.create"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(label), Marshalling.toXMLRPC(description)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toTask(result); + return Types.toTask(result); } /** @@ -606,9 +607,9 @@ public class Task extends XenAPIObject { * */ public void destroy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "task.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -622,10 +623,10 @@ public class Task extends XenAPIObject { * @return Task */ public Task cancelAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.OperationNotAllowed { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.OperationNotAllowed { String method_call = "Async.task.cancel"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -639,10 +640,10 @@ public class Task extends XenAPIObject { * */ public void cancel(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.OperationNotAllowed { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.OperationNotAllowed { String method_call = "task.cancel"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -656,15 +657,15 @@ public class Task extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "task.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfTask(result); + return Types.toSetOfTask(result); } /** @@ -673,15 +674,15 @@ public class Task extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "task.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfTaskTaskRecord(result); + return Types.toMapOfTaskTaskRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/Tunnel.java b/deps/XenServerJava/src/com/xensource/xenapi/Tunnel.java index 44b236df1b7..e30bd0a9d7e 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/Tunnel.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/Tunnel.java @@ -1,19 +1,19 @@ /* * 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 @@ -28,6 +28,7 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ + package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -60,14 +61,14 @@ public class Tunnel extends XenAPIObject { * For internal use only. */ Tunnel(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -78,7 +79,7 @@ public class Tunnel extends XenAPIObject { { if (obj != null && obj instanceof Tunnel) { - Tunnel other = (Tunnel)obj; + Tunnel other = (Tunnel) obj; return other.ref.equals(this.ref); } else { @@ -110,8 +111,8 @@ public class Tunnel extends XenAPIObject { /** * Convert a tunnel.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("access_PIF", this.accessPIF == null ? new PIF("OpaqueRef:NULL") : this.accessPIF); map.put("transport_PIF", this.transportPIF == null ? new PIF("OpaqueRef:NULL") : this.transportPIF); @@ -148,15 +149,15 @@ public class Tunnel extends XenAPIObject { * @return all fields from the object */ public Tunnel.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "tunnel.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toTunnelRecord(result); + return Types.toTunnelRecord(result); } /** @@ -166,15 +167,15 @@ public class Tunnel extends XenAPIObject { * @return reference to the object */ public static Tunnel getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "tunnel.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toTunnel(result); + return Types.toTunnel(result); } /** @@ -183,15 +184,15 @@ public class Tunnel extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "tunnel.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -200,15 +201,15 @@ public class Tunnel extends XenAPIObject { * @return value of the field */ public PIF getAccessPIF(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "tunnel.get_access_PIF"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPIF(result); + return Types.toPIF(result); } /** @@ -217,15 +218,15 @@ public class Tunnel extends XenAPIObject { * @return value of the field */ public PIF getTransportPIF(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "tunnel.get_transport_PIF"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPIF(result); + return Types.toPIF(result); } /** @@ -234,15 +235,15 @@ public class Tunnel extends XenAPIObject { * @return value of the field */ public Map getStatus(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "tunnel.get_status"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -251,15 +252,15 @@ public class Tunnel extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "tunnel.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -268,9 +269,9 @@ public class Tunnel extends XenAPIObject { * @param status New value to set */ public void setStatus(Connection c, Map status) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "tunnel.set_status"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(status)}; @@ -285,9 +286,9 @@ public class Tunnel extends XenAPIObject { * @param value Value to add */ public void addToStatus(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "tunnel.add_to_status"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -301,9 +302,9 @@ public class Tunnel extends XenAPIObject { * @param key Key to remove */ public void removeFromStatus(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "tunnel.remove_from_status"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -317,9 +318,9 @@ public class Tunnel extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "tunnel.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -334,9 +335,9 @@ public class Tunnel extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "tunnel.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -350,9 +351,9 @@ public class Tunnel extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "tunnel.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -368,12 +369,12 @@ public class Tunnel extends XenAPIObject { * @return Task */ public static Task createAsync(Connection c, PIF transportPIF, Network network) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.OpenvswitchNotActive, - Types.TransportPifNotConfigured, - Types.IsTunnelAccessPif { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.OpenvswitchNotActive, + Types.TransportPifNotConfigured, + Types.IsTunnelAccessPif { String method_call = "Async.tunnel.create"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(transportPIF), Marshalling.toXMLRPC(network)}; @@ -390,18 +391,18 @@ public class Tunnel extends XenAPIObject { * @return The reference of the created tunnel object */ public static Tunnel create(Connection c, PIF transportPIF, Network network) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.OpenvswitchNotActive, - Types.TransportPifNotConfigured, - Types.IsTunnelAccessPif { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.OpenvswitchNotActive, + Types.TransportPifNotConfigured, + Types.IsTunnelAccessPif { String method_call = "tunnel.create"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(transportPIF), Marshalling.toXMLRPC(network)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toTunnel(result); + return Types.toTunnel(result); } /** @@ -410,9 +411,9 @@ public class Tunnel extends XenAPIObject { * @return Task */ public Task destroyAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.tunnel.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -426,9 +427,9 @@ public class Tunnel extends XenAPIObject { * */ public void destroy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "tunnel.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -442,15 +443,15 @@ public class Tunnel extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "tunnel.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfTunnel(result); + return Types.toSetOfTunnel(result); } /** @@ -459,15 +460,15 @@ public class Tunnel extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "tunnel.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfTunnelTunnelRecord(result); + return Types.toMapOfTunnelTunnelRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/Types.java b/deps/XenServerJava/src/com/xensource/xenapi/Types.java index 777d580e0b1..50f49a0481f 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/Types.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/Types.java @@ -1,19 +1,19 @@ /* * 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 @@ -28,6 +28,7 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ + package com.xensource.xenapi; import java.util.Date; @@ -44,7 +45,7 @@ import org.apache.xmlrpc.XmlRpcException; /** * This class holds vital marshalling functions, enum types and exceptions. - * + * * @author Citrix Systems, Inc. */ public class Types @@ -68,7 +69,7 @@ public class Types String[] result = new String[objArray.length]; for (int i = 0; i < objArray.length; i++) { - result[i] = (String)objArray[i]; + result[i] = (String) objArray[i]; } return result; } @@ -118,7 +119,6 @@ public class Types return sb.toString(); } } - /** * Thrown if the response from the server contains an invalid status. */ @@ -126,7 +126,7 @@ public class Types { public BadServerResponse(Map response) { - super(ObjectArrayToStringArray((Object[])response.get("ErrorDescription"))); + super(ObjectArrayToStringArray((Object[]) response.get("ErrorDescription"))); } } @@ -144,9 +144,7 @@ public class Types /* * 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. + * unable to comply with the details of the call. */ public static class VersionException extends XenAPIException { @@ -172,11 +170,10 @@ public class Types 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. - */ + /** + * 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")) @@ -186,384 +183,21 @@ public class Types if (response.get("Status").equals("Failure")) { - String[] ErrorDescription = ObjectArrayToStringArray((Object[])response.get("ErrorDescription")); + 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("GPU_GROUP_CONTAINS_PGPU")) - { - String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; - throw new Types.GpuGroupContainsPgpu(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("CANNOT_DESTROY_DISASTER_RECOVERY_TASK")) { String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; throw new Types.CannotDestroyDisasterRecoveryTask(p1); } - if (ErrorDescription[0].equals("VLAN_TAG_INVALID")) + if (ErrorDescription[0].equals("IMPORT_ERROR_ATTACHED_DISKS_NOT_FOUND")) + { + throw new Types.ImportErrorAttachedDisksNotFound(); + } + if (ErrorDescription[0].equals("COULD_NOT_IMPORT_DATABASE")) { 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("VM_REQUIRES_IOMMU")) - { - String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; - throw new Types.VmRequiresIommu(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("VM_HAS_TOO_MANY_SNAPSHOTS")) - { - String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; - throw new Types.VmHasTooManySnapshots(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("VM_REQUIRES_GPU")) - { - String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; - String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : ""; - throw new Types.VmRequiresGpu(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("FEATURE_REQUIRES_HVM")) - { - String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; - throw new Types.FeatureRequiresHvm(p1); - } - 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("GPU_GROUP_CONTAINS_VGPU")) - { - String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; - throw new Types.GpuGroupContainsVgpu(p1); - } - 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("CANNOT_ADD_TUNNEL_TO_BOND_SLAVE")) - { - String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; - throw new Types.CannotAddTunnelToBondSlave(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("PIF_HAS_NO_V6_NETWORK_CONFIGURATION")) - { - throw new Types.PifHasNoV6NetworkConfiguration(); - } - if (ErrorDescription[0].equals("VM_IS_PART_OF_AN_APPLIANCE")) - { - String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; - String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : ""; - throw new Types.VmIsPartOfAnAppliance(p1, p2); - } - 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); + throw new Types.CouldNotImportDatabase(p1); } if (ErrorDescription[0].equals("HOST_CANNOT_ATTACH_NETWORK")) { @@ -571,95 +205,6 @@ public class Types 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("VM_INCOMPATIBLE_WITH_THIS_HOST")) { String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; @@ -667,163 +212,314 @@ public class Types String p3 = ErrorDescription.length > 3 ? ErrorDescription[3] : ""; throw new Types.VmIncompatibleWithThisHost(p1, p2, p3); } - if (ErrorDescription[0].equals("NO_MORE_REDO_LOGS_ALLOWED")) + if (ErrorDescription[0].equals("SESSION_INVALID")) { - throw new Types.NoMoreRedoLogsAllowed(); + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.SessionInvalid(p1); } - if (ErrorDescription[0].equals("POOL_AUTH_ENABLE_FAILED")) + 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.PoolAuthEnableFailed(p1, p2); + throw new Types.XenVssReqErrorCreatingSnapshot(p1, p2); } - if (ErrorDescription[0].equals("VM_SNAPSHOT_WITH_QUIESCE_NOT_SUPPORTED")) + if (ErrorDescription[0].equals("VM_REVERT_FAILED")) { String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : ""; - throw new Types.VmSnapshotWithQuiesceNotSupported(p1, p2); + throw new Types.VmRevertFailed(p1, p2); } - if (ErrorDescription[0].equals("LICENSE_DOES_NOT_SUPPORT_POOLING")) - { - throw new Types.LicenseDoesNotSupportPooling(); - } - if (ErrorDescription[0].equals("HOST_UNKNOWN_TO_MASTER")) + if (ErrorDescription[0].equals("CPU_FEATURE_MASKING_NOT_SUPPORTED")) { String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; - throw new Types.HostUnknownToMaster(p1); + throw new Types.CpuFeatureMaskingNotSupported(p1); } - if (ErrorDescription[0].equals("WLB_CONNECTION_REFUSED")) + if (ErrorDescription[0].equals("HA_LOST_STATEFILE")) { - throw new Types.WlbConnectionRefused(); + throw new Types.HaLostStatefile(); } - if (ErrorDescription[0].equals("VM_SNAPSHOT_WITH_QUIESCE_PLUGIN_DEOS_NOT_RESPOND")) + if (ErrorDescription[0].equals("VM_CANNOT_DELETE_DEFAULT_TEMPLATE")) { String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; - throw new Types.VmSnapshotWithQuiescePluginDeosNotRespond(p1); + throw new Types.VmCannotDeleteDefaultTemplate(p1); } - if (ErrorDescription[0].equals("VM_REQUIRES_SR")) + 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("TOO_BUSY")) + { + throw new Types.TooBusy(); + } + if (ErrorDescription[0].equals("BACKUP_SCRIPT_FAILED")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.BackupScriptFailed(p1); + } + if (ErrorDescription[0].equals("HOST_NOT_LIVE")) + { + throw new Types.HostNotLive(); + } + if (ErrorDescription[0].equals("LICENSE_EXPIRED")) + { + throw new Types.LicenseExpired(); + } + if (ErrorDescription[0].equals("VM_REQUIRES_NETWORK")) { String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : ""; - throw new Types.VmRequiresSr(p1, p2); + throw new Types.VmRequiresNetwork(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")) + if (ErrorDescription[0].equals("LOCATION_NOT_UNIQUE")) { 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); + throw new Types.LocationNotUnique(p1, p2); } - if (ErrorDescription[0].equals("WLB_DISABLED")) - { - throw new Types.WlbDisabled(); - } - if (ErrorDescription[0].equals("VM_HOST_INCOMPATIBLE_VERSION")) + if (ErrorDescription[0].equals("VGPU_TYPE_NOT_SUPPORTED")) { String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : ""; - throw new Types.VmHostIncompatibleVersion(p1, p2); + throw new Types.VgpuTypeNotSupported(p1, p2); } - if (ErrorDescription[0].equals("POOL_JOINING_EXTERNAL_AUTH_MISMATCH")) + if (ErrorDescription[0].equals("HOST_HAS_NO_MANAGEMENT_IP")) { - throw new Types.PoolJoiningExternalAuthMismatch(); + throw new Types.HostHasNoManagementIp(); } - if (ErrorDescription[0].equals("DISK_VBD_MUST_BE_READWRITE_FOR_HVM")) + if (ErrorDescription[0].equals("XEN_VSS_REQ_ERROR_CREATING_SNAPSHOT_XML_STRING")) { String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; - throw new Types.DiskVbdMustBeReadwriteForHvm(p1); + String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : ""; + throw new Types.XenVssReqErrorCreatingSnapshotXmlString(p1, p2); } - 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")) + if (ErrorDescription[0].equals("CANNOT_PLUG_BOND_SLAVE")) { String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; - throw new Types.AuthServiceError(p1); + throw new Types.CannotPlugBondSlave(p1); } - if (ErrorDescription[0].equals("HOST_IN_EMERGENCY_MODE")) + if (ErrorDescription[0].equals("VGPU_TYPE_NOT_ENABLED")) { - throw new Types.HostInEmergencyMode(); + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : ""; + throw new Types.VgpuTypeNotEnabled(p1, p2); + } + if (ErrorDescription[0].equals("CANNOT_FIND_OEM_BACKUP_PARTITION")) + { + throw new Types.CannotFindOemBackupPartition(); + } + if (ErrorDescription[0].equals("PIF_ALREADY_BONDED")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.PifAlreadyBonded(p1); + } + if (ErrorDescription[0].equals("RESTORE_INCOMPATIBLE_VERSION")) + { + throw new Types.RestoreIncompatibleVersion(); + } + if (ErrorDescription[0].equals("SESSION_AUTHENTICATION_FAILED")) + { + throw new Types.SessionAuthenticationFailed(); + } + if (ErrorDescription[0].equals("PIF_BOND_NEEDS_MORE_MEMBERS")) + { + throw new Types.PifBondNeedsMoreMembers(); + } + if (ErrorDescription[0].equals("HA_HEARTBEAT_DAEMON_STARTUP_FAILED")) + { + throw new Types.HaHeartbeatDaemonStartupFailed(); + } + 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("INVALID_IP_ADDRESS_SPECIFIED")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.InvalidIpAddressSpecified(p1); + } + if (ErrorDescription[0].equals("LICENSE_CANNOT_DOWNGRADE_WHILE_IN_POOL")) + { + throw new Types.LicenseCannotDowngradeWhileInPool(); + } + if (ErrorDescription[0].equals("VMS_FAILED_TO_COOPERATE")) + { + throw new Types.VmsFailedToCooperate(); } 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")) + if (ErrorDescription[0].equals("SYSTEM_STATUS_RETRIEVAL_FAILED")) { String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; - throw new Types.DefaultSrNotFound(p1); + throw new Types.SystemStatusRetrievalFailed(p1); } - if (ErrorDescription[0].equals("DEVICE_ALREADY_EXISTS")) + if (ErrorDescription[0].equals("PIF_INCOMPATIBLE_PRIMARY_ADDRESS_TYPE")) + { + throw new Types.PifIncompatiblePrimaryAddressType(); + } + if (ErrorDescription[0].equals("IMPORT_ERROR_PREMATURE_EOF")) + { + throw new Types.ImportErrorPrematureEof(); + } + if (ErrorDescription[0].equals("PROVISION_ONLY_ALLOWED_ON_TEMPLATE")) + { + throw new Types.ProvisionOnlyAllowedOnTemplate(); + } + if (ErrorDescription[0].equals("VBD_NOT_REMOVABLE_MEDIA")) { String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; - throw new Types.DeviceAlreadyExists(p1); + throw new Types.VbdNotRemovableMedia(p1); } - if (ErrorDescription[0].equals("SR_NOT_SHARABLE")) + if (ErrorDescription[0].equals("GPU_GROUP_CONTAINS_NO_PGPUS")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.GpuGroupContainsNoPgpus(p1); + } + if (ErrorDescription[0].equals("HA_HOST_CANNOT_SEE_PEERS")) { String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : ""; - throw new Types.SrNotSharable(p1, p2); + String p3 = ErrorDescription.length > 3 ? ErrorDescription[3] : ""; + throw new Types.HaHostCannotSeePeers(p1, p2, p3); } - if (ErrorDescription[0].equals("VM_HAS_CHECKPOINT")) + if (ErrorDescription[0].equals("AUTH_ENABLE_FAILED")) { String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; - throw new Types.VmHasCheckpoint(p1); + throw new Types.AuthEnableFailed(p1); + } + if (ErrorDescription[0].equals("HOST_NAME_INVALID")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.HostNameInvalid(p1); + } + if (ErrorDescription[0].equals("WLB_XENSERVER_CONNECTION_REFUSED")) + { + throw new Types.WlbXenserverConnectionRefused(); + } + 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_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("CANNOT_EVACUATE_HOST")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.CannotEvacuateHost(p1); + } + if (ErrorDescription[0].equals("VM_IS_PART_OF_AN_APPLIANCE")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : ""; + throw new Types.VmIsPartOfAnAppliance(p1, p2); + } + 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("SR_VDI_LOCKING_FAILED")) + { + throw new Types.SrVdiLockingFailed(); + } + if (ErrorDescription[0].equals("PIF_VLAN_EXISTS")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.PifVlanExists(p1); + } + if (ErrorDescription[0].equals("HOSTS_NOT_COMPATIBLE")) + { + throw new Types.HostsNotCompatible(); + } + if (ErrorDescription[0].equals("VM_IS_PROTECTED")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.VmIsProtected(p1); + } + if (ErrorDescription[0].equals("HA_POOL_IS_ENABLED_BUT_HOST_IS_DISABLED")) + { + throw new Types.HaPoolIsEnabledButHostIsDisabled(); + } + if (ErrorDescription[0].equals("V6D_FAILURE")) + { + throw new Types.V6dFailure(); + } + 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("LICENSE_PROCESSING_ERROR")) + { + throw new Types.LicenseProcessingError(); + } + if (ErrorDescription[0].equals("PIF_VLAN_STILL_EXISTS")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.PifVlanStillExists(p1); + } + if (ErrorDescription[0].equals("VM_REBOOTED")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.VmRebooted(p1); + } + if (ErrorDescription[0].equals("OBJECT_NOLONGER_EXISTS")) + { + throw new Types.ObjectNolongerExists(); + } + if (ErrorDescription[0].equals("CERTIFICATE_LIBRARY_CORRUPT")) + { + throw new Types.CertificateLibraryCorrupt(); + } + if (ErrorDescription[0].equals("DUPLICATE_VM")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.DuplicateVm(p1); + } + if (ErrorDescription[0].equals("CERTIFICATE_ALREADY_EXISTS")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.CertificateAlreadyExists(p1); + } + if (ErrorDescription[0].equals("CERTIFICATE_CORRUPT")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.CertificateCorrupt(p1); } if (ErrorDescription[0].equals("SM_PLUGIN_COMMUNICATION_FAILURE")) { String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; throw new Types.SmPluginCommunicationFailure(p1); } - if (ErrorDescription[0].equals("VM_ASSIGNED_TO_PROTECTION_POLICY")) + if (ErrorDescription[0].equals("WLB_DISABLED")) + { + throw new Types.WlbDisabled(); + } + if (ErrorDescription[0].equals("GPU_GROUP_CONTAINS_PGPU")) { String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; - String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : ""; - throw new Types.VmAssignedToProtectionPolicy(p1, p2); + throw new Types.GpuGroupContainsPgpu(p1); } - if (ErrorDescription[0].equals("RBAC_PERMISSION_DENIED")) + if (ErrorDescription[0].equals("VDI_NOT_IN_MAP")) { String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; - String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : ""; - throw new Types.RbacPermissionDenied(p1, p2); + throw new Types.VdiNotInMap(p1); } - if (ErrorDescription[0].equals("AUTH_DISABLE_FAILED_PERMISSION_DENIED")) + if (ErrorDescription[0].equals("LICENCE_RESTRICTION")) { - 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(); + throw new Types.LicenceRestriction(); } if (ErrorDescription[0].equals("TOO_MANY_PENDING_TASKS")) { @@ -834,102 +530,11 @@ public class Types String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; throw new Types.VmSnapshotWithQuiesceTimeout(p1); } - if (ErrorDescription[0].equals("HA_CANNOT_CHANGE_BOND_STATUS_OF_MGMT_IFACE")) - { - throw new Types.HaCannotChangeBondStatusOfMgmtIface(); - } - 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("PATCH_PRECHECK_FAILED_WRONG_SERVER_BUILD")) + if (ErrorDescription[0].equals("VDI_INCOMPATIBLE_TYPE")) { String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : ""; - String p3 = ErrorDescription.length > 3 ? ErrorDescription[3] : ""; - throw new Types.PatchPrecheckFailedWrongServerBuild(p1, p2, p3); - } - 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("ROLE_ALREADY_EXISTS")) - { - throw new Types.RoleAlreadyExists(); - } - if (ErrorDescription[0].equals("NETWORK_CONTAINS_PIF")) - { - String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; - throw new Types.NetworkContainsPif(p1); - } - if (ErrorDescription[0].equals("COULD_NOT_FIND_NETWORK_INTERFACE_WITH_SPECIFIED_DEVICE_NAME_AND_MAC_ADDRESS")) - { - String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; - String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : ""; - throw new Types.CouldNotFindNetworkInterfaceWithSpecifiedDeviceNameAndMacAddress(p1, p2); - } - 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(); + throw new Types.VdiIncompatibleType(p1, p2); } if (ErrorDescription[0].equals("VIF_IN_USE")) { @@ -937,117 +542,553 @@ public class Types String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : ""; throw new Types.VifInUse(p1, p2); } - if (ErrorDescription[0].equals("ONLY_ALLOWED_ON_OEM_EDITION")) + if (ErrorDescription[0].equals("VMPP_ARCHIVE_MORE_FREQUENT_THAN_BACKUP")) + { + throw new Types.VmppArchiveMoreFrequentThanBackup(); + } + if (ErrorDescription[0].equals("IMPORT_INCOMPATIBLE_VERSION")) + { + throw new Types.ImportIncompatibleVersion(); + } + if (ErrorDescription[0].equals("INVALID_EDITION")) { String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; - throw new Types.OnlyAllowedOnOemEdition(p1); + throw new Types.InvalidEdition(p1); } - if (ErrorDescription[0].equals("VDI_IS_A_PHYSICAL_DEVICE")) + if (ErrorDescription[0].equals("AUTH_SERVICE_ERROR")) { String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; - throw new Types.VdiIsAPhysicalDevice(p1); + throw new Types.AuthServiceError(p1); } - if (ErrorDescription[0].equals("LICENSE_PROCESSING_ERROR")) - { - throw new Types.LicenseProcessingError(); - } - if (ErrorDescription[0].equals("ILLEGAL_VBD_DEVICE")) + 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.IllegalVbdDevice(p1, p2); + throw new Types.XenVssReqErrorAddingVolumeToSnapsetFailed(p1, p2); } - if (ErrorDescription[0].equals("CRL_DOES_NOT_EXIST")) + if (ErrorDescription[0].equals("PERMISSION_DENIED")) { String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; - throw new Types.CrlDoesNotExist(p1); + throw new Types.PermissionDenied(p1); } - if (ErrorDescription[0].equals("TASK_CANCELLED")) + if (ErrorDescription[0].equals("DEVICE_ALREADY_EXISTS")) { String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; - throw new Types.TaskCancelled(p1); + throw new Types.DeviceAlreadyExists(p1); + } + if (ErrorDescription[0].equals("SR_UUID_EXISTS")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.SrUuidExists(p1); + } + if (ErrorDescription[0].equals("VM_HAS_VGPU")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.VmHasVgpu(p1); + } + if (ErrorDescription[0].equals("TOO_MANY_STORAGE_MIGRATES")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.TooManyStorageMigrates(p1); + } + if (ErrorDescription[0].equals("HA_IS_ENABLED")) + { + throw new Types.HaIsEnabled(); + } + if (ErrorDescription[0].equals("CANNOT_DESTROY_SYSTEM_NETWORK")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.CannotDestroySystemNetwork(p1); + } + if (ErrorDescription[0].equals("OPENVSWITCH_NOT_ACTIVE")) + { + throw new Types.OpenvswitchNotActive(); + } + if (ErrorDescription[0].equals("NOT_IMPLEMENTED")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.NotImplemented(p1); + } + if (ErrorDescription[0].equals("VBD_NOT_UNPLUGGABLE")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.VbdNotUnpluggable(p1); } if (ErrorDescription[0].equals("VM_CRASHED")) { String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; throw new Types.VmCrashed(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("FEATURE_REQUIRES_HVM")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.FeatureRequiresHvm(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("SR_NOT_EMPTY")) + { + throw new Types.SrNotEmpty(); + } + if (ErrorDescription[0].equals("JOINING_HOST_CANNOT_HAVE_VMS_WITH_CURRENT_OPERATIONS")) + { + throw new Types.JoiningHostCannotHaveVmsWithCurrentOperations(); + } + if (ErrorDescription[0].equals("VDI_NOT_MANAGED")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.VdiNotManaged(p1); + } + if (ErrorDescription[0].equals("VM_HALTED")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.VmHalted(p1); + } + if (ErrorDescription[0].equals("COULD_NOT_FIND_NETWORK_INTERFACE_WITH_SPECIFIED_DEVICE_NAME_AND_MAC_ADDRESS")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : ""; + throw new Types.CouldNotFindNetworkInterfaceWithSpecifiedDeviceNameAndMacAddress(p1, p2); + } + 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("RESTORE_TARGET_MISSING_DEVICE")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.RestoreTargetMissingDevice(p1); + } + if (ErrorDescription[0].equals("VM_IS_TEMPLATE")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.VmIsTemplate(p1); + } + if (ErrorDescription[0].equals("HA_OPERATION_WOULD_BREAK_FAILOVER_PLAN")) + { + throw new Types.HaOperationWouldBreakFailoverPlan(); + } + if (ErrorDescription[0].equals("VMPP_HAS_VM")) + { + throw new Types.VmppHasVm(); + } + 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("POOL_JOINING_HOST_MUST_HAVE_PHYSICAL_MANAGEMENT_NIC")) + { + throw new Types.PoolJoiningHostMustHavePhysicalManagementNic(); + } + if (ErrorDescription[0].equals("DEVICE_ALREADY_ATTACHED")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.DeviceAlreadyAttached(p1); + } + if (ErrorDescription[0].equals("NOT_SUPPORTED_DURING_UPGRADE")) + { + throw new Types.NotSupportedDuringUpgrade(); + } + if (ErrorDescription[0].equals("OPERATION_PARTIALLY_FAILED")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.OperationPartiallyFailed(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("PIF_CANNOT_BOND_CROSS_HOST")) + { + throw new Types.PifCannotBondCrossHost(); + } + 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_PLUG_VIF")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.CannotPlugVif(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")) + if (ErrorDescription[0].equals("NOT_ALLOWED_ON_OEM_EDITION")) { String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; - throw new Types.HaShouldBeFenced(p1); + throw new Types.NotAllowedOnOemEdition(p1); } - if (ErrorDescription[0].equals("VM_UNSAFE_BOOT")) + if (ErrorDescription[0].equals("PATCH_PRECHECK_FAILED_UNKNOWN_ERROR")) { String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; - throw new Types.VmUnsafeBoot(p1); + String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : ""; + throw new Types.PatchPrecheckFailedUnknownError(p1, p2); } - if (ErrorDescription[0].equals("PIF_HAS_NO_NETWORK_CONFIGURATION")) + if (ErrorDescription[0].equals("CRL_CORRUPT")) { - throw new Types.PifHasNoNetworkConfiguration(); + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.CrlCorrupt(p1); } - if (ErrorDescription[0].equals("TOO_BUSY")) + if (ErrorDescription[0].equals("POOL_JOINING_EXTERNAL_AUTH_MISMATCH")) { - throw new Types.TooBusy(); + throw new Types.PoolJoiningExternalAuthMismatch(); } - if (ErrorDescription[0].equals("VALUE_NOT_SUPPORTED")) + if (ErrorDescription[0].equals("JOINING_HOST_SERVICE_FAILED")) + { + throw new Types.JoiningHostServiceFailed(); + } + if (ErrorDescription[0].equals("CHANGE_PASSWORD_REJECTED")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.ChangePasswordRejected(p1); + } + if (ErrorDescription[0].equals("PIF_UNMANAGED")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.PifUnmanaged(p1); + } + 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.ValueNotSupported(p1, p2, p3); + throw new Types.VmDuplicateVbdDevice(p1, p2, p3); } - if (ErrorDescription[0].equals("SESSION_INVALID")) + if (ErrorDescription[0].equals("RESTORE_SCRIPT_FAILED")) { String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; - throw new Types.SessionInvalid(p1); + throw new Types.RestoreScriptFailed(p1); } - if (ErrorDescription[0].equals("HA_CONSTRAINT_VIOLATION_NETWORK_NOT_SHARED")) + if (ErrorDescription[0].equals("WLB_XENSERVER_TIMEOUT")) + { + throw new Types.WlbXenserverTimeout(); + } + if (ErrorDescription[0].equals("MAC_DOES_NOT_EXIST")) { String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; - throw new Types.HaConstraintViolationNetworkNotShared(p1); + throw new Types.MacDoesNotExist(p1); } - if (ErrorDescription[0].equals("HA_FAILED_TO_FORM_LIVESET")) + if (ErrorDescription[0].equals("HOST_ITS_OWN_SLAVE")) { - throw new Types.HaFailedToFormLiveset(); + throw new Types.HostItsOwnSlave(); } - if (ErrorDescription[0].equals("PIF_CANNOT_BOND_CROSS_HOST")) + if (ErrorDescription[0].equals("AUTH_DISABLE_FAILED_WRONG_CREDENTIALS")) { - throw new Types.PifCannotBondCrossHost(); + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.AuthDisableFailedWrongCredentials(p1); + } + if (ErrorDescription[0].equals("HA_TOO_FEW_HOSTS")) + { + throw new Types.HaTooFewHosts(); + } + if (ErrorDescription[0].equals("VM_ASSIGNED_TO_PROTECTION_POLICY")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : ""; + throw new Types.VmAssignedToProtectionPolicy(p1, p2); + } + 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("HOST_MASTER_CANNOT_TALK_BACK")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.HostMasterCannotTalkBack(p1); + } + if (ErrorDescription[0].equals("VM_CHECKPOINT_RESUME_FAILED")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.VmCheckpointResumeFailed(p1); + } + if (ErrorDescription[0].equals("CRL_NAME_INVALID")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.CrlNameInvalid(p1); } if (ErrorDescription[0].equals("EVENT_FROM_TOKEN_PARSE_FAILURE")) { String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; throw new Types.EventFromTokenParseFailure(p1); } - if (ErrorDescription[0].equals("SR_REQUIRES_UPGRADE")) + if (ErrorDescription[0].equals("CANNOT_ENABLE_REDO_LOG")) { String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; - throw new Types.SrRequiresUpgrade(p1); + throw new Types.CannotEnableRedoLog(p1); } - if (ErrorDescription[0].equals("CERTIFICATE_DOES_NOT_EXIST")) + if (ErrorDescription[0].equals("PIF_DEVICE_NOT_FOUND")) + { + throw new Types.PifDeviceNotFound(); + } + if (ErrorDescription[0].equals("LICENSE_DOES_NOT_SUPPORT_POOLING")) + { + throw new Types.LicenseDoesNotSupportPooling(); + } + if (ErrorDescription[0].equals("OPERATION_BLOCKED")) { String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; - throw new Types.CertificateDoesNotExist(p1); + String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : ""; + throw new Types.OperationBlocked(p1, p2); } - if (ErrorDescription[0].equals("HA_OPERATION_WOULD_BREAK_FAILOVER_PLAN")) - { - throw new Types.HaOperationWouldBreakFailoverPlan(); - } - if (ErrorDescription[0].equals("CANNOT_FETCH_PATCH")) + if (ErrorDescription[0].equals("VM_NO_CRASHDUMP_SR")) { String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; - throw new Types.CannotFetchPatch(p1); + throw new Types.VmNoCrashdumpSr(p1); } - if (ErrorDescription[0].equals("CANNOT_FIND_PATCH")) + if (ErrorDescription[0].equals("HOST_EVACUATE_IN_PROGRESS")) { - throw new Types.CannotFindPatch(); + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.HostEvacuateInProgress(p1); + } + if (ErrorDescription[0].equals("SYSTEM_STATUS_MUST_USE_TAR_ON_OEM")) + { + throw new Types.SystemStatusMustUseTarOnOem(); + } + if (ErrorDescription[0].equals("HA_NO_PLAN")) + { + throw new Types.HaNoPlan(); + } + if (ErrorDescription[0].equals("HOST_UNKNOWN_TO_MASTER")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.HostUnknownToMaster(p1); + } + if (ErrorDescription[0].equals("AUTH_ENABLE_FAILED_WRONG_CREDENTIALS")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.AuthEnableFailedWrongCredentials(p1); + } + if (ErrorDescription[0].equals("OPERATION_NOT_ALLOWED")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.OperationNotAllowed(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("HA_FAILED_TO_FORM_LIVESET")) + { + throw new Types.HaFailedToFormLiveset(); + } + if (ErrorDescription[0].equals("WLB_CONNECTION_RESET")) + { + throw new Types.WlbConnectionReset(); + } + if (ErrorDescription[0].equals("HOST_CD_DRIVE_EMPTY")) + { + throw new Types.HostCdDriveEmpty(); + } + if (ErrorDescription[0].equals("EVENTS_LOST")) + { + throw new Types.EventsLost(); + } + if (ErrorDescription[0].equals("PROVISION_FAILED_OUT_OF_SPACE")) + { + throw new Types.ProvisionFailedOutOfSpace(); + } + if (ErrorDescription[0].equals("LICENSE_FILE_DEPRECATED")) + { + throw new Types.LicenseFileDeprecated(); + } + if (ErrorDescription[0].equals("SUBJECT_ALREADY_EXISTS")) + { + throw new Types.SubjectAlreadyExists(); + } + if (ErrorDescription[0].equals("VM_HOST_INCOMPATIBLE_VERSION")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : ""; + throw new Types.VmHostIncompatibleVersion(p1, p2); + } + if (ErrorDescription[0].equals("HOST_BROKEN")) + { + throw new Types.HostBroken(); + } + if (ErrorDescription[0].equals("NOT_IN_EMERGENCY_MODE")) + { + throw new Types.NotInEmergencyMode(); + } + if (ErrorDescription[0].equals("ROLE_NOT_FOUND")) + { + throw new Types.RoleNotFound(); + } + if (ErrorDescription[0].equals("MAC_STILL_EXISTS")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.MacStillExists(p1); + } + if (ErrorDescription[0].equals("HA_HOST_IS_ARMED")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.HaHostIsArmed(p1); + } + if (ErrorDescription[0].equals("JOINING_HOST_CANNOT_HAVE_RUNNING_VMS")) + { + throw new Types.JoiningHostCannotHaveRunningVms(); + } + 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("HA_CONSTRAINT_VIOLATION_NETWORK_NOT_SHARED")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.HaConstraintViolationNetworkNotShared(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("WLB_INTERNAL_ERROR")) + { + throw new Types.WlbInternalError(); + } + if (ErrorDescription[0].equals("FIELD_TYPE_ERROR")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.FieldTypeError(p1); + } + if (ErrorDescription[0].equals("DEVICE_ALREADY_DETACHED")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.DeviceAlreadyDetached(p1); + } + if (ErrorDescription[0].equals("GPU_GROUP_CONTAINS_VGPU")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.GpuGroupContainsVgpu(p1); + } + 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("SR_UNKNOWN_DRIVER")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.SrUnknownDriver(p1); + } + if (ErrorDescription[0].equals("HOSTS_NOT_HOMOGENEOUS")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.HostsNotHomogeneous(p1); + } + if (ErrorDescription[0].equals("VDI_CONTAINS_METADATA_OF_THIS_POOL")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : ""; + throw new Types.VdiContainsMetadataOfThisPool(p1, p2); + } + 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("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("HA_NOT_ENABLED")) + { + throw new Types.HaNotEnabled(); + } + if (ErrorDescription[0].equals("SR_ATTACH_FAILED")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.SrAttachFailed(p1); + } + 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("VM_MEMORY_SIZE_TOO_LOW")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.VmMemorySizeTooLow(p1); + } + if (ErrorDescription[0].equals("POOL_JOINING_HOST_MUST_HAVE_SAME_PRODUCT_VERSION")) + { + throw new Types.PoolJoiningHostMustHaveSameProductVersion(); + } + if (ErrorDescription[0].equals("VM_REQUIRES_IOMMU")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.VmRequiresIommu(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("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("JOINING_HOST_CONNECTION_FAILED")) + { + throw new Types.JoiningHostConnectionFailed(); + } + 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("HOST_HAS_RESIDENT_VMS")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.HostHasResidentVms(p1); + } + if (ErrorDescription[0].equals("SESSION_NOT_REGISTERED")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.SessionNotRegistered(p1); } if (ErrorDescription[0].equals("DB_UNIQUENESS_CONSTRAINT_VIOLATION")) { @@ -1056,22 +1097,514 @@ public class Types String p3 = ErrorDescription.length > 3 ? ErrorDescription[3] : ""; throw new Types.DbUniquenessConstraintViolation(p1, p2, p3); } - if (ErrorDescription[0].equals("VM_REQUIRES_NETWORK")) + if (ErrorDescription[0].equals("SR_INDESTRUCTIBLE")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.SrIndestructible(p1); + } + if (ErrorDescription[0].equals("WLB_XENSERVER_MALFORMED_RESPONSE")) + { + throw new Types.WlbXenserverMalformedResponse(); + } + if (ErrorDescription[0].equals("VDI_NOT_AVAILABLE")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.VdiNotAvailable(p1); + } + if (ErrorDescription[0].equals("SR_FULL")) { String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : ""; - throw new Types.VmRequiresNetwork(p1, p2); + throw new Types.SrFull(p1, p2); + } + if (ErrorDescription[0].equals("CANNOT_FETCH_PATCH")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.CannotFetchPatch(p1); + } + if (ErrorDescription[0].equals("HOST_IN_EMERGENCY_MODE")) + { + throw new Types.HostInEmergencyMode(); + } + if (ErrorDescription[0].equals("IMPORT_ERROR_SOME_CHECKSUMS_FAILED")) + { + throw new Types.ImportErrorSomeChecksumsFailed(); + } + if (ErrorDescription[0].equals("XENAPI_MISSING_PLUGIN")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.XenapiMissingPlugin(p1); + } + 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("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("TRANSPORT_PIF_NOT_CONFIGURED")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.TransportPifNotConfigured(p1); + } + 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("SR_HAS_PBD")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.SrHasPbd(p1); + } + if (ErrorDescription[0].equals("INVALID_DEVICE")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.InvalidDevice(p1); + } + if (ErrorDescription[0].equals("VGPU_TYPE_NOT_COMPATIBLE_WITH_RUNNING_TYPE")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : ""; + String p3 = ErrorDescription.length > 3 ? ErrorDescription[3] : ""; + throw new Types.VgpuTypeNotCompatibleWithRunningType(p1, p2, p3); + } + if (ErrorDescription[0].equals("ACTIVATION_WHILE_NOT_FREE")) + { + throw new Types.ActivationWhileNotFree(); + } + if (ErrorDescription[0].equals("VDI_READONLY")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.VdiReadonly(p1); + } + 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("HOST_DISABLED")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.HostDisabled(p1); + } + if (ErrorDescription[0].equals("WLB_CONNECTION_REFUSED")) + { + throw new Types.WlbConnectionRefused(); } 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")) + if (ErrorDescription[0].equals("CANNOT_FIND_STATE_PARTITION")) + { + throw new Types.CannotFindStatePartition(); + } + if (ErrorDescription[0].equals("INTERFACE_HAS_NO_IP")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.InterfaceHasNoIp(p1); + } + if (ErrorDescription[0].equals("JOINING_HOST_CANNOT_HAVE_RUNNING_OR_SUSPENDED_VMS")) + { + throw new Types.JoiningHostCannotHaveRunningOrSuspendedVms(); + } + 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("CANNOT_CONTACT_HOST")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.CannotContactHost(p1); + } + if (ErrorDescription[0].equals("MAC_INVALID")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.MacInvalid(p1); + } + if (ErrorDescription[0].equals("VBD_IS_EMPTY")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.VbdIsEmpty(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.HostNotEnoughFreeMemory(p1, p2); + throw new Types.PoolAuthEnableFailedInvalidOu(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("PIF_DOES_NOT_ALLOW_UNPLUG")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.PifDoesNotAllowUnplug(p1); + } + 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("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("WLB_XENSERVER_AUTHENTICATION_FAILED")) + { + throw new Types.WlbXenserverAuthenticationFailed(); + } + if (ErrorDescription[0].equals("JOINING_HOST_CANNOT_CONTAIN_SHARED_SRS")) + { + throw new Types.JoiningHostCannotContainSharedSrs(); + } + if (ErrorDescription[0].equals("RESTORE_TARGET_MGMT_IF_NOT_IN_BACKUP")) + { + throw new Types.RestoreTargetMgmtIfNotInBackup(); + } + 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("PIF_IS_PHYSICAL")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.PifIsPhysical(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("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("IS_TUNNEL_ACCESS_PIF")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.IsTunnelAccessPif(p1); + } + if (ErrorDescription[0].equals("SR_REQUIRES_UPGRADE")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.SrRequiresUpgrade(p1); + } + if (ErrorDescription[0].equals("ROLE_ALREADY_EXISTS")) + { + throw new Types.RoleAlreadyExists(); + } + 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("CRL_DOES_NOT_EXIST")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.CrlDoesNotExist(p1); + } + if (ErrorDescription[0].equals("INVALID_PATCH")) + { + throw new Types.InvalidPatch(); + } + if (ErrorDescription[0].equals("LICENSE_DOES_NOT_SUPPORT_XHA")) + { + throw new Types.LicenseDoesNotSupportXha(); + } + if (ErrorDescription[0].equals("AUTH_IS_DISABLED")) + { + throw new Types.AuthIsDisabled(); + } + 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("VM_HVM_REQUIRED")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.VmHvmRequired(p1); + } + if (ErrorDescription[0].equals("WLB_MALFORMED_REQUEST")) + { + throw new Types.WlbMalformedRequest(); + } + if (ErrorDescription[0].equals("VM_BIOS_STRINGS_ALREADY_SET")) + { + throw new Types.VmBiosStringsAlreadySet(); + } + 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("VM_HAS_PCI_ATTACHED")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.VmHasPciAttached(p1); + } + 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("WLB_UNKNOWN_HOST")) + { + throw new Types.WlbUnknownHost(); + } + if (ErrorDescription[0].equals("SR_DEVICE_IN_USE")) + { + throw new Types.SrDeviceInUse(); + } + if (ErrorDescription[0].equals("DISK_VBD_MUST_BE_READWRITE_FOR_HVM")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.DiskVbdMustBeReadwriteForHvm(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("PATCH_PRECHECK_FAILED_ISO_MOUNTED")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.PatchPrecheckFailedIsoMounted(p1); + } + if (ErrorDescription[0].equals("PATCH_PRECHECK_FAILED_WRONG_SERVER_BUILD")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : ""; + String p3 = ErrorDescription.length > 3 ? ErrorDescription[3] : ""; + throw new Types.PatchPrecheckFailedWrongServerBuild(p1, p2, p3); + } + 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("TASK_CANCELLED")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.TaskCancelled(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("SUBJECT_CANNOT_BE_RESOLVED")) + { + throw new Types.SubjectCannotBeResolved(); + } + if (ErrorDescription[0].equals("VM_MISSING_PV_DRIVERS")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.VmMissingPvDrivers(p1); + } + if (ErrorDescription[0].equals("PATCH_APPLY_FAILED")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.PatchApplyFailed(p1); + } + if (ErrorDescription[0].equals("SLAVE_REQUIRES_MANAGEMENT_INTERFACE")) + { + throw new Types.SlaveRequiresManagementInterface(); + } + if (ErrorDescription[0].equals("HOST_IS_LIVE")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.HostIsLive(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("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("EVENT_SUBSCRIPTION_PARSE_FAILURE")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.EventSubscriptionParseFailure(p1); + } + if (ErrorDescription[0].equals("VM_TO_IMPORT_IS_NOT_NEWER_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.VmToImportIsNotNewerVersion(p1, p2, p3); + } + if (ErrorDescription[0].equals("DEFAULT_SR_NOT_FOUND")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.DefaultSrNotFound(p1); + } + 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("CANNOT_CREATE_STATE_FILE")) + { + throw new Types.CannotCreateStateFile(); + } + if (ErrorDescription[0].equals("VM_REQUIRES_GPU")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : ""; + throw new Types.VmRequiresGpu(p1, p2); + } + if (ErrorDescription[0].equals("LICENSE_CHECKOUT_ERROR")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.LicenseCheckoutError(p1); + } + if (ErrorDescription[0].equals("HOST_IS_SLAVE")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.HostIsSlave(p1); + } + if (ErrorDescription[0].equals("HOST_STILL_BOOTING")) + { + throw new Types.HostStillBooting(); + } + if (ErrorDescription[0].equals("PGPU_NOT_COMPATIBLE_WITH_GPU_GROUP")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : ""; + throw new Types.PgpuNotCompatibleWithGpuGroup(p1, p2); + } + 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("MESSAGE_REMOVED")) + { + throw new Types.MessageRemoved(); + } + if (ErrorDescription[0].equals("NETWORK_CONTAINS_PIF")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.NetworkContainsPif(p1); + } + if (ErrorDescription[0].equals("WLB_XENSERVER_UNKNOWN_HOST")) + { + throw new Types.WlbXenserverUnknownHost(); + } + 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("PATCH_ALREADY_EXISTS")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.PatchAlreadyExists(p1); + } + if (ErrorDescription[0].equals("PGPU_IN_USE_BY_VM")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.PgpuInUseByVm(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("CANNOT_ADD_VLAN_TO_BOND_SLAVE")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.CannotAddVlanToBondSlave(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("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("VM_FAILED_SHUTDOWN_ACKNOWLEDGMENT")) + { + throw new Types.VmFailedShutdownAcknowledgment(); + } + if (ErrorDescription[0].equals("CERTIFICATE_NAME_INVALID")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.CertificateNameInvalid(p1); + } + 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("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("INTERNAL_ERROR")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.InternalError(p1); + } + if (ErrorDescription[0].equals("MESSAGE_DEPRECATED")) + { + throw new Types.MessageDeprecated(); + } + if (ErrorDescription[0].equals("CANNOT_FIND_PATCH")) + { + throw new Types.CannotFindPatch(); + } + if (ErrorDescription[0].equals("VM_UNSAFE_BOOT")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.VmUnsafeBoot(p1); } if (ErrorDescription[0].equals("VM_MIGRATE_FAILED")) { @@ -1081,234 +1614,24 @@ public class Types 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("EVENT_SUBSCRIPTION_PARSE_FAILURE")) - { - String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; - throw new Types.EventSubscriptionParseFailure(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("V6D_FAILURE")) - { - throw new Types.V6dFailure(); - } if (ErrorDescription[0].equals("JOINING_HOST_CANNOT_BE_MASTER_OF_OTHER_HOSTS")) { throw new Types.JoiningHostCannotBeMasterOfOtherHosts(); } - if (ErrorDescription[0].equals("HOST_HAS_RESIDENT_VMS")) + if (ErrorDescription[0].equals("IMPORT_ERROR_CANNOT_HANDLE_CHUNKED")) { - String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; - throw new Types.HostHasResidentVms(p1); + throw new Types.ImportErrorCannotHandleChunked(); } - 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")) + 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.XenVssReqErrorStartSnapshotSetFailed(p1, p2); + throw new Types.PoolAuthEnableFailedWrongCredentials(p1, p2); } - if (ErrorDescription[0].equals("VBD_IS_EMPTY")) + if (ErrorDescription[0].equals("ONLY_ALLOWED_ON_OEM_EDITION")) { 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("WLB_AUTHENTICATION_FAILED")) - { - throw new Types.WlbAuthenticationFailed(); - } - if (ErrorDescription[0].equals("AUTH_UNKNOWN_TYPE")) - { - String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; - throw new Types.AuthUnknownType(p1); - } - 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("VDI_CONTAINS_METADATA_OF_THIS_POOL")) - { - String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; - String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : ""; - throw new Types.VdiContainsMetadataOfThisPool(p1, p2); - } - if (ErrorDescription[0].equals("CRL_NAME_INVALID")) - { - String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; - throw new Types.CrlNameInvalid(p1); - } - if (ErrorDescription[0].equals("VDI_NOT_SPARSE")) - { - String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; - throw new Types.VdiNotSparse(p1); - } - if (ErrorDescription[0].equals("VDI_TOO_SMALL")) - { - String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; - String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : ""; - throw new Types.VdiTooSmall(p1, p2); - } - 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); + throw new Types.OnlyAllowedOnOemEdition(p1); } if (ErrorDescription[0].equals("HOST_IN_USE")) { @@ -1317,611 +1640,152 @@ public class Types String p3 = ErrorDescription.length > 3 ? ErrorDescription[3] : ""; throw new Types.HostInUse(p1, p2, p3); } - if (ErrorDescription[0].equals("HA_TOO_FEW_HOSTS")) + if (ErrorDescription[0].equals("VM_CHECKPOINT_SUSPEND_FAILED")) { - throw new Types.HaTooFewHosts(); + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.VmCheckpointSuspendFailed(p1); } - if (ErrorDescription[0].equals("WLB_CONNECTION_RESET")) + if (ErrorDescription[0].equals("PATCH_ALREADY_APPLIED")) { - throw new Types.WlbConnectionReset(); + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.PatchAlreadyApplied(p1); } - if (ErrorDescription[0].equals("POOL_AUTH_ENABLE_FAILED_WRONG_CREDENTIALS")) + if (ErrorDescription[0].equals("DEVICE_NOT_ATTACHED")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.DeviceNotAttached(p1); + } + 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.PoolAuthEnableFailedWrongCredentials(p1, p2); + throw new Types.PoolAuthEnableFailed(p1, p2); } - if (ErrorDescription[0].equals("PATCH_IS_APPLIED")) - { - throw new Types.PatchIsApplied(); - } - if (ErrorDescription[0].equals("SR_HAS_PBD")) + if (ErrorDescription[0].equals("VDI_IN_USE")) { String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; - throw new Types.SrHasPbd(p1); - } - if (ErrorDescription[0].equals("OPERATION_PARTIALLY_FAILED")) - { - String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; - throw new Types.OperationPartiallyFailed(p1); - } - if (ErrorDescription[0].equals("WLB_MALFORMED_REQUEST")) - { - throw new Types.WlbMalformedRequest(); - } - if (ErrorDescription[0].equals("HOST_STILL_BOOTING")) - { - throw new Types.HostStillBooting(); - } - if (ErrorDescription[0].equals("CANNOT_DESTROY_SYSTEM_NETWORK")) - { - String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; - throw new Types.CannotDestroySystemNetwork(p1); - } - if (ErrorDescription[0].equals("OBJECT_NOLONGER_EXISTS")) - { - throw new Types.ObjectNolongerExists(); - } - if (ErrorDescription[0].equals("VDI_NOT_IN_MAP")) - { - String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; - throw new Types.VdiNotInMap(p1); - } - 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("NOT_SYSTEM_DOMAIN")) - { - String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; - throw new Types.NotSystemDomain(p1); - } - 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(); + String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : ""; + throw new Types.VdiInUse(p1, p2); } if (ErrorDescription[0].equals("HOST_NOT_DISABLED")) { throw new Types.HostNotDisabled(); } - if (ErrorDescription[0].equals("FIELD_TYPE_ERROR")) + if (ErrorDescription[0].equals("FEATURE_RESTRICTED")) { - String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; - throw new Types.FieldTypeError(p1); + throw new Types.FeatureRestricted(); } - 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")) + if (ErrorDescription[0].equals("VM_REQUIRES_SR")) { String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : ""; - throw new Types.VmRequiresVdi(p1, p2); + throw new Types.VmRequiresSr(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")) + if (ErrorDescription[0].equals("BOOTLOADER_FAILED")) { 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); + throw new Types.BootloaderFailed(p1, p2); } - if (ErrorDescription[0].equals("POOL_AUTH_ALREADY_ENABLED")) + if (ErrorDescription[0].equals("PIF_HAS_NO_NETWORK_CONFIGURATION")) + { + throw new Types.PifHasNoNetworkConfiguration(); + } + if (ErrorDescription[0].equals("PIF_TUNNEL_STILL_EXISTS")) { 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("VM_HAS_PCI_ATTACHED")) - { - String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; - throw new Types.VmHasPciAttached(p1); - } - if (ErrorDescription[0].equals("MIRROR_FAILED")) - { - String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; - throw new Types.MirrorFailed(p1); - } - if (ErrorDescription[0].equals("WLB_XENSERVER_TIMEOUT")) - { - throw new Types.WlbXenserverTimeout(); - } - 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("VM_SNAPSHOT_WITH_QUIESCE_FAILED")) - { - String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; - throw new Types.VmSnapshotWithQuiesceFailed(p1); - } - 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("CANNOT_ADD_VLAN_TO_BOND_SLAVE")) - { - String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; - throw new Types.CannotAddVlanToBondSlave(p1); - } - 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); + throw new Types.PifTunnelStillExists(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("TOO_MANY_STORAGE_MIGRATES")) - { - String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; - throw new Types.TooManyStorageMigrates(p1); - } - 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("SUBJECT_CANNOT_BE_RESOLVED")) - { - throw new Types.SubjectCannotBeResolved(); - } - 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("PROVISION_FAILED_OUT_OF_SPACE")) - { - throw new Types.ProvisionFailedOutOfSpace(); - } if (ErrorDescription[0].equals("VDI_NEEDS_VM_FOR_MIGRATE")) { String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; throw new Types.VdiNeedsVmForMigrate(p1); } - if (ErrorDescription[0].equals("COULD_NOT_IMPORT_DATABASE")) + if (ErrorDescription[0].equals("SR_OPERATION_NOT_SUPPORTED")) { String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; - throw new Types.CouldNotImportDatabase(p1); + throw new Types.SrOperationNotSupported(p1); } - if (ErrorDescription[0].equals("VDI_IS_NOT_ISO")) + if (ErrorDescription[0].equals("VM_SNAPSHOT_WITH_QUIESCE_PLUGIN_DEOS_NOT_RESPOND")) { String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; - String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : ""; - throw new Types.VdiIsNotIso(p1, p2); + throw new Types.VmSnapshotWithQuiescePluginDeosNotRespond(p1); } - 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("PIF_INCOMPATIBLE_PRIMARY_ADDRESS_TYPE")) - { - throw new Types.PifIncompatiblePrimaryAddressType(); - } - 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")) + 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] : ""; - throw new Types.SrBackendFailure(p1, p2, p3); + String p4 = ErrorDescription.length > 4 ? ErrorDescription[4] : ""; + throw new Types.XapiHookFailed(p1, p2, p3, p4); } - if (ErrorDescription[0].equals("DEVICE_DETACH_TIMEOUT")) + if (ErrorDescription[0].equals("REDO_LOG_IS_ENABLED")) { - 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("CANNOT_PLUG_BOND_SLAVE")) - { - String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; - throw new Types.CannotPlugBondSlave(p1); - } - if (ErrorDescription[0].equals("VM_TO_IMPORT_IS_NOT_NEWER_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.VmToImportIsNotNewerVersion(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); + throw new Types.RedoLogIsEnabled(); } 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")) + if (ErrorDescription[0].equals("CRL_ALREADY_EXISTS")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.CrlAlreadyExists(p1); + } + if (ErrorDescription[0].equals("SSL_VERIFY_ERROR")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.SslVerifyError(p1); + } + if (ErrorDescription[0].equals("AUTH_UNKNOWN_TYPE")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.AuthUnknownType(p1); + } + if (ErrorDescription[0].equals("PIF_HAS_NO_V6_NETWORK_CONFIGURATION")) + { + throw new Types.PifHasNoV6NetworkConfiguration(); + } + if (ErrorDescription[0].equals("HA_SHOULD_BE_FENCED")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.HaShouldBeFenced(p1); + } + if (ErrorDescription[0].equals("OUT_OF_SPACE")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.OutOfSpace(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("RBAC_PERMISSION_DENIED")) { String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : ""; - throw new Types.PoolAuthDisableFailed(p1, p2); + throw new Types.RbacPermissionDenied(p1, p2); } - if (ErrorDescription[0].equals("HOST_HAS_NO_MANAGEMENT_IP")) + if (ErrorDescription[0].equals("HA_HOST_CANNOT_ACCESS_STATEFILE")) { - throw new Types.HostHasNoManagementIp(); + throw new Types.HaHostCannotAccessStatefile(); } - if (ErrorDescription[0].equals("TRANSPORT_PIF_NOT_CONFIGURED")) + if (ErrorDescription[0].equals("WLB_TIMEOUT")) { String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; - throw new Types.TransportPifNotConfigured(p1); + throw new Types.WlbTimeout(p1); } - if (ErrorDescription[0].equals("HA_IS_ENABLED")) - { - throw new Types.HaIsEnabled(); - } - if (ErrorDescription[0].equals("VM_REVERT_FAILED")) + if (ErrorDescription[0].equals("HA_ABORT_NEW_MASTER")) { 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(); + throw new Types.HaAbortNewMaster(p1); } if (ErrorDescription[0].equals("PIF_CONFIGURATION_ERROR")) { @@ -1929,19 +1793,213 @@ public class Types String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : ""; throw new Types.PifConfigurationError(p1, p2); } - if (ErrorDescription[0].equals("INTERFACE_HAS_NO_IP")) + if (ErrorDescription[0].equals("VM_HAS_TOO_MANY_SNAPSHOTS")) { String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; - throw new Types.InterfaceHasNoIp(p1); + throw new Types.VmHasTooManySnapshots(p1); } - if (ErrorDescription[0].equals("HOSTS_NOT_COMPATIBLE")) + if (ErrorDescription[0].equals("PATCH_IS_APPLIED")) { - throw new Types.HostsNotCompatible(); + throw new Types.PatchIsApplied(); } - if (ErrorDescription[0].equals("AUTH_ENABLE_FAILED_WRONG_CREDENTIALS")) + if (ErrorDescription[0].equals("MIRROR_FAILED")) { String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; - throw new Types.AuthEnableFailedWrongCredentials(p1); + throw new Types.MirrorFailed(p1); + } + if (ErrorDescription[0].equals("AUTH_DISABLE_FAILED")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.AuthDisableFailed(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("CERTIFICATE_DOES_NOT_EXIST")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.CertificateDoesNotExist(p1); + } + if (ErrorDescription[0].equals("NETWORK_CONTAINS_VIF")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.NetworkContainsVif(p1); + } + if (ErrorDescription[0].equals("CANNOT_RESET_CONTROL_DOMAIN")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.CannotResetControlDomain(p1); + } + if (ErrorDescription[0].equals("WLB_AUTHENTICATION_FAILED")) + { + throw new Types.WlbAuthenticationFailed(); + } + if (ErrorDescription[0].equals("WLB_URL_INVALID")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.WlbUrlInvalid(p1); + } + 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("VM_NO_VCPUS")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.VmNoVcpus(p1); + } + if (ErrorDescription[0].equals("VM_HAS_CHECKPOINT")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.VmHasCheckpoint(p1); + } + if (ErrorDescription[0].equals("VBD_TRAY_LOCKED")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.VbdTrayLocked(p1); + } + if (ErrorDescription[0].equals("HOST_CANNOT_READ_METRICS")) + { + throw new Types.HostCannotReadMetrics(); + } + 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("MISSING_CONNECTION_DETAILS")) + { + throw new Types.MissingConnectionDetails(); + } + if (ErrorDescription[0].equals("PGPU_INSUFFICIENT_CAPACITY_FOR_VGPU")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : ""; + throw new Types.PgpuInsufficientCapacityForVgpu(p1, p2); + } + if (ErrorDescription[0].equals("VBD_CDS_MUST_BE_READONLY")) + { + throw new Types.VbdCdsMustBeReadonly(); + } + 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("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("IMPORT_ERROR")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.ImportError(p1); + } + if (ErrorDescription[0].equals("WLB_NOT_INITIALIZED")) + { + throw new Types.WlbNotInitialized(); + } + if (ErrorDescription[0].equals("VLAN_TAG_INVALID")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.VlanTagInvalid(p1); + } + if (ErrorDescription[0].equals("NO_MORE_REDO_LOGS_ALLOWED")) + { + throw new Types.NoMoreRedoLogsAllowed(); + } + 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("AUTH_DISABLE_FAILED_PERMISSION_DENIED")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.AuthDisableFailedPermissionDenied(p1); + } + if (ErrorDescription[0].equals("POOL_AUTH_ALREADY_ENABLED")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.PoolAuthAlreadyEnabled(p1); + } + if (ErrorDescription[0].equals("NO_HOSTS_AVAILABLE")) + { + throw new Types.NoHostsAvailable(); + } + if (ErrorDescription[0].equals("SR_HAS_MULTIPLE_PBDS")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.SrHasMultiplePbds(p1); + } + 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("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("CANNOT_ADD_TUNNEL_TO_BOND_SLAVE")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.CannotAddTunnelToBondSlave(p1); + } + if (ErrorDescription[0].equals("HOST_POWER_ON_MODE_DISABLED")) + { + throw new Types.HostPowerOnModeDisabled(); + } + if (ErrorDescription[0].equals("ILLEGAL_VBD_DEVICE")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : ""; + throw new Types.IllegalVbdDevice(p1, p2); + } + if (ErrorDescription[0].equals("VM_REQUIRES_VGPU")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : ""; + String p3 = ErrorDescription.length > 3 ? ErrorDescription[3] : ""; + throw new Types.VmRequiresVgpu(p1, p2, p3); + } + if (ErrorDescription[0].equals("INVALID_PATCH_WITH_LOG")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.InvalidPatchWithLog(p1); + } + if (ErrorDescription[0].equals("PIF_IS_VLAN")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.PifIsVlan(p1); + } + if (ErrorDescription[0].equals("HA_CANNOT_CHANGE_BOND_STATUS_OF_MGMT_IFACE")) + { + throw new Types.HaCannotChangeBondStatusOfMgmtIface(); + } + if (ErrorDescription[0].equals("NOT_SYSTEM_DOMAIN")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.NotSystemDomain(p1); + } + if (ErrorDescription[0].equals("HA_NOT_INSTALLED")) + { + String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : ""; + throw new Types.HaNotInstalled(p1); } // An unknown error occurred @@ -1951,6 +2009,29 @@ public class Types throw new BadServerResponse(response); } + public enum AllocationAlgorithm { + /** + * The value does not belong to this enumeration + */ + UNRECOGNIZED, + /** + * vGPUs of a given type are allocated evenly across supporting pGPUs. + */ + BREADTH_FIRST, + /** + * vGPUs of a given type are allocated on supporting pGPUs until they are full. + */ + DEPTH_FIRST; + public String toString() { + if (this == UNRECOGNIZED) return "UNRECOGNIZED"; + if (this == BREADTH_FIRST) return "breadth_first"; + if (this == DEPTH_FIRST) return "depth_first"; + /* This can never be reached */ + return "illegal enum"; + } + + }; + public enum VdiOperations { /** * The value does not belong to this enumeration @@ -2005,34 +2086,21 @@ public class Types */ BLOCKED; public String toString() { - if (this == UNRECOGNIZED) - return "UNRECOGNIZED"; - if (this == SCAN) - return "scan"; - if (this == CLONE) - return "clone"; - if (this == COPY) - return "copy"; - if (this == RESIZE) - return "resize"; - if (this == RESIZE_ONLINE) - return "resize_online"; - if (this == SNAPSHOT) - return "snapshot"; - if (this == DESTROY) - return "destroy"; - if (this == FORGET) - return "forget"; - if (this == UPDATE) - return "update"; - if (this == FORCE_UNLOCK) - return "force_unlock"; - if (this == GENERATE_CONFIG) - return "generate_config"; - if (this == BLOCKED) - return "blocked"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) return "UNRECOGNIZED"; + if (this == SCAN) return "scan"; + if (this == CLONE) return "clone"; + if (this == COPY) return "copy"; + if (this == RESIZE) return "resize"; + if (this == RESIZE_ONLINE) return "resize_online"; + if (this == SNAPSHOT) return "snapshot"; + if (this == DESTROY) return "destroy"; + if (this == FORGET) return "forget"; + if (this == UPDATE) return "update"; + if (this == FORCE_UNLOCK) return "force_unlock"; + if (this == GENERATE_CONFIG) return "generate_config"; + if (this == BLOCKED) return "blocked"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -2063,20 +2131,14 @@ public class Types */ VMPP; public String toString() { - if (this == UNRECOGNIZED) - return "UNRECOGNIZED"; - if (this == VM) - return "VM"; - if (this == HOST) - return "Host"; - if (this == SR) - return "SR"; - if (this == POOL) - return "Pool"; - if (this == VMPP) - return "VMPP"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) return "UNRECOGNIZED"; + if (this == VM) return "VM"; + if (this == HOST) return "Host"; + if (this == SR) return "SR"; + if (this == POOL) return "Pool"; + if (this == VMPP) return "VMPP"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -2119,26 +2181,17 @@ public class Types */ REDO_LOG; public String toString() { - if (this == UNRECOGNIZED) - return "UNRECOGNIZED"; - if (this == SYSTEM) - return "system"; - if (this == USER) - return "user"; - if (this == EPHEMERAL) - return "ephemeral"; - if (this == SUSPEND) - return "suspend"; - if (this == CRASHDUMP) - return "crashdump"; - if (this == HA_STATEFILE) - return "ha_statefile"; - if (this == METADATA) - return "metadata"; - if (this == REDO_LOG) - return "redo_log"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) return "UNRECOGNIZED"; + if (this == SYSTEM) return "system"; + if (this == USER) return "user"; + if (this == EPHEMERAL) return "ephemeral"; + if (this == SUSPEND) return "suspend"; + if (this == CRASHDUMP) return "crashdump"; + if (this == HA_STATEFILE) return "ha_statefile"; + if (this == METADATA) return "metadata"; + if (this == REDO_LOG) return "redo_log"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -2165,18 +2218,13 @@ public class Types */ RESTARTXAPI; public String toString() { - if (this == UNRECOGNIZED) - return "UNRECOGNIZED"; - if (this == RESTARTHVM) - return "restartHVM"; - if (this == RESTARTPV) - return "restartPV"; - if (this == RESTARTHOST) - return "restartHost"; - if (this == RESTARTXAPI) - return "restartXAPI"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) return "UNRECOGNIZED"; + if (this == RESTARTHVM) return "restartHVM"; + if (this == RESTARTPV) return "restartPV"; + if (this == RESTARTHOST) return "restartHost"; + if (this == RESTARTXAPI) return "restartXAPI"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -2199,16 +2247,12 @@ public class Types */ MOD; public String toString() { - if (this == UNRECOGNIZED) - return "UNRECOGNIZED"; - if (this == ADD) - return "add"; - if (this == DEL) - return "del"; - if (this == MOD) - return "mod"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) return "UNRECOGNIZED"; + if (this == ADD) return "add"; + if (this == DEL) return "del"; + if (this == MOD) return "mod"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -2227,14 +2271,11 @@ public class Types */ IPV6; public String toString() { - if (this == UNRECOGNIZED) - return "UNRECOGNIZED"; - if (this == IPV4) - return "IPv4"; - if (this == IPV6) - return "IPv6"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) return "UNRECOGNIZED"; + if (this == IPV4) return "IPv4"; + if (this == IPV6) return "IPv6"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -2249,12 +2290,10 @@ public class Types */ CANCEL; public String toString() { - if (this == UNRECOGNIZED) - return "UNRECOGNIZED"; - if (this == CANCEL) - return "cancel"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) return "UNRECOGNIZED"; + if (this == CANCEL) return "cancel"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -2285,20 +2324,14 @@ public class Types */ CANCELLED; public String toString() { - if (this == UNRECOGNIZED) - return "UNRECOGNIZED"; - if (this == PENDING) - return "pending"; - if (this == SUCCESS) - return "success"; - if (this == FAILURE) - return "failure"; - if (this == CANCELLING) - return "cancelling"; - if (this == CANCELLED) - return "cancelled"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) return "UNRECOGNIZED"; + if (this == PENDING) return "pending"; + if (this == SUCCESS) return "success"; + if (this == FAILURE) return "failure"; + if (this == CANCELLING) return "cancelling"; + if (this == CANCELLED) return "cancelled"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -2313,12 +2346,10 @@ public class Types */ ATTACHING; public String toString() { - if (this == UNRECOGNIZED) - return "UNRECOGNIZED"; - if (this == ATTACHING) - return "attaching"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) return "UNRECOGNIZED"; + if (this == ATTACHING) return "attaching"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -2341,16 +2372,12 @@ public class Types */ RDP; public String toString() { - if (this == UNRECOGNIZED) - return "UNRECOGNIZED"; - if (this == VT100) - return "vt100"; - if (this == RFB) - return "rfb"; - if (this == RDP) - return "rdp"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) return "UNRECOGNIZED"; + if (this == VT100) return "vt100"; + if (this == RFB) return "rfb"; + if (this == RDP) return "rdp"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -2385,22 +2412,15 @@ public class Types */ RENAME_RESTART; public String toString() { - if (this == UNRECOGNIZED) - return "UNRECOGNIZED"; - if (this == DESTROY) - return "destroy"; - if (this == COREDUMP_AND_DESTROY) - return "coredump_and_destroy"; - if (this == RESTART) - return "restart"; - if (this == COREDUMP_AND_RESTART) - return "coredump_and_restart"; - if (this == PRESERVE) - return "preserve"; - if (this == RENAME_RESTART) - return "rename_restart"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) return "UNRECOGNIZED"; + if (this == DESTROY) return "destroy"; + if (this == COREDUMP_AND_DESTROY) return "coredump_and_destroy"; + if (this == RESTART) return "restart"; + if (this == COREDUMP_AND_RESTART) return "coredump_and_restart"; + if (this == PRESERVE) return "preserve"; + if (this == RENAME_RESTART) return "rename_restart"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -2419,14 +2439,11 @@ public class Types */ CHECKPOINT; public String toString() { - if (this == UNRECOGNIZED) - return "UNRECOGNIZED"; - if (this == SNAPSHOT) - return "snapshot"; - if (this == CHECKPOINT) - return "checkpoint"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) return "UNRECOGNIZED"; + if (this == SNAPSHOT) return "snapshot"; + if (this == CHECKPOINT) return "checkpoint"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -2445,14 +2462,11 @@ public class Types */ RESTART; public String toString() { - if (this == UNRECOGNIZED) - return "UNRECOGNIZED"; - if (this == DESTROY) - return "destroy"; - if (this == RESTART) - return "restart"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) return "UNRECOGNIZED"; + if (this == DESTROY) return "destroy"; + if (this == RESTART) return "restart"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -2475,16 +2489,12 @@ public class Types */ UNPLUG; public String toString() { - if (this == UNRECOGNIZED) - return "UNRECOGNIZED"; - if (this == ATTACH) - return "attach"; - if (this == PLUG) - return "plug"; - if (this == UNPLUG) - return "unplug"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) return "UNRECOGNIZED"; + if (this == ATTACH) return "attach"; + if (this == PLUG) return "plug"; + if (this == UNPLUG) return "unplug"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -2591,7 +2601,7 @@ public class Types */ PIF_METRICS, /** - * + * */ BOND, /** @@ -2673,102 +2683,61 @@ public class Types /** * A virtual GPU (vGPU) */ - VGPU; + VGPU, + /** + * A type of virtual GPU + */ + VGPU_TYPE; public String toString() { - if (this == UNRECOGNIZED) - return "UNRECOGNIZED"; - if (this == SESSION) - return "session"; - if (this == AUTH) - return "auth"; - if (this == SUBJECT) - return "subject"; - if (this == ROLE) - return "role"; - if (this == TASK) - return "task"; - if (this == EVENT) - return "event"; - if (this == POOL) - return "pool"; - if (this == POOL_PATCH) - return "pool_patch"; - if (this == VM) - return "VM"; - if (this == VM_METRICS) - return "VM_metrics"; - if (this == VM_GUEST_METRICS) - return "VM_guest_metrics"; - if (this == VMPP) - return "VMPP"; - if (this == VM_APPLIANCE) - return "VM_appliance"; - if (this == DR_TASK) - return "DR_task"; - if (this == HOST) - return "host"; - if (this == HOST_CRASHDUMP) - return "host_crashdump"; - if (this == HOST_PATCH) - return "host_patch"; - if (this == HOST_METRICS) - return "host_metrics"; - if (this == HOST_CPU) - return "host_cpu"; - if (this == NETWORK) - return "network"; - if (this == VIF) - return "VIF"; - if (this == VIF_METRICS) - return "VIF_metrics"; - if (this == PIF) - return "PIF"; - if (this == PIF_METRICS) - return "PIF_metrics"; - if (this == BOND) - return "Bond"; - if (this == VLAN) - return "VLAN"; - if (this == SM) - return "SM"; - if (this == SR) - return "SR"; - if (this == VDI) - return "VDI"; - if (this == VBD) - return "VBD"; - if (this == VBD_METRICS) - return "VBD_metrics"; - if (this == PBD) - return "PBD"; - if (this == CRASHDUMP) - return "crashdump"; - if (this == VTPM) - return "VTPM"; - if (this == CONSOLE) - return "console"; - if (this == USER) - return "user"; - if (this == DATA_SOURCE) - return "data_source"; - if (this == BLOB) - return "blob"; - if (this == MESSAGE) - return "message"; - if (this == SECRET) - return "secret"; - if (this == TUNNEL) - return "tunnel"; - if (this == PCI) - return "PCI"; - if (this == PGPU) - return "PGPU"; - if (this == GPU_GROUP) - return "GPU_group"; - if (this == VGPU) - return "VGPU"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) return "UNRECOGNIZED"; + if (this == SESSION) return "session"; + if (this == AUTH) return "auth"; + if (this == SUBJECT) return "subject"; + if (this == ROLE) return "role"; + if (this == TASK) return "task"; + if (this == EVENT) return "event"; + if (this == POOL) return "pool"; + if (this == POOL_PATCH) return "pool_patch"; + if (this == VM) return "VM"; + if (this == VM_METRICS) return "VM_metrics"; + if (this == VM_GUEST_METRICS) return "VM_guest_metrics"; + if (this == VMPP) return "VMPP"; + if (this == VM_APPLIANCE) return "VM_appliance"; + if (this == DR_TASK) return "DR_task"; + if (this == HOST) return "host"; + if (this == HOST_CRASHDUMP) return "host_crashdump"; + if (this == HOST_PATCH) return "host_patch"; + if (this == HOST_METRICS) return "host_metrics"; + if (this == HOST_CPU) return "host_cpu"; + if (this == NETWORK) return "network"; + if (this == VIF) return "VIF"; + if (this == VIF_METRICS) return "VIF_metrics"; + if (this == PIF) return "PIF"; + if (this == PIF_METRICS) return "PIF_metrics"; + if (this == BOND) return "Bond"; + if (this == VLAN) return "VLAN"; + if (this == SM) return "SM"; + if (this == SR) return "SR"; + if (this == VDI) return "VDI"; + if (this == VBD) return "VBD"; + if (this == VBD_METRICS) return "VBD_metrics"; + if (this == PBD) return "PBD"; + if (this == CRASHDUMP) return "crashdump"; + if (this == VTPM) return "VTPM"; + if (this == CONSOLE) return "console"; + if (this == USER) return "user"; + if (this == DATA_SOURCE) return "data_source"; + if (this == BLOB) return "blob"; + if (this == MESSAGE) return "message"; + if (this == SECRET) return "secret"; + if (this == TUNNEL) return "tunnel"; + if (this == PCI) return "PCI"; + if (this == PGPU) return "PGPU"; + if (this == GPU_GROUP) return "GPU_group"; + if (this == VGPU) return "VGPU"; + if (this == VGPU_TYPE) return "VGPU_type"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -2811,26 +2780,17 @@ public class Types */ VM_MIGRATE; public String toString() { - if (this == UNRECOGNIZED) - return "UNRECOGNIZED"; - if (this == PROVISION) - return "provision"; - if (this == EVACUATE) - return "evacuate"; - if (this == SHUTDOWN) - return "shutdown"; - if (this == REBOOT) - return "reboot"; - if (this == POWER_ON) - return "power_on"; - if (this == VM_START) - return "vm_start"; - if (this == VM_RESUME) - return "vm_resume"; - if (this == VM_MIGRATE) - return "vm_migrate"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) return "UNRECOGNIZED"; + if (this == PROVISION) return "provision"; + if (this == EVACUATE) return "evacuate"; + if (this == SHUTDOWN) return "shutdown"; + if (this == REBOOT) return "reboot"; + if (this == POWER_ON) return "power_on"; + if (this == VM_START) return "vm_start"; + if (this == VM_RESUME) return "vm_resume"; + if (this == VM_MIGRATE) return "vm_migrate"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -2857,18 +2817,13 @@ public class Types */ WEEKLY; public String toString() { - if (this == UNRECOGNIZED) - return "UNRECOGNIZED"; - if (this == NEVER) - return "never"; - if (this == ALWAYS_AFTER_BACKUP) - return "always_after_backup"; - if (this == DAILY) - return "daily"; - if (this == WEEKLY) - return "weekly"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) return "UNRECOGNIZED"; + if (this == NEVER) return "never"; + if (this == ALWAYS_AFTER_BACKUP) return "always_after_backup"; + if (this == DAILY) return "daily"; + if (this == WEEKLY) return "weekly"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -2891,16 +2846,12 @@ public class Types */ NFS; public String toString() { - if (this == UNRECOGNIZED) - return "UNRECOGNIZED"; - if (this == NONE) - return "none"; - if (this == CIFS) - return "cifs"; - if (this == NFS) - return "nfs"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) return "UNRECOGNIZED"; + if (this == NONE) return "none"; + if (this == CIFS) return "cifs"; + if (this == NFS) return "nfs"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -2919,14 +2870,11 @@ public class Types */ RW; public String toString() { - if (this == UNRECOGNIZED) - return "UNRECOGNIZED"; - if (this == RO) - return "RO"; - if (this == RW) - return "RW"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) return "UNRECOGNIZED"; + if (this == RO) return "RO"; + if (this == RW) return "RW"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -2953,18 +2901,13 @@ public class Types */ AUTOCONF; public String toString() { - if (this == UNRECOGNIZED) - return "UNRECOGNIZED"; - if (this == NONE) - return "None"; - if (this == DHCP) - return "DHCP"; - if (this == STATIC) - return "Static"; - if (this == AUTOCONF) - return "Autoconf"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) return "UNRECOGNIZED"; + if (this == NONE) return "None"; + if (this == DHCP) return "DHCP"; + if (this == STATIC) return "Static"; + if (this == AUTOCONF) return "Autoconf"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -2983,14 +2926,11 @@ public class Types */ DISK; public String toString() { - if (this == UNRECOGNIZED) - return "UNRECOGNIZED"; - if (this == CD) - return "CD"; - if (this == DISK) - return "Disk"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) return "UNRECOGNIZED"; + if (this == CD) return "CD"; + if (this == DISK) return "Disk"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -3009,14 +2949,11 @@ public class Types */ PERSIST; public String toString() { - if (this == UNRECOGNIZED) - return "UNRECOGNIZED"; - if (this == RESET) - return "reset"; - if (this == PERSIST) - return "persist"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) return "UNRECOGNIZED"; + if (this == RESET) return "reset"; + if (this == PERSIST) return "persist"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -3043,18 +2980,13 @@ public class Types */ SHUTDOWN; public String toString() { - if (this == UNRECOGNIZED) - return "UNRECOGNIZED"; - if (this == START) - return "start"; - if (this == CLEAN_SHUTDOWN) - return "clean_shutdown"; - if (this == HARD_SHUTDOWN) - return "hard_shutdown"; - if (this == SHUTDOWN) - return "shutdown"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) return "UNRECOGNIZED"; + if (this == START) return "start"; + if (this == CLEAN_SHUTDOWN) return "clean_shutdown"; + if (this == HARD_SHUTDOWN) return "hard_shutdown"; + if (this == SHUTDOWN) return "shutdown"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -3097,26 +3029,17 @@ public class Types */ UNPAUSE; public String toString() { - if (this == UNRECOGNIZED) - return "UNRECOGNIZED"; - if (this == ATTACH) - return "attach"; - if (this == EJECT) - return "eject"; - if (this == INSERT) - return "insert"; - if (this == PLUG) - return "plug"; - if (this == UNPLUG) - return "unplug"; - if (this == UNPLUG_FORCE) - return "unplug_force"; - if (this == PAUSE) - return "pause"; - if (this == UNPAUSE) - return "unpause"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) return "UNRECOGNIZED"; + if (this == ATTACH) return "attach"; + if (this == EJECT) return "eject"; + if (this == INSERT) return "insert"; + if (this == PLUG) return "plug"; + if (this == UNPLUG) return "unplug"; + if (this == UNPLUG_FORCE) return "unplug_force"; + if (this == PAUSE) return "pause"; + if (this == UNPAUSE) return "unpause"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -3139,16 +3062,12 @@ public class Types */ WEEKLY; public String toString() { - if (this == UNRECOGNIZED) - return "UNRECOGNIZED"; - if (this == HOURLY) - return "hourly"; - if (this == DAILY) - return "daily"; - if (this == WEEKLY) - return "weekly"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) return "UNRECOGNIZED"; + if (this == HOURLY) return "hourly"; + if (this == DAILY) return "daily"; + if (this == WEEKLY) return "weekly"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -3167,14 +3086,11 @@ public class Types */ DISABLED; public String toString() { - if (this == UNRECOGNIZED) - return "UNRECOGNIZED"; - if (this == UNLOCKED) - return "unlocked"; - if (this == DISABLED) - return "disabled"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) return "UNRECOGNIZED"; + if (this == UNLOCKED) return "unlocked"; + if (this == DISABLED) return "disabled"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -3201,18 +3117,13 @@ public class Types */ SUSPENDED; public String toString() { - if (this == UNRECOGNIZED) - return "UNRECOGNIZED"; - if (this == HALTED) - return "Halted"; - if (this == PAUSED) - return "Paused"; - if (this == RUNNING) - return "Running"; - if (this == SUSPENDED) - return "Suspended"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) return "UNRECOGNIZED"; + if (this == HALTED) return "Halted"; + if (this == PAUSED) return "Paused"; + if (this == RUNNING) return "Running"; + if (this == SUSPENDED) return "Suspended"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -3330,6 +3241,10 @@ public class Types * refers to the operation "query_services" */ QUERY_SERVICES, + /** + * refers to the operation "shutdown" + */ + SHUTDOWN, /** * Changing the memory settings */ @@ -3367,7 +3282,7 @@ public class Types */ CHANGING_VCPUS_LIVE, /** - * + * */ ASSERT_OPERATION_VALID, /** @@ -3375,7 +3290,7 @@ public class Types */ DATA_SOURCE_OP, /** - * + * */ UPDATE_ALLOWED_OPERATIONS, /** @@ -3403,100 +3318,55 @@ public class Types */ DESTROY; public String toString() { - if (this == UNRECOGNIZED) - return "UNRECOGNIZED"; - if (this == SNAPSHOT) - return "snapshot"; - if (this == CLONE) - return "clone"; - if (this == COPY) - return "copy"; - if (this == CREATE_TEMPLATE) - return "create_template"; - if (this == REVERT) - return "revert"; - if (this == CHECKPOINT) - return "checkpoint"; - if (this == SNAPSHOT_WITH_QUIESCE) - return "snapshot_with_quiesce"; - if (this == PROVISION) - return "provision"; - if (this == START) - return "start"; - if (this == START_ON) - return "start_on"; - if (this == PAUSE) - return "pause"; - if (this == UNPAUSE) - return "unpause"; - if (this == CLEAN_SHUTDOWN) - return "clean_shutdown"; - if (this == CLEAN_REBOOT) - return "clean_reboot"; - if (this == HARD_SHUTDOWN) - return "hard_shutdown"; - if (this == POWER_STATE_RESET) - return "power_state_reset"; - if (this == HARD_REBOOT) - return "hard_reboot"; - if (this == SUSPEND) - return "suspend"; - if (this == CSVM) - return "csvm"; - if (this == RESUME) - return "resume"; - if (this == RESUME_ON) - return "resume_on"; - if (this == POOL_MIGRATE) - return "pool_migrate"; - if (this == MIGRATE_SEND) - return "migrate_send"; - if (this == GET_BOOT_RECORD) - return "get_boot_record"; - if (this == SEND_SYSRQ) - return "send_sysrq"; - if (this == SEND_TRIGGER) - return "send_trigger"; - if (this == QUERY_SERVICES) - return "query_services"; - if (this == CHANGING_MEMORY_LIVE) - return "changing_memory_live"; - if (this == AWAITING_MEMORY_LIVE) - return "awaiting_memory_live"; - if (this == CHANGING_DYNAMIC_RANGE) - return "changing_dynamic_range"; - if (this == CHANGING_STATIC_RANGE) - return "changing_static_range"; - if (this == CHANGING_MEMORY_LIMITS) - return "changing_memory_limits"; - if (this == CHANGING_SHADOW_MEMORY) - return "changing_shadow_memory"; - if (this == CHANGING_SHADOW_MEMORY_LIVE) - return "changing_shadow_memory_live"; - if (this == CHANGING_VCPUS) - return "changing_VCPUs"; - if (this == CHANGING_VCPUS_LIVE) - return "changing_VCPUs_live"; - if (this == ASSERT_OPERATION_VALID) - return "assert_operation_valid"; - if (this == DATA_SOURCE_OP) - return "data_source_op"; - if (this == UPDATE_ALLOWED_OPERATIONS) - return "update_allowed_operations"; - if (this == MAKE_INTO_TEMPLATE) - return "make_into_template"; - if (this == IMPORT) - return "import"; - if (this == EXPORT) - return "export"; - if (this == METADATA_EXPORT) - return "metadata_export"; - if (this == REVERTING) - return "reverting"; - if (this == DESTROY) - return "destroy"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) return "UNRECOGNIZED"; + if (this == SNAPSHOT) return "snapshot"; + if (this == CLONE) return "clone"; + if (this == COPY) return "copy"; + if (this == CREATE_TEMPLATE) return "create_template"; + if (this == REVERT) return "revert"; + if (this == CHECKPOINT) return "checkpoint"; + if (this == SNAPSHOT_WITH_QUIESCE) return "snapshot_with_quiesce"; + if (this == PROVISION) return "provision"; + if (this == START) return "start"; + if (this == START_ON) return "start_on"; + if (this == PAUSE) return "pause"; + if (this == UNPAUSE) return "unpause"; + if (this == CLEAN_SHUTDOWN) return "clean_shutdown"; + if (this == CLEAN_REBOOT) return "clean_reboot"; + if (this == HARD_SHUTDOWN) return "hard_shutdown"; + if (this == POWER_STATE_RESET) return "power_state_reset"; + if (this == HARD_REBOOT) return "hard_reboot"; + if (this == SUSPEND) return "suspend"; + if (this == CSVM) return "csvm"; + if (this == RESUME) return "resume"; + if (this == RESUME_ON) return "resume_on"; + if (this == POOL_MIGRATE) return "pool_migrate"; + if (this == MIGRATE_SEND) return "migrate_send"; + if (this == GET_BOOT_RECORD) return "get_boot_record"; + if (this == SEND_SYSRQ) return "send_sysrq"; + if (this == SEND_TRIGGER) return "send_trigger"; + if (this == QUERY_SERVICES) return "query_services"; + if (this == SHUTDOWN) return "shutdown"; + if (this == CHANGING_MEMORY_LIVE) return "changing_memory_live"; + if (this == AWAITING_MEMORY_LIVE) return "awaiting_memory_live"; + if (this == CHANGING_DYNAMIC_RANGE) return "changing_dynamic_range"; + if (this == CHANGING_STATIC_RANGE) return "changing_static_range"; + if (this == CHANGING_MEMORY_LIMITS) return "changing_memory_limits"; + if (this == CHANGING_SHADOW_MEMORY) return "changing_shadow_memory"; + if (this == CHANGING_SHADOW_MEMORY_LIVE) return "changing_shadow_memory_live"; + if (this == CHANGING_VCPUS) return "changing_VCPUs"; + if (this == CHANGING_VCPUS_LIVE) return "changing_VCPUs_live"; + if (this == ASSERT_OPERATION_VALID) return "assert_operation_valid"; + if (this == DATA_SOURCE_OP) return "data_source_op"; + if (this == UPDATE_ALLOWED_OPERATIONS) return "update_allowed_operations"; + if (this == MAKE_INTO_TEMPLATE) return "make_into_template"; + if (this == IMPORT) return "import"; + if (this == EXPORT) return "export"; + if (this == METADATA_EXPORT) return "metadata_export"; + if (this == REVERTING) return "reverting"; + if (this == DESTROY) return "destroy"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -3519,16 +3389,12 @@ public class Types */ LACP; public String toString() { - if (this == UNRECOGNIZED) - return "UNRECOGNIZED"; - if (this == BALANCE_SLB) - return "balance-slb"; - if (this == ACTIVE_BACKUP) - return "active-backup"; - if (this == LACP) - return "lacp"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) return "UNRECOGNIZED"; + if (this == BALANCE_SLB) return "balance-slb"; + if (this == ACTIVE_BACKUP) return "active-backup"; + if (this == LACP) return "lacp"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -3551,16 +3417,12 @@ public class Types */ STATIC; public String toString() { - if (this == UNRECOGNIZED) - return "UNRECOGNIZED"; - if (this == NONE) - return "None"; - if (this == DHCP) - return "DHCP"; - if (this == STATIC) - return "Static"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) return "UNRECOGNIZED"; + if (this == NONE) return "None"; + if (this == DHCP) return "DHCP"; + if (this == STATIC) return "Static"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -3627,38 +3489,23 @@ public class Types */ PBD_DESTROY; public String toString() { - if (this == UNRECOGNIZED) - return "UNRECOGNIZED"; - if (this == SCAN) - return "scan"; - if (this == DESTROY) - return "destroy"; - if (this == FORGET) - return "forget"; - if (this == PLUG) - return "plug"; - if (this == UNPLUG) - return "unplug"; - if (this == UPDATE) - return "update"; - if (this == VDI_CREATE) - return "vdi_create"; - if (this == VDI_INTRODUCE) - return "vdi_introduce"; - if (this == VDI_DESTROY) - return "vdi_destroy"; - if (this == VDI_RESIZE) - return "vdi_resize"; - if (this == VDI_CLONE) - return "vdi_clone"; - if (this == VDI_SNAPSHOT) - return "vdi_snapshot"; - if (this == PBD_CREATE) - return "pbd_create"; - if (this == PBD_DESTROY) - return "pbd_destroy"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) return "UNRECOGNIZED"; + if (this == SCAN) return "scan"; + if (this == DESTROY) return "destroy"; + if (this == FORGET) return "forget"; + if (this == PLUG) return "plug"; + if (this == UNPLUG) return "unplug"; + if (this == UPDATE) return "update"; + if (this == VDI_CREATE) return "vdi_create"; + if (this == VDI_INTRODUCE) return "vdi_introduce"; + if (this == VDI_DESTROY) return "vdi_destroy"; + if (this == VDI_RESIZE) return "vdi_resize"; + if (this == VDI_CLONE) return "vdi_clone"; + if (this == VDI_SNAPSHOT) return "vdi_snapshot"; + if (this == PBD_CREATE) return "pbd_create"; + if (this == PBD_DESTROY) return "pbd_destroy"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -3685,232 +3532,17 @@ public class Types */ DISABLED; public String toString() { - if (this == UNRECOGNIZED) - return "UNRECOGNIZED"; - if (this == NETWORK_DEFAULT) - return "network_default"; - if (this == LOCKED) - return "locked"; - if (this == UNLOCKED) - return "unlocked"; - if (this == DISABLED) - return "disabled"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) return "UNRECOGNIZED"; + if (this == NETWORK_DEFAULT) return "network_default"; + if (this == LOCKED) return "locked"; + if (this == UNLOCKED) return "unlocked"; + if (this == DISABLED) return "disabled"; + /* This can never be reached */ + return "illegal enum"; } }; - /** - * The restore could not be performed because a network interface is missing - */ - public static class RestoreTargetMissingDevice extends XenAPIException { - public final String device; - - /** - * Create a new RestoreTargetMissingDevice - * - * @param device - */ - public RestoreTargetMissingDevice(String device) { - super("The restore could not be performed because a network interface is missing"); - this.device = device; - } - - } - - /** - * The communication with the WLB server timed out. - */ - public static class WlbTimeout extends XenAPIException { - public final String configuredTimeout; - - /** - * Create a new WlbTimeout - * - * @param configuredTimeout - */ - public WlbTimeout(String configuredTimeout) { - super("The communication with the WLB server timed out."); - this.configuredTimeout = configuredTimeout; - } - - } - - /** - * The MAC address specified doesn't exist on this host. - */ - public static class MacDoesNotExist extends XenAPIException { - public final String MAC; - - /** - * Create a new MacDoesNotExist - * - * @param MAC - */ - public MacDoesNotExist(String MAC) { - super("The MAC address specified doesn't exist on this host."); - this.MAC = MAC; - } - - } - - /** - * You gave an invalid object reference. The object may have recently been deleted. The class parameter gives the type of reference given, and the handle parameter echoes the bad value given. - */ - public static class HandleInvalid extends XenAPIException { - public final String clazz; - public final String handle; - - /** - * Create a new HandleInvalid - * - * @param clazz - * @param handle - */ - public HandleInvalid(String clazz, String handle) { - super("You gave an invalid object reference. The object may have recently been deleted. The class parameter gives the type of reference given, and the handle parameter echoes the bad value given."); - this.clazz = clazz; - this.handle = handle; - } - - } - - /** - * The device is already attached to a VM - */ - public static class DeviceAlreadyAttached extends XenAPIException { - public final String device; - - /** - * Create a new DeviceAlreadyAttached - * - * @param device - */ - public DeviceAlreadyAttached(String device) { - super("The device is already attached to a VM"); - this.device = device; - } - - } - - /** - * A required parameter contained an invalid IP address - */ - public static class InvalidIpAddressSpecified extends XenAPIException { - public final String parameter; - - /** - * Create a new InvalidIpAddressSpecified - * - * @param parameter - */ - public InvalidIpAddressSpecified(String parameter) { - super("A required parameter contained an invalid IP address"); - this.parameter = parameter; - } - - } - - /** - * The SR operation cannot be performed because the SR is not empty. - */ - public static class SrNotEmpty extends XenAPIException { - - /** - * Create a new SrNotEmpty - */ - public SrNotEmpty() { - super("The SR operation cannot be performed because the SR is not empty."); - } - - } - - /** - * HVM is required for this operation - */ - public static class VmHvmRequired extends XenAPIException { - public final String vm; - - /** - * Create a new VmHvmRequired - * - * @param vm - */ - public VmHvmRequired(String vm) { - super("HVM is required for this operation"); - this.vm = vm; - } - - } - - /** - * The GPU group contains active PGPUs and cannot be deleted. - */ - public static class GpuGroupContainsPgpu extends XenAPIException { - public final String pgpus; - - /** - * Create a new GpuGroupContainsPgpu - * - * @param pgpus - */ - public GpuGroupContainsPgpu(String pgpus) { - super("The GPU group contains active PGPUs and cannot be deleted."); - this.pgpus = pgpus; - } - - } - - /** - * Operation cannot proceed while a tunnel exists on this interface. - */ - public static class PifTunnelStillExists extends XenAPIException { - public final String PIF; - - /** - * Create a new PifTunnelStillExists - * - * @param PIF - */ - public PifTunnelStillExists(String PIF) { - super("Operation cannot proceed while a tunnel exists on this interface."); - this.PIF = PIF; - } - - } - - /** - * A bond must consist of at least two member interfaces - */ - public static class PifBondNeedsMoreMembers extends XenAPIException { - - /** - * Create a new PifBondNeedsMoreMembers - */ - public PifBondNeedsMoreMembers() { - super("A bond must consist of at least two member interfaces"); - } - - } - - /** - * This operation cannot be performed because the pif is bonded. - */ - public static class PifAlreadyBonded extends XenAPIException { - public final String PIF; - - /** - * Create a new PifAlreadyBonded - * - * @param PIF - */ - public PifAlreadyBonded(String PIF) { - super("This operation cannot be performed because the pif is bonded."); - this.PIF = PIF; - } - - } /** * The disaster recovery task could not be cleanly destroyed. @@ -3931,1110 +3563,37 @@ public class Types } /** - * You tried to create a VLAN, but the tag you gave was invalid -- it must be between 0 and 4094. The parameter echoes the VLAN tag you gave. + * The VM could not be imported because attached disks could not be found. */ - public static class VlanTagInvalid extends XenAPIException { - public final String VLAN; + public static class ImportErrorAttachedDisksNotFound extends XenAPIException { /** - * Create a new VlanTagInvalid - * - * @param VLAN + * Create a new ImportErrorAttachedDisksNotFound */ - public VlanTagInvalid(String VLAN) { - super("You tried to create a VLAN, but the tag you gave was invalid -- it must be between 0 and 4094. The parameter echoes the VLAN tag you gave."); - this.VLAN = VLAN; + public ImportErrorAttachedDisksNotFound() { + super("The VM could not be imported because attached disks could not be found."); } } /** - * You cannot make regular API calls directly on a slave. Please pass API calls via the master host. + * An error occurred while attempting to import a database from a metadata VDI */ - public static class HostIsSlave extends XenAPIException { - public final String masterIPAddress; - - /** - * Create a new HostIsSlave - * - * @param masterIPAddress - */ - public HostIsSlave(String masterIPAddress) { - super("You cannot make regular API calls directly on a slave. Please pass API calls via the master host."); - this.masterIPAddress = masterIPAddress; - } - - } - - /** - * The SR.shared flag cannot be set to false while the SR remains connected to multiple hosts - */ - public static class SrHasMultiplePbds extends XenAPIException { - public final String PBD; - - /** - * Create a new SrHasMultiplePbds - * - * @param PBD - */ - public SrHasMultiplePbds(String PBD) { - super("The SR.shared flag cannot be set to false while the SR remains connected to multiple hosts"); - this.PBD = PBD; - } - - } - - /** - * The pool failed to enable external authentication. - */ - public static class PoolAuthEnableFailedInvalidOu extends XenAPIException { - public final String host; - public final String message; - - /** - * Create a new PoolAuthEnableFailedInvalidOu - * - * @param host - * @param message - */ - public PoolAuthEnableFailedInvalidOu(String host, String message) { - super("The pool failed to enable external authentication."); - this.host = host; - this.message = message; - } - - } - - /** - * Some data checksums were incorrect; the VM may be corrupt. - */ - public static class ImportErrorSomeChecksumsFailed extends XenAPIException { - - /** - * Create a new ImportErrorSomeChecksumsFailed - */ - public ImportErrorSomeChecksumsFailed() { - super("Some data checksums were incorrect; the VM may be corrupt."); - } - - } - - /** - * This operation needs the OpenVSwitch networking backend to be enabled on all hosts in the pool. - */ - public static class OpenvswitchNotActive extends XenAPIException { - - /** - * Create a new OpenvswitchNotActive - */ - public OpenvswitchNotActive() { - super("This operation needs the OpenVSwitch networking backend to be enabled on all hosts in the pool."); - } - - } - - /** - * The backup partition to stream the updat to cannot be found - */ - public static class CannotFindOemBackupPartition extends XenAPIException { - - /** - * Create a new CannotFindOemBackupPartition - */ - public CannotFindOemBackupPartition() { - super("The backup partition to stream the updat to cannot be found"); - } - - } - - /** - * The specified device was not found. - */ - public static class PifDeviceNotFound extends XenAPIException { - - /** - * Create a new PifDeviceNotFound - */ - public PifDeviceNotFound() { - super("The specified device was not found."); - } - - } - - /** - * An internal error generated by the domain builder. - */ - public static class DomainBuilderError extends XenAPIException { - public final String function; - public final String code; - public final String message; - - /** - * Create a new DomainBuilderError - * - * @param function - * @param code - * @param message - */ - public DomainBuilderError(String function, String code, String message) { - super("An internal error generated by the domain builder."); - this.function = function; - this.code = code; - this.message = message; - } - - } - - /** - * The patch precheck stage failed: there are one or more VMs still running on the server. All VMs must be suspended before the patch can be applied. - */ - public static class PatchPrecheckFailedVmRunning extends XenAPIException { - public final String patch; - - /** - * Create a new PatchPrecheckFailedVmRunning - * - * @param patch - */ - public PatchPrecheckFailedVmRunning(String patch) { - super("The patch precheck stage failed: there are one or more VMs still running on the server. All VMs must be suspended before the patch can be applied."); - this.patch = patch; - } - - } - - /** - * You attempted to run a VM on a host which doesn't have I/O virtualisation (IOMMU/VT-d) enabled, which is needed by the VM. - */ - public static class VmRequiresIommu extends XenAPIException { - public final String host; - - /** - * Create a new VmRequiresIommu - * - * @param host - */ - public VmRequiresIommu(String host) { - super("You attempted to run a VM on a host which doesn't have I/O virtualisation (IOMMU/VT-d) enabled, which is needed by the VM."); - this.host = host; - } - - } - - /** - * The operation failed because the HA software on the specified host could not see a subset of other hosts. Check your network connectivity. - */ - public static class HaHostCannotSeePeers extends XenAPIException { - public final String host; - public final String all; - public final String subset; - - /** - * Create a new HaHostCannotSeePeers - * - * @param host - * @param all - * @param subset - */ - public HaHostCannotSeePeers(String host, String all, String subset) { - super("The operation failed because the HA software on the specified host could not see a subset of other hosts. Check your network connectivity."); - this.host = host; - this.all = all; - this.subset = subset; - } - - } - - /** - * The pool failed to disable the external authentication of at least one host. - */ - public static class PoolAuthDisableFailedPermissionDenied extends XenAPIException { - public final String host; - public final String message; - - /** - * Create a new PoolAuthDisableFailedPermissionDenied - * - * @param host - * @param message - */ - public PoolAuthDisableFailedPermissionDenied(String host, String message) { - super("The pool failed to disable the external authentication of at least one host."); - this.host = host; - this.message = message; - } - - } - - /** - * Caller not allowed to perform this operation. - */ - public static class PermissionDenied extends XenAPIException { - public final String message; - - /** - * Create a new PermissionDenied - * - * @param message - */ - public PermissionDenied(String message) { - super("Caller not allowed to perform this operation."); - this.message = message; - } - - } - - /** - * The remote system's SSL certificate failed to verify against our certificate library. - */ - public static class SslVerifyError extends XenAPIException { + public static class CouldNotImportDatabase extends XenAPIException { public final String reason; /** - * Create a new SslVerifyError + * Create a new CouldNotImportDatabase * * @param reason */ - public SslVerifyError(String reason) { - super("The remote system's SSL certificate failed to verify against our certificate library."); + public CouldNotImportDatabase(String reason) { + super("An error occurred while attempting to import a database from a metadata VDI"); this.reason = reason; } } - /** - * Attaching this SR failed. - */ - public static class SrAttachFailed extends XenAPIException { - public final String sr; - - /** - * Create a new SrAttachFailed - * - * @param sr - */ - public SrAttachFailed(String sr) { - super("Attaching this SR failed."); - this.sr = sr; - } - - } - - /** - * Subject already exists. - */ - public static class SubjectAlreadyExists extends XenAPIException { - - /** - * Create a new SubjectAlreadyExists - */ - public SubjectAlreadyExists() { - super("Subject already exists."); - } - - } - - /** - * This host lost access to the HA statefile. - */ - public static class HaLostStatefile extends XenAPIException { - - /** - * Create a new HaLostStatefile - */ - public HaLostStatefile() { - super("This host lost access to the HA statefile."); - } - - } - - /** - * The operation could not be performed because HA is not enabled on the Pool - */ - public static class HaNotEnabled extends XenAPIException { - - /** - * Create a new HaNotEnabled - */ - public HaNotEnabled() { - super("The operation could not be performed because HA is not enabled on the Pool"); - } - - } - - /** - * The host could not join the liveset because the HA daemon failed to start. - */ - public static class HaHeartbeatDaemonStartupFailed extends XenAPIException { - - /** - * Create a new HaHeartbeatDaemonStartupFailed - */ - public HaHeartbeatDaemonStartupFailed() { - super("The host could not join the liveset because the HA daemon failed to start."); - } - - } - - /** - * This session is not registered to receive events. You must call event.register before event.next. The session handle you are using is echoed. - */ - public static class SessionNotRegistered extends XenAPIException { - public final String handle; - - /** - * Create a new SessionNotRegistered - * - * @param handle - */ - public SessionNotRegistered(String handle) { - super("This session is not registered to receive events. You must call event.register before event.next. The session handle you are using is echoed."); - this.handle = handle; - } - - } - - /** - * This VM does not have a suspend SR specified. - */ - public static class VmNoSuspendSr extends XenAPIException { - public final String vm; - - /** - * Create a new VmNoSuspendSr - * - * @param vm - */ - public VmNoSuspendSr(String vm) { - super("This VM does not have a suspend SR specified."); - this.vm = vm; - } - - } - - /** - * You attempted to migrate a VM with more than one snapshot. - */ - public static class VmHasTooManySnapshots extends XenAPIException { - public final String vm; - - /** - * Create a new VmHasTooManySnapshots - * - * @param vm - */ - public VmHasTooManySnapshots(String vm) { - super("You attempted to migrate a VM with more than one snapshot."); - this.vm = vm; - } - - } - - /** - * The patch apply failed. Please see attached output. - */ - public static class PatchApplyFailed extends XenAPIException { - public final String output; - - /** - * Create a new PatchApplyFailed - * - * @param output - */ - public PatchApplyFailed(String output) { - super("The patch apply failed. Please see attached output."); - this.output = output; - } - - } - - /** - * The operation required write access but this VDI is read-only - */ - public static class VdiReadonly extends XenAPIException { - public final String vdi; - - /** - * Create a new VdiReadonly - * - * @param vdi - */ - public VdiReadonly(String vdi) { - super("The operation required write access but this VDI is read-only"); - this.vdi = vdi; - } - - } - - /** - * The SR is full. Requested new size exceeds the maximum size - */ - public static class SrFull extends XenAPIException { - public final String requested; - public final String maximum; - - /** - * Create a new SrFull - * - * @param requested - * @param maximum - */ - public SrFull(String requested, String maximum) { - super("The SR is full. Requested new size exceeds the maximum size"); - this.requested = requested; - this.maximum = maximum; - } - - } - - /** - * You attempted to run a VM on a host which doesn't have a pGPU available in the GPU group needed by the VM. The VM has a vGPU attached to this GPU group. - */ - public static class VmRequiresGpu extends XenAPIException { - public final String vm; - public final String GPUGroup; - - /** - * Create a new VmRequiresGpu - * - * @param vm - * @param GPUGroup - */ - public VmRequiresGpu(String vm, String GPUGroup) { - super("You attempted to run a VM on a host which doesn't have a pGPU available in the GPU group needed by the VM. The VM has a vGPU attached to this GPU group."); - this.vm = vm; - this.GPUGroup = GPUGroup; - } - - } - - /** - * This operation cannot be performed because this VDI could not be properly attached to the VM. - */ - public static class VdiNotAvailable extends XenAPIException { - public final String vdi; - - /** - * Create a new VdiNotAvailable - * - * @param vdi - */ - public VdiNotAvailable(String vdi) { - super("This operation cannot be performed because this VDI could not be properly attached to the VM."); - this.vdi = vdi; - } - - } - - /** - * The server failed to unmarshal the XMLRPC message; it was expecting one element and received something else. - */ - public static class XmlrpcUnmarshalFailure extends XenAPIException { - public final String expected; - public final String received; - - /** - * Create a new XmlrpcUnmarshalFailure - * - * @param expected - * @param received - */ - public XmlrpcUnmarshalFailure(String expected, String received) { - super("The server failed to unmarshal the XMLRPC message; it was expecting one element and received something else."); - this.expected = expected; - this.received = received; - } - - } - - /** - * A CRL already exists with the specified name. - */ - public static class CrlAlreadyExists extends XenAPIException { - public final String name; - - /** - * Create a new CrlAlreadyExists - * - * @param name - */ - public CrlAlreadyExists(String name) { - super("A CRL already exists with the specified name."); - this.name = name; - } - - } - - /** - * The master reports that it cannot talk back to the slave on the supplied management IP address. - */ - public static class HostMasterCannotTalkBack extends XenAPIException { - public final String ip; - - /** - * Create a new HostMasterCannotTalkBack - * - * @param ip - */ - public HostMasterCannotTalkBack(String ip) { - super("The master reports that it cannot talk back to the slave on the supplied management IP address."); - this.ip = ip; - } - - } - - /** - * 3rd party xapi hook failed - */ - public static class XapiHookFailed extends XenAPIException { - public final String hookName; - public final String reason; - public final String stdout; - public final String exitCode; - - /** - * Create a new XapiHookFailed - * - * @param hookName - * @param reason - * @param stdout - * @param exitCode - */ - public XapiHookFailed(String hookName, String reason, String stdout, String exitCode) { - super("3rd party xapi hook failed"); - this.hookName = hookName; - this.reason = reason; - this.stdout = stdout; - this.exitCode = exitCode; - } - - } - - /** - * The import failed because this export has been created by a different (incompatible) product version - */ - public static class ImportIncompatibleVersion extends XenAPIException { - - /** - * Create a new ImportIncompatibleVersion - */ - public ImportIncompatibleVersion() { - super("The import failed because this export has been created by a different (incompatible) product version"); - } - - } - - /** - * The requested bootloader is unknown - */ - public static class UnknownBootloader extends XenAPIException { - public final String vm; - public final String bootloader; - - /** - * Create a new UnknownBootloader - * - * @param vm - * @param bootloader - */ - public UnknownBootloader(String vm, String bootloader) { - super("The requested bootloader is unknown"); - this.vm = vm; - this.bootloader = bootloader; - } - - } - - /** - * The Citrix XenServer Vss Provider is not loaded - */ - public static class XenVssReqErrorProvNotLoaded extends XenAPIException { - public final String vm; - public final String errorCode; - - /** - * Create a new XenVssReqErrorProvNotLoaded - * - * @param vm - * @param errorCode - */ - public XenVssReqErrorProvNotLoaded(String vm, String errorCode) { - super("The Citrix XenServer Vss Provider is not loaded"); - this.vm = vm; - this.errorCode = errorCode; - } - - } - - /** - * The VM is set up to use a feature that requires it to boot as HVM. - */ - public static class FeatureRequiresHvm extends XenAPIException { - public final String details; - - /** - * Create a new FeatureRequiresHvm - * - * @param details - */ - public FeatureRequiresHvm(String details) { - super("The VM is set up to use a feature that requires it to boot as HVM."); - this.details = details; - } - - } - - /** - * The operation could not proceed because necessary VDIs were already locked at the storage level. - */ - public static class SrVdiLockingFailed extends XenAPIException { - - /** - * Create a new SrVdiLockingFailed - */ - public SrVdiLockingFailed() { - super("The operation could not proceed because necessary VDIs were already locked at the storage level."); - } - - } - - /** - * You tried to destroy a PIF, but it represents an aspect of the physical host configuration, and so cannot be destroyed. The parameter echoes the PIF handle you gave. - */ - public static class PifIsPhysical extends XenAPIException { - public final String PIF; - - /** - * Create a new PifIsPhysical - * - * @param PIF - */ - public PifIsPhysical(String PIF) { - super("You tried to destroy a PIF, but it represents an aspect of the physical host configuration, and so cannot be destroyed. The parameter echoes the PIF handle you gave."); - this.PIF = PIF; - } - - } - - /** - * You tried to add a key-value pair to a map, but that key is already there. - */ - public static class MapDuplicateKey extends XenAPIException { - public final String type; - public final String paramName; - public final String uuid; - public final String key; - - /** - * Create a new MapDuplicateKey - * - * @param type - * @param paramName - * @param uuid - * @param key - */ - public MapDuplicateKey(String type, String paramName, String uuid, String key) { - super("You tried to add a key-value pair to a map, but that key is already there."); - this.type = type; - this.paramName = paramName; - this.uuid = uuid; - this.key = key; - } - - } - - /** - * The license-server connection details (address or port) were missing or incomplete. - */ - public static class MissingConnectionDetails extends XenAPIException { - - /** - * Create a new MissingConnectionDetails - */ - public MissingConnectionDetails() { - super("The license-server connection details (address or port) were missing or incomplete."); - } - - } - - /** - * Could not create the XML string generated by the transportable snapshot - */ - public static class XenVssReqErrorCreatingSnapshotXmlString extends XenAPIException { - public final String vm; - public final String errorCode; - - /** - * Create a new XenVssReqErrorCreatingSnapshotXmlString - * - * @param vm - * @param errorCode - */ - public XenVssReqErrorCreatingSnapshotXmlString(String vm, String errorCode) { - super("Could not create the XML string generated by the transportable snapshot"); - this.vm = vm; - this.errorCode = errorCode; - } - - } - - /** - * The bootloader returned an error - */ - public static class BootloaderFailed extends XenAPIException { - public final String vm; - public final String msg; - - /** - * Create a new BootloaderFailed - * - * @param vm - * @param msg - */ - public BootloaderFailed(String vm, String msg) { - super("The bootloader returned an error"); - this.vm = vm; - this.msg = msg; - } - - } - - /** - * The WLB server reported that XenServer said something to it that WLB wasn't expecting or didn't understand. - */ - public static class WlbXenserverMalformedResponse extends XenAPIException { - - /** - * Create a new WlbXenserverMalformedResponse - */ - public WlbXenserverMalformedResponse() { - super("The WLB server reported that XenServer said something to it that WLB wasn't expecting or didn't understand."); - } - - } - - /** - * The GPU group contains active VGPUs and cannot be deleted. - */ - public static class GpuGroupContainsVgpu extends XenAPIException { - public final String vgpus; - - /** - * Create a new GpuGroupContainsVgpu - * - * @param vgpus - */ - public GpuGroupContainsVgpu(String vgpus) { - super("The GPU group contains active VGPUs and cannot be deleted."); - this.vgpus = vgpus; - } - - } - - /** - * The pool failed to enable external authentication. - */ - public static class PoolAuthEnableFailedDuplicateHostname extends XenAPIException { - public final String host; - public final String message; - - /** - * Create a new PoolAuthEnableFailedDuplicateHostname - * - * @param host - * @param message - */ - public PoolAuthEnableFailedDuplicateHostname(String host, String message) { - super("The pool failed to enable external authentication."); - this.host = host; - this.message = message; - } - - } - - /** - * Retrieving system status from the host failed. A diagnostic reason suitable for support organisations is also returned. - */ - public static class SystemStatusRetrievalFailed extends XenAPIException { - public final String reason; - - /** - * Create a new SystemStatusRetrievalFailed - * - * @param reason - */ - public SystemStatusRetrievalFailed(String reason) { - super("Retrieving system status from the host failed. A diagnostic reason suitable for support organisations is also returned."); - this.reason = reason; - } - - } - - /** - * This operation cannot be performed because this VDI is in use by some other operation - */ - public static class VdiInUse extends XenAPIException { - public final String vdi; - public final String operation; - - /** - * Create a new VdiInUse - * - * @param vdi - * @param operation - */ - public VdiInUse(String vdi, String operation) { - super("This operation cannot be performed because this VDI is in use by some other operation"); - this.vdi = vdi; - this.operation = operation; - } - - } - - /** - * This operation cannot be completed as the host is not live. - */ - public static class HostNotLive extends XenAPIException { - - /** - * Create a new HostNotLive - */ - public HostNotLive() { - super("This operation cannot be completed as the host is not live."); - } - - } - - /** - * A certificate already exists with the specified name. - */ - public static class CertificateAlreadyExists extends XenAPIException { - public final String name; - - /** - * Create a new CertificateAlreadyExists - * - * @param name - */ - public CertificateAlreadyExists(String name) { - super("A certificate already exists with the specified name."); - this.name = name; - } - - } - - /** - * The SR has no attached PBDs - */ - public static class SrHasNoPbds extends XenAPIException { - public final String sr; - - /** - * Create a new SrHasNoPbds - * - * @param sr - */ - public SrHasNoPbds(String sr) { - super("The SR has no attached PBDs"); - this.sr = sr; - } - - } - - /** - * This PIF is a bond slave and cannot have a tunnel on it. - */ - public static class CannotAddTunnelToBondSlave extends XenAPIException { - public final String PIF; - - /** - * Create a new CannotAddTunnelToBondSlave - * - * @param PIF - */ - public CannotAddTunnelToBondSlave(String PIF) { - super("This PIF is a bond slave and cannot have a tunnel on it."); - this.PIF = PIF; - } - - } - - /** - * The uploaded patch file is invalid - */ - public static class InvalidPatch extends XenAPIException { - - /** - * Create a new InvalidPatch - */ - public InvalidPatch() { - super("The uploaded patch file is invalid"); - } - - } - - /** - * The SR could not be destroyed, as the 'indestructible' flag was set on it. - */ - public static class SrIndestructible extends XenAPIException { - public final String sr; - - /** - * Create a new SrIndestructible - * - * @param sr - */ - public SrIndestructible(String sr) { - super("The SR could not be destroyed, as the 'indestructible' flag was set on it."); - this.sr = sr; - } - - } - - /** - * This host cannot accept the proposed new master setting at this time. - */ - public static class HaAbortNewMaster extends XenAPIException { - public final String reason; - - /** - * Create a new HaAbortNewMaster - * - * @param reason - */ - public HaAbortNewMaster(String reason) { - super("This host cannot accept the proposed new master setting at this time."); - this.reason = reason; - } - - } - - /** - * The WLB server said something that XenServer wasn't expecting or didn't understand. The method called on the WLB server, a diagnostic reason, and the response from WLB are returned. - */ - public static class WlbMalformedResponse extends XenAPIException { - public final String method; - public final String reason; - public final String response; - - /** - * Create a new WlbMalformedResponse - * - * @param method - * @param reason - * @param response - */ - public WlbMalformedResponse(String method, String reason, String response) { - super("The WLB server said something that XenServer wasn't expecting or didn't understand. The method called on the WLB server, a diagnostic reason, and the response from WLB are returned."); - this.method = method; - this.reason = reason; - this.response = response; - } - - } - - /** - * The host joining the pool must have a physical management NIC (i.e. the management NIC must not be on a VLAN or bonded PIF). - */ - public static class PoolJoiningHostMustHavePhysicalManagementNic extends XenAPIException { - - /** - * Create a new PoolJoiningHostMustHavePhysicalManagementNic - */ - public PoolJoiningHostMustHavePhysicalManagementNic() { - super("The host joining the pool must have a physical management NIC (i.e. the management NIC must not be on a VLAN or bonded PIF)."); - } - - } - - /** - * PIF has no IPv6 configuration (mode curently set to 'none') - */ - public static class PifHasNoV6NetworkConfiguration extends XenAPIException { - - /** - * Create a new PifHasNoV6NetworkConfiguration - */ - public PifHasNoV6NetworkConfiguration() { - super("PIF has no IPv6 configuration (mode curently set to 'none')"); - } - - } - - /** - * This operation is not allowed as the VM is part of an appliance. - */ - public static class VmIsPartOfAnAppliance extends XenAPIException { - public final String vm; - public final String appliance; - - /** - * Create a new VmIsPartOfAnAppliance - * - * @param vm - * @param appliance - */ - public VmIsPartOfAnAppliance(String vm, String appliance) { - super("This operation is not allowed as the VM is part of an appliance."); - this.vm = vm; - this.appliance = appliance; - } - - } - - /** - * The WLB server reported that XenServer rejected its configured authentication details. - */ - public static class WlbXenserverAuthenticationFailed extends XenAPIException { - - /** - * Create a new WlbXenserverAuthenticationFailed - */ - public WlbXenserverAuthenticationFailed() { - super("The WLB server reported that XenServer rejected its configured authentication details."); - } - - } - - /** - * The power-state of a control domain cannot be reset. - */ - public static class CannotResetControlDomain extends XenAPIException { - public final String vm; - - /** - * Create a new CannotResetControlDomain - * - * @param vm - */ - public CannotResetControlDomain(String vm) { - super("The power-state of a control domain cannot be reset."); - this.vm = vm; - } - - } - - /** - * The patch precheck stage failed with an unknown error. See attached info for more details. - */ - public static class PatchPrecheckFailedUnknownError extends XenAPIException { - public final String patch; - public final String info; - - /** - * Create a new PatchPrecheckFailedUnknownError - * - * @param patch - * @param info - */ - public PatchPrecheckFailedUnknownError(String patch, String info) { - super("The patch precheck stage failed with an unknown error. See attached info for more details."); - this.patch = patch; - this.info = info; - } - - } - /** * Host cannot attach network (in the case of NIC bonding, this may be because attaching the network on this host would require other networks [that are currently active] to be taken down). */ @@ -5056,322 +3615,6 @@ public class Types } - /** - * The WLB URL is invalid. Ensure it is in format: :. The configured/given URL is returned. - */ - public static class WlbUrlInvalid extends XenAPIException { - public final String url; - - /** - * Create a new WlbUrlInvalid - * - * @param url - */ - public WlbUrlInvalid(String url) { - super("The WLB URL is invalid. Ensure it is in format: :. The configured/given URL is returned."); - this.url = url; - } - - } - - /** - * Cannot restore this VM because it would create a duplicate - */ - public static class DuplicateVm extends XenAPIException { - public final String vm; - - /** - * Create a new DuplicateVm - * - * @param vm - */ - public DuplicateVm(String vm) { - super("Cannot restore this VM because it would create a duplicate"); - this.vm = vm; - } - - } - - /** - * The pool master host cannot be removed. - */ - public static class HostCannotDestroySelf extends XenAPIException { - public final String host; - - /** - * Create a new HostCannotDestroySelf - * - * @param host - */ - public HostCannotDestroySelf(String host) { - super("The pool master host cannot be removed."); - this.host = host; - } - - } - - /** - * This host failed in the middle of an automatic failover operation and needs to retry the failover action - */ - public static class HostBroken extends XenAPIException { - - /** - * Create a new HostBroken - */ - public HostBroken() { - super("This host failed in the middle of an automatic failover operation and needs to retry the failover action"); - } - - } - - /** - * An error occured while restoring the memory image of the specified virtual machine - */ - public static class VmCheckpointResumeFailed extends XenAPIException { - public final String vm; - - /** - * Create a new VmCheckpointResumeFailed - * - * @param vm - */ - public VmCheckpointResumeFailed(String vm) { - super("An error occured while restoring the memory image of the specified virtual machine"); - this.vm = vm; - } - - } - - /** - * Too many VCPUs to start this VM - */ - public static class VmTooManyVcpus extends XenAPIException { - public final String vm; - - /** - * Create a new VmTooManyVcpus - * - * @param vm - */ - public VmTooManyVcpus(String vm) { - super("Too many VCPUs to start this VM"); - this.vm = vm; - } - - } - - /** - * This operation cannot be completed as the host is still live. - */ - public static class HostIsLive extends XenAPIException { - public final String host; - - /** - * Create a new HostIsLive - * - * @param host - */ - public HostIsLive(String host) { - super("This operation cannot be completed as the host is still live."); - this.host = host; - } - - } - - /** - * The VM could not be imported because attached disks could not be found. - */ - public static class ImportErrorAttachedDisksNotFound extends XenAPIException { - - /** - * Create a new ImportErrorAttachedDisksNotFound - */ - public ImportErrorAttachedDisksNotFound() { - super("The VM could not be imported because attached disks could not be found."); - } - - } - - /** - * Drive could not be hot-unplugged because it is not marked as unpluggable - */ - public static class VbdNotUnpluggable extends XenAPIException { - public final String vbd; - - /** - * Create a new VbdNotUnpluggable - * - * @param vbd - */ - public VbdNotUnpluggable(String vbd) { - super("Drive could not be hot-unplugged because it is not marked as unpluggable"); - this.vbd = vbd; - } - - } - - /** - * An attempt to create the snapshots failed - */ - public static class XenVssReqErrorCreatingSnapshot extends XenAPIException { - public final String vm; - public final String errorCode; - - /** - * Create a new XenVssReqErrorCreatingSnapshot - * - * @param vm - * @param errorCode - */ - public XenVssReqErrorCreatingSnapshot(String vm, String errorCode) { - super("An attempt to create the snapshots failed"); - this.vm = vm; - this.errorCode = errorCode; - } - - } - - /** - * Could not enable redo log. - */ - public static class CannotEnableRedoLog extends XenAPIException { - public final String reason; - - /** - * Create a new CannotEnableRedoLog - * - * @param reason - */ - public CannotEnableRedoLog(String reason) { - super("Could not enable redo log."); - this.reason = reason; - } - - } - - /** - * This host cannot be evacuated. - */ - public static class CannotEvacuateHost extends XenAPIException { - public final String errors; - - /** - * Create a new CannotEvacuateHost - * - * @param errors - */ - public CannotEvacuateHost(String errors) { - super("This host cannot be evacuated."); - this.errors = errors; - } - - } - - /** - * There were no hosts available to complete the specified operation. - */ - public static class NoHostsAvailable extends XenAPIException { - - /** - * Create a new NoHostsAvailable - */ - public NoHostsAvailable() { - super("There were no hosts available to complete the specified operation."); - } - - } - - /** - * A timeout happened while attempting to attach a device to a VM. - */ - public static class DeviceAttachTimeout extends XenAPIException { - public final String type; - public final String ref; - - /** - * Create a new DeviceAttachTimeout - * - * @param type - * @param ref - */ - public DeviceAttachTimeout(String type, String ref) { - super("A timeout happened while attempting to attach a device to a VM."); - this.type = type; - this.ref = ref; - } - - } - - /** - * The device name is invalid - */ - public static class InvalidDevice extends XenAPIException { - public final String device; - - /** - * Create a new InvalidDevice - * - * @param device - */ - public InvalidDevice(String device) { - super("The device name is invalid"); - this.device = device; - } - - } - - /** - * A PBD already exists connecting the SR to the host - */ - public static class PbdExists extends XenAPIException { - public final String sr; - public final String host; - public final String pbd; - - /** - * Create a new PbdExists - * - * @param sr - * @param host - * @param pbd - */ - public PbdExists(String sr, String host, String pbd) { - super("A PBD already exists connecting the SR to the host"); - this.sr = sr; - this.host = host; - this.pbd = pbd; - } - - } - - /** - * The WLB server reported that XenServer refused it a connection (even though we're connecting perfectly fine in the other direction). - */ - public static class WlbXenserverConnectionRefused extends XenAPIException { - - /** - * Create a new WlbXenserverConnectionRefused - */ - public WlbXenserverConnectionRefused() { - super("The WLB server reported that XenServer refused it a connection (even though we're connecting perfectly fine in the other direction)."); - } - - } - - /** - * The metrics of this host could not be read. - */ - public static class HostCannotReadMetrics extends XenAPIException { - - /** - * Create a new HostCannotReadMetrics - */ - public HostCannotReadMetrics() { - super("The metrics of this host could not be read."); - } - - } - /** * The VM is incompatible with the CPU features of this host. */ @@ -5397,375 +3640,481 @@ public class Types } /** - * The upper limit of active redo log instances was reached. + * You gave an invalid session reference. It may have been invalidated by a server restart, or timed out. You should get a new session handle, using one of the session.login_ calls. This error does not invalidate the current connection. The handle parameter echoes the bad value given. */ - public static class NoMoreRedoLogsAllowed extends XenAPIException { + public static class SessionInvalid extends XenAPIException { + public final String handle; /** - * Create a new NoMoreRedoLogsAllowed + * Create a new SessionInvalid + * + * @param handle */ - public NoMoreRedoLogsAllowed() { - super("The upper limit of active redo log instances was reached."); + public SessionInvalid(String handle) { + super("You gave an invalid session reference. It may have been invalidated by a server restart, or timed out. You should get a new session handle, using one of the session.login_ calls. This error does not invalidate the current connection. The handle parameter echoes the bad value given."); + this.handle = handle; } } /** - * The pool failed to enable external authentication. + * An attempt to create the snapshots failed */ - public static class PoolAuthEnableFailed extends XenAPIException { - public final String host; + public static class XenVssReqErrorCreatingSnapshot extends XenAPIException { + public final String vm; + public final String errorCode; + + /** + * Create a new XenVssReqErrorCreatingSnapshot + * + * @param vm + * @param errorCode + */ + public XenVssReqErrorCreatingSnapshot(String vm, String errorCode) { + super("An attempt to create the snapshots failed"); + this.vm = vm; + this.errorCode = errorCode; + } + + } + + /** + * An error occured while reverting the specified virtual machine to the specified snapshot + */ + public static class VmRevertFailed extends XenAPIException { + public final String vm; + public final String snapshot; + + /** + * Create a new VmRevertFailed + * + * @param vm + * @param snapshot + */ + public VmRevertFailed(String vm, String snapshot) { + super("An error occured while reverting the specified virtual machine to the specified snapshot"); + this.vm = vm; + this.snapshot = snapshot; + } + + } + + /** + * The CPU does not support masking of features. + */ + public static class CpuFeatureMaskingNotSupported extends XenAPIException { + public final String details; + + /** + * Create a new CpuFeatureMaskingNotSupported + * + * @param details + */ + public CpuFeatureMaskingNotSupported(String details) { + super("The CPU does not support masking of features."); + this.details = details; + } + + } + + /** + * This host lost access to the HA statefile. + */ + public static class HaLostStatefile extends XenAPIException { + + /** + * Create a new HaLostStatefile + */ + public HaLostStatefile() { + super("This host lost access to the HA statefile."); + } + + } + + /** + * You cannot delete the specified default template. + */ + public static class VmCannotDeleteDefaultTemplate extends XenAPIException { + public final String vm; + + /** + * Create a new VmCannotDeleteDefaultTemplate + * + * @param vm + */ + public VmCannotDeleteDefaultTemplate(String vm) { + super("You cannot delete the specified default template."); + this.vm = vm; + } + + } + + /** + * The host failed to enable external authentication. + */ + public static class AuthEnableFailedPermissionDenied extends XenAPIException { public final String message; /** - * Create a new PoolAuthEnableFailed + * Create a new AuthEnableFailedPermissionDenied * - * @param host * @param message */ - public PoolAuthEnableFailed(String host, String message) { - super("The pool failed to enable external authentication."); - this.host = host; + public AuthEnableFailedPermissionDenied(String message) { + super("The host failed to enable external authentication."); this.message = message; } } /** - * The VSS plug-in is not installed on this virtual machine + * The request was rejected because the server is too busy. */ - public static class VmSnapshotWithQuiesceNotSupported extends XenAPIException { - public final String vm; - public final String error; + public static class TooBusy extends XenAPIException { /** - * Create a new VmSnapshotWithQuiesceNotSupported + * Create a new TooBusy + */ + public TooBusy() { + super("The request was rejected because the server is too busy."); + } + + } + + /** + * The backup could not be performed because the backup script failed. + */ + public static class BackupScriptFailed extends XenAPIException { + public final String log; + + /** + * Create a new BackupScriptFailed + * + * @param log + */ + public BackupScriptFailed(String log) { + super("The backup could not be performed because the backup script failed."); + this.log = log; + } + + } + + /** + * This operation cannot be completed as the host is not live. + */ + public static class HostNotLive extends XenAPIException { + + /** + * Create a new HostNotLive + */ + public HostNotLive() { + super("This operation cannot be completed as the host is not live."); + } + + } + + /** + * Your license has expired. Please contact your support representative. + */ + public static class LicenseExpired extends XenAPIException { + + /** + * Create a new LicenseExpired + */ + public LicenseExpired() { + super("Your license has expired. Please contact your support representative."); + } + + } + + /** + * You attempted to run a VM on a host which doesn't have a PIF on a Network needed by the VM. The VM has at least one VIF attached to the Network. + */ + public static class VmRequiresNetwork extends XenAPIException { + public final String vm; + public final String network; + + /** + * Create a new VmRequiresNetwork * * @param vm - * @param error + * @param network */ - public VmSnapshotWithQuiesceNotSupported(String vm, String error) { - super("The VSS plug-in is not installed on this virtual machine"); + public VmRequiresNetwork(String vm, String network) { + super("You attempted to run a VM on a host which doesn't have a PIF on a Network needed by the VM. The VM has at least one VIF attached to the Network."); this.vm = vm; - this.error = error; + this.network = network; } } /** - * This host cannot join a pool because it's license does not support pooling + * A VDI with the specified location already exists within the SR */ - public static class LicenseDoesNotSupportPooling extends XenAPIException { + public static class LocationNotUnique extends XenAPIException { + public final String SR; + public final String location; /** - * Create a new LicenseDoesNotSupportPooling - */ - public LicenseDoesNotSupportPooling() { - super("This host cannot join a pool because it's license does not support pooling"); - } - - } - - /** - * The master says the host is not known to it. Perhaps the Host was deleted from the master's database? Perhaps the slave is pointing to the wrong master? - */ - public static class HostUnknownToMaster extends XenAPIException { - public final String host; - - /** - * Create a new HostUnknownToMaster + * Create a new LocationNotUnique * - * @param host + * @param SR + * @param location */ - public HostUnknownToMaster(String host) { - super("The master says the host is not known to it. Perhaps the Host was deleted from the master's database? Perhaps the slave is pointing to the wrong master?"); - this.host = host; + public LocationNotUnique(String SR, String location) { + super("A VDI with the specified location already exists within the SR"); + this.SR = SR; + this.location = location; } } /** - * The WLB server refused a connection to XenServer. + * VGPU type is not one of the PGPU's supported types. */ - public static class WlbConnectionRefused extends XenAPIException { + public static class VgpuTypeNotSupported extends XenAPIException { + public final String type; + public final String supportedTypes; /** - * Create a new WlbConnectionRefused + * Create a new VgpuTypeNotSupported + * + * @param type + * @param supportedTypes */ - public WlbConnectionRefused() { - super("The WLB server refused a connection to XenServer."); + public VgpuTypeNotSupported(String type, String supportedTypes) { + super("VGPU type is not one of the PGPU's supported types."); + this.type = type; + this.supportedTypes = supportedTypes; } } /** - * The VSS plug-in cannot be contacted + * The host failed to acquire an IP address on its management interface and therefore cannot contact the master. */ - public static class VmSnapshotWithQuiescePluginDeosNotRespond extends XenAPIException { + public static class HostHasNoManagementIp extends XenAPIException { + + /** + * Create a new HostHasNoManagementIp + */ + public HostHasNoManagementIp() { + super("The host failed to acquire an IP address on its management interface and therefore cannot contact the master."); + } + + } + + /** + * Could not create the XML string generated by the transportable snapshot + */ + public static class XenVssReqErrorCreatingSnapshotXmlString extends XenAPIException { public final String vm; + public final String errorCode; /** - * Create a new VmSnapshotWithQuiescePluginDeosNotRespond + * Create a new XenVssReqErrorCreatingSnapshotXmlString * * @param vm + * @param errorCode */ - public VmSnapshotWithQuiescePluginDeosNotRespond(String vm) { - super("The VSS plug-in cannot be contacted"); + public XenVssReqErrorCreatingSnapshotXmlString(String vm, String errorCode) { + super("Could not create the XML string generated by the transportable snapshot"); this.vm = vm; + this.errorCode = errorCode; } } /** - * You attempted to run a VM on a host which doesn't have access to an SR needed by the VM. The VM has at least one VBD attached to a VDI in the SR. + * This PIF is a bond slave and cannot be plugged. */ - public static class VmRequiresSr extends XenAPIException { - public final String vm; - public final String sr; + public static class CannotPlugBondSlave extends XenAPIException { + public final String PIF; /** - * Create a new VmRequiresSr + * Create a new CannotPlugBondSlave * - * @param vm - * @param sr + * @param PIF */ - public VmRequiresSr(String vm, String sr) { - super("You attempted to run a VM on a host which doesn't have access to an SR needed by the VM. The VM has at least one VBD attached to a VDI in the SR."); - this.vm = vm; - this.sr = sr; + public CannotPlugBondSlave(String PIF) { + super("This PIF is a bond slave and cannot be plugged."); + this.PIF = PIF; } } /** - * This VM does not have a crashdump SR specified. + * VGPU type is not one of the PGPU's enabled types. */ - public static class VmNoCrashdumpSr extends XenAPIException { - public final String vm; + public static class VgpuTypeNotEnabled extends XenAPIException { + public final String type; + public final String enabledTypes; /** - * Create a new VmNoCrashdumpSr + * Create a new VgpuTypeNotEnabled * - * @param vm + * @param type + * @param enabledTypes */ - public VmNoCrashdumpSr(String vm) { - super("This VM does not have a crashdump SR specified."); - this.vm = vm; + public VgpuTypeNotEnabled(String type, String enabledTypes) { + super("VGPU type is not one of the PGPU's enabled types."); + this.type = type; + this.enabledTypes = enabledTypes; } } /** - * The operation could not be performed because the HA software is not installed on this host. + * The backup partition to stream the updat to cannot be found */ - public static class HaNotInstalled extends XenAPIException { - public final String host; + public static class CannotFindOemBackupPartition extends XenAPIException { /** - * Create a new HaNotInstalled + * Create a new CannotFindOemBackupPartition + */ + public CannotFindOemBackupPartition() { + super("The backup partition to stream the updat to cannot be found"); + } + + } + + /** + * This operation cannot be performed because the pif is bonded. + */ + public static class PifAlreadyBonded extends XenAPIException { + public final String PIF; + + /** + * Create a new PifAlreadyBonded * - * @param host + * @param PIF */ - public HaNotInstalled(String host) { - super("The operation could not be performed because the HA software is not installed on this host."); - this.host = host; + public PifAlreadyBonded(String PIF) { + super("This operation cannot be performed because the pif is bonded."); + this.PIF = PIF; } } /** - * A PIF with this specified device name already exists. + * The restore could not be performed because this backup has been created by a different (incompatible) product version */ - public static class DuplicatePifDeviceName extends XenAPIException { - public final String device; + public static class RestoreIncompatibleVersion extends XenAPIException { /** - * Create a new DuplicatePifDeviceName + * Create a new RestoreIncompatibleVersion + */ + public RestoreIncompatibleVersion() { + super("The restore could not be performed because this backup has been created by a different (incompatible) product version"); + } + + } + + /** + * The credentials given by the user are incorrect, so access has been denied, and you have not been issued a session handle. + */ + public static class SessionAuthenticationFailed extends XenAPIException { + + /** + * Create a new SessionAuthenticationFailed + */ + public SessionAuthenticationFailed() { + super("The credentials given by the user are incorrect, so access has been denied, and you have not been issued a session handle."); + } + + } + + /** + * A bond must consist of at least two member interfaces + */ + public static class PifBondNeedsMoreMembers extends XenAPIException { + + /** + * Create a new PifBondNeedsMoreMembers + */ + public PifBondNeedsMoreMembers() { + super("A bond must consist of at least two member interfaces"); + } + + } + + /** + * The host could not join the liveset because the HA daemon failed to start. + */ + public static class HaHeartbeatDaemonStartupFailed extends XenAPIException { + + /** + * Create a new HaHeartbeatDaemonStartupFailed + */ + public HaHeartbeatDaemonStartupFailed() { + super("The host could not join the liveset because the HA daemon failed to start."); + } + + } + + /** + * The value given is invalid + */ + public static class InvalidValue extends XenAPIException { + public final String field; + public final String value; + + /** + * Create a new InvalidValue * - * @param device + * @param field + * @param value */ - public DuplicatePifDeviceName(String device) { - super("A PIF with this specified device name already exists."); - this.device = device; + public InvalidValue(String field, String value) { + super("The value given is invalid"); + this.field = field; + this.value = value; } } /** - * You attempted an operation on a VM that was not in an appropriate power state at the time; for example, you attempted to start a VM that was already running. The parameters returned are the VM's handle, and the expected and actual VM state at the time of the call. + * A required parameter contained an invalid IP address */ - public static class VmBadPowerState extends XenAPIException { - public final String vm; - public final String expected; - public final String actual; + public static class InvalidIpAddressSpecified extends XenAPIException { + public final String parameter; /** - * Create a new VmBadPowerState + * Create a new InvalidIpAddressSpecified * - * @param vm - * @param expected - * @param actual + * @param parameter */ - public VmBadPowerState(String vm, String expected, String actual) { - super("You attempted an operation on a VM that was not in an appropriate power state at the time; for example, you attempted to start a VM that was already running. The parameters returned are the VM's handle, and the expected and actual VM state at the time of the call."); - this.vm = vm; - this.expected = expected; - this.actual = actual; + public InvalidIpAddressSpecified(String parameter) { + super("A required parameter contained an invalid IP address"); + this.parameter = parameter; } } /** - * This pool has wlb-enabled set to false. + * Cannot downgrade license while in pool. Please disband the pool first, then downgrade licenses on hosts separately. */ - public static class WlbDisabled extends XenAPIException { + public static class LicenseCannotDowngradeWhileInPool extends XenAPIException { /** - * Create a new WlbDisabled + * Create a new LicenseCannotDowngradeWhileInPool */ - public WlbDisabled() { - super("This pool has wlb-enabled set to false."); + public LicenseCannotDowngradeWhileInPool() { + super("Cannot downgrade license while in pool. Please disband the pool first, then downgrade licenses on hosts separately."); } } /** - * This VM operation cannot be performed on an older-versioned host during an upgrade. + * The given VMs failed to release memory when instructed to do so */ - public static class VmHostIncompatibleVersion extends XenAPIException { - public final String host; - public final String vm; + public static class VmsFailedToCooperate extends XenAPIException { /** - * Create a new VmHostIncompatibleVersion - * - * @param host - * @param vm + * Create a new VmsFailedToCooperate */ - public VmHostIncompatibleVersion(String host, String vm) { - super("This VM operation cannot be performed on an older-versioned host during an upgrade."); - this.host = host; - this.vm = vm; - } - - } - - /** - * Cannot join pool whose external authentication configuration is different. - */ - public static class PoolJoiningExternalAuthMismatch extends XenAPIException { - - /** - * Create a new PoolJoiningExternalAuthMismatch - */ - public PoolJoiningExternalAuthMismatch() { - super("Cannot join pool whose external authentication configuration is different."); - } - - } - - /** - * All VBDs of type 'disk' must be read/write for HVM guests - */ - public static class DiskVbdMustBeReadwriteForHvm extends XenAPIException { - public final String vbd; - - /** - * Create a new DiskVbdMustBeReadwriteForHvm - * - * @param vbd - */ - public DiskVbdMustBeReadwriteForHvm(String vbd) { - super("All VBDs of type 'disk' must be read/write for HVM guests"); - this.vbd = vbd; - } - - } - - /** - * The BIOS strings for this VM have already been set and cannot be changed anymore. - */ - public static class VmBiosStringsAlreadySet extends XenAPIException { - - /** - * Create a new VmBiosStringsAlreadySet - */ - public VmBiosStringsAlreadySet() { - super("The BIOS strings for this VM have already been set and cannot be changed anymore."); - } - - } - - /** - * The WLB server reported that its configured server name for this XenServer instance failed to resolve in DNS. - */ - public static class WlbXenserverUnknownHost extends XenAPIException { - - /** - * Create a new WlbXenserverUnknownHost - */ - public WlbXenserverUnknownHost() { - super("The WLB server reported that its configured server name for this XenServer instance failed to resolve in DNS."); - } - - } - - /** - * The host could not join the liveset because the HA daemon could not access the heartbeat disk. - */ - public static class HaHostCannotAccessStatefile extends XenAPIException { - - /** - * Create a new HaHostCannotAccessStatefile - */ - public HaHostCannotAccessStatefile() { - super("The host could not join the liveset because the HA daemon could not access the heartbeat disk."); - } - - } - - /** - * VM didn't acknowledge the need to shutdown. - */ - public static class VmFailedShutdownAcknowledgment extends XenAPIException { - - /** - * Create a new VmFailedShutdownAcknowledgment - */ - public VmFailedShutdownAcknowledgment() { - super("VM didn't acknowledge the need to shutdown."); - } - - } - - /** - * Error querying the external directory service. - */ - public static class AuthServiceError extends XenAPIException { - public final String message; - - /** - * Create a new AuthServiceError - * - * @param message - */ - public AuthServiceError(String message) { - super("Error querying the external directory service."); - this.message = message; - } - - } - - /** - * Cannot perform operation as the host is running in emergency mode. - */ - public static class HostInEmergencyMode extends XenAPIException { - - /** - * Create a new HostInEmergencyMode - */ - public HostInEmergencyMode() { - super("Cannot perform operation as the host is running in emergency mode."); + public VmsFailedToCooperate() { + super("The given VMs failed to release memory when instructed to do so"); } } @@ -5789,80 +4138,519 @@ public class Types } /** - * The default SR reference does not point to a valid SR + * Retrieving system status from the host failed. A diagnostic reason suitable for support organisations is also returned. */ - public static class DefaultSrNotFound extends XenAPIException { - public final String sr; + public static class SystemStatusRetrievalFailed extends XenAPIException { + public final String reason; /** - * Create a new DefaultSrNotFound + * Create a new SystemStatusRetrievalFailed * - * @param sr + * @param reason */ - public DefaultSrNotFound(String sr) { - super("The default SR reference does not point to a valid SR"); - this.sr = sr; + public SystemStatusRetrievalFailed(String reason) { + super("Retrieving system status from the host failed. A diagnostic reason suitable for support organisations is also returned."); + this.reason = reason; } } /** - * A device with the name given already exists on the selected VM + * The primary address types are not compatible */ - public static class DeviceAlreadyExists extends XenAPIException { - public final String device; + public static class PifIncompatiblePrimaryAddressType extends XenAPIException { /** - * Create a new DeviceAlreadyExists - * - * @param device + * Create a new PifIncompatiblePrimaryAddressType */ - public DeviceAlreadyExists(String device) { - super("A device with the name given already exists on the selected VM"); - this.device = device; + public PifIncompatiblePrimaryAddressType() { + super("The primary address types are not compatible"); } } /** - * The PBD could not be plugged because the SR is in use by another host and is not marked as sharable. + * The VM could not be imported; the end of the file was reached prematurely. */ - public static class SrNotSharable extends XenAPIException { - public final String sr; + public static class ImportErrorPrematureEof extends XenAPIException { + + /** + * Create a new ImportErrorPrematureEof + */ + public ImportErrorPrematureEof() { + super("The VM could not be imported; the end of the file was reached prematurely."); + } + + } + + /** + * The provision call can only be invoked on templates, not regular VMs. + */ + public static class ProvisionOnlyAllowedOnTemplate extends XenAPIException { + + /** + * Create a new ProvisionOnlyAllowedOnTemplate + */ + public ProvisionOnlyAllowedOnTemplate() { + super("The provision call can only be invoked on templates, not regular VMs."); + } + + } + + /** + * Media could not be ejected because it is not removable + */ + public static class VbdNotRemovableMedia extends XenAPIException { + public final String vbd; + + /** + * Create a new VbdNotRemovableMedia + * + * @param vbd + */ + public VbdNotRemovableMedia(String vbd) { + super("Media could not be ejected because it is not removable"); + this.vbd = vbd; + } + + } + + /** + * The GPU group does not contain any PGPUs. + */ + public static class GpuGroupContainsNoPgpus extends XenAPIException { + public final String gpuGroup; + + /** + * Create a new GpuGroupContainsNoPgpus + * + * @param gpuGroup + */ + public GpuGroupContainsNoPgpus(String gpuGroup) { + super("The GPU group does not contain any PGPUs."); + this.gpuGroup = gpuGroup; + } + + } + + /** + * The operation failed because the HA software on the specified host could not see a subset of other hosts. Check your network connectivity. + */ + public static class HaHostCannotSeePeers extends XenAPIException { public final String host; + public final String all; + public final String subset; /** - * Create a new SrNotSharable + * Create a new HaHostCannotSeePeers * - * @param sr * @param host + * @param all + * @param subset */ - public SrNotSharable(String sr, String host) { - super("The PBD could not be plugged because the SR is in use by another host and is not marked as sharable."); - this.sr = sr; + public HaHostCannotSeePeers(String host, String all, String subset) { + super("The operation failed because the HA software on the specified host could not see a subset of other hosts. Check your network connectivity."); this.host = host; + this.all = all; + this.subset = subset; } } /** - * You attempted to migrate a VM which has a checkpoint. + * The host failed to enable external authentication. */ - public static class VmHasCheckpoint extends XenAPIException { + public static class AuthEnableFailed extends XenAPIException { + public final String message; + + /** + * Create a new AuthEnableFailed + * + * @param message + */ + public AuthEnableFailed(String message) { + super("The host failed to enable external authentication."); + this.message = message; + } + + } + + /** + * The host name is invalid. + */ + public static class HostNameInvalid extends XenAPIException { + public final String reason; + + /** + * Create a new HostNameInvalid + * + * @param reason + */ + public HostNameInvalid(String reason) { + super("The host name is invalid."); + this.reason = reason; + } + + } + + /** + * The WLB server reported that XenServer refused it a connection (even though we're connecting perfectly fine in the other direction). + */ + public static class WlbXenserverConnectionRefused extends XenAPIException { + + /** + * Create a new WlbXenserverConnectionRefused + */ + public WlbXenserverConnectionRefused() { + super("The WLB server reported that XenServer refused it a connection (even though we're connecting perfectly fine in the other direction)."); + } + + } + + /** + * Could not find any volumes supported by the Citrix XenServer Vss Provider + */ + public static class XenVssReqErrorNoVolumesSupported extends XenAPIException { + public final String vm; + public final String errorCode; + + /** + * Create a new XenVssReqErrorNoVolumesSupported + * + * @param vm + * @param errorCode + */ + public XenVssReqErrorNoVolumesSupported(String vm, String errorCode) { + super("Could not find any volumes supported by the Citrix XenServer Vss Provider"); + this.vm = vm; + this.errorCode = errorCode; + } + + } + + /** + * Not enough host memory is available to perform this operation + */ + public static class HostNotEnoughFreeMemory extends XenAPIException { + public final String needed; + public final String available; + + /** + * Create a new HostNotEnoughFreeMemory + * + * @param needed + * @param available + */ + public HostNotEnoughFreeMemory(String needed, String available) { + super("Not enough host memory is available to perform this operation"); + this.needed = needed; + this.available = available; + } + + } + + /** + * This host cannot be evacuated. + */ + public static class CannotEvacuateHost extends XenAPIException { + public final String errors; + + /** + * Create a new CannotEvacuateHost + * + * @param errors + */ + public CannotEvacuateHost(String errors) { + super("This host cannot be evacuated."); + this.errors = errors; + } + + } + + /** + * This operation is not allowed as the VM is part of an appliance. + */ + public static class VmIsPartOfAnAppliance extends XenAPIException { + public final String vm; + public final String appliance; + + /** + * Create a new VmIsPartOfAnAppliance + * + * @param vm + * @param appliance + */ + public VmIsPartOfAnAppliance(String vm, String appliance) { + super("This operation is not allowed as the VM is part of an appliance."); + this.vm = vm; + this.appliance = appliance; + } + + } + + /** + * The operation cannot be performed on physical device + */ + public static class VdiIsAPhysicalDevice extends XenAPIException { + public final String vdi; + + /** + * Create a new VdiIsAPhysicalDevice + * + * @param vdi + */ + public VdiIsAPhysicalDevice(String vdi) { + super("The operation cannot be performed on physical device"); + this.vdi = vdi; + } + + } + + /** + * The operation could not proceed because necessary VDIs were already locked at the storage level. + */ + public static class SrVdiLockingFailed extends XenAPIException { + + /** + * Create a new SrVdiLockingFailed + */ + public SrVdiLockingFailed() { + super("The operation could not proceed because necessary VDIs were already locked at the storage level."); + } + + } + + /** + * You tried to create a PIF, but it already exists. + */ + public static class PifVlanExists extends XenAPIException { + public final String PIF; + + /** + * Create a new PifVlanExists + * + * @param PIF + */ + public PifVlanExists(String PIF) { + super("You tried to create a PIF, but it already exists."); + this.PIF = PIF; + } + + } + + /** + * The hosts in this pool are not compatible. + */ + public static class HostsNotCompatible extends XenAPIException { + + /** + * Create a new HostsNotCompatible + */ + public HostsNotCompatible() { + super("The hosts in this pool are not compatible."); + } + + } + + /** + * This operation cannot be performed because the specified VM is protected by xHA + */ + public static class VmIsProtected extends XenAPIException { public final String vm; /** - * Create a new VmHasCheckpoint + * Create a new VmIsProtected * * @param vm */ - public VmHasCheckpoint(String vm) { - super("You attempted to migrate a VM which has a checkpoint."); + public VmIsProtected(String vm) { + super("This operation cannot be performed because the specified VM is protected by xHA"); this.vm = vm; } } + /** + * This host cannot join the pool because the pool has HA enabled but this host has HA disabled. + */ + public static class HaPoolIsEnabledButHostIsDisabled extends XenAPIException { + + /** + * Create a new HaPoolIsEnabledButHostIsDisabled + */ + public HaPoolIsEnabledButHostIsDisabled() { + super("This host cannot join the pool because the pool has HA enabled but this host has HA disabled."); + } + + } + + /** + * There was a problem with the license daemon (v6d). Is it running? + */ + public static class V6dFailure extends XenAPIException { + + /** + * Create a new V6dFailure + */ + public V6dFailure() { + super("There was a problem with the license daemon (v6d). Is it running?"); + } + + } + + /** + * A timeout happened while attempting to detach a device from a VM. + */ + public static class DeviceDetachTimeout extends XenAPIException { + public final String type; + public final String ref; + + /** + * Create a new DeviceDetachTimeout + * + * @param type + * @param ref + */ + public DeviceDetachTimeout(String type, String ref) { + super("A timeout happened while attempting to detach a device from a VM."); + this.type = type; + this.ref = ref; + } + + } + + /** + * There was an error processing your license. Please contact your support representative. + */ + public static class LicenseProcessingError extends XenAPIException { + + /** + * Create a new LicenseProcessingError + */ + public LicenseProcessingError() { + super("There was an error processing your license. Please contact your support representative."); + } + + } + + /** + * Operation cannot proceed while a VLAN exists on this interface. + */ + public static class PifVlanStillExists extends XenAPIException { + public final String PIF; + + /** + * Create a new PifVlanStillExists + * + * @param PIF + */ + public PifVlanStillExists(String PIF) { + super("Operation cannot proceed while a VLAN exists on this interface."); + this.PIF = PIF; + } + + } + + /** + * The VM unexpectedly rebooted + */ + public static class VmRebooted extends XenAPIException { + public final String vm; + + /** + * Create a new VmRebooted + * + * @param vm + */ + public VmRebooted(String vm) { + super("The VM unexpectedly rebooted"); + this.vm = vm; + } + + } + + /** + * The specified object no longer exists. + */ + public static class ObjectNolongerExists extends XenAPIException { + + /** + * Create a new ObjectNolongerExists + */ + public ObjectNolongerExists() { + super("The specified object no longer exists."); + } + + } + + /** + * The certificate library is corrupt or unreadable. + */ + public static class CertificateLibraryCorrupt extends XenAPIException { + + /** + * Create a new CertificateLibraryCorrupt + */ + public CertificateLibraryCorrupt() { + super("The certificate library is corrupt or unreadable."); + } + + } + + /** + * Cannot restore this VM because it would create a duplicate + */ + public static class DuplicateVm extends XenAPIException { + public final String vm; + + /** + * Create a new DuplicateVm + * + * @param vm + */ + public DuplicateVm(String vm) { + super("Cannot restore this VM because it would create a duplicate"); + this.vm = vm; + } + + } + + /** + * A certificate already exists with the specified name. + */ + public static class CertificateAlreadyExists extends XenAPIException { + public final String name; + + /** + * Create a new CertificateAlreadyExists + * + * @param name + */ + public CertificateAlreadyExists(String name) { + super("A certificate already exists with the specified name."); + this.name = name; + } + + } + + /** + * The specified certificate is corrupt or unreadable. + */ + public static class CertificateCorrupt extends XenAPIException { + public final String name; + + /** + * Create a new CertificateCorrupt + * + * @param name + */ + public CertificateCorrupt(String name) { + super("The specified certificate is corrupt or unreadable."); + this.name = name; + } + + } + /** * The SM plugin did not respond to a query. */ @@ -5882,75 +4670,65 @@ public class Types } /** - * This VM is assigned to a protection policy. + * This pool has wlb-enabled set to false. */ - public static class VmAssignedToProtectionPolicy extends XenAPIException { - public final String vm; - public final String vmpp; + public static class WlbDisabled extends XenAPIException { /** - * Create a new VmAssignedToProtectionPolicy - * - * @param vm - * @param vmpp + * Create a new WlbDisabled */ - public VmAssignedToProtectionPolicy(String vm, String vmpp) { - super("This VM is assigned to a protection policy."); - this.vm = vm; - this.vmpp = vmpp; + public WlbDisabled() { + super("This pool has wlb-enabled set to false."); } } /** - * RBAC permission denied. + * The GPU group contains active PGPUs and cannot be deleted. */ - public static class RbacPermissionDenied extends XenAPIException { - public final String permission; - public final String message; + public static class GpuGroupContainsPgpu extends XenAPIException { + public final String pgpus; /** - * Create a new RbacPermissionDenied + * Create a new GpuGroupContainsPgpu * - * @param permission - * @param message + * @param pgpus */ - public RbacPermissionDenied(String permission, String message) { - super("RBAC permission denied."); - this.permission = permission; - this.message = message; + public GpuGroupContainsPgpu(String pgpus) { + super("The GPU group contains active PGPUs and cannot be deleted."); + this.pgpus = pgpus; } } /** - * The host failed to disable external authentication. + * This VDI was not mapped to a destination SR in VM.migrate_send operation */ - public static class AuthDisableFailedPermissionDenied extends XenAPIException { - public final String message; + public static class VdiNotInMap extends XenAPIException { + public final String vdi; /** - * Create a new AuthDisableFailedPermissionDenied + * Create a new VdiNotInMap * - * @param message + * @param vdi */ - public AuthDisableFailedPermissionDenied(String message) { - super("The host failed to disable external authentication."); - this.message = message; + public VdiNotInMap(String vdi) { + super("This VDI was not mapped to a destination SR in VM.migrate_send operation"); + this.vdi = vdi; } } /** - * Cannot downgrade license while in pool. Please disband the pool first, then downgrade licenses on hosts separately. + * This operation is not allowed under your license. Please contact your support representative. */ - public static class LicenseCannotDowngradeWhileInPool extends XenAPIException { + public static class LicenceRestriction extends XenAPIException { /** - * Create a new LicenseCannotDowngradeWhileInPool + * Create a new LicenceRestriction */ - public LicenseCannotDowngradeWhileInPool() { - super("Cannot downgrade license while in pool. Please disband the pool first, then downgrade licenses on hosts separately."); + public LicenceRestriction() { + super("This operation is not allowed under your license. Please contact your support representative."); } } @@ -5988,343 +4766,22 @@ public class Types } /** - * This operation cannot be performed because creating or deleting a bond involving the management interface is not allowed while HA is on. In order to do that, disable HA, create or delete the bond then re-enable HA. + * This operation cannot be performed because the specified VDI is of an incompatible type (eg: an HA statefile cannot be attached to a guest) */ - public static class HaCannotChangeBondStatusOfMgmtIface extends XenAPIException { - - /** - * Create a new HaCannotChangeBondStatusOfMgmtIface - */ - public HaCannotChangeBondStatusOfMgmtIface() { - super("This operation cannot be performed because creating or deleting a bond involving the management interface is not allowed while HA is on. In order to do that, disable HA, create or delete the bond then re-enable HA."); - } - - } - - /** - * This patch has already been applied - */ - public static class PatchAlreadyApplied extends XenAPIException { - public final String patch; - - /** - * Create a new PatchAlreadyApplied - * - * @param patch - */ - public PatchAlreadyApplied(String patch) { - super("This patch has already been applied"); - this.patch = patch; - } - - } - - /** - * An SR with that uuid already exists. - */ - public static class SrUuidExists extends XenAPIException { - public final String uuid; - - /** - * Create a new SrUuidExists - * - * @param uuid - */ - public SrUuidExists(String uuid) { - super("An SR with that uuid already exists."); - this.uuid = uuid; - } - - } - - /** - * The host failed to enable external authentication. - */ - public static class AuthEnableFailedDomainLookupFailed extends XenAPIException { - public final String message; - - /** - * Create a new AuthEnableFailedDomainLookupFailed - * - * @param message - */ - public AuthEnableFailedDomainLookupFailed(String message) { - super("The host failed to enable external authentication."); - this.message = message; - } - - } - - /** - * The patch precheck stage failed: the server is of an incorrect build. - */ - public static class PatchPrecheckFailedWrongServerBuild extends XenAPIException { - public final String patch; - public final String foundBuild; - public final String requiredBuild; - - /** - * Create a new PatchPrecheckFailedWrongServerBuild - * - * @param patch - * @param foundBuild - * @param requiredBuild - */ - public PatchPrecheckFailedWrongServerBuild(String patch, String foundBuild, String requiredBuild) { - super("The patch precheck stage failed: the server is of an incorrect build."); - this.patch = patch; - this.foundBuild = foundBuild; - this.requiredBuild = requiredBuild; - } - - } - - /** - * The given feature string is not valid. - */ - public static class InvalidFeatureString extends XenAPIException { - public final String details; - - /** - * Create a new InvalidFeatureString - * - * @param details - */ - public InvalidFeatureString(String details) { - super("The given feature string is not valid."); - this.details = details; - } - - } - - /** - * No WLB connection is configured. - */ - public static class WlbNotInitialized extends XenAPIException { - - /** - * Create a new WlbNotInitialized - */ - public WlbNotInitialized() { - super("No WLB connection is configured."); - } - - } - - /** - * You attempted an operation that was explicitly blocked (see the blocked_operations field of the given object). - */ - public static class OperationBlocked extends XenAPIException { - public final String ref; - public final String code; - - /** - * Create a new OperationBlocked - * - * @param ref - * @param code - */ - public OperationBlocked(String ref, String code) { - super("You attempted an operation that was explicitly blocked (see the blocked_operations field of the given object)."); - this.ref = ref; - this.code = code; - } - - } - - /** - * The provision call can only be invoked on templates, not regular VMs. - */ - public static class ProvisionOnlyAllowedOnTemplate extends XenAPIException { - - /** - * Create a new ProvisionOnlyAllowedOnTemplate - */ - public ProvisionOnlyAllowedOnTemplate() { - super("The provision call can only be invoked on templates, not regular VMs."); - } - - } - - /** - * VM failed to shutdown before the timeout expired - */ - public static class VmShutdownTimeout extends XenAPIException { - public final String vm; - public final String timeout; - - /** - * Create a new VmShutdownTimeout - * - * @param vm - * @param timeout - */ - public VmShutdownTimeout(String vm, String timeout) { - super("VM failed to shutdown before the timeout expired"); - this.vm = vm; - this.timeout = timeout; - } - - } - - /** - * Role already exists. - */ - public static class RoleAlreadyExists extends XenAPIException { - - /** - * Create a new RoleAlreadyExists - */ - public RoleAlreadyExists() { - super("Role already exists."); - } - - } - - /** - * The network contains active PIFs and cannot be deleted. - */ - public static class NetworkContainsPif extends XenAPIException { - public final String pifs; - - /** - * Create a new NetworkContainsPif - * - * @param pifs - */ - public NetworkContainsPif(String pifs) { - super("The network contains active PIFs and cannot be deleted."); - this.pifs = pifs; - } - - } - - /** - * Could not find a network interface with the specified device name and MAC address. - */ - public static class CouldNotFindNetworkInterfaceWithSpecifiedDeviceNameAndMacAddress extends XenAPIException { - public final String device; - public final String mac; - - /** - * Create a new CouldNotFindNetworkInterfaceWithSpecifiedDeviceNameAndMacAddress - * - * @param device - * @param mac - */ - public CouldNotFindNetworkInterfaceWithSpecifiedDeviceNameAndMacAddress(String device, String mac) { - super("Could not find a network interface with the specified device name and MAC address."); - this.device = device; - this.mac = mac; - } - - } - - /** - * There was an error connecting to the host. the service contacted didn't reply properly. - */ - public static class JoiningHostServiceFailed extends XenAPIException { - - /** - * Create a new JoiningHostServiceFailed - */ - public JoiningHostServiceFailed() { - super("There was an error connecting to the host. the service contacted didn't reply properly."); - } - - } - - /** - * This operation cannot be performed because the specified VDI could not be found on the storage substrate - */ - public static class VdiMissing extends XenAPIException { - public final String sr; + public static class VdiIncompatibleType extends XenAPIException { public final String vdi; - - /** - * Create a new VdiMissing - * - * @param sr - * @param vdi - */ - public VdiMissing(String sr, String vdi) { - super("This operation cannot be performed because the specified VDI could not be found on the storage substrate"); - this.sr = sr; - this.vdi = vdi; - } - - } - - /** - * This VM has locked the DVD drive tray, so the disk cannot be ejected - */ - public static class VbdTrayLocked extends XenAPIException { - public final String vbd; - - /** - * Create a new VbdTrayLocked - * - * @param vbd - */ - public VbdTrayLocked(String vbd) { - super("This VM has locked the DVD drive tray, so the disk cannot be ejected"); - this.vbd = vbd; - } - - } - - /** - * The pool failed to enable external authentication. - */ - public static class PoolAuthEnableFailedPermissionDenied extends XenAPIException { - public final String host; - public final String message; - - /** - * Create a new PoolAuthEnableFailedPermissionDenied - * - * @param host - * @param message - */ - public PoolAuthEnableFailedPermissionDenied(String host, String message) { - super("The pool failed to enable external authentication."); - this.host = host; - this.message = message; - } - - } - - /** - * The uuid you supplied was invalid. - */ - public static class UuidInvalid extends XenAPIException { public final String type; - public final String uuid; /** - * Create a new UuidInvalid + * Create a new VdiIncompatibleType * + * @param vdi * @param type - * @param uuid */ - public UuidInvalid(String type, String uuid) { - super("The uuid you supplied was invalid."); + public VdiIncompatibleType(String vdi, String type) { + super("This operation cannot be performed because the specified VDI is of an incompatible type (eg: an HA statefile cannot be attached to a guest)"); + this.vdi = vdi; this.type = type; - this.uuid = uuid; - } - - } - - /** - * This operation is not allowed under your license. Please contact your support representative. - */ - public static class LicenceRestriction extends XenAPIException { - - /** - * Create a new LicenceRestriction - */ - public LicenceRestriction() { - super("This operation is not allowed under your license. Please contact your support representative."); } } @@ -6351,108 +4808,258 @@ public class Types } /** - * This command is only allowed on the OEM edition. + * Archive more frequent than backup. */ - public static class OnlyAllowedOnOemEdition extends XenAPIException { - public final String command; + public static class VmppArchiveMoreFrequentThanBackup extends XenAPIException { /** - * Create a new OnlyAllowedOnOemEdition + * Create a new VmppArchiveMoreFrequentThanBackup + */ + public VmppArchiveMoreFrequentThanBackup() { + super("Archive more frequent than backup."); + } + + } + + /** + * The import failed because this export has been created by a different (incompatible) product version + */ + public static class ImportIncompatibleVersion extends XenAPIException { + + /** + * Create a new ImportIncompatibleVersion + */ + public ImportIncompatibleVersion() { + super("The import failed because this export has been created by a different (incompatible) product version"); + } + + } + + /** + * The edition you supplied is invalid. + */ + public static class InvalidEdition extends XenAPIException { + public final String edition; + + /** + * Create a new InvalidEdition * - * @param command + * @param edition */ - public OnlyAllowedOnOemEdition(String command) { - super("This command is only allowed on the OEM edition."); - this.command = command; + public InvalidEdition(String edition) { + super("The edition you supplied is invalid."); + this.edition = edition; } } /** - * The operation cannot be performed on physical device + * Error querying the external directory service. */ - public static class VdiIsAPhysicalDevice extends XenAPIException { - public final String vdi; + public static class AuthServiceError extends XenAPIException { + public final String message; /** - * Create a new VdiIsAPhysicalDevice + * Create a new AuthServiceError * - * @param vdi + * @param message */ - public VdiIsAPhysicalDevice(String vdi) { - super("The operation cannot be performed on physical device"); - this.vdi = vdi; + public AuthServiceError(String message) { + super("Error querying the external directory service."); + this.message = message; } } /** - * There was an error processing your license. Please contact your support representative. + * Some volumes to be snapshot could not be added to the VSS snapshot set */ - public static class LicenseProcessingError extends XenAPIException { + public static class XenVssReqErrorAddingVolumeToSnapsetFailed extends XenAPIException { + public final String vm; + public final String errorCode; /** - * Create a new LicenseProcessingError + * Create a new XenVssReqErrorAddingVolumeToSnapsetFailed + * + * @param vm + * @param errorCode */ - public LicenseProcessingError() { - super("There was an error processing your license. Please contact your support representative."); + public XenVssReqErrorAddingVolumeToSnapsetFailed(String vm, String errorCode) { + super("Some volumes to be snapshot could not be added to the VSS snapshot set"); + this.vm = vm; + this.errorCode = errorCode; } } /** - * The specified VBD device is not recognised: please use a non-negative integer + * Caller not allowed to perform this operation. */ - public static class IllegalVbdDevice extends XenAPIException { - public final String vbd; + public static class PermissionDenied extends XenAPIException { + public final String message; + + /** + * Create a new PermissionDenied + * + * @param message + */ + public PermissionDenied(String message) { + super("Caller not allowed to perform this operation."); + this.message = message; + } + + } + + /** + * A device with the name given already exists on the selected VM + */ + public static class DeviceAlreadyExists extends XenAPIException { public final String device; /** - * Create a new IllegalVbdDevice + * Create a new DeviceAlreadyExists * - * @param vbd * @param device */ - public IllegalVbdDevice(String vbd, String device) { - super("The specified VBD device is not recognised: please use a non-negative integer"); - this.vbd = vbd; + public DeviceAlreadyExists(String device) { + super("A device with the name given already exists on the selected VM"); this.device = device; } } /** - * The specified CRL does not exist. + * An SR with that uuid already exists. */ - public static class CrlDoesNotExist extends XenAPIException { - public final String name; + public static class SrUuidExists extends XenAPIException { + public final String uuid; /** - * Create a new CrlDoesNotExist + * Create a new SrUuidExists * - * @param name + * @param uuid */ - public CrlDoesNotExist(String name) { - super("The specified CRL does not exist."); - this.name = name; + public SrUuidExists(String uuid) { + super("An SR with that uuid already exists."); + this.uuid = uuid; } } /** - * The request was asynchronously cancelled. + * This operation could not be performed, because the VM has one or more virtual GPUs. */ - public static class TaskCancelled extends XenAPIException { - public final String task; + public static class VmHasVgpu extends XenAPIException { + public final String vm; /** - * Create a new TaskCancelled + * Create a new VmHasVgpu * - * @param task + * @param vm */ - public TaskCancelled(String task) { - super("The request was asynchronously cancelled."); - this.task = task; + public VmHasVgpu(String vm) { + super("This operation could not be performed, because the VM has one or more virtual GPUs."); + this.vm = vm; + } + + } + + /** + * You reached the maximal number of concurrently migrating VMs. + */ + public static class TooManyStorageMigrates extends XenAPIException { + public final String number; + + /** + * Create a new TooManyStorageMigrates + * + * @param number + */ + public TooManyStorageMigrates(String number) { + super("You reached the maximal number of concurrently migrating VMs."); + this.number = number; + } + + } + + /** + * The operation could not be performed because HA is enabled on the Pool + */ + public static class HaIsEnabled extends XenAPIException { + + /** + * Create a new HaIsEnabled + */ + public HaIsEnabled() { + super("The operation could not be performed because HA is enabled on the Pool"); + } + + } + + /** + * You tried to destroy a system network: these cannot be destroyed. + */ + public static class CannotDestroySystemNetwork extends XenAPIException { + public final String network; + + /** + * Create a new CannotDestroySystemNetwork + * + * @param network + */ + public CannotDestroySystemNetwork(String network) { + super("You tried to destroy a system network: these cannot be destroyed."); + this.network = network; + } + + } + + /** + * This operation needs the OpenVSwitch networking backend to be enabled on all hosts in the pool. + */ + public static class OpenvswitchNotActive extends XenAPIException { + + /** + * Create a new OpenvswitchNotActive + */ + public OpenvswitchNotActive() { + super("This operation needs the OpenVSwitch networking backend to be enabled on all hosts in the pool."); + } + + } + + /** + * The function is not implemented + */ + public static class NotImplemented extends XenAPIException { + public final String function; + + /** + * Create a new NotImplemented + * + * @param function + */ + public NotImplemented(String function) { + super("The function is not implemented"); + this.function = function; + } + + } + + /** + * Drive could not be hot-unplugged because it is not marked as unpluggable + */ + public static class VbdNotUnpluggable extends XenAPIException { + public final String vbd; + + /** + * Create a new VbdNotUnpluggable + * + * @param vbd + */ + public VbdNotUnpluggable(String vbd) { + super("Drive could not be hot-unplugged because it is not marked as unpluggable"); + this.vbd = vbd; } } @@ -6475,6 +5082,404 @@ public class Types } + /** + * You attempted an operation on a VM that was not in an appropriate power state at the time; for example, you attempted to start a VM that was already running. The parameters returned are the VM's handle, and the expected and actual VM state at the time of the call. + */ + public static class VmBadPowerState extends XenAPIException { + public final String vm; + public final String expected; + public final String actual; + + /** + * Create a new VmBadPowerState + * + * @param vm + * @param expected + * @param actual + */ + public VmBadPowerState(String vm, String expected, String actual) { + super("You attempted an operation on a VM that was not in an appropriate power state at the time; for example, you attempted to start a VM that was already running. The parameters returned are the VM's handle, and the expected and actual VM state at the time of the call."); + this.vm = vm; + this.expected = expected; + this.actual = actual; + } + + } + + /** + * The VM is set up to use a feature that requires it to boot as HVM. + */ + public static class FeatureRequiresHvm extends XenAPIException { + public final String details; + + /** + * Create a new FeatureRequiresHvm + * + * @param details + */ + public FeatureRequiresHvm(String details) { + super("The VM is set up to use a feature that requires it to boot as HVM."); + this.details = details; + } + + } + + /** + * The VM could not be imported because the XVA file is invalid: an unexpected file was encountered. + */ + public static class ImportErrorUnexpectedFile extends XenAPIException { + public final String filenameExpected; + public final String filenameFound; + + /** + * Create a new ImportErrorUnexpectedFile + * + * @param filenameExpected + * @param filenameFound + */ + public ImportErrorUnexpectedFile(String filenameExpected, String filenameFound) { + super("The VM could not be imported because the XVA file is invalid: an unexpected file was encountered."); + this.filenameExpected = filenameExpected; + this.filenameFound = filenameFound; + } + + } + + /** + * The SR operation cannot be performed because the SR is not empty. + */ + public static class SrNotEmpty extends XenAPIException { + + /** + * Create a new SrNotEmpty + */ + public SrNotEmpty() { + super("The SR operation cannot be performed because the SR is not empty."); + } + + } + + /** + * The host joining the pool cannot have any VMs with active tasks. + */ + public static class JoiningHostCannotHaveVmsWithCurrentOperations extends XenAPIException { + + /** + * Create a new JoiningHostCannotHaveVmsWithCurrentOperations + */ + public JoiningHostCannotHaveVmsWithCurrentOperations() { + super("The host joining the pool cannot have any VMs with active tasks."); + } + + } + + /** + * This operation cannot be performed because the system does not manage this VDI + */ + public static class VdiNotManaged extends XenAPIException { + public final String vdi; + + /** + * Create a new VdiNotManaged + * + * @param vdi + */ + public VdiNotManaged(String vdi) { + super("This operation cannot be performed because the system does not manage this VDI"); + this.vdi = vdi; + } + + } + + /** + * The VM unexpectedly halted + */ + public static class VmHalted extends XenAPIException { + public final String vm; + + /** + * Create a new VmHalted + * + * @param vm + */ + public VmHalted(String vm) { + super("The VM unexpectedly halted"); + this.vm = vm; + } + + } + + /** + * Could not find a network interface with the specified device name and MAC address. + */ + public static class CouldNotFindNetworkInterfaceWithSpecifiedDeviceNameAndMacAddress extends XenAPIException { + public final String device; + public final String mac; + + /** + * Create a new CouldNotFindNetworkInterfaceWithSpecifiedDeviceNameAndMacAddress + * + * @param device + * @param mac + */ + public CouldNotFindNetworkInterfaceWithSpecifiedDeviceNameAndMacAddress(String device, String mac) { + super("Could not find a network interface with the specified device name and MAC address."); + this.device = device; + this.mac = mac; + } + + } + + /** + * There was an SR backend failure. + */ + public static class SrBackendFailure extends XenAPIException { + public final String status; + public final String stdout; + public final String stderr; + + /** + * Create a new SrBackendFailure + * + * @param status + * @param stdout + * @param stderr + */ + public SrBackendFailure(String status, String stdout, String stderr) { + super("There was an SR backend failure."); + this.status = status; + this.stdout = stdout; + this.stderr = stderr; + } + + } + + /** + * The restore could not be performed because a network interface is missing + */ + public static class RestoreTargetMissingDevice extends XenAPIException { + public final String device; + + /** + * Create a new RestoreTargetMissingDevice + * + * @param device + */ + public RestoreTargetMissingDevice(String device) { + super("The restore could not be performed because a network interface is missing"); + this.device = device; + } + + } + + /** + * The operation attempted is not valid for a template VM + */ + public static class VmIsTemplate extends XenAPIException { + public final String vm; + + /** + * Create a new VmIsTemplate + * + * @param vm + */ + public VmIsTemplate(String vm) { + super("The operation attempted is not valid for a template VM"); + this.vm = vm; + } + + } + + /** + * This operation cannot be performed because it would invalidate VM failover planning such that the system would be unable to guarantee to restart protected VMs after a Host failure. + */ + public static class HaOperationWouldBreakFailoverPlan extends XenAPIException { + + /** + * Create a new HaOperationWouldBreakFailoverPlan + */ + public HaOperationWouldBreakFailoverPlan() { + super("This operation cannot be performed because it would invalidate VM failover planning such that the system would be unable to guarantee to restart protected VMs after a Host failure."); + } + + } + + /** + * There is at least one VM assigned to this protection policy. + */ + public static class VmppHasVm extends XenAPIException { + + /** + * Create a new VmppHasVm + */ + public VmppHasVm() { + super("There is at least one VM assigned to this protection policy."); + } + + } + + /** + * You gave an invalid object reference. The object may have recently been deleted. The class parameter gives the type of reference given, and the handle parameter echoes the bad value given. + */ + public static class HandleInvalid extends XenAPIException { + public final String clazz; + public final String handle; + + /** + * Create a new HandleInvalid + * + * @param clazz + * @param handle + */ + public HandleInvalid(String clazz, String handle) { + super("You gave an invalid object reference. The object may have recently been deleted. The class parameter gives the type of reference given, and the handle parameter echoes the bad value given."); + this.clazz = clazz; + this.handle = handle; + } + + } + + /** + * The host joining the pool must have a physical management NIC (i.e. the management NIC must not be on a VLAN or bonded PIF). + */ + public static class PoolJoiningHostMustHavePhysicalManagementNic extends XenAPIException { + + /** + * Create a new PoolJoiningHostMustHavePhysicalManagementNic + */ + public PoolJoiningHostMustHavePhysicalManagementNic() { + super("The host joining the pool must have a physical management NIC (i.e. the management NIC must not be on a VLAN or bonded PIF)."); + } + + } + + /** + * The device is already attached to a VM + */ + public static class DeviceAlreadyAttached extends XenAPIException { + public final String device; + + /** + * Create a new DeviceAlreadyAttached + * + * @param device + */ + public DeviceAlreadyAttached(String device) { + super("The device is already attached to a VM"); + this.device = device; + } + + } + + /** + * This operation is not supported during an upgrade. + */ + public static class NotSupportedDuringUpgrade extends XenAPIException { + + /** + * Create a new NotSupportedDuringUpgrade + */ + public NotSupportedDuringUpgrade() { + super("This operation is not supported during an upgrade."); + } + + } + + /** + * Some VMs belonging to the appliance threw an exception while carrying out the specified operation + */ + public static class OperationPartiallyFailed extends XenAPIException { + public final String operation; + + /** + * Create a new OperationPartiallyFailed + * + * @param operation + */ + public OperationPartiallyFailed(String operation) { + super("Some VMs belonging to the appliance threw an exception while carrying out the specified operation"); + this.operation = operation; + } + + } + + /** + * Another operation involving the object is currently in progress + */ + public static class OtherOperationInProgress extends XenAPIException { + public final String clazz; + public final String object; + + /** + * Create a new OtherOperationInProgress + * + * @param clazz + * @param object + */ + public OtherOperationInProgress(String clazz, String object) { + super("Another operation involving the object is currently in progress"); + this.clazz = clazz; + this.object = object; + } + + } + + /** + * You cannot bond interfaces across different hosts. + */ + public static class PifCannotBondCrossHost extends XenAPIException { + + /** + * Create a new PifCannotBondCrossHost + */ + public PifCannotBondCrossHost() { + super("You cannot bond interfaces across different hosts."); + } + + } + + /** + * The patch precheck stage failed: the server is of an incorrect version. + */ + public static class PatchPrecheckFailedWrongServerVersion extends XenAPIException { + public final String patch; + public final String foundVersion; + public final String requiredVersion; + + /** + * Create a new PatchPrecheckFailedWrongServerVersion + * + * @param patch + * @param foundVersion + * @param requiredVersion + */ + public PatchPrecheckFailedWrongServerVersion(String patch, String foundVersion, String requiredVersion) { + super("The patch precheck stage failed: the server is of an incorrect version."); + this.patch = patch; + this.foundVersion = foundVersion; + this.requiredVersion = requiredVersion; + } + + } + + /** + * Cannot plug VIF + */ + public static class CannotPlugVif extends XenAPIException { + public final String VIF; + + /** + * Create a new CannotPlugVif + * + * @param VIF + */ + public CannotPlugVif(String VIF) { + super("Cannot plug VIF"); + this.VIF = VIF; + } + + } + /** * The pool failed to enable external authentication. */ @@ -6497,153 +5502,344 @@ public class Types } /** - * Host cannot rejoin pool because it should have fenced (it is not in the master's partition) + * This command is not allowed on the OEM edition. */ - public static class HaShouldBeFenced extends XenAPIException { - public final String host; + public static class NotAllowedOnOemEdition extends XenAPIException { + public final String command; /** - * Create a new HaShouldBeFenced + * Create a new NotAllowedOnOemEdition * - * @param host + * @param command */ - public HaShouldBeFenced(String host) { - super("Host cannot rejoin pool because it should have fenced (it is not in the master's partition)"); - this.host = host; + public NotAllowedOnOemEdition(String command) { + super("This command is not allowed on the OEM edition."); + this.command = command; } } /** - * You attempted an operation on a VM that was judged to be unsafe by the server. This can happen if the VM would run on a CPU that has a potentially incompatible set of feature flags to those the VM requires. If you want to override this warning then use the 'force' option. + * The patch precheck stage failed with an unknown error. See attached info for more details. */ - public static class VmUnsafeBoot extends XenAPIException { + public static class PatchPrecheckFailedUnknownError extends XenAPIException { + public final String patch; + public final String info; + + /** + * Create a new PatchPrecheckFailedUnknownError + * + * @param patch + * @param info + */ + public PatchPrecheckFailedUnknownError(String patch, String info) { + super("The patch precheck stage failed with an unknown error. See attached info for more details."); + this.patch = patch; + this.info = info; + } + + } + + /** + * The specified CRL is corrupt or unreadable. + */ + public static class CrlCorrupt extends XenAPIException { + public final String name; + + /** + * Create a new CrlCorrupt + * + * @param name + */ + public CrlCorrupt(String name) { + super("The specified CRL is corrupt or unreadable."); + this.name = name; + } + + } + + /** + * Cannot join pool whose external authentication configuration is different. + */ + public static class PoolJoiningExternalAuthMismatch extends XenAPIException { + + /** + * Create a new PoolJoiningExternalAuthMismatch + */ + public PoolJoiningExternalAuthMismatch() { + super("Cannot join pool whose external authentication configuration is different."); + } + + } + + /** + * There was an error connecting to the host. the service contacted didn't reply properly. + */ + public static class JoiningHostServiceFailed extends XenAPIException { + + /** + * Create a new JoiningHostServiceFailed + */ + public JoiningHostServiceFailed() { + super("There was an error connecting to the host. the service contacted didn't reply properly."); + } + + } + + /** + * The system rejected the password change request; perhaps the new password was too short? + */ + public static class ChangePasswordRejected extends XenAPIException { + public final String msg; + + /** + * Create a new ChangePasswordRejected + * + * @param msg + */ + public ChangePasswordRejected(String msg) { + super("The system rejected the password change request; perhaps the new password was too short?"); + this.msg = msg; + } + + } + + /** + * The operation you requested cannot be performed because the specified PIF is not managed by xapi. + */ + public static class PifUnmanaged extends XenAPIException { + public final String PIF; + + /** + * Create a new PifUnmanaged + * + * @param PIF + */ + public PifUnmanaged(String PIF) { + super("The operation you requested cannot be performed because the specified PIF is not managed by xapi."); + this.PIF = PIF; + } + + } + + /** + * The specified VM has a duplicate VBD device and cannot be started. + */ + public static class VmDuplicateVbdDevice extends XenAPIException { + public final String vm; + public final String vbd; + public final String device; + + /** + * Create a new VmDuplicateVbdDevice + * + * @param vm + * @param vbd + * @param device + */ + public VmDuplicateVbdDevice(String vm, String vbd, String device) { + super("The specified VM has a duplicate VBD device and cannot be started."); + this.vm = vm; + this.vbd = vbd; + this.device = device; + } + + } + + /** + * The restore could not be performed because the restore script failed. Is the file corrupt? + */ + public static class RestoreScriptFailed extends XenAPIException { + public final String log; + + /** + * Create a new RestoreScriptFailed + * + * @param log + */ + public RestoreScriptFailed(String log) { + super("The restore could not be performed because the restore script failed. Is the file corrupt?"); + this.log = log; + } + + } + + /** + * The WLB server reported that communication with XenServer timed out. + */ + public static class WlbXenserverTimeout extends XenAPIException { + + /** + * Create a new WlbXenserverTimeout + */ + public WlbXenserverTimeout() { + super("The WLB server reported that communication with XenServer timed out."); + } + + } + + /** + * The MAC address specified doesn't exist on this host. + */ + public static class MacDoesNotExist extends XenAPIException { + public final String MAC; + + /** + * Create a new MacDoesNotExist + * + * @param MAC + */ + public MacDoesNotExist(String MAC) { + super("The MAC address specified doesn't exist on this host."); + this.MAC = MAC; + } + + } + + /** + * The host is its own slave. Please use pool-emergency-transition-to-master or pool-emergency-reset-master. + */ + public static class HostItsOwnSlave extends XenAPIException { + + /** + * Create a new HostItsOwnSlave + */ + public HostItsOwnSlave() { + super("The host is its own slave. Please use pool-emergency-transition-to-master or pool-emergency-reset-master."); + } + + } + + /** + * The host failed to disable external authentication. + */ + public static class AuthDisableFailedWrongCredentials extends XenAPIException { + public final String message; + + /** + * Create a new AuthDisableFailedWrongCredentials + * + * @param message + */ + public AuthDisableFailedWrongCredentials(String message) { + super("The host failed to disable external authentication."); + this.message = message; + } + + } + + /** + * HA can only be enabled for 2 hosts or more. Note that 2 hosts requires a pre-configured quorum tiebreak script. + */ + public static class HaTooFewHosts extends XenAPIException { + + /** + * Create a new HaTooFewHosts + */ + public HaTooFewHosts() { + super("HA can only be enabled for 2 hosts or more. Note that 2 hosts requires a pre-configured quorum tiebreak script."); + } + + } + + /** + * This VM is assigned to a protection policy. + */ + public static class VmAssignedToProtectionPolicy extends XenAPIException { + public final String vm; + public final String vmpp; + + /** + * Create a new VmAssignedToProtectionPolicy + * + * @param vm + * @param vmpp + */ + public VmAssignedToProtectionPolicy(String vm, String vmpp) { + super("This VM is assigned to a protection policy."); + this.vm = vm; + this.vmpp = vmpp; + } + + } + + /** + * You tried to add a key-value pair to a map, but that key is already there. + */ + public static class MapDuplicateKey extends XenAPIException { + public final String type; + public final String paramName; + public final String uuid; + public final String key; + + /** + * Create a new MapDuplicateKey + * + * @param type + * @param paramName + * @param uuid + * @param key + */ + public MapDuplicateKey(String type, String paramName, String uuid, String key) { + super("You tried to add a key-value pair to a map, but that key is already there."); + this.type = type; + this.paramName = paramName; + this.uuid = uuid; + this.key = key; + } + + } + + /** + * The master reports that it cannot talk back to the slave on the supplied management IP address. + */ + public static class HostMasterCannotTalkBack extends XenAPIException { + public final String ip; + + /** + * Create a new HostMasterCannotTalkBack + * + * @param ip + */ + public HostMasterCannotTalkBack(String ip) { + super("The master reports that it cannot talk back to the slave on the supplied management IP address."); + this.ip = ip; + } + + } + + /** + * An error occured while restoring the memory image of the specified virtual machine + */ + public static class VmCheckpointResumeFailed extends XenAPIException { public final String vm; /** - * Create a new VmUnsafeBoot + * Create a new VmCheckpointResumeFailed * * @param vm */ - public VmUnsafeBoot(String vm) { - super("You attempted an operation on a VM that was judged to be unsafe by the server. This can happen if the VM would run on a CPU that has a potentially incompatible set of feature flags to those the VM requires. If you want to override this warning then use the 'force' option."); + public VmCheckpointResumeFailed(String vm) { + super("An error occured while restoring the memory image of the specified virtual machine"); this.vm = vm; } } /** - * PIF has no IP configuration (mode curently set to 'none') + * The specified CRL name is invalid. */ - public static class PifHasNoNetworkConfiguration extends XenAPIException { + public static class CrlNameInvalid extends XenAPIException { + public final String name; /** - * Create a new PifHasNoNetworkConfiguration - */ - public PifHasNoNetworkConfiguration() { - super("PIF has no IP configuration (mode curently set to 'none')"); - } - - } - - /** - * The request was rejected because the server is too busy. - */ - public static class TooBusy extends XenAPIException { - - /** - * Create a new TooBusy - */ - public TooBusy() { - super("The request was rejected because the server is too busy."); - } - - } - - /** - * You attempted to set a value that is not supported by this implementation. The fully-qualified field name and the value that you tried to set are returned. Also returned is a developer-only diagnostic reason. - */ - public static class ValueNotSupported extends XenAPIException { - public final String field; - public final String value; - public final String reason; - - /** - * Create a new ValueNotSupported + * Create a new CrlNameInvalid * - * @param field - * @param value - * @param reason + * @param name */ - public ValueNotSupported(String field, String value, String reason) { - super("You attempted to set a value that is not supported by this implementation. The fully-qualified field name and the value that you tried to set are returned. Also returned is a developer-only diagnostic reason."); - this.field = field; - this.value = value; - this.reason = reason; - } - - } - - /** - * You gave an invalid session reference. It may have been invalidated by a server restart, or timed out. You should get a new session handle, using one of the session.login_ calls. This error does not invalidate the current connection. The handle parameter echoes the bad value given. - */ - public static class SessionInvalid extends XenAPIException { - public final String handle; - - /** - * Create a new SessionInvalid - * - * @param handle - */ - public SessionInvalid(String handle) { - super("You gave an invalid session reference. It may have been invalidated by a server restart, or timed out. You should get a new session handle, using one of the session.login_ calls. This error does not invalidate the current connection. The handle parameter echoes the bad value given."); - this.handle = handle; - } - - } - - /** - * This operation cannot be performed because the referenced network is not properly shared. The network must either be entirely virtual or must be physically present via a currently_attached PIF on every host. - */ - public static class HaConstraintViolationNetworkNotShared extends XenAPIException { - public final String network; - - /** - * Create a new HaConstraintViolationNetworkNotShared - * - * @param network - */ - public HaConstraintViolationNetworkNotShared(String network) { - super("This operation cannot be performed because the referenced network is not properly shared. The network must either be entirely virtual or must be physically present via a currently_attached PIF on every host."); - this.network = network; - } - - } - - /** - * HA could not be enabled on the Pool because a liveset could not be formed: check storage and network heartbeat paths. - */ - public static class HaFailedToFormLiveset extends XenAPIException { - - /** - * Create a new HaFailedToFormLiveset - */ - public HaFailedToFormLiveset() { - super("HA could not be enabled on the Pool because a liveset could not be formed: check storage and network heartbeat paths."); - } - - } - - /** - * You cannot bond interfaces across different hosts. - */ - public static class PifCannotBondCrossHost extends XenAPIException { - - /** - * Create a new PifCannotBondCrossHost - */ - public PifCannotBondCrossHost() { - super("You cannot bond interfaces across different hosts."); + public CrlNameInvalid(String name) { + super("The specified CRL name is invalid."); + this.name = name; } } @@ -6667,83 +5863,885 @@ public class Types } /** - * The operation cannot be performed until the SR has been upgraded + * Could not enable redo log. */ - public static class SrRequiresUpgrade extends XenAPIException { - public final String SR; + public static class CannotEnableRedoLog extends XenAPIException { + public final String reason; /** - * Create a new SrRequiresUpgrade + * Create a new CannotEnableRedoLog * - * @param SR + * @param reason */ - public SrRequiresUpgrade(String SR) { - super("The operation cannot be performed until the SR has been upgraded"); - this.SR = SR; + public CannotEnableRedoLog(String reason) { + super("Could not enable redo log."); + this.reason = reason; } } /** - * The specified certificate does not exist. + * The specified device was not found. */ - public static class CertificateDoesNotExist extends XenAPIException { - public final String name; + public static class PifDeviceNotFound extends XenAPIException { /** - * Create a new CertificateDoesNotExist + * Create a new PifDeviceNotFound + */ + public PifDeviceNotFound() { + super("The specified device was not found."); + } + + } + + /** + * This host cannot join a pool because it's license does not support pooling + */ + public static class LicenseDoesNotSupportPooling extends XenAPIException { + + /** + * Create a new LicenseDoesNotSupportPooling + */ + public LicenseDoesNotSupportPooling() { + super("This host cannot join a pool because it's license does not support pooling"); + } + + } + + /** + * You attempted an operation that was explicitly blocked (see the blocked_operations field of the given object). + */ + public static class OperationBlocked extends XenAPIException { + public final String ref; + public final String code; + + /** + * Create a new OperationBlocked * - * @param name + * @param ref + * @param code */ - public CertificateDoesNotExist(String name) { - super("The specified certificate does not exist."); - this.name = name; + public OperationBlocked(String ref, String code) { + super("You attempted an operation that was explicitly blocked (see the blocked_operations field of the given object)."); + this.ref = ref; + this.code = code; } } /** - * This operation cannot be performed because it would invalidate VM failover planning such that the system would be unable to guarantee to restart protected VMs after a Host failure. + * This VM does not have a crashdump SR specified. */ - public static class HaOperationWouldBreakFailoverPlan extends XenAPIException { + public static class VmNoCrashdumpSr extends XenAPIException { + public final String vm; /** - * Create a new HaOperationWouldBreakFailoverPlan - */ - public HaOperationWouldBreakFailoverPlan() { - super("This operation cannot be performed because it would invalidate VM failover planning such that the system would be unable to guarantee to restart protected VMs after a Host failure."); - } - - } - - /** - * The requested update could to be obtained from the master. - */ - public static class CannotFetchPatch extends XenAPIException { - public final String uuid; - - /** - * Create a new CannotFetchPatch + * Create a new VmNoCrashdumpSr * - * @param uuid + * @param vm */ - public CannotFetchPatch(String uuid) { - super("The requested update could to be obtained from the master."); - this.uuid = uuid; + public VmNoCrashdumpSr(String vm) { + super("This VM does not have a crashdump SR specified."); + this.vm = vm; } } /** - * The requested update could not be found. This can occur when you designate a new master or xe patch-clean. Please upload the update again + * This host is being evacuated. */ - public static class CannotFindPatch extends XenAPIException { + public static class HostEvacuateInProgress extends XenAPIException { + public final String host; /** - * Create a new CannotFindPatch + * Create a new HostEvacuateInProgress + * + * @param host */ - public CannotFindPatch() { - super("The requested update could not be found. This can occur when you designate a new master or xe patch-clean. Please upload the update again"); + public HostEvacuateInProgress(String host) { + super("This host is being evacuated."); + this.host = host; + } + + } + + /** + * You must use tar output to retrieve system status from an OEM host. + */ + public static class SystemStatusMustUseTarOnOem extends XenAPIException { + + /** + * Create a new SystemStatusMustUseTarOnOem + */ + public SystemStatusMustUseTarOnOem() { + super("You must use tar output to retrieve system status from an OEM host."); + } + + } + + /** + * Cannot find a plan for placement of VMs as there are no other hosts available. + */ + public static class HaNoPlan extends XenAPIException { + + /** + * Create a new HaNoPlan + */ + public HaNoPlan() { + super("Cannot find a plan for placement of VMs as there are no other hosts available."); + } + + } + + /** + * The master says the host is not known to it. Perhaps the Host was deleted from the master's database? Perhaps the slave is pointing to the wrong master? + */ + public static class HostUnknownToMaster extends XenAPIException { + public final String host; + + /** + * Create a new HostUnknownToMaster + * + * @param host + */ + public HostUnknownToMaster(String host) { + super("The master says the host is not known to it. Perhaps the Host was deleted from the master's database? Perhaps the slave is pointing to the wrong master?"); + this.host = host; + } + + } + + /** + * The host failed to enable external authentication. + */ + public static class AuthEnableFailedWrongCredentials extends XenAPIException { + public final String message; + + /** + * Create a new AuthEnableFailedWrongCredentials + * + * @param message + */ + public AuthEnableFailedWrongCredentials(String message) { + super("The host failed to enable external authentication."); + this.message = message; + } + + } + + /** + * You attempted an operation that was not allowed. + */ + public static class OperationNotAllowed extends XenAPIException { + public final String reason; + + /** + * Create a new OperationNotAllowed + * + * @param reason + */ + public OperationNotAllowed(String reason) { + super("You attempted an operation that was not allowed."); + this.reason = reason; + } + + } + + /** + * Only the local superuser can execute this operation + */ + public static class UserIsNotLocalSuperuser extends XenAPIException { + public final String msg; + + /** + * Create a new UserIsNotLocalSuperuser + * + * @param msg + */ + public UserIsNotLocalSuperuser(String msg) { + super("Only the local superuser can execute this operation"); + this.msg = msg; + } + + } + + /** + * HA could not be enabled on the Pool because a liveset could not be formed: check storage and network heartbeat paths. + */ + public static class HaFailedToFormLiveset extends XenAPIException { + + /** + * Create a new HaFailedToFormLiveset + */ + public HaFailedToFormLiveset() { + super("HA could not be enabled on the Pool because a liveset could not be formed: check storage and network heartbeat paths."); + } + + } + + /** + * The connection to the WLB server was reset. + */ + public static class WlbConnectionReset extends XenAPIException { + + /** + * Create a new WlbConnectionReset + */ + public WlbConnectionReset() { + super("The connection to the WLB server was reset."); + } + + } + + /** + * The host CDROM drive does not contain a valid CD + */ + public static class HostCdDriveEmpty extends XenAPIException { + + /** + * Create a new HostCdDriveEmpty + */ + public HostCdDriveEmpty() { + super("The host CDROM drive does not contain a valid CD"); + } + + } + + /** + * Some events have been lost from the queue and cannot be retrieved. + */ + public static class EventsLost extends XenAPIException { + + /** + * Create a new EventsLost + */ + public EventsLost() { + super("Some events have been lost from the queue and cannot be retrieved."); + } + + } + + /** + * The provision call failed because it ran out of space. + */ + public static class ProvisionFailedOutOfSpace extends XenAPIException { + + /** + * Create a new ProvisionFailedOutOfSpace + */ + public ProvisionFailedOutOfSpace() { + super("The provision call failed because it ran out of space."); + } + + } + + /** + * This license file is no longer accepted. Please upgrade to the new licensing system. + */ + public static class LicenseFileDeprecated extends XenAPIException { + + /** + * Create a new LicenseFileDeprecated + */ + public LicenseFileDeprecated() { + super("This license file is no longer accepted. Please upgrade to the new licensing system."); + } + + } + + /** + * Subject already exists. + */ + public static class SubjectAlreadyExists extends XenAPIException { + + /** + * Create a new SubjectAlreadyExists + */ + public SubjectAlreadyExists() { + super("Subject already exists."); + } + + } + + /** + * This VM operation cannot be performed on an older-versioned host during an upgrade. + */ + public static class VmHostIncompatibleVersion extends XenAPIException { + public final String host; + public final String vm; + + /** + * Create a new VmHostIncompatibleVersion + * + * @param host + * @param vm + */ + public VmHostIncompatibleVersion(String host, String vm) { + super("This VM operation cannot be performed on an older-versioned host during an upgrade."); + this.host = host; + this.vm = vm; + } + + } + + /** + * This host failed in the middle of an automatic failover operation and needs to retry the failover action + */ + public static class HostBroken extends XenAPIException { + + /** + * Create a new HostBroken + */ + public HostBroken() { + super("This host failed in the middle of an automatic failover operation and needs to retry the failover action"); + } + + } + + /** + * This pool is not in emergency mode. + */ + public static class NotInEmergencyMode extends XenAPIException { + + /** + * Create a new NotInEmergencyMode + */ + public NotInEmergencyMode() { + super("This pool is not in emergency mode."); + } + + } + + /** + * Role cannot be found. + */ + public static class RoleNotFound extends XenAPIException { + + /** + * Create a new RoleNotFound + */ + public RoleNotFound() { + super("Role cannot be found."); + } + + } + + /** + * The MAC address specified still exists on this host. + */ + public static class MacStillExists extends XenAPIException { + public final String MAC; + + /** + * Create a new MacStillExists + * + * @param MAC + */ + public MacStillExists(String MAC) { + super("The MAC address specified still exists on this host."); + this.MAC = MAC; + } + + } + + /** + * The operation could not be performed while the host is still armed; it must be disarmed first + */ + public static class HaHostIsArmed extends XenAPIException { + public final String host; + + /** + * Create a new HaHostIsArmed + * + * @param host + */ + public HaHostIsArmed(String host) { + super("The operation could not be performed while the host is still armed; it must be disarmed first"); + this.host = host; + } + + } + + /** + * The host joining the pool cannot have any running VMs. + */ + public static class JoiningHostCannotHaveRunningVms extends XenAPIException { + + /** + * Create a new JoiningHostCannotHaveRunningVms + */ + public JoiningHostCannotHaveRunningVms() { + super("The host joining the pool cannot have any running VMs."); + } + + } + + /** + * An internal error generated by the domain builder. + */ + public static class DomainBuilderError extends XenAPIException { + public final String function; + public final String code; + public final String message; + + /** + * Create a new DomainBuilderError + * + * @param function + * @param code + * @param message + */ + public DomainBuilderError(String function, String code, String message) { + super("An internal error generated by the domain builder."); + this.function = function; + this.code = code; + this.message = message; + } + + } + + /** + * This operation cannot be performed because the referenced network is not properly shared. The network must either be entirely virtual or must be physically present via a currently_attached PIF on every host. + */ + public static class HaConstraintViolationNetworkNotShared extends XenAPIException { + public final String network; + + /** + * Create a new HaConstraintViolationNetworkNotShared + * + * @param network + */ + public HaConstraintViolationNetworkNotShared(String network) { + super("This operation cannot be performed because the referenced network is not properly shared. The network must either be entirely virtual or must be physically present via a currently_attached PIF on every host."); + this.network = network; + } + + } + + /** + * The pool master host cannot be removed. + */ + public static class HostCannotDestroySelf extends XenAPIException { + public final String host; + + /** + * Create a new HostCannotDestroySelf + * + * @param host + */ + public HostCannotDestroySelf(String host) { + super("The pool master host cannot be removed."); + this.host = host; + } + + } + + /** + * The WLB server reported an internal error. + */ + public static class WlbInternalError extends XenAPIException { + + /** + * Create a new WlbInternalError + */ + public WlbInternalError() { + super("The WLB server reported an internal error."); + } + + } + + /** + * The value specified is of the wrong type + */ + public static class FieldTypeError extends XenAPIException { + public final String field; + + /** + * Create a new FieldTypeError + * + * @param field + */ + public FieldTypeError(String field) { + super("The value specified is of the wrong type"); + this.field = field; + } + + } + + /** + * The device is not currently attached + */ + public static class DeviceAlreadyDetached extends XenAPIException { + public final String device; + + /** + * Create a new DeviceAlreadyDetached + * + * @param device + */ + public DeviceAlreadyDetached(String device) { + super("The device is not currently attached"); + this.device = device; + } + + } + + /** + * The GPU group contains active VGPUs and cannot be deleted. + */ + public static class GpuGroupContainsVgpu extends XenAPIException { + public final String vgpus; + + /** + * Create a new GpuGroupContainsVgpu + * + * @param vgpus + */ + public GpuGroupContainsVgpu(String vgpus) { + super("The GPU group contains active VGPUs and cannot be deleted."); + this.vgpus = vgpus; + } + + } + + /** + * The VM rejected the attempt to detach the device. + */ + public static class DeviceDetachRejected extends XenAPIException { + public final String type; + public final String ref; + public final String msg; + + /** + * Create a new DeviceDetachRejected + * + * @param type + * @param ref + * @param msg + */ + public DeviceDetachRejected(String type, String ref, String msg) { + super("The VM rejected the attempt to detach the device."); + this.type = type; + this.ref = ref; + this.msg = msg; + } + + } + + /** + * The SR could not be connected because the driver was not recognised. + */ + public static class SrUnknownDriver extends XenAPIException { + public final String driver; + + /** + * Create a new SrUnknownDriver + * + * @param driver + */ + public SrUnknownDriver(String driver) { + super("The SR could not be connected because the driver was not recognised."); + this.driver = driver; + } + + } + + /** + * The hosts in this pool are not homogeneous. + */ + public static class HostsNotHomogeneous extends XenAPIException { + public final String reason; + + /** + * Create a new HostsNotHomogeneous + * + * @param reason + */ + public HostsNotHomogeneous(String reason) { + super("The hosts in this pool are not homogeneous."); + this.reason = reason; + } + + } + + /** + * The VDI could not be opened for metadata recovery as it contains the current pool's metadata. + */ + public static class VdiContainsMetadataOfThisPool extends XenAPIException { + public final String vdi; + public final String pool; + + /** + * Create a new VdiContainsMetadataOfThisPool + * + * @param vdi + * @param pool + */ + public VdiContainsMetadataOfThisPool(String vdi, String pool) { + super("The VDI could not be opened for metadata recovery as it contains the current pool's metadata."); + this.vdi = vdi; + this.pool = pool; + } + + } + + /** + * The PBD could not be plugged because the SR is in use by another host and is not marked as sharable. + */ + public static class SrNotSharable extends XenAPIException { + public final String sr; + public final String host; + + /** + * Create a new SrNotSharable + * + * @param sr + * @param host + */ + public SrNotSharable(String sr, String host) { + super("The PBD could not be plugged because the SR is in use by another host and is not marked as sharable."); + this.sr = sr; + this.host = host; + } + + } + + /** + * The pool failed to enable external authentication. + */ + public static class PoolAuthEnableFailedDuplicateHostname extends XenAPIException { + public final String host; + public final String message; + + /** + * Create a new PoolAuthEnableFailedDuplicateHostname + * + * @param host + * @param message + */ + public PoolAuthEnableFailedDuplicateHostname(String host, String message) { + super("The pool failed to enable external authentication."); + this.host = host; + this.message = message; + } + + } + + /** + * The operation could not be performed because HA is not enabled on the Pool + */ + public static class HaNotEnabled extends XenAPIException { + + /** + * Create a new HaNotEnabled + */ + public HaNotEnabled() { + super("The operation could not be performed because HA is not enabled on the Pool"); + } + + } + + /** + * Attaching this SR failed. + */ + public static class SrAttachFailed extends XenAPIException { + public final String sr; + + /** + * Create a new SrAttachFailed + * + * @param sr + */ + public SrAttachFailed(String sr) { + super("Attaching this SR failed."); + this.sr = sr; + } + + } + + /** + * You tried to call a method with the incorrect number of parameters. The fully-qualified method name that you used, and the number of received and expected parameters are returned. + */ + public static class MessageParameterCountMismatch extends XenAPIException { + public final String method; + public final String expected; + public final String received; + + /** + * Create a new MessageParameterCountMismatch + * + * @param method + * @param expected + * @param received + */ + public MessageParameterCountMismatch(String method, String expected, String received) { + super("You tried to call a method with the incorrect number of parameters. The fully-qualified method name that you used, and the number of received and expected parameters are returned."); + this.method = method; + this.expected = expected; + this.received = received; + } + + } + + /** + * The specified VM has too little memory to be started. + */ + public static class VmMemorySizeTooLow extends XenAPIException { + public final String vm; + + /** + * Create a new VmMemorySizeTooLow + * + * @param vm + */ + public VmMemorySizeTooLow(String vm) { + super("The specified VM has too little memory to be started."); + this.vm = vm; + } + + } + + /** + * The host joining the pool must have the same product version as the pool master. + */ + public static class PoolJoiningHostMustHaveSameProductVersion extends XenAPIException { + + /** + * Create a new PoolJoiningHostMustHaveSameProductVersion + */ + public PoolJoiningHostMustHaveSameProductVersion() { + super("The host joining the pool must have the same product version as the pool master."); + } + + } + + /** + * You attempted to run a VM on a host which doesn't have I/O virtualization (IOMMU/VT-d) enabled, which is needed by the VM. + */ + public static class VmRequiresIommu extends XenAPIException { + public final String host; + + /** + * Create a new VmRequiresIommu + * + * @param host + */ + public VmRequiresIommu(String host) { + super("You attempted to run a VM on a host which doesn't have I/O virtualization (IOMMU/VT-d) enabled, which is needed by the VM."); + this.host = host; + } + + } + + /** + * The pool failed to enable external authentication. + */ + public static class PoolAuthEnableFailedPermissionDenied extends XenAPIException { + public final String host; + public final String message; + + /** + * Create a new PoolAuthEnableFailedPermissionDenied + * + * @param host + * @param message + */ + public PoolAuthEnableFailedPermissionDenied(String host, String message) { + super("The pool failed to enable external authentication."); + this.host = host; + this.message = message; + } + + } + + /** + * VM cannot be started because it requires a VDI which cannot be attached + */ + public static class VmRequiresVdi extends XenAPIException { + public final String vm; + public final String vdi; + + /** + * Create a new VmRequiresVdi + * + * @param vm + * @param vdi + */ + public VmRequiresVdi(String vm, String vdi) { + super("VM cannot be started because it requires a VDI which cannot be attached"); + this.vm = vm; + this.vdi = vdi; + } + + } + + /** + * There was an error connecting to the host while joining it in the pool. + */ + public static class JoiningHostConnectionFailed extends XenAPIException { + + /** + * Create a new JoiningHostConnectionFailed + */ + public JoiningHostConnectionFailed() { + super("There was an error connecting to the host while joining it in the pool."); + } + + } + + /** + * You tried to create a PIF, but the network you tried to attach it to is already attached to some other PIF, and so the creation failed. + */ + public static class NetworkAlreadyConnected extends XenAPIException { + public final String network; + public final String connectedPIF; + + /** + * Create a new NetworkAlreadyConnected + * + * @param network + * @param connectedPIF + */ + public NetworkAlreadyConnected(String network, String connectedPIF) { + super("You tried to create a PIF, but the network you tried to attach it to is already attached to some other PIF, and so the creation failed."); + this.network = network; + this.connectedPIF = connectedPIF; + } + + } + + /** + * This host can not be forgotten because there are some user VMs still running + */ + public static class HostHasResidentVms extends XenAPIException { + public final String host; + + /** + * Create a new HostHasResidentVms + * + * @param host + */ + public HostHasResidentVms(String host) { + super("This host can not be forgotten because there are some user VMs still running"); + this.host = host; + } + + } + + /** + * This session is not registered to receive events. You must call event.register before event.next. The session handle you are using is echoed. + */ + public static class SessionNotRegistered extends XenAPIException { + public final String handle; + + /** + * Create a new SessionNotRegistered + * + * @param handle + */ + public SessionNotRegistered(String handle) { + super("This session is not registered to receive events. You must call event.register before event.next. The session handle you are using is echoed."); + this.handle = handle; } } @@ -6773,22 +6771,362 @@ public class Types } /** - * You attempted to run a VM on a host which doesn't have a PIF on a Network needed by the VM. The VM has at least one VIF attached to the Network. + * The SR could not be destroyed, as the 'indestructible' flag was set on it. */ - public static class VmRequiresNetwork extends XenAPIException { - public final String vm; - public final String network; + public static class SrIndestructible extends XenAPIException { + public final String sr; /** - * Create a new VmRequiresNetwork + * Create a new SrIndestructible * - * @param vm - * @param network + * @param sr */ - public VmRequiresNetwork(String vm, String network) { - super("You attempted to run a VM on a host which doesn't have a PIF on a Network needed by the VM. The VM has at least one VIF attached to the Network."); - this.vm = vm; - this.network = network; + public SrIndestructible(String sr) { + super("The SR could not be destroyed, as the 'indestructible' flag was set on it."); + this.sr = sr; + } + + } + + /** + * The WLB server reported that XenServer said something to it that WLB wasn't expecting or didn't understand. + */ + public static class WlbXenserverMalformedResponse extends XenAPIException { + + /** + * Create a new WlbXenserverMalformedResponse + */ + public WlbXenserverMalformedResponse() { + super("The WLB server reported that XenServer said something to it that WLB wasn't expecting or didn't understand."); + } + + } + + /** + * This operation cannot be performed because this VDI could not be properly attached to the VM. + */ + public static class VdiNotAvailable extends XenAPIException { + public final String vdi; + + /** + * Create a new VdiNotAvailable + * + * @param vdi + */ + public VdiNotAvailable(String vdi) { + super("This operation cannot be performed because this VDI could not be properly attached to the VM."); + this.vdi = vdi; + } + + } + + /** + * The SR is full. Requested new size exceeds the maximum size + */ + public static class SrFull extends XenAPIException { + public final String requested; + public final String maximum; + + /** + * Create a new SrFull + * + * @param requested + * @param maximum + */ + public SrFull(String requested, String maximum) { + super("The SR is full. Requested new size exceeds the maximum size"); + this.requested = requested; + this.maximum = maximum; + } + + } + + /** + * The requested update could to be obtained from the master. + */ + public static class CannotFetchPatch extends XenAPIException { + public final String uuid; + + /** + * Create a new CannotFetchPatch + * + * @param uuid + */ + public CannotFetchPatch(String uuid) { + super("The requested update could to be obtained from the master."); + this.uuid = uuid; + } + + } + + /** + * Cannot perform operation as the host is running in emergency mode. + */ + public static class HostInEmergencyMode extends XenAPIException { + + /** + * Create a new HostInEmergencyMode + */ + public HostInEmergencyMode() { + super("Cannot perform operation as the host is running in emergency mode."); + } + + } + + /** + * Some data checksums were incorrect; the VM may be corrupt. + */ + public static class ImportErrorSomeChecksumsFailed extends XenAPIException { + + /** + * Create a new ImportErrorSomeChecksumsFailed + */ + public ImportErrorSomeChecksumsFailed() { + super("Some data checksums were incorrect; the VM may be corrupt."); + } + + } + + /** + * The requested plugin could not be found. + */ + public static class XenapiMissingPlugin extends XenAPIException { + public final String name; + + /** + * Create a new XenapiMissingPlugin + * + * @param name + */ + public XenapiMissingPlugin(String name) { + super("The requested plugin could not be found."); + this.name = name; + } + + } + + /** + * External authentication for this host is already enabled. + */ + public static class AuthAlreadyEnabled extends XenAPIException { + public final String currentAuthType; + public final String currentServiceName; + + /** + * Create a new AuthAlreadyEnabled + * + * @param currentAuthType + * @param currentServiceName + */ + public AuthAlreadyEnabled(String currentAuthType, String currentServiceName) { + super("External authentication for this host is already enabled."); + this.currentAuthType = currentAuthType; + this.currentServiceName = currentServiceName; + } + + } + + /** + * You attempted to set a value that is not supported by this implementation. The fully-qualified field name and the value that you tried to set are returned. Also returned is a developer-only diagnostic reason. + */ + public static class ValueNotSupported extends XenAPIException { + public final String field; + public final String value; + public final String reason; + + /** + * Create a new ValueNotSupported + * + * @param field + * @param value + * @param reason + */ + public ValueNotSupported(String field, String value, String reason) { + super("You attempted to set a value that is not supported by this implementation. The fully-qualified field name and the value that you tried to set are returned. Also returned is a developer-only diagnostic reason."); + this.field = field; + this.value = value; + this.reason = reason; + } + + } + + /** + * The tunnel transport PIF has no IP configuration set. + */ + public static class TransportPifNotConfigured extends XenAPIException { + public final String PIF; + + /** + * Create a new TransportPifNotConfigured + * + * @param PIF + */ + public TransportPifNotConfigured(String PIF) { + super("The tunnel transport PIF has no IP configuration set."); + this.PIF = PIF; + } + + } + + /** + * The patch precheck stage failed: there are one or more VMs still running on the server. All VMs must be suspended before the patch can be applied. + */ + public static class PatchPrecheckFailedVmRunning extends XenAPIException { + public final String patch; + + /** + * Create a new PatchPrecheckFailedVmRunning + * + * @param patch + */ + public PatchPrecheckFailedVmRunning(String patch) { + super("The patch precheck stage failed: there are one or more VMs still running on the server. All VMs must be suspended before the patch can be applied."); + this.patch = patch; + } + + } + + /** + * The SR is still connected to a host via a PBD. It cannot be destroyed or forgotten. + */ + public static class SrHasPbd extends XenAPIException { + public final String sr; + + /** + * Create a new SrHasPbd + * + * @param sr + */ + public SrHasPbd(String sr) { + super("The SR is still connected to a host via a PBD. It cannot be destroyed or forgotten."); + this.sr = sr; + } + + } + + /** + * The device name is invalid + */ + public static class InvalidDevice extends XenAPIException { + public final String device; + + /** + * Create a new InvalidDevice + * + * @param device + */ + public InvalidDevice(String device) { + super("The device name is invalid"); + this.device = device; + } + + } + + /** + * VGPU type is not compatible with one or more of the VGPU types currently running on this PGPU + */ + public static class VgpuTypeNotCompatibleWithRunningType extends XenAPIException { + public final String pgpu; + public final String type; + public final String runningType; + + /** + * Create a new VgpuTypeNotCompatibleWithRunningType + * + * @param pgpu + * @param type + * @param runningType + */ + public VgpuTypeNotCompatibleWithRunningType(String pgpu, String type, String runningType) { + super("VGPU type is not compatible with one or more of the VGPU types currently running on this PGPU"); + this.pgpu = pgpu; + this.type = type; + this.runningType = runningType; + } + + } + + /** + * An activation key can only be applied when the edition is set to 'free'. + */ + public static class ActivationWhileNotFree extends XenAPIException { + + /** + * Create a new ActivationWhileNotFree + */ + public ActivationWhileNotFree() { + super("An activation key can only be applied when the edition is set to 'free'."); + } + + } + + /** + * The operation required write access but this VDI is read-only + */ + public static class VdiReadonly extends XenAPIException { + public final String vdi; + + /** + * Create a new VdiReadonly + * + * @param vdi + */ + public VdiReadonly(String vdi) { + super("The operation required write access but this VDI is read-only"); + this.vdi = vdi; + } + + } + + /** + * This operation can only be performed on CD VDIs (iso files or CDROM drives) + */ + public static class VdiIsNotIso extends XenAPIException { + public final String vdi; + public final String type; + + /** + * Create a new VdiIsNotIso + * + * @param vdi + * @param type + */ + public VdiIsNotIso(String vdi, String type) { + super("This operation can only be performed on CD VDIs (iso files or CDROM drives)"); + this.vdi = vdi; + this.type = type; + } + + } + + /** + * The specified host is disabled. + */ + public static class HostDisabled extends XenAPIException { + public final String host; + + /** + * Create a new HostDisabled + * + * @param host + */ + public HostDisabled(String host) { + super("The specified host is disabled."); + this.host = host; + } + + } + + /** + * The WLB server refused a connection to XenServer. + */ + public static class WlbConnectionRefused extends XenAPIException { + + /** + * Create a new WlbConnectionRefused + */ + public WlbConnectionRefused() { + super("The WLB server refused a connection to XenServer."); } } @@ -6812,22 +7150,1425 @@ public class Types } /** - * Not enough host memory is available to perform this operation + * This operation could not be performed because the state partition could not be found */ - public static class HostNotEnoughFreeMemory extends XenAPIException { - public final String needed; - public final String available; + public static class CannotFindStatePartition extends XenAPIException { /** - * Create a new HostNotEnoughFreeMemory - * - * @param needed - * @param available + * Create a new CannotFindStatePartition */ - public HostNotEnoughFreeMemory(String needed, String available) { - super("Not enough host memory is available to perform this operation"); - this.needed = needed; - this.available = available; + public CannotFindStatePartition() { + super("This operation could not be performed because the state partition could not be found"); + } + + } + + /** + * The specified interface cannot be used because it has no IP address + */ + public static class InterfaceHasNoIp extends XenAPIException { + public final String iface; + + /** + * Create a new InterfaceHasNoIp + * + * @param iface + */ + public InterfaceHasNoIp(String iface) { + super("The specified interface cannot be used because it has no IP address"); + this.iface = iface; + } + + } + + /** + * The host joining the pool cannot have any running or suspended VMs. + */ + public static class JoiningHostCannotHaveRunningOrSuspendedVms extends XenAPIException { + + /** + * Create a new JoiningHostCannotHaveRunningOrSuspendedVms + */ + public JoiningHostCannotHaveRunningOrSuspendedVms() { + super("The host joining the pool cannot have any running or suspended VMs."); + } + + } + + /** + * The host failed to enable external authentication. + */ + public static class AuthEnableFailedDomainLookupFailed extends XenAPIException { + public final String message; + + /** + * Create a new AuthEnableFailedDomainLookupFailed + * + * @param message + */ + public AuthEnableFailedDomainLookupFailed(String message) { + super("The host failed to enable external authentication."); + this.message = message; + } + + } + + /** + * The given feature string is not valid. + */ + public static class InvalidFeatureString extends XenAPIException { + public final String details; + + /** + * Create a new InvalidFeatureString + * + * @param details + */ + public InvalidFeatureString(String details) { + super("The given feature string is not valid."); + this.details = details; + } + + } + + /** + * Cannot forward messages because the host cannot be contacted. The host may be switched off or there may be network connectivity problems. + */ + public static class CannotContactHost extends XenAPIException { + public final String host; + + /** + * Create a new CannotContactHost + * + * @param host + */ + public CannotContactHost(String host) { + super("Cannot forward messages because the host cannot be contacted. The host may be switched off or there may be network connectivity problems."); + this.host = host; + } + + } + + /** + * The MAC address specified is not valid. + */ + public static class MacInvalid extends XenAPIException { + public final String MAC; + + /** + * Create a new MacInvalid + * + * @param MAC + */ + public MacInvalid(String MAC) { + super("The MAC address specified is not valid."); + this.MAC = MAC; + } + + } + + /** + * Operation could not be performed because the drive is empty + */ + public static class VbdIsEmpty extends XenAPIException { + public final String vbd; + + /** + * Create a new VbdIsEmpty + * + * @param vbd + */ + public VbdIsEmpty(String vbd) { + super("Operation could not be performed because the drive is empty"); + this.vbd = vbd; + } + + } + + /** + * The pool failed to enable external authentication. + */ + public static class PoolAuthEnableFailedInvalidOu extends XenAPIException { + public final String host; + public final String message; + + /** + * Create a new PoolAuthEnableFailedInvalidOu + * + * @param host + * @param message + */ + public PoolAuthEnableFailedInvalidOu(String host, String message) { + super("The pool failed to enable external authentication."); + this.host = host; + this.message = message; + } + + } + + /** + * You tried to call a method that does not exist. The method name that you used is echoed. + */ + public static class MessageMethodUnknown extends XenAPIException { + public final String method; + + /** + * Create a new MessageMethodUnknown + * + * @param method + */ + public MessageMethodUnknown(String method) { + super("You tried to call a method that does not exist. The method name that you used is echoed."); + this.method = method; + } + + } + + /** + * The operation you requested cannot be performed because the specified PIF does not allow unplug. + */ + public static class PifDoesNotAllowUnplug extends XenAPIException { + public final String PIF; + + /** + * Create a new PifDoesNotAllowUnplug + * + * @param PIF + */ + public PifDoesNotAllowUnplug(String PIF) { + super("The operation you requested cannot be performed because the specified PIF does not allow unplug."); + this.PIF = PIF; + } + + } + + /** + * The patch precheck stage failed: prerequisite patches are missing. + */ + public static class PatchPrecheckFailedPrerequisiteMissing extends XenAPIException { + public final String patch; + public final String prerequisitePatchUuidList; + + /** + * Create a new PatchPrecheckFailedPrerequisiteMissing + * + * @param patch + * @param prerequisitePatchUuidList + */ + public PatchPrecheckFailedPrerequisiteMissing(String patch, String prerequisitePatchUuidList) { + super("The patch precheck stage failed: prerequisite patches are missing."); + this.patch = patch; + this.prerequisitePatchUuidList = prerequisitePatchUuidList; + } + + } + + /** + * This operation cannot be performed because the specified VDI could not be found on the storage substrate + */ + public static class VdiMissing extends XenAPIException { + public final String sr; + public final String vdi; + + /** + * Create a new VdiMissing + * + * @param sr + * @param vdi + */ + public VdiMissing(String sr, String vdi) { + super("This operation cannot be performed because the specified VDI could not be found on the storage substrate"); + this.sr = sr; + this.vdi = vdi; + } + + } + + /** + * The WLB server reported that XenServer rejected its configured authentication details. + */ + public static class WlbXenserverAuthenticationFailed extends XenAPIException { + + /** + * Create a new WlbXenserverAuthenticationFailed + */ + public WlbXenserverAuthenticationFailed() { + super("The WLB server reported that XenServer rejected its configured authentication details."); + } + + } + + /** + * The host joining the pool cannot contain any shared storage. + */ + public static class JoiningHostCannotContainSharedSrs extends XenAPIException { + + /** + * Create a new JoiningHostCannotContainSharedSrs + */ + public JoiningHostCannotContainSharedSrs() { + super("The host joining the pool cannot contain any shared storage."); + } + + } + + /** + * The restore could not be performed because the host's current management interface is not in the backup. The interfaces mentioned in the backup are: + */ + public static class RestoreTargetMgmtIfNotInBackup extends XenAPIException { + + /** + * Create a new RestoreTargetMgmtIfNotInBackup + */ + public RestoreTargetMgmtIfNotInBackup() { + super("The restore could not be performed because the host's current management interface is not in the backup. The interfaces mentioned in the backup are:"); + } + + } + + /** + * The VSS plug-in is not installed on this virtual machine + */ + public static class VmSnapshotWithQuiesceNotSupported extends XenAPIException { + public final String vm; + public final String error; + + /** + * Create a new VmSnapshotWithQuiesceNotSupported + * + * @param vm + * @param error + */ + public VmSnapshotWithQuiesceNotSupported(String vm, String error) { + super("The VSS plug-in is not installed on this virtual machine"); + this.vm = vm; + this.error = error; + } + + } + + /** + * You tried to destroy a PIF, but it represents an aspect of the physical host configuration, and so cannot be destroyed. The parameter echoes the PIF handle you gave. + */ + public static class PifIsPhysical extends XenAPIException { + public final String PIF; + + /** + * Create a new PifIsPhysical + * + * @param PIF + */ + public PifIsPhysical(String PIF) { + super("You tried to destroy a PIF, but it represents an aspect of the physical host configuration, and so cannot be destroyed. The parameter echoes the PIF handle you gave."); + this.PIF = PIF; + } + + } + + /** + * The operation could not be performed because a domain still exists for the specified VM. + */ + public static class DomainExists extends XenAPIException { + public final String vm; + public final String domid; + + /** + * Create a new DomainExists + * + * @param vm + * @param domid + */ + public DomainExists(String vm, String domid) { + super("The operation could not be performed because a domain still exists for the specified VM."); + this.vm = vm; + this.domid = domid; + } + + } + + /** + * You attempted an operation on a VM which requires a more recent version of the PV drivers. Please upgrade your PV drivers. + */ + public static class VmOldPvDrivers extends XenAPIException { + public final String vm; + public final String major; + public final String minor; + + /** + * Create a new VmOldPvDrivers + * + * @param vm + * @param major + * @param minor + */ + public VmOldPvDrivers(String vm, String major, String minor) { + super("You attempted an operation on a VM which requires a more recent version of the PV drivers. Please upgrade your PV drivers."); + this.vm = vm; + this.major = major; + this.minor = minor; + } + + } + + /** + * You tried to create a VLAN or tunnel on top of a tunnel access PIF - use the underlying transport PIF instead. + */ + public static class IsTunnelAccessPif extends XenAPIException { + public final String PIF; + + /** + * Create a new IsTunnelAccessPif + * + * @param PIF + */ + public IsTunnelAccessPif(String PIF) { + super("You tried to create a VLAN or tunnel on top of a tunnel access PIF - use the underlying transport PIF instead."); + this.PIF = PIF; + } + + } + + /** + * The operation cannot be performed until the SR has been upgraded + */ + public static class SrRequiresUpgrade extends XenAPIException { + public final String SR; + + /** + * Create a new SrRequiresUpgrade + * + * @param SR + */ + public SrRequiresUpgrade(String SR) { + super("The operation cannot be performed until the SR has been upgraded"); + this.SR = SR; + } + + } + + /** + * Role already exists. + */ + public static class RoleAlreadyExists extends XenAPIException { + + /** + * Create a new RoleAlreadyExists + */ + public RoleAlreadyExists() { + super("Role already exists."); + } + + } + + /** + * Initialization of the VSS requester failed + */ + public static class XenVssReqErrorInitFailed extends XenAPIException { + public final String vm; + public final String errorCode; + + /** + * Create a new XenVssReqErrorInitFailed + * + * @param vm + * @param errorCode + */ + public XenVssReqErrorInitFailed(String vm, String errorCode) { + super("Initialization of the VSS requester failed"); + this.vm = vm; + this.errorCode = errorCode; + } + + } + + /** + * The specified CRL does not exist. + */ + public static class CrlDoesNotExist extends XenAPIException { + public final String name; + + /** + * Create a new CrlDoesNotExist + * + * @param name + */ + public CrlDoesNotExist(String name) { + super("The specified CRL does not exist."); + this.name = name; + } + + } + + /** + * The uploaded patch file is invalid + */ + public static class InvalidPatch extends XenAPIException { + + /** + * Create a new InvalidPatch + */ + public InvalidPatch() { + super("The uploaded patch file is invalid"); + } + + } + + /** + * XHA cannot be enabled because this host's license does not allow it + */ + public static class LicenseDoesNotSupportXha extends XenAPIException { + + /** + * Create a new LicenseDoesNotSupportXha + */ + public LicenseDoesNotSupportXha() { + super("XHA cannot be enabled because this host's license does not allow it"); + } + + } + + /** + * External authentication is disabled, unable to resolve subject name. + */ + public static class AuthIsDisabled extends XenAPIException { + + /** + * Create a new AuthIsDisabled + */ + public AuthIsDisabled() { + super("External authentication is disabled, unable to resolve subject name."); + } + + } + + /** + * The Citrix XenServer Vss Provider is not loaded + */ + public static class XenVssReqErrorProvNotLoaded extends XenAPIException { + public final String vm; + public final String errorCode; + + /** + * Create a new XenVssReqErrorProvNotLoaded + * + * @param vm + * @param errorCode + */ + public XenVssReqErrorProvNotLoaded(String vm, String errorCode) { + super("The Citrix XenServer Vss Provider is not loaded"); + this.vm = vm; + this.errorCode = errorCode; + } + + } + + /** + * HVM is required for this operation + */ + public static class VmHvmRequired extends XenAPIException { + public final String vm; + + /** + * Create a new VmHvmRequired + * + * @param vm + */ + public VmHvmRequired(String vm) { + super("HVM is required for this operation"); + this.vm = vm; + } + + } + + /** + * The WLB server rejected XenServer's request as malformed. + */ + public static class WlbMalformedRequest extends XenAPIException { + + /** + * Create a new WlbMalformedRequest + */ + public WlbMalformedRequest() { + super("The WLB server rejected XenServer's request as malformed."); + } + + } + + /** + * The BIOS strings for this VM have already been set and cannot be changed anymore. + */ + public static class VmBiosStringsAlreadySet extends XenAPIException { + + /** + * Create a new VmBiosStringsAlreadySet + */ + public VmBiosStringsAlreadySet() { + super("The BIOS strings for this VM have already been set and cannot be changed anymore."); + } + + } + + /** + * The pool failed to disable the external authentication of at least one host. + */ + public static class PoolAuthDisableFailed extends XenAPIException { + public final String host; + public final String message; + + /** + * Create a new PoolAuthDisableFailed + * + * @param host + * @param message + */ + public PoolAuthDisableFailed(String host, String message) { + super("The pool failed to disable the external authentication of at least one host."); + this.host = host; + this.message = message; + } + + } + + /** + * This operation could not be performed, because the VM has one or more PCI devices passed through. + */ + public static class VmHasPciAttached extends XenAPIException { + public final String vm; + + /** + * Create a new VmHasPciAttached + * + * @param vm + */ + public VmHasPciAttached(String vm) { + super("This operation could not be performed, because the VM has one or more PCI devices passed through."); + this.vm = vm; + } + + } + + /** + * The quiesced-snapshot operation failed for an unexpected reason + */ + public static class VmSnapshotWithQuiesceFailed extends XenAPIException { + public final String vm; + + /** + * Create a new VmSnapshotWithQuiesceFailed + * + * @param vm + */ + public VmSnapshotWithQuiesceFailed(String vm) { + super("The quiesced-snapshot operation failed for an unexpected reason"); + this.vm = vm; + } + + } + + /** + * The configured WLB server name failed to resolve in DNS. + */ + public static class WlbUnknownHost extends XenAPIException { + + /** + * Create a new WlbUnknownHost + */ + public WlbUnknownHost() { + super("The configured WLB server name failed to resolve in DNS."); + } + + } + + /** + * The SR operation cannot be performed because a device underlying the SR is in use by the host. + */ + public static class SrDeviceInUse extends XenAPIException { + + /** + * Create a new SrDeviceInUse + */ + public SrDeviceInUse() { + super("The SR operation cannot be performed because a device underlying the SR is in use by the host."); + } + + } + + /** + * All VBDs of type 'disk' must be read/write for HVM guests + */ + public static class DiskVbdMustBeReadwriteForHvm extends XenAPIException { + public final String vbd; + + /** + * Create a new DiskVbdMustBeReadwriteForHvm + * + * @param vbd + */ + public DiskVbdMustBeReadwriteForHvm(String vbd) { + super("All VBDs of type 'disk' must be read/write for HVM guests"); + this.vbd = vbd; + } + + } + + /** + * A PIF with this specified device name already exists. + */ + public static class DuplicatePifDeviceName extends XenAPIException { + public final String device; + + /** + * Create a new DuplicatePifDeviceName + * + * @param device + */ + public DuplicatePifDeviceName(String device) { + super("A PIF with this specified device name already exists."); + this.device = device; + } + + } + + /** + * XenServer Tools ISO must be ejected from all running VMs. + */ + public static class PatchPrecheckFailedIsoMounted extends XenAPIException { + public final String patch; + + /** + * Create a new PatchPrecheckFailedIsoMounted + * + * @param patch + */ + public PatchPrecheckFailedIsoMounted(String patch) { + super("XenServer Tools ISO must be ejected from all running VMs."); + this.patch = patch; + } + + } + + /** + * The patch precheck stage failed: the server is of an incorrect build. + */ + public static class PatchPrecheckFailedWrongServerBuild extends XenAPIException { + public final String patch; + public final String foundBuild; + public final String requiredBuild; + + /** + * Create a new PatchPrecheckFailedWrongServerBuild + * + * @param patch + * @param foundBuild + * @param requiredBuild + */ + public PatchPrecheckFailedWrongServerBuild(String patch, String foundBuild, String requiredBuild) { + super("The patch precheck stage failed: the server is of an incorrect build."); + this.patch = patch; + this.foundBuild = foundBuild; + this.requiredBuild = requiredBuild; + } + + } + + /** + * The specified VM is not currently resident on the specified host. + */ + public static class VmNotResidentHere extends XenAPIException { + public final String vm; + public final String host; + + /** + * Create a new VmNotResidentHere + * + * @param vm + * @param host + */ + public VmNotResidentHere(String vm, String host) { + super("The specified VM is not currently resident on the specified host."); + this.vm = vm; + this.host = host; + } + + } + + /** + * The request was asynchronously cancelled. + */ + public static class TaskCancelled extends XenAPIException { + public final String task; + + /** + * Create a new TaskCancelled + * + * @param task + */ + public TaskCancelled(String task) { + super("The request was asynchronously cancelled."); + this.task = task; + } + + } + + /** + * Too many VCPUs to start this VM + */ + public static class VmTooManyVcpus extends XenAPIException { + public final String vm; + + /** + * Create a new VmTooManyVcpus + * + * @param vm + */ + public VmTooManyVcpus(String vm) { + super("Too many VCPUs to start this VM"); + this.vm = vm; + } + + } + + /** + * Subject cannot be resolved by the external directory service. + */ + public static class SubjectCannotBeResolved extends XenAPIException { + + /** + * Create a new SubjectCannotBeResolved + */ + public SubjectCannotBeResolved() { + super("Subject cannot be resolved by the external directory service."); + } + + } + + /** + * You attempted an operation on a VM which requires PV drivers to be installed but the drivers were not detected. + */ + public static class VmMissingPvDrivers extends XenAPIException { + public final String vm; + + /** + * Create a new VmMissingPvDrivers + * + * @param vm + */ + public VmMissingPvDrivers(String vm) { + super("You attempted an operation on a VM which requires PV drivers to be installed but the drivers were not detected."); + this.vm = vm; + } + + } + + /** + * The patch apply failed. Please see attached output. + */ + public static class PatchApplyFailed extends XenAPIException { + public final String output; + + /** + * Create a new PatchApplyFailed + * + * @param output + */ + public PatchApplyFailed(String output) { + super("The patch apply failed. Please see attached output."); + this.output = output; + } + + } + + /** + * The management interface on a slave cannot be disabled because the slave would enter emergency mode. + */ + public static class SlaveRequiresManagementInterface extends XenAPIException { + + /** + * Create a new SlaveRequiresManagementInterface + */ + public SlaveRequiresManagementInterface() { + super("The management interface on a slave cannot be disabled because the slave would enter emergency mode."); + } + + } + + /** + * This operation cannot be completed as the host is still live. + */ + public static class HostIsLive extends XenAPIException { + public final String host; + + /** + * Create a new HostIsLive + * + * @param host + */ + public HostIsLive(String host) { + super("This operation cannot be completed as the host is still live."); + this.host = host; + } + + } + + /** + * This VM does not have a suspend SR specified. + */ + public static class VmNoSuspendSr extends XenAPIException { + public final String vm; + + /** + * Create a new VmNoSuspendSr + * + * @param vm + */ + public VmNoSuspendSr(String vm) { + super("This VM does not have a suspend SR specified."); + this.vm = vm; + } + + } + + /** + * An attempt to start a new VSS snapshot failed + */ + public static class XenVssReqErrorStartSnapshotSetFailed extends XenAPIException { + public final String vm; + public final String errorCode; + + /** + * Create a new XenVssReqErrorStartSnapshotSetFailed + * + * @param vm + * @param errorCode + */ + public XenVssReqErrorStartSnapshotSetFailed(String vm, String errorCode) { + super("An attempt to start a new VSS snapshot failed"); + this.vm = vm; + this.errorCode = errorCode; + } + + } + + /** + * The server failed to parse your event subscription. Valid values include: *, class-name, class-name/object-reference. + */ + public static class EventSubscriptionParseFailure extends XenAPIException { + public final String subscription; + + /** + * Create a new EventSubscriptionParseFailure + * + * @param subscription + */ + public EventSubscriptionParseFailure(String subscription) { + super("The server failed to parse your event subscription. Valid values include: *, class-name, class-name/object-reference."); + this.subscription = subscription; + } + + } + + /** + * The VM cannot be imported unforced because it is either the same version or an older version of an existing VM. + */ + public static class VmToImportIsNotNewerVersion extends XenAPIException { + public final String vm; + public final String existingVersion; + public final String versionToImport; + + /** + * Create a new VmToImportIsNotNewerVersion + * + * @param vm + * @param existingVersion + * @param versionToImport + */ + public VmToImportIsNotNewerVersion(String vm, String existingVersion, String versionToImport) { + super("The VM cannot be imported unforced because it is either the same version or an older version of an existing VM."); + this.vm = vm; + this.existingVersion = existingVersion; + this.versionToImport = versionToImport; + } + + } + + /** + * The default SR reference does not point to a valid SR + */ + public static class DefaultSrNotFound extends XenAPIException { + public final String sr; + + /** + * Create a new DefaultSrNotFound + * + * @param sr + */ + public DefaultSrNotFound(String sr) { + super("The default SR reference does not point to a valid SR"); + this.sr = sr; + } + + } + + /** + * The uuid you supplied was invalid. + */ + public static class UuidInvalid extends XenAPIException { + public final String type; + public final String uuid; + + /** + * Create a new UuidInvalid + * + * @param type + * @param uuid + */ + public UuidInvalid(String type, String uuid) { + super("The uuid you supplied was invalid."); + this.type = type; + this.uuid = uuid; + } + + } + + /** + * An HA statefile could not be created, perhaps because no SR with the appropriate capability was found. + */ + public static class CannotCreateStateFile extends XenAPIException { + + /** + * Create a new CannotCreateStateFile + */ + public CannotCreateStateFile() { + super("An HA statefile could not be created, perhaps because no SR with the appropriate capability was found."); + } + + } + + /** + * You attempted to run a VM on a host which doesn't have a pGPU available in the GPU group needed by the VM. The VM has a vGPU attached to this GPU group. + */ + public static class VmRequiresGpu extends XenAPIException { + public final String vm; + public final String GPUGroup; + + /** + * Create a new VmRequiresGpu + * + * @param vm + * @param GPUGroup + */ + public VmRequiresGpu(String vm, String GPUGroup) { + super("You attempted to run a VM on a host which doesn't have a pGPU available in the GPU group needed by the VM. The VM has a vGPU attached to this GPU group."); + this.vm = vm; + this.GPUGroup = GPUGroup; + } + + } + + /** + * The license for the edition you requested is not available. + */ + public static class LicenseCheckoutError extends XenAPIException { + public final String reason; + + /** + * Create a new LicenseCheckoutError + * + * @param reason + */ + public LicenseCheckoutError(String reason) { + super("The license for the edition you requested is not available."); + this.reason = reason; + } + + } + + /** + * You cannot make regular API calls directly on a slave. Please pass API calls via the master host. + */ + public static class HostIsSlave extends XenAPIException { + public final String masterIPAddress; + + /** + * Create a new HostIsSlave + * + * @param masterIPAddress + */ + public HostIsSlave(String masterIPAddress) { + super("You cannot make regular API calls directly on a slave. Please pass API calls via the master host."); + this.masterIPAddress = masterIPAddress; + } + + } + + /** + * The host toolstack is still initialising. Please wait. + */ + public static class HostStillBooting extends XenAPIException { + + /** + * Create a new HostStillBooting + */ + public HostStillBooting() { + super("The host toolstack is still initialising. Please wait."); + } + + } + + /** + * PGPU type not compatible with destination group. + */ + public static class PgpuNotCompatibleWithGpuGroup extends XenAPIException { + public final String type; + public final String groupTypes; + + /** + * Create a new PgpuNotCompatibleWithGpuGroup + * + * @param type + * @param groupTypes + */ + public PgpuNotCompatibleWithGpuGroup(String type, String groupTypes) { + super("PGPU type not compatible with destination group."); + this.type = type; + this.groupTypes = groupTypes; + } + + } + + /** + * The server failed to unmarshal the XMLRPC message; it was expecting one element and received something else. + */ + public static class XmlrpcUnmarshalFailure extends XenAPIException { + public final String expected; + public final String received; + + /** + * Create a new XmlrpcUnmarshalFailure + * + * @param expected + * @param received + */ + public XmlrpcUnmarshalFailure(String expected, String received) { + super("The server failed to unmarshal the XMLRPC message; it was expecting one element and received something else."); + this.expected = expected; + this.received = received; + } + + } + + /** + * This function is no longer available. + */ + public static class MessageRemoved extends XenAPIException { + + /** + * Create a new MessageRemoved + */ + public MessageRemoved() { + super("This function is no longer available."); + } + + } + + /** + * The network contains active PIFs and cannot be deleted. + */ + public static class NetworkContainsPif extends XenAPIException { + public final String pifs; + + /** + * Create a new NetworkContainsPif + * + * @param pifs + */ + public NetworkContainsPif(String pifs) { + super("The network contains active PIFs and cannot be deleted."); + this.pifs = pifs; + } + + } + + /** + * The WLB server reported that its configured server name for this XenServer instance failed to resolve in DNS. + */ + public static class WlbXenserverUnknownHost extends XenAPIException { + + /** + * Create a new WlbXenserverUnknownHost + */ + public WlbXenserverUnknownHost() { + super("The WLB server reported that its configured server name for this XenServer instance failed to resolve in DNS."); + } + + } + + /** + * A timeout happened while attempting to attach a device to a VM. + */ + public static class DeviceAttachTimeout extends XenAPIException { + public final String type; + public final String ref; + + /** + * Create a new DeviceAttachTimeout + * + * @param type + * @param ref + */ + public DeviceAttachTimeout(String type, String ref) { + super("A timeout happened while attempting to attach a device to a VM."); + this.type = type; + this.ref = ref; + } + + } + + /** + * The uploaded patch file already exists + */ + public static class PatchAlreadyExists extends XenAPIException { + public final String uuid; + + /** + * Create a new PatchAlreadyExists + * + * @param uuid + */ + public PatchAlreadyExists(String uuid) { + super("The uploaded patch file already exists"); + this.uuid = uuid; + } + + } + + /** + * This PGPU is currently in use by running VMs. + */ + public static class PgpuInUseByVm extends XenAPIException { + public final String VMs; + + /** + * Create a new PgpuInUseByVm + * + * @param VMs + */ + public PgpuInUseByVm(String VMs) { + super("This PGPU is currently in use by running VMs."); + this.VMs = VMs; + } + + } + + /** + * The host failed to enable external authentication. + */ + public static class AuthEnableFailedUnavailable extends XenAPIException { + public final String message; + + /** + * Create a new AuthEnableFailedUnavailable + * + * @param message + */ + public AuthEnableFailedUnavailable(String message) { + super("The host failed to enable external authentication."); + this.message = message; + } + + } + + /** + * This PIF is a bond slave and cannot have a VLAN on it. + */ + public static class CannotAddVlanToBondSlave extends XenAPIException { + public final String PIF; + + /** + * Create a new CannotAddVlanToBondSlave + * + * @param PIF + */ + public CannotAddVlanToBondSlave(String PIF) { + super("This PIF is a bond slave and cannot have a VLAN on it."); + this.PIF = PIF; + } + + } + + /** + * This operation cannot be performed because the specified VDI could not be found in the specified SR + */ + public static class VdiLocationMissing extends XenAPIException { + public final String sr; + public final String location; + + /** + * Create a new VdiLocationMissing + * + * @param sr + * @param location + */ + public VdiLocationMissing(String sr, String location) { + super("This operation cannot be performed because the specified VDI could not be found in the specified SR"); + this.sr = sr; + this.location = location; + } + + } + + /** + * The pool failed to disable the external authentication of at least one host. + */ + public static class PoolAuthDisableFailedWrongCredentials extends XenAPIException { + public final String host; + public final String message; + + /** + * Create a new PoolAuthDisableFailedWrongCredentials + * + * @param host + * @param message + */ + public PoolAuthDisableFailedWrongCredentials(String host, String message) { + super("The pool failed to disable the external authentication of at least one host."); + this.host = host; + this.message = message; + } + + } + + /** + * VM didn't acknowledge the need to shutdown. + */ + public static class VmFailedShutdownAcknowledgment extends XenAPIException { + + /** + * Create a new VmFailedShutdownAcknowledgment + */ + public VmFailedShutdownAcknowledgment() { + super("VM didn't acknowledge the need to shutdown."); + } + + } + + /** + * The specified certificate name is invalid. + */ + public static class CertificateNameInvalid extends XenAPIException { + public final String name; + + /** + * Create a new CertificateNameInvalid + * + * @param name + */ + public CertificateNameInvalid(String name) { + super("The specified certificate name is invalid."); + this.name = name; + } + + } + + /** + * The requested bootloader is unknown + */ + public static class UnknownBootloader extends XenAPIException { + public final String vm; + public final String bootloader; + + /** + * Create a new UnknownBootloader + * + * @param vm + * @param bootloader + */ + public UnknownBootloader(String vm, String bootloader) { + super("The requested bootloader is unknown"); + this.vm = vm; + this.bootloader = bootloader; + } + + } + + /** + * You attempted to start a VM that's attached to more than one VDI with a timeoffset marked as reset-on-boot. + */ + public static class VmAttachedToMoreThanOneVdiWithTimeoffsetMarkedAsResetOnBoot extends XenAPIException { + public final String vm; + + /** + * Create a new VmAttachedToMoreThanOneVdiWithTimeoffsetMarkedAsResetOnBoot + * + * @param vm + */ + public VmAttachedToMoreThanOneVdiWithTimeoffsetMarkedAsResetOnBoot(String vm) { + super("You attempted to start a VM that's attached to more than one VDI with a timeoffset marked as reset-on-boot."); + this.vm = vm; + } + + } + + /** + * The server failed to handle your request, due to an internal error. The given message may give details useful for debugging the problem. + */ + public static class InternalError extends XenAPIException { + public final String message; + + /** + * Create a new InternalError + * + * @param message + */ + public InternalError(String message) { + super("The server failed to handle your request, due to an internal error. The given message may give details useful for debugging the problem."); + this.message = message; + } + + } + + /** + * This message has been deprecated. + */ + public static class MessageDeprecated extends XenAPIException { + + /** + * Create a new MessageDeprecated + */ + public MessageDeprecated() { + super("This message has been deprecated."); + } + + } + + /** + * The requested update could not be found. This can occur when you designate a new master or xe patch-clean. Please upload the update again + */ + public static class CannotFindPatch extends XenAPIException { + + /** + * Create a new CannotFindPatch + */ + public CannotFindPatch() { + super("The requested update could not be found. This can occur when you designate a new master or xe patch-clean. Please upload the update again"); + } + + } + + /** + * You attempted an operation on a VM that was judged to be unsafe by the server. This can happen if the VM would run on a CPU that has a potentially incompatible set of feature flags to those the VM requires. If you want to override this warning then use the 'force' option. + */ + public static class VmUnsafeBoot extends XenAPIException { + public final String vm; + + /** + * Create a new VmUnsafeBoot + * + * @param vm + */ + public VmUnsafeBoot(String vm) { + super("You attempted an operation on a VM that was judged to be unsafe by the server. This can happen if the VM would run on a CPU that has a potentially incompatible set of feature flags to those the VM requires. If you want to override this warning then use the 'force' option."); + this.vm = vm; } } @@ -6859,301 +8600,6 @@ public class Types } - /** - * The SR backend does not support the operation (check the SR's allowed operations) - */ - public static class SrOperationNotSupported extends XenAPIException { - public final String sr; - - /** - * Create a new SrOperationNotSupported - * - * @param sr - */ - public SrOperationNotSupported(String sr) { - super("The SR backend does not support the operation (check the SR's allowed operations)"); - this.sr = sr; - } - - } - - /** - * The operation could not be performed because the VBD was not connected to the VM. - */ - public static class DeviceNotAttached extends XenAPIException { - public final String VBD; - - /** - * Create a new DeviceNotAttached - * - * @param VBD - */ - public DeviceNotAttached(String VBD) { - super("The operation could not be performed because the VBD was not connected to the VM."); - this.VBD = VBD; - } - - } - - /** - * The specified host is disabled. - */ - public static class HostDisabled extends XenAPIException { - public final String host; - - /** - * Create a new HostDisabled - * - * @param host - */ - public HostDisabled(String host) { - super("The specified host is disabled."); - this.host = host; - } - - } - - /** - * You must use tar output to retrieve system status from an OEM host. - */ - public static class SystemStatusMustUseTarOnOem extends XenAPIException { - - /** - * Create a new SystemStatusMustUseTarOnOem - */ - public SystemStatusMustUseTarOnOem() { - super("You must use tar output to retrieve system status from an OEM host."); - } - - } - - /** - * An attempt to prepare VSS writers for the snapshot failed - */ - public static class XenVssReqErrorPreparingWriters extends XenAPIException { - public final String vm; - public final String errorCode; - - /** - * Create a new XenVssReqErrorPreparingWriters - * - * @param vm - * @param errorCode - */ - public XenVssReqErrorPreparingWriters(String vm, String errorCode) { - super("An attempt to prepare VSS writers for the snapshot failed"); - this.vm = vm; - this.errorCode = errorCode; - } - - } - - /** - * The host failed to enable external authentication. - */ - public static class AuthEnableFailed extends XenAPIException { - public final String message; - - /** - * Create a new AuthEnableFailed - * - * @param message - */ - public AuthEnableFailed(String message) { - super("The host failed to enable external authentication."); - this.message = message; - } - - } - - /** - * The host joining the pool cannot contain any shared storage. - */ - public static class JoiningHostCannotContainSharedSrs extends XenAPIException { - - /** - * Create a new JoiningHostCannotContainSharedSrs - */ - public JoiningHostCannotContainSharedSrs() { - super("The host joining the pool cannot contain any shared storage."); - } - - } - - /** - * You need at least 1 VCPU to start a VM - */ - public static class VmNoVcpus extends XenAPIException { - public final String vm; - - /** - * Create a new VmNoVcpus - * - * @param vm - */ - public VmNoVcpus(String vm) { - super("You need at least 1 VCPU to start a VM"); - this.vm = vm; - } - - } - - /** - * The uploaded patch file is invalid. See attached log for more details. - */ - public static class InvalidPatchWithLog extends XenAPIException { - public final String log; - - /** - * Create a new InvalidPatchWithLog - * - * @param log - */ - public InvalidPatchWithLog(String log) { - super("The uploaded patch file is invalid. See attached log for more details."); - this.log = log; - } - - } - - /** - * The SR operation cannot be performed because a device underlying the SR is in use by the host. - */ - public static class SrDeviceInUse extends XenAPIException { - - /** - * Create a new SrDeviceInUse - */ - public SrDeviceInUse() { - super("The SR operation cannot be performed because a device underlying the SR is in use by the host."); - } - - } - - /** - * The host CDROM drive does not contain a valid CD - */ - public static class HostCdDriveEmpty extends XenAPIException { - - /** - * Create a new HostCdDriveEmpty - */ - public HostCdDriveEmpty() { - super("The host CDROM drive does not contain a valid CD"); - } - - } - - /** - * The operation could not be performed while the host is still armed; it must be disarmed first - */ - public static class HaHostIsArmed extends XenAPIException { - public final String host; - - /** - * Create a new HaHostIsArmed - * - * @param host - */ - public HaHostIsArmed(String host) { - super("The operation could not be performed while the host is still armed; it must be disarmed first"); - this.host = host; - } - - } - - /** - * The server failed to parse your event subscription. Valid values include: *, class-name, class-name/object-reference. - */ - public static class EventSubscriptionParseFailure extends XenAPIException { - public final String subscription; - - /** - * Create a new EventSubscriptionParseFailure - * - * @param subscription - */ - public EventSubscriptionParseFailure(String subscription) { - super("The server failed to parse your event subscription. Valid values include: *, class-name, class-name/object-reference."); - this.subscription = subscription; - } - - } - - /** - * Your license has expired. Please contact your support representative. - */ - public static class LicenseExpired extends XenAPIException { - - /** - * Create a new LicenseExpired - */ - public LicenseExpired() { - super("Your license has expired. Please contact your support representative."); - } - - } - - /** - * The credentials given by the user are incorrect, so access has been denied, and you have not been issued a session handle. - */ - public static class SessionAuthenticationFailed extends XenAPIException { - - /** - * Create a new SessionAuthenticationFailed - */ - public SessionAuthenticationFailed() { - super("The credentials given by the user are incorrect, so access has been denied, and you have not been issued a session handle."); - } - - } - - /** - * You tried to create a VLAN on top of another VLAN - use the underlying physical PIF/bond instead - */ - public static class PifIsVlan extends XenAPIException { - public final String PIF; - - /** - * Create a new PifIsVlan - * - * @param PIF - */ - public PifIsVlan(String PIF) { - super("You tried to create a VLAN on top of another VLAN - use the underlying physical PIF/bond instead"); - this.PIF = PIF; - } - - } - - /** - * Archive more frequent than backup. - */ - public static class VmppArchiveMoreFrequentThanBackup extends XenAPIException { - - /** - * Create a new VmppArchiveMoreFrequentThanBackup - */ - public VmppArchiveMoreFrequentThanBackup() { - super("Archive more frequent than backup."); - } - - } - - /** - * There was a problem with the license daemon (v6d). Is it running? - */ - public static class V6dFailure extends XenAPIException { - - /** - * Create a new V6dFailure - */ - public V6dFailure() { - super("There was a problem with the license daemon (v6d). Is it running?"); - } - - } - /** * The host joining the pool cannot already be a master of another pool. */ @@ -7169,465 +8615,54 @@ public class Types } /** - * This host can not be forgotten because there are some user VMs still running + * Cannot import VM using chunked encoding. */ - public static class HostHasResidentVms extends XenAPIException { - public final String host; + public static class ImportErrorCannotHandleChunked extends XenAPIException { /** - * Create a new HostHasResidentVms + * Create a new ImportErrorCannotHandleChunked + */ + public ImportErrorCannotHandleChunked() { + super("Cannot import VM using chunked encoding."); + } + + } + + /** + * The pool failed to enable external authentication. + */ + public static class PoolAuthEnableFailedWrongCredentials extends XenAPIException { + public final String host; + public final String message; + + /** + * Create a new PoolAuthEnableFailedWrongCredentials * * @param host + * @param message */ - public HostHasResidentVms(String host) { - super("This host can not be forgotten because there are some user VMs still running"); + public PoolAuthEnableFailedWrongCredentials(String host, String message) { + super("The pool failed to enable external authentication."); this.host = host; - } - - } - - /** - * An error occured while saving the memory image of the specified virtual machine - */ - public static class VmCheckpointSuspendFailed extends XenAPIException { - public final String vm; - - /** - * Create a new VmCheckpointSuspendFailed - * - * @param vm - */ - public VmCheckpointSuspendFailed(String vm) { - super("An error occured while saving the memory image of the specified virtual machine"); - this.vm = vm; - } - - } - - /** - * The operation you requested cannot be performed because the specified PIF is the management interface. - */ - public static class PifIsManagementInterface extends XenAPIException { - public final String PIF; - - /** - * Create a new PifIsManagementInterface - * - * @param PIF - */ - public PifIsManagementInterface(String PIF) { - super("The operation you requested cannot be performed because the specified PIF is the management interface."); - this.PIF = PIF; - } - - } - - /** - * The MAC address specified is not valid. - */ - public static class MacInvalid extends XenAPIException { - public final String MAC; - - /** - * Create a new MacInvalid - * - * @param MAC - */ - public MacInvalid(String MAC) { - super("The MAC address specified is not valid."); - this.MAC = MAC; - } - - } - - /** - * An attempt to start a new VSS snapshot failed - */ - public static class XenVssReqErrorStartSnapshotSetFailed extends XenAPIException { - public final String vm; - public final String errorCode; - - /** - * Create a new XenVssReqErrorStartSnapshotSetFailed - * - * @param vm - * @param errorCode - */ - public XenVssReqErrorStartSnapshotSetFailed(String vm, String errorCode) { - super("An attempt to start a new VSS snapshot failed"); - this.vm = vm; - this.errorCode = errorCode; - } - - } - - /** - * Operation could not be performed because the drive is empty - */ - public static class VbdIsEmpty extends XenAPIException { - public final String vbd; - - /** - * Create a new VbdIsEmpty - * - * @param vbd - */ - public VbdIsEmpty(String vbd) { - super("Operation could not be performed because the drive is empty"); - this.vbd = vbd; - } - - } - - /** - * The patch precheck stage failed: the server is of an incorrect version. - */ - public static class PatchPrecheckFailedWrongServerVersion extends XenAPIException { - public final String patch; - public final String foundVersion; - public final String requiredVersion; - - /** - * Create a new PatchPrecheckFailedWrongServerVersion - * - * @param patch - * @param foundVersion - * @param requiredVersion - */ - public PatchPrecheckFailedWrongServerVersion(String patch, String foundVersion, String requiredVersion) { - super("The patch precheck stage failed: the server is of an incorrect version."); - this.patch = patch; - this.foundVersion = foundVersion; - this.requiredVersion = requiredVersion; - } - - } - - /** - * This operation could not be performed because the state partition could not be found - */ - public static class CannotFindStatePartition extends XenAPIException { - - /** - * Create a new CannotFindStatePartition - */ - public CannotFindStatePartition() { - super("This operation could not be performed because the state partition could not be found"); - } - - } - - /** - * The WLB server rejected our configured authentication details. - */ - public static class WlbAuthenticationFailed extends XenAPIException { - - /** - * Create a new WlbAuthenticationFailed - */ - public WlbAuthenticationFailed() { - super("The WLB server rejected our configured authentication details."); - } - - } - - /** - * Unknown type of external authentication. - */ - public static class AuthUnknownType extends XenAPIException { - public final String type; - - /** - * Create a new AuthUnknownType - * - * @param type - */ - public AuthUnknownType(String type) { - super("Unknown type of external authentication."); - this.type = type; - } - - } - - /** - * This pool is not in emergency mode. - */ - public static class NotInEmergencyMode extends XenAPIException { - - /** - * Create a new NotInEmergencyMode - */ - public NotInEmergencyMode() { - super("This pool is not in emergency mode."); - } - - } - - /** - * The host failed to disable external authentication. - */ - public static class AuthDisableFailed extends XenAPIException { - public final String message; - - /** - * Create a new AuthDisableFailed - * - * @param message - */ - public AuthDisableFailed(String message) { - super("The host failed to disable external authentication."); this.message = message; } } /** - * You tried to create a PIF, but the network you tried to attach it to is already attached to some other PIF, and so the creation failed. + * This command is only allowed on the OEM edition. */ - public static class NetworkAlreadyConnected extends XenAPIException { - public final String network; - public final String connectedPIF; + public static class OnlyAllowedOnOemEdition extends XenAPIException { + public final String command; /** - * Create a new NetworkAlreadyConnected + * Create a new OnlyAllowedOnOemEdition * - * @param network - * @param connectedPIF + * @param command */ - public NetworkAlreadyConnected(String network, String connectedPIF) { - super("You tried to create a PIF, but the network you tried to attach it to is already attached to some other PIF, and so the creation failed."); - this.network = network; - this.connectedPIF = connectedPIF; - } - - } - - /** - * This operation cannot be performed because the specified VDI is of an incompatible type (eg: an HA statefile cannot be attached to a guest) - */ - public static class VdiIncompatibleType extends XenAPIException { - public final String vdi; - public final String type; - - /** - * Create a new VdiIncompatibleType - * - * @param vdi - * @param type - */ - public VdiIncompatibleType(String vdi, String type) { - super("This operation cannot be performed because the specified VDI is of an incompatible type (eg: an HA statefile cannot be attached to a guest)"); - this.vdi = vdi; - this.type = type; - } - - } - - /** - * The configured WLB server name failed to resolve in DNS. - */ - public static class WlbUnknownHost extends XenAPIException { - - /** - * Create a new WlbUnknownHost - */ - public WlbUnknownHost() { - super("The configured WLB server name failed to resolve in DNS."); - } - - } - - /** - * The VM could not be imported. - */ - public static class ImportError extends XenAPIException { - public final String msg; - - /** - * Create a new ImportError - * - * @param msg - */ - public ImportError(String msg) { - super("The VM could not be imported."); - this.msg = msg; - } - - } - - /** - * The SR could not be connected because the driver was not recognised. - */ - public static class SrUnknownDriver extends XenAPIException { - public final String driver; - - /** - * Create a new SrUnknownDriver - * - * @param driver - */ - public SrUnknownDriver(String driver) { - super("The SR could not be connected because the driver was not recognised."); - this.driver = driver; - } - - } - - /** - * The host failed to disable external authentication. - */ - public static class AuthDisableFailedWrongCredentials extends XenAPIException { - public final String message; - - /** - * Create a new AuthDisableFailedWrongCredentials - * - * @param message - */ - public AuthDisableFailedWrongCredentials(String message) { - super("The host failed to disable external authentication."); - this.message = message; - } - - } - - /** - * The VM unexpectedly halted - */ - public static class VmHalted extends XenAPIException { - public final String vm; - - /** - * Create a new VmHalted - * - * @param vm - */ - public VmHalted(String vm) { - super("The VM unexpectedly halted"); - this.vm = vm; - } - - } - - /** - * The use of this feature is restricted. - */ - public static class FeatureRestricted extends XenAPIException { - - /** - * Create a new FeatureRestricted - */ - public FeatureRestricted() { - super("The use of this feature is restricted."); - } - - } - - /** - * The VDI could not be opened for metadata recovery as it contains the current pool's metadata. - */ - public static class VdiContainsMetadataOfThisPool extends XenAPIException { - public final String vdi; - public final String pool; - - /** - * Create a new VdiContainsMetadataOfThisPool - * - * @param vdi - * @param pool - */ - public VdiContainsMetadataOfThisPool(String vdi, String pool) { - super("The VDI could not be opened for metadata recovery as it contains the current pool's metadata."); - this.vdi = vdi; - this.pool = pool; - } - - } - - /** - * The specified CRL name is invalid. - */ - public static class CrlNameInvalid extends XenAPIException { - public final String name; - - /** - * Create a new CrlNameInvalid - * - * @param name - */ - public CrlNameInvalid(String name) { - super("The specified CRL name is invalid."); - this.name = name; - } - - } - - /** - * This operation cannot be completed as the host power on mode is disabled. - */ - public static class HostPowerOnModeDisabled extends XenAPIException { - - /** - * Create a new HostPowerOnModeDisabled - */ - public HostPowerOnModeDisabled() { - super("This operation cannot be completed as the host power on mode is disabled."); - } - - } - - /** - * An activation key can only be applied when the edition is set to 'free'. - */ - public static class ActivationWhileNotFree extends XenAPIException { - - /** - * Create a new ActivationWhileNotFree - */ - public ActivationWhileNotFree() { - super("An activation key can only be applied when the edition is set to 'free'."); - } - - } - - /** - * There was a failure communicating with the plugin. - */ - public static class XenapiPluginFailure extends XenAPIException { - public final String status; - public final String stdout; - public final String stderr; - - /** - * Create a new XenapiPluginFailure - * - * @param status - * @param stdout - * @param stderr - */ - public XenapiPluginFailure(String status, String stdout, String stderr) { - super("There was a failure communicating with the plugin."); - this.status = status; - this.stdout = stdout; - this.stderr = stderr; - } - - } - - /** - * The MAC address specified still exists on this host. - */ - public static class MacStillExists extends XenAPIException { - public final String MAC; - - /** - * Create a new MacStillExists - * - * @param MAC - */ - public MacStillExists(String MAC) { - super("The MAC address specified still exists on this host."); - this.MAC = MAC; + public OnlyAllowedOnOemEdition(String command) { + super("This command is only allowed on the OEM edition."); + this.command = command; } } @@ -7657,29 +8692,55 @@ public class Types } /** - * HA can only be enabled for 2 hosts or more. Note that 2 hosts requires a pre-configured quorum tiebreak script. + * An error occured while saving the memory image of the specified virtual machine */ - public static class HaTooFewHosts extends XenAPIException { + public static class VmCheckpointSuspendFailed extends XenAPIException { + public final String vm; /** - * Create a new HaTooFewHosts + * Create a new VmCheckpointSuspendFailed + * + * @param vm */ - public HaTooFewHosts() { - super("HA can only be enabled for 2 hosts or more. Note that 2 hosts requires a pre-configured quorum tiebreak script."); + public VmCheckpointSuspendFailed(String vm) { + super("An error occured while saving the memory image of the specified virtual machine"); + this.vm = vm; } } /** - * The connection to the WLB server was reset. + * This patch has already been applied */ - public static class WlbConnectionReset extends XenAPIException { + public static class PatchAlreadyApplied extends XenAPIException { + public final String patch; /** - * Create a new WlbConnectionReset + * Create a new PatchAlreadyApplied + * + * @param patch */ - public WlbConnectionReset() { - super("The connection to the WLB server was reset."); + public PatchAlreadyApplied(String patch) { + super("This patch has already been applied"); + this.patch = patch; + } + + } + + /** + * The operation could not be performed because the VBD was not connected to the VM. + */ + public static class DeviceNotAttached extends XenAPIException { + public final String VBD; + + /** + * Create a new DeviceNotAttached + * + * @param VBD + */ + public DeviceNotAttached(String VBD) { + super("The operation could not be performed because the VBD was not connected to the VM."); + this.VBD = VBD; } } @@ -7687,17 +8748,17 @@ public class Types /** * The pool failed to enable external authentication. */ - public static class PoolAuthEnableFailedWrongCredentials extends XenAPIException { + public static class PoolAuthEnableFailed extends XenAPIException { public final String host; public final String message; /** - * Create a new PoolAuthEnableFailedWrongCredentials + * Create a new PoolAuthEnableFailed * * @param host * @param message */ - public PoolAuthEnableFailedWrongCredentials(String host, String message) { + public PoolAuthEnableFailed(String host, String message) { super("The pool failed to enable external authentication."); this.host = host; this.message = message; @@ -7706,390 +8767,26 @@ public class Types } /** - * The specified patch is applied and cannot be destroyed. + * This operation cannot be performed because this VDI is in use by some other operation */ - public static class PatchIsApplied extends XenAPIException { - - /** - * Create a new PatchIsApplied - */ - public PatchIsApplied() { - super("The specified patch is applied and cannot be destroyed."); - } - - } - - /** - * The SR is still connected to a host via a PBD. It cannot be destroyed or forgotten. - */ - public static class SrHasPbd extends XenAPIException { - public final String sr; - - /** - * Create a new SrHasPbd - * - * @param sr - */ - public SrHasPbd(String sr) { - super("The SR is still connected to a host via a PBD. It cannot be destroyed or forgotten."); - this.sr = sr; - } - - } - - /** - * Some VMs belonging to the appliance threw an exception while carrying out the specified operation - */ - public static class OperationPartiallyFailed extends XenAPIException { + public static class VdiInUse extends XenAPIException { + public final String vdi; public final String operation; /** - * Create a new OperationPartiallyFailed + * Create a new VdiInUse * + * @param vdi * @param operation */ - public OperationPartiallyFailed(String operation) { - super("Some VMs belonging to the appliance threw an exception while carrying out the specified operation"); + public VdiInUse(String vdi, String operation) { + super("This operation cannot be performed because this VDI is in use by some other operation"); + this.vdi = vdi; this.operation = operation; } } - /** - * The WLB server rejected XenServer's request as malformed. - */ - public static class WlbMalformedRequest extends XenAPIException { - - /** - * Create a new WlbMalformedRequest - */ - public WlbMalformedRequest() { - super("The WLB server rejected XenServer's request as malformed."); - } - - } - - /** - * The host toolstack is still initialising. Please wait. - */ - public static class HostStillBooting extends XenAPIException { - - /** - * Create a new HostStillBooting - */ - public HostStillBooting() { - super("The host toolstack is still initialising. Please wait."); - } - - } - - /** - * You tried to destroy a system network: these cannot be destroyed. - */ - public static class CannotDestroySystemNetwork extends XenAPIException { - public final String network; - - /** - * Create a new CannotDestroySystemNetwork - * - * @param network - */ - public CannotDestroySystemNetwork(String network) { - super("You tried to destroy a system network: these cannot be destroyed."); - this.network = network; - } - - } - - /** - * The specified object no longer exists. - */ - public static class ObjectNolongerExists extends XenAPIException { - - /** - * Create a new ObjectNolongerExists - */ - public ObjectNolongerExists() { - super("The specified object no longer exists."); - } - - } - - /** - * This VDI was not mapped to a destination SR in VM.migrate_send operation - */ - public static class VdiNotInMap extends XenAPIException { - public final String vdi; - - /** - * Create a new VdiNotInMap - * - * @param vdi - */ - public VdiNotInMap(String vdi) { - super("This VDI was not mapped to a destination SR in VM.migrate_send operation"); - this.vdi = vdi; - } - - } - - /** - * The VDI is too small. Please resize it to at least the minimum size. - */ - public static class VdiTooSmall extends XenAPIException { - public final String vdi; - public final String minimumSize; - - /** - * Create a new VdiTooSmall - * - * @param vdi - * @param minimumSize - */ - public VdiTooSmall(String vdi, String minimumSize) { - super("The VDI is too small. Please resize it to at least the minimum size."); - this.vdi = vdi; - this.minimumSize = minimumSize; - } - - } - - /** - * The VDI is not stored using a sparse format. It is not possible to query and manipulate only the changed blocks (or 'block differences' or 'disk deltas') between two VDIs. Please select a VDI which uses a sparse-aware technology such as VHD. - */ - public static class VdiNotSparse extends XenAPIException { - public final String vdi; - - /** - * Create a new VdiNotSparse - * - * @param vdi - */ - public VdiNotSparse(String vdi) { - super("The VDI is not stored using a sparse format. It is not possible to query and manipulate only the changed blocks (or 'block differences' or 'disk deltas') between two VDIs. Please select a VDI which uses a sparse-aware technology such as VHD."); - this.vdi = vdi; - } - - } - - /** - * The hosts in this pool are not homogeneous. - */ - public static class HostsNotHomogeneous extends XenAPIException { - public final String reason; - - /** - * Create a new HostsNotHomogeneous - * - * @param reason - */ - public HostsNotHomogeneous(String reason) { - super("The hosts in this pool are not homogeneous."); - this.reason = reason; - } - - } - - /** - * The host joining the pool must have the same product version as the pool master. - */ - public static class PoolJoiningHostMustHaveSameProductVersion extends XenAPIException { - - /** - * Create a new PoolJoiningHostMustHaveSameProductVersion - */ - public PoolJoiningHostMustHaveSameProductVersion() { - super("The host joining the pool must have the same product version as the pool master."); - } - - } - - /** - * You tried to create a PIF, but it already exists. - */ - public static class PifVlanExists extends XenAPIException { - public final String PIF; - - /** - * Create a new PifVlanExists - * - * @param PIF - */ - public PifVlanExists(String PIF) { - super("You tried to create a PIF, but it already exists."); - this.PIF = PIF; - } - - } - - /** - * The license for the edition you requested is not available. - */ - public static class LicenseCheckoutError extends XenAPIException { - public final String reason; - - /** - * Create a new LicenseCheckoutError - * - * @param reason - */ - public LicenseCheckoutError(String reason) { - super("The license for the edition you requested is not available."); - this.reason = reason; - } - - } - - /** - * The certificate library is corrupt or unreadable. - */ - public static class CertificateLibraryCorrupt extends XenAPIException { - - /** - * Create a new CertificateLibraryCorrupt - */ - public CertificateLibraryCorrupt() { - super("The certificate library is corrupt or unreadable."); - } - - } - - /** - * This operation cannot be performed because the system does not manage this VDI - */ - public static class VdiNotManaged extends XenAPIException { - public final String vdi; - - /** - * Create a new VdiNotManaged - * - * @param vdi - */ - public VdiNotManaged(String vdi) { - super("This operation cannot be performed because the system does not manage this VDI"); - this.vdi = vdi; - } - - } - - /** - * The edition you supplied is invalid. - */ - public static class InvalidEdition extends XenAPIException { - public final String edition; - - /** - * Create a new InvalidEdition - * - * @param edition - */ - public InvalidEdition(String edition) { - super("The edition you supplied is invalid."); - this.edition = edition; - } - - } - - /** - * The uploaded patch file already exists - */ - public static class PatchAlreadyExists extends XenAPIException { - public final String uuid; - - /** - * Create a new PatchAlreadyExists - * - * @param uuid - */ - public PatchAlreadyExists(String uuid) { - super("The uploaded patch file already exists"); - this.uuid = uuid; - } - - } - - /** - * There is not enough space to upload the update - */ - public static class OutOfSpace extends XenAPIException { - public final String location; - - /** - * Create a new OutOfSpace - * - * @param location - */ - public OutOfSpace(String location) { - super("There is not enough space to upload the update"); - this.location = location; - } - - } - - /** - * The VM could not be imported; the end of the file was reached prematurely. - */ - public static class ImportErrorPrematureEof extends XenAPIException { - - /** - * Create a new ImportErrorPrematureEof - */ - public ImportErrorPrematureEof() { - super("The VM could not be imported; the end of the file was reached prematurely."); - } - - } - - /** - * The given VM is not registered as a system domain. This operation can only be performed on a registered system domain. - */ - public static class NotSystemDomain extends XenAPIException { - public final String vm; - - /** - * Create a new NotSystemDomain - * - * @param vm - */ - public NotSystemDomain(String vm) { - super("The given VM is not registered as a system domain. This operation can only be performed on a registered system domain."); - this.vm = vm; - } - - } - - /** - * The specified VM has too little memory to be started. - */ - public static class VmMemorySizeTooLow extends XenAPIException { - public final String vm; - - /** - * Create a new VmMemorySizeTooLow - * - * @param vm - */ - public VmMemorySizeTooLow(String vm) { - super("The specified VM has too little memory to be started."); - this.vm = vm; - } - - } - - /** - * There is at least one VM assigned to this protection policy. - */ - public static class VmppHasVm extends XenAPIException { - - /** - * Create a new VmppHasVm - */ - public VmppHasVm() { - super("There is at least one VM assigned to this protection policy."); - } - - } - /** * This operation cannot be performed because the host is not disabled. Please disable the host and then try again. */ @@ -8105,553 +8802,93 @@ public class Types } /** - * The value specified is of the wrong type + * The use of this feature is restricted. */ - public static class FieldTypeError extends XenAPIException { - public final String field; + public static class FeatureRestricted extends XenAPIException { /** - * Create a new FieldTypeError - * - * @param field + * Create a new FeatureRestricted */ - public FieldTypeError(String field) { - super("The value specified is of the wrong type"); - this.field = field; + public FeatureRestricted() { + super("The use of this feature is restricted."); } } /** - * The management interface on a slave cannot be disabled because the slave would enter emergency mode. + * You attempted to run a VM on a host which doesn't have access to an SR needed by the VM. The VM has at least one VBD attached to a VDI in the SR. */ - public static class SlaveRequiresManagementInterface extends XenAPIException { - - /** - * Create a new SlaveRequiresManagementInterface - */ - public SlaveRequiresManagementInterface() { - super("The management interface on a slave cannot be disabled because the slave would enter emergency mode."); - } - - } - - /** - * The operation attempted is not valid for a template VM - */ - public static class VmIsTemplate extends XenAPIException { + public static class VmRequiresSr extends XenAPIException { public final String vm; + public final String sr; /** - * Create a new VmIsTemplate + * Create a new VmRequiresSr * * @param vm + * @param sr */ - public VmIsTemplate(String vm) { - super("The operation attempted is not valid for a template VM"); + public VmRequiresSr(String vm, String sr) { + super("You attempted to run a VM on a host which doesn't have access to an SR needed by the VM. The VM has at least one VBD attached to a VDI in the SR."); this.vm = vm; + this.sr = sr; } } /** - * This operation cannot be performed because the specified VM is protected by xHA + * The bootloader returned an error */ - public static class VmIsProtected extends XenAPIException { + public static class BootloaderFailed extends XenAPIException { public final String vm; - - /** - * Create a new VmIsProtected - * - * @param vm - */ - public VmIsProtected(String vm) { - super("This operation cannot be performed because the specified VM is protected by xHA"); - this.vm = vm; - } - - } - - /** - * The host joining the pool cannot have any running VMs. - */ - public static class JoiningHostCannotHaveRunningVms extends XenAPIException { - - /** - * Create a new JoiningHostCannotHaveRunningVms - */ - public JoiningHostCannotHaveRunningVms() { - super("The host joining the pool cannot have any running VMs."); - } - - } - - /** - * VM cannot be started because it requires a VDI which cannot be attached - */ - public static class VmRequiresVdi extends XenAPIException { - public final String vm; - public final String vdi; - - /** - * Create a new VmRequiresVdi - * - * @param vm - * @param vdi - */ - public VmRequiresVdi(String vm, String vdi) { - super("VM cannot be started because it requires a VDI which cannot be attached"); - this.vm = vm; - this.vdi = vdi; - } - - } - - /** - * Read/write CDs are not supported - */ - public static class VbdCdsMustBeReadonly extends XenAPIException { - - /** - * Create a new VbdCdsMustBeReadonly - */ - public VbdCdsMustBeReadonly() { - super("Read/write CDs are not supported"); - } - - } - - /** - * This license file is no longer accepted. Please upgrade to the new licensing system. - */ - public static class LicenseFileDeprecated extends XenAPIException { - - /** - * Create a new LicenseFileDeprecated - */ - public LicenseFileDeprecated() { - super("This license file is no longer accepted. Please upgrade to the new licensing system."); - } - - } - - /** - * An HA statefile could not be created, perhaps because no SR with the appropriate capability was found. - */ - public static class CannotCreateStateFile extends XenAPIException { - - /** - * Create a new CannotCreateStateFile - */ - public CannotCreateStateFile() { - super("An HA statefile could not be created, perhaps because no SR with the appropriate capability was found."); - } - - } - - /** - * The host joining the pool cannot have any VMs with active tasks. - */ - public static class JoiningHostCannotHaveVmsWithCurrentOperations extends XenAPIException { - - /** - * Create a new JoiningHostCannotHaveVmsWithCurrentOperations - */ - public JoiningHostCannotHaveVmsWithCurrentOperations() { - super("The host joining the pool cannot have any VMs with active tasks."); - } - - } - - /** - * You tried to call a method with the incorrect number of parameters. The fully-qualified method name that you used, and the number of received and expected parameters are returned. - */ - public static class MessageParameterCountMismatch extends XenAPIException { - public final String method; - public final String expected; - public final String received; - - /** - * Create a new MessageParameterCountMismatch - * - * @param method - * @param expected - * @param received - */ - public MessageParameterCountMismatch(String method, String expected, String received) { - super("You tried to call a method with the incorrect number of parameters. The fully-qualified method name that you used, and the number of received and expected parameters are returned."); - this.method = method; - this.expected = expected; - this.received = received; - } - - } - - /** - * External authentication in this pool is already enabled for at least one host. - */ - public static class PoolAuthAlreadyEnabled extends XenAPIException { - public final String host; - - /** - * Create a new PoolAuthAlreadyEnabled - * - * @param host - */ - public PoolAuthAlreadyEnabled(String host) { - super("External authentication in this pool is already enabled for at least one host."); - this.host = host; - } - - } - - /** - * The restore could not be performed because this backup has been created by a different (incompatible) product version - */ - public static class RestoreIncompatibleVersion extends XenAPIException { - - /** - * Create a new RestoreIncompatibleVersion - */ - public RestoreIncompatibleVersion() { - super("The restore could not be performed because this backup has been created by a different (incompatible) product version"); - } - - } - - /** - * The VM rejected the attempt to detach the device. - */ - public static class DeviceDetachRejected extends XenAPIException { - public final String type; - public final String ref; public final String msg; /** - * Create a new DeviceDetachRejected + * Create a new BootloaderFailed * - * @param type - * @param ref + * @param vm * @param msg */ - public DeviceDetachRejected(String type, String ref, String msg) { - super("The VM rejected the attempt to detach the device."); - this.type = type; - this.ref = ref; + public BootloaderFailed(String vm, String msg) { + super("The bootloader returned an error"); + this.vm = vm; this.msg = msg; } } /** - * External authentication is disabled, unable to resolve subject name. + * PIF has no IP configuration (mode curently set to 'none') */ - public static class AuthIsDisabled extends XenAPIException { + public static class PifHasNoNetworkConfiguration extends XenAPIException { /** - * Create a new AuthIsDisabled + * Create a new PifHasNoNetworkConfiguration */ - public AuthIsDisabled() { - super("External authentication is disabled, unable to resolve subject name."); + public PifHasNoNetworkConfiguration() { + super("PIF has no IP configuration (mode curently set to 'none')"); } } /** - * The host joining the pool cannot have any running or suspended VMs. + * Operation cannot proceed while a tunnel exists on this interface. */ - public static class JoiningHostCannotHaveRunningOrSuspendedVms extends XenAPIException { - - /** - * Create a new JoiningHostCannotHaveRunningOrSuspendedVms - */ - public JoiningHostCannotHaveRunningOrSuspendedVms() { - super("The host joining the pool cannot have any running or suspended VMs."); - } - - } - - /** - * The patch precheck stage failed: prerequisite patches are missing. - */ - public static class PatchPrecheckFailedPrerequisiteMissing extends XenAPIException { - public final String patch; - public final String prerequisitePatchUuidList; - - /** - * Create a new PatchPrecheckFailedPrerequisiteMissing - * - * @param patch - * @param prerequisitePatchUuidList - */ - public PatchPrecheckFailedPrerequisiteMissing(String patch, String prerequisitePatchUuidList) { - super("The patch precheck stage failed: prerequisite patches are missing."); - this.patch = patch; - this.prerequisitePatchUuidList = prerequisitePatchUuidList; - } - - } - - /** - * This operation could not be performed, because the VM has one or more PCI devices passed through. - */ - public static class VmHasPciAttached extends XenAPIException { - public final String vm; - - /** - * Create a new VmHasPciAttached - * - * @param vm - */ - public VmHasPciAttached(String vm) { - super("This operation could not be performed, because the VM has one or more PCI devices passed through."); - this.vm = vm; - } - - } - - /** - * The VDI mirroring cannot be performed - */ - public static class MirrorFailed extends XenAPIException { - public final String vdi; - - /** - * Create a new MirrorFailed - * - * @param vdi - */ - public MirrorFailed(String vdi) { - super("The VDI mirroring cannot be performed"); - this.vdi = vdi; - } - - } - - /** - * The WLB server reported that communication with XenServer timed out. - */ - public static class WlbXenserverTimeout extends XenAPIException { - - /** - * Create a new WlbXenserverTimeout - */ - public WlbXenserverTimeout() { - super("The WLB server reported that communication with XenServer timed out."); - } - - } - - /** - * The pool failed to disable the external authentication of at least one host. - */ - public static class PoolAuthDisableFailedWrongCredentials extends XenAPIException { - public final String host; - public final String message; - - /** - * Create a new PoolAuthDisableFailedWrongCredentials - * - * @param host - * @param message - */ - public PoolAuthDisableFailedWrongCredentials(String host, String message) { - super("The pool failed to disable the external authentication of at least one host."); - this.host = host; - this.message = message; - } - - } - - /** - * The quiesced-snapshot operation failed for an unexpected reason - */ - public static class VmSnapshotWithQuiesceFailed extends XenAPIException { - public final String vm; - - /** - * Create a new VmSnapshotWithQuiesceFailed - * - * @param vm - */ - public VmSnapshotWithQuiesceFailed(String vm) { - super("The quiesced-snapshot operation failed for an unexpected reason"); - this.vm = vm; - } - - } - - /** - * The specified certificate is corrupt or unreadable. - */ - public static class CertificateCorrupt extends XenAPIException { - public final String name; - - /** - * Create a new CertificateCorrupt - * - * @param name - */ - public CertificateCorrupt(String name) { - super("The specified certificate is corrupt or unreadable."); - this.name = name; - } - - } - - /** - * The WLB server reported an internal error. - */ - public static class WlbInternalError extends XenAPIException { - - /** - * Create a new WlbInternalError - */ - public WlbInternalError() { - super("The WLB server reported an internal error."); - } - - } - - /** - * The VM unexpectedly rebooted - */ - public static class VmRebooted extends XenAPIException { - public final String vm; - - /** - * Create a new VmRebooted - * - * @param vm - */ - public VmRebooted(String vm) { - super("The VM unexpectedly rebooted"); - this.vm = vm; - } - - } - - /** - * Cannot forward messages because the host cannot be contacted. The host may be switched off or there may be network connectivity problems. - */ - public static class CannotContactHost extends XenAPIException { - public final String host; - - /** - * Create a new CannotContactHost - * - * @param host - */ - public CannotContactHost(String host) { - super("Cannot forward messages because the host cannot be contacted. The host may be switched off or there may be network connectivity problems."); - this.host = host; - } - - } - - /** - * Could not find any volumes supported by the Citrix XenServer Vss Provider - */ - public static class XenVssReqErrorNoVolumesSupported extends XenAPIException { - public final String vm; - public final String errorCode; - - /** - * Create a new XenVssReqErrorNoVolumesSupported - * - * @param vm - * @param errorCode - */ - public XenVssReqErrorNoVolumesSupported(String vm, String errorCode) { - super("Could not find any volumes supported by the Citrix XenServer Vss Provider"); - this.vm = vm; - this.errorCode = errorCode; - } - - } - - /** - * The host is its own slave. Please use pool-emergency-transition-to-master or pool-emergency-reset-master. - */ - public static class HostItsOwnSlave extends XenAPIException { - - /** - * Create a new HostItsOwnSlave - */ - public HostItsOwnSlave() { - super("The host is its own slave. Please use pool-emergency-transition-to-master or pool-emergency-reset-master."); - } - - } - - /** - * This PIF is a bond slave and cannot have a VLAN on it. - */ - public static class CannotAddVlanToBondSlave extends XenAPIException { + public static class PifTunnelStillExists extends XenAPIException { public final String PIF; /** - * Create a new CannotAddVlanToBondSlave + * Create a new PifTunnelStillExists * * @param PIF */ - public CannotAddVlanToBondSlave(String PIF) { - super("This PIF is a bond slave and cannot have a VLAN on it."); + public PifTunnelStillExists(String PIF) { + super("Operation cannot proceed while a tunnel exists on this interface."); this.PIF = PIF; } } - /** - * The operation could not be performed because a redo log is enabled on the Pool. - */ - public static class RedoLogIsEnabled extends XenAPIException { - - /** - * Create a new RedoLogIsEnabled - */ - public RedoLogIsEnabled() { - super("The operation could not be performed because a redo log is enabled on the Pool."); - } - - } - - /** - * You attempted an operation on a VM which requires PV drivers to be installed but the drivers were not detected. - */ - public static class VmMissingPvDrivers extends XenAPIException { - public final String vm; - - /** - * Create a new VmMissingPvDrivers - * - * @param vm - */ - public VmMissingPvDrivers(String vm) { - super("You attempted an operation on a VM which requires PV drivers to be installed but the drivers were not detected."); - this.vm = vm; - } - - } - - /** - * The specified certificate name is invalid. - */ - public static class CertificateNameInvalid extends XenAPIException { - public final String name; - - /** - * Create a new CertificateNameInvalid - * - * @param name - */ - public CertificateNameInvalid(String name) { - super("The specified certificate name is invalid."); - this.name = name; - } - - } - /** * The VM could not be imported because a required object could not be found. */ @@ -8671,248 +8908,7 @@ public class Types } /** - * This operation cannot be performed because the specified VDI could not be found in the specified SR - */ - public static class VdiLocationMissing extends XenAPIException { - public final String sr; - public final String location; - - /** - * Create a new VdiLocationMissing - * - * @param sr - * @param location - */ - public VdiLocationMissing(String sr, String location) { - super("This operation cannot be performed because the specified VDI could not be found in the specified SR"); - this.sr = sr; - this.location = location; - } - - } - - /** - * The host failed to enable external authentication. - */ - public static class AuthEnableFailedPermissionDenied extends XenAPIException { - public final String message; - - /** - * Create a new AuthEnableFailedPermissionDenied - * - * @param message - */ - public AuthEnableFailedPermissionDenied(String message) { - super("The host failed to enable external authentication."); - this.message = message; - } - - } - - /** - * Operation cannot proceed while a VLAN exists on this interface. - */ - public static class PifVlanStillExists extends XenAPIException { - public final String PIF; - - /** - * Create a new PifVlanStillExists - * - * @param PIF - */ - public PifVlanStillExists(String PIF) { - super("Operation cannot proceed while a VLAN exists on this interface."); - this.PIF = PIF; - } - - } - - /** - * The given VMs failed to release memory when instructed to do so - */ - public static class VmsFailedToCooperate extends XenAPIException { - - /** - * Create a new VmsFailedToCooperate - */ - public VmsFailedToCooperate() { - super("The given VMs failed to release memory when instructed to do so"); - } - - } - - /** - * You reached the maximal number of concurrently migrating VMs. - */ - public static class TooManyStorageMigrates extends XenAPIException { - public final String number; - - /** - * Create a new TooManyStorageMigrates - * - * @param number - */ - public TooManyStorageMigrates(String number) { - super("You reached the maximal number of concurrently migrating VMs."); - this.number = number; - } - - } - - /** - * The network contains active VIFs and cannot be deleted. - */ - public static class NetworkContainsVif extends XenAPIException { - public final String vifs; - - /** - * Create a new NetworkContainsVif - * - * @param vifs - */ - public NetworkContainsVif(String vifs) { - super("The network contains active VIFs and cannot be deleted."); - this.vifs = vifs; - } - - } - - /** - * The value given is invalid - */ - public static class InvalidValue extends XenAPIException { - public final String field; - public final String value; - - /** - * Create a new InvalidValue - * - * @param field - * @param value - */ - public InvalidValue(String field, String value) { - super("The value given is invalid"); - this.field = field; - this.value = value; - } - - } - - /** - * The requested plugin could not be found. - */ - public static class XenapiMissingPlugin extends XenAPIException { - public final String name; - - /** - * Create a new XenapiMissingPlugin - * - * @param name - */ - public XenapiMissingPlugin(String name) { - super("The requested plugin could not be found."); - this.name = name; - } - - } - - /** - * The restore could not be performed because the host's current management interface is not in the backup. The interfaces mentioned in the backup are: - */ - public static class RestoreTargetMgmtIfNotInBackup extends XenAPIException { - - /** - * Create a new RestoreTargetMgmtIfNotInBackup - */ - public RestoreTargetMgmtIfNotInBackup() { - super("The restore could not be performed because the host's current management interface is not in the backup. The interfaces mentioned in the backup are:"); - } - - } - - /** - * You tried to create a VLAN or tunnel on top of a tunnel access PIF - use the underlying transport PIF instead. - */ - public static class IsTunnelAccessPif extends XenAPIException { - public final String PIF; - - /** - * Create a new IsTunnelAccessPif - * - * @param PIF - */ - public IsTunnelAccessPif(String PIF) { - super("You tried to create a VLAN or tunnel on top of a tunnel access PIF - use the underlying transport PIF instead."); - this.PIF = PIF; - } - - } - - /** - * There was an error connecting to the host while joining it in the pool. - */ - public static class JoiningHostConnectionFailed extends XenAPIException { - - /** - * Create a new JoiningHostConnectionFailed - */ - public JoiningHostConnectionFailed() { - super("There was an error connecting to the host while joining it in the pool."); - } - - } - - /** - * Subject cannot be resolved by the external directory service. - */ - public static class SubjectCannotBeResolved extends XenAPIException { - - /** - * Create a new SubjectCannotBeResolved - */ - public SubjectCannotBeResolved() { - super("Subject cannot be resolved by the external directory service."); - } - - } - - /** - * Some volumes to be snapshot could not be added to the VSS snapshot set - */ - public static class XenVssReqErrorAddingVolumeToSnapsetFailed extends XenAPIException { - public final String vm; - public final String errorCode; - - /** - * Create a new XenVssReqErrorAddingVolumeToSnapsetFailed - * - * @param vm - * @param errorCode - */ - public XenVssReqErrorAddingVolumeToSnapsetFailed(String vm, String errorCode) { - super("Some volumes to be snapshot could not be added to the VSS snapshot set"); - this.vm = vm; - this.errorCode = errorCode; - } - - } - - /** - * The provision call failed because it ran out of space. - */ - public static class ProvisionFailedOutOfSpace extends XenAPIException { - - /** - * Create a new ProvisionFailedOutOfSpace - */ - public ProvisionFailedOutOfSpace() { - super("The provision call failed because it ran out of space."); - } - - } - - /** - * You attempted to migrate a VDI which is not attached to a runnning VM. + * You attempted to migrate a VDI which is not attached to a running VM. */ public static class VdiNeedsVmForMigrate extends XenAPIException { public final String vdi; @@ -8923,684 +8919,85 @@ public class Types * @param vdi */ public VdiNeedsVmForMigrate(String vdi) { - super("You attempted to migrate a VDI which is not attached to a runnning VM."); + super("You attempted to migrate a VDI which is not attached to a running VM."); this.vdi = vdi; } } /** - * An error occurred while attempting to import a database from a metadata VDI + * The SR backend does not support the operation (check the SR's allowed operations) */ - public static class CouldNotImportDatabase extends XenAPIException { - public final String reason; + public static class SrOperationNotSupported extends XenAPIException { + public final String sr; /** - * Create a new CouldNotImportDatabase + * Create a new SrOperationNotSupported * - * @param reason + * @param sr */ - public CouldNotImportDatabase(String reason) { - super("An error occurred while attempting to import a database from a metadata VDI"); - this.reason = reason; + public SrOperationNotSupported(String sr) { + super("The SR backend does not support the operation (check the SR's allowed operations)"); + this.sr = sr; } } /** - * This operation can only be performed on CD VDIs (iso files or CDROM drives) + * The VSS plug-in cannot be contacted */ - public static class VdiIsNotIso extends XenAPIException { - public final String vdi; - public final String type; - - /** - * Create a new VdiIsNotIso - * - * @param vdi - * @param type - */ - public VdiIsNotIso(String vdi, String type) { - super("This operation can only be performed on CD VDIs (iso files or CDROM drives)"); - this.vdi = vdi; - this.type = type; - } - - } - - /** - * You tried to call a method that does not exist. The method name that you used is echoed. - */ - public static class MessageMethodUnknown extends XenAPIException { - public final String method; - - /** - * Create a new MessageMethodUnknown - * - * @param method - */ - public MessageMethodUnknown(String method) { - super("You tried to call a method that does not exist. The method name that you used is echoed."); - this.method = method; - } - - } - - /** - * You cannot delete the specified default template. - */ - public static class VmCannotDeleteDefaultTemplate extends XenAPIException { + public static class VmSnapshotWithQuiescePluginDeosNotRespond extends XenAPIException { public final String vm; /** - * Create a new VmCannotDeleteDefaultTemplate + * Create a new VmSnapshotWithQuiescePluginDeosNotRespond * * @param vm */ - public VmCannotDeleteDefaultTemplate(String vm) { - super("You cannot delete the specified default template."); + public VmSnapshotWithQuiescePluginDeosNotRespond(String vm) { + super("The VSS plug-in cannot be contacted"); this.vm = vm; } } /** - * Role cannot be found. + * 3rd party xapi hook failed */ - public static class RoleNotFound extends XenAPIException { - - /** - * Create a new RoleNotFound - */ - public RoleNotFound() { - super("Role cannot be found."); - } - - } - - /** - * This command is not allowed on the OEM edition. - */ - public static class NotAllowedOnOemEdition extends XenAPIException { - public final String command; - - /** - * Create a new NotAllowedOnOemEdition - * - * @param command - */ - public NotAllowedOnOemEdition(String command) { - super("This command is not allowed on the OEM edition."); - this.command = command; - } - - } - - /** - * The restore could not be performed because the restore script failed. Is the file corrupt? - */ - public static class RestoreScriptFailed extends XenAPIException { - public final String log; - - /** - * Create a new RestoreScriptFailed - * - * @param log - */ - public RestoreScriptFailed(String log) { - super("The restore could not be performed because the restore script failed. Is the file corrupt?"); - this.log = log; - } - - } - - /** - * The server failed to handle your request, due to an internal error. The given message may give details useful for debugging the problem. - */ - public static class InternalError extends XenAPIException { - public final String message; - - /** - * Create a new InternalError - * - * @param message - */ - public InternalError(String message) { - super("The server failed to handle your request, due to an internal error. The given message may give details useful for debugging the problem."); - this.message = message; - } - - } - - /** - * XHA cannot be enabled because this host's license does not allow it - */ - public static class LicenseDoesNotSupportXha extends XenAPIException { - - /** - * Create a new LicenseDoesNotSupportXha - */ - public LicenseDoesNotSupportXha() { - super("XHA cannot be enabled because this host's license does not allow it"); - } - - } - - /** - * The primary address types are not compatible - */ - public static class PifIncompatiblePrimaryAddressType extends XenAPIException { - - /** - * Create a new PifIncompatiblePrimaryAddressType - */ - public PifIncompatiblePrimaryAddressType() { - super("The primary address types are not compatible"); - } - - } - - /** - * The device is not currently attached - */ - public static class DeviceAlreadyDetached extends XenAPIException { - public final String device; - - /** - * Create a new DeviceAlreadyDetached - * - * @param device - */ - public DeviceAlreadyDetached(String device) { - super("The device is not currently attached"); - this.device = device; - } - - } - - /** - * The host failed to enable external authentication. - */ - public static class AuthEnableFailedUnavailable extends XenAPIException { - public final String message; - - /** - * Create a new AuthEnableFailedUnavailable - * - * @param message - */ - public AuthEnableFailedUnavailable(String message) { - super("The host failed to enable external authentication."); - this.message = message; - } - - } - - /** - * Media could not be ejected because it is not removable - */ - public static class VbdNotRemovableMedia extends XenAPIException { - public final String vbd; - - /** - * Create a new VbdNotRemovableMedia - * - * @param vbd - */ - public VbdNotRemovableMedia(String vbd) { - super("Media could not be ejected because it is not removable"); - this.vbd = vbd; - } - - } - - /** - * A VDI with the specified location already exists within the SR - */ - public static class LocationNotUnique extends XenAPIException { - public final String SR; - public final String location; - - /** - * Create a new LocationNotUnique - * - * @param SR - * @param location - */ - public LocationNotUnique(String SR, String location) { - super("A VDI with the specified location already exists within the SR"); - this.SR = SR; - this.location = location; - } - - } - - /** - * The function is not implemented - */ - public static class NotImplemented extends XenAPIException { - public final String function; - - /** - * Create a new NotImplemented - * - * @param function - */ - public NotImplemented(String function) { - super("The function is not implemented"); - this.function = function; - } - - } - - /** - * Cannot plug VIF - */ - public static class CannotPlugVif extends XenAPIException { - public final String VIF; - - /** - * Create a new CannotPlugVif - * - * @param VIF - */ - public CannotPlugVif(String VIF) { - super("Cannot plug VIF"); - this.VIF = VIF; - } - - } - - /** - * Only the local superuser can execute this operation - */ - public static class UserIsNotLocalSuperuser extends XenAPIException { - public final String msg; - - /** - * Create a new UserIsNotLocalSuperuser - * - * @param msg - */ - public UserIsNotLocalSuperuser(String msg) { - super("Only the local superuser can execute this operation"); - this.msg = msg; - } - - } - - /** - * The backup could not be performed because the backup script failed. - */ - public static class BackupScriptFailed extends XenAPIException { - public final String log; - - /** - * Create a new BackupScriptFailed - * - * @param log - */ - public BackupScriptFailed(String log) { - super("The backup could not be performed because the backup script failed."); - this.log = log; - } - - } - - /** - * The VM could not be imported because the XVA file is invalid: an unexpected file was encountered. - */ - public static class ImportErrorUnexpectedFile extends XenAPIException { - public final String filenameExpected; - public final String filenameFound; - - /** - * Create a new ImportErrorUnexpectedFile - * - * @param filenameExpected - * @param filenameFound - */ - public ImportErrorUnexpectedFile(String filenameExpected, String filenameFound) { - super("The VM could not be imported because the XVA file is invalid: an unexpected file was encountered."); - this.filenameExpected = filenameExpected; - this.filenameFound = filenameFound; - } - - } - - /** - * External authentication for this host is already enabled. - */ - public static class AuthAlreadyEnabled extends XenAPIException { - public final String currentAuthType; - public final String currentServiceName; - - /** - * Create a new AuthAlreadyEnabled - * - * @param currentAuthType - * @param currentServiceName - */ - public AuthAlreadyEnabled(String currentAuthType, String currentServiceName) { - super("External authentication for this host is already enabled."); - this.currentAuthType = currentAuthType; - this.currentServiceName = currentServiceName; - } - - } - - /** - * You attempted an operation that was not allowed. - */ - public static class OperationNotAllowed extends XenAPIException { + public static class XapiHookFailed extends XenAPIException { + public final String hookName; public final String reason; - - /** - * Create a new OperationNotAllowed - * - * @param reason - */ - public OperationNotAllowed(String reason) { - super("You attempted an operation that was not allowed."); - this.reason = reason; - } - - } - - /** - * Cannot find a plan for placement of VMs as there are no other hosts available. - */ - public static class HaNoPlan extends XenAPIException { - - /** - * Create a new HaNoPlan - */ - public HaNoPlan() { - super("Cannot find a plan for placement of VMs as there are no other hosts available."); - } - - } - - /** - * Some events have been lost from the queue and cannot be retrieved. - */ - public static class EventsLost extends XenAPIException { - - /** - * Create a new EventsLost - */ - public EventsLost() { - super("Some events have been lost from the queue and cannot be retrieved."); - } - - } - - /** - * There was an SR backend failure. - */ - public static class SrBackendFailure extends XenAPIException { - public final String status; public final String stdout; - public final String stderr; + public final String exitCode; /** - * Create a new SrBackendFailure + * Create a new XapiHookFailed * - * @param status + * @param hookName + * @param reason * @param stdout - * @param stderr + * @param exitCode */ - public SrBackendFailure(String status, String stdout, String stderr) { - super("There was an SR backend failure."); - this.status = status; + public XapiHookFailed(String hookName, String reason, String stdout, String exitCode) { + super("3rd party xapi hook failed"); + this.hookName = hookName; + this.reason = reason; this.stdout = stdout; - this.stderr = stderr; + this.exitCode = exitCode; } } /** - * A timeout happened while attempting to detach a device from a VM. + * The operation could not be performed because a redo log is enabled on the Pool. */ - public static class DeviceDetachTimeout extends XenAPIException { - public final String type; - public final String ref; + public static class RedoLogIsEnabled extends XenAPIException { /** - * Create a new DeviceDetachTimeout - * - * @param type - * @param ref + * Create a new RedoLogIsEnabled */ - public DeviceDetachTimeout(String type, String ref) { - super("A timeout happened while attempting to detach a device from a VM."); - this.type = type; - this.ref = ref; - } - - } - - /** - * The specified VM has a duplicate VBD device and cannot be started. - */ - public static class VmDuplicateVbdDevice extends XenAPIException { - public final String vm; - public final String vbd; - public final String device; - - /** - * Create a new VmDuplicateVbdDevice - * - * @param vm - * @param vbd - * @param device - */ - public VmDuplicateVbdDevice(String vm, String vbd, String device) { - super("The specified VM has a duplicate VBD device and cannot be started."); - this.vm = vm; - this.vbd = vbd; - this.device = device; - } - - } - - /** - * This PIF is a bond slave and cannot be plugged. - */ - public static class CannotPlugBondSlave extends XenAPIException { - public final String PIF; - - /** - * Create a new CannotPlugBondSlave - * - * @param PIF - */ - public CannotPlugBondSlave(String PIF) { - super("This PIF is a bond slave and cannot be plugged."); - this.PIF = PIF; - } - - } - - /** - * The VM cannot be imported unforced because it is either the same version or an older version of an existing VM. - */ - public static class VmToImportIsNotNewerVersion extends XenAPIException { - public final String vm; - public final String existingVersion; - public final String versionToImport; - - /** - * Create a new VmToImportIsNotNewerVersion - * - * @param vm - * @param existingVersion - * @param versionToImport - */ - public VmToImportIsNotNewerVersion(String vm, String existingVersion, String versionToImport) { - super("The VM cannot be imported unforced because it is either the same version or an older version of an existing VM."); - this.vm = vm; - this.existingVersion = existingVersion; - this.versionToImport = versionToImport; - } - - } - - /** - * The specified CRL is corrupt or unreadable. - */ - public static class CrlCorrupt extends XenAPIException { - public final String name; - - /** - * Create a new CrlCorrupt - * - * @param name - */ - public CrlCorrupt(String name) { - super("The specified CRL is corrupt or unreadable."); - this.name = name; - } - - } - - /** - * You attempted an operation on a VM which requires a more recent version of the PV drivers. Please upgrade your PV drivers. - */ - public static class VmOldPvDrivers extends XenAPIException { - public final String vm; - public final String major; - public final String minor; - - /** - * Create a new VmOldPvDrivers - * - * @param vm - * @param major - * @param minor - */ - public VmOldPvDrivers(String vm, String major, String minor) { - super("You attempted an operation on a VM which requires a more recent version of the PV drivers. Please upgrade your PV drivers."); - this.vm = vm; - this.major = major; - this.minor = minor; - } - - } - - /** - * The operation you requested cannot be performed because the specified PIF does not allow unplug. - */ - public static class PifDoesNotAllowUnplug extends XenAPIException { - public final String PIF; - - /** - * Create a new PifDoesNotAllowUnplug - * - * @param PIF - */ - public PifDoesNotAllowUnplug(String PIF) { - super("The operation you requested cannot be performed because the specified PIF does not allow unplug."); - this.PIF = PIF; - } - - } - - /** - * The system rejected the password change request; perhaps the new password was too short? - */ - public static class ChangePasswordRejected extends XenAPIException { - public final String msg; - - /** - * Create a new ChangePasswordRejected - * - * @param msg - */ - public ChangePasswordRejected(String msg) { - super("The system rejected the password change request; perhaps the new password was too short?"); - this.msg = msg; - } - - } - - /** - * Another operation involving the object is currently in progress - */ - public static class OtherOperationInProgress extends XenAPIException { - public final String clazz; - public final String object; - - /** - * Create a new OtherOperationInProgress - * - * @param clazz - * @param object - */ - public OtherOperationInProgress(String clazz, String object) { - super("Another operation involving the object is currently in progress"); - this.clazz = clazz; - this.object = object; - } - - } - - /** - * Initialization of the VSS requestor failed - */ - public static class XenVssReqErrorInitFailed extends XenAPIException { - public final String vm; - public final String errorCode; - - /** - * Create a new XenVssReqErrorInitFailed - * - * @param vm - * @param errorCode - */ - public XenVssReqErrorInitFailed(String vm, String errorCode) { - super("Initialization of the VSS requestor failed"); - this.vm = vm; - this.errorCode = errorCode; - } - - } - - /** - * The CPU does not support masking of features. - */ - public static class CpuFeatureMaskingNotSupported extends XenAPIException { - public final String details; - - /** - * Create a new CpuFeatureMaskingNotSupported - * - * @param details - */ - public CpuFeatureMaskingNotSupported(String details) { - super("The CPU does not support masking of features."); - this.details = details; - } - - } - - /** - * The specified VM is not currently resident on the specified host. - */ - public static class VmNotResidentHere extends XenAPIException { - public final String vm; - public final String host; - - /** - * Create a new VmNotResidentHere - * - * @param vm - * @param host - */ - public VmNotResidentHere(String vm, String host) { - super("The specified VM is not currently resident on the specified host."); - this.vm = vm; - this.host = host; + public RedoLogIsEnabled() { + super("The operation could not be performed because a redo log is enabled on the Pool."); } } @@ -9624,220 +9021,194 @@ public class Types } /** - * The pool failed to disable the external authentication of at least one host. + * A CRL already exists with the specified name. */ - public static class PoolAuthDisableFailed extends XenAPIException { - public final String host; - public final String message; + public static class CrlAlreadyExists extends XenAPIException { + public final String name; /** - * Create a new PoolAuthDisableFailed + * Create a new CrlAlreadyExists * - * @param host - * @param message + * @param name */ - public PoolAuthDisableFailed(String host, String message) { - super("The pool failed to disable the external authentication of at least one host."); - this.host = host; - this.message = message; + public CrlAlreadyExists(String name) { + super("A CRL already exists with the specified name."); + this.name = name; } } /** - * The host failed to acquire an IP address on its management interface and therefore cannot contact the master. + * The remote system's SSL certificate failed to verify against our certificate library. */ - public static class HostHasNoManagementIp extends XenAPIException { - - /** - * Create a new HostHasNoManagementIp - */ - public HostHasNoManagementIp() { - super("The host failed to acquire an IP address on its management interface and therefore cannot contact the master."); - } - - } - - /** - * The tunnel transport PIF has no IP configuration set. - */ - public static class TransportPifNotConfigured extends XenAPIException { - public final String PIF; - - /** - * Create a new TransportPifNotConfigured - * - * @param PIF - */ - public TransportPifNotConfigured(String PIF) { - super("The tunnel transport PIF has no IP configuration set."); - this.PIF = PIF; - } - - } - - /** - * The operation could not be performed because HA is enabled on the Pool - */ - public static class HaIsEnabled extends XenAPIException { - - /** - * Create a new HaIsEnabled - */ - public HaIsEnabled() { - super("The operation could not be performed because HA is enabled on the Pool"); - } - - } - - /** - * An error occured while reverting the specified virtual machine to the specified snapshot - */ - public static class VmRevertFailed extends XenAPIException { - public final String vm; - public final String snapshot; - - /** - * Create a new VmRevertFailed - * - * @param vm - * @param snapshot - */ - public VmRevertFailed(String vm, String snapshot) { - super("An error occured while reverting the specified virtual machine to the specified snapshot"); - this.vm = vm; - this.snapshot = snapshot; - } - - } - - /** - * The host name is invalid. - */ - public static class HostNameInvalid extends XenAPIException { + public static class SslVerifyError extends XenAPIException { public final String reason; /** - * Create a new HostNameInvalid + * Create a new SslVerifyError * * @param reason */ - public HostNameInvalid(String reason) { - super("The host name is invalid."); + public SslVerifyError(String reason) { + super("The remote system's SSL certificate failed to verify against our certificate library."); this.reason = reason; } } /** - * The operation could not be performed because a domain still exists for the specified VM. + * Unknown type of external authentication. */ - public static class DomainExists extends XenAPIException { - public final String vm; - public final String domid; + public static class AuthUnknownType extends XenAPIException { + public final String type; /** - * Create a new DomainExists + * Create a new AuthUnknownType * - * @param vm - * @param domid + * @param type */ - public DomainExists(String vm, String domid) { - super("The operation could not be performed because a domain still exists for the specified VM."); - this.vm = vm; - this.domid = domid; + public AuthUnknownType(String type) { + super("Unknown type of external authentication."); + this.type = type; } } /** - * This host cannot join the pool because the pool has HA enabled but this host has HA disabled. + * PIF has no IPv6 configuration (mode curently set to 'none') */ - public static class HaPoolIsEnabledButHostIsDisabled extends XenAPIException { + public static class PifHasNoV6NetworkConfiguration extends XenAPIException { /** - * Create a new HaPoolIsEnabledButHostIsDisabled + * Create a new PifHasNoV6NetworkConfiguration */ - public HaPoolIsEnabledButHostIsDisabled() { - super("This host cannot join the pool because the pool has HA enabled but this host has HA disabled."); + public PifHasNoV6NetworkConfiguration() { + super("PIF has no IPv6 configuration (mode curently set to 'none')"); } } /** - * This message has been deprecated. + * Host cannot rejoin pool because it should have fenced (it is not in the master's partition) */ - public static class MessageDeprecated extends XenAPIException { + public static class HaShouldBeFenced extends XenAPIException { + public final String host; /** - * Create a new MessageDeprecated - */ - public MessageDeprecated() { - super("This message has been deprecated."); - } - - } - - /** - * This operation cannot be performed because the referenced SR is not properly shared. The SR must both be marked as shared and a currently_attached PBD must exist for each host. - */ - public static class HaConstraintViolationSrNotShared extends XenAPIException { - public final String SR; - - /** - * Create a new HaConstraintViolationSrNotShared + * Create a new HaShouldBeFenced * - * @param SR + * @param host */ - public HaConstraintViolationSrNotShared(String SR) { - super("This operation cannot be performed because the referenced SR is not properly shared. The SR must both be marked as shared and a currently_attached PBD must exist for each host."); - this.SR = SR; + public HaShouldBeFenced(String host) { + super("Host cannot rejoin pool because it should have fenced (it is not in the master's partition)"); + this.host = host; } } /** - * Cannot import VM using chunked encoding. + * There is not enough space to upload the update */ - public static class ImportErrorCannotHandleChunked extends XenAPIException { + public static class OutOfSpace extends XenAPIException { + public final String location; /** - * Create a new ImportErrorCannotHandleChunked - */ - public ImportErrorCannotHandleChunked() { - super("Cannot import VM using chunked encoding."); - } - - } - - /** - * You attempted to start a VM that's attached to more than one VDI with a timeoffset marked as reset-on-boot. - */ - public static class VmAttachedToMoreThanOneVdiWithTimeoffsetMarkedAsResetOnBoot extends XenAPIException { - public final String vm; - - /** - * Create a new VmAttachedToMoreThanOneVdiWithTimeoffsetMarkedAsResetOnBoot + * Create a new OutOfSpace * - * @param vm + * @param location */ - public VmAttachedToMoreThanOneVdiWithTimeoffsetMarkedAsResetOnBoot(String vm) { - super("You attempted to start a VM that's attached to more than one VDI with a timeoffset marked as reset-on-boot."); - this.vm = vm; + public OutOfSpace(String location) { + super("There is not enough space to upload the update"); + this.location = location; } } /** - * This operation is not supported during an upgrade. + * The SR has no attached PBDs */ - public static class NotSupportedDuringUpgrade extends XenAPIException { + public static class SrHasNoPbds extends XenAPIException { + public final String sr; /** - * Create a new NotSupportedDuringUpgrade + * Create a new SrHasNoPbds + * + * @param sr */ - public NotSupportedDuringUpgrade() { - super("This operation is not supported during an upgrade."); + public SrHasNoPbds(String sr) { + super("The SR has no attached PBDs"); + this.sr = sr; + } + + } + + /** + * RBAC permission denied. + */ + public static class RbacPermissionDenied extends XenAPIException { + public final String permission; + public final String message; + + /** + * Create a new RbacPermissionDenied + * + * @param permission + * @param message + */ + public RbacPermissionDenied(String permission, String message) { + super("RBAC permission denied."); + this.permission = permission; + this.message = message; + } + + } + + /** + * The host could not join the liveset because the HA daemon could not access the heartbeat disk. + */ + public static class HaHostCannotAccessStatefile extends XenAPIException { + + /** + * Create a new HaHostCannotAccessStatefile + */ + public HaHostCannotAccessStatefile() { + super("The host could not join the liveset because the HA daemon could not access the heartbeat disk."); + } + + } + + /** + * The communication with the WLB server timed out. + */ + public static class WlbTimeout extends XenAPIException { + public final String configuredTimeout; + + /** + * Create a new WlbTimeout + * + * @param configuredTimeout + */ + public WlbTimeout(String configuredTimeout) { + super("The communication with the WLB server timed out."); + this.configuredTimeout = configuredTimeout; + } + + } + + /** + * This host cannot accept the proposed new master setting at this time. + */ + public static class HaAbortNewMaster extends XenAPIException { + public final String reason; + + /** + * Create a new HaAbortNewMaster + * + * @param reason + */ + public HaAbortNewMaster(String reason) { + super("This host cannot accept the proposed new master setting at this time."); + this.reason = reason; } } @@ -9864,81 +9235,769 @@ public class Types } /** - * The specified interface cannot be used because it has no IP address + * You attempted to migrate a VM with more than one snapshot. */ - public static class InterfaceHasNoIp extends XenAPIException { - public final String iface; + public static class VmHasTooManySnapshots extends XenAPIException { + public final String vm; /** - * Create a new InterfaceHasNoIp + * Create a new VmHasTooManySnapshots * - * @param iface + * @param vm */ - public InterfaceHasNoIp(String iface) { - super("The specified interface cannot be used because it has no IP address"); - this.iface = iface; + public VmHasTooManySnapshots(String vm) { + super("You attempted to migrate a VM with more than one snapshot."); + this.vm = vm; } } /** - * The hosts in this pool are not compatible. + * The specified patch is applied and cannot be destroyed. */ - public static class HostsNotCompatible extends XenAPIException { + public static class PatchIsApplied extends XenAPIException { /** - * Create a new HostsNotCompatible + * Create a new PatchIsApplied */ - public HostsNotCompatible() { - super("The hosts in this pool are not compatible."); + public PatchIsApplied() { + super("The specified patch is applied and cannot be destroyed."); } } /** - * The host failed to enable external authentication. + * The VDI mirroring cannot be performed */ - public static class AuthEnableFailedWrongCredentials extends XenAPIException { + public static class MirrorFailed extends XenAPIException { + public final String vdi; + + /** + * Create a new MirrorFailed + * + * @param vdi + */ + public MirrorFailed(String vdi) { + super("The VDI mirroring cannot be performed"); + this.vdi = vdi; + } + + } + + /** + * The host failed to disable external authentication. + */ + public static class AuthDisableFailed extends XenAPIException { public final String message; /** - * Create a new AuthEnableFailedWrongCredentials + * Create a new AuthDisableFailed * * @param message */ - public AuthEnableFailedWrongCredentials(String message) { - super("The host failed to enable external authentication."); + public AuthDisableFailed(String message) { + super("The host failed to disable external authentication."); this.message = message; } } + /** + * The operation you requested cannot be performed because the specified PIF is the management interface. + */ + public static class PifIsManagementInterface extends XenAPIException { + public final String PIF; + + /** + * Create a new PifIsManagementInterface + * + * @param PIF + */ + public PifIsManagementInterface(String PIF) { + super("The operation you requested cannot be performed because the specified PIF is the management interface."); + this.PIF = PIF; + } + + } + + /** + * The specified certificate does not exist. + */ + public static class CertificateDoesNotExist extends XenAPIException { + public final String name; + + /** + * Create a new CertificateDoesNotExist + * + * @param name + */ + public CertificateDoesNotExist(String name) { + super("The specified certificate does not exist."); + this.name = name; + } + + } + + /** + * The network contains active VIFs and cannot be deleted. + */ + public static class NetworkContainsVif extends XenAPIException { + public final String vifs; + + /** + * Create a new NetworkContainsVif + * + * @param vifs + */ + public NetworkContainsVif(String vifs) { + super("The network contains active VIFs and cannot be deleted."); + this.vifs = vifs; + } + + } + + /** + * The power-state of a control domain cannot be reset. + */ + public static class CannotResetControlDomain extends XenAPIException { + public final String vm; + + /** + * Create a new CannotResetControlDomain + * + * @param vm + */ + public CannotResetControlDomain(String vm) { + super("The power-state of a control domain cannot be reset."); + this.vm = vm; + } + + } + + /** + * The WLB server rejected our configured authentication details. + */ + public static class WlbAuthenticationFailed extends XenAPIException { + + /** + * Create a new WlbAuthenticationFailed + */ + public WlbAuthenticationFailed() { + super("The WLB server rejected our configured authentication details."); + } + + } + + /** + * The WLB URL is invalid. Ensure it is in format: :. The configured/given URL is returned. + */ + public static class WlbUrlInvalid extends XenAPIException { + public final String url; + + /** + * Create a new WlbUrlInvalid + * + * @param url + */ + public WlbUrlInvalid(String url) { + super("The WLB URL is invalid. Ensure it is in format: :. The configured/given URL is returned."); + this.url = url; + } + + } + + /** + * This operation cannot be performed because the referenced SR is not properly shared. The SR must both be marked as shared and a currently_attached PBD must exist for each host. + */ + public static class HaConstraintViolationSrNotShared extends XenAPIException { + public final String SR; + + /** + * Create a new HaConstraintViolationSrNotShared + * + * @param SR + */ + public HaConstraintViolationSrNotShared(String SR) { + super("This operation cannot be performed because the referenced SR is not properly shared. The SR must both be marked as shared and a currently_attached PBD must exist for each host."); + this.SR = SR; + } + + } + + /** + * You need at least 1 VCPU to start a VM + */ + public static class VmNoVcpus extends XenAPIException { + public final String vm; + + /** + * Create a new VmNoVcpus + * + * @param vm + */ + public VmNoVcpus(String vm) { + super("You need at least 1 VCPU to start a VM"); + this.vm = vm; + } + + } + + /** + * You attempted to migrate a VM which has a checkpoint. + */ + public static class VmHasCheckpoint extends XenAPIException { + public final String vm; + + /** + * Create a new VmHasCheckpoint + * + * @param vm + */ + public VmHasCheckpoint(String vm) { + super("You attempted to migrate a VM which has a checkpoint."); + this.vm = vm; + } + + } + + /** + * This VM has locked the DVD drive tray, so the disk cannot be ejected + */ + public static class VbdTrayLocked extends XenAPIException { + public final String vbd; + + /** + * Create a new VbdTrayLocked + * + * @param vbd + */ + public VbdTrayLocked(String vbd) { + super("This VM has locked the DVD drive tray, so the disk cannot be ejected"); + this.vbd = vbd; + } + + } + + /** + * The metrics of this host could not be read. + */ + public static class HostCannotReadMetrics extends XenAPIException { + + /** + * Create a new HostCannotReadMetrics + */ + public HostCannotReadMetrics() { + super("The metrics of this host could not be read."); + } + + } + + /** + * The WLB server said something that XenServer wasn't expecting or didn't understand. The method called on the WLB server, a diagnostic reason, and the response from WLB are returned. + */ + public static class WlbMalformedResponse extends XenAPIException { + public final String method; + public final String reason; + public final String response; + + /** + * Create a new WlbMalformedResponse + * + * @param method + * @param reason + * @param response + */ + public WlbMalformedResponse(String method, String reason, String response) { + super("The WLB server said something that XenServer wasn't expecting or didn't understand. The method called on the WLB server, a diagnostic reason, and the response from WLB are returned."); + this.method = method; + this.reason = reason; + this.response = response; + } + + } + + /** + * The license-server connection details (address or port) were missing or incomplete. + */ + public static class MissingConnectionDetails extends XenAPIException { + + /** + * Create a new MissingConnectionDetails + */ + public MissingConnectionDetails() { + super("The license-server connection details (address or port) were missing or incomplete."); + } + + } + + /** + * There is insufficient capacity on this PGPU to run the VGPU. + */ + public static class PgpuInsufficientCapacityForVgpu extends XenAPIException { + public final String pgpu; + public final String vgpuType; + + /** + * Create a new PgpuInsufficientCapacityForVgpu + * + * @param pgpu + * @param vgpuType + */ + public PgpuInsufficientCapacityForVgpu(String pgpu, String vgpuType) { + super("There is insufficient capacity on this PGPU to run the VGPU."); + this.pgpu = pgpu; + this.vgpuType = vgpuType; + } + + } + + /** + * Read/write CDs are not supported + */ + public static class VbdCdsMustBeReadonly extends XenAPIException { + + /** + * Create a new VbdCdsMustBeReadonly + */ + public VbdCdsMustBeReadonly() { + super("Read/write CDs are not supported"); + } + + } + + /** + * VM failed to shutdown before the timeout expired + */ + public static class VmShutdownTimeout extends XenAPIException { + public final String vm; + public final String timeout; + + /** + * Create a new VmShutdownTimeout + * + * @param vm + * @param timeout + */ + public VmShutdownTimeout(String vm, String timeout) { + super("VM failed to shutdown before the timeout expired"); + this.vm = vm; + this.timeout = timeout; + } + + } + + /** + * The pool failed to disable the external authentication of at least one host. + */ + public static class PoolAuthDisableFailedPermissionDenied extends XenAPIException { + public final String host; + public final String message; + + /** + * Create a new PoolAuthDisableFailedPermissionDenied + * + * @param host + * @param message + */ + public PoolAuthDisableFailedPermissionDenied(String host, String message) { + super("The pool failed to disable the external authentication of at least one host."); + this.host = host; + this.message = message; + } + + } + + /** + * The VM could not be imported. + */ + public static class ImportError extends XenAPIException { + public final String msg; + + /** + * Create a new ImportError + * + * @param msg + */ + public ImportError(String msg) { + super("The VM could not be imported."); + this.msg = msg; + } + + } + + /** + * No WLB connection is configured. + */ + public static class WlbNotInitialized extends XenAPIException { + + /** + * Create a new WlbNotInitialized + */ + public WlbNotInitialized() { + super("No WLB connection is configured."); + } + + } + + /** + * You tried to create a VLAN, but the tag you gave was invalid -- it must be between 0 and 4094. The parameter echoes the VLAN tag you gave. + */ + public static class VlanTagInvalid extends XenAPIException { + public final String VLAN; + + /** + * Create a new VlanTagInvalid + * + * @param VLAN + */ + public VlanTagInvalid(String VLAN) { + super("You tried to create a VLAN, but the tag you gave was invalid -- it must be between 0 and 4094. The parameter echoes the VLAN tag you gave."); + this.VLAN = VLAN; + } + + } + + /** + * The upper limit of active redo log instances was reached. + */ + public static class NoMoreRedoLogsAllowed extends XenAPIException { + + /** + * Create a new NoMoreRedoLogsAllowed + */ + public NoMoreRedoLogsAllowed() { + super("The upper limit of active redo log instances was reached."); + } + + } + + /** + * A PBD already exists connecting the SR to the host + */ + public static class PbdExists extends XenAPIException { + public final String sr; + public final String host; + public final String pbd; + + /** + * Create a new PbdExists + * + * @param sr + * @param host + * @param pbd + */ + public PbdExists(String sr, String host, String pbd) { + super("A PBD already exists connecting the SR to the host"); + this.sr = sr; + this.host = host; + this.pbd = pbd; + } + + } + + /** + * The host failed to disable external authentication. + */ + public static class AuthDisableFailedPermissionDenied extends XenAPIException { + public final String message; + + /** + * Create a new AuthDisableFailedPermissionDenied + * + * @param message + */ + public AuthDisableFailedPermissionDenied(String message) { + super("The host failed to disable external authentication."); + this.message = message; + } + + } + + /** + * External authentication in this pool is already enabled for at least one host. + */ + public static class PoolAuthAlreadyEnabled extends XenAPIException { + public final String host; + + /** + * Create a new PoolAuthAlreadyEnabled + * + * @param host + */ + public PoolAuthAlreadyEnabled(String host) { + super("External authentication in this pool is already enabled for at least one host."); + this.host = host; + } + + } + + /** + * There were no hosts available to complete the specified operation. + */ + public static class NoHostsAvailable extends XenAPIException { + + /** + * Create a new NoHostsAvailable + */ + public NoHostsAvailable() { + super("There were no hosts available to complete the specified operation."); + } + + } + + /** + * The SR.shared flag cannot be set to false while the SR remains connected to multiple hosts + */ + public static class SrHasMultiplePbds extends XenAPIException { + public final String PBD; + + /** + * Create a new SrHasMultiplePbds + * + * @param PBD + */ + public SrHasMultiplePbds(String PBD) { + super("The SR.shared flag cannot be set to false while the SR remains connected to multiple hosts"); + this.PBD = PBD; + } + + } + + /** + * An attempt to prepare VSS writers for the snapshot failed + */ + public static class XenVssReqErrorPreparingWriters extends XenAPIException { + public final String vm; + public final String errorCode; + + /** + * Create a new XenVssReqErrorPreparingWriters + * + * @param vm + * @param errorCode + */ + public XenVssReqErrorPreparingWriters(String vm, String errorCode) { + super("An attempt to prepare VSS writers for the snapshot failed"); + this.vm = vm; + this.errorCode = errorCode; + } + + } + + /** + * There was a failure communicating with the plugin. + */ + public static class XenapiPluginFailure extends XenAPIException { + public final String status; + public final String stdout; + public final String stderr; + + /** + * Create a new XenapiPluginFailure + * + * @param status + * @param stdout + * @param stderr + */ + public XenapiPluginFailure(String status, String stdout, String stderr) { + super("There was a failure communicating with the plugin."); + this.status = status; + this.stdout = stdout; + this.stderr = stderr; + } + + } + + /** + * This PIF is a bond slave and cannot have a tunnel on it. + */ + public static class CannotAddTunnelToBondSlave extends XenAPIException { + public final String PIF; + + /** + * Create a new CannotAddTunnelToBondSlave + * + * @param PIF + */ + public CannotAddTunnelToBondSlave(String PIF) { + super("This PIF is a bond slave and cannot have a tunnel on it."); + this.PIF = PIF; + } + + } + + /** + * This operation cannot be completed as the host power on mode is disabled. + */ + public static class HostPowerOnModeDisabled extends XenAPIException { + + /** + * Create a new HostPowerOnModeDisabled + */ + public HostPowerOnModeDisabled() { + super("This operation cannot be completed as the host power on mode is disabled."); + } + + } + + /** + * The specified VBD device is not recognized: please use a non-negative integer + */ + public static class IllegalVbdDevice extends XenAPIException { + public final String vbd; + public final String device; + + /** + * Create a new IllegalVbdDevice + * + * @param vbd + * @param device + */ + public IllegalVbdDevice(String vbd, String device) { + super("The specified VBD device is not recognized: please use a non-negative integer"); + this.vbd = vbd; + this.device = device; + } + + } + + /** + * You attempted to run a VM on a host on which the vGPU required by the VM cannot be allocated on any pGPUs in the GPU_group needed by the VM. + */ + public static class VmRequiresVgpu extends XenAPIException { + public final String vm; + public final String GPUGroup; + public final String vGPUType; + + /** + * Create a new VmRequiresVgpu + * + * @param vm + * @param GPUGroup + * @param vGPUType + */ + public VmRequiresVgpu(String vm, String GPUGroup, String vGPUType) { + super("You attempted to run a VM on a host on which the vGPU required by the VM cannot be allocated on any pGPUs in the GPU_group needed by the VM."); + this.vm = vm; + this.GPUGroup = GPUGroup; + this.vGPUType = vGPUType; + } + + } + + /** + * The uploaded patch file is invalid. See attached log for more details. + */ + public static class InvalidPatchWithLog extends XenAPIException { + public final String log; + + /** + * Create a new InvalidPatchWithLog + * + * @param log + */ + public InvalidPatchWithLog(String log) { + super("The uploaded patch file is invalid. See attached log for more details."); + this.log = log; + } + + } + + /** + * You tried to create a VLAN on top of another VLAN - use the underlying physical PIF/bond instead + */ + public static class PifIsVlan extends XenAPIException { + public final String PIF; + + /** + * Create a new PifIsVlan + * + * @param PIF + */ + public PifIsVlan(String PIF) { + super("You tried to create a VLAN on top of another VLAN - use the underlying physical PIF/bond instead"); + this.PIF = PIF; + } + + } + + /** + * This operation cannot be performed because creating or deleting a bond involving the management interface is not allowed while HA is on. In order to do that, disable HA, create or delete the bond then re-enable HA. + */ + public static class HaCannotChangeBondStatusOfMgmtIface extends XenAPIException { + + /** + * Create a new HaCannotChangeBondStatusOfMgmtIface + */ + public HaCannotChangeBondStatusOfMgmtIface() { + super("This operation cannot be performed because creating or deleting a bond involving the management interface is not allowed while HA is on. In order to do that, disable HA, create or delete the bond then re-enable HA."); + } + + } + + /** + * The given VM is not registered as a system domain. This operation can only be performed on a registered system domain. + */ + public static class NotSystemDomain extends XenAPIException { + public final String vm; + + /** + * Create a new NotSystemDomain + * + * @param vm + */ + public NotSystemDomain(String vm) { + super("The given VM is not registered as a system domain. This operation can only be performed on a registered system domain."); + this.vm = vm; + } + + } + + /** + * The operation could not be performed because the HA software is not installed on this host. + */ + public static class HaNotInstalled extends XenAPIException { + public final String host; + + /** + * Create a new HaNotInstalled + * + * @param host + */ + public HaNotInstalled(String host) { + super("The operation could not be performed because the HA software is not installed on this host."); + this.host = host; + } + + } + + public static String toString(Object object) { if (object == null) { return null; } - return (String)object; + return (String) object; } public static Long toLong(Object object) { if (object == null) { return null; } - return Long.valueOf((String)object); + return Long.valueOf((String) object); } public static Double toDouble(Object object) { if (object == null) { return null; } - return (Double)object; + return (Double) object; } public static Boolean toBoolean(Object object) { if (object == null) { return null; } - return (Boolean)object; + return (Boolean) object; } public static Date toDate(Object object) { @@ -9946,11 +10005,11 @@ public class Types return null; } try { - return (Date)object; - } catch (ClassCastException e) { - //Occasionally the date comes back as an ocaml float rather than - //in the xmlrpc format! Catch this and convert. - return (new Date((long)(1000 * Double.parseDouble((String)object)))); + return (Date) object; + } catch (ClassCastException e){ + //Occasionally the date comes back as an ocaml float rather than + //in the xmlrpc format! Catch this and convert. + return (new Date((long) (1000*Double.parseDouble((String) object)))); } } @@ -9959,7 +10018,7 @@ public class Types return null; } try { - return XenAPIObjects.valueOf(((String)object).toUpperCase().replace('-', '_')); + return XenAPIObjects.valueOf(((String) object).toUpperCase().replace('-','_')); } catch (IllegalArgumentException ex) { return XenAPIObjects.UNRECOGNIZED; } @@ -9970,18 +10029,29 @@ public class Types return null; } try { - return AfterApplyGuidance.valueOf(((String)object).toUpperCase().replace('-', '_')); + return AfterApplyGuidance.valueOf(((String) object).toUpperCase().replace('-','_')); } catch (IllegalArgumentException ex) { return AfterApplyGuidance.UNRECOGNIZED; } } + public static Types.AllocationAlgorithm toAllocationAlgorithm(Object object) { + if (object == null) { + return null; + } + try { + return AllocationAlgorithm.valueOf(((String) object).toUpperCase().replace('-','_')); + } catch (IllegalArgumentException ex) { + return AllocationAlgorithm.UNRECOGNIZED; + } + } + public static Types.BondMode toBondMode(Object object) { if (object == null) { return null; } try { - return BondMode.valueOf(((String)object).toUpperCase().replace('-', '_')); + return BondMode.valueOf(((String) object).toUpperCase().replace('-','_')); } catch (IllegalArgumentException ex) { return BondMode.UNRECOGNIZED; } @@ -9992,7 +10062,7 @@ public class Types return null; } try { - return Cls.valueOf(((String)object).toUpperCase().replace('-', '_')); + return Cls.valueOf(((String) object).toUpperCase().replace('-','_')); } catch (IllegalArgumentException ex) { return Cls.UNRECOGNIZED; } @@ -10003,7 +10073,7 @@ public class Types return null; } try { - return ConsoleProtocol.valueOf(((String)object).toUpperCase().replace('-', '_')); + return ConsoleProtocol.valueOf(((String) object).toUpperCase().replace('-','_')); } catch (IllegalArgumentException ex) { return ConsoleProtocol.UNRECOGNIZED; } @@ -10014,7 +10084,7 @@ public class Types return null; } try { - return EventOperation.valueOf(((String)object).toUpperCase().replace('-', '_')); + return EventOperation.valueOf(((String) object).toUpperCase().replace('-','_')); } catch (IllegalArgumentException ex) { return EventOperation.UNRECOGNIZED; } @@ -10025,7 +10095,7 @@ public class Types return null; } try { - return HostAllowedOperations.valueOf(((String)object).toUpperCase().replace('-', '_')); + return HostAllowedOperations.valueOf(((String) object).toUpperCase().replace('-','_')); } catch (IllegalArgumentException ex) { return HostAllowedOperations.UNRECOGNIZED; } @@ -10036,7 +10106,7 @@ public class Types return null; } try { - return IpConfigurationMode.valueOf(((String)object).toUpperCase().replace('-', '_')); + return IpConfigurationMode.valueOf(((String) object).toUpperCase().replace('-','_')); } catch (IllegalArgumentException ex) { return IpConfigurationMode.UNRECOGNIZED; } @@ -10047,7 +10117,7 @@ public class Types return null; } try { - return Ipv6ConfigurationMode.valueOf(((String)object).toUpperCase().replace('-', '_')); + return Ipv6ConfigurationMode.valueOf(((String) object).toUpperCase().replace('-','_')); } catch (IllegalArgumentException ex) { return Ipv6ConfigurationMode.UNRECOGNIZED; } @@ -10058,7 +10128,7 @@ public class Types return null; } try { - return NetworkDefaultLockingMode.valueOf(((String)object).toUpperCase().replace('-', '_')); + return NetworkDefaultLockingMode.valueOf(((String) object).toUpperCase().replace('-','_')); } catch (IllegalArgumentException ex) { return NetworkDefaultLockingMode.UNRECOGNIZED; } @@ -10069,7 +10139,7 @@ public class Types return null; } try { - return NetworkOperations.valueOf(((String)object).toUpperCase().replace('-', '_')); + return NetworkOperations.valueOf(((String) object).toUpperCase().replace('-','_')); } catch (IllegalArgumentException ex) { return NetworkOperations.UNRECOGNIZED; } @@ -10080,7 +10150,7 @@ public class Types return null; } try { - return OnBoot.valueOf(((String)object).toUpperCase().replace('-', '_')); + return OnBoot.valueOf(((String) object).toUpperCase().replace('-','_')); } catch (IllegalArgumentException ex) { return OnBoot.UNRECOGNIZED; } @@ -10091,7 +10161,7 @@ public class Types return null; } try { - return OnCrashBehaviour.valueOf(((String)object).toUpperCase().replace('-', '_')); + return OnCrashBehaviour.valueOf(((String) object).toUpperCase().replace('-','_')); } catch (IllegalArgumentException ex) { return OnCrashBehaviour.UNRECOGNIZED; } @@ -10102,7 +10172,7 @@ public class Types return null; } try { - return OnNormalExit.valueOf(((String)object).toUpperCase().replace('-', '_')); + return OnNormalExit.valueOf(((String) object).toUpperCase().replace('-','_')); } catch (IllegalArgumentException ex) { return OnNormalExit.UNRECOGNIZED; } @@ -10113,7 +10183,7 @@ public class Types return null; } try { - return PrimaryAddressType.valueOf(((String)object).toUpperCase().replace('-', '_')); + return PrimaryAddressType.valueOf(((String) object).toUpperCase().replace('-','_')); } catch (IllegalArgumentException ex) { return PrimaryAddressType.UNRECOGNIZED; } @@ -10124,7 +10194,7 @@ public class Types return null; } try { - return StorageOperations.valueOf(((String)object).toUpperCase().replace('-', '_')); + return StorageOperations.valueOf(((String) object).toUpperCase().replace('-','_')); } catch (IllegalArgumentException ex) { return StorageOperations.UNRECOGNIZED; } @@ -10135,7 +10205,7 @@ public class Types return null; } try { - return TaskAllowedOperations.valueOf(((String)object).toUpperCase().replace('-', '_')); + return TaskAllowedOperations.valueOf(((String) object).toUpperCase().replace('-','_')); } catch (IllegalArgumentException ex) { return TaskAllowedOperations.UNRECOGNIZED; } @@ -10146,7 +10216,7 @@ public class Types return null; } try { - return TaskStatusType.valueOf(((String)object).toUpperCase().replace('-', '_')); + return TaskStatusType.valueOf(((String) object).toUpperCase().replace('-','_')); } catch (IllegalArgumentException ex) { return TaskStatusType.UNRECOGNIZED; } @@ -10157,7 +10227,7 @@ public class Types return null; } try { - return VbdMode.valueOf(((String)object).toUpperCase().replace('-', '_')); + return VbdMode.valueOf(((String) object).toUpperCase().replace('-','_')); } catch (IllegalArgumentException ex) { return VbdMode.UNRECOGNIZED; } @@ -10168,7 +10238,7 @@ public class Types return null; } try { - return VbdOperations.valueOf(((String)object).toUpperCase().replace('-', '_')); + return VbdOperations.valueOf(((String) object).toUpperCase().replace('-','_')); } catch (IllegalArgumentException ex) { return VbdOperations.UNRECOGNIZED; } @@ -10179,7 +10249,7 @@ public class Types return null; } try { - return VbdType.valueOf(((String)object).toUpperCase().replace('-', '_')); + return VbdType.valueOf(((String) object).toUpperCase().replace('-','_')); } catch (IllegalArgumentException ex) { return VbdType.UNRECOGNIZED; } @@ -10190,7 +10260,7 @@ public class Types return null; } try { - return VdiOperations.valueOf(((String)object).toUpperCase().replace('-', '_')); + return VdiOperations.valueOf(((String) object).toUpperCase().replace('-','_')); } catch (IllegalArgumentException ex) { return VdiOperations.UNRECOGNIZED; } @@ -10201,7 +10271,7 @@ public class Types return null; } try { - return VdiType.valueOf(((String)object).toUpperCase().replace('-', '_')); + return VdiType.valueOf(((String) object).toUpperCase().replace('-','_')); } catch (IllegalArgumentException ex) { return VdiType.UNRECOGNIZED; } @@ -10212,7 +10282,7 @@ public class Types return null; } try { - return VifLockingMode.valueOf(((String)object).toUpperCase().replace('-', '_')); + return VifLockingMode.valueOf(((String) object).toUpperCase().replace('-','_')); } catch (IllegalArgumentException ex) { return VifLockingMode.UNRECOGNIZED; } @@ -10223,7 +10293,7 @@ public class Types return null; } try { - return VifOperations.valueOf(((String)object).toUpperCase().replace('-', '_')); + return VifOperations.valueOf(((String) object).toUpperCase().replace('-','_')); } catch (IllegalArgumentException ex) { return VifOperations.UNRECOGNIZED; } @@ -10234,7 +10304,7 @@ public class Types return null; } try { - return VmApplianceOperation.valueOf(((String)object).toUpperCase().replace('-', '_')); + return VmApplianceOperation.valueOf(((String) object).toUpperCase().replace('-','_')); } catch (IllegalArgumentException ex) { return VmApplianceOperation.UNRECOGNIZED; } @@ -10245,7 +10315,7 @@ public class Types return null; } try { - return VmOperations.valueOf(((String)object).toUpperCase().replace('-', '_')); + return VmOperations.valueOf(((String) object).toUpperCase().replace('-','_')); } catch (IllegalArgumentException ex) { return VmOperations.UNRECOGNIZED; } @@ -10256,7 +10326,7 @@ public class Types return null; } try { - return VmPowerState.valueOf(((String)object).toUpperCase().replace('-', '_')); + return VmPowerState.valueOf(((String) object).toUpperCase().replace('-','_')); } catch (IllegalArgumentException ex) { return VmPowerState.UNRECOGNIZED; } @@ -10267,7 +10337,7 @@ public class Types return null; } try { - return VmppArchiveFrequency.valueOf(((String)object).toUpperCase().replace('-', '_')); + return VmppArchiveFrequency.valueOf(((String) object).toUpperCase().replace('-','_')); } catch (IllegalArgumentException ex) { return VmppArchiveFrequency.UNRECOGNIZED; } @@ -10278,7 +10348,7 @@ public class Types return null; } try { - return VmppArchiveTargetType.valueOf(((String)object).toUpperCase().replace('-', '_')); + return VmppArchiveTargetType.valueOf(((String) object).toUpperCase().replace('-','_')); } catch (IllegalArgumentException ex) { return VmppArchiveTargetType.UNRECOGNIZED; } @@ -10289,7 +10359,7 @@ public class Types return null; } try { - return VmppBackupFrequency.valueOf(((String)object).toUpperCase().replace('-', '_')); + return VmppBackupFrequency.valueOf(((String) object).toUpperCase().replace('-','_')); } catch (IllegalArgumentException ex) { return VmppBackupFrequency.UNRECOGNIZED; } @@ -10300,7 +10370,7 @@ public class Types return null; } try { - return VmppBackupType.valueOf(((String)object).toUpperCase().replace('-', '_')); + return VmppBackupType.valueOf(((String) object).toUpperCase().replace('-','_')); } catch (IllegalArgumentException ex) { return VmppBackupType.UNRECOGNIZED; } @@ -10310,9 +10380,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[])object; + Object[] items = (Object[]) object; Set result = new LinkedHashSet(); - for (Object item : items) { + for(Object item: items) { String typed = toString(item); result.add(typed); } @@ -10323,9 +10393,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[])object; + Object[] items = (Object[]) object; Set result = new LinkedHashSet(); - for (Object item : items) { + for(Object item: items) { Types.AfterApplyGuidance typed = toAfterApplyGuidance(item); result.add(typed); } @@ -10336,9 +10406,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[])object; + Object[] items = (Object[]) object; Set result = new LinkedHashSet(); - for (Object item : items) { + for(Object item: items) { Types.HostAllowedOperations typed = toHostAllowedOperations(item); result.add(typed); } @@ -10349,9 +10419,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[])object; + Object[] items = (Object[]) object; Set result = new LinkedHashSet(); - for (Object item : items) { + for(Object item: items) { Types.NetworkOperations typed = toNetworkOperations(item); result.add(typed); } @@ -10362,9 +10432,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[])object; + Object[] items = (Object[]) object; Set result = new LinkedHashSet(); - for (Object item : items) { + for(Object item: items) { Types.StorageOperations typed = toStorageOperations(item); result.add(typed); } @@ -10375,9 +10445,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[])object; + Object[] items = (Object[]) object; Set result = new LinkedHashSet(); - for (Object item : items) { + for(Object item: items) { Types.TaskAllowedOperations typed = toTaskAllowedOperations(item); result.add(typed); } @@ -10388,9 +10458,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[])object; + Object[] items = (Object[]) object; Set result = new LinkedHashSet(); - for (Object item : items) { + for(Object item: items) { Types.VbdOperations typed = toVbdOperations(item); result.add(typed); } @@ -10401,9 +10471,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[])object; + Object[] items = (Object[]) object; Set result = new LinkedHashSet(); - for (Object item : items) { + for(Object item: items) { Types.VdiOperations typed = toVdiOperations(item); result.add(typed); } @@ -10414,9 +10484,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[])object; + Object[] items = (Object[]) object; Set result = new LinkedHashSet(); - for (Object item : items) { + for(Object item: items) { Types.VifOperations typed = toVifOperations(item); result.add(typed); } @@ -10427,9 +10497,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[])object; + Object[] items = (Object[]) object; Set result = new LinkedHashSet(); - for (Object item : items) { + for(Object item: items) { Types.VmApplianceOperation typed = toVmApplianceOperation(item); result.add(typed); } @@ -10440,9 +10510,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[])object; + Object[] items = (Object[]) object; Set result = new LinkedHashSet(); - for (Object item : items) { + for(Object item: items) { Types.VmOperations typed = toVmOperations(item); result.add(typed); } @@ -10453,9 +10523,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[])object; + Object[] items = (Object[]) object; Set result = new LinkedHashSet(); - for (Object item : items) { + for(Object item: items) { Bond typed = toBond(item); result.add(typed); } @@ -10466,9 +10536,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[])object; + Object[] items = (Object[]) object; Set result = new LinkedHashSet(); - for (Object item : items) { + for(Object item: items) { DRTask typed = toDRTask(item); result.add(typed); } @@ -10479,9 +10549,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[])object; + Object[] items = (Object[]) object; Set result = new LinkedHashSet(); - for (Object item : items) { + for(Object item: items) { GPUGroup typed = toGPUGroup(item); result.add(typed); } @@ -10492,9 +10562,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[])object; + Object[] items = (Object[]) object; Set result = new LinkedHashSet(); - for (Object item : items) { + for(Object item: items) { PBD typed = toPBD(item); result.add(typed); } @@ -10505,9 +10575,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[])object; + Object[] items = (Object[]) object; Set result = new LinkedHashSet(); - for (Object item : items) { + for(Object item: items) { PCI typed = toPCI(item); result.add(typed); } @@ -10518,9 +10588,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[])object; + Object[] items = (Object[]) object; Set result = new LinkedHashSet(); - for (Object item : items) { + for(Object item: items) { PGPU typed = toPGPU(item); result.add(typed); } @@ -10531,9 +10601,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[])object; + Object[] items = (Object[]) object; Set result = new LinkedHashSet(); - for (Object item : items) { + for(Object item: items) { PIF typed = toPIF(item); result.add(typed); } @@ -10544,9 +10614,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[])object; + Object[] items = (Object[]) object; Set result = new LinkedHashSet(); - for (Object item : items) { + for(Object item: items) { PIFMetrics typed = toPIFMetrics(item); result.add(typed); } @@ -10557,9 +10627,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[])object; + Object[] items = (Object[]) object; Set result = new LinkedHashSet(); - for (Object item : items) { + for(Object item: items) { SM typed = toSM(item); result.add(typed); } @@ -10570,9 +10640,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[])object; + Object[] items = (Object[]) object; Set result = new LinkedHashSet(); - for (Object item : items) { + for(Object item: items) { SR typed = toSR(item); result.add(typed); } @@ -10583,9 +10653,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[])object; + Object[] items = (Object[]) object; Set result = new LinkedHashSet(); - for (Object item : items) { + for(Object item: items) { VBD typed = toVBD(item); result.add(typed); } @@ -10596,9 +10666,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[])object; + Object[] items = (Object[]) object; Set result = new LinkedHashSet(); - for (Object item : items) { + for(Object item: items) { VBDMetrics typed = toVBDMetrics(item); result.add(typed); } @@ -10609,9 +10679,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[])object; + Object[] items = (Object[]) object; Set result = new LinkedHashSet(); - for (Object item : items) { + for(Object item: items) { VDI typed = toVDI(item); result.add(typed); } @@ -10622,22 +10692,35 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[])object; + Object[] items = (Object[]) object; Set result = new LinkedHashSet(); - for (Object item : items) { + for(Object item: items) { VGPU typed = toVGPU(item); result.add(typed); } return result; } + public static Set toSetOfVGPUType(Object object) { + if (object == null) { + return null; + } + Object[] items = (Object[]) object; + Set result = new LinkedHashSet(); + for(Object item: items) { + VGPUType typed = toVGPUType(item); + result.add(typed); + } + return result; + } + public static Set toSetOfVIF(Object object) { if (object == null) { return null; } - Object[] items = (Object[])object; + Object[] items = (Object[]) object; Set result = new LinkedHashSet(); - for (Object item : items) { + for(Object item: items) { VIF typed = toVIF(item); result.add(typed); } @@ -10648,9 +10731,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[])object; + Object[] items = (Object[]) object; Set result = new LinkedHashSet(); - for (Object item : items) { + for(Object item: items) { VIFMetrics typed = toVIFMetrics(item); result.add(typed); } @@ -10661,9 +10744,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[])object; + Object[] items = (Object[]) object; Set result = new LinkedHashSet(); - for (Object item : items) { + for(Object item: items) { VLAN typed = toVLAN(item); result.add(typed); } @@ -10674,9 +10757,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[])object; + Object[] items = (Object[]) object; Set result = new LinkedHashSet(); - for (Object item : items) { + for(Object item: items) { VM typed = toVM(item); result.add(typed); } @@ -10687,9 +10770,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[])object; + Object[] items = (Object[]) object; Set result = new LinkedHashSet(); - for (Object item : items) { + for(Object item: items) { VMPP typed = toVMPP(item); result.add(typed); } @@ -10700,9 +10783,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[])object; + Object[] items = (Object[]) object; Set result = new LinkedHashSet(); - for (Object item : items) { + for(Object item: items) { VMAppliance typed = toVMAppliance(item); result.add(typed); } @@ -10713,9 +10796,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[])object; + Object[] items = (Object[]) object; Set result = new LinkedHashSet(); - for (Object item : items) { + for(Object item: items) { VMGuestMetrics typed = toVMGuestMetrics(item); result.add(typed); } @@ -10726,9 +10809,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[])object; + Object[] items = (Object[]) object; Set result = new LinkedHashSet(); - for (Object item : items) { + for(Object item: items) { VMMetrics typed = toVMMetrics(item); result.add(typed); } @@ -10739,9 +10822,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[])object; + Object[] items = (Object[]) object; Set result = new LinkedHashSet(); - for (Object item : items) { + for(Object item: items) { VTPM typed = toVTPM(item); result.add(typed); } @@ -10752,9 +10835,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[])object; + Object[] items = (Object[]) object; Set result = new LinkedHashSet(); - for (Object item : items) { + for(Object item: items) { Blob typed = toBlob(item); result.add(typed); } @@ -10765,9 +10848,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[])object; + Object[] items = (Object[]) object; Set result = new LinkedHashSet(); - for (Object item : items) { + for(Object item: items) { Console typed = toConsole(item); result.add(typed); } @@ -10778,9 +10861,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[])object; + Object[] items = (Object[]) object; Set result = new LinkedHashSet(); - for (Object item : items) { + for(Object item: items) { Crashdump typed = toCrashdump(item); result.add(typed); } @@ -10791,9 +10874,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[])object; + Object[] items = (Object[]) object; Set result = new LinkedHashSet(); - for (Object item : items) { + for(Object item: items) { Host typed = toHost(item); result.add(typed); } @@ -10804,9 +10887,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[])object; + Object[] items = (Object[]) object; Set result = new LinkedHashSet(); - for (Object item : items) { + for(Object item: items) { HostCpu typed = toHostCpu(item); result.add(typed); } @@ -10817,9 +10900,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[])object; + Object[] items = (Object[]) object; Set result = new LinkedHashSet(); - for (Object item : items) { + for(Object item: items) { HostCrashdump typed = toHostCrashdump(item); result.add(typed); } @@ -10830,9 +10913,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[])object; + Object[] items = (Object[]) object; Set result = new LinkedHashSet(); - for (Object item : items) { + for(Object item: items) { HostMetrics typed = toHostMetrics(item); result.add(typed); } @@ -10843,9 +10926,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[])object; + Object[] items = (Object[]) object; Set result = new LinkedHashSet(); - for (Object item : items) { + for(Object item: items) { HostPatch typed = toHostPatch(item); result.add(typed); } @@ -10856,9 +10939,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[])object; + Object[] items = (Object[]) object; Set result = new LinkedHashSet(); - for (Object item : items) { + for(Object item: items) { Message typed = toMessage(item); result.add(typed); } @@ -10869,9 +10952,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[])object; + Object[] items = (Object[]) object; Set result = new LinkedHashSet(); - for (Object item : items) { + for(Object item: items) { Network typed = toNetwork(item); result.add(typed); } @@ -10882,9 +10965,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[])object; + Object[] items = (Object[]) object; Set result = new LinkedHashSet(); - for (Object item : items) { + for(Object item: items) { Pool typed = toPool(item); result.add(typed); } @@ -10895,9 +10978,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[])object; + Object[] items = (Object[]) object; Set result = new LinkedHashSet(); - for (Object item : items) { + for(Object item: items) { PoolPatch typed = toPoolPatch(item); result.add(typed); } @@ -10908,9 +10991,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[])object; + Object[] items = (Object[]) object; Set result = new LinkedHashSet(); - for (Object item : items) { + for(Object item: items) { Role typed = toRole(item); result.add(typed); } @@ -10921,9 +11004,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[])object; + Object[] items = (Object[]) object; Set result = new LinkedHashSet(); - for (Object item : items) { + for(Object item: items) { Secret typed = toSecret(item); result.add(typed); } @@ -10934,9 +11017,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[])object; + Object[] items = (Object[]) object; Set result = new LinkedHashSet(); - for (Object item : items) { + for(Object item: items) { Subject typed = toSubject(item); result.add(typed); } @@ -10947,9 +11030,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[])object; + Object[] items = (Object[]) object; Set result = new LinkedHashSet(); - for (Object item : items) { + for(Object item: items) { Task typed = toTask(item); result.add(typed); } @@ -10960,9 +11043,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[])object; + Object[] items = (Object[]) object; Set result = new LinkedHashSet(); - for (Object item : items) { + for(Object item: items) { Tunnel typed = toTunnel(item); result.add(typed); } @@ -10973,9 +11056,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[])object; + Object[] items = (Object[]) object; Set result = new LinkedHashSet(); - for (Object item : items) { + for(Object item: items) { DataSource.Record typed = toDataSourceRecord(item); result.add(typed); } @@ -10986,9 +11069,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[])object; + Object[] items = (Object[]) object; Set result = new LinkedHashSet(); - for (Object item : items) { + for(Object item: items) { Event.Record typed = toEventRecord(item); result.add(typed); } @@ -10999,10 +11082,10 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; - Map result = new HashMap(); + Map map = (Map) object; + Map result = new HashMap(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { String key = toString(entry.getKey()); String value = toString(entry.getValue()); result.put(key, value); @@ -11010,14 +11093,29 @@ public class Types return result; } + public static Map toMapOfStringLong(Object object) { + if (object == null) { + return null; + } + Map map = (Map) object; + Map result = new HashMap(); + Set entries = map.entrySet(); + for(Map.Entry entry: entries) { + String key = toString(entry.getKey()); + Long value = toLong(entry.getValue()); + result.put(key, value); + } + return result; + } + public static Map toMapOfStringHostAllowedOperations(Object object) { if (object == null) { return null; } - Map map = (Map)object; - Map result = new HashMap(); + Map map = (Map) object; + Map result = new HashMap(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { String key = toString(entry.getKey()); Types.HostAllowedOperations value = toHostAllowedOperations(entry.getValue()); result.put(key, value); @@ -11029,10 +11127,10 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; - Map result = new HashMap(); + Map map = (Map) object; + Map result = new HashMap(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { String key = toString(entry.getKey()); Types.NetworkOperations value = toNetworkOperations(entry.getValue()); result.put(key, value); @@ -11044,10 +11142,10 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; - Map result = new HashMap(); + Map map = (Map) object; + Map result = new HashMap(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { String key = toString(entry.getKey()); Types.StorageOperations value = toStorageOperations(entry.getValue()); result.put(key, value); @@ -11059,10 +11157,10 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; - Map result = new HashMap(); + Map map = (Map) object; + Map result = new HashMap(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { String key = toString(entry.getKey()); Types.TaskAllowedOperations value = toTaskAllowedOperations(entry.getValue()); result.put(key, value); @@ -11074,10 +11172,10 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; - Map result = new HashMap(); + Map map = (Map) object; + Map result = new HashMap(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { String key = toString(entry.getKey()); Types.VbdOperations value = toVbdOperations(entry.getValue()); result.put(key, value); @@ -11089,10 +11187,10 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; - Map result = new HashMap(); + Map map = (Map) object; + Map result = new HashMap(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { String key = toString(entry.getKey()); Types.VdiOperations value = toVdiOperations(entry.getValue()); result.put(key, value); @@ -11104,10 +11202,10 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; - Map result = new HashMap(); + Map map = (Map) object; + Map result = new HashMap(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { String key = toString(entry.getKey()); Types.VifOperations value = toVifOperations(entry.getValue()); result.put(key, value); @@ -11119,10 +11217,10 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; - Map result = new HashMap(); + Map map = (Map) object; + Map result = new HashMap(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { String key = toString(entry.getKey()); Types.VmApplianceOperation value = toVmApplianceOperation(entry.getValue()); result.put(key, value); @@ -11134,10 +11232,10 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; - Map result = new HashMap(); + Map map = (Map) object; + Map result = new HashMap(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { String key = toString(entry.getKey()); Types.VmOperations value = toVmOperations(entry.getValue()); result.put(key, value); @@ -11149,10 +11247,10 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; - Map result = new HashMap(); + Map map = (Map) object; + Map result = new HashMap(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { String key = toString(entry.getKey()); Blob value = toBlob(entry.getValue()); result.put(key, value); @@ -11164,10 +11262,10 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; - Map result = new HashMap(); + Map map = (Map) object; + Map result = new HashMap(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { Long key = toLong(entry.getKey()); Long value = toLong(entry.getValue()); result.put(key, value); @@ -11179,10 +11277,10 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; - Map result = new HashMap(); + Map map = (Map) object; + Map result = new HashMap(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { Long key = toLong(entry.getKey()); Double value = toDouble(entry.getValue()); result.put(key, value); @@ -11194,10 +11292,10 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; - Map> result = new HashMap>(); + Map map = (Map) object; + Map> result = new HashMap>(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { Long key = toLong(entry.getKey()); Set value = toSetOfString(entry.getValue()); result.put(key, value); @@ -11209,10 +11307,10 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; - Map result = new HashMap(); + Map map = (Map) object; + Map result = new HashMap(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { Types.VmOperations key = toVmOperations(entry.getKey()); String value = toString(entry.getValue()); result.put(key, value); @@ -11224,10 +11322,10 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; - Map result = new HashMap(); + Map map = (Map) object; + Map result = new HashMap(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { Bond key = toBond(entry.getKey()); Bond.Record value = toBondRecord(entry.getValue()); result.put(key, value); @@ -11239,10 +11337,10 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; - Map result = new HashMap(); + Map map = (Map) object; + Map result = new HashMap(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { DRTask key = toDRTask(entry.getKey()); DRTask.Record value = toDRTaskRecord(entry.getValue()); result.put(key, value); @@ -11254,10 +11352,10 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; - Map result = new HashMap(); + Map map = (Map) object; + Map result = new HashMap(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { GPUGroup key = toGPUGroup(entry.getKey()); GPUGroup.Record value = toGPUGroupRecord(entry.getValue()); result.put(key, value); @@ -11269,10 +11367,10 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; - Map result = new HashMap(); + Map map = (Map) object; + Map result = new HashMap(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { PBD key = toPBD(entry.getKey()); PBD.Record value = toPBDRecord(entry.getValue()); result.put(key, value); @@ -11284,10 +11382,10 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; - Map result = new HashMap(); + Map map = (Map) object; + Map result = new HashMap(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { PCI key = toPCI(entry.getKey()); PCI.Record value = toPCIRecord(entry.getValue()); result.put(key, value); @@ -11299,10 +11397,10 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; - Map result = new HashMap(); + Map map = (Map) object; + Map result = new HashMap(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { PGPU key = toPGPU(entry.getKey()); PGPU.Record value = toPGPURecord(entry.getValue()); result.put(key, value); @@ -11314,10 +11412,10 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; - Map result = new HashMap(); + Map map = (Map) object; + Map result = new HashMap(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { PIF key = toPIF(entry.getKey()); PIF.Record value = toPIFRecord(entry.getValue()); result.put(key, value); @@ -11329,10 +11427,10 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; - Map result = new HashMap(); + Map map = (Map) object; + Map result = new HashMap(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { PIFMetrics key = toPIFMetrics(entry.getKey()); PIFMetrics.Record value = toPIFMetricsRecord(entry.getValue()); result.put(key, value); @@ -11344,10 +11442,10 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; - Map result = new HashMap(); + Map map = (Map) object; + Map result = new HashMap(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { SM key = toSM(entry.getKey()); SM.Record value = toSMRecord(entry.getValue()); result.put(key, value); @@ -11359,10 +11457,10 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; - Map result = new HashMap(); + Map map = (Map) object; + Map result = new HashMap(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { SR key = toSR(entry.getKey()); SR.Record value = toSRRecord(entry.getValue()); result.put(key, value); @@ -11374,10 +11472,10 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; - Map result = new HashMap(); + Map map = (Map) object; + Map result = new HashMap(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { VBD key = toVBD(entry.getKey()); VBD.Record value = toVBDRecord(entry.getValue()); result.put(key, value); @@ -11389,10 +11487,10 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; - Map result = new HashMap(); + Map map = (Map) object; + Map result = new HashMap(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { VBDMetrics key = toVBDMetrics(entry.getKey()); VBDMetrics.Record value = toVBDMetricsRecord(entry.getValue()); result.put(key, value); @@ -11404,10 +11502,10 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; - Map result = new HashMap(); + Map map = (Map) object; + Map result = new HashMap(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { VDI key = toVDI(entry.getKey()); SR value = toSR(entry.getValue()); result.put(key, value); @@ -11419,10 +11517,10 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; - Map result = new HashMap(); + Map map = (Map) object; + Map result = new HashMap(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { VDI key = toVDI(entry.getKey()); VDI.Record value = toVDIRecord(entry.getValue()); result.put(key, value); @@ -11434,10 +11532,10 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; - Map result = new HashMap(); + Map map = (Map) object; + Map result = new HashMap(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { VGPU key = toVGPU(entry.getKey()); VGPU.Record value = toVGPURecord(entry.getValue()); result.put(key, value); @@ -11445,14 +11543,44 @@ public class Types return result; } + public static Map toMapOfVGPUTypeLong(Object object) { + if (object == null) { + return null; + } + Map map = (Map) object; + Map result = new HashMap(); + Set entries = map.entrySet(); + for(Map.Entry entry: entries) { + VGPUType key = toVGPUType(entry.getKey()); + Long value = toLong(entry.getValue()); + result.put(key, value); + } + return result; + } + + public static Map toMapOfVGPUTypeVGPUTypeRecord(Object object) { + if (object == null) { + return null; + } + Map map = (Map) object; + Map result = new HashMap(); + Set entries = map.entrySet(); + for(Map.Entry entry: entries) { + VGPUType key = toVGPUType(entry.getKey()); + VGPUType.Record value = toVGPUTypeRecord(entry.getValue()); + result.put(key, value); + } + return result; + } + public static Map toMapOfVIFNetwork(Object object) { if (object == null) { return null; } - Map map = (Map)object; - Map result = new HashMap(); + Map map = (Map) object; + Map result = new HashMap(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { VIF key = toVIF(entry.getKey()); Network value = toNetwork(entry.getValue()); result.put(key, value); @@ -11464,10 +11592,10 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; - Map result = new HashMap(); + Map map = (Map) object; + Map result = new HashMap(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { VIF key = toVIF(entry.getKey()); VIF.Record value = toVIFRecord(entry.getValue()); result.put(key, value); @@ -11479,10 +11607,10 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; - Map result = new HashMap(); + Map map = (Map) object; + Map result = new HashMap(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { VIFMetrics key = toVIFMetrics(entry.getKey()); VIFMetrics.Record value = toVIFMetricsRecord(entry.getValue()); result.put(key, value); @@ -11494,10 +11622,10 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; - Map result = new HashMap(); + Map map = (Map) object; + Map result = new HashMap(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { VLAN key = toVLAN(entry.getKey()); VLAN.Record value = toVLANRecord(entry.getValue()); result.put(key, value); @@ -11509,10 +11637,10 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; - Map result = new HashMap(); + Map map = (Map) object; + Map result = new HashMap(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { VM key = toVM(entry.getKey()); String value = toString(entry.getValue()); result.put(key, value); @@ -11524,10 +11652,10 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; - Map> result = new HashMap>(); + Map map = (Map) object; + Map> result = new HashMap>(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { VM key = toVM(entry.getKey()); Set value = toSetOfString(entry.getValue()); result.put(key, value); @@ -11539,10 +11667,10 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; - Map> result = new HashMap>(); + Map map = (Map) object; + Map> result = new HashMap>(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { VM key = toVM(entry.getKey()); Map value = toMapOfStringString(entry.getValue()); result.put(key, value); @@ -11554,10 +11682,10 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; - Map result = new HashMap(); + Map map = (Map) object; + Map result = new HashMap(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { VM key = toVM(entry.getKey()); VM.Record value = toVMRecord(entry.getValue()); result.put(key, value); @@ -11569,10 +11697,10 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; - Map result = new HashMap(); + Map map = (Map) object; + Map result = new HashMap(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { VMPP key = toVMPP(entry.getKey()); VMPP.Record value = toVMPPRecord(entry.getValue()); result.put(key, value); @@ -11584,10 +11712,10 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; - Map result = new HashMap(); + Map map = (Map) object; + Map result = new HashMap(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { VMAppliance key = toVMAppliance(entry.getKey()); VMAppliance.Record value = toVMApplianceRecord(entry.getValue()); result.put(key, value); @@ -11599,10 +11727,10 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; - Map result = new HashMap(); + Map map = (Map) object; + Map result = new HashMap(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { VMGuestMetrics key = toVMGuestMetrics(entry.getKey()); VMGuestMetrics.Record value = toVMGuestMetricsRecord(entry.getValue()); result.put(key, value); @@ -11614,10 +11742,10 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; - Map result = new HashMap(); + Map map = (Map) object; + Map result = new HashMap(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { VMMetrics key = toVMMetrics(entry.getKey()); VMMetrics.Record value = toVMMetricsRecord(entry.getValue()); result.put(key, value); @@ -11629,10 +11757,10 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; - Map result = new HashMap(); + Map map = (Map) object; + Map result = new HashMap(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { Blob key = toBlob(entry.getKey()); Blob.Record value = toBlobRecord(entry.getValue()); result.put(key, value); @@ -11644,10 +11772,10 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; - Map result = new HashMap(); + Map map = (Map) object; + Map result = new HashMap(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { Console key = toConsole(entry.getKey()); Console.Record value = toConsoleRecord(entry.getValue()); result.put(key, value); @@ -11659,10 +11787,10 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; - Map result = new HashMap(); + Map map = (Map) object; + Map result = new HashMap(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { Crashdump key = toCrashdump(entry.getKey()); Crashdump.Record value = toCrashdumpRecord(entry.getValue()); result.put(key, value); @@ -11674,10 +11802,10 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; - Map> result = new HashMap>(); + Map map = (Map) object; + Map> result = new HashMap>(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { Host key = toHost(entry.getKey()); Set value = toSetOfString(entry.getValue()); result.put(key, value); @@ -11689,10 +11817,10 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; - Map result = new HashMap(); + Map map = (Map) object; + Map result = new HashMap(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { Host key = toHost(entry.getKey()); Host.Record value = toHostRecord(entry.getValue()); result.put(key, value); @@ -11704,10 +11832,10 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; - Map result = new HashMap(); + Map map = (Map) object; + Map result = new HashMap(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { HostCpu key = toHostCpu(entry.getKey()); HostCpu.Record value = toHostCpuRecord(entry.getValue()); result.put(key, value); @@ -11719,10 +11847,10 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; - Map result = new HashMap(); + Map map = (Map) object; + Map result = new HashMap(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { HostCrashdump key = toHostCrashdump(entry.getKey()); HostCrashdump.Record value = toHostCrashdumpRecord(entry.getValue()); result.put(key, value); @@ -11734,10 +11862,10 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; - Map result = new HashMap(); + Map map = (Map) object; + Map result = new HashMap(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { HostMetrics key = toHostMetrics(entry.getKey()); HostMetrics.Record value = toHostMetricsRecord(entry.getValue()); result.put(key, value); @@ -11749,10 +11877,10 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; - Map result = new HashMap(); + Map map = (Map) object; + Map result = new HashMap(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { HostPatch key = toHostPatch(entry.getKey()); HostPatch.Record value = toHostPatchRecord(entry.getValue()); result.put(key, value); @@ -11764,10 +11892,10 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; - Map result = new HashMap(); + Map map = (Map) object; + Map result = new HashMap(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { Message key = toMessage(entry.getKey()); Message.Record value = toMessageRecord(entry.getValue()); result.put(key, value); @@ -11779,10 +11907,10 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; - Map result = new HashMap(); + Map map = (Map) object; + Map result = new HashMap(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { Network key = toNetwork(entry.getKey()); Network.Record value = toNetworkRecord(entry.getValue()); result.put(key, value); @@ -11794,10 +11922,10 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; - Map result = new HashMap(); + Map map = (Map) object; + Map result = new HashMap(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { Pool key = toPool(entry.getKey()); Pool.Record value = toPoolRecord(entry.getValue()); result.put(key, value); @@ -11809,10 +11937,10 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; - Map result = new HashMap(); + Map map = (Map) object; + Map result = new HashMap(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { PoolPatch key = toPoolPatch(entry.getKey()); PoolPatch.Record value = toPoolPatchRecord(entry.getValue()); result.put(key, value); @@ -11824,10 +11952,10 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; - Map result = new HashMap(); + Map map = (Map) object; + Map result = new HashMap(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { Role key = toRole(entry.getKey()); Role.Record value = toRoleRecord(entry.getValue()); result.put(key, value); @@ -11839,10 +11967,10 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; - Map result = new HashMap(); + Map map = (Map) object; + Map result = new HashMap(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { Secret key = toSecret(entry.getKey()); Secret.Record value = toSecretRecord(entry.getValue()); result.put(key, value); @@ -11854,10 +11982,10 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; - Map result = new HashMap(); + Map map = (Map) object; + Map result = new HashMap(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { Subject key = toSubject(entry.getKey()); Subject.Record value = toSubjectRecord(entry.getValue()); result.put(key, value); @@ -11869,10 +11997,10 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; - Map result = new HashMap(); + Map map = (Map) object; + Map result = new HashMap(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { Task key = toTask(entry.getKey()); Task.Record value = toTaskRecord(entry.getValue()); result.put(key, value); @@ -11884,10 +12012,10 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; - Map result = new HashMap(); + Map map = (Map) object; + Map result = new HashMap(); Set entries = map.entrySet(); - for (Map.Entry entry : entries) { + for(Map.Entry entry: entries) { Tunnel key = toTunnel(entry.getKey()); Tunnel.Record value = toTunnelRecord(entry.getValue()); result.put(key, value); @@ -11899,310 +12027,317 @@ public class Types if (object == null) { return null; } - return new Bond((String)object); + return new Bond((String) object); } public static DRTask toDRTask(Object object) { if (object == null) { return null; } - return new DRTask((String)object); + return new DRTask((String) object); } public static GPUGroup toGPUGroup(Object object) { if (object == null) { return null; } - return new GPUGroup((String)object); + return new GPUGroup((String) object); } public static PBD toPBD(Object object) { if (object == null) { return null; } - return new PBD((String)object); + return new PBD((String) object); } public static PCI toPCI(Object object) { if (object == null) { return null; } - return new PCI((String)object); + return new PCI((String) object); } public static PGPU toPGPU(Object object) { if (object == null) { return null; } - return new PGPU((String)object); + return new PGPU((String) object); } public static PIF toPIF(Object object) { if (object == null) { return null; } - return new PIF((String)object); + return new PIF((String) object); } public static PIFMetrics toPIFMetrics(Object object) { if (object == null) { return null; } - return new PIFMetrics((String)object); + return new PIFMetrics((String) object); } public static SM toSM(Object object) { if (object == null) { return null; } - return new SM((String)object); + return new SM((String) object); } public static SR toSR(Object object) { if (object == null) { return null; } - return new SR((String)object); + return new SR((String) object); } public static VBD toVBD(Object object) { if (object == null) { return null; } - return new VBD((String)object); + return new VBD((String) object); } public static VBDMetrics toVBDMetrics(Object object) { if (object == null) { return null; } - return new VBDMetrics((String)object); + return new VBDMetrics((String) object); } public static VDI toVDI(Object object) { if (object == null) { return null; } - return new VDI((String)object); + return new VDI((String) object); } public static VGPU toVGPU(Object object) { if (object == null) { return null; } - return new VGPU((String)object); + return new VGPU((String) object); + } + + public static VGPUType toVGPUType(Object object) { + if (object == null) { + return null; + } + return new VGPUType((String) object); } public static VIF toVIF(Object object) { if (object == null) { return null; } - return new VIF((String)object); + return new VIF((String) object); } public static VIFMetrics toVIFMetrics(Object object) { if (object == null) { return null; } - return new VIFMetrics((String)object); + return new VIFMetrics((String) object); } public static VLAN toVLAN(Object object) { if (object == null) { return null; } - return new VLAN((String)object); + return new VLAN((String) object); } public static VM toVM(Object object) { if (object == null) { return null; } - return new VM((String)object); + return new VM((String) object); } public static VMPP toVMPP(Object object) { if (object == null) { return null; } - return new VMPP((String)object); + return new VMPP((String) object); } public static VMAppliance toVMAppliance(Object object) { if (object == null) { return null; } - return new VMAppliance((String)object); + return new VMAppliance((String) object); } public static VMGuestMetrics toVMGuestMetrics(Object object) { if (object == null) { return null; } - return new VMGuestMetrics((String)object); + return new VMGuestMetrics((String) object); } public static VMMetrics toVMMetrics(Object object) { if (object == null) { return null; } - return new VMMetrics((String)object); + return new VMMetrics((String) object); } public static VTPM toVTPM(Object object) { if (object == null) { return null; } - return new VTPM((String)object); + return new VTPM((String) object); } public static Blob toBlob(Object object) { if (object == null) { return null; } - return new Blob((String)object); + return new Blob((String) object); } public static Console toConsole(Object object) { if (object == null) { return null; } - return new Console((String)object); + return new Console((String) object); } public static Crashdump toCrashdump(Object object) { if (object == null) { return null; } - return new Crashdump((String)object); + return new Crashdump((String) object); } public static Host toHost(Object object) { if (object == null) { return null; } - return new Host((String)object); + return new Host((String) object); } public static HostCpu toHostCpu(Object object) { if (object == null) { return null; } - return new HostCpu((String)object); + return new HostCpu((String) object); } public static HostCrashdump toHostCrashdump(Object object) { if (object == null) { return null; } - return new HostCrashdump((String)object); + return new HostCrashdump((String) object); } public static HostMetrics toHostMetrics(Object object) { if (object == null) { return null; } - return new HostMetrics((String)object); + return new HostMetrics((String) object); } public static HostPatch toHostPatch(Object object) { if (object == null) { return null; } - return new HostPatch((String)object); + return new HostPatch((String) object); } public static Message toMessage(Object object) { if (object == null) { return null; } - return new Message((String)object); + return new Message((String) object); } public static Network toNetwork(Object object) { if (object == null) { return null; } - return new Network((String)object); + return new Network((String) object); } public static Pool toPool(Object object) { if (object == null) { return null; } - return new Pool((String)object); + return new Pool((String) object); } public static PoolPatch toPoolPatch(Object object) { if (object == null) { return null; } - return new PoolPatch((String)object); + return new PoolPatch((String) object); } public static Role toRole(Object object) { if (object == null) { return null; } - return new Role((String)object); + return new Role((String) object); } public static Secret toSecret(Object object) { if (object == null) { return null; } - return new Secret((String)object); + return new Secret((String) object); } public static Session toSession(Object object) { if (object == null) { return null; } - return new Session((String)object); + return new Session((String) object); } public static Subject toSubject(Object object) { if (object == null) { return null; } - return new Subject((String)object); + return new Subject((String) object); } public static Task toTask(Object object) { if (object == null) { return null; } - return new Task((String)object); + return new Task((String) object); } public static Tunnel toTunnel(Object object) { if (object == null) { return null; } - return new Tunnel((String)object); + return new Tunnel((String) object); } public static User toUser(Object object) { if (object == null) { return null; } - return new User((String)object); + return new User((String) object); } public static Bond.Record toBondRecord(Object object) { if (object == null) { return null; } - Map map = (Map)object; + Map map = (Map) object; Bond.Record record = new Bond.Record(); - record.uuid = toString(map.get("uuid")); - record.master = toPIF(map.get("master")); - record.slaves = toSetOfPIF(map.get("slaves")); - record.otherConfig = toMapOfStringString(map.get("other_config")); - record.primarySlave = toPIF(map.get("primary_slave")); - record.mode = toBondMode(map.get("mode")); - record.properties = toMapOfStringString(map.get("properties")); - record.linksUp = toLong(map.get("links_up")); + record.uuid = toString(map.get("uuid")); + record.master = toPIF(map.get("master")); + record.slaves = toSetOfPIF(map.get("slaves")); + record.otherConfig = toMapOfStringString(map.get("other_config")); + record.primarySlave = toPIF(map.get("primary_slave")); + record.mode = toBondMode(map.get("mode")); + record.properties = toMapOfStringString(map.get("properties")); + record.linksUp = toLong(map.get("links_up")); return record; } @@ -12210,10 +12345,10 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; + Map map = (Map) object; DRTask.Record record = new DRTask.Record(); - record.uuid = toString(map.get("uuid")); - record.introducedSRs = toSetOfSR(map.get("introduced_SRs")); + record.uuid = toString(map.get("uuid")); + record.introducedSRs = toSetOfSR(map.get("introduced_SRs")); return record; } @@ -12221,15 +12356,18 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; + Map map = (Map) object; GPUGroup.Record record = new GPUGroup.Record(); - record.uuid = toString(map.get("uuid")); - record.nameLabel = toString(map.get("name_label")); - record.nameDescription = toString(map.get("name_description")); - record.PGPUs = toSetOfPGPU(map.get("PGPUs")); - record.VGPUs = toSetOfVGPU(map.get("VGPUs")); - record.GPUTypes = toSetOfString(map.get("GPU_types")); - record.otherConfig = toMapOfStringString(map.get("other_config")); + record.uuid = toString(map.get("uuid")); + record.nameLabel = toString(map.get("name_label")); + record.nameDescription = toString(map.get("name_description")); + record.PGPUs = toSetOfPGPU(map.get("PGPUs")); + record.VGPUs = toSetOfVGPU(map.get("VGPUs")); + record.GPUTypes = toSetOfString(map.get("GPU_types")); + record.otherConfig = toMapOfStringString(map.get("other_config")); + record.allocationAlgorithm = toAllocationAlgorithm(map.get("allocation_algorithm")); + record.supportedVGPUTypes = toSetOfVGPUType(map.get("supported_VGPU_types")); + record.enabledVGPUTypes = toSetOfVGPUType(map.get("enabled_VGPU_types")); return record; } @@ -12237,14 +12375,14 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; + Map map = (Map) object; PBD.Record record = new PBD.Record(); - record.uuid = toString(map.get("uuid")); - record.host = toHost(map.get("host")); - record.SR = toSR(map.get("SR")); - record.deviceConfig = toMapOfStringString(map.get("device_config")); - record.currentlyAttached = toBoolean(map.get("currently_attached")); - record.otherConfig = toMapOfStringString(map.get("other_config")); + record.uuid = toString(map.get("uuid")); + record.host = toHost(map.get("host")); + record.SR = toSR(map.get("SR")); + record.deviceConfig = toMapOfStringString(map.get("device_config")); + record.currentlyAttached = toBoolean(map.get("currently_attached")); + record.otherConfig = toMapOfStringString(map.get("other_config")); return record; } @@ -12252,16 +12390,16 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; + Map map = (Map) object; PCI.Record record = new PCI.Record(); - record.uuid = toString(map.get("uuid")); - record.clazzName = toString(map.get("class_name")); - record.vendorName = toString(map.get("vendor_name")); - record.deviceName = toString(map.get("device_name")); - record.host = toHost(map.get("host")); - record.pciId = toString(map.get("pci_id")); - record.dependencies = toSetOfPCI(map.get("dependencies")); - record.otherConfig = toMapOfStringString(map.get("other_config")); + record.uuid = toString(map.get("uuid")); + record.clazzName = toString(map.get("class_name")); + record.vendorName = toString(map.get("vendor_name")); + record.deviceName = toString(map.get("device_name")); + record.host = toHost(map.get("host")); + record.pciId = toString(map.get("pci_id")); + record.dependencies = toSetOfPCI(map.get("dependencies")); + record.otherConfig = toMapOfStringString(map.get("other_config")); return record; } @@ -12269,13 +12407,17 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; + Map map = (Map) object; PGPU.Record record = new PGPU.Record(); - record.uuid = toString(map.get("uuid")); - record.PCI = toPCI(map.get("PCI")); - record.GPUGroup = toGPUGroup(map.get("GPU_group")); - record.host = toHost(map.get("host")); - record.otherConfig = toMapOfStringString(map.get("other_config")); + record.uuid = toString(map.get("uuid")); + record.PCI = toPCI(map.get("PCI")); + record.GPUGroup = toGPUGroup(map.get("GPU_group")); + record.host = toHost(map.get("host")); + record.otherConfig = toMapOfStringString(map.get("other_config")); + record.supportedVGPUTypes = toSetOfVGPUType(map.get("supported_VGPU_types")); + record.enabledVGPUTypes = toSetOfVGPUType(map.get("enabled_VGPU_types")); + record.residentVGPUs = toSetOfVGPU(map.get("resident_VGPUs")); + record.supportedVGPUMaxCapacities = toMapOfVGPUTypeLong(map.get("supported_VGPU_max_capacities")); return record; } @@ -12283,36 +12425,37 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; + Map map = (Map) object; PIF.Record record = new PIF.Record(); - record.uuid = toString(map.get("uuid")); - record.device = toString(map.get("device")); - record.network = toNetwork(map.get("network")); - record.host = toHost(map.get("host")); - record.MAC = toString(map.get("MAC")); - record.MTU = toLong(map.get("MTU")); - record.VLAN = toLong(map.get("VLAN")); - record.metrics = toPIFMetrics(map.get("metrics")); - record.physical = toBoolean(map.get("physical")); - record.currentlyAttached = toBoolean(map.get("currently_attached")); - record.ipConfigurationMode = toIpConfigurationMode(map.get("ip_configuration_mode")); - record.IP = toString(map.get("IP")); - record.netmask = toString(map.get("netmask")); - record.gateway = toString(map.get("gateway")); - record.DNS = toString(map.get("DNS")); - record.bondSlaveOf = toBond(map.get("bond_slave_of")); - record.bondMasterOf = toSetOfBond(map.get("bond_master_of")); - record.VLANMasterOf = toVLAN(map.get("VLAN_master_of")); - record.VLANSlaveOf = toSetOfVLAN(map.get("VLAN_slave_of")); - record.management = toBoolean(map.get("management")); - record.otherConfig = toMapOfStringString(map.get("other_config")); - record.disallowUnplug = toBoolean(map.get("disallow_unplug")); - record.tunnelAccessPIFOf = toSetOfTunnel(map.get("tunnel_access_PIF_of")); - record.tunnelTransportPIFOf = toSetOfTunnel(map.get("tunnel_transport_PIF_of")); - record.ipv6ConfigurationMode = toIpv6ConfigurationMode(map.get("ipv6_configuration_mode")); - record.IPv6 = toSetOfString(map.get("IPv6")); - record.ipv6Gateway = toString(map.get("ipv6_gateway")); - record.primaryAddressType = toPrimaryAddressType(map.get("primary_address_type")); + record.uuid = toString(map.get("uuid")); + record.device = toString(map.get("device")); + record.network = toNetwork(map.get("network")); + record.host = toHost(map.get("host")); + record.MAC = toString(map.get("MAC")); + record.MTU = toLong(map.get("MTU")); + record.VLAN = toLong(map.get("VLAN")); + record.metrics = toPIFMetrics(map.get("metrics")); + record.physical = toBoolean(map.get("physical")); + record.currentlyAttached = toBoolean(map.get("currently_attached")); + record.ipConfigurationMode = toIpConfigurationMode(map.get("ip_configuration_mode")); + record.IP = toString(map.get("IP")); + record.netmask = toString(map.get("netmask")); + record.gateway = toString(map.get("gateway")); + record.DNS = toString(map.get("DNS")); + record.bondSlaveOf = toBond(map.get("bond_slave_of")); + record.bondMasterOf = toSetOfBond(map.get("bond_master_of")); + record.VLANMasterOf = toVLAN(map.get("VLAN_master_of")); + record.VLANSlaveOf = toSetOfVLAN(map.get("VLAN_slave_of")); + record.management = toBoolean(map.get("management")); + record.otherConfig = toMapOfStringString(map.get("other_config")); + record.disallowUnplug = toBoolean(map.get("disallow_unplug")); + record.tunnelAccessPIFOf = toSetOfTunnel(map.get("tunnel_access_PIF_of")); + record.tunnelTransportPIFOf = toSetOfTunnel(map.get("tunnel_transport_PIF_of")); + record.ipv6ConfigurationMode = toIpv6ConfigurationMode(map.get("ipv6_configuration_mode")); + record.IPv6 = toSetOfString(map.get("IPv6")); + record.ipv6Gateway = toString(map.get("ipv6_gateway")); + record.primaryAddressType = toPrimaryAddressType(map.get("primary_address_type")); + record.managed = toBoolean(map.get("managed")); return record; } @@ -12320,21 +12463,21 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; + Map map = (Map) object; PIFMetrics.Record record = new PIFMetrics.Record(); - record.uuid = toString(map.get("uuid")); - record.ioReadKbs = toDouble(map.get("io_read_kbs")); - record.ioWriteKbs = toDouble(map.get("io_write_kbs")); - record.carrier = toBoolean(map.get("carrier")); - record.vendorId = toString(map.get("vendor_id")); - record.vendorName = toString(map.get("vendor_name")); - record.deviceId = toString(map.get("device_id")); - record.deviceName = toString(map.get("device_name")); - record.speed = toLong(map.get("speed")); - record.duplex = toBoolean(map.get("duplex")); - record.pciBusPath = toString(map.get("pci_bus_path")); - record.lastUpdated = toDate(map.get("last_updated")); - record.otherConfig = toMapOfStringString(map.get("other_config")); + record.uuid = toString(map.get("uuid")); + record.ioReadKbs = toDouble(map.get("io_read_kbs")); + record.ioWriteKbs = toDouble(map.get("io_write_kbs")); + record.carrier = toBoolean(map.get("carrier")); + record.vendorId = toString(map.get("vendor_id")); + record.vendorName = toString(map.get("vendor_name")); + record.deviceId = toString(map.get("device_id")); + record.deviceName = toString(map.get("device_name")); + record.speed = toLong(map.get("speed")); + record.duplex = toBoolean(map.get("duplex")); + record.pciBusPath = toString(map.get("pci_bus_path")); + record.lastUpdated = toDate(map.get("last_updated")); + record.otherConfig = toMapOfStringString(map.get("other_config")); return record; } @@ -12342,20 +12485,21 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; + Map map = (Map) object; SM.Record record = new SM.Record(); - record.uuid = toString(map.get("uuid")); - record.nameLabel = toString(map.get("name_label")); - record.nameDescription = toString(map.get("name_description")); - record.type = toString(map.get("type")); - record.vendor = toString(map.get("vendor")); - record.copyright = toString(map.get("copyright")); - record.version = toString(map.get("version")); - record.requiredApiVersion = toString(map.get("required_api_version")); - record.configuration = toMapOfStringString(map.get("configuration")); - record.capabilities = toSetOfString(map.get("capabilities")); - record.otherConfig = toMapOfStringString(map.get("other_config")); - record.driverFilename = toString(map.get("driver_filename")); + record.uuid = toString(map.get("uuid")); + record.nameLabel = toString(map.get("name_label")); + record.nameDescription = toString(map.get("name_description")); + record.type = toString(map.get("type")); + record.vendor = toString(map.get("vendor")); + record.copyright = toString(map.get("copyright")); + record.version = toString(map.get("version")); + record.requiredApiVersion = toString(map.get("required_api_version")); + record.configuration = toMapOfStringString(map.get("configuration")); + record.capabilities = toSetOfString(map.get("capabilities")); + record.features = toMapOfStringLong(map.get("features")); + record.otherConfig = toMapOfStringString(map.get("other_config")); + record.driverFilename = toString(map.get("driver_filename")); return record; } @@ -12363,27 +12507,27 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; + Map map = (Map) object; SR.Record record = new SR.Record(); - record.uuid = toString(map.get("uuid")); - record.nameLabel = toString(map.get("name_label")); - record.nameDescription = toString(map.get("name_description")); - record.allowedOperations = toSetOfStorageOperations(map.get("allowed_operations")); - record.currentOperations = toMapOfStringStorageOperations(map.get("current_operations")); - record.VDIs = toSetOfVDI(map.get("VDIs")); - record.PBDs = toSetOfPBD(map.get("PBDs")); - record.virtualAllocation = toLong(map.get("virtual_allocation")); - record.physicalUtilisation = toLong(map.get("physical_utilisation")); - record.physicalSize = toLong(map.get("physical_size")); - record.type = toString(map.get("type")); - record.contentType = toString(map.get("content_type")); - record.shared = toBoolean(map.get("shared")); - record.otherConfig = toMapOfStringString(map.get("other_config")); - record.tags = toSetOfString(map.get("tags")); - record.smConfig = toMapOfStringString(map.get("sm_config")); - record.blobs = toMapOfStringBlob(map.get("blobs")); - record.localCacheEnabled = toBoolean(map.get("local_cache_enabled")); - record.introducedBy = toDRTask(map.get("introduced_by")); + record.uuid = toString(map.get("uuid")); + record.nameLabel = toString(map.get("name_label")); + record.nameDescription = toString(map.get("name_description")); + record.allowedOperations = toSetOfStorageOperations(map.get("allowed_operations")); + record.currentOperations = toMapOfStringStorageOperations(map.get("current_operations")); + record.VDIs = toSetOfVDI(map.get("VDIs")); + record.PBDs = toSetOfPBD(map.get("PBDs")); + record.virtualAllocation = toLong(map.get("virtual_allocation")); + record.physicalUtilisation = toLong(map.get("physical_utilisation")); + record.physicalSize = toLong(map.get("physical_size")); + record.type = toString(map.get("type")); + record.contentType = toString(map.get("content_type")); + record.shared = toBoolean(map.get("shared")); + record.otherConfig = toMapOfStringString(map.get("other_config")); + record.tags = toSetOfString(map.get("tags")); + record.smConfig = toMapOfStringString(map.get("sm_config")); + record.blobs = toMapOfStringBlob(map.get("blobs")); + record.localCacheEnabled = toBoolean(map.get("local_cache_enabled")); + record.introducedBy = toDRTask(map.get("introduced_by")); return record; } @@ -12391,30 +12535,30 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; + Map map = (Map) object; VBD.Record record = new VBD.Record(); - record.uuid = toString(map.get("uuid")); - record.allowedOperations = toSetOfVbdOperations(map.get("allowed_operations")); - record.currentOperations = toMapOfStringVbdOperations(map.get("current_operations")); - record.VM = toVM(map.get("VM")); - record.VDI = toVDI(map.get("VDI")); - record.device = toString(map.get("device")); - record.userdevice = toString(map.get("userdevice")); - record.bootable = toBoolean(map.get("bootable")); - record.mode = toVbdMode(map.get("mode")); - record.type = toVbdType(map.get("type")); - record.unpluggable = toBoolean(map.get("unpluggable")); - record.storageLock = toBoolean(map.get("storage_lock")); - record.empty = toBoolean(map.get("empty")); - record.otherConfig = toMapOfStringString(map.get("other_config")); - record.currentlyAttached = toBoolean(map.get("currently_attached")); - record.statusCode = toLong(map.get("status_code")); - record.statusDetail = toString(map.get("status_detail")); - record.runtimeProperties = toMapOfStringString(map.get("runtime_properties")); - record.qosAlgorithmType = toString(map.get("qos_algorithm_type")); - record.qosAlgorithmParams = toMapOfStringString(map.get("qos_algorithm_params")); - record.qosSupportedAlgorithms = toSetOfString(map.get("qos_supported_algorithms")); - record.metrics = toVBDMetrics(map.get("metrics")); + record.uuid = toString(map.get("uuid")); + record.allowedOperations = toSetOfVbdOperations(map.get("allowed_operations")); + record.currentOperations = toMapOfStringVbdOperations(map.get("current_operations")); + record.VM = toVM(map.get("VM")); + record.VDI = toVDI(map.get("VDI")); + record.device = toString(map.get("device")); + record.userdevice = toString(map.get("userdevice")); + record.bootable = toBoolean(map.get("bootable")); + record.mode = toVbdMode(map.get("mode")); + record.type = toVbdType(map.get("type")); + record.unpluggable = toBoolean(map.get("unpluggable")); + record.storageLock = toBoolean(map.get("storage_lock")); + record.empty = toBoolean(map.get("empty")); + record.otherConfig = toMapOfStringString(map.get("other_config")); + record.currentlyAttached = toBoolean(map.get("currently_attached")); + record.statusCode = toLong(map.get("status_code")); + record.statusDetail = toString(map.get("status_detail")); + record.runtimeProperties = toMapOfStringString(map.get("runtime_properties")); + record.qosAlgorithmType = toString(map.get("qos_algorithm_type")); + record.qosAlgorithmParams = toMapOfStringString(map.get("qos_algorithm_params")); + record.qosSupportedAlgorithms = toSetOfString(map.get("qos_supported_algorithms")); + record.metrics = toVBDMetrics(map.get("metrics")); return record; } @@ -12422,13 +12566,13 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; + Map map = (Map) object; VBDMetrics.Record record = new VBDMetrics.Record(); - record.uuid = toString(map.get("uuid")); - record.ioReadKbs = toDouble(map.get("io_read_kbs")); - record.ioWriteKbs = toDouble(map.get("io_write_kbs")); - record.lastUpdated = toDate(map.get("last_updated")); - record.otherConfig = toMapOfStringString(map.get("other_config")); + record.uuid = toString(map.get("uuid")); + record.ioReadKbs = toDouble(map.get("io_read_kbs")); + record.ioWriteKbs = toDouble(map.get("io_write_kbs")); + record.lastUpdated = toDate(map.get("last_updated")); + record.otherConfig = toMapOfStringString(map.get("other_config")); return record; } @@ -12436,38 +12580,38 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; + Map map = (Map) object; VDI.Record record = new VDI.Record(); - record.uuid = toString(map.get("uuid")); - record.nameLabel = toString(map.get("name_label")); - record.nameDescription = toString(map.get("name_description")); - record.allowedOperations = toSetOfVdiOperations(map.get("allowed_operations")); - record.currentOperations = toMapOfStringVdiOperations(map.get("current_operations")); - record.SR = toSR(map.get("SR")); - record.VBDs = toSetOfVBD(map.get("VBDs")); - record.crashDumps = toSetOfCrashdump(map.get("crash_dumps")); - record.virtualSize = toLong(map.get("virtual_size")); - record.physicalUtilisation = toLong(map.get("physical_utilisation")); - record.type = toVdiType(map.get("type")); - record.sharable = toBoolean(map.get("sharable")); - record.readOnly = toBoolean(map.get("read_only")); - record.otherConfig = toMapOfStringString(map.get("other_config")); - record.storageLock = toBoolean(map.get("storage_lock")); - record.location = toString(map.get("location")); - record.managed = toBoolean(map.get("managed")); - record.missing = toBoolean(map.get("missing")); - record.parent = toVDI(map.get("parent")); - record.xenstoreData = toMapOfStringString(map.get("xenstore_data")); - record.smConfig = toMapOfStringString(map.get("sm_config")); - record.isASnapshot = toBoolean(map.get("is_a_snapshot")); - record.snapshotOf = toVDI(map.get("snapshot_of")); - record.snapshots = toSetOfVDI(map.get("snapshots")); - record.snapshotTime = toDate(map.get("snapshot_time")); - record.tags = toSetOfString(map.get("tags")); - record.allowCaching = toBoolean(map.get("allow_caching")); - record.onBoot = toOnBoot(map.get("on_boot")); - record.metadataOfPool = toPool(map.get("metadata_of_pool")); - record.metadataLatest = toBoolean(map.get("metadata_latest")); + record.uuid = toString(map.get("uuid")); + record.nameLabel = toString(map.get("name_label")); + record.nameDescription = toString(map.get("name_description")); + record.allowedOperations = toSetOfVdiOperations(map.get("allowed_operations")); + record.currentOperations = toMapOfStringVdiOperations(map.get("current_operations")); + record.SR = toSR(map.get("SR")); + record.VBDs = toSetOfVBD(map.get("VBDs")); + record.crashDumps = toSetOfCrashdump(map.get("crash_dumps")); + record.virtualSize = toLong(map.get("virtual_size")); + record.physicalUtilisation = toLong(map.get("physical_utilisation")); + record.type = toVdiType(map.get("type")); + record.sharable = toBoolean(map.get("sharable")); + record.readOnly = toBoolean(map.get("read_only")); + record.otherConfig = toMapOfStringString(map.get("other_config")); + record.storageLock = toBoolean(map.get("storage_lock")); + record.location = toString(map.get("location")); + record.managed = toBoolean(map.get("managed")); + record.missing = toBoolean(map.get("missing")); + record.parent = toVDI(map.get("parent")); + record.xenstoreData = toMapOfStringString(map.get("xenstore_data")); + record.smConfig = toMapOfStringString(map.get("sm_config")); + record.isASnapshot = toBoolean(map.get("is_a_snapshot")); + record.snapshotOf = toVDI(map.get("snapshot_of")); + record.snapshots = toSetOfVDI(map.get("snapshots")); + record.snapshotTime = toDate(map.get("snapshot_time")); + record.tags = toSetOfString(map.get("tags")); + record.allowCaching = toBoolean(map.get("allow_caching")); + record.onBoot = toOnBoot(map.get("on_boot")); + record.metadataOfPool = toPool(map.get("metadata_of_pool")); + record.metadataLatest = toBoolean(map.get("metadata_latest")); return record; } @@ -12475,14 +12619,37 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; + Map map = (Map) object; VGPU.Record record = new VGPU.Record(); - record.uuid = toString(map.get("uuid")); - record.VM = toVM(map.get("VM")); - record.GPUGroup = toGPUGroup(map.get("GPU_group")); - record.device = toString(map.get("device")); - record.currentlyAttached = toBoolean(map.get("currently_attached")); - record.otherConfig = toMapOfStringString(map.get("other_config")); + record.uuid = toString(map.get("uuid")); + record.VM = toVM(map.get("VM")); + record.GPUGroup = toGPUGroup(map.get("GPU_group")); + record.device = toString(map.get("device")); + record.currentlyAttached = toBoolean(map.get("currently_attached")); + record.otherConfig = toMapOfStringString(map.get("other_config")); + record.type = toVGPUType(map.get("type")); + record.residentOn = toPGPU(map.get("resident_on")); + return record; + } + + public static VGPUType.Record toVGPUTypeRecord(Object object) { + if (object == null) { + return null; + } + Map map = (Map) object; + VGPUType.Record record = new VGPUType.Record(); + record.uuid = toString(map.get("uuid")); + record.vendorName = toString(map.get("vendor_name")); + record.modelName = toString(map.get("model_name")); + record.framebufferSize = toLong(map.get("framebuffer_size")); + record.maxHeads = toLong(map.get("max_heads")); + record.maxResolutionX = toLong(map.get("max_resolution_x")); + record.maxResolutionY = toLong(map.get("max_resolution_y")); + record.supportedOnPGPUs = toSetOfPGPU(map.get("supported_on_PGPUs")); + record.enabledOnPGPUs = toSetOfPGPU(map.get("enabled_on_PGPUs")); + record.VGPUs = toSetOfVGPU(map.get("VGPUs")); + record.supportedOnGPUGroups = toSetOfGPUGroup(map.get("supported_on_GPU_groups")); + record.enabledOnGPUGroups = toSetOfGPUGroup(map.get("enabled_on_GPU_groups")); return record; } @@ -12490,29 +12657,29 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; + Map map = (Map) object; VIF.Record record = new VIF.Record(); - record.uuid = toString(map.get("uuid")); - record.allowedOperations = toSetOfVifOperations(map.get("allowed_operations")); - record.currentOperations = toMapOfStringVifOperations(map.get("current_operations")); - record.device = toString(map.get("device")); - record.network = toNetwork(map.get("network")); - record.VM = toVM(map.get("VM")); - record.MAC = toString(map.get("MAC")); - record.MTU = toLong(map.get("MTU")); - record.otherConfig = toMapOfStringString(map.get("other_config")); - record.currentlyAttached = toBoolean(map.get("currently_attached")); - record.statusCode = toLong(map.get("status_code")); - record.statusDetail = toString(map.get("status_detail")); - record.runtimeProperties = toMapOfStringString(map.get("runtime_properties")); - record.qosAlgorithmType = toString(map.get("qos_algorithm_type")); - record.qosAlgorithmParams = toMapOfStringString(map.get("qos_algorithm_params")); - record.qosSupportedAlgorithms = toSetOfString(map.get("qos_supported_algorithms")); - record.metrics = toVIFMetrics(map.get("metrics")); - record.MACAutogenerated = toBoolean(map.get("MAC_autogenerated")); - record.lockingMode = toVifLockingMode(map.get("locking_mode")); - record.ipv4Allowed = toSetOfString(map.get("ipv4_allowed")); - record.ipv6Allowed = toSetOfString(map.get("ipv6_allowed")); + record.uuid = toString(map.get("uuid")); + record.allowedOperations = toSetOfVifOperations(map.get("allowed_operations")); + record.currentOperations = toMapOfStringVifOperations(map.get("current_operations")); + record.device = toString(map.get("device")); + record.network = toNetwork(map.get("network")); + record.VM = toVM(map.get("VM")); + record.MAC = toString(map.get("MAC")); + record.MTU = toLong(map.get("MTU")); + record.otherConfig = toMapOfStringString(map.get("other_config")); + record.currentlyAttached = toBoolean(map.get("currently_attached")); + record.statusCode = toLong(map.get("status_code")); + record.statusDetail = toString(map.get("status_detail")); + record.runtimeProperties = toMapOfStringString(map.get("runtime_properties")); + record.qosAlgorithmType = toString(map.get("qos_algorithm_type")); + record.qosAlgorithmParams = toMapOfStringString(map.get("qos_algorithm_params")); + record.qosSupportedAlgorithms = toSetOfString(map.get("qos_supported_algorithms")); + record.metrics = toVIFMetrics(map.get("metrics")); + record.MACAutogenerated = toBoolean(map.get("MAC_autogenerated")); + record.lockingMode = toVifLockingMode(map.get("locking_mode")); + record.ipv4Allowed = toSetOfString(map.get("ipv4_allowed")); + record.ipv6Allowed = toSetOfString(map.get("ipv6_allowed")); return record; } @@ -12520,13 +12687,13 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; + Map map = (Map) object; VIFMetrics.Record record = new VIFMetrics.Record(); - record.uuid = toString(map.get("uuid")); - record.ioReadKbs = toDouble(map.get("io_read_kbs")); - record.ioWriteKbs = toDouble(map.get("io_write_kbs")); - record.lastUpdated = toDate(map.get("last_updated")); - record.otherConfig = toMapOfStringString(map.get("other_config")); + record.uuid = toString(map.get("uuid")); + record.ioReadKbs = toDouble(map.get("io_read_kbs")); + record.ioWriteKbs = toDouble(map.get("io_write_kbs")); + record.lastUpdated = toDate(map.get("last_updated")); + record.otherConfig = toMapOfStringString(map.get("other_config")); return record; } @@ -12534,13 +12701,13 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; + Map map = (Map) object; VLAN.Record record = new VLAN.Record(); - record.uuid = toString(map.get("uuid")); - record.taggedPIF = toPIF(map.get("tagged_PIF")); - record.untaggedPIF = toPIF(map.get("untagged_PIF")); - record.tag = toLong(map.get("tag")); - record.otherConfig = toMapOfStringString(map.get("other_config")); + record.uuid = toString(map.get("uuid")); + record.taggedPIF = toPIF(map.get("tagged_PIF")); + record.untaggedPIF = toPIF(map.get("untagged_PIF")); + record.tag = toLong(map.get("tag")); + record.otherConfig = toMapOfStringString(map.get("other_config")); return record; } @@ -12548,82 +12715,83 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; + Map map = (Map) object; VM.Record record = new VM.Record(); - record.uuid = toString(map.get("uuid")); - record.allowedOperations = toSetOfVmOperations(map.get("allowed_operations")); - record.currentOperations = toMapOfStringVmOperations(map.get("current_operations")); - record.powerState = toVmPowerState(map.get("power_state")); - record.nameLabel = toString(map.get("name_label")); - record.nameDescription = toString(map.get("name_description")); - record.userVersion = toLong(map.get("user_version")); - record.isATemplate = toBoolean(map.get("is_a_template")); - record.suspendVDI = toVDI(map.get("suspend_VDI")); - record.residentOn = toHost(map.get("resident_on")); - record.affinity = toHost(map.get("affinity")); - record.memoryOverhead = toLong(map.get("memory_overhead")); - record.memoryTarget = toLong(map.get("memory_target")); - record.memoryStaticMax = toLong(map.get("memory_static_max")); - record.memoryDynamicMax = toLong(map.get("memory_dynamic_max")); - record.memoryDynamicMin = toLong(map.get("memory_dynamic_min")); - record.memoryStaticMin = toLong(map.get("memory_static_min")); - record.VCPUsParams = toMapOfStringString(map.get("VCPUs_params")); - record.VCPUsMax = toLong(map.get("VCPUs_max")); - record.VCPUsAtStartup = toLong(map.get("VCPUs_at_startup")); - record.actionsAfterShutdown = toOnNormalExit(map.get("actions_after_shutdown")); - record.actionsAfterReboot = toOnNormalExit(map.get("actions_after_reboot")); - record.actionsAfterCrash = toOnCrashBehaviour(map.get("actions_after_crash")); - record.consoles = toSetOfConsole(map.get("consoles")); - record.VIFs = toSetOfVIF(map.get("VIFs")); - record.VBDs = toSetOfVBD(map.get("VBDs")); - record.crashDumps = toSetOfCrashdump(map.get("crash_dumps")); - record.VTPMs = toSetOfVTPM(map.get("VTPMs")); - record.PVBootloader = toString(map.get("PV_bootloader")); - record.PVKernel = toString(map.get("PV_kernel")); - record.PVRamdisk = toString(map.get("PV_ramdisk")); - record.PVArgs = toString(map.get("PV_args")); - record.PVBootloaderArgs = toString(map.get("PV_bootloader_args")); - record.PVLegacyArgs = toString(map.get("PV_legacy_args")); - record.HVMBootPolicy = toString(map.get("HVM_boot_policy")); - record.HVMBootParams = toMapOfStringString(map.get("HVM_boot_params")); - record.HVMShadowMultiplier = toDouble(map.get("HVM_shadow_multiplier")); - record.platform = toMapOfStringString(map.get("platform")); - record.PCIBus = toString(map.get("PCI_bus")); - record.otherConfig = toMapOfStringString(map.get("other_config")); - record.domid = toLong(map.get("domid")); - record.domarch = toString(map.get("domarch")); - record.lastBootCPUFlags = toMapOfStringString(map.get("last_boot_CPU_flags")); - record.isControlDomain = toBoolean(map.get("is_control_domain")); - record.metrics = toVMMetrics(map.get("metrics")); - record.guestMetrics = toVMGuestMetrics(map.get("guest_metrics")); - record.lastBootedRecord = toString(map.get("last_booted_record")); - record.recommendations = toString(map.get("recommendations")); - record.xenstoreData = toMapOfStringString(map.get("xenstore_data")); - record.haAlwaysRun = toBoolean(map.get("ha_always_run")); - record.haRestartPriority = toString(map.get("ha_restart_priority")); - record.isASnapshot = toBoolean(map.get("is_a_snapshot")); - record.snapshotOf = toVM(map.get("snapshot_of")); - record.snapshots = toSetOfVM(map.get("snapshots")); - record.snapshotTime = toDate(map.get("snapshot_time")); - record.transportableSnapshotId = toString(map.get("transportable_snapshot_id")); - record.blobs = toMapOfStringBlob(map.get("blobs")); - record.tags = toSetOfString(map.get("tags")); - record.blockedOperations = toMapOfVmOperationsString(map.get("blocked_operations")); - record.snapshotInfo = toMapOfStringString(map.get("snapshot_info")); - record.snapshotMetadata = toString(map.get("snapshot_metadata")); - record.parent = toVM(map.get("parent")); - record.children = toSetOfVM(map.get("children")); - record.biosStrings = toMapOfStringString(map.get("bios_strings")); - record.protectionPolicy = toVMPP(map.get("protection_policy")); - record.isSnapshotFromVmpp = toBoolean(map.get("is_snapshot_from_vmpp")); - record.appliance = toVMAppliance(map.get("appliance")); - record.startDelay = toLong(map.get("start_delay")); - record.shutdownDelay = toLong(map.get("shutdown_delay")); - record.order = toLong(map.get("order")); - record.VGPUs = toSetOfVGPU(map.get("VGPUs")); - record.attachedPCIs = toSetOfPCI(map.get("attached_PCIs")); - record.suspendSR = toSR(map.get("suspend_SR")); - record.version = toLong(map.get("version")); + record.uuid = toString(map.get("uuid")); + record.allowedOperations = toSetOfVmOperations(map.get("allowed_operations")); + record.currentOperations = toMapOfStringVmOperations(map.get("current_operations")); + record.powerState = toVmPowerState(map.get("power_state")); + record.nameLabel = toString(map.get("name_label")); + record.nameDescription = toString(map.get("name_description")); + record.userVersion = toLong(map.get("user_version")); + record.isATemplate = toBoolean(map.get("is_a_template")); + record.suspendVDI = toVDI(map.get("suspend_VDI")); + record.residentOn = toHost(map.get("resident_on")); + record.affinity = toHost(map.get("affinity")); + record.memoryOverhead = toLong(map.get("memory_overhead")); + record.memoryTarget = toLong(map.get("memory_target")); + record.memoryStaticMax = toLong(map.get("memory_static_max")); + record.memoryDynamicMax = toLong(map.get("memory_dynamic_max")); + record.memoryDynamicMin = toLong(map.get("memory_dynamic_min")); + record.memoryStaticMin = toLong(map.get("memory_static_min")); + record.VCPUsParams = toMapOfStringString(map.get("VCPUs_params")); + record.VCPUsMax = toLong(map.get("VCPUs_max")); + record.VCPUsAtStartup = toLong(map.get("VCPUs_at_startup")); + record.actionsAfterShutdown = toOnNormalExit(map.get("actions_after_shutdown")); + record.actionsAfterReboot = toOnNormalExit(map.get("actions_after_reboot")); + record.actionsAfterCrash = toOnCrashBehaviour(map.get("actions_after_crash")); + record.consoles = toSetOfConsole(map.get("consoles")); + record.VIFs = toSetOfVIF(map.get("VIFs")); + record.VBDs = toSetOfVBD(map.get("VBDs")); + record.crashDumps = toSetOfCrashdump(map.get("crash_dumps")); + record.VTPMs = toSetOfVTPM(map.get("VTPMs")); + record.PVBootloader = toString(map.get("PV_bootloader")); + record.PVKernel = toString(map.get("PV_kernel")); + record.PVRamdisk = toString(map.get("PV_ramdisk")); + record.PVArgs = toString(map.get("PV_args")); + record.PVBootloaderArgs = toString(map.get("PV_bootloader_args")); + record.PVLegacyArgs = toString(map.get("PV_legacy_args")); + record.HVMBootPolicy = toString(map.get("HVM_boot_policy")); + record.HVMBootParams = toMapOfStringString(map.get("HVM_boot_params")); + record.HVMShadowMultiplier = toDouble(map.get("HVM_shadow_multiplier")); + record.platform = toMapOfStringString(map.get("platform")); + record.PCIBus = toString(map.get("PCI_bus")); + record.otherConfig = toMapOfStringString(map.get("other_config")); + record.domid = toLong(map.get("domid")); + record.domarch = toString(map.get("domarch")); + record.lastBootCPUFlags = toMapOfStringString(map.get("last_boot_CPU_flags")); + record.isControlDomain = toBoolean(map.get("is_control_domain")); + record.metrics = toVMMetrics(map.get("metrics")); + record.guestMetrics = toVMGuestMetrics(map.get("guest_metrics")); + record.lastBootedRecord = toString(map.get("last_booted_record")); + record.recommendations = toString(map.get("recommendations")); + record.xenstoreData = toMapOfStringString(map.get("xenstore_data")); + record.haAlwaysRun = toBoolean(map.get("ha_always_run")); + record.haRestartPriority = toString(map.get("ha_restart_priority")); + record.isASnapshot = toBoolean(map.get("is_a_snapshot")); + record.snapshotOf = toVM(map.get("snapshot_of")); + record.snapshots = toSetOfVM(map.get("snapshots")); + record.snapshotTime = toDate(map.get("snapshot_time")); + record.transportableSnapshotId = toString(map.get("transportable_snapshot_id")); + record.blobs = toMapOfStringBlob(map.get("blobs")); + record.tags = toSetOfString(map.get("tags")); + record.blockedOperations = toMapOfVmOperationsString(map.get("blocked_operations")); + record.snapshotInfo = toMapOfStringString(map.get("snapshot_info")); + record.snapshotMetadata = toString(map.get("snapshot_metadata")); + record.parent = toVM(map.get("parent")); + record.children = toSetOfVM(map.get("children")); + record.biosStrings = toMapOfStringString(map.get("bios_strings")); + record.protectionPolicy = toVMPP(map.get("protection_policy")); + record.isSnapshotFromVmpp = toBoolean(map.get("is_snapshot_from_vmpp")); + record.appliance = toVMAppliance(map.get("appliance")); + record.startDelay = toLong(map.get("start_delay")); + record.shutdownDelay = toLong(map.get("shutdown_delay")); + record.order = toLong(map.get("order")); + record.VGPUs = toSetOfVGPU(map.get("VGPUs")); + record.attachedPCIs = toSetOfPCI(map.get("attached_PCIs")); + record.suspendSR = toSR(map.get("suspend_SR")); + record.version = toLong(map.get("version")); + record.generationId = toString(map.get("generation_id")); return record; } @@ -12631,28 +12799,28 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; + Map map = (Map) object; VMPP.Record record = new VMPP.Record(); - record.uuid = toString(map.get("uuid")); - record.nameLabel = toString(map.get("name_label")); - record.nameDescription = toString(map.get("name_description")); - record.isPolicyEnabled = toBoolean(map.get("is_policy_enabled")); - record.backupType = toVmppBackupType(map.get("backup_type")); - record.backupRetentionValue = toLong(map.get("backup_retention_value")); - record.backupFrequency = toVmppBackupFrequency(map.get("backup_frequency")); - record.backupSchedule = toMapOfStringString(map.get("backup_schedule")); - record.isBackupRunning = toBoolean(map.get("is_backup_running")); - record.backupLastRunTime = toDate(map.get("backup_last_run_time")); - record.archiveTargetType = toVmppArchiveTargetType(map.get("archive_target_type")); - record.archiveTargetConfig = toMapOfStringString(map.get("archive_target_config")); - record.archiveFrequency = toVmppArchiveFrequency(map.get("archive_frequency")); - record.archiveSchedule = toMapOfStringString(map.get("archive_schedule")); - record.isArchiveRunning = toBoolean(map.get("is_archive_running")); - record.archiveLastRunTime = toDate(map.get("archive_last_run_time")); - record.VMs = toSetOfVM(map.get("VMs")); - record.isAlarmEnabled = toBoolean(map.get("is_alarm_enabled")); - record.alarmConfig = toMapOfStringString(map.get("alarm_config")); - record.recentAlerts = toSetOfString(map.get("recent_alerts")); + record.uuid = toString(map.get("uuid")); + record.nameLabel = toString(map.get("name_label")); + record.nameDescription = toString(map.get("name_description")); + record.isPolicyEnabled = toBoolean(map.get("is_policy_enabled")); + record.backupType = toVmppBackupType(map.get("backup_type")); + record.backupRetentionValue = toLong(map.get("backup_retention_value")); + record.backupFrequency = toVmppBackupFrequency(map.get("backup_frequency")); + record.backupSchedule = toMapOfStringString(map.get("backup_schedule")); + record.isBackupRunning = toBoolean(map.get("is_backup_running")); + record.backupLastRunTime = toDate(map.get("backup_last_run_time")); + record.archiveTargetType = toVmppArchiveTargetType(map.get("archive_target_type")); + record.archiveTargetConfig = toMapOfStringString(map.get("archive_target_config")); + record.archiveFrequency = toVmppArchiveFrequency(map.get("archive_frequency")); + record.archiveSchedule = toMapOfStringString(map.get("archive_schedule")); + record.isArchiveRunning = toBoolean(map.get("is_archive_running")); + record.archiveLastRunTime = toDate(map.get("archive_last_run_time")); + record.VMs = toSetOfVM(map.get("VMs")); + record.isAlarmEnabled = toBoolean(map.get("is_alarm_enabled")); + record.alarmConfig = toMapOfStringString(map.get("alarm_config")); + record.recentAlerts = toSetOfString(map.get("recent_alerts")); return record; } @@ -12660,14 +12828,14 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; + Map map = (Map) object; VMAppliance.Record record = new VMAppliance.Record(); - record.uuid = toString(map.get("uuid")); - record.nameLabel = toString(map.get("name_label")); - record.nameDescription = toString(map.get("name_description")); - record.allowedOperations = toSetOfVmApplianceOperation(map.get("allowed_operations")); - record.currentOperations = toMapOfStringVmApplianceOperation(map.get("current_operations")); - record.VMs = toSetOfVM(map.get("VMs")); + record.uuid = toString(map.get("uuid")); + record.nameLabel = toString(map.get("name_label")); + record.nameDescription = toString(map.get("name_description")); + record.allowedOperations = toSetOfVmApplianceOperation(map.get("allowed_operations")); + record.currentOperations = toMapOfStringVmApplianceOperation(map.get("current_operations")); + record.VMs = toSetOfVM(map.get("VMs")); return record; } @@ -12675,19 +12843,19 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; + Map map = (Map) object; VMGuestMetrics.Record record = new VMGuestMetrics.Record(); - record.uuid = toString(map.get("uuid")); - record.osVersion = toMapOfStringString(map.get("os_version")); - record.PVDriversVersion = toMapOfStringString(map.get("PV_drivers_version")); - record.PVDriversUpToDate = toBoolean(map.get("PV_drivers_up_to_date")); - record.memory = toMapOfStringString(map.get("memory")); - record.disks = toMapOfStringString(map.get("disks")); - record.networks = toMapOfStringString(map.get("networks")); - record.other = toMapOfStringString(map.get("other")); - record.lastUpdated = toDate(map.get("last_updated")); - record.otherConfig = toMapOfStringString(map.get("other_config")); - record.live = toBoolean(map.get("live")); + record.uuid = toString(map.get("uuid")); + record.osVersion = toMapOfStringString(map.get("os_version")); + record.PVDriversVersion = toMapOfStringString(map.get("PV_drivers_version")); + record.PVDriversUpToDate = toBoolean(map.get("PV_drivers_up_to_date")); + record.memory = toMapOfStringString(map.get("memory")); + record.disks = toMapOfStringString(map.get("disks")); + record.networks = toMapOfStringString(map.get("networks")); + record.other = toMapOfStringString(map.get("other")); + record.lastUpdated = toDate(map.get("last_updated")); + record.otherConfig = toMapOfStringString(map.get("other_config")); + record.live = toBoolean(map.get("live")); return record; } @@ -12695,20 +12863,20 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; + Map map = (Map) object; VMMetrics.Record record = new VMMetrics.Record(); - record.uuid = toString(map.get("uuid")); - record.memoryActual = toLong(map.get("memory_actual")); - record.VCPUsNumber = toLong(map.get("VCPUs_number")); - record.VCPUsUtilisation = toMapOfLongDouble(map.get("VCPUs_utilisation")); - record.VCPUsCPU = toMapOfLongLong(map.get("VCPUs_CPU")); - record.VCPUsParams = toMapOfStringString(map.get("VCPUs_params")); - record.VCPUsFlags = toMapOfLongSetOfString(map.get("VCPUs_flags")); - record.state = toSetOfString(map.get("state")); - record.startTime = toDate(map.get("start_time")); - record.installTime = toDate(map.get("install_time")); - record.lastUpdated = toDate(map.get("last_updated")); - record.otherConfig = toMapOfStringString(map.get("other_config")); + record.uuid = toString(map.get("uuid")); + record.memoryActual = toLong(map.get("memory_actual")); + record.VCPUsNumber = toLong(map.get("VCPUs_number")); + record.VCPUsUtilisation = toMapOfLongDouble(map.get("VCPUs_utilisation")); + record.VCPUsCPU = toMapOfLongLong(map.get("VCPUs_CPU")); + record.VCPUsParams = toMapOfStringString(map.get("VCPUs_params")); + record.VCPUsFlags = toMapOfLongSetOfString(map.get("VCPUs_flags")); + record.state = toSetOfString(map.get("state")); + record.startTime = toDate(map.get("start_time")); + record.installTime = toDate(map.get("install_time")); + record.lastUpdated = toDate(map.get("last_updated")); + record.otherConfig = toMapOfStringString(map.get("other_config")); return record; } @@ -12716,11 +12884,11 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; + Map map = (Map) object; VTPM.Record record = new VTPM.Record(); - record.uuid = toString(map.get("uuid")); - record.VM = toVM(map.get("VM")); - record.backend = toVM(map.get("backend")); + record.uuid = toString(map.get("uuid")); + record.VM = toVM(map.get("VM")); + record.backend = toVM(map.get("backend")); return record; } @@ -12728,15 +12896,15 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; + Map map = (Map) object; Blob.Record record = new Blob.Record(); - record.uuid = toString(map.get("uuid")); - record.nameLabel = toString(map.get("name_label")); - record.nameDescription = toString(map.get("name_description")); - record.size = toLong(map.get("size")); - record._public = toBoolean(map.get("public")); - record.lastUpdated = toDate(map.get("last_updated")); - record.mimeType = toString(map.get("mime_type")); + record.uuid = toString(map.get("uuid")); + record.nameLabel = toString(map.get("name_label")); + record.nameDescription = toString(map.get("name_description")); + record.size = toLong(map.get("size")); + record._public = toBoolean(map.get("public")); + record.lastUpdated = toDate(map.get("last_updated")); + record.mimeType = toString(map.get("mime_type")); return record; } @@ -12744,13 +12912,13 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; + Map map = (Map) object; Console.Record record = new Console.Record(); - record.uuid = toString(map.get("uuid")); - record.protocol = toConsoleProtocol(map.get("protocol")); - record.location = toString(map.get("location")); - record.VM = toVM(map.get("VM")); - record.otherConfig = toMapOfStringString(map.get("other_config")); + record.uuid = toString(map.get("uuid")); + record.protocol = toConsoleProtocol(map.get("protocol")); + record.location = toString(map.get("location")); + record.VM = toVM(map.get("VM")); + record.otherConfig = toMapOfStringString(map.get("other_config")); return record; } @@ -12758,12 +12926,12 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; + Map map = (Map) object; Crashdump.Record record = new Crashdump.Record(); - record.uuid = toString(map.get("uuid")); - record.VM = toVM(map.get("VM")); - record.VDI = toVDI(map.get("VDI")); - record.otherConfig = toMapOfStringString(map.get("other_config")); + record.uuid = toString(map.get("uuid")); + record.VM = toVM(map.get("VM")); + record.VDI = toVDI(map.get("VDI")); + record.otherConfig = toMapOfStringString(map.get("other_config")); return record; } @@ -12771,16 +12939,16 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; + Map map = (Map) object; DataSource.Record record = new DataSource.Record(); - record.nameLabel = toString(map.get("name_label")); - record.nameDescription = toString(map.get("name_description")); - record.enabled = toBoolean(map.get("enabled")); - record.standard = toBoolean(map.get("standard")); - record.units = toString(map.get("units")); - record.min = toDouble(map.get("min")); - record.max = toDouble(map.get("max")); - record.value = toDouble(map.get("value")); + record.nameLabel = toString(map.get("name_label")); + record.nameDescription = toString(map.get("name_description")); + record.enabled = toBoolean(map.get("enabled")); + record.standard = toBoolean(map.get("standard")); + record.units = toString(map.get("units")); + record.min = toDouble(map.get("min")); + record.max = toDouble(map.get("max")); + record.value = toDouble(map.get("value")); return record; } @@ -12788,153 +12956,66 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; + Map map = (Map) object; Event.Record record = new Event.Record(); - record.id = toLong(map.get("id")); - record.timestamp = toDate(map.get("timestamp")); - record.clazz = toString(map.get("class")); - record.operation = toEventOperation(map.get("operation")); - record.ref = toString(map.get("ref")); - record.objUuid = toString(map.get("obj_uuid")); + record.id = toLong(map.get("id")); + record.timestamp = toDate(map.get("timestamp")); + record.clazz = toString(map.get("class")); + record.operation = toEventOperation(map.get("operation")); + record.ref = toString(map.get("ref")); + record.objUuid = toString(map.get("obj_uuid")); - Object a, b; - a = map.get("snapshot"); - switch (toXenAPIObjects(record.clazz)) + + Object a,b; + a=map.get("snapshot"); + switch(toXenAPIObjects(record.clazz)) { - case SESSION: - b = toSessionRecord(a); - break; - case SUBJECT: - b = toSubjectRecord(a); - break; - case ROLE: - b = toRoleRecord(a); - break; - case TASK: - b = toTaskRecord(a); - break; - case EVENT: - b = toEventRecord(a); - break; - case POOL: - b = toPoolRecord(a); - break; - case POOL_PATCH: - b = toPoolPatchRecord(a); - break; - case VM: - b = toVMRecord(a); - break; - case VM_METRICS: - b = toVMMetricsRecord(a); - break; - case VM_GUEST_METRICS: - b = toVMGuestMetricsRecord(a); - break; - case VMPP: - b = toVMPPRecord(a); - break; - case VM_APPLIANCE: - b = toVMApplianceRecord(a); - break; - case DR_TASK: - b = toDRTaskRecord(a); - break; - case HOST: - b = toHostRecord(a); - break; - case HOST_CRASHDUMP: - b = toHostCrashdumpRecord(a); - break; - case HOST_PATCH: - b = toHostPatchRecord(a); - break; - case HOST_METRICS: - b = toHostMetricsRecord(a); - break; - case HOST_CPU: - b = toHostCpuRecord(a); - break; - case NETWORK: - b = toNetworkRecord(a); - break; - case VIF: - b = toVIFRecord(a); - break; - case VIF_METRICS: - b = toVIFMetricsRecord(a); - break; - case PIF: - b = toPIFRecord(a); - break; - case PIF_METRICS: - b = toPIFMetricsRecord(a); - break; - case BOND: - b = toBondRecord(a); - break; - case VLAN: - b = toVLANRecord(a); - break; - case SM: - b = toSMRecord(a); - break; - case SR: - b = toSRRecord(a); - break; - case VDI: - b = toVDIRecord(a); - break; - case VBD: - b = toVBDRecord(a); - break; - case VBD_METRICS: - b = toVBDMetricsRecord(a); - break; - case PBD: - b = toPBDRecord(a); - break; - case CRASHDUMP: - b = toCrashdumpRecord(a); - break; - case VTPM: - b = toVTPMRecord(a); - break; - case CONSOLE: - b = toConsoleRecord(a); - break; - case USER: - b = toUserRecord(a); - break; - case DATA_SOURCE: - b = toDataSourceRecord(a); - break; - case BLOB: - b = toBlobRecord(a); - break; - case MESSAGE: - b = toMessageRecord(a); - break; - case SECRET: - b = toSecretRecord(a); - break; - case TUNNEL: - b = toTunnelRecord(a); - break; - case PCI: - b = toPCIRecord(a); - break; - case PGPU: - b = toPGPURecord(a); - break; - case GPU_GROUP: - b = toGPUGroupRecord(a); - break; - case VGPU: - b = toVGPURecord(a); - break; - default: - throw new RuntimeException("Internal error in auto-generated code whilst unmarshalling event snapshot"); + case SESSION: b = toSessionRecord(a); break; + case SUBJECT: b = toSubjectRecord(a); break; + case ROLE: b = toRoleRecord(a); break; + case TASK: b = toTaskRecord(a); break; + case EVENT: b = toEventRecord(a); break; + case POOL: b = toPoolRecord(a); break; + case POOL_PATCH: b = toPoolPatchRecord(a); break; + case VM: b = toVMRecord(a); break; + case VM_METRICS: b = toVMMetricsRecord(a); break; + case VM_GUEST_METRICS: b = toVMGuestMetricsRecord(a); break; + case VMPP: b = toVMPPRecord(a); break; + case VM_APPLIANCE: b = toVMApplianceRecord(a); break; + case DR_TASK: b = toDRTaskRecord(a); break; + case HOST: b = toHostRecord(a); break; + case HOST_CRASHDUMP: b = toHostCrashdumpRecord(a); break; + case HOST_PATCH: b = toHostPatchRecord(a); break; + case HOST_METRICS: b = toHostMetricsRecord(a); break; + case HOST_CPU: b = toHostCpuRecord(a); break; + case NETWORK: b = toNetworkRecord(a); break; + case VIF: b = toVIFRecord(a); break; + case VIF_METRICS: b = toVIFMetricsRecord(a); break; + case PIF: b = toPIFRecord(a); break; + case PIF_METRICS: b = toPIFMetricsRecord(a); break; + case BOND: b = toBondRecord(a); break; + case VLAN: b = toVLANRecord(a); break; + case SM: b = toSMRecord(a); break; + case SR: b = toSRRecord(a); break; + case VDI: b = toVDIRecord(a); break; + case VBD: b = toVBDRecord(a); break; + case VBD_METRICS: b = toVBDMetricsRecord(a); break; + case PBD: b = toPBDRecord(a); break; + case CRASHDUMP: b = toCrashdumpRecord(a); break; + case VTPM: b = toVTPMRecord(a); break; + case CONSOLE: b = toConsoleRecord(a); break; + case USER: b = toUserRecord(a); break; + case DATA_SOURCE: b = toDataSourceRecord(a); break; + case BLOB: b = toBlobRecord(a); break; + case MESSAGE: b = toMessageRecord(a); break; + case SECRET: b = toSecretRecord(a); break; + case TUNNEL: b = toTunnelRecord(a); break; + case PCI: b = toPCIRecord(a); break; + case PGPU: b = toPGPURecord(a); break; + case GPU_GROUP: b = toGPUGroupRecord(a); break; + case VGPU: b = toVGPURecord(a); break; + case VGPU_TYPE: b = toVGPUTypeRecord(a); break; + default: throw new RuntimeException("Internal error in auto-generated code whilst unmarshalling event snapshot"); } record.snapshot = b; return record; @@ -12944,55 +13025,56 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; + Map map = (Map) object; Host.Record record = new Host.Record(); - record.uuid = toString(map.get("uuid")); - record.nameLabel = toString(map.get("name_label")); - record.nameDescription = toString(map.get("name_description")); - record.memoryOverhead = toLong(map.get("memory_overhead")); - record.allowedOperations = toSetOfHostAllowedOperations(map.get("allowed_operations")); - record.currentOperations = toMapOfStringHostAllowedOperations(map.get("current_operations")); - record.APIVersionMajor = toLong(map.get("API_version_major")); - record.APIVersionMinor = toLong(map.get("API_version_minor")); - record.APIVersionVendor = toString(map.get("API_version_vendor")); - record.APIVersionVendorImplementation = toMapOfStringString(map.get("API_version_vendor_implementation")); - record.enabled = toBoolean(map.get("enabled")); - record.softwareVersion = toMapOfStringString(map.get("software_version")); - record.otherConfig = toMapOfStringString(map.get("other_config")); - record.capabilities = toSetOfString(map.get("capabilities")); - record.cpuConfiguration = toMapOfStringString(map.get("cpu_configuration")); - record.schedPolicy = toString(map.get("sched_policy")); - record.supportedBootloaders = toSetOfString(map.get("supported_bootloaders")); - record.residentVMs = toSetOfVM(map.get("resident_VMs")); - record.logging = toMapOfStringString(map.get("logging")); - record.PIFs = toSetOfPIF(map.get("PIFs")); - record.suspendImageSr = toSR(map.get("suspend_image_sr")); - record.crashDumpSr = toSR(map.get("crash_dump_sr")); - record.crashdumps = toSetOfHostCrashdump(map.get("crashdumps")); - record.patches = toSetOfHostPatch(map.get("patches")); - record.PBDs = toSetOfPBD(map.get("PBDs")); - record.hostCPUs = toSetOfHostCpu(map.get("host_CPUs")); - record.cpuInfo = toMapOfStringString(map.get("cpu_info")); - record.hostname = toString(map.get("hostname")); - record.address = toString(map.get("address")); - record.metrics = toHostMetrics(map.get("metrics")); - record.licenseParams = toMapOfStringString(map.get("license_params")); - record.haStatefiles = toSetOfString(map.get("ha_statefiles")); - record.haNetworkPeers = toSetOfString(map.get("ha_network_peers")); - record.blobs = toMapOfStringBlob(map.get("blobs")); - record.tags = toSetOfString(map.get("tags")); - record.externalAuthType = toString(map.get("external_auth_type")); - record.externalAuthServiceName = toString(map.get("external_auth_service_name")); - record.externalAuthConfiguration = toMapOfStringString(map.get("external_auth_configuration")); - record.edition = toString(map.get("edition")); - record.licenseServer = toMapOfStringString(map.get("license_server")); - record.biosStrings = toMapOfStringString(map.get("bios_strings")); - record.powerOnMode = toString(map.get("power_on_mode")); - record.powerOnConfig = toMapOfStringString(map.get("power_on_config")); - record.localCacheSr = toSR(map.get("local_cache_sr")); - record.chipsetInfo = toMapOfStringString(map.get("chipset_info")); - record.PCIs = toSetOfPCI(map.get("PCIs")); - record.PGPUs = toSetOfPGPU(map.get("PGPUs")); + record.uuid = toString(map.get("uuid")); + record.nameLabel = toString(map.get("name_label")); + record.nameDescription = toString(map.get("name_description")); + record.memoryOverhead = toLong(map.get("memory_overhead")); + record.allowedOperations = toSetOfHostAllowedOperations(map.get("allowed_operations")); + record.currentOperations = toMapOfStringHostAllowedOperations(map.get("current_operations")); + record.APIVersionMajor = toLong(map.get("API_version_major")); + record.APIVersionMinor = toLong(map.get("API_version_minor")); + record.APIVersionVendor = toString(map.get("API_version_vendor")); + record.APIVersionVendorImplementation = toMapOfStringString(map.get("API_version_vendor_implementation")); + record.enabled = toBoolean(map.get("enabled")); + record.softwareVersion = toMapOfStringString(map.get("software_version")); + record.otherConfig = toMapOfStringString(map.get("other_config")); + record.capabilities = toSetOfString(map.get("capabilities")); + record.cpuConfiguration = toMapOfStringString(map.get("cpu_configuration")); + record.schedPolicy = toString(map.get("sched_policy")); + record.supportedBootloaders = toSetOfString(map.get("supported_bootloaders")); + record.residentVMs = toSetOfVM(map.get("resident_VMs")); + record.logging = toMapOfStringString(map.get("logging")); + record.PIFs = toSetOfPIF(map.get("PIFs")); + record.suspendImageSr = toSR(map.get("suspend_image_sr")); + record.crashDumpSr = toSR(map.get("crash_dump_sr")); + record.crashdumps = toSetOfHostCrashdump(map.get("crashdumps")); + record.patches = toSetOfHostPatch(map.get("patches")); + record.PBDs = toSetOfPBD(map.get("PBDs")); + record.hostCPUs = toSetOfHostCpu(map.get("host_CPUs")); + record.cpuInfo = toMapOfStringString(map.get("cpu_info")); + record.hostname = toString(map.get("hostname")); + record.address = toString(map.get("address")); + record.metrics = toHostMetrics(map.get("metrics")); + record.licenseParams = toMapOfStringString(map.get("license_params")); + record.haStatefiles = toSetOfString(map.get("ha_statefiles")); + record.haNetworkPeers = toSetOfString(map.get("ha_network_peers")); + record.blobs = toMapOfStringBlob(map.get("blobs")); + record.tags = toSetOfString(map.get("tags")); + record.externalAuthType = toString(map.get("external_auth_type")); + record.externalAuthServiceName = toString(map.get("external_auth_service_name")); + record.externalAuthConfiguration = toMapOfStringString(map.get("external_auth_configuration")); + record.edition = toString(map.get("edition")); + record.licenseServer = toMapOfStringString(map.get("license_server")); + record.biosStrings = toMapOfStringString(map.get("bios_strings")); + record.powerOnMode = toString(map.get("power_on_mode")); + record.powerOnConfig = toMapOfStringString(map.get("power_on_config")); + record.localCacheSr = toSR(map.get("local_cache_sr")); + record.chipsetInfo = toMapOfStringString(map.get("chipset_info")); + record.PCIs = toSetOfPCI(map.get("PCIs")); + record.PGPUs = toSetOfPGPU(map.get("PGPUs")); + record.guestVCPUsParams = toMapOfStringString(map.get("guest_VCPUs_params")); return record; } @@ -13000,21 +13082,21 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; + Map map = (Map) object; HostCpu.Record record = new HostCpu.Record(); - record.uuid = toString(map.get("uuid")); - record.host = toHost(map.get("host")); - record.number = toLong(map.get("number")); - record.vendor = toString(map.get("vendor")); - record.speed = toLong(map.get("speed")); - record.modelname = toString(map.get("modelname")); - record.family = toLong(map.get("family")); - record.model = toLong(map.get("model")); - record.stepping = toString(map.get("stepping")); - record.flags = toString(map.get("flags")); - record.features = toString(map.get("features")); - record.utilisation = toDouble(map.get("utilisation")); - record.otherConfig = toMapOfStringString(map.get("other_config")); + record.uuid = toString(map.get("uuid")); + record.host = toHost(map.get("host")); + record.number = toLong(map.get("number")); + record.vendor = toString(map.get("vendor")); + record.speed = toLong(map.get("speed")); + record.modelname = toString(map.get("modelname")); + record.family = toLong(map.get("family")); + record.model = toLong(map.get("model")); + record.stepping = toString(map.get("stepping")); + record.flags = toString(map.get("flags")); + record.features = toString(map.get("features")); + record.utilisation = toDouble(map.get("utilisation")); + record.otherConfig = toMapOfStringString(map.get("other_config")); return record; } @@ -13022,13 +13104,13 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; + Map map = (Map) object; HostCrashdump.Record record = new HostCrashdump.Record(); - record.uuid = toString(map.get("uuid")); - record.host = toHost(map.get("host")); - record.timestamp = toDate(map.get("timestamp")); - record.size = toLong(map.get("size")); - record.otherConfig = toMapOfStringString(map.get("other_config")); + record.uuid = toString(map.get("uuid")); + record.host = toHost(map.get("host")); + record.timestamp = toDate(map.get("timestamp")); + record.size = toLong(map.get("size")); + record.otherConfig = toMapOfStringString(map.get("other_config")); return record; } @@ -13036,14 +13118,14 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; + Map map = (Map) object; HostMetrics.Record record = new HostMetrics.Record(); - record.uuid = toString(map.get("uuid")); - record.memoryTotal = toLong(map.get("memory_total")); - record.memoryFree = toLong(map.get("memory_free")); - record.live = toBoolean(map.get("live")); - record.lastUpdated = toDate(map.get("last_updated")); - record.otherConfig = toMapOfStringString(map.get("other_config")); + record.uuid = toString(map.get("uuid")); + record.memoryTotal = toLong(map.get("memory_total")); + record.memoryFree = toLong(map.get("memory_free")); + record.live = toBoolean(map.get("live")); + record.lastUpdated = toDate(map.get("last_updated")); + record.otherConfig = toMapOfStringString(map.get("other_config")); return record; } @@ -13051,18 +13133,18 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; + Map map = (Map) object; HostPatch.Record record = new HostPatch.Record(); - record.uuid = toString(map.get("uuid")); - record.nameLabel = toString(map.get("name_label")); - record.nameDescription = toString(map.get("name_description")); - record.version = toString(map.get("version")); - record.host = toHost(map.get("host")); - record.applied = toBoolean(map.get("applied")); - record.timestampApplied = toDate(map.get("timestamp_applied")); - record.size = toLong(map.get("size")); - record.poolPatch = toPoolPatch(map.get("pool_patch")); - record.otherConfig = toMapOfStringString(map.get("other_config")); + record.uuid = toString(map.get("uuid")); + record.nameLabel = toString(map.get("name_label")); + record.nameDescription = toString(map.get("name_description")); + record.version = toString(map.get("version")); + record.host = toHost(map.get("host")); + record.applied = toBoolean(map.get("applied")); + record.timestampApplied = toDate(map.get("timestamp_applied")); + record.size = toLong(map.get("size")); + record.poolPatch = toPoolPatch(map.get("pool_patch")); + record.otherConfig = toMapOfStringString(map.get("other_config")); return record; } @@ -13070,15 +13152,15 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; + Map map = (Map) object; Message.Record record = new Message.Record(); - record.uuid = toString(map.get("uuid")); - record.name = toString(map.get("name")); - record.priority = toLong(map.get("priority")); - record.cls = toCls(map.get("cls")); - record.objUuid = toString(map.get("obj_uuid")); - record.timestamp = toDate(map.get("timestamp")); - record.body = toString(map.get("body")); + record.uuid = toString(map.get("uuid")); + record.name = toString(map.get("name")); + record.priority = toLong(map.get("priority")); + record.cls = toCls(map.get("cls")); + record.objUuid = toString(map.get("obj_uuid")); + record.timestamp = toDate(map.get("timestamp")); + record.body = toString(map.get("body")); return record; } @@ -13086,21 +13168,21 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; + Map map = (Map) object; Network.Record record = new Network.Record(); - record.uuid = toString(map.get("uuid")); - record.nameLabel = toString(map.get("name_label")); - record.nameDescription = toString(map.get("name_description")); - record.allowedOperations = toSetOfNetworkOperations(map.get("allowed_operations")); - record.currentOperations = toMapOfStringNetworkOperations(map.get("current_operations")); - record.VIFs = toSetOfVIF(map.get("VIFs")); - record.PIFs = toSetOfPIF(map.get("PIFs")); - record.MTU = toLong(map.get("MTU")); - record.otherConfig = toMapOfStringString(map.get("other_config")); - record.bridge = toString(map.get("bridge")); - record.blobs = toMapOfStringBlob(map.get("blobs")); - record.tags = toSetOfString(map.get("tags")); - record.defaultLockingMode = toNetworkDefaultLockingMode(map.get("default_locking_mode")); + record.uuid = toString(map.get("uuid")); + record.nameLabel = toString(map.get("name_label")); + record.nameDescription = toString(map.get("name_description")); + record.allowedOperations = toSetOfNetworkOperations(map.get("allowed_operations")); + record.currentOperations = toMapOfStringNetworkOperations(map.get("current_operations")); + record.VIFs = toSetOfVIF(map.get("VIFs")); + record.PIFs = toSetOfPIF(map.get("PIFs")); + record.MTU = toLong(map.get("MTU")); + record.otherConfig = toMapOfStringString(map.get("other_config")); + record.bridge = toString(map.get("bridge")); + record.blobs = toMapOfStringBlob(map.get("blobs")); + record.tags = toSetOfString(map.get("tags")); + record.defaultLockingMode = toNetworkDefaultLockingMode(map.get("default_locking_mode")); return record; } @@ -13108,35 +13190,35 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; + Map map = (Map) object; Pool.Record record = new Pool.Record(); - record.uuid = toString(map.get("uuid")); - record.nameLabel = toString(map.get("name_label")); - record.nameDescription = toString(map.get("name_description")); - record.master = toHost(map.get("master")); - record.defaultSR = toSR(map.get("default_SR")); - record.suspendImageSR = toSR(map.get("suspend_image_SR")); - record.crashDumpSR = toSR(map.get("crash_dump_SR")); - record.otherConfig = toMapOfStringString(map.get("other_config")); - record.haEnabled = toBoolean(map.get("ha_enabled")); - record.haConfiguration = toMapOfStringString(map.get("ha_configuration")); - record.haStatefiles = toSetOfString(map.get("ha_statefiles")); - record.haHostFailuresToTolerate = toLong(map.get("ha_host_failures_to_tolerate")); - record.haPlanExistsFor = toLong(map.get("ha_plan_exists_for")); - record.haAllowOvercommit = toBoolean(map.get("ha_allow_overcommit")); - record.haOvercommitted = toBoolean(map.get("ha_overcommitted")); - record.blobs = toMapOfStringBlob(map.get("blobs")); - record.tags = toSetOfString(map.get("tags")); - record.guiConfig = toMapOfStringString(map.get("gui_config")); - record.wlbUrl = toString(map.get("wlb_url")); - record.wlbUsername = toString(map.get("wlb_username")); - record.wlbEnabled = toBoolean(map.get("wlb_enabled")); - record.wlbVerifyCert = toBoolean(map.get("wlb_verify_cert")); - record.redoLogEnabled = toBoolean(map.get("redo_log_enabled")); - record.redoLogVdi = toVDI(map.get("redo_log_vdi")); - record.vswitchController = toString(map.get("vswitch_controller")); - record.restrictions = toMapOfStringString(map.get("restrictions")); - record.metadataVDIs = toSetOfVDI(map.get("metadata_VDIs")); + record.uuid = toString(map.get("uuid")); + record.nameLabel = toString(map.get("name_label")); + record.nameDescription = toString(map.get("name_description")); + record.master = toHost(map.get("master")); + record.defaultSR = toSR(map.get("default_SR")); + record.suspendImageSR = toSR(map.get("suspend_image_SR")); + record.crashDumpSR = toSR(map.get("crash_dump_SR")); + record.otherConfig = toMapOfStringString(map.get("other_config")); + record.haEnabled = toBoolean(map.get("ha_enabled")); + record.haConfiguration = toMapOfStringString(map.get("ha_configuration")); + record.haStatefiles = toSetOfString(map.get("ha_statefiles")); + record.haHostFailuresToTolerate = toLong(map.get("ha_host_failures_to_tolerate")); + record.haPlanExistsFor = toLong(map.get("ha_plan_exists_for")); + record.haAllowOvercommit = toBoolean(map.get("ha_allow_overcommit")); + record.haOvercommitted = toBoolean(map.get("ha_overcommitted")); + record.blobs = toMapOfStringBlob(map.get("blobs")); + record.tags = toSetOfString(map.get("tags")); + record.guiConfig = toMapOfStringString(map.get("gui_config")); + record.wlbUrl = toString(map.get("wlb_url")); + record.wlbUsername = toString(map.get("wlb_username")); + record.wlbEnabled = toBoolean(map.get("wlb_enabled")); + record.wlbVerifyCert = toBoolean(map.get("wlb_verify_cert")); + record.redoLogEnabled = toBoolean(map.get("redo_log_enabled")); + record.redoLogVdi = toVDI(map.get("redo_log_vdi")); + record.vswitchController = toString(map.get("vswitch_controller")); + record.restrictions = toMapOfStringString(map.get("restrictions")); + record.metadataVDIs = toSetOfVDI(map.get("metadata_VDIs")); return record; } @@ -13144,17 +13226,17 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; + Map map = (Map) object; PoolPatch.Record record = new PoolPatch.Record(); - record.uuid = toString(map.get("uuid")); - record.nameLabel = toString(map.get("name_label")); - record.nameDescription = toString(map.get("name_description")); - record.version = toString(map.get("version")); - record.size = toLong(map.get("size")); - record.poolApplied = toBoolean(map.get("pool_applied")); - record.hostPatches = toSetOfHostPatch(map.get("host_patches")); - record.afterApplyGuidance = toSetOfAfterApplyGuidance(map.get("after_apply_guidance")); - record.otherConfig = toMapOfStringString(map.get("other_config")); + record.uuid = toString(map.get("uuid")); + record.nameLabel = toString(map.get("name_label")); + record.nameDescription = toString(map.get("name_description")); + record.version = toString(map.get("version")); + record.size = toLong(map.get("size")); + record.poolApplied = toBoolean(map.get("pool_applied")); + record.hostPatches = toSetOfHostPatch(map.get("host_patches")); + record.afterApplyGuidance = toSetOfAfterApplyGuidance(map.get("after_apply_guidance")); + record.otherConfig = toMapOfStringString(map.get("other_config")); return record; } @@ -13162,12 +13244,12 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; + Map map = (Map) object; Role.Record record = new Role.Record(); - record.uuid = toString(map.get("uuid")); - record.nameLabel = toString(map.get("name_label")); - record.nameDescription = toString(map.get("name_description")); - record.subroles = toSetOfRole(map.get("subroles")); + record.uuid = toString(map.get("uuid")); + record.nameLabel = toString(map.get("name_label")); + record.nameDescription = toString(map.get("name_description")); + record.subroles = toSetOfRole(map.get("subroles")); return record; } @@ -13175,11 +13257,11 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; + Map map = (Map) object; Secret.Record record = new Secret.Record(); - record.uuid = toString(map.get("uuid")); - record.value = toString(map.get("value")); - record.otherConfig = toMapOfStringString(map.get("other_config")); + record.uuid = toString(map.get("uuid")); + record.value = toString(map.get("value")); + record.otherConfig = toMapOfStringString(map.get("other_config")); return record; } @@ -13187,22 +13269,22 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; + Map map = (Map) object; Session.Record record = new Session.Record(); - record.uuid = toString(map.get("uuid")); - record.thisHost = toHost(map.get("this_host")); - record.thisUser = toUser(map.get("this_user")); - record.lastActive = toDate(map.get("last_active")); - record.pool = toBoolean(map.get("pool")); - record.otherConfig = toMapOfStringString(map.get("other_config")); - record.isLocalSuperuser = toBoolean(map.get("is_local_superuser")); - record.subject = toSubject(map.get("subject")); - record.validationTime = toDate(map.get("validation_time")); - record.authUserSid = toString(map.get("auth_user_sid")); - record.authUserName = toString(map.get("auth_user_name")); - record.rbacPermissions = toSetOfString(map.get("rbac_permissions")); - record.tasks = toSetOfTask(map.get("tasks")); - record.parent = toSession(map.get("parent")); + record.uuid = toString(map.get("uuid")); + record.thisHost = toHost(map.get("this_host")); + record.thisUser = toUser(map.get("this_user")); + record.lastActive = toDate(map.get("last_active")); + record.pool = toBoolean(map.get("pool")); + record.otherConfig = toMapOfStringString(map.get("other_config")); + record.isLocalSuperuser = toBoolean(map.get("is_local_superuser")); + record.subject = toSubject(map.get("subject")); + record.validationTime = toDate(map.get("validation_time")); + record.authUserSid = toString(map.get("auth_user_sid")); + record.authUserName = toString(map.get("auth_user_name")); + record.rbacPermissions = toSetOfString(map.get("rbac_permissions")); + record.tasks = toSetOfTask(map.get("tasks")); + record.parent = toSession(map.get("parent")); return record; } @@ -13210,12 +13292,12 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; + Map map = (Map) object; Subject.Record record = new Subject.Record(); - record.uuid = toString(map.get("uuid")); - record.subjectIdentifier = toString(map.get("subject_identifier")); - record.otherConfig = toMapOfStringString(map.get("other_config")); - record.roles = toSetOfRole(map.get("roles")); + record.uuid = toString(map.get("uuid")); + record.subjectIdentifier = toString(map.get("subject_identifier")); + record.otherConfig = toMapOfStringString(map.get("other_config")); + record.roles = toSetOfRole(map.get("roles")); return record; } @@ -13223,24 +13305,24 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; + Map map = (Map) object; Task.Record record = new Task.Record(); - record.uuid = toString(map.get("uuid")); - record.nameLabel = toString(map.get("name_label")); - record.nameDescription = toString(map.get("name_description")); - record.allowedOperations = toSetOfTaskAllowedOperations(map.get("allowed_operations")); - record.currentOperations = toMapOfStringTaskAllowedOperations(map.get("current_operations")); - record.created = toDate(map.get("created")); - record.finished = toDate(map.get("finished")); - record.status = toTaskStatusType(map.get("status")); - record.residentOn = toHost(map.get("resident_on")); - record.progress = toDouble(map.get("progress")); - record.type = toString(map.get("type")); - record.result = toString(map.get("result")); - record.errorInfo = toSetOfString(map.get("error_info")); - record.otherConfig = toMapOfStringString(map.get("other_config")); - record.subtaskOf = toTask(map.get("subtask_of")); - record.subtasks = toSetOfTask(map.get("subtasks")); + record.uuid = toString(map.get("uuid")); + record.nameLabel = toString(map.get("name_label")); + record.nameDescription = toString(map.get("name_description")); + record.allowedOperations = toSetOfTaskAllowedOperations(map.get("allowed_operations")); + record.currentOperations = toMapOfStringTaskAllowedOperations(map.get("current_operations")); + record.created = toDate(map.get("created")); + record.finished = toDate(map.get("finished")); + record.status = toTaskStatusType(map.get("status")); + record.residentOn = toHost(map.get("resident_on")); + record.progress = toDouble(map.get("progress")); + record.type = toString(map.get("type")); + record.result = toString(map.get("result")); + record.errorInfo = toSetOfString(map.get("error_info")); + record.otherConfig = toMapOfStringString(map.get("other_config")); + record.subtaskOf = toTask(map.get("subtask_of")); + record.subtasks = toSetOfTask(map.get("subtasks")); return record; } @@ -13248,13 +13330,13 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; + Map map = (Map) object; Tunnel.Record record = new Tunnel.Record(); - record.uuid = toString(map.get("uuid")); - record.accessPIF = toPIF(map.get("access_PIF")); - record.transportPIF = toPIF(map.get("transport_PIF")); - record.status = toMapOfStringString(map.get("status")); - record.otherConfig = toMapOfStringString(map.get("other_config")); + record.uuid = toString(map.get("uuid")); + record.accessPIF = toPIF(map.get("access_PIF")); + record.transportPIF = toPIF(map.get("transport_PIF")); + record.status = toMapOfStringString(map.get("status")); + record.otherConfig = toMapOfStringString(map.get("other_config")); return record; } @@ -13262,181 +13344,186 @@ public class Types if (object == null) { return null; } - Map map = (Map)object; + Map map = (Map) object; User.Record record = new User.Record(); - record.uuid = toString(map.get("uuid")); - record.shortName = toString(map.get("short_name")); - record.fullname = toString(map.get("fullname")); - record.otherConfig = toMapOfStringString(map.get("other_config")); + record.uuid = toString(map.get("uuid")); + record.shortName = toString(map.get("short_name")); + record.fullname = toString(map.get("fullname")); + record.otherConfig = toMapOfStringString(map.get("other_config")); return record; } - public static Bond toBond(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { - return Types.toBond(parseResult(task.getResult(connection))); + + public static Bond toBond(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ + return Types.toBond(parseResult(task.getResult(connection))); } - public static DRTask toDRTask(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { - return Types.toDRTask(parseResult(task.getResult(connection))); + public static DRTask toDRTask(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ + return Types.toDRTask(parseResult(task.getResult(connection))); } - public static GPUGroup toGPUGroup(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { - return Types.toGPUGroup(parseResult(task.getResult(connection))); + public static GPUGroup toGPUGroup(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ + return Types.toGPUGroup(parseResult(task.getResult(connection))); } - public static PBD toPBD(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { - return Types.toPBD(parseResult(task.getResult(connection))); + public static PBD toPBD(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ + return Types.toPBD(parseResult(task.getResult(connection))); } - public static PCI toPCI(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { - return Types.toPCI(parseResult(task.getResult(connection))); + public static PCI toPCI(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ + return Types.toPCI(parseResult(task.getResult(connection))); } - public static PGPU toPGPU(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { - return Types.toPGPU(parseResult(task.getResult(connection))); + public static PGPU toPGPU(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ + return Types.toPGPU(parseResult(task.getResult(connection))); } - public static PIF toPIF(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { - return Types.toPIF(parseResult(task.getResult(connection))); + public static PIF toPIF(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ + return Types.toPIF(parseResult(task.getResult(connection))); } - public static PIFMetrics toPIFMetrics(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { - return Types.toPIFMetrics(parseResult(task.getResult(connection))); + public static PIFMetrics toPIFMetrics(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ + return Types.toPIFMetrics(parseResult(task.getResult(connection))); } - public static SM toSM(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { - return Types.toSM(parseResult(task.getResult(connection))); + public static SM toSM(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ + return Types.toSM(parseResult(task.getResult(connection))); } - public static SR toSR(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { - return Types.toSR(parseResult(task.getResult(connection))); + public static SR toSR(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ + return Types.toSR(parseResult(task.getResult(connection))); } - public static VBD toVBD(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { - return Types.toVBD(parseResult(task.getResult(connection))); + public static VBD toVBD(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ + return Types.toVBD(parseResult(task.getResult(connection))); } - public static VBDMetrics toVBDMetrics(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { - return Types.toVBDMetrics(parseResult(task.getResult(connection))); + public static VBDMetrics toVBDMetrics(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ + return Types.toVBDMetrics(parseResult(task.getResult(connection))); } - public static VDI toVDI(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { - return Types.toVDI(parseResult(task.getResult(connection))); + public static VDI toVDI(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ + return Types.toVDI(parseResult(task.getResult(connection))); } - public static VGPU toVGPU(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { - return Types.toVGPU(parseResult(task.getResult(connection))); + public static VGPU toVGPU(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ + return Types.toVGPU(parseResult(task.getResult(connection))); } - public static VIF toVIF(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { - return Types.toVIF(parseResult(task.getResult(connection))); + public static VGPUType toVGPUType(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ + return Types.toVGPUType(parseResult(task.getResult(connection))); } - public static VIFMetrics toVIFMetrics(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { - return Types.toVIFMetrics(parseResult(task.getResult(connection))); + public static VIF toVIF(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ + return Types.toVIF(parseResult(task.getResult(connection))); } - public static VLAN toVLAN(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { - return Types.toVLAN(parseResult(task.getResult(connection))); + public static VIFMetrics toVIFMetrics(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ + return Types.toVIFMetrics(parseResult(task.getResult(connection))); } - public static VM toVM(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { - return Types.toVM(parseResult(task.getResult(connection))); + public static VLAN toVLAN(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ + return Types.toVLAN(parseResult(task.getResult(connection))); } - public static VMPP toVMPP(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { - return Types.toVMPP(parseResult(task.getResult(connection))); + public static VM toVM(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ + return Types.toVM(parseResult(task.getResult(connection))); } - public static VMAppliance toVMAppliance(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { - return Types.toVMAppliance(parseResult(task.getResult(connection))); + public static VMPP toVMPP(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ + return Types.toVMPP(parseResult(task.getResult(connection))); } - public static VMGuestMetrics toVMGuestMetrics(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { - return Types.toVMGuestMetrics(parseResult(task.getResult(connection))); + public static VMAppliance toVMAppliance(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ + return Types.toVMAppliance(parseResult(task.getResult(connection))); } - public static VMMetrics toVMMetrics(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { - return Types.toVMMetrics(parseResult(task.getResult(connection))); + public static VMGuestMetrics toVMGuestMetrics(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ + return Types.toVMGuestMetrics(parseResult(task.getResult(connection))); } - public static VTPM toVTPM(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { - return Types.toVTPM(parseResult(task.getResult(connection))); + public static VMMetrics toVMMetrics(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ + return Types.toVMMetrics(parseResult(task.getResult(connection))); } - public static Blob toBlob(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { - return Types.toBlob(parseResult(task.getResult(connection))); + public static VTPM toVTPM(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ + return Types.toVTPM(parseResult(task.getResult(connection))); } - public static Console toConsole(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { - return Types.toConsole(parseResult(task.getResult(connection))); + public static Blob toBlob(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ + return Types.toBlob(parseResult(task.getResult(connection))); } - public static Crashdump toCrashdump(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { - return Types.toCrashdump(parseResult(task.getResult(connection))); + public static Console toConsole(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ + return Types.toConsole(parseResult(task.getResult(connection))); } - public static Host toHost(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { - return Types.toHost(parseResult(task.getResult(connection))); + public static Crashdump toCrashdump(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ + return Types.toCrashdump(parseResult(task.getResult(connection))); } - public static HostCpu toHostCpu(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { - return Types.toHostCpu(parseResult(task.getResult(connection))); + public static Host toHost(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ + return Types.toHost(parseResult(task.getResult(connection))); } - public static HostCrashdump toHostCrashdump(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { - return Types.toHostCrashdump(parseResult(task.getResult(connection))); + public static HostCpu toHostCpu(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ + return Types.toHostCpu(parseResult(task.getResult(connection))); } - public static HostMetrics toHostMetrics(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { - return Types.toHostMetrics(parseResult(task.getResult(connection))); + public static HostCrashdump toHostCrashdump(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ + return Types.toHostCrashdump(parseResult(task.getResult(connection))); } - public static HostPatch toHostPatch(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { - return Types.toHostPatch(parseResult(task.getResult(connection))); + public static HostMetrics toHostMetrics(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ + return Types.toHostMetrics(parseResult(task.getResult(connection))); } - public static Message toMessage(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { - return Types.toMessage(parseResult(task.getResult(connection))); + public static HostPatch toHostPatch(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ + return Types.toHostPatch(parseResult(task.getResult(connection))); } - public static Network toNetwork(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { - return Types.toNetwork(parseResult(task.getResult(connection))); + public static Message toMessage(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ + return Types.toMessage(parseResult(task.getResult(connection))); } - public static Pool toPool(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { - return Types.toPool(parseResult(task.getResult(connection))); + public static Network toNetwork(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ + return Types.toNetwork(parseResult(task.getResult(connection))); } - public static PoolPatch toPoolPatch(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { - return Types.toPoolPatch(parseResult(task.getResult(connection))); + public static Pool toPool(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ + return Types.toPool(parseResult(task.getResult(connection))); } - public static Role toRole(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { - return Types.toRole(parseResult(task.getResult(connection))); + public static PoolPatch toPoolPatch(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ + return Types.toPoolPatch(parseResult(task.getResult(connection))); } - public static Secret toSecret(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { - return Types.toSecret(parseResult(task.getResult(connection))); + public static Role toRole(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ + return Types.toRole(parseResult(task.getResult(connection))); } - public static Session toSession(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { - return Types.toSession(parseResult(task.getResult(connection))); + public static Secret toSecret(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ + return Types.toSecret(parseResult(task.getResult(connection))); } - public static Subject toSubject(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { - return Types.toSubject(parseResult(task.getResult(connection))); + public static Session toSession(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ + return Types.toSession(parseResult(task.getResult(connection))); } - public static Task toTask(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { - return Types.toTask(parseResult(task.getResult(connection))); + public static Subject toSubject(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ + return Types.toSubject(parseResult(task.getResult(connection))); } - public static Tunnel toTunnel(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { - return Types.toTunnel(parseResult(task.getResult(connection))); + public static Task toTask(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ + return Types.toTask(parseResult(task.getResult(connection))); } - public static User toUser(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { - return Types.toUser(parseResult(task.getResult(connection))); + public static Tunnel toTunnel(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ + return Types.toTunnel(parseResult(task.getResult(connection))); + } + + public static User toUser(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ + return Types.toUser(parseResult(task.getResult(connection))); } } diff --git a/deps/XenServerJava/src/com/xensource/xenapi/User.java b/deps/XenServerJava/src/com/xensource/xenapi/User.java index dff27f5b367..4a01d60e2e8 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/User.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/User.java @@ -1,19 +1,19 @@ /* * 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 @@ -28,6 +28,7 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ + package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -60,14 +61,14 @@ public class User extends XenAPIObject { * For internal use only. */ User(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -78,7 +79,7 @@ public class User extends XenAPIObject { { if (obj != null && obj instanceof User) { - User other = (User)obj; + User other = (User) obj; return other.ref.equals(this.ref); } else { @@ -109,8 +110,8 @@ public class User extends XenAPIObject { /** * Convert a user.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("short_name", this.shortName == null ? "" : this.shortName); map.put("fullname", this.fullname == null ? "" : this.fullname); @@ -142,17 +143,16 @@ public class User extends XenAPIObject { * * @return all fields from the object */ - @Deprecated - public User.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + @Deprecated public User.Record getRecord(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "user.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toUserRecord(result); + return Types.toUserRecord(result); } /** @@ -162,17 +162,16 @@ public class User extends XenAPIObject { * @param uuid UUID of object to return * @return reference to the object */ - @Deprecated - public static User getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + @Deprecated public static User getByUuid(Connection c, String uuid) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "user.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toUser(result); + return Types.toUser(result); } /** @@ -182,11 +181,10 @@ public class User extends XenAPIObject { * @param record All constructor arguments * @return Task */ - @Deprecated - public static Task createAsync(Connection c, User.Record record) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + @Deprecated public static Task createAsync(Connection c, User.Record record) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.user.create"; String session = c.getSessionReference(); Map record_map = record.toMap(); @@ -203,18 +201,17 @@ public class User extends XenAPIObject { * @param record All constructor arguments * @return reference to the newly created object */ - @Deprecated - public static User create(Connection c, User.Record record) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + @Deprecated public static User create(Connection c, User.Record record) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "user.create"; String session = c.getSessionReference(); Map record_map = record.toMap(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(record_map)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toUser(result); + return Types.toUser(result); } /** @@ -223,11 +220,10 @@ public class User extends XenAPIObject { * * @return Task */ - @Deprecated - public Task destroyAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + @Deprecated public Task destroyAsync(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.user.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -241,11 +237,10 @@ public class User extends XenAPIObject { * @deprecated * */ - @Deprecated - public void destroy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + @Deprecated public void destroy(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "user.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -259,15 +254,15 @@ public class User extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "user.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -276,15 +271,15 @@ public class User extends XenAPIObject { * @return value of the field */ public String getShortName(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "user.get_short_name"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -293,15 +288,15 @@ public class User extends XenAPIObject { * @return value of the field */ public String getFullname(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "user.get_fullname"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -310,15 +305,15 @@ public class User extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "user.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -327,9 +322,9 @@ public class User extends XenAPIObject { * @param fullname New value to set */ public void setFullname(Connection c, String fullname) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "user.set_fullname"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(fullname)}; @@ -343,9 +338,9 @@ public class User extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "user.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -360,9 +355,9 @@ public class User extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "user.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -376,9 +371,9 @@ public class User extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "user.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; diff --git a/deps/XenServerJava/src/com/xensource/xenapi/VBD.java b/deps/XenServerJava/src/com/xensource/xenapi/VBD.java index 56e6f4b3d0e..72edf38cf7c 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/VBD.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/VBD.java @@ -1,19 +1,19 @@ /* * 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 @@ -28,6 +28,7 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ + package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -60,14 +61,14 @@ public class VBD extends XenAPIObject { * For internal use only. */ VBD(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -78,7 +79,7 @@ public class VBD extends XenAPIObject { { if (obj != null && obj instanceof VBD) { - VBD other = (VBD)obj; + VBD other = (VBD) obj; return other.ref.equals(this.ref); } else { @@ -127,8 +128,8 @@ public class VBD extends XenAPIObject { /** * Convert a VBD.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("allowed_operations", this.allowedOperations == null ? new LinkedHashSet() : this.allowedOperations); map.put("current_operations", this.currentOperations == null ? new HashMap() : this.currentOperations); @@ -250,15 +251,15 @@ public class VBD extends XenAPIObject { * @return all fields from the object */ public VBD.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVBDRecord(result); + return Types.toVBDRecord(result); } /** @@ -268,15 +269,15 @@ public class VBD extends XenAPIObject { * @return reference to the object */ public static VBD getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVBD(result); + return Types.toVBD(result); } /** @@ -286,9 +287,9 @@ public class VBD extends XenAPIObject { * @return Task */ public static Task createAsync(Connection c, VBD.Record record) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VBD.create"; String session = c.getSessionReference(); Map record_map = record.toMap(); @@ -305,16 +306,16 @@ public class VBD extends XenAPIObject { * @return reference to the newly created object */ public static VBD create(Connection c, VBD.Record record) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.create"; String session = c.getSessionReference(); Map record_map = record.toMap(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(record_map)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVBD(result); + return Types.toVBD(result); } /** @@ -323,9 +324,9 @@ public class VBD extends XenAPIObject { * @return Task */ public Task destroyAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VBD.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -339,9 +340,9 @@ public class VBD extends XenAPIObject { * */ public void destroy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -355,15 +356,15 @@ public class VBD extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -372,15 +373,15 @@ public class VBD extends XenAPIObject { * @return value of the field */ public Set getAllowedOperations(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.get_allowed_operations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVbdOperations(result); + return Types.toSetOfVbdOperations(result); } /** @@ -389,15 +390,15 @@ public class VBD extends XenAPIObject { * @return value of the field */ public Map getCurrentOperations(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.get_current_operations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringVbdOperations(result); + return Types.toMapOfStringVbdOperations(result); } /** @@ -406,15 +407,15 @@ public class VBD extends XenAPIObject { * @return value of the field */ public VM getVM(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.get_VM"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVM(result); + return Types.toVM(result); } /** @@ -423,15 +424,15 @@ public class VBD extends XenAPIObject { * @return value of the field */ public VDI getVDI(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.get_VDI"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVDI(result); + return Types.toVDI(result); } /** @@ -440,15 +441,15 @@ public class VBD extends XenAPIObject { * @return value of the field */ public String getDevice(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.get_device"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -457,15 +458,15 @@ public class VBD extends XenAPIObject { * @return value of the field */ public String getUserdevice(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.get_userdevice"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -474,15 +475,15 @@ public class VBD extends XenAPIObject { * @return value of the field */ public Boolean getBootable(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.get_bootable"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -491,15 +492,15 @@ public class VBD extends XenAPIObject { * @return value of the field */ public Types.VbdMode getMode(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.get_mode"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVbdMode(result); + return Types.toVbdMode(result); } /** @@ -508,15 +509,15 @@ public class VBD extends XenAPIObject { * @return value of the field */ public Types.VbdType getType(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.get_type"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVbdType(result); + return Types.toVbdType(result); } /** @@ -525,15 +526,15 @@ public class VBD extends XenAPIObject { * @return value of the field */ public Boolean getUnpluggable(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.get_unpluggable"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -542,15 +543,15 @@ public class VBD extends XenAPIObject { * @return value of the field */ public Boolean getStorageLock(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.get_storage_lock"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -559,15 +560,15 @@ public class VBD extends XenAPIObject { * @return value of the field */ public Boolean getEmpty(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.get_empty"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -576,15 +577,15 @@ public class VBD extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -593,15 +594,15 @@ public class VBD extends XenAPIObject { * @return value of the field */ public Boolean getCurrentlyAttached(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.get_currently_attached"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -610,15 +611,15 @@ public class VBD extends XenAPIObject { * @return value of the field */ public Long getStatusCode(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.get_status_code"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -627,15 +628,15 @@ public class VBD extends XenAPIObject { * @return value of the field */ public String getStatusDetail(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.get_status_detail"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -644,15 +645,15 @@ public class VBD extends XenAPIObject { * @return value of the field */ public Map getRuntimeProperties(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.get_runtime_properties"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -661,15 +662,15 @@ public class VBD extends XenAPIObject { * @return value of the field */ public String getQosAlgorithmType(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.get_qos_algorithm_type"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -678,15 +679,15 @@ public class VBD extends XenAPIObject { * @return value of the field */ public Map getQosAlgorithmParams(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.get_qos_algorithm_params"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -695,15 +696,15 @@ public class VBD extends XenAPIObject { * @return value of the field */ public Set getQosSupportedAlgorithms(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.get_qos_supported_algorithms"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -712,15 +713,15 @@ public class VBD extends XenAPIObject { * @return value of the field */ public VBDMetrics getMetrics(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.get_metrics"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVBDMetrics(result); + return Types.toVBDMetrics(result); } /** @@ -729,9 +730,9 @@ public class VBD extends XenAPIObject { * @param userdevice New value to set */ public void setUserdevice(Connection c, String userdevice) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.set_userdevice"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(userdevice)}; @@ -745,9 +746,9 @@ public class VBD extends XenAPIObject { * @param bootable New value to set */ public void setBootable(Connection c, Boolean bootable) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.set_bootable"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(bootable)}; @@ -761,9 +762,9 @@ public class VBD extends XenAPIObject { * @param mode New value to set */ public void setMode(Connection c, Types.VbdMode mode) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.set_mode"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(mode)}; @@ -777,9 +778,9 @@ public class VBD extends XenAPIObject { * @param type New value to set */ public void setType(Connection c, Types.VbdType type) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.set_type"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(type)}; @@ -793,9 +794,9 @@ public class VBD extends XenAPIObject { * @param unpluggable New value to set */ public void setUnpluggable(Connection c, Boolean unpluggable) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.set_unpluggable"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(unpluggable)}; @@ -809,9 +810,9 @@ public class VBD extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -826,9 +827,9 @@ public class VBD extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -842,9 +843,9 @@ public class VBD extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -858,9 +859,9 @@ public class VBD extends XenAPIObject { * @param algorithmType New value to set */ public void setQosAlgorithmType(Connection c, String algorithmType) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.set_qos_algorithm_type"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(algorithmType)}; @@ -874,9 +875,9 @@ public class VBD extends XenAPIObject { * @param algorithmParams New value to set */ public void setQosAlgorithmParams(Connection c, Map algorithmParams) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.set_qos_algorithm_params"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(algorithmParams)}; @@ -891,9 +892,9 @@ public class VBD extends XenAPIObject { * @param value Value to add */ public void addToQosAlgorithmParams(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.add_to_qos_algorithm_params"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -907,9 +908,9 @@ public class VBD extends XenAPIObject { * @param key Key to remove */ public void removeFromQosAlgorithmParams(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.remove_from_qos_algorithm_params"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -923,11 +924,11 @@ public class VBD extends XenAPIObject { * @return Task */ public Task ejectAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VbdNotRemovableMedia, - Types.VbdIsEmpty { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VbdNotRemovableMedia, + Types.VbdIsEmpty { String method_call = "Async.VBD.eject"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -941,11 +942,11 @@ public class VBD extends XenAPIObject { * */ public void eject(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VbdNotRemovableMedia, - Types.VbdIsEmpty { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VbdNotRemovableMedia, + Types.VbdIsEmpty { String method_call = "VBD.eject"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -960,11 +961,11 @@ public class VBD extends XenAPIObject { * @return Task */ public Task insertAsync(Connection c, VDI vdi) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VbdNotRemovableMedia, - Types.VbdNotEmpty { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VbdNotRemovableMedia, + Types.VbdNotEmpty { String method_call = "Async.VBD.insert"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(vdi)}; @@ -979,11 +980,11 @@ public class VBD extends XenAPIObject { * @param vdi The new VDI to 'insert' */ public void insert(Connection c, VDI vdi) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VbdNotRemovableMedia, - Types.VbdNotEmpty { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VbdNotRemovableMedia, + Types.VbdNotEmpty { String method_call = "VBD.insert"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(vdi)}; @@ -997,9 +998,9 @@ public class VBD extends XenAPIObject { * @return Task */ public Task plugAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VBD.plug"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1013,9 +1014,9 @@ public class VBD extends XenAPIObject { * */ public void plug(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.plug"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1029,11 +1030,11 @@ public class VBD extends XenAPIObject { * @return Task */ public Task unplugAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.DeviceDetachRejected, - Types.DeviceAlreadyDetached { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.DeviceDetachRejected, + Types.DeviceAlreadyDetached { String method_call = "Async.VBD.unplug"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1047,11 +1048,11 @@ public class VBD extends XenAPIObject { * */ public void unplug(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.DeviceDetachRejected, - Types.DeviceAlreadyDetached { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.DeviceDetachRejected, + Types.DeviceAlreadyDetached { String method_call = "VBD.unplug"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1065,9 +1066,9 @@ public class VBD extends XenAPIObject { * @return Task */ public Task unplugForceAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VBD.unplug_force"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1081,9 +1082,9 @@ public class VBD extends XenAPIObject { * */ public void unplugForce(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.unplug_force"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1097,9 +1098,9 @@ public class VBD extends XenAPIObject { * @return Task */ public Task assertAttachableAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VBD.assert_attachable"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1113,9 +1114,9 @@ public class VBD extends XenAPIObject { * */ public void assertAttachable(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.assert_attachable"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1129,15 +1130,15 @@ public class VBD extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVBD(result); + return Types.toSetOfVBD(result); } /** @@ -1146,15 +1147,15 @@ public class VBD extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfVBDVBDRecord(result); + return Types.toMapOfVBDVBDRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/VBDMetrics.java b/deps/XenServerJava/src/com/xensource/xenapi/VBDMetrics.java index 1f678faecdb..a58e5e0e614 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/VBDMetrics.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/VBDMetrics.java @@ -1,19 +1,19 @@ /* * 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 @@ -28,6 +28,7 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ + package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -60,14 +61,14 @@ public class VBDMetrics extends XenAPIObject { * For internal use only. */ VBDMetrics(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -78,7 +79,7 @@ public class VBDMetrics extends XenAPIObject { { if (obj != null && obj instanceof VBDMetrics) { - VBDMetrics other = (VBDMetrics)obj; + VBDMetrics other = (VBDMetrics) obj; return other.ref.equals(this.ref); } else { @@ -110,8 +111,8 @@ public class VBDMetrics extends XenAPIObject { /** * Convert a VBD_metrics.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("io_read_kbs", this.ioReadKbs == null ? 0.0 : this.ioReadKbs); map.put("io_write_kbs", this.ioWriteKbs == null ? 0.0 : this.ioWriteKbs); @@ -148,15 +149,15 @@ public class VBDMetrics extends XenAPIObject { * @return all fields from the object */ public VBDMetrics.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD_metrics.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVBDMetricsRecord(result); + return Types.toVBDMetricsRecord(result); } /** @@ -166,15 +167,15 @@ public class VBDMetrics extends XenAPIObject { * @return reference to the object */ public static VBDMetrics getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD_metrics.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVBDMetrics(result); + return Types.toVBDMetrics(result); } /** @@ -183,15 +184,15 @@ public class VBDMetrics extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD_metrics.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -200,15 +201,15 @@ public class VBDMetrics extends XenAPIObject { * @return value of the field */ public Double getIoReadKbs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD_metrics.get_io_read_kbs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDouble(result); + return Types.toDouble(result); } /** @@ -217,15 +218,15 @@ public class VBDMetrics extends XenAPIObject { * @return value of the field */ public Double getIoWriteKbs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD_metrics.get_io_write_kbs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDouble(result); + return Types.toDouble(result); } /** @@ -234,15 +235,15 @@ public class VBDMetrics extends XenAPIObject { * @return value of the field */ public Date getLastUpdated(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD_metrics.get_last_updated"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDate(result); + return Types.toDate(result); } /** @@ -251,15 +252,15 @@ public class VBDMetrics extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD_metrics.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -268,9 +269,9 @@ public class VBDMetrics extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD_metrics.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -285,9 +286,9 @@ public class VBDMetrics extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD_metrics.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -301,9 +302,9 @@ public class VBDMetrics extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD_metrics.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -317,15 +318,15 @@ public class VBDMetrics extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD_metrics.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVBDMetrics(result); + return Types.toSetOfVBDMetrics(result); } /** @@ -334,15 +335,15 @@ public class VBDMetrics extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD_metrics.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfVBDMetricsVBDMetricsRecord(result); + return Types.toMapOfVBDMetricsVBDMetricsRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/VDI.java b/deps/XenServerJava/src/com/xensource/xenapi/VDI.java index 992a6a6d898..cf8d3eca1fc 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/VDI.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/VDI.java @@ -1,19 +1,19 @@ /* * 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 @@ -28,6 +28,7 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ + package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -60,14 +61,14 @@ public class VDI extends XenAPIObject { * For internal use only. */ VDI(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -78,7 +79,7 @@ public class VDI extends XenAPIObject { { if (obj != null && obj instanceof VDI) { - VDI other = (VDI)obj; + VDI other = (VDI) obj; return other.ref.equals(this.ref); } else { @@ -135,8 +136,8 @@ public class VDI extends XenAPIObject { /** * Convert a VDI.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("name_label", this.nameLabel == null ? "" : this.nameLabel); map.put("name_description", this.nameDescription == null ? "" : this.nameDescription); @@ -235,7 +236,7 @@ public class VDI extends XenAPIObject { */ public String location; /** - * + * */ public Boolean managed; /** @@ -298,15 +299,15 @@ public class VDI extends XenAPIObject { * @return all fields from the object */ public VDI.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVDIRecord(result); + return Types.toVDIRecord(result); } /** @@ -316,15 +317,15 @@ public class VDI extends XenAPIObject { * @return reference to the object */ public static VDI getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVDI(result); + return Types.toVDI(result); } /** @@ -334,9 +335,9 @@ public class VDI extends XenAPIObject { * @return Task */ public static Task createAsync(Connection c, VDI.Record record) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VDI.create"; String session = c.getSessionReference(); Map record_map = record.toMap(); @@ -353,16 +354,16 @@ public class VDI extends XenAPIObject { * @return reference to the newly created object */ public static VDI create(Connection c, VDI.Record record) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.create"; String session = c.getSessionReference(); Map record_map = record.toMap(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(record_map)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVDI(result); + return Types.toVDI(result); } /** @@ -371,9 +372,9 @@ public class VDI extends XenAPIObject { * @return Task */ public Task destroyAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VDI.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -387,9 +388,9 @@ public class VDI extends XenAPIObject { * */ public void destroy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -404,15 +405,15 @@ public class VDI extends XenAPIObject { * @return references to objects with matching names */ public static Set getByNameLabel(Connection c, String label) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_by_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(label)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVDI(result); + return Types.toSetOfVDI(result); } /** @@ -421,15 +422,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -438,15 +439,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public String getNameLabel(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -455,15 +456,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public String getNameDescription(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_name_description"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -472,15 +473,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public Set getAllowedOperations(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_allowed_operations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVdiOperations(result); + return Types.toSetOfVdiOperations(result); } /** @@ -489,15 +490,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public Map getCurrentOperations(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_current_operations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringVdiOperations(result); + return Types.toMapOfStringVdiOperations(result); } /** @@ -506,15 +507,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public SR getSR(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_SR"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSR(result); + return Types.toSR(result); } /** @@ -523,15 +524,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public Set getVBDs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_VBDs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVBD(result); + return Types.toSetOfVBD(result); } /** @@ -540,15 +541,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public Set getCrashDumps(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_crash_dumps"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfCrashdump(result); + return Types.toSetOfCrashdump(result); } /** @@ -557,15 +558,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public Long getVirtualSize(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_virtual_size"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -574,15 +575,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public Long getPhysicalUtilisation(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_physical_utilisation"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -591,15 +592,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public Types.VdiType getType(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_type"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVdiType(result); + return Types.toVdiType(result); } /** @@ -608,15 +609,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public Boolean getSharable(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_sharable"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -625,15 +626,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public Boolean getReadOnly(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_read_only"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -642,15 +643,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -659,15 +660,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public Boolean getStorageLock(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_storage_lock"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -676,15 +677,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public String getLocation(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_location"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -693,15 +694,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public Boolean getManaged(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_managed"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -710,15 +711,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public Boolean getMissing(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_missing"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -727,15 +728,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public VDI getParent(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_parent"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVDI(result); + return Types.toVDI(result); } /** @@ -744,15 +745,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public Map getXenstoreData(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_xenstore_data"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -761,15 +762,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public Map getSmConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_sm_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -778,15 +779,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public Boolean getIsASnapshot(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_is_a_snapshot"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -795,15 +796,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public VDI getSnapshotOf(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_snapshot_of"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVDI(result); + return Types.toVDI(result); } /** @@ -812,15 +813,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public Set getSnapshots(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_snapshots"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVDI(result); + return Types.toSetOfVDI(result); } /** @@ -829,15 +830,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public Date getSnapshotTime(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_snapshot_time"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDate(result); + return Types.toDate(result); } /** @@ -846,15 +847,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public Set getTags(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_tags"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -863,15 +864,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public Boolean getAllowCaching(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_allow_caching"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -880,15 +881,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public Types.OnBoot getOnBoot(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_on_boot"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toOnBoot(result); + return Types.toOnBoot(result); } /** @@ -897,15 +898,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public Pool getMetadataOfPool(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_metadata_of_pool"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPool(result); + return Types.toPool(result); } /** @@ -914,15 +915,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public Boolean getMetadataLatest(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_metadata_latest"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -931,9 +932,9 @@ public class VDI extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -948,9 +949,9 @@ public class VDI extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -964,9 +965,9 @@ public class VDI extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -980,9 +981,9 @@ public class VDI extends XenAPIObject { * @param xenstoreData New value to set */ public void setXenstoreData(Connection c, Map xenstoreData) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.set_xenstore_data"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(xenstoreData)}; @@ -997,9 +998,9 @@ public class VDI extends XenAPIObject { * @param value Value to add */ public void addToXenstoreData(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.add_to_xenstore_data"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -1013,9 +1014,9 @@ public class VDI extends XenAPIObject { * @param key Key to remove */ public void removeFromXenstoreData(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.remove_from_xenstore_data"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -1029,9 +1030,9 @@ public class VDI extends XenAPIObject { * @param smConfig New value to set */ public void setSmConfig(Connection c, Map smConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.set_sm_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(smConfig)}; @@ -1046,9 +1047,9 @@ public class VDI extends XenAPIObject { * @param value Value to add */ public void addToSmConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.add_to_sm_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -1062,9 +1063,9 @@ public class VDI extends XenAPIObject { * @param key Key to remove */ public void removeFromSmConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.remove_from_sm_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -1078,9 +1079,9 @@ public class VDI extends XenAPIObject { * @param tags New value to set */ public void setTags(Connection c, Set tags) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.set_tags"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(tags)}; @@ -1094,9 +1095,9 @@ public class VDI extends XenAPIObject { * @param value New value to add */ public void addTags(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.add_tags"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1110,9 +1111,9 @@ public class VDI extends XenAPIObject { * @param value Value to remove */ public void removeTags(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.remove_tags"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1127,38 +1128,9 @@ public class VDI extends XenAPIObject { * @return Task */ public Task snapshotAsync(Connection c, Map driverParams) throws - BadServerResponse, - VersionException, - XenAPIException, - XmlRpcException { - - if (c.rioConnection) { - if (driverParams.isEmpty()) { - return rioSnapshotAsync(c); - } else { - throw new Types.VersionException("driverParams parameter must be empty map for Rio (legacy XenServer) host"); - } - } else { - return miamiSnapshotAsync(c, driverParams); - } - } - - private Task rioSnapshotAsync(Connection c) throws - BadServerResponse, - XmlRpcException, - XenAPIException { - String method_call = "Async.VDI.snapshot"; - String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; - Map response = c.dispatch(method_call, method_params); - Object result = response.get("Value"); - return Types.toTask(result); - } - - private Task miamiSnapshotAsync(Connection c, Map driverParams) throws - BadServerResponse, - XmlRpcException, - XenAPIException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VDI.snapshot"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(driverParams)}; @@ -1174,44 +1146,15 @@ public class VDI extends XenAPIObject { * @return The ID of the newly created VDI. */ public VDI snapshot(Connection c, Map driverParams) throws - BadServerResponse, - VersionException, - XenAPIException, - XmlRpcException { - - if (c.rioConnection) { - if (driverParams.isEmpty()) { - return rioSnapshot(c); - } else { - throw new Types.VersionException("driverParams parameter must be empty map for Rio (legacy XenServer) host"); - } - } else { - return miamiSnapshot(c, driverParams); - } - } - - private VDI rioSnapshot(Connection c) throws - BadServerResponse, - XmlRpcException, - XenAPIException { - String method_call = "VDI.snapshot"; - String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; - Map response = c.dispatch(method_call, method_params); - Object result = response.get("Value"); - return Types.toVDI(result); - } - - private VDI miamiSnapshot(Connection c, Map driverParams) throws - BadServerResponse, - XmlRpcException, - XenAPIException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.snapshot"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(driverParams)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVDI(result); + return Types.toVDI(result); } /** @@ -1221,38 +1164,9 @@ public class VDI extends XenAPIObject { * @return Task */ public Task createCloneAsync(Connection c, Map driverParams) throws - BadServerResponse, - VersionException, - XenAPIException, - XmlRpcException { - - if (c.rioConnection) { - if (driverParams.isEmpty()) { - return rioCreateCloneAsync(c); - } else { - throw new Types.VersionException("driverParams parameter must be empty map for Rio (legacy XenServer) host"); - } - } else { - return miamiCreateCloneAsync(c, driverParams); - } - } - - private Task rioCreateCloneAsync(Connection c) throws - BadServerResponse, - XmlRpcException, - XenAPIException { - String method_call = "Async.VDI.clone"; - String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; - Map response = c.dispatch(method_call, method_params); - Object result = response.get("Value"); - return Types.toTask(result); - } - - private Task miamiCreateCloneAsync(Connection c, Map driverParams) throws - BadServerResponse, - XmlRpcException, - XenAPIException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VDI.clone"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(driverParams)}; @@ -1268,44 +1182,15 @@ public class VDI extends XenAPIObject { * @return The ID of the newly created VDI. */ public VDI createClone(Connection c, Map driverParams) throws - BadServerResponse, - VersionException, - XenAPIException, - XmlRpcException { - - if (c.rioConnection) { - if (driverParams.isEmpty()) { - return rioCreateClone(c); - } else { - throw new Types.VersionException("driverParams parameter must be empty map for Rio (legacy XenServer) host"); - } - } else { - return miamiCreateClone(c, driverParams); - } - } - - private VDI rioCreateClone(Connection c) throws - BadServerResponse, - XmlRpcException, - XenAPIException { - String method_call = "VDI.clone"; - String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; - Map response = c.dispatch(method_call, method_params); - Object result = response.get("Value"); - return Types.toVDI(result); - } - - private VDI miamiCreateClone(Connection c, Map driverParams) throws - BadServerResponse, - XmlRpcException, - XenAPIException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.clone"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(driverParams)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVDI(result); + return Types.toVDI(result); } /** @@ -1315,9 +1200,9 @@ public class VDI extends XenAPIObject { * @return Task */ public Task resizeAsync(Connection c, Long size) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VDI.resize"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(size)}; @@ -1332,9 +1217,9 @@ public class VDI extends XenAPIObject { * @param size The new size of the VDI */ public void resize(Connection c, Long size) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.resize"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(size)}; @@ -1349,9 +1234,9 @@ public class VDI extends XenAPIObject { * @return Task */ public Task resizeOnlineAsync(Connection c, Long size) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VDI.resize_online"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(size)}; @@ -1366,9 +1251,9 @@ public class VDI extends XenAPIObject { * @param size The new size of the VDI */ public void resizeOnline(Connection c, Long size) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.resize_online"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(size)}; @@ -1399,20 +1284,14 @@ public class VDI extends XenAPIObject { * @param snapshotOf Storage-specific config * @return Task */ - public static Task introduceAsync(Connection c, String uuid, String nameLabel, String nameDescription, SR SR, Types.VdiType type, Boolean sharable, Boolean readOnly, - Map otherConfig, String location, Map xenstoreData, Map smConfig, Boolean managed, Long virtualSize, - Long physicalUtilisation, Pool metadataOfPool, Boolean isASnapshot, Date snapshotTime, VDI snapshotOf) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.SrOperationNotSupported { + public static Task introduceAsync(Connection c, String uuid, String nameLabel, String nameDescription, SR SR, Types.VdiType type, Boolean sharable, Boolean readOnly, Map otherConfig, String location, Map xenstoreData, Map smConfig, Boolean managed, Long virtualSize, Long physicalUtilisation, Pool metadataOfPool, Boolean isASnapshot, Date snapshotTime, VDI snapshotOf) throws + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.SrOperationNotSupported { String method_call = "Async.VDI.introduce"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid), Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), - Marshalling.toXMLRPC(SR), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(sharable), Marshalling.toXMLRPC(readOnly), Marshalling.toXMLRPC(otherConfig), - Marshalling.toXMLRPC(location), Marshalling.toXMLRPC(xenstoreData), Marshalling.toXMLRPC(smConfig), Marshalling.toXMLRPC(managed), - Marshalling.toXMLRPC(virtualSize), Marshalling.toXMLRPC(physicalUtilisation), Marshalling.toXMLRPC(metadataOfPool), Marshalling.toXMLRPC(isASnapshot), - Marshalling.toXMLRPC(snapshotTime), Marshalling.toXMLRPC(snapshotOf)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid), Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), Marshalling.toXMLRPC(SR), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(sharable), Marshalling.toXMLRPC(readOnly), Marshalling.toXMLRPC(otherConfig), Marshalling.toXMLRPC(location), Marshalling.toXMLRPC(xenstoreData), Marshalling.toXMLRPC(smConfig), Marshalling.toXMLRPC(managed), Marshalling.toXMLRPC(virtualSize), Marshalling.toXMLRPC(physicalUtilisation), Marshalling.toXMLRPC(metadataOfPool), Marshalling.toXMLRPC(isASnapshot), Marshalling.toXMLRPC(snapshotTime), Marshalling.toXMLRPC(snapshotOf)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); @@ -1441,23 +1320,17 @@ public class VDI extends XenAPIObject { * @param snapshotOf Storage-specific config * @return The ref of the newly created VDI record. */ - public static VDI introduce(Connection c, String uuid, String nameLabel, String nameDescription, SR SR, Types.VdiType type, Boolean sharable, Boolean readOnly, - Map otherConfig, String location, Map xenstoreData, Map smConfig, Boolean managed, Long virtualSize, - Long physicalUtilisation, Pool metadataOfPool, Boolean isASnapshot, Date snapshotTime, VDI snapshotOf) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.SrOperationNotSupported { + public static VDI introduce(Connection c, String uuid, String nameLabel, String nameDescription, SR SR, Types.VdiType type, Boolean sharable, Boolean readOnly, Map otherConfig, String location, Map xenstoreData, Map smConfig, Boolean managed, Long virtualSize, Long physicalUtilisation, Pool metadataOfPool, Boolean isASnapshot, Date snapshotTime, VDI snapshotOf) throws + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.SrOperationNotSupported { String method_call = "VDI.introduce"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid), Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), - Marshalling.toXMLRPC(SR), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(sharable), Marshalling.toXMLRPC(readOnly), Marshalling.toXMLRPC(otherConfig), - Marshalling.toXMLRPC(location), Marshalling.toXMLRPC(xenstoreData), Marshalling.toXMLRPC(smConfig), Marshalling.toXMLRPC(managed), - Marshalling.toXMLRPC(virtualSize), Marshalling.toXMLRPC(physicalUtilisation), Marshalling.toXMLRPC(metadataOfPool), Marshalling.toXMLRPC(isASnapshot), - Marshalling.toXMLRPC(snapshotTime), Marshalling.toXMLRPC(snapshotOf)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid), Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), Marshalling.toXMLRPC(SR), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(sharable), Marshalling.toXMLRPC(readOnly), Marshalling.toXMLRPC(otherConfig), Marshalling.toXMLRPC(location), Marshalling.toXMLRPC(xenstoreData), Marshalling.toXMLRPC(smConfig), Marshalling.toXMLRPC(managed), Marshalling.toXMLRPC(virtualSize), Marshalling.toXMLRPC(physicalUtilisation), Marshalling.toXMLRPC(metadataOfPool), Marshalling.toXMLRPC(isASnapshot), Marshalling.toXMLRPC(snapshotTime), Marshalling.toXMLRPC(snapshotOf)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVDI(result); + return Types.toVDI(result); } /** @@ -1483,19 +1356,13 @@ public class VDI extends XenAPIObject { * @param snapshotOf Storage-specific config * @return Task */ - public static Task dbIntroduceAsync(Connection c, String uuid, String nameLabel, String nameDescription, SR SR, Types.VdiType type, Boolean sharable, - Boolean readOnly, Map otherConfig, String location, Map xenstoreData, Map smConfig, Boolean managed, - Long virtualSize, Long physicalUtilisation, Pool metadataOfPool, Boolean isASnapshot, Date snapshotTime, VDI snapshotOf) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + public static Task dbIntroduceAsync(Connection c, String uuid, String nameLabel, String nameDescription, SR SR, Types.VdiType type, Boolean sharable, Boolean readOnly, Map otherConfig, String location, Map xenstoreData, Map smConfig, Boolean managed, Long virtualSize, Long physicalUtilisation, Pool metadataOfPool, Boolean isASnapshot, Date snapshotTime, VDI snapshotOf) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VDI.db_introduce"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid), Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), - Marshalling.toXMLRPC(SR), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(sharable), Marshalling.toXMLRPC(readOnly), Marshalling.toXMLRPC(otherConfig), - Marshalling.toXMLRPC(location), Marshalling.toXMLRPC(xenstoreData), Marshalling.toXMLRPC(smConfig), Marshalling.toXMLRPC(managed), - Marshalling.toXMLRPC(virtualSize), Marshalling.toXMLRPC(physicalUtilisation), Marshalling.toXMLRPC(metadataOfPool), Marshalling.toXMLRPC(isASnapshot), - Marshalling.toXMLRPC(snapshotTime), Marshalling.toXMLRPC(snapshotOf)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid), Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), Marshalling.toXMLRPC(SR), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(sharable), Marshalling.toXMLRPC(readOnly), Marshalling.toXMLRPC(otherConfig), Marshalling.toXMLRPC(location), Marshalling.toXMLRPC(xenstoreData), Marshalling.toXMLRPC(smConfig), Marshalling.toXMLRPC(managed), Marshalling.toXMLRPC(virtualSize), Marshalling.toXMLRPC(physicalUtilisation), Marshalling.toXMLRPC(metadataOfPool), Marshalling.toXMLRPC(isASnapshot), Marshalling.toXMLRPC(snapshotTime), Marshalling.toXMLRPC(snapshotOf)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); @@ -1524,22 +1391,16 @@ public class VDI extends XenAPIObject { * @param snapshotOf Storage-specific config * @return The ref of the newly created VDI record. */ - public static VDI dbIntroduce(Connection c, String uuid, String nameLabel, String nameDescription, SR SR, Types.VdiType type, Boolean sharable, Boolean readOnly, - Map otherConfig, String location, Map xenstoreData, Map smConfig, Boolean managed, Long virtualSize, - Long physicalUtilisation, Pool metadataOfPool, Boolean isASnapshot, Date snapshotTime, VDI snapshotOf) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + public static VDI dbIntroduce(Connection c, String uuid, String nameLabel, String nameDescription, SR SR, Types.VdiType type, Boolean sharable, Boolean readOnly, Map otherConfig, String location, Map xenstoreData, Map smConfig, Boolean managed, Long virtualSize, Long physicalUtilisation, Pool metadataOfPool, Boolean isASnapshot, Date snapshotTime, VDI snapshotOf) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.db_introduce"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid), Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), - Marshalling.toXMLRPC(SR), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(sharable), Marshalling.toXMLRPC(readOnly), Marshalling.toXMLRPC(otherConfig), - Marshalling.toXMLRPC(location), Marshalling.toXMLRPC(xenstoreData), Marshalling.toXMLRPC(smConfig), Marshalling.toXMLRPC(managed), - Marshalling.toXMLRPC(virtualSize), Marshalling.toXMLRPC(physicalUtilisation), Marshalling.toXMLRPC(metadataOfPool), Marshalling.toXMLRPC(isASnapshot), - Marshalling.toXMLRPC(snapshotTime), Marshalling.toXMLRPC(snapshotOf)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid), Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), Marshalling.toXMLRPC(SR), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(sharable), Marshalling.toXMLRPC(readOnly), Marshalling.toXMLRPC(otherConfig), Marshalling.toXMLRPC(location), Marshalling.toXMLRPC(xenstoreData), Marshalling.toXMLRPC(smConfig), Marshalling.toXMLRPC(managed), Marshalling.toXMLRPC(virtualSize), Marshalling.toXMLRPC(physicalUtilisation), Marshalling.toXMLRPC(metadataOfPool), Marshalling.toXMLRPC(isASnapshot), Marshalling.toXMLRPC(snapshotTime), Marshalling.toXMLRPC(snapshotOf)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVDI(result); + return Types.toVDI(result); } /** @@ -1548,9 +1409,9 @@ public class VDI extends XenAPIObject { * @return Task */ public Task dbForgetAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VDI.db_forget"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1564,9 +1425,9 @@ public class VDI extends XenAPIObject { * */ public void dbForget(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.db_forget"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1580,10 +1441,10 @@ public class VDI extends XenAPIObject { * @return Task */ public Task updateAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.SrOperationNotSupported { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.SrOperationNotSupported { String method_call = "Async.VDI.update"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1597,10 +1458,10 @@ public class VDI extends XenAPIObject { * */ public void update(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.SrOperationNotSupported { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.SrOperationNotSupported { String method_call = "VDI.update"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1608,29 +1469,6 @@ public class VDI extends XenAPIObject { return; } - /** - * Copy either a full VDI or the block differences between two VDIs into either a fresh VDI or an existing VDI. - * - * @param sr The destination SR (only required if the destination VDI is not specified - * @param baseVdi The base VDI (only required if copying only changed blocks, by default all blocks will be copied) - * @param intoVdi The destination VDI to copy blocks into (if omitted then a destination SR must be provided and a fresh VDI will be created) - * @return Task - */ - public Task copyAsync2(Connection c, SR sr, VDI baseVdi, VDI intoVdi) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VdiReadonly, - Types.VdiTooSmall, - Types.VdiNotSparse { - String method_call = "Async.VDI.copy"; - String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(sr), Marshalling.toXMLRPC(baseVdi), Marshalling.toXMLRPC(intoVdi)}; - Map response = c.dispatch(method_call, method_params); - Object result = response.get("Value"); - return Types.toTask(result); - } - /** * Make a fresh VDI in the specified SR and copy the supplied VDI's data to the new disk * @@ -1638,9 +1476,9 @@ public class VDI extends XenAPIObject { * @return Task */ public Task copyAsync(Connection c, SR sr) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VDI.copy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(sr)}; @@ -1656,15 +1494,15 @@ public class VDI extends XenAPIObject { * @return The reference of the newly created VDI. */ public VDI copy(Connection c, SR sr) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.copy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(sr)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVDI(result); + return Types.toVDI(result); } /** @@ -1673,9 +1511,9 @@ public class VDI extends XenAPIObject { * @param value The new value of the VDI's managed field */ public void setManaged(Connection c, Boolean value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.set_managed"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1689,9 +1527,9 @@ public class VDI extends XenAPIObject { * @return Task */ public Task forgetAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VDI.forget"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1705,9 +1543,9 @@ public class VDI extends XenAPIObject { * */ public void forget(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.forget"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1721,9 +1559,9 @@ public class VDI extends XenAPIObject { * @param value The new value of the VDI's sharable field */ public void setSharable(Connection c, Boolean value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.set_sharable"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1737,9 +1575,9 @@ public class VDI extends XenAPIObject { * @param value The new value of the VDI's read_only field */ public void setReadOnly(Connection c, Boolean value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.set_read_only"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1753,9 +1591,9 @@ public class VDI extends XenAPIObject { * @param value The new value of the VDI's missing field */ public void setMissing(Connection c, Boolean value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.set_missing"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1769,9 +1607,9 @@ public class VDI extends XenAPIObject { * @param value The new value of the VDI's virtual size */ public void setVirtualSize(Connection c, Long value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.set_virtual_size"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1785,9 +1623,9 @@ public class VDI extends XenAPIObject { * @param value The new value of the VDI's physical utilisation */ public void setPhysicalUtilisation(Connection c, Long value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.set_physical_utilisation"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1801,9 +1639,9 @@ public class VDI extends XenAPIObject { * @param value The new value indicating whether this VDI is a snapshot */ public void setIsASnapshot(Connection c, Boolean value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.set_is_a_snapshot"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1817,9 +1655,9 @@ public class VDI extends XenAPIObject { * @param value The VDI of which this VDI is a snapshot */ public void setSnapshotOf(Connection c, VDI value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.set_snapshot_of"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1833,9 +1671,9 @@ public class VDI extends XenAPIObject { * @param value The snapshot time of this VDI. */ public void setSnapshotTime(Connection c, Date value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.set_snapshot_time"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1849,9 +1687,9 @@ public class VDI extends XenAPIObject { * @param value The pool whose metadata is contained by this VDI */ public void setMetadataOfPool(Connection c, Pool value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.set_metadata_of_pool"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1866,9 +1704,9 @@ public class VDI extends XenAPIObject { * @return Task */ public Task setNameLabelAsync(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VDI.set_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1883,9 +1721,9 @@ public class VDI extends XenAPIObject { * @param value The name lable for the VDI */ public void setNameLabel(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.set_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1900,9 +1738,9 @@ public class VDI extends XenAPIObject { * @return Task */ public Task setNameDescriptionAsync(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VDI.set_name_description"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1917,9 +1755,9 @@ public class VDI extends XenAPIObject { * @param value The name description for the VDI */ public void setNameDescription(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.set_name_description"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1934,9 +1772,9 @@ public class VDI extends XenAPIObject { * @return Task */ public Task setOnBootAsync(Connection c, Types.OnBoot value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VDI.set_on_boot"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1951,9 +1789,9 @@ public class VDI extends XenAPIObject { * @param value The value to set */ public void setOnBoot(Connection c, Types.OnBoot value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.set_on_boot"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1968,9 +1806,9 @@ public class VDI extends XenAPIObject { * @return Task */ public Task setAllowCachingAsync(Connection c, Boolean value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VDI.set_allow_caching"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1985,9 +1823,9 @@ public class VDI extends XenAPIObject { * @param value The value to set */ public void setAllowCaching(Connection c, Boolean value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.set_allow_caching"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -2001,9 +1839,9 @@ public class VDI extends XenAPIObject { * @return Task */ public Task openDatabaseAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VDI.open_database"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -2018,15 +1856,15 @@ public class VDI extends XenAPIObject { * @return A session which can be used to query the database */ public Session openDatabase(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.open_database"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSession(result); + return Types.toSession(result); } /** @@ -2035,9 +1873,9 @@ public class VDI extends XenAPIObject { * @return Task */ public Task readDatabasePoolUuidAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VDI.read_database_pool_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -2052,15 +1890,15 @@ public class VDI extends XenAPIObject { * @return The cached pool UUID of the database on the VDI. */ public String readDatabasePoolUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.read_database_pool_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -2071,9 +1909,9 @@ public class VDI extends XenAPIObject { * @return Task */ public Task poolMigrateAsync(Connection c, SR sr, Map options) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VDI.pool_migrate"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(sr), Marshalling.toXMLRPC(options)}; @@ -2090,15 +1928,15 @@ public class VDI extends XenAPIObject { * @return The new reference of the migrated VDI. */ public VDI poolMigrate(Connection c, SR sr, Map options) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.pool_migrate"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(sr), Marshalling.toXMLRPC(options)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVDI(result); + return Types.toVDI(result); } /** @@ -2107,15 +1945,15 @@ public class VDI extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVDI(result); + return Types.toSetOfVDI(result); } /** @@ -2124,15 +1962,15 @@ public class VDI extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfVDIVDIRecord(result); + return Types.toMapOfVDIVDIRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/VGPU.java b/deps/XenServerJava/src/com/xensource/xenapi/VGPU.java index 19c88fd4561..ebd0a64e173 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/VGPU.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/VGPU.java @@ -1,19 +1,19 @@ /* * 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 @@ -28,6 +28,7 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ + package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -60,14 +61,14 @@ public class VGPU extends XenAPIObject { * For internal use only. */ VGPU(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -78,7 +79,7 @@ public class VGPU extends XenAPIObject { { if (obj != null && obj instanceof VGPU) { - VGPU other = (VGPU)obj; + VGPU other = (VGPU) obj; return other.ref.equals(this.ref); } else { @@ -105,20 +106,24 @@ public class VGPU extends XenAPIObject { print.printf("%1$20s: %2$s\n", "device", this.device); print.printf("%1$20s: %2$s\n", "currentlyAttached", this.currentlyAttached); print.printf("%1$20s: %2$s\n", "otherConfig", this.otherConfig); + print.printf("%1$20s: %2$s\n", "type", this.type); + print.printf("%1$20s: %2$s\n", "residentOn", this.residentOn); return writer.toString(); } /** * Convert a VGPU.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("VM", this.VM == null ? new VM("OpaqueRef:NULL") : this.VM); map.put("GPU_group", this.GPUGroup == null ? new GPUGroup("OpaqueRef:NULL") : this.GPUGroup); map.put("device", this.device == null ? "" : this.device); map.put("currently_attached", this.currentlyAttached == null ? false : this.currentlyAttached); map.put("other_config", this.otherConfig == null ? new HashMap() : this.otherConfig); + map.put("type", this.type == null ? new VGPUType("OpaqueRef:NULL") : this.type); + map.put("resident_on", this.residentOn == null ? new PGPU("OpaqueRef:NULL") : this.residentOn); return map; } @@ -146,6 +151,14 @@ public class VGPU extends XenAPIObject { * Additional configuration */ public Map otherConfig; + /** + * Preset type for this VGPU + */ + public VGPUType type; + /** + * The PGPU on which this VGPU is running + */ + public PGPU residentOn; } /** @@ -154,15 +167,15 @@ public class VGPU extends XenAPIObject { * @return all fields from the object */ public VGPU.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VGPU.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVGPURecord(result); + return Types.toVGPURecord(result); } /** @@ -172,15 +185,15 @@ public class VGPU extends XenAPIObject { * @return reference to the object */ public static VGPU getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VGPU.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVGPU(result); + return Types.toVGPU(result); } /** @@ -189,15 +202,15 @@ public class VGPU extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VGPU.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -206,15 +219,15 @@ public class VGPU extends XenAPIObject { * @return value of the field */ public VM getVM(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VGPU.get_VM"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVM(result); + return Types.toVM(result); } /** @@ -223,15 +236,15 @@ public class VGPU extends XenAPIObject { * @return value of the field */ public GPUGroup getGPUGroup(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VGPU.get_GPU_group"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toGPUGroup(result); + return Types.toGPUGroup(result); } /** @@ -240,15 +253,15 @@ public class VGPU extends XenAPIObject { * @return value of the field */ public String getDevice(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VGPU.get_device"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -257,15 +270,15 @@ public class VGPU extends XenAPIObject { * @return value of the field */ public Boolean getCurrentlyAttached(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VGPU.get_currently_attached"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -274,15 +287,49 @@ public class VGPU extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VGPU.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); + } + + /** + * Get the type field of the given VGPU. + * + * @return value of the field + */ + public VGPUType getType(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { + String method_call = "VGPU.get_type"; + String session = c.getSessionReference(); + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; + Map response = c.dispatch(method_call, method_params); + Object result = response.get("Value"); + return Types.toVGPUType(result); + } + + /** + * Get the resident_on field of the given VGPU. + * + * @return value of the field + */ + public PGPU getResidentOn(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { + String method_call = "VGPU.get_resident_on"; + String session = c.getSessionReference(); + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; + Map response = c.dispatch(method_call, method_params); + Object result = response.get("Value"); + return Types.toPGPU(result); } /** @@ -291,9 +338,9 @@ public class VGPU extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VGPU.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -308,9 +355,9 @@ public class VGPU extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VGPU.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -324,9 +371,9 @@ public class VGPU extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VGPU.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -335,58 +382,58 @@ public class VGPU extends XenAPIObject { } /** + * * - * - * @param VM - * @param GPUGroup - * @param device - * @param otherConfig + * @param VM + * @param GPUGroup + * @param device + * @param otherConfig + * @param type * @return Task */ - public static Task createAsync(Connection c, VM VM, GPUGroup GPUGroup, String device, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + public static Task createAsync(Connection c, VM VM, GPUGroup GPUGroup, String device, Map otherConfig, VGPUType type) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VGPU.create"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(VM), Marshalling.toXMLRPC(GPUGroup), Marshalling.toXMLRPC(device), - Marshalling.toXMLRPC(otherConfig)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(VM), Marshalling.toXMLRPC(GPUGroup), Marshalling.toXMLRPC(device), Marshalling.toXMLRPC(otherConfig), Marshalling.toXMLRPC(type)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); } /** + * * - * - * @param VM - * @param GPUGroup - * @param device - * @param otherConfig + * @param VM + * @param GPUGroup + * @param device + * @param otherConfig + * @param type * @return reference to the newly created object */ - public static VGPU create(Connection c, VM VM, GPUGroup GPUGroup, String device, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + public static VGPU create(Connection c, VM VM, GPUGroup GPUGroup, String device, Map otherConfig, VGPUType type) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VGPU.create"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(VM), Marshalling.toXMLRPC(GPUGroup), Marshalling.toXMLRPC(device), - Marshalling.toXMLRPC(otherConfig)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(VM), Marshalling.toXMLRPC(GPUGroup), Marshalling.toXMLRPC(device), Marshalling.toXMLRPC(otherConfig), Marshalling.toXMLRPC(type)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVGPU(result); + return Types.toVGPU(result); } /** - * + * * * @return Task */ public Task destroyAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VGPU.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -396,13 +443,13 @@ public class VGPU extends XenAPIObject { } /** - * + * * */ public void destroy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VGPU.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -416,15 +463,15 @@ public class VGPU extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VGPU.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVGPU(result); + return Types.toSetOfVGPU(result); } /** @@ -433,15 +480,15 @@ public class VGPU extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VGPU.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfVGPUVGPURecord(result); + return Types.toMapOfVGPUVGPURecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/VGPUType.java b/deps/XenServerJava/src/com/xensource/xenapi/VGPUType.java new file mode 100644 index 00000000000..075ec187c93 --- /dev/null +++ b/deps/XenServerJava/src/com/xensource/xenapi/VGPUType.java @@ -0,0 +1,461 @@ +/* + * 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 com.xensource.xenapi.Types.BadServerResponse; +import com.xensource.xenapi.Types.VersionException; +import com.xensource.xenapi.Types.XenAPIException; + +import java.io.PrintWriter; +import java.io.StringWriter; +import java.util.Date; +import java.util.HashMap; +import java.util.LinkedHashSet; +import java.util.Map; +import java.util.Set; + +import org.apache.xmlrpc.XmlRpcException; + +/** + * A type of virtual GPU + * + * @author Citrix Systems, Inc. + */ +public class VGPUType extends XenAPIObject { + + /** + * The XenAPI reference (OpaqueRef) to this object. + */ + protected final String ref; + + /** + * For internal use only. + */ + VGPUType(String ref) { + this.ref = ref; + } + + /** + * @return The XenAPI reference (OpaqueRef) to this object. + */ + public String toWireString() { + return this.ref; + } + + /** + * If obj is a VGPUType, compares XenAPI references for equality. + */ + @Override + public boolean equals(Object obj) + { + if (obj != null && obj instanceof VGPUType) + { + VGPUType other = (VGPUType) obj; + return other.ref.equals(this.ref); + } else + { + return false; + } + } + + @Override + public int hashCode() + { + return ref.hashCode(); + } + + /** + * Represents all the fields in a VGPUType + */ + public static class Record implements Types.Record { + public String toString() { + StringWriter writer = new StringWriter(); + PrintWriter print = new PrintWriter(writer); + print.printf("%1$20s: %2$s\n", "uuid", this.uuid); + print.printf("%1$20s: %2$s\n", "vendorName", this.vendorName); + print.printf("%1$20s: %2$s\n", "modelName", this.modelName); + print.printf("%1$20s: %2$s\n", "framebufferSize", this.framebufferSize); + print.printf("%1$20s: %2$s\n", "maxHeads", this.maxHeads); + print.printf("%1$20s: %2$s\n", "maxResolutionX", this.maxResolutionX); + print.printf("%1$20s: %2$s\n", "maxResolutionY", this.maxResolutionY); + print.printf("%1$20s: %2$s\n", "supportedOnPGPUs", this.supportedOnPGPUs); + print.printf("%1$20s: %2$s\n", "enabledOnPGPUs", this.enabledOnPGPUs); + print.printf("%1$20s: %2$s\n", "VGPUs", this.VGPUs); + print.printf("%1$20s: %2$s\n", "supportedOnGPUGroups", this.supportedOnGPUGroups); + print.printf("%1$20s: %2$s\n", "enabledOnGPUGroups", this.enabledOnGPUGroups); + return writer.toString(); + } + + /** + * Convert a VGPU_type.Record to a Map + */ + public Map toMap() { + Map map = new HashMap(); + map.put("uuid", this.uuid == null ? "" : this.uuid); + map.put("vendor_name", this.vendorName == null ? "" : this.vendorName); + map.put("model_name", this.modelName == null ? "" : this.modelName); + map.put("framebuffer_size", this.framebufferSize == null ? 0 : this.framebufferSize); + map.put("max_heads", this.maxHeads == null ? 0 : this.maxHeads); + map.put("max_resolution_x", this.maxResolutionX == null ? 0 : this.maxResolutionX); + map.put("max_resolution_y", this.maxResolutionY == null ? 0 : this.maxResolutionY); + map.put("supported_on_PGPUs", this.supportedOnPGPUs == null ? new LinkedHashSet() : this.supportedOnPGPUs); + map.put("enabled_on_PGPUs", this.enabledOnPGPUs == null ? new LinkedHashSet() : this.enabledOnPGPUs); + map.put("VGPUs", this.VGPUs == null ? new LinkedHashSet() : this.VGPUs); + map.put("supported_on_GPU_groups", this.supportedOnGPUGroups == null ? new LinkedHashSet() : this.supportedOnGPUGroups); + map.put("enabled_on_GPU_groups", this.enabledOnGPUGroups == null ? new LinkedHashSet() : this.enabledOnGPUGroups); + return map; + } + + /** + * Unique identifier/object reference + */ + public String uuid; + /** + * Name of VGPU vendor + */ + public String vendorName; + /** + * Model name associated with the VGPU type + */ + public String modelName; + /** + * Framebuffer size of the VGPU type, in bytes + */ + public Long framebufferSize; + /** + * Maximum number of displays supported by the VGPU type + */ + public Long maxHeads; + /** + * Maximum resultion (width) supported by the VGPU type + */ + public Long maxResolutionX; + /** + * Maximum resoltion (height) supported by the VGPU type + */ + public Long maxResolutionY; + /** + * List of PGPUs that support this VGPU type + */ + public Set supportedOnPGPUs; + /** + * List of PGPUs that have this VGPU type enabled + */ + public Set enabledOnPGPUs; + /** + * List of VGPUs of this type + */ + public Set VGPUs; + /** + * List of GPU groups in which at least one PGPU supports this VGPU type + */ + public Set supportedOnGPUGroups; + /** + * List of GPU groups in which at least one have this VGPU type enabled + */ + public Set enabledOnGPUGroups; + } + + /** + * Get a record containing the current state of the given VGPU_type. + * + * @return all fields from the object + */ + public VGPUType.Record getRecord(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { + String method_call = "VGPU_type.get_record"; + String session = c.getSessionReference(); + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; + Map response = c.dispatch(method_call, method_params); + Object result = response.get("Value"); + return Types.toVGPUTypeRecord(result); + } + + /** + * Get a reference to the VGPU_type instance with the specified UUID. + * + * @param uuid UUID of object to return + * @return reference to the object + */ + public static VGPUType getByUuid(Connection c, String uuid) throws + BadServerResponse, + XenAPIException, + XmlRpcException { + String method_call = "VGPU_type.get_by_uuid"; + String session = c.getSessionReference(); + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; + Map response = c.dispatch(method_call, method_params); + Object result = response.get("Value"); + return Types.toVGPUType(result); + } + + /** + * Get the uuid field of the given VGPU_type. + * + * @return value of the field + */ + public String getUuid(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { + String method_call = "VGPU_type.get_uuid"; + String session = c.getSessionReference(); + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; + Map response = c.dispatch(method_call, method_params); + Object result = response.get("Value"); + return Types.toString(result); + } + + /** + * Get the vendor_name field of the given VGPU_type. + * + * @return value of the field + */ + public String getVendorName(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { + String method_call = "VGPU_type.get_vendor_name"; + String session = c.getSessionReference(); + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; + Map response = c.dispatch(method_call, method_params); + Object result = response.get("Value"); + return Types.toString(result); + } + + /** + * Get the model_name field of the given VGPU_type. + * + * @return value of the field + */ + public String getModelName(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { + String method_call = "VGPU_type.get_model_name"; + String session = c.getSessionReference(); + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; + Map response = c.dispatch(method_call, method_params); + Object result = response.get("Value"); + return Types.toString(result); + } + + /** + * Get the framebuffer_size field of the given VGPU_type. + * + * @return value of the field + */ + public Long getFramebufferSize(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { + String method_call = "VGPU_type.get_framebuffer_size"; + String session = c.getSessionReference(); + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; + Map response = c.dispatch(method_call, method_params); + Object result = response.get("Value"); + return Types.toLong(result); + } + + /** + * Get the max_heads field of the given VGPU_type. + * + * @return value of the field + */ + public Long getMaxHeads(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { + String method_call = "VGPU_type.get_max_heads"; + String session = c.getSessionReference(); + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; + Map response = c.dispatch(method_call, method_params); + Object result = response.get("Value"); + return Types.toLong(result); + } + + /** + * Get the max_resolution_x field of the given VGPU_type. + * + * @return value of the field + */ + public Long getMaxResolutionX(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { + String method_call = "VGPU_type.get_max_resolution_x"; + String session = c.getSessionReference(); + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; + Map response = c.dispatch(method_call, method_params); + Object result = response.get("Value"); + return Types.toLong(result); + } + + /** + * Get the max_resolution_y field of the given VGPU_type. + * + * @return value of the field + */ + public Long getMaxResolutionY(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { + String method_call = "VGPU_type.get_max_resolution_y"; + String session = c.getSessionReference(); + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; + Map response = c.dispatch(method_call, method_params); + Object result = response.get("Value"); + return Types.toLong(result); + } + + /** + * Get the supported_on_PGPUs field of the given VGPU_type. + * + * @return value of the field + */ + public Set getSupportedOnPGPUs(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { + String method_call = "VGPU_type.get_supported_on_PGPUs"; + String session = c.getSessionReference(); + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; + Map response = c.dispatch(method_call, method_params); + Object result = response.get("Value"); + return Types.toSetOfPGPU(result); + } + + /** + * Get the enabled_on_PGPUs field of the given VGPU_type. + * + * @return value of the field + */ + public Set getEnabledOnPGPUs(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { + String method_call = "VGPU_type.get_enabled_on_PGPUs"; + String session = c.getSessionReference(); + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; + Map response = c.dispatch(method_call, method_params); + Object result = response.get("Value"); + return Types.toSetOfPGPU(result); + } + + /** + * Get the VGPUs field of the given VGPU_type. + * + * @return value of the field + */ + public Set getVGPUs(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { + String method_call = "VGPU_type.get_VGPUs"; + String session = c.getSessionReference(); + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; + Map response = c.dispatch(method_call, method_params); + Object result = response.get("Value"); + return Types.toSetOfVGPU(result); + } + + /** + * Get the supported_on_GPU_groups field of the given VGPU_type. + * + * @return value of the field + */ + public Set getSupportedOnGPUGroups(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { + String method_call = "VGPU_type.get_supported_on_GPU_groups"; + String session = c.getSessionReference(); + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; + Map response = c.dispatch(method_call, method_params); + Object result = response.get("Value"); + return Types.toSetOfGPUGroup(result); + } + + /** + * Get the enabled_on_GPU_groups field of the given VGPU_type. + * + * @return value of the field + */ + public Set getEnabledOnGPUGroups(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { + String method_call = "VGPU_type.get_enabled_on_GPU_groups"; + String session = c.getSessionReference(); + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; + Map response = c.dispatch(method_call, method_params); + Object result = response.get("Value"); + return Types.toSetOfGPUGroup(result); + } + + /** + * Return a list of all the VGPU_types known to the system. + * + * @return references to all objects + */ + public static Set getAll(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { + String method_call = "VGPU_type.get_all"; + String session = c.getSessionReference(); + Object[] method_params = {Marshalling.toXMLRPC(session)}; + Map response = c.dispatch(method_call, method_params); + Object result = response.get("Value"); + return Types.toSetOfVGPUType(result); + } + + /** + * Return a map of VGPU_type references to VGPU_type records for all VGPU_types known to the system. + * + * @return records of all objects + */ + public static Map getAllRecords(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { + String method_call = "VGPU_type.get_all_records"; + String session = c.getSessionReference(); + Object[] method_params = {Marshalling.toXMLRPC(session)}; + Map response = c.dispatch(method_call, method_params); + Object result = response.get("Value"); + return Types.toMapOfVGPUTypeVGPUTypeRecord(result); + } + +} \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/VIF.java b/deps/XenServerJava/src/com/xensource/xenapi/VIF.java index 8302800686d..c755dc4b100 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/VIF.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/VIF.java @@ -1,19 +1,19 @@ /* * 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 @@ -28,6 +28,7 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ + package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -60,14 +61,14 @@ public class VIF extends XenAPIObject { * For internal use only. */ VIF(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -78,7 +79,7 @@ public class VIF extends XenAPIObject { { if (obj != null && obj instanceof VIF) { - VIF other = (VIF)obj; + VIF other = (VIF) obj; return other.ref.equals(this.ref); } else { @@ -126,8 +127,8 @@ public class VIF extends XenAPIObject { /** * Convert a VIF.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("allowed_operations", this.allowedOperations == null ? new LinkedHashSet() : this.allowedOperations); map.put("current_operations", this.currentOperations == null ? new HashMap() : this.currentOperations); @@ -146,7 +147,7 @@ public class VIF extends XenAPIObject { map.put("qos_supported_algorithms", this.qosSupportedAlgorithms == null ? new LinkedHashSet() : this.qosSupportedAlgorithms); map.put("metrics", this.metrics == null ? new VIFMetrics("OpaqueRef:NULL") : this.metrics); map.put("MAC_autogenerated", this.MACAutogenerated == null ? false : this.MACAutogenerated); - map.put("locking_mode", this.lockingMode == null ? Types.VifLockingMode.UNRECOGNIZED : this.lockingMode); + map.put("locking_mode", this.lockingMode == null ? Types.VifLockingMode.NETWORK_DEFAULT : this.lockingMode); map.put("ipv4_allowed", this.ipv4Allowed == null ? new LinkedHashSet() : this.ipv4Allowed); map.put("ipv6_allowed", this.ipv6Allowed == null ? new LinkedHashSet() : this.ipv6Allowed); return map; @@ -244,15 +245,15 @@ public class VIF extends XenAPIObject { * @return all fields from the object */ public VIF.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVIFRecord(result); + return Types.toVIFRecord(result); } /** @@ -262,15 +263,15 @@ public class VIF extends XenAPIObject { * @return reference to the object */ public static VIF getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVIF(result); + return Types.toVIF(result); } /** @@ -280,9 +281,9 @@ public class VIF extends XenAPIObject { * @return Task */ public static Task createAsync(Connection c, VIF.Record record) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VIF.create"; String session = c.getSessionReference(); Map record_map = record.toMap(); @@ -299,16 +300,16 @@ public class VIF extends XenAPIObject { * @return reference to the newly created object */ public static VIF create(Connection c, VIF.Record record) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.create"; String session = c.getSessionReference(); Map record_map = record.toMap(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(record_map)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVIF(result); + return Types.toVIF(result); } /** @@ -317,9 +318,9 @@ public class VIF extends XenAPIObject { * @return Task */ public Task destroyAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VIF.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -333,9 +334,9 @@ public class VIF extends XenAPIObject { * */ public void destroy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -349,15 +350,15 @@ public class VIF extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -366,15 +367,15 @@ public class VIF extends XenAPIObject { * @return value of the field */ public Set getAllowedOperations(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.get_allowed_operations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVifOperations(result); + return Types.toSetOfVifOperations(result); } /** @@ -383,15 +384,15 @@ public class VIF extends XenAPIObject { * @return value of the field */ public Map getCurrentOperations(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.get_current_operations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringVifOperations(result); + return Types.toMapOfStringVifOperations(result); } /** @@ -400,15 +401,15 @@ public class VIF extends XenAPIObject { * @return value of the field */ public String getDevice(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.get_device"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -417,15 +418,15 @@ public class VIF extends XenAPIObject { * @return value of the field */ public Network getNetwork(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.get_network"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toNetwork(result); + return Types.toNetwork(result); } /** @@ -434,15 +435,15 @@ public class VIF extends XenAPIObject { * @return value of the field */ public VM getVM(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.get_VM"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVM(result); + return Types.toVM(result); } /** @@ -451,15 +452,15 @@ public class VIF extends XenAPIObject { * @return value of the field */ public String getMAC(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.get_MAC"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -468,15 +469,15 @@ public class VIF extends XenAPIObject { * @return value of the field */ public Long getMTU(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.get_MTU"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -485,15 +486,15 @@ public class VIF extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -502,15 +503,15 @@ public class VIF extends XenAPIObject { * @return value of the field */ public Boolean getCurrentlyAttached(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.get_currently_attached"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -519,15 +520,15 @@ public class VIF extends XenAPIObject { * @return value of the field */ public Long getStatusCode(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.get_status_code"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -536,15 +537,15 @@ public class VIF extends XenAPIObject { * @return value of the field */ public String getStatusDetail(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.get_status_detail"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -553,15 +554,15 @@ public class VIF extends XenAPIObject { * @return value of the field */ public Map getRuntimeProperties(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.get_runtime_properties"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -570,15 +571,15 @@ public class VIF extends XenAPIObject { * @return value of the field */ public String getQosAlgorithmType(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.get_qos_algorithm_type"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -587,15 +588,15 @@ public class VIF extends XenAPIObject { * @return value of the field */ public Map getQosAlgorithmParams(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.get_qos_algorithm_params"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -604,15 +605,15 @@ public class VIF extends XenAPIObject { * @return value of the field */ public Set getQosSupportedAlgorithms(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.get_qos_supported_algorithms"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -621,15 +622,15 @@ public class VIF extends XenAPIObject { * @return value of the field */ public VIFMetrics getMetrics(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.get_metrics"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVIFMetrics(result); + return Types.toVIFMetrics(result); } /** @@ -638,15 +639,15 @@ public class VIF extends XenAPIObject { * @return value of the field */ public Boolean getMACAutogenerated(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.get_MAC_autogenerated"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -655,15 +656,15 @@ public class VIF extends XenAPIObject { * @return value of the field */ public Types.VifLockingMode getLockingMode(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.get_locking_mode"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVifLockingMode(result); + return Types.toVifLockingMode(result); } /** @@ -672,15 +673,15 @@ public class VIF extends XenAPIObject { * @return value of the field */ public Set getIpv4Allowed(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.get_ipv4_allowed"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -689,15 +690,15 @@ public class VIF extends XenAPIObject { * @return value of the field */ public Set getIpv6Allowed(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.get_ipv6_allowed"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -706,9 +707,9 @@ public class VIF extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -723,9 +724,9 @@ public class VIF extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -739,9 +740,9 @@ public class VIF extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -755,9 +756,9 @@ public class VIF extends XenAPIObject { * @param algorithmType New value to set */ public void setQosAlgorithmType(Connection c, String algorithmType) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.set_qos_algorithm_type"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(algorithmType)}; @@ -771,9 +772,9 @@ public class VIF extends XenAPIObject { * @param algorithmParams New value to set */ public void setQosAlgorithmParams(Connection c, Map algorithmParams) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.set_qos_algorithm_params"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(algorithmParams)}; @@ -788,9 +789,9 @@ public class VIF extends XenAPIObject { * @param value Value to add */ public void addToQosAlgorithmParams(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.add_to_qos_algorithm_params"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -804,9 +805,9 @@ public class VIF extends XenAPIObject { * @param key Key to remove */ public void removeFromQosAlgorithmParams(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.remove_from_qos_algorithm_params"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -820,9 +821,9 @@ public class VIF extends XenAPIObject { * @return Task */ public Task plugAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VIF.plug"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -836,9 +837,9 @@ public class VIF extends XenAPIObject { * */ public void plug(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.plug"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -852,9 +853,9 @@ public class VIF extends XenAPIObject { * @return Task */ public Task unplugAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VIF.unplug"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -868,9 +869,9 @@ public class VIF extends XenAPIObject { * */ public void unplug(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.unplug"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -884,9 +885,9 @@ public class VIF extends XenAPIObject { * @return Task */ public Task unplugForceAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VIF.unplug_force"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -900,9 +901,9 @@ public class VIF extends XenAPIObject { * */ public void unplugForce(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.unplug_force"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -917,9 +918,9 @@ public class VIF extends XenAPIObject { * @return Task */ public Task setLockingModeAsync(Connection c, Types.VifLockingMode value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VIF.set_locking_mode"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -934,9 +935,9 @@ public class VIF extends XenAPIObject { * @param value The new locking mode for the VIF */ public void setLockingMode(Connection c, Types.VifLockingMode value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.set_locking_mode"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -951,9 +952,9 @@ public class VIF extends XenAPIObject { * @return Task */ public Task setIpv4AllowedAsync(Connection c, Set value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VIF.set_ipv4_allowed"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -968,9 +969,9 @@ public class VIF extends XenAPIObject { * @param value The IP addresses which will be associated with the VIF */ public void setIpv4Allowed(Connection c, Set value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.set_ipv4_allowed"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -985,9 +986,9 @@ public class VIF extends XenAPIObject { * @return Task */ public Task addIpv4AllowedAsync(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VIF.add_ipv4_allowed"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1002,9 +1003,9 @@ public class VIF extends XenAPIObject { * @param value The IP address which will be associated with the VIF */ public void addIpv4Allowed(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.add_ipv4_allowed"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1019,9 +1020,9 @@ public class VIF extends XenAPIObject { * @return Task */ public Task removeIpv4AllowedAsync(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VIF.remove_ipv4_allowed"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1036,9 +1037,9 @@ public class VIF extends XenAPIObject { * @param value The IP address which will be removed from the VIF */ public void removeIpv4Allowed(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.remove_ipv4_allowed"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1053,9 +1054,9 @@ public class VIF extends XenAPIObject { * @return Task */ public Task setIpv6AllowedAsync(Connection c, Set value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VIF.set_ipv6_allowed"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1070,9 +1071,9 @@ public class VIF extends XenAPIObject { * @param value The IP addresses which will be associated with the VIF */ public void setIpv6Allowed(Connection c, Set value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.set_ipv6_allowed"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1087,9 +1088,9 @@ public class VIF extends XenAPIObject { * @return Task */ public Task addIpv6AllowedAsync(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VIF.add_ipv6_allowed"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1104,9 +1105,9 @@ public class VIF extends XenAPIObject { * @param value The IP address which will be associated with the VIF */ public void addIpv6Allowed(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.add_ipv6_allowed"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1121,9 +1122,9 @@ public class VIF extends XenAPIObject { * @return Task */ public Task removeIpv6AllowedAsync(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VIF.remove_ipv6_allowed"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1138,9 +1139,9 @@ public class VIF extends XenAPIObject { * @param value The IP address which will be removed from the VIF */ public void removeIpv6Allowed(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.remove_ipv6_allowed"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1154,15 +1155,15 @@ public class VIF extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVIF(result); + return Types.toSetOfVIF(result); } /** @@ -1171,15 +1172,15 @@ public class VIF extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfVIFVIFRecord(result); + return Types.toMapOfVIFVIFRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/VIFMetrics.java b/deps/XenServerJava/src/com/xensource/xenapi/VIFMetrics.java index 0c17217956d..c051e53180b 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/VIFMetrics.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/VIFMetrics.java @@ -1,19 +1,19 @@ /* * 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 @@ -28,6 +28,7 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ + package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -60,14 +61,14 @@ public class VIFMetrics extends XenAPIObject { * For internal use only. */ VIFMetrics(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -78,7 +79,7 @@ public class VIFMetrics extends XenAPIObject { { if (obj != null && obj instanceof VIFMetrics) { - VIFMetrics other = (VIFMetrics)obj; + VIFMetrics other = (VIFMetrics) obj; return other.ref.equals(this.ref); } else { @@ -110,8 +111,8 @@ public class VIFMetrics extends XenAPIObject { /** * Convert a VIF_metrics.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("io_read_kbs", this.ioReadKbs == null ? 0.0 : this.ioReadKbs); map.put("io_write_kbs", this.ioWriteKbs == null ? 0.0 : this.ioWriteKbs); @@ -148,15 +149,15 @@ public class VIFMetrics extends XenAPIObject { * @return all fields from the object */ public VIFMetrics.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF_metrics.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVIFMetricsRecord(result); + return Types.toVIFMetricsRecord(result); } /** @@ -166,15 +167,15 @@ public class VIFMetrics extends XenAPIObject { * @return reference to the object */ public static VIFMetrics getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF_metrics.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVIFMetrics(result); + return Types.toVIFMetrics(result); } /** @@ -183,15 +184,15 @@ public class VIFMetrics extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF_metrics.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -200,15 +201,15 @@ public class VIFMetrics extends XenAPIObject { * @return value of the field */ public Double getIoReadKbs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF_metrics.get_io_read_kbs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDouble(result); + return Types.toDouble(result); } /** @@ -217,15 +218,15 @@ public class VIFMetrics extends XenAPIObject { * @return value of the field */ public Double getIoWriteKbs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF_metrics.get_io_write_kbs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDouble(result); + return Types.toDouble(result); } /** @@ -234,15 +235,15 @@ public class VIFMetrics extends XenAPIObject { * @return value of the field */ public Date getLastUpdated(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF_metrics.get_last_updated"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDate(result); + return Types.toDate(result); } /** @@ -251,15 +252,15 @@ public class VIFMetrics extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF_metrics.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -268,9 +269,9 @@ public class VIFMetrics extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF_metrics.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -285,9 +286,9 @@ public class VIFMetrics extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF_metrics.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -301,9 +302,9 @@ public class VIFMetrics extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF_metrics.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -317,15 +318,15 @@ public class VIFMetrics extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF_metrics.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVIFMetrics(result); + return Types.toSetOfVIFMetrics(result); } /** @@ -334,15 +335,15 @@ public class VIFMetrics extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF_metrics.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfVIFMetricsVIFMetricsRecord(result); + return Types.toMapOfVIFMetricsVIFMetricsRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/VLAN.java b/deps/XenServerJava/src/com/xensource/xenapi/VLAN.java index 9bea0399a45..f0abe2944ae 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/VLAN.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/VLAN.java @@ -1,19 +1,19 @@ /* * 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 @@ -28,6 +28,7 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ + package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -60,14 +61,14 @@ public class VLAN extends XenAPIObject { * For internal use only. */ VLAN(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -78,7 +79,7 @@ public class VLAN extends XenAPIObject { { if (obj != null && obj instanceof VLAN) { - VLAN other = (VLAN)obj; + VLAN other = (VLAN) obj; return other.ref.equals(this.ref); } else { @@ -110,8 +111,8 @@ public class VLAN extends XenAPIObject { /** * Convert a VLAN.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("tagged_PIF", this.taggedPIF == null ? new PIF("OpaqueRef:NULL") : this.taggedPIF); map.put("untagged_PIF", this.untaggedPIF == null ? new PIF("OpaqueRef:NULL") : this.untaggedPIF); @@ -148,15 +149,15 @@ public class VLAN extends XenAPIObject { * @return all fields from the object */ public VLAN.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VLAN.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVLANRecord(result); + return Types.toVLANRecord(result); } /** @@ -166,15 +167,15 @@ public class VLAN extends XenAPIObject { * @return reference to the object */ public static VLAN getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VLAN.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVLAN(result); + return Types.toVLAN(result); } /** @@ -183,15 +184,15 @@ public class VLAN extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VLAN.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -200,15 +201,15 @@ public class VLAN extends XenAPIObject { * @return value of the field */ public PIF getTaggedPIF(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VLAN.get_tagged_PIF"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPIF(result); + return Types.toPIF(result); } /** @@ -217,15 +218,15 @@ public class VLAN extends XenAPIObject { * @return value of the field */ public PIF getUntaggedPIF(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VLAN.get_untagged_PIF"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPIF(result); + return Types.toPIF(result); } /** @@ -234,15 +235,15 @@ public class VLAN extends XenAPIObject { * @return value of the field */ public Long getTag(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VLAN.get_tag"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -251,15 +252,15 @@ public class VLAN extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VLAN.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -268,9 +269,9 @@ public class VLAN extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VLAN.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -285,9 +286,9 @@ public class VLAN extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VLAN.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -301,9 +302,9 @@ public class VLAN extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VLAN.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -320,9 +321,9 @@ public class VLAN extends XenAPIObject { * @return Task */ public static Task createAsync(Connection c, PIF taggedPIF, Long tag, Network network) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VLAN.create"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(taggedPIF), Marshalling.toXMLRPC(tag), Marshalling.toXMLRPC(network)}; @@ -340,15 +341,15 @@ public class VLAN extends XenAPIObject { * @return The reference of the created VLAN object */ public static VLAN create(Connection c, PIF taggedPIF, Long tag, Network network) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VLAN.create"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(taggedPIF), Marshalling.toXMLRPC(tag), Marshalling.toXMLRPC(network)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVLAN(result); + return Types.toVLAN(result); } /** @@ -357,9 +358,9 @@ public class VLAN extends XenAPIObject { * @return Task */ public Task destroyAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VLAN.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -373,9 +374,9 @@ public class VLAN extends XenAPIObject { * */ public void destroy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VLAN.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -389,15 +390,15 @@ public class VLAN extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VLAN.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVLAN(result); + return Types.toSetOfVLAN(result); } /** @@ -406,15 +407,15 @@ public class VLAN extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VLAN.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfVLANVLANRecord(result); + return Types.toMapOfVLANVLANRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/VM.java b/deps/XenServerJava/src/com/xensource/xenapi/VM.java index cfa5e6c97c7..6ed76af95d5 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/VM.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/VM.java @@ -1,19 +1,19 @@ /* * 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 @@ -28,6 +28,7 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ + package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -60,14 +61,14 @@ public class VM extends XenAPIObject { * For internal use only. */ VM(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -78,7 +79,7 @@ public class VM extends XenAPIObject { { if (obj != null && obj instanceof VM) { - VM other = (VM)obj; + VM other = (VM) obj; return other.ref.equals(this.ref); } else { @@ -173,14 +174,15 @@ public class VM extends XenAPIObject { print.printf("%1$20s: %2$s\n", "attachedPCIs", this.attachedPCIs); print.printf("%1$20s: %2$s\n", "suspendSR", this.suspendSR); print.printf("%1$20s: %2$s\n", "version", this.version); + print.printf("%1$20s: %2$s\n", "generationId", this.generationId); return writer.toString(); } /** * Convert a VM.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("allowed_operations", this.allowedOperations == null ? new LinkedHashSet() : this.allowedOperations); map.put("current_operations", this.currentOperations == null ? new HashMap() : this.currentOperations); @@ -255,6 +257,7 @@ public class VM extends XenAPIObject { map.put("attached_PCIs", this.attachedPCIs == null ? new LinkedHashSet() : this.attachedPCIs); map.put("suspend_SR", this.suspendSR == null ? new SR("OpaqueRef:NULL") : this.suspendSR); map.put("version", this.version == null ? 0 : this.version); + map.put("generation_id", this.generationId == null ? "" : this.generationId); return map; } @@ -554,6 +557,10 @@ public class VM extends XenAPIObject { * The number of times this VM has been recovered */ public Long version; + /** + * Generation ID of the VM + */ + public String generationId; } /** @@ -562,15 +569,15 @@ public class VM extends XenAPIObject { * @return all fields from the object */ public VM.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVMRecord(result); + return Types.toVMRecord(result); } /** @@ -580,15 +587,15 @@ public class VM extends XenAPIObject { * @return reference to the object */ public static VM getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVM(result); + return Types.toVM(result); } /** @@ -598,9 +605,9 @@ public class VM extends XenAPIObject { * @return Task */ public static Task createAsync(Connection c, VM.Record record) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.create"; String session = c.getSessionReference(); Map record_map = record.toMap(); @@ -617,16 +624,16 @@ public class VM extends XenAPIObject { * @return reference to the newly created object */ public static VM create(Connection c, VM.Record record) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.create"; String session = c.getSessionReference(); Map record_map = record.toMap(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(record_map)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVM(result); + return Types.toVM(result); } /** @@ -635,9 +642,9 @@ public class VM extends XenAPIObject { * @return Task */ public Task destroyAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -651,9 +658,9 @@ public class VM extends XenAPIObject { * */ public void destroy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -668,15 +675,15 @@ public class VM extends XenAPIObject { * @return references to objects with matching names */ public static Set getByNameLabel(Connection c, String label) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_by_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(label)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVM(result); + return Types.toSetOfVM(result); } /** @@ -685,15 +692,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -702,15 +709,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Set getAllowedOperations(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_allowed_operations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVmOperations(result); + return Types.toSetOfVmOperations(result); } /** @@ -719,15 +726,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Map getCurrentOperations(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_current_operations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringVmOperations(result); + return Types.toMapOfStringVmOperations(result); } /** @@ -736,15 +743,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Types.VmPowerState getPowerState(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_power_state"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVmPowerState(result); + return Types.toVmPowerState(result); } /** @@ -753,15 +760,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public String getNameLabel(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -770,15 +777,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public String getNameDescription(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_name_description"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -787,15 +794,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Long getUserVersion(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_user_version"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -804,15 +811,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Boolean getIsATemplate(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_is_a_template"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -821,15 +828,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public VDI getSuspendVDI(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_suspend_VDI"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVDI(result); + return Types.toVDI(result); } /** @@ -838,15 +845,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Host getResidentOn(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_resident_on"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toHost(result); + return Types.toHost(result); } /** @@ -855,15 +862,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Host getAffinity(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_affinity"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toHost(result); + return Types.toHost(result); } /** @@ -872,15 +879,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Long getMemoryOverhead(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_memory_overhead"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -889,17 +896,16 @@ public class VM extends XenAPIObject { * * @return value of the field */ - @Deprecated - public Long getMemoryTarget(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + @Deprecated public Long getMemoryTarget(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_memory_target"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -908,15 +914,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Long getMemoryStaticMax(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_memory_static_max"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -925,15 +931,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Long getMemoryDynamicMax(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_memory_dynamic_max"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -942,15 +948,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Long getMemoryDynamicMin(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_memory_dynamic_min"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -959,15 +965,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Long getMemoryStaticMin(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_memory_static_min"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -976,15 +982,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Map getVCPUsParams(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_VCPUs_params"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -993,15 +999,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Long getVCPUsMax(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_VCPUs_max"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -1010,15 +1016,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Long getVCPUsAtStartup(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_VCPUs_at_startup"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -1027,15 +1033,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Types.OnNormalExit getActionsAfterShutdown(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_actions_after_shutdown"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toOnNormalExit(result); + return Types.toOnNormalExit(result); } /** @@ -1044,15 +1050,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Types.OnNormalExit getActionsAfterReboot(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_actions_after_reboot"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toOnNormalExit(result); + return Types.toOnNormalExit(result); } /** @@ -1061,15 +1067,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Types.OnCrashBehaviour getActionsAfterCrash(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_actions_after_crash"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toOnCrashBehaviour(result); + return Types.toOnCrashBehaviour(result); } /** @@ -1078,15 +1084,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Set getConsoles(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_consoles"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfConsole(result); + return Types.toSetOfConsole(result); } /** @@ -1095,15 +1101,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Set getVIFs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_VIFs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVIF(result); + return Types.toSetOfVIF(result); } /** @@ -1112,15 +1118,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Set getVBDs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_VBDs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVBD(result); + return Types.toSetOfVBD(result); } /** @@ -1129,15 +1135,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Set getCrashDumps(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_crash_dumps"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfCrashdump(result); + return Types.toSetOfCrashdump(result); } /** @@ -1146,15 +1152,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Set getVTPMs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_VTPMs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVTPM(result); + return Types.toSetOfVTPM(result); } /** @@ -1163,15 +1169,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public String getPVBootloader(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_PV_bootloader"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -1180,15 +1186,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public String getPVKernel(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_PV_kernel"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -1197,15 +1203,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public String getPVRamdisk(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_PV_ramdisk"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -1214,15 +1220,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public String getPVArgs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_PV_args"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -1231,15 +1237,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public String getPVBootloaderArgs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_PV_bootloader_args"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -1248,15 +1254,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public String getPVLegacyArgs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_PV_legacy_args"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -1265,15 +1271,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public String getHVMBootPolicy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_HVM_boot_policy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -1282,15 +1288,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Map getHVMBootParams(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_HVM_boot_params"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -1299,15 +1305,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Double getHVMShadowMultiplier(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_HVM_shadow_multiplier"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDouble(result); + return Types.toDouble(result); } /** @@ -1316,15 +1322,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Map getPlatform(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_platform"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -1333,17 +1339,16 @@ public class VM extends XenAPIObject { * * @return value of the field */ - @Deprecated - public String getPCIBus(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + @Deprecated public String getPCIBus(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_PCI_bus"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -1352,15 +1357,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -1369,15 +1374,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Long getDomid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_domid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -1386,15 +1391,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public String getDomarch(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_domarch"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -1403,15 +1408,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Map getLastBootCPUFlags(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_last_boot_CPU_flags"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -1420,15 +1425,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Boolean getIsControlDomain(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_is_control_domain"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -1437,15 +1442,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public VMMetrics getMetrics(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_metrics"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVMMetrics(result); + return Types.toVMMetrics(result); } /** @@ -1454,15 +1459,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public VMGuestMetrics getGuestMetrics(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_guest_metrics"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVMGuestMetrics(result); + return Types.toVMGuestMetrics(result); } /** @@ -1471,15 +1476,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public String getLastBootedRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_last_booted_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -1488,15 +1493,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public String getRecommendations(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_recommendations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -1505,15 +1510,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Map getXenstoreData(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_xenstore_data"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -1522,17 +1527,16 @@ public class VM extends XenAPIObject { * * @return value of the field */ - @Deprecated - public Boolean getHaAlwaysRun(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + @Deprecated public Boolean getHaAlwaysRun(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_ha_always_run"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -1541,15 +1545,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public String getHaRestartPriority(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_ha_restart_priority"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -1558,15 +1562,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Boolean getIsASnapshot(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_is_a_snapshot"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -1575,15 +1579,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public VM getSnapshotOf(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_snapshot_of"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVM(result); + return Types.toVM(result); } /** @@ -1592,15 +1596,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Set getSnapshots(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_snapshots"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVM(result); + return Types.toSetOfVM(result); } /** @@ -1609,15 +1613,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Date getSnapshotTime(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_snapshot_time"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDate(result); + return Types.toDate(result); } /** @@ -1626,15 +1630,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public String getTransportableSnapshotId(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_transportable_snapshot_id"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -1643,15 +1647,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Map getBlobs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_blobs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringBlob(result); + return Types.toMapOfStringBlob(result); } /** @@ -1660,15 +1664,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Set getTags(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_tags"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -1677,15 +1681,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Map getBlockedOperations(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_blocked_operations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfVmOperationsString(result); + return Types.toMapOfVmOperationsString(result); } /** @@ -1694,15 +1698,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Map getSnapshotInfo(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_snapshot_info"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -1711,15 +1715,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public String getSnapshotMetadata(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_snapshot_metadata"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -1728,15 +1732,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public VM getParent(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_parent"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVM(result); + return Types.toVM(result); } /** @@ -1745,15 +1749,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Set getChildren(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_children"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVM(result); + return Types.toSetOfVM(result); } /** @@ -1762,49 +1766,51 @@ public class VM extends XenAPIObject { * @return value of the field */ public Map getBiosStrings(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_bios_strings"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** * Get the protection_policy field of the given VM. + * @deprecated * * @return value of the field */ - public VMPP getProtectionPolicy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + @Deprecated public VMPP getProtectionPolicy(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_protection_policy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVMPP(result); + return Types.toVMPP(result); } /** * Get the is_snapshot_from_vmpp field of the given VM. + * @deprecated * * @return value of the field */ - public Boolean getIsSnapshotFromVmpp(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + @Deprecated public Boolean getIsSnapshotFromVmpp(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_is_snapshot_from_vmpp"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -1813,15 +1819,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public VMAppliance getAppliance(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_appliance"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVMAppliance(result); + return Types.toVMAppliance(result); } /** @@ -1830,15 +1836,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Long getStartDelay(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_start_delay"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -1847,15 +1853,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Long getShutdownDelay(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_shutdown_delay"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -1864,15 +1870,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Long getOrder(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_order"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -1881,15 +1887,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Set getVGPUs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_VGPUs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVGPU(result); + return Types.toSetOfVGPU(result); } /** @@ -1898,15 +1904,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Set getAttachedPCIs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_attached_PCIs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfPCI(result); + return Types.toSetOfPCI(result); } /** @@ -1915,15 +1921,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public SR getSuspendSR(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_suspend_SR"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSR(result); + return Types.toSR(result); } /** @@ -1932,15 +1938,32 @@ public class VM extends XenAPIObject { * @return value of the field */ public Long getVersion(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_version"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); + } + + /** + * Get the generation_id field of the given VM. + * + * @return value of the field + */ + public String getGenerationId(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { + String method_call = "VM.get_generation_id"; + String session = c.getSessionReference(); + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; + Map response = c.dispatch(method_call, method_params); + Object result = response.get("Value"); + return Types.toString(result); } /** @@ -1949,9 +1972,9 @@ public class VM extends XenAPIObject { * @param label New value to set */ public void setNameLabel(Connection c, String label) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(label)}; @@ -1965,9 +1988,9 @@ public class VM extends XenAPIObject { * @param description New value to set */ public void setNameDescription(Connection c, String description) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_name_description"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(description)}; @@ -1981,9 +2004,9 @@ public class VM extends XenAPIObject { * @param userVersion New value to set */ public void setUserVersion(Connection c, Long userVersion) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_user_version"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(userVersion)}; @@ -1997,9 +2020,9 @@ public class VM extends XenAPIObject { * @param isATemplate New value to set */ public void setIsATemplate(Connection c, Boolean isATemplate) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_is_a_template"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(isATemplate)}; @@ -2013,9 +2036,9 @@ public class VM extends XenAPIObject { * @param affinity New value to set */ public void setAffinity(Connection c, Host affinity) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_affinity"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(affinity)}; @@ -2029,9 +2052,9 @@ public class VM extends XenAPIObject { * @param params New value to set */ public void setVCPUsParams(Connection c, Map params) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_VCPUs_params"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(params)}; @@ -2046,9 +2069,9 @@ public class VM extends XenAPIObject { * @param value Value to add */ public void addToVCPUsParams(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.add_to_VCPUs_params"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -2062,9 +2085,9 @@ public class VM extends XenAPIObject { * @param key Key to remove */ public void removeFromVCPUsParams(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.remove_from_VCPUs_params"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -2078,9 +2101,9 @@ public class VM extends XenAPIObject { * @param afterShutdown New value to set */ public void setActionsAfterShutdown(Connection c, Types.OnNormalExit afterShutdown) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_actions_after_shutdown"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(afterShutdown)}; @@ -2094,9 +2117,9 @@ public class VM extends XenAPIObject { * @param afterReboot New value to set */ public void setActionsAfterReboot(Connection c, Types.OnNormalExit afterReboot) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_actions_after_reboot"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(afterReboot)}; @@ -2110,9 +2133,9 @@ public class VM extends XenAPIObject { * @param afterCrash New value to set */ public void setActionsAfterCrash(Connection c, Types.OnCrashBehaviour afterCrash) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_actions_after_crash"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(afterCrash)}; @@ -2126,9 +2149,9 @@ public class VM extends XenAPIObject { * @param bootloader New value to set */ public void setPVBootloader(Connection c, String bootloader) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_PV_bootloader"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(bootloader)}; @@ -2142,9 +2165,9 @@ public class VM extends XenAPIObject { * @param kernel New value to set */ public void setPVKernel(Connection c, String kernel) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_PV_kernel"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(kernel)}; @@ -2158,9 +2181,9 @@ public class VM extends XenAPIObject { * @param ramdisk New value to set */ public void setPVRamdisk(Connection c, String ramdisk) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_PV_ramdisk"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(ramdisk)}; @@ -2174,9 +2197,9 @@ public class VM extends XenAPIObject { * @param args New value to set */ public void setPVArgs(Connection c, String args) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_PV_args"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(args)}; @@ -2190,9 +2213,9 @@ public class VM extends XenAPIObject { * @param bootloaderArgs New value to set */ public void setPVBootloaderArgs(Connection c, String bootloaderArgs) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_PV_bootloader_args"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(bootloaderArgs)}; @@ -2206,9 +2229,9 @@ public class VM extends XenAPIObject { * @param legacyArgs New value to set */ public void setPVLegacyArgs(Connection c, String legacyArgs) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_PV_legacy_args"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(legacyArgs)}; @@ -2222,9 +2245,9 @@ public class VM extends XenAPIObject { * @param bootPolicy New value to set */ public void setHVMBootPolicy(Connection c, String bootPolicy) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_HVM_boot_policy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(bootPolicy)}; @@ -2238,9 +2261,9 @@ public class VM extends XenAPIObject { * @param bootParams New value to set */ public void setHVMBootParams(Connection c, Map bootParams) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_HVM_boot_params"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(bootParams)}; @@ -2255,9 +2278,9 @@ public class VM extends XenAPIObject { * @param value Value to add */ public void addToHVMBootParams(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.add_to_HVM_boot_params"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -2271,9 +2294,9 @@ public class VM extends XenAPIObject { * @param key Key to remove */ public void removeFromHVMBootParams(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.remove_from_HVM_boot_params"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -2287,9 +2310,9 @@ public class VM extends XenAPIObject { * @param platform New value to set */ public void setPlatform(Connection c, Map platform) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_platform"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(platform)}; @@ -2304,9 +2327,9 @@ public class VM extends XenAPIObject { * @param value Value to add */ public void addToPlatform(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.add_to_platform"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -2320,9 +2343,9 @@ public class VM extends XenAPIObject { * @param key Key to remove */ public void removeFromPlatform(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.remove_from_platform"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -2336,11 +2359,10 @@ public class VM extends XenAPIObject { * * @param PCIBus New value to set */ - @Deprecated - public void setPCIBus(Connection c, String PCIBus) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + @Deprecated public void setPCIBus(Connection c, String PCIBus) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_PCI_bus"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(PCIBus)}; @@ -2354,9 +2376,9 @@ public class VM extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -2371,9 +2393,9 @@ public class VM extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -2387,9 +2409,9 @@ public class VM extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -2403,9 +2425,9 @@ public class VM extends XenAPIObject { * @param recommendations New value to set */ public void setRecommendations(Connection c, String recommendations) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_recommendations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(recommendations)}; @@ -2419,9 +2441,9 @@ public class VM extends XenAPIObject { * @param xenstoreData New value to set */ public void setXenstoreData(Connection c, Map xenstoreData) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_xenstore_data"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(xenstoreData)}; @@ -2436,9 +2458,9 @@ public class VM extends XenAPIObject { * @param value Value to add */ public void addToXenstoreData(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.add_to_xenstore_data"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -2452,9 +2474,9 @@ public class VM extends XenAPIObject { * @param key Key to remove */ public void removeFromXenstoreData(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.remove_from_xenstore_data"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -2468,9 +2490,9 @@ public class VM extends XenAPIObject { * @param tags New value to set */ public void setTags(Connection c, Set tags) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_tags"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(tags)}; @@ -2484,9 +2506,9 @@ public class VM extends XenAPIObject { * @param value New value to add */ public void addTags(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.add_tags"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -2500,9 +2522,9 @@ public class VM extends XenAPIObject { * @param value Value to remove */ public void removeTags(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.remove_tags"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -2516,9 +2538,9 @@ public class VM extends XenAPIObject { * @param blockedOperations New value to set */ public void setBlockedOperations(Connection c, Map blockedOperations) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_blocked_operations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(blockedOperations)}; @@ -2533,9 +2555,9 @@ public class VM extends XenAPIObject { * @param value Value to add */ public void addToBlockedOperations(Connection c, Types.VmOperations key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.add_to_blocked_operations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -2549,9 +2571,9 @@ public class VM extends XenAPIObject { * @param key Key to remove */ public void removeFromBlockedOperations(Connection c, Types.VmOperations key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.remove_from_blocked_operations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -2565,9 +2587,9 @@ public class VM extends XenAPIObject { * @param suspendSR New value to set */ public void setSuspendSR(Connection c, SR suspendSR) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_suspend_SR"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(suspendSR)}; @@ -2582,12 +2604,12 @@ public class VM extends XenAPIObject { * @return Task */ public Task snapshotAsync(Connection c, String newName) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.SrFull, - Types.OperationNotAllowed { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.SrFull, + Types.OperationNotAllowed { String method_call = "Async.VM.snapshot"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(newName)}; @@ -2603,18 +2625,18 @@ public class VM extends XenAPIObject { * @return The reference of the newly created VM. */ public VM snapshot(Connection c, String newName) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.SrFull, - Types.OperationNotAllowed { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.SrFull, + Types.OperationNotAllowed { String method_call = "VM.snapshot"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(newName)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVM(result); + return Types.toVM(result); } /** @@ -2624,16 +2646,16 @@ public class VM extends XenAPIObject { * @return Task */ public Task snapshotWithQuiesceAsync(Connection c, String newName) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.SrFull, - Types.OperationNotAllowed, - Types.VmSnapshotWithQuiesceFailed, - Types.VmSnapshotWithQuiesceTimeout, - Types.VmSnapshotWithQuiescePluginDeosNotRespond, - Types.VmSnapshotWithQuiesceNotSupported { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.SrFull, + Types.OperationNotAllowed, + Types.VmSnapshotWithQuiesceFailed, + Types.VmSnapshotWithQuiesceTimeout, + Types.VmSnapshotWithQuiescePluginDeosNotRespond, + Types.VmSnapshotWithQuiesceNotSupported { String method_call = "Async.VM.snapshot_with_quiesce"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(newName)}; @@ -2649,22 +2671,22 @@ public class VM extends XenAPIObject { * @return The reference of the newly created VM. */ public VM snapshotWithQuiesce(Connection c, String newName) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.SrFull, - Types.OperationNotAllowed, - Types.VmSnapshotWithQuiesceFailed, - Types.VmSnapshotWithQuiesceTimeout, - Types.VmSnapshotWithQuiescePluginDeosNotRespond, - Types.VmSnapshotWithQuiesceNotSupported { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.SrFull, + Types.OperationNotAllowed, + Types.VmSnapshotWithQuiesceFailed, + Types.VmSnapshotWithQuiesceTimeout, + Types.VmSnapshotWithQuiescePluginDeosNotRespond, + Types.VmSnapshotWithQuiesceNotSupported { String method_call = "VM.snapshot_with_quiesce"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(newName)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVM(result); + return Types.toVM(result); } /** @@ -2674,12 +2696,12 @@ public class VM extends XenAPIObject { * @return Task */ public Task createCloneAsync(Connection c, String newName) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.SrFull, - Types.OperationNotAllowed { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.SrFull, + Types.OperationNotAllowed { String method_call = "Async.VM.clone"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(newName)}; @@ -2695,18 +2717,18 @@ public class VM extends XenAPIObject { * @return The reference of the newly created VM. */ public VM createClone(Connection c, String newName) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.SrFull, - Types.OperationNotAllowed { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.SrFull, + Types.OperationNotAllowed { String method_call = "VM.clone"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(newName)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVM(result); + return Types.toVM(result); } /** @@ -2717,12 +2739,12 @@ public class VM extends XenAPIObject { * @return Task */ public Task copyAsync(Connection c, String newName, SR sr) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.SrFull, - Types.OperationNotAllowed { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.SrFull, + Types.OperationNotAllowed { String method_call = "Async.VM.copy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(newName), Marshalling.toXMLRPC(sr)}; @@ -2739,18 +2761,18 @@ public class VM extends XenAPIObject { * @return The reference of the newly created VM. */ public VM copy(Connection c, String newName, SR sr) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.SrFull, - Types.OperationNotAllowed { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.SrFull, + Types.OperationNotAllowed { String method_call = "VM.copy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(newName), Marshalling.toXMLRPC(sr)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVM(result); + return Types.toVM(result); } /** @@ -2759,13 +2781,13 @@ public class VM extends XenAPIObject { * @return Task */ public Task revertAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.OperationNotAllowed, - Types.SrFull, - Types.VmRevertFailed { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.OperationNotAllowed, + Types.SrFull, + Types.VmRevertFailed { String method_call = "Async.VM.revert"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -2779,13 +2801,13 @@ public class VM extends XenAPIObject { * */ public void revert(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.OperationNotAllowed, - Types.SrFull, - Types.VmRevertFailed { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.OperationNotAllowed, + Types.SrFull, + Types.VmRevertFailed { String method_call = "VM.revert"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -2800,14 +2822,14 @@ public class VM extends XenAPIObject { * @return Task */ public Task checkpointAsync(Connection c, String newName) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.SrFull, - Types.OperationNotAllowed, - Types.VmCheckpointSuspendFailed, - Types.VmCheckpointResumeFailed { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.SrFull, + Types.OperationNotAllowed, + Types.VmCheckpointSuspendFailed, + Types.VmCheckpointResumeFailed { String method_call = "Async.VM.checkpoint"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(newName)}; @@ -2823,20 +2845,20 @@ public class VM extends XenAPIObject { * @return The reference of the newly created VM. */ public VM checkpoint(Connection c, String newName) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.SrFull, - Types.OperationNotAllowed, - Types.VmCheckpointSuspendFailed, - Types.VmCheckpointResumeFailed { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.SrFull, + Types.OperationNotAllowed, + Types.VmCheckpointSuspendFailed, + Types.VmCheckpointResumeFailed { String method_call = "VM.checkpoint"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(newName)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVM(result); + return Types.toVM(result); } /** @@ -2845,12 +2867,12 @@ public class VM extends XenAPIObject { * @return Task */ public Task provisionAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.SrFull, - Types.OperationNotAllowed { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.SrFull, + Types.OperationNotAllowed { String method_call = "Async.VM.provision"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -2864,12 +2886,12 @@ public class VM extends XenAPIObject { * */ public void provision(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.SrFull, - Types.OperationNotAllowed { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.SrFull, + Types.OperationNotAllowed { String method_call = "VM.provision"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -2885,18 +2907,18 @@ public class VM extends XenAPIObject { * @return Task */ public Task startAsync(Connection c, Boolean startPaused, Boolean force) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.VmHvmRequired, - Types.VmIsTemplate, - Types.OtherOperationInProgress, - Types.OperationNotAllowed, - Types.BootloaderFailed, - Types.UnknownBootloader, - Types.NoHostsAvailable, - Types.LicenceRestriction { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.VmHvmRequired, + Types.VmIsTemplate, + Types.OtherOperationInProgress, + Types.OperationNotAllowed, + Types.BootloaderFailed, + Types.UnknownBootloader, + Types.NoHostsAvailable, + Types.LicenceRestriction { String method_call = "Async.VM.start"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(startPaused), Marshalling.toXMLRPC(force)}; @@ -2912,18 +2934,18 @@ public class VM extends XenAPIObject { * @param force Attempt to force the VM to start. If this flag is false then the VM may fail pre-boot safety checks (e.g. if the CPU the VM last booted on looks substantially different to the current one) */ public void start(Connection c, Boolean startPaused, Boolean force) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.VmHvmRequired, - Types.VmIsTemplate, - Types.OtherOperationInProgress, - Types.OperationNotAllowed, - Types.BootloaderFailed, - Types.UnknownBootloader, - Types.NoHostsAvailable, - Types.LicenceRestriction { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.VmHvmRequired, + Types.VmIsTemplate, + Types.OtherOperationInProgress, + Types.OperationNotAllowed, + Types.BootloaderFailed, + Types.UnknownBootloader, + Types.NoHostsAvailable, + Types.LicenceRestriction { String method_call = "VM.start"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(startPaused), Marshalling.toXMLRPC(force)}; @@ -2940,19 +2962,18 @@ public class VM extends XenAPIObject { * @return Task */ public Task startOnAsync(Connection c, Host host, Boolean startPaused, Boolean force) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.VmIsTemplate, - Types.OtherOperationInProgress, - Types.OperationNotAllowed, - Types.BootloaderFailed, - Types.UnknownBootloader { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.VmIsTemplate, + Types.OtherOperationInProgress, + Types.OperationNotAllowed, + Types.BootloaderFailed, + Types.UnknownBootloader { String method_call = "Async.VM.start_on"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(startPaused), - Marshalling.toXMLRPC(force)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(startPaused), Marshalling.toXMLRPC(force)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); @@ -2966,19 +2987,18 @@ public class VM extends XenAPIObject { * @param force Attempt to force the VM to start. If this flag is false then the VM may fail pre-boot safety checks (e.g. if the CPU the VM last booted on looks substantially different to the current one) */ public void startOn(Connection c, Host host, Boolean startPaused, Boolean force) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.VmIsTemplate, - Types.OtherOperationInProgress, - Types.OperationNotAllowed, - Types.BootloaderFailed, - Types.UnknownBootloader { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.VmIsTemplate, + Types.OtherOperationInProgress, + Types.OperationNotAllowed, + Types.BootloaderFailed, + Types.UnknownBootloader { String method_call = "VM.start_on"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(startPaused), - Marshalling.toXMLRPC(force)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(startPaused), Marshalling.toXMLRPC(force)}; Map response = c.dispatch(method_call, method_params); return; } @@ -2989,13 +3009,13 @@ public class VM extends XenAPIObject { * @return Task */ public Task pauseAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.OtherOperationInProgress, - Types.OperationNotAllowed, - Types.VmIsTemplate { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.OtherOperationInProgress, + Types.OperationNotAllowed, + Types.VmIsTemplate { String method_call = "Async.VM.pause"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -3009,13 +3029,13 @@ public class VM extends XenAPIObject { * */ public void pause(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.OtherOperationInProgress, - Types.OperationNotAllowed, - Types.VmIsTemplate { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.OtherOperationInProgress, + Types.OperationNotAllowed, + Types.VmIsTemplate { String method_call = "VM.pause"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -3029,12 +3049,12 @@ public class VM extends XenAPIObject { * @return Task */ public Task unpauseAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.OperationNotAllowed, - Types.VmIsTemplate { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.OperationNotAllowed, + Types.VmIsTemplate { String method_call = "Async.VM.unpause"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -3048,12 +3068,12 @@ public class VM extends XenAPIObject { * */ public void unpause(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.OperationNotAllowed, - Types.VmIsTemplate { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.OperationNotAllowed, + Types.VmIsTemplate { String method_call = "VM.unpause"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -3067,13 +3087,13 @@ public class VM extends XenAPIObject { * @return Task */ public Task cleanShutdownAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.OtherOperationInProgress, - Types.OperationNotAllowed, - Types.VmIsTemplate { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.OtherOperationInProgress, + Types.OperationNotAllowed, + Types.VmIsTemplate { String method_call = "Async.VM.clean_shutdown"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -3087,13 +3107,13 @@ public class VM extends XenAPIObject { * */ public void cleanShutdown(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.OtherOperationInProgress, - Types.OperationNotAllowed, - Types.VmIsTemplate { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.OtherOperationInProgress, + Types.OperationNotAllowed, + Types.VmIsTemplate { String method_call = "VM.clean_shutdown"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -3101,19 +3121,59 @@ public class VM extends XenAPIObject { return; } + /** + * Attempts to first clean shutdown a VM and if it should fail then perform a hard shutdown on it. + * + * @return Task + */ + public Task shutdownAsync(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.OtherOperationInProgress, + Types.OperationNotAllowed, + Types.VmIsTemplate { + String method_call = "Async.VM.shutdown"; + String session = c.getSessionReference(); + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; + Map response = c.dispatch(method_call, method_params); + Object result = response.get("Value"); + return Types.toTask(result); + } + + /** + * Attempts to first clean shutdown a VM and if it should fail then perform a hard shutdown on it. + * + */ + public void shutdown(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.OtherOperationInProgress, + Types.OperationNotAllowed, + Types.VmIsTemplate { + String method_call = "VM.shutdown"; + String session = c.getSessionReference(); + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; + Map response = c.dispatch(method_call, method_params); + return; + } + /** * Attempt to cleanly shutdown the specified VM (Note: this may not be supported---e.g. if a guest agent is not installed). This can only be called when the specified VM is in the Running state. * * @return Task */ public Task cleanRebootAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.OtherOperationInProgress, - Types.OperationNotAllowed, - Types.VmIsTemplate { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.OtherOperationInProgress, + Types.OperationNotAllowed, + Types.VmIsTemplate { String method_call = "Async.VM.clean_reboot"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -3127,13 +3187,13 @@ public class VM extends XenAPIObject { * */ public void cleanReboot(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.OtherOperationInProgress, - Types.OperationNotAllowed, - Types.VmIsTemplate { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.OtherOperationInProgress, + Types.OperationNotAllowed, + Types.VmIsTemplate { String method_call = "VM.clean_reboot"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -3147,13 +3207,13 @@ public class VM extends XenAPIObject { * @return Task */ public Task hardShutdownAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.OtherOperationInProgress, - Types.OperationNotAllowed, - Types.VmIsTemplate { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.OtherOperationInProgress, + Types.OperationNotAllowed, + Types.VmIsTemplate { String method_call = "Async.VM.hard_shutdown"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -3167,13 +3227,13 @@ public class VM extends XenAPIObject { * */ public void hardShutdown(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.OtherOperationInProgress, - Types.OperationNotAllowed, - Types.VmIsTemplate { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.OtherOperationInProgress, + Types.OperationNotAllowed, + Types.VmIsTemplate { String method_call = "VM.hard_shutdown"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -3187,9 +3247,9 @@ public class VM extends XenAPIObject { * @return Task */ public Task powerStateResetAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.power_state_reset"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -3203,9 +3263,9 @@ public class VM extends XenAPIObject { * */ public void powerStateReset(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.power_state_reset"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -3219,13 +3279,13 @@ public class VM extends XenAPIObject { * @return Task */ public Task hardRebootAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.OtherOperationInProgress, - Types.OperationNotAllowed, - Types.VmIsTemplate { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.OtherOperationInProgress, + Types.OperationNotAllowed, + Types.VmIsTemplate { String method_call = "Async.VM.hard_reboot"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -3239,13 +3299,13 @@ public class VM extends XenAPIObject { * */ public void hardReboot(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.OtherOperationInProgress, - Types.OperationNotAllowed, - Types.VmIsTemplate { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.OtherOperationInProgress, + Types.OperationNotAllowed, + Types.VmIsTemplate { String method_call = "VM.hard_reboot"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -3259,13 +3319,13 @@ public class VM extends XenAPIObject { * @return Task */ public Task suspendAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.OtherOperationInProgress, - Types.OperationNotAllowed, - Types.VmIsTemplate { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.OtherOperationInProgress, + Types.OperationNotAllowed, + Types.VmIsTemplate { String method_call = "Async.VM.suspend"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -3279,13 +3339,13 @@ public class VM extends XenAPIObject { * */ public void suspend(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.OtherOperationInProgress, - Types.OperationNotAllowed, - Types.VmIsTemplate { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.OtherOperationInProgress, + Types.OperationNotAllowed, + Types.VmIsTemplate { String method_call = "VM.suspend"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -3301,12 +3361,12 @@ public class VM extends XenAPIObject { * @return Task */ public Task resumeAsync(Connection c, Boolean startPaused, Boolean force) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.OperationNotAllowed, - Types.VmIsTemplate { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.OperationNotAllowed, + Types.VmIsTemplate { String method_call = "Async.VM.resume"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(startPaused), Marshalling.toXMLRPC(force)}; @@ -3322,12 +3382,12 @@ public class VM extends XenAPIObject { * @param force Attempt to force the VM to resume. If this flag is false then the VM may fail pre-resume safety checks (e.g. if the CPU the VM was running on looks substantially different to the current one) */ public void resume(Connection c, Boolean startPaused, Boolean force) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.OperationNotAllowed, - Types.VmIsTemplate { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.OperationNotAllowed, + Types.VmIsTemplate { String method_call = "VM.resume"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(startPaused), Marshalling.toXMLRPC(force)}; @@ -3344,16 +3404,15 @@ public class VM extends XenAPIObject { * @return Task */ public Task resumeOnAsync(Connection c, Host host, Boolean startPaused, Boolean force) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.OperationNotAllowed, - Types.VmIsTemplate { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.OperationNotAllowed, + Types.VmIsTemplate { String method_call = "Async.VM.resume_on"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(startPaused), - Marshalling.toXMLRPC(force)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(startPaused), Marshalling.toXMLRPC(force)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); @@ -3367,16 +3426,15 @@ public class VM extends XenAPIObject { * @param force Attempt to force the VM to resume. If this flag is false then the VM may fail pre-resume safety checks (e.g. if the CPU the VM was running on looks substantially different to the current one) */ public void resumeOn(Connection c, Host host, Boolean startPaused, Boolean force) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.OperationNotAllowed, - Types.VmIsTemplate { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.OperationNotAllowed, + Types.VmIsTemplate { String method_call = "VM.resume_on"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(startPaused), - Marshalling.toXMLRPC(force)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(startPaused), Marshalling.toXMLRPC(force)}; Map response = c.dispatch(method_call, method_params); return; } @@ -3389,15 +3447,15 @@ public class VM extends XenAPIObject { * @return Task */ public Task poolMigrateAsync(Connection c, Host host, Map options) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.OtherOperationInProgress, - Types.VmIsTemplate, - Types.OperationNotAllowed, - Types.VmMigrateFailed, - Types.VmMissingPvDrivers { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.OtherOperationInProgress, + Types.VmIsTemplate, + Types.OperationNotAllowed, + Types.VmMigrateFailed, + Types.VmMissingPvDrivers { String method_call = "Async.VM.pool_migrate"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(options)}; @@ -3413,15 +3471,15 @@ public class VM extends XenAPIObject { * @param options Extra configuration operations */ public void poolMigrate(Connection c, Host host, Map options) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.OtherOperationInProgress, - Types.VmIsTemplate, - Types.OperationNotAllowed, - Types.VmMigrateFailed, - Types.VmMissingPvDrivers { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.OtherOperationInProgress, + Types.VmIsTemplate, + Types.OperationNotAllowed, + Types.VmMigrateFailed, + Types.VmMissingPvDrivers { String method_call = "VM.pool_migrate"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(options)}; @@ -3436,9 +3494,9 @@ public class VM extends XenAPIObject { * @return Task */ public Task setVCPUsNumberLiveAsync(Connection c, Long nvcpu) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.set_VCPUs_number_live"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(nvcpu)}; @@ -3453,9 +3511,9 @@ public class VM extends XenAPIObject { * @param nvcpu The number of VCPUs */ public void setVCPUsNumberLive(Connection c, Long nvcpu) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_VCPUs_number_live"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(nvcpu)}; @@ -3471,9 +3529,9 @@ public class VM extends XenAPIObject { * @return Task */ public Task addToVCPUsParamsLiveAsync(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.add_to_VCPUs_params_live"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -3489,9 +3547,9 @@ public class VM extends XenAPIObject { * @param value The value */ public void addToVCPUsParamsLive(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.add_to_VCPUs_params_live"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -3505,9 +3563,9 @@ public class VM extends XenAPIObject { * @param value The value */ public void setHaRestartPriority(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_ha_restart_priority"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -3521,11 +3579,10 @@ public class VM extends XenAPIObject { * * @param value The value */ - @Deprecated - public void setHaAlwaysRun(Connection c, Boolean value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + @Deprecated public void setHaAlwaysRun(Connection c, Boolean value) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_ha_always_run"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -3539,9 +3596,9 @@ public class VM extends XenAPIObject { * @return Task */ public Task computeMemoryOverheadAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.compute_memory_overhead"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -3556,15 +3613,15 @@ public class VM extends XenAPIObject { * @return the virtualization memory overhead of the VM. */ public Long computeMemoryOverhead(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.compute_memory_overhead"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -3573,9 +3630,9 @@ public class VM extends XenAPIObject { * @param value The new value of memory_dynamic_max */ public void setMemoryDynamicMax(Connection c, Long value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_memory_dynamic_max"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -3589,9 +3646,9 @@ public class VM extends XenAPIObject { * @param value The new value of memory_dynamic_min */ public void setMemoryDynamicMin(Connection c, Long value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_memory_dynamic_min"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -3607,9 +3664,9 @@ public class VM extends XenAPIObject { * @return Task */ public Task setMemoryDynamicRangeAsync(Connection c, Long min, Long max) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.set_memory_dynamic_range"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(min), Marshalling.toXMLRPC(max)}; @@ -3625,9 +3682,9 @@ public class VM extends XenAPIObject { * @param max The new maximum value */ public void setMemoryDynamicRange(Connection c, Long min, Long max) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_memory_dynamic_range"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(min), Marshalling.toXMLRPC(max)}; @@ -3641,10 +3698,10 @@ public class VM extends XenAPIObject { * @param value The new value of memory_static_max */ public void setMemoryStaticMax(Connection c, Long value) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.HaOperationWouldBreakFailoverPlan { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.HaOperationWouldBreakFailoverPlan { String method_call = "VM.set_memory_static_max"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -3658,9 +3715,9 @@ public class VM extends XenAPIObject { * @param value The new value of memory_static_min */ public void setMemoryStaticMin(Connection c, Long value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_memory_static_min"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -3676,9 +3733,9 @@ public class VM extends XenAPIObject { * @return Task */ public Task setMemoryStaticRangeAsync(Connection c, Long min, Long max) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.set_memory_static_range"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(min), Marshalling.toXMLRPC(max)}; @@ -3694,9 +3751,9 @@ public class VM extends XenAPIObject { * @param max The new maximum value */ public void setMemoryStaticRange(Connection c, Long min, Long max) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_memory_static_range"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(min), Marshalling.toXMLRPC(max)}; @@ -3714,13 +3771,12 @@ public class VM extends XenAPIObject { * @return Task */ public Task setMemoryLimitsAsync(Connection c, Long staticMin, Long staticMax, Long dynamicMin, Long dynamicMax) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.set_memory_limits"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(staticMin), Marshalling.toXMLRPC(staticMax), - Marshalling.toXMLRPC(dynamicMin), Marshalling.toXMLRPC(dynamicMax)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(staticMin), Marshalling.toXMLRPC(staticMax), Marshalling.toXMLRPC(dynamicMin), Marshalling.toXMLRPC(dynamicMax)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); @@ -3735,13 +3791,12 @@ public class VM extends XenAPIObject { * @param dynamicMax The new value of memory_dynamic_max. */ public void setMemoryLimits(Connection c, Long staticMin, Long staticMax, Long dynamicMin, Long dynamicMax) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_memory_limits"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(staticMin), Marshalling.toXMLRPC(staticMax), - Marshalling.toXMLRPC(dynamicMin), Marshalling.toXMLRPC(dynamicMax)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(staticMin), Marshalling.toXMLRPC(staticMax), Marshalling.toXMLRPC(dynamicMin), Marshalling.toXMLRPC(dynamicMax)}; Map response = c.dispatch(method_call, method_params); return; } @@ -3753,11 +3808,10 @@ public class VM extends XenAPIObject { * @param target The target in bytes * @return Task */ - @Deprecated - public Task setMemoryTargetLiveAsync(Connection c, Long target) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + @Deprecated public Task setMemoryTargetLiveAsync(Connection c, Long target) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.set_memory_target_live"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(target)}; @@ -3772,11 +3826,10 @@ public class VM extends XenAPIObject { * * @param target The target in bytes */ - @Deprecated - public void setMemoryTargetLive(Connection c, Long target) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + @Deprecated public void setMemoryTargetLive(Connection c, Long target) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_memory_target_live"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(target)}; @@ -3790,11 +3843,10 @@ public class VM extends XenAPIObject { * * @return Task */ - @Deprecated - public Task waitMemoryTargetLiveAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + @Deprecated public Task waitMemoryTargetLiveAsync(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.wait_memory_target_live"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -3808,11 +3860,10 @@ public class VM extends XenAPIObject { * @deprecated * */ - @Deprecated - public void waitMemoryTargetLive(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + @Deprecated public void waitMemoryTargetLive(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.wait_memory_target_live"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -3826,11 +3877,10 @@ public class VM extends XenAPIObject { * * @return Task */ - @Deprecated - public Task getCooperativeAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + @Deprecated public Task getCooperativeAsync(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.get_cooperative"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -3845,17 +3895,16 @@ public class VM extends XenAPIObject { * * @return true if the VM is currently 'co-operative'; false otherwise */ - @Deprecated - public Boolean getCooperative(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + @Deprecated public Boolean getCooperative(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_cooperative"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -3864,9 +3913,9 @@ public class VM extends XenAPIObject { * @param value The new shadow memory multiplier to set */ public void setHVMShadowMultiplier(Connection c, Double value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_HVM_shadow_multiplier"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -3881,9 +3930,9 @@ public class VM extends XenAPIObject { * @return Task */ public Task setShadowMultiplierLiveAsync(Connection c, Double multiplier) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.set_shadow_multiplier_live"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(multiplier)}; @@ -3898,9 +3947,9 @@ public class VM extends XenAPIObject { * @param multiplier The new shadow memory multiplier to set */ public void setShadowMultiplierLive(Connection c, Double multiplier) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_shadow_multiplier_live"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(multiplier)}; @@ -3914,9 +3963,9 @@ public class VM extends XenAPIObject { * @param value The new maximum number of VCPUs */ public void setVCPUsMax(Connection c, Long value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_VCPUs_max"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -3930,9 +3979,9 @@ public class VM extends XenAPIObject { * @param value The new maximum number of VCPUs */ public void setVCPUsAtStartup(Connection c, Long value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_VCPUs_at_startup"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -3947,10 +3996,10 @@ public class VM extends XenAPIObject { * @return Task */ public Task sendSysrqAsync(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState { String method_call = "Async.VM.send_sysrq"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -3965,10 +4014,10 @@ public class VM extends XenAPIObject { * @param key The key to send */ public void sendSysrq(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState { String method_call = "VM.send_sysrq"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -3983,10 +4032,10 @@ public class VM extends XenAPIObject { * @return Task */ public Task sendTriggerAsync(Connection c, String trigger) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState { String method_call = "Async.VM.send_trigger"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(trigger)}; @@ -4001,10 +4050,10 @@ public class VM extends XenAPIObject { * @param trigger The trigger to send */ public void sendTrigger(Connection c, String trigger) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState { String method_call = "VM.send_trigger"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(trigger)}; @@ -4020,9 +4069,9 @@ public class VM extends XenAPIObject { * @return Task */ public Task maximiseMemoryAsync(Connection c, Long total, Boolean approximate) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.maximise_memory"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(total), Marshalling.toXMLRPC(approximate)}; @@ -4039,15 +4088,15 @@ public class VM extends XenAPIObject { * @return The maximum possible static-max */ public Long maximiseMemory(Connection c, Long total, Boolean approximate) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.maximise_memory"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(total), Marshalling.toXMLRPC(approximate)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -4061,14 +4110,13 @@ public class VM extends XenAPIObject { * @return Task */ public Task migrateSendAsync(Connection c, Map dest, Boolean live, Map vdiMap, Map vifMap, Map options) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState { String method_call = "Async.VM.migrate_send"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(dest), Marshalling.toXMLRPC(live), - Marshalling.toXMLRPC(vdiMap), Marshalling.toXMLRPC(vifMap), Marshalling.toXMLRPC(options)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(dest), Marshalling.toXMLRPC(live), Marshalling.toXMLRPC(vdiMap), Marshalling.toXMLRPC(vifMap), Marshalling.toXMLRPC(options)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); @@ -4084,14 +4132,13 @@ public class VM extends XenAPIObject { * @param options Other parameters */ public void migrateSend(Connection c, Map dest, Boolean live, Map vdiMap, Map vifMap, Map options) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState { String method_call = "VM.migrate_send"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(dest), Marshalling.toXMLRPC(live), - Marshalling.toXMLRPC(vdiMap), Marshalling.toXMLRPC(vifMap), Marshalling.toXMLRPC(options)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(dest), Marshalling.toXMLRPC(live), Marshalling.toXMLRPC(vdiMap), Marshalling.toXMLRPC(vifMap), Marshalling.toXMLRPC(options)}; Map response = c.dispatch(method_call, method_params); return; } @@ -4106,15 +4153,13 @@ public class VM extends XenAPIObject { * @param options Other parameters * @return Task */ - public Task assertCanMigrateAsync(Connection c, Map dest, Boolean live, Map vdiMap, Map vifMap, Map options) - throws - BadServerResponse, - XenAPIException, - XmlRpcException { + public Task assertCanMigrateAsync(Connection c, Map dest, Boolean live, Map vdiMap, Map vifMap, Map options) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.assert_can_migrate"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(dest), Marshalling.toXMLRPC(live), - Marshalling.toXMLRPC(vdiMap), Marshalling.toXMLRPC(vifMap), Marshalling.toXMLRPC(options)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(dest), Marshalling.toXMLRPC(live), Marshalling.toXMLRPC(vdiMap), Marshalling.toXMLRPC(vifMap), Marshalling.toXMLRPC(options)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); @@ -4130,13 +4175,12 @@ public class VM extends XenAPIObject { * @param options Other parameters */ public void assertCanMigrate(Connection c, Map dest, Boolean live, Map vdiMap, Map vifMap, Map options) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.assert_can_migrate"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(dest), Marshalling.toXMLRPC(live), - Marshalling.toXMLRPC(vdiMap), Marshalling.toXMLRPC(vifMap), Marshalling.toXMLRPC(options)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(dest), Marshalling.toXMLRPC(live), Marshalling.toXMLRPC(vdiMap), Marshalling.toXMLRPC(vifMap), Marshalling.toXMLRPC(options)}; Map response = c.dispatch(method_call, method_params); return; } @@ -4147,32 +4191,32 @@ public class VM extends XenAPIObject { * @return A record describing the VM */ public VM.Record getBootRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_boot_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVMRecord(result); + return Types.toVMRecord(result); } /** - * + * * * @return A set of data sources */ public Set getDataSources(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_data_sources"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfDataSourceRecord(result); + return Types.toSetOfDataSourceRecord(result); } /** @@ -4181,9 +4225,9 @@ public class VM extends XenAPIObject { * @param dataSource The data source to record */ public void recordDataSource(Connection c, String dataSource) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.record_data_source"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(dataSource)}; @@ -4198,15 +4242,15 @@ public class VM extends XenAPIObject { * @return The latest value, averaged over the last 5 seconds */ public Double queryDataSource(Connection c, String dataSource) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.query_data_source"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(dataSource)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDouble(result); + return Types.toDouble(result); } /** @@ -4215,9 +4259,9 @@ public class VM extends XenAPIObject { * @param dataSource The data source whose archives are to be forgotten */ public void forgetDataSourceArchives(Connection c, String dataSource) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.forget_data_source_archives"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(dataSource)}; @@ -4232,9 +4276,9 @@ public class VM extends XenAPIObject { * @return Task */ public Task assertOperationValidAsync(Connection c, Types.VmOperations op) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.assert_operation_valid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(op)}; @@ -4249,9 +4293,9 @@ public class VM extends XenAPIObject { * @param op proposed operation */ public void assertOperationValid(Connection c, Types.VmOperations op) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.assert_operation_valid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(op)}; @@ -4265,9 +4309,9 @@ public class VM extends XenAPIObject { * @return Task */ public Task updateAllowedOperationsAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.update_allowed_operations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -4281,9 +4325,9 @@ public class VM extends XenAPIObject { * */ public void updateAllowedOperations(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.update_allowed_operations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -4297,15 +4341,15 @@ public class VM extends XenAPIObject { * @return The allowed values */ public Set getAllowedVBDDevices(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_allowed_VBD_devices"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -4314,15 +4358,15 @@ public class VM extends XenAPIObject { * @return The allowed values */ public Set getAllowedVIFDevices(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_allowed_VIF_devices"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -4331,9 +4375,9 @@ public class VM extends XenAPIObject { * @return Task */ public Task getPossibleHostsAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.get_possible_hosts"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -4348,15 +4392,15 @@ public class VM extends XenAPIObject { * @return The possible hosts */ public Set getPossibleHosts(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_possible_hosts"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfHost(result); + return Types.toSetOfHost(result); } /** @@ -4366,12 +4410,12 @@ public class VM extends XenAPIObject { * @return Task */ public Task assertCanBootHereAsync(Connection c, Host host) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.HostNotEnoughFreeMemory, - Types.VmRequiresSr, - Types.VmHostIncompatibleVersion { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.HostNotEnoughFreeMemory, + Types.VmRequiresSr, + Types.VmHostIncompatibleVersion { String method_call = "Async.VM.assert_can_boot_here"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(host)}; @@ -4386,12 +4430,12 @@ public class VM extends XenAPIObject { * @param host The host */ public void assertCanBootHere(Connection c, Host host) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.HostNotEnoughFreeMemory, - Types.VmRequiresSr, - Types.VmHostIncompatibleVersion { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.HostNotEnoughFreeMemory, + Types.VmRequiresSr, + Types.VmHostIncompatibleVersion { String method_call = "VM.assert_can_boot_here"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(host)}; @@ -4408,13 +4452,12 @@ public class VM extends XenAPIObject { * @return Task */ public Task createNewBlobAsync(Connection c, String name, String mimeType, Boolean _public) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.create_new_blob"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(mimeType), - Marshalling.toXMLRPC(_public)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(mimeType), Marshalling.toXMLRPC(_public)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); @@ -4429,16 +4472,15 @@ public class VM extends XenAPIObject { * @return The reference of the blob, needed for populating its data */ public Blob createNewBlob(Connection c, String name, String mimeType, Boolean _public) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.create_new_blob"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(mimeType), - Marshalling.toXMLRPC(_public)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(mimeType), Marshalling.toXMLRPC(_public)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBlob(result); + return Types.toBlob(result); } /** @@ -4447,9 +4489,9 @@ public class VM extends XenAPIObject { * @return Task */ public Task assertAgileAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.assert_agile"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -4463,9 +4505,9 @@ public class VM extends XenAPIObject { * */ public void assertAgile(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.assert_agile"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -4479,9 +4521,9 @@ public class VM extends XenAPIObject { * @return Task */ public Task retrieveWlbRecommendationsAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.retrieve_wlb_recommendations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -4496,15 +4538,15 @@ public class VM extends XenAPIObject { * @return The potential hosts and their corresponding recommendations or errors */ public Map> retrieveWlbRecommendations(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.retrieve_wlb_recommendations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfHostSetOfString(result); + return Types.toMapOfHostSetOfString(result); } /** @@ -4514,9 +4556,9 @@ public class VM extends XenAPIObject { * @return Task */ public Task copyBiosStringsAsync(Connection c, Host host) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.copy_bios_strings"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(host)}; @@ -4531,9 +4573,9 @@ public class VM extends XenAPIObject { * @param host The host to copy the BIOS strings from */ public void copyBiosStrings(Connection c, Host host) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.copy_bios_strings"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(host)}; @@ -4547,9 +4589,9 @@ public class VM extends XenAPIObject { * @param value The value */ public void setProtectionPolicy(Connection c, VMPP value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_protection_policy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -4564,9 +4606,9 @@ public class VM extends XenAPIObject { * @return Task */ public Task setStartDelayAsync(Connection c, Long value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.set_start_delay"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -4581,9 +4623,9 @@ public class VM extends XenAPIObject { * @param value This VM's start delay in seconds */ public void setStartDelay(Connection c, Long value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_start_delay"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -4598,9 +4640,9 @@ public class VM extends XenAPIObject { * @return Task */ public Task setShutdownDelayAsync(Connection c, Long value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.set_shutdown_delay"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -4615,9 +4657,9 @@ public class VM extends XenAPIObject { * @param value This VM's shutdown delay in seconds */ public void setShutdownDelay(Connection c, Long value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_shutdown_delay"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -4632,9 +4674,9 @@ public class VM extends XenAPIObject { * @return Task */ public Task setOrderAsync(Connection c, Long value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.set_order"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -4649,9 +4691,9 @@ public class VM extends XenAPIObject { * @param value This VM's boot order */ public void setOrder(Connection c, Long value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_order"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -4666,9 +4708,9 @@ public class VM extends XenAPIObject { * @return Task */ public Task setSuspendVDIAsync(Connection c, VDI value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.set_suspend_VDI"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -4683,9 +4725,9 @@ public class VM extends XenAPIObject { * @param value The suspend VDI uuid */ public void setSuspendVDI(Connection c, VDI value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_suspend_VDI"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -4700,11 +4742,11 @@ public class VM extends XenAPIObject { * @return Task */ public Task assertCanBeRecoveredAsync(Connection c, Session sessionTo) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmIsPartOfAnAppliance, - Types.VmRequiresSr { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmIsPartOfAnAppliance, + Types.VmRequiresSr { String method_call = "Async.VM.assert_can_be_recovered"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(sessionTo)}; @@ -4719,11 +4761,11 @@ public class VM extends XenAPIObject { * @param sessionTo The session to which the VM is to be recovered. */ public void assertCanBeRecovered(Connection c, Session sessionTo) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmIsPartOfAnAppliance, - Types.VmRequiresSr { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmIsPartOfAnAppliance, + Types.VmRequiresSr { String method_call = "VM.assert_can_be_recovered"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(sessionTo)}; @@ -4739,9 +4781,9 @@ public class VM extends XenAPIObject { * @return Task */ public Task recoverAsync(Connection c, Session sessionTo, Boolean force) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.recover"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(sessionTo), Marshalling.toXMLRPC(force)}; @@ -4757,9 +4799,9 @@ public class VM extends XenAPIObject { * @param force Whether the VM should replace newer versions of itself. */ public void recover(Connection c, Session sessionTo, Boolean force) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.recover"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(sessionTo), Marshalling.toXMLRPC(force)}; @@ -4778,13 +4820,12 @@ public class VM extends XenAPIObject { * @return Task */ public static Task importConvertAsync(Connection c, String type, String username, String password, SR sr, Map remoteConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.import_convert"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(username), Marshalling.toXMLRPC(password), - Marshalling.toXMLRPC(sr), Marshalling.toXMLRPC(remoteConfig)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(username), Marshalling.toXMLRPC(password), Marshalling.toXMLRPC(sr), Marshalling.toXMLRPC(remoteConfig)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); @@ -4800,13 +4841,12 @@ public class VM extends XenAPIObject { * @param remoteConfig Remote configuration options */ public static void importConvert(Connection c, String type, String username, String password, SR sr, Map remoteConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.import_convert"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(username), Marshalling.toXMLRPC(password), - Marshalling.toXMLRPC(sr), Marshalling.toXMLRPC(remoteConfig)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(username), Marshalling.toXMLRPC(password), Marshalling.toXMLRPC(sr), Marshalling.toXMLRPC(remoteConfig)}; Map response = c.dispatch(method_call, method_params); return; } @@ -4818,9 +4858,9 @@ public class VM extends XenAPIObject { * @return Task */ public Task setApplianceAsync(Connection c, VMAppliance value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.set_appliance"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -4835,9 +4875,9 @@ public class VM extends XenAPIObject { * @param value The appliance to which this VM should be assigned. */ public void setAppliance(Connection c, VMAppliance value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_appliance"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -4851,9 +4891,9 @@ public class VM extends XenAPIObject { * @return Task */ public Task queryServicesAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.query_services"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -4868,15 +4908,15 @@ public class VM extends XenAPIObject { * @return map of service type to name */ public Map queryServices(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.query_services"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -4885,15 +4925,15 @@ public class VM extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVM(result); + return Types.toSetOfVM(result); } /** @@ -4902,15 +4942,15 @@ public class VM extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfVMVMRecord(result); + return Types.toMapOfVMVMRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/VMAppliance.java b/deps/XenServerJava/src/com/xensource/xenapi/VMAppliance.java index b7e7e36684e..a0eb0d6f55e 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/VMAppliance.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/VMAppliance.java @@ -1,19 +1,19 @@ /* * 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 @@ -28,6 +28,7 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ + package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -60,14 +61,14 @@ public class VMAppliance extends XenAPIObject { * For internal use only. */ VMAppliance(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -78,7 +79,7 @@ public class VMAppliance extends XenAPIObject { { if (obj != null && obj instanceof VMAppliance) { - VMAppliance other = (VMAppliance)obj; + VMAppliance other = (VMAppliance) obj; return other.ref.equals(this.ref); } else { @@ -111,8 +112,8 @@ public class VMAppliance extends XenAPIObject { /** * Convert a VM_appliance.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("name_label", this.nameLabel == null ? "" : this.nameLabel); map.put("name_description", this.nameDescription == null ? "" : this.nameDescription); @@ -154,15 +155,15 @@ public class VMAppliance extends XenAPIObject { * @return all fields from the object */ public VMAppliance.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_appliance.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVMApplianceRecord(result); + return Types.toVMApplianceRecord(result); } /** @@ -172,15 +173,15 @@ public class VMAppliance extends XenAPIObject { * @return reference to the object */ public static VMAppliance getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_appliance.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVMAppliance(result); + return Types.toVMAppliance(result); } /** @@ -190,9 +191,9 @@ public class VMAppliance extends XenAPIObject { * @return Task */ public static Task createAsync(Connection c, VMAppliance.Record record) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM_appliance.create"; String session = c.getSessionReference(); Map record_map = record.toMap(); @@ -209,16 +210,16 @@ public class VMAppliance extends XenAPIObject { * @return reference to the newly created object */ public static VMAppliance create(Connection c, VMAppliance.Record record) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_appliance.create"; String session = c.getSessionReference(); Map record_map = record.toMap(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(record_map)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVMAppliance(result); + return Types.toVMAppliance(result); } /** @@ -227,9 +228,9 @@ public class VMAppliance extends XenAPIObject { * @return Task */ public Task destroyAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM_appliance.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -243,9 +244,9 @@ public class VMAppliance extends XenAPIObject { * */ public void destroy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_appliance.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -260,15 +261,15 @@ public class VMAppliance extends XenAPIObject { * @return references to objects with matching names */ public static Set getByNameLabel(Connection c, String label) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_appliance.get_by_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(label)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVMAppliance(result); + return Types.toSetOfVMAppliance(result); } /** @@ -277,15 +278,15 @@ public class VMAppliance extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_appliance.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -294,15 +295,15 @@ public class VMAppliance extends XenAPIObject { * @return value of the field */ public String getNameLabel(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_appliance.get_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -311,15 +312,15 @@ public class VMAppliance extends XenAPIObject { * @return value of the field */ public String getNameDescription(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_appliance.get_name_description"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -328,15 +329,15 @@ public class VMAppliance extends XenAPIObject { * @return value of the field */ public Set getAllowedOperations(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_appliance.get_allowed_operations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVmApplianceOperation(result); + return Types.toSetOfVmApplianceOperation(result); } /** @@ -345,15 +346,15 @@ public class VMAppliance extends XenAPIObject { * @return value of the field */ public Map getCurrentOperations(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_appliance.get_current_operations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringVmApplianceOperation(result); + return Types.toMapOfStringVmApplianceOperation(result); } /** @@ -362,15 +363,15 @@ public class VMAppliance extends XenAPIObject { * @return value of the field */ public Set getVMs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_appliance.get_VMs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVM(result); + return Types.toSetOfVM(result); } /** @@ -379,9 +380,9 @@ public class VMAppliance extends XenAPIObject { * @param label New value to set */ public void setNameLabel(Connection c, String label) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_appliance.set_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(label)}; @@ -395,9 +396,9 @@ public class VMAppliance extends XenAPIObject { * @param description New value to set */ public void setNameDescription(Connection c, String description) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_appliance.set_name_description"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(description)}; @@ -412,10 +413,10 @@ public class VMAppliance extends XenAPIObject { * @return Task */ public Task startAsync(Connection c, Boolean paused) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.OperationPartiallyFailed { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.OperationPartiallyFailed { String method_call = "Async.VM_appliance.start"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(paused)}; @@ -430,10 +431,10 @@ public class VMAppliance extends XenAPIObject { * @param paused Instantiate all VMs belonging to this appliance in paused state if set to true. */ public void start(Connection c, Boolean paused) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.OperationPartiallyFailed { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.OperationPartiallyFailed { String method_call = "VM_appliance.start"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(paused)}; @@ -447,10 +448,10 @@ public class VMAppliance extends XenAPIObject { * @return Task */ public Task cleanShutdownAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.OperationPartiallyFailed { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.OperationPartiallyFailed { String method_call = "Async.VM_appliance.clean_shutdown"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -464,10 +465,10 @@ public class VMAppliance extends XenAPIObject { * */ public void cleanShutdown(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.OperationPartiallyFailed { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.OperationPartiallyFailed { String method_call = "VM_appliance.clean_shutdown"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -481,10 +482,10 @@ public class VMAppliance extends XenAPIObject { * @return Task */ public Task hardShutdownAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.OperationPartiallyFailed { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.OperationPartiallyFailed { String method_call = "Async.VM_appliance.hard_shutdown"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -498,10 +499,10 @@ public class VMAppliance extends XenAPIObject { * */ public void hardShutdown(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.OperationPartiallyFailed { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.OperationPartiallyFailed { String method_call = "VM_appliance.hard_shutdown"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -515,10 +516,10 @@ public class VMAppliance extends XenAPIObject { * @return Task */ public Task shutdownAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.OperationPartiallyFailed { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.OperationPartiallyFailed { String method_call = "Async.VM_appliance.shutdown"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -532,10 +533,10 @@ public class VMAppliance extends XenAPIObject { * */ public void shutdown(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.OperationPartiallyFailed { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.OperationPartiallyFailed { String method_call = "VM_appliance.shutdown"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -550,10 +551,10 @@ public class VMAppliance extends XenAPIObject { * @return Task */ public Task assertCanBeRecoveredAsync(Connection c, Session sessionTo) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmRequiresSr { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmRequiresSr { String method_call = "Async.VM_appliance.assert_can_be_recovered"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(sessionTo)}; @@ -568,10 +569,10 @@ public class VMAppliance extends XenAPIObject { * @param sessionTo The session to which the VM appliance is to be recovered. */ public void assertCanBeRecovered(Connection c, Session sessionTo) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmRequiresSr { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmRequiresSr { String method_call = "VM_appliance.assert_can_be_recovered"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(sessionTo)}; @@ -587,10 +588,10 @@ public class VMAppliance extends XenAPIObject { * @return Task */ public Task recoverAsync(Connection c, Session sessionTo, Boolean force) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmRequiresSr { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmRequiresSr { String method_call = "Async.VM_appliance.recover"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(sessionTo), Marshalling.toXMLRPC(force)}; @@ -606,10 +607,10 @@ public class VMAppliance extends XenAPIObject { * @param force Whether the VMs should replace newer versions of themselves. */ public void recover(Connection c, Session sessionTo, Boolean force) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmRequiresSr { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmRequiresSr { String method_call = "VM_appliance.recover"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(sessionTo), Marshalling.toXMLRPC(force)}; @@ -623,15 +624,15 @@ public class VMAppliance extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_appliance.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVMAppliance(result); + return Types.toSetOfVMAppliance(result); } /** @@ -640,15 +641,15 @@ public class VMAppliance extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_appliance.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfVMApplianceVMApplianceRecord(result); + return Types.toMapOfVMApplianceVMApplianceRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/VMGuestMetrics.java b/deps/XenServerJava/src/com/xensource/xenapi/VMGuestMetrics.java index 08d88e3641c..024f6c4d7e9 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/VMGuestMetrics.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/VMGuestMetrics.java @@ -1,19 +1,19 @@ /* * 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 @@ -28,6 +28,7 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ + package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -60,14 +61,14 @@ public class VMGuestMetrics extends XenAPIObject { * For internal use only. */ VMGuestMetrics(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -78,7 +79,7 @@ public class VMGuestMetrics extends XenAPIObject { { if (obj != null && obj instanceof VMGuestMetrics) { - VMGuestMetrics other = (VMGuestMetrics)obj; + VMGuestMetrics other = (VMGuestMetrics) obj; return other.ref.equals(this.ref); } else { @@ -116,8 +117,8 @@ public class VMGuestMetrics extends XenAPIObject { /** * Convert a VM_guest_metrics.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("os_version", this.osVersion == null ? new HashMap() : this.osVersion); map.put("PV_drivers_version", this.PVDriversVersion == null ? new HashMap() : this.PVDriversVersion); @@ -184,15 +185,15 @@ public class VMGuestMetrics extends XenAPIObject { * @return all fields from the object */ public VMGuestMetrics.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_guest_metrics.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVMGuestMetricsRecord(result); + return Types.toVMGuestMetricsRecord(result); } /** @@ -202,15 +203,15 @@ public class VMGuestMetrics extends XenAPIObject { * @return reference to the object */ public static VMGuestMetrics getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_guest_metrics.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVMGuestMetrics(result); + return Types.toVMGuestMetrics(result); } /** @@ -219,15 +220,15 @@ public class VMGuestMetrics extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_guest_metrics.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -236,15 +237,15 @@ public class VMGuestMetrics extends XenAPIObject { * @return value of the field */ public Map getOsVersion(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_guest_metrics.get_os_version"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -253,15 +254,15 @@ public class VMGuestMetrics extends XenAPIObject { * @return value of the field */ public Map getPVDriversVersion(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_guest_metrics.get_PV_drivers_version"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -270,15 +271,15 @@ public class VMGuestMetrics extends XenAPIObject { * @return value of the field */ public Boolean getPVDriversUpToDate(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_guest_metrics.get_PV_drivers_up_to_date"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -287,15 +288,15 @@ public class VMGuestMetrics extends XenAPIObject { * @return value of the field */ public Map getMemory(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_guest_metrics.get_memory"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -304,15 +305,15 @@ public class VMGuestMetrics extends XenAPIObject { * @return value of the field */ public Map getDisks(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_guest_metrics.get_disks"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -321,15 +322,15 @@ public class VMGuestMetrics extends XenAPIObject { * @return value of the field */ public Map getNetworks(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_guest_metrics.get_networks"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -338,15 +339,15 @@ public class VMGuestMetrics extends XenAPIObject { * @return value of the field */ public Map getOther(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_guest_metrics.get_other"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -355,15 +356,15 @@ public class VMGuestMetrics extends XenAPIObject { * @return value of the field */ public Date getLastUpdated(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_guest_metrics.get_last_updated"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDate(result); + return Types.toDate(result); } /** @@ -372,15 +373,15 @@ public class VMGuestMetrics extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_guest_metrics.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -389,15 +390,15 @@ public class VMGuestMetrics extends XenAPIObject { * @return value of the field */ public Boolean getLive(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_guest_metrics.get_live"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -406,9 +407,9 @@ public class VMGuestMetrics extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_guest_metrics.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -423,9 +424,9 @@ public class VMGuestMetrics extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_guest_metrics.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -439,9 +440,9 @@ public class VMGuestMetrics extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_guest_metrics.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -455,15 +456,15 @@ public class VMGuestMetrics extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_guest_metrics.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVMGuestMetrics(result); + return Types.toSetOfVMGuestMetrics(result); } /** @@ -472,15 +473,15 @@ public class VMGuestMetrics extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_guest_metrics.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfVMGuestMetricsVMGuestMetricsRecord(result); + return Types.toMapOfVMGuestMetricsVMGuestMetricsRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/VMMetrics.java b/deps/XenServerJava/src/com/xensource/xenapi/VMMetrics.java index 5f9a7a42c7c..30f49845158 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/VMMetrics.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/VMMetrics.java @@ -1,19 +1,19 @@ /* * 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 @@ -28,6 +28,7 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ + package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -60,14 +61,14 @@ public class VMMetrics extends XenAPIObject { * For internal use only. */ VMMetrics(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -78,7 +79,7 @@ public class VMMetrics extends XenAPIObject { { if (obj != null && obj instanceof VMMetrics) { - VMMetrics other = (VMMetrics)obj; + VMMetrics other = (VMMetrics) obj; return other.ref.equals(this.ref); } else { @@ -117,8 +118,8 @@ public class VMMetrics extends XenAPIObject { /** * Convert a VM_metrics.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("memory_actual", this.memoryActual == null ? 0 : this.memoryActual); map.put("VCPUs_number", this.VCPUsNumber == null ? 0 : this.VCPUsNumber); @@ -190,15 +191,15 @@ public class VMMetrics extends XenAPIObject { * @return all fields from the object */ public VMMetrics.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_metrics.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVMMetricsRecord(result); + return Types.toVMMetricsRecord(result); } /** @@ -208,15 +209,15 @@ public class VMMetrics extends XenAPIObject { * @return reference to the object */ public static VMMetrics getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_metrics.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVMMetrics(result); + return Types.toVMMetrics(result); } /** @@ -225,15 +226,15 @@ public class VMMetrics extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_metrics.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -242,15 +243,15 @@ public class VMMetrics extends XenAPIObject { * @return value of the field */ public Long getMemoryActual(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_metrics.get_memory_actual"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -259,15 +260,15 @@ public class VMMetrics extends XenAPIObject { * @return value of the field */ public Long getVCPUsNumber(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_metrics.get_VCPUs_number"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -276,15 +277,15 @@ public class VMMetrics extends XenAPIObject { * @return value of the field */ public Map getVCPUsUtilisation(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_metrics.get_VCPUs_utilisation"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfLongDouble(result); + return Types.toMapOfLongDouble(result); } /** @@ -293,15 +294,15 @@ public class VMMetrics extends XenAPIObject { * @return value of the field */ public Map getVCPUsCPU(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_metrics.get_VCPUs_CPU"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfLongLong(result); + return Types.toMapOfLongLong(result); } /** @@ -310,15 +311,15 @@ public class VMMetrics extends XenAPIObject { * @return value of the field */ public Map getVCPUsParams(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_metrics.get_VCPUs_params"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -327,15 +328,15 @@ public class VMMetrics extends XenAPIObject { * @return value of the field */ public Map> getVCPUsFlags(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_metrics.get_VCPUs_flags"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfLongSetOfString(result); + return Types.toMapOfLongSetOfString(result); } /** @@ -344,15 +345,15 @@ public class VMMetrics extends XenAPIObject { * @return value of the field */ public Set getState(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_metrics.get_state"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -361,15 +362,15 @@ public class VMMetrics extends XenAPIObject { * @return value of the field */ public Date getStartTime(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_metrics.get_start_time"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDate(result); + return Types.toDate(result); } /** @@ -378,15 +379,15 @@ public class VMMetrics extends XenAPIObject { * @return value of the field */ public Date getInstallTime(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_metrics.get_install_time"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDate(result); + return Types.toDate(result); } /** @@ -395,15 +396,15 @@ public class VMMetrics extends XenAPIObject { * @return value of the field */ public Date getLastUpdated(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_metrics.get_last_updated"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDate(result); + return Types.toDate(result); } /** @@ -412,15 +413,15 @@ public class VMMetrics extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_metrics.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -429,9 +430,9 @@ public class VMMetrics extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_metrics.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -446,9 +447,9 @@ public class VMMetrics extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_metrics.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -462,9 +463,9 @@ public class VMMetrics extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_metrics.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -478,15 +479,15 @@ public class VMMetrics extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_metrics.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVMMetrics(result); + return Types.toSetOfVMMetrics(result); } /** @@ -495,15 +496,15 @@ public class VMMetrics extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_metrics.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfVMMetricsVMMetricsRecord(result); + return Types.toMapOfVMMetricsVMMetricsRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/VMPP.java b/deps/XenServerJava/src/com/xensource/xenapi/VMPP.java index 0ee0b3e7439..f49019bbcec 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/VMPP.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/VMPP.java @@ -1,19 +1,19 @@ /* * 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 @@ -28,6 +28,7 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ + package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -60,14 +61,14 @@ public class VMPP extends XenAPIObject { * For internal use only. */ VMPP(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -78,7 +79,7 @@ public class VMPP extends XenAPIObject { { if (obj != null && obj instanceof VMPP) { - VMPP other = (VMPP)obj; + VMPP other = (VMPP) obj; return other.ref.equals(this.ref); } else { @@ -125,8 +126,8 @@ public class VMPP extends XenAPIObject { /** * Convert a VMPP.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("name_label", this.nameLabel == null ? "" : this.nameLabel); map.put("name_description", this.nameDescription == null ? "" : this.nameDescription); @@ -238,15 +239,15 @@ public class VMPP extends XenAPIObject { * @return all fields from the object */ public VMPP.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVMPPRecord(result); + return Types.toVMPPRecord(result); } /** @@ -256,15 +257,15 @@ public class VMPP extends XenAPIObject { * @return reference to the object */ public static VMPP getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVMPP(result); + return Types.toVMPP(result); } /** @@ -274,9 +275,9 @@ public class VMPP extends XenAPIObject { * @return Task */ public static Task createAsync(Connection c, VMPP.Record record) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VMPP.create"; String session = c.getSessionReference(); Map record_map = record.toMap(); @@ -293,16 +294,16 @@ public class VMPP extends XenAPIObject { * @return reference to the newly created object */ public static VMPP create(Connection c, VMPP.Record record) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.create"; String session = c.getSessionReference(); Map record_map = record.toMap(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(record_map)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVMPP(result); + return Types.toVMPP(result); } /** @@ -311,9 +312,9 @@ public class VMPP extends XenAPIObject { * @return Task */ public Task destroyAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VMPP.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -327,9 +328,9 @@ public class VMPP extends XenAPIObject { * */ public void destroy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -344,15 +345,15 @@ public class VMPP extends XenAPIObject { * @return references to objects with matching names */ public static Set getByNameLabel(Connection c, String label) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.get_by_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(label)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVMPP(result); + return Types.toSetOfVMPP(result); } /** @@ -361,15 +362,15 @@ public class VMPP extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -378,15 +379,15 @@ public class VMPP extends XenAPIObject { * @return value of the field */ public String getNameLabel(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.get_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -395,15 +396,15 @@ public class VMPP extends XenAPIObject { * @return value of the field */ public String getNameDescription(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.get_name_description"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -412,15 +413,15 @@ public class VMPP extends XenAPIObject { * @return value of the field */ public Boolean getIsPolicyEnabled(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.get_is_policy_enabled"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -429,15 +430,15 @@ public class VMPP extends XenAPIObject { * @return value of the field */ public Types.VmppBackupType getBackupType(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.get_backup_type"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVmppBackupType(result); + return Types.toVmppBackupType(result); } /** @@ -446,15 +447,15 @@ public class VMPP extends XenAPIObject { * @return value of the field */ public Long getBackupRetentionValue(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.get_backup_retention_value"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -463,15 +464,15 @@ public class VMPP extends XenAPIObject { * @return value of the field */ public Types.VmppBackupFrequency getBackupFrequency(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.get_backup_frequency"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVmppBackupFrequency(result); + return Types.toVmppBackupFrequency(result); } /** @@ -480,15 +481,15 @@ public class VMPP extends XenAPIObject { * @return value of the field */ public Map getBackupSchedule(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.get_backup_schedule"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -497,15 +498,15 @@ public class VMPP extends XenAPIObject { * @return value of the field */ public Boolean getIsBackupRunning(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.get_is_backup_running"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -514,15 +515,15 @@ public class VMPP extends XenAPIObject { * @return value of the field */ public Date getBackupLastRunTime(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.get_backup_last_run_time"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDate(result); + return Types.toDate(result); } /** @@ -531,15 +532,15 @@ public class VMPP extends XenAPIObject { * @return value of the field */ public Types.VmppArchiveTargetType getArchiveTargetType(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.get_archive_target_type"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVmppArchiveTargetType(result); + return Types.toVmppArchiveTargetType(result); } /** @@ -548,15 +549,15 @@ public class VMPP extends XenAPIObject { * @return value of the field */ public Map getArchiveTargetConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.get_archive_target_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -565,15 +566,15 @@ public class VMPP extends XenAPIObject { * @return value of the field */ public Types.VmppArchiveFrequency getArchiveFrequency(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.get_archive_frequency"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVmppArchiveFrequency(result); + return Types.toVmppArchiveFrequency(result); } /** @@ -582,15 +583,15 @@ public class VMPP extends XenAPIObject { * @return value of the field */ public Map getArchiveSchedule(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.get_archive_schedule"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -599,15 +600,15 @@ public class VMPP extends XenAPIObject { * @return value of the field */ public Boolean getIsArchiveRunning(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.get_is_archive_running"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -616,15 +617,15 @@ public class VMPP extends XenAPIObject { * @return value of the field */ public Date getArchiveLastRunTime(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.get_archive_last_run_time"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDate(result); + return Types.toDate(result); } /** @@ -633,15 +634,15 @@ public class VMPP extends XenAPIObject { * @return value of the field */ public Set getVMs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.get_VMs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVM(result); + return Types.toSetOfVM(result); } /** @@ -650,15 +651,15 @@ public class VMPP extends XenAPIObject { * @return value of the field */ public Boolean getIsAlarmEnabled(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.get_is_alarm_enabled"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -667,15 +668,15 @@ public class VMPP extends XenAPIObject { * @return value of the field */ public Map getAlarmConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.get_alarm_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -684,15 +685,15 @@ public class VMPP extends XenAPIObject { * @return value of the field */ public Set getRecentAlerts(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.get_recent_alerts"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -701,9 +702,9 @@ public class VMPP extends XenAPIObject { * @param label New value to set */ public void setNameLabel(Connection c, String label) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.set_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(label)}; @@ -717,9 +718,9 @@ public class VMPP extends XenAPIObject { * @param description New value to set */ public void setNameDescription(Connection c, String description) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.set_name_description"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(description)}; @@ -733,9 +734,9 @@ public class VMPP extends XenAPIObject { * @param isPolicyEnabled New value to set */ public void setIsPolicyEnabled(Connection c, Boolean isPolicyEnabled) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.set_is_policy_enabled"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(isPolicyEnabled)}; @@ -749,9 +750,9 @@ public class VMPP extends XenAPIObject { * @param backupType New value to set */ public void setBackupType(Connection c, Types.VmppBackupType backupType) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.set_backup_type"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(backupType)}; @@ -765,15 +766,15 @@ public class VMPP extends XenAPIObject { * @return An XMLRPC result */ public String protectNow(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.protect_now"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -783,15 +784,15 @@ public class VMPP extends XenAPIObject { * @return An XMLRPC result */ public static String archiveNow(Connection c, VM snapshot) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.archive_now"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(snapshot)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -801,26 +802,26 @@ public class VMPP extends XenAPIObject { * @return A list of alerts encoded in xml */ public Set getAlerts(Connection c, Long hoursFromNow) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.get_alerts"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(hoursFromNow)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** - * + * * * @param value the value to set */ public void setBackupRetentionValue(Connection c, Long value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.set_backup_retention_value"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -834,9 +835,9 @@ public class VMPP extends XenAPIObject { * @param value the backup frequency */ public void setBackupFrequency(Connection c, Types.VmppBackupFrequency value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.set_backup_frequency"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -845,14 +846,14 @@ public class VMPP extends XenAPIObject { } /** - * + * * * @param value the value to set */ public void setBackupSchedule(Connection c, Map value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.set_backup_schedule"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -866,9 +867,9 @@ public class VMPP extends XenAPIObject { * @param value the archive frequency */ public void setArchiveFrequency(Connection c, Types.VmppArchiveFrequency value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.set_archive_frequency"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -877,14 +878,14 @@ public class VMPP extends XenAPIObject { } /** - * + * * * @param value the value to set */ public void setArchiveSchedule(Connection c, Map value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.set_archive_schedule"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -898,9 +899,9 @@ public class VMPP extends XenAPIObject { * @param value the archive target config type */ public void setArchiveTargetType(Connection c, Types.VmppArchiveTargetType value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.set_archive_target_type"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -909,14 +910,14 @@ public class VMPP extends XenAPIObject { } /** - * + * * * @param value the value to set */ public void setArchiveTargetConfig(Connection c, Map value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.set_archive_target_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -930,9 +931,9 @@ public class VMPP extends XenAPIObject { * @param value true if alarm is enabled for this policy */ public void setIsAlarmEnabled(Connection c, Boolean value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.set_is_alarm_enabled"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -941,14 +942,14 @@ public class VMPP extends XenAPIObject { } /** - * + * * * @param value the value to set */ public void setAlarmConfig(Connection c, Map value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.set_alarm_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -957,15 +958,15 @@ public class VMPP extends XenAPIObject { } /** - * + * * * @param key the key to add * @param value the value to add */ public void addToBackupSchedule(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.add_to_backup_schedule"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -974,15 +975,15 @@ public class VMPP extends XenAPIObject { } /** - * + * * * @param key the key to add * @param value the value to add */ public void addToArchiveTargetConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.add_to_archive_target_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -991,15 +992,15 @@ public class VMPP extends XenAPIObject { } /** - * + * * * @param key the key to add * @param value the value to add */ public void addToArchiveSchedule(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.add_to_archive_schedule"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -1008,15 +1009,15 @@ public class VMPP extends XenAPIObject { } /** - * + * * * @param key the key to add * @param value the value to add */ public void addToAlarmConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.add_to_alarm_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -1025,14 +1026,14 @@ public class VMPP extends XenAPIObject { } /** - * + * * * @param key the key to remove */ public void removeFromBackupSchedule(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.remove_from_backup_schedule"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -1041,14 +1042,14 @@ public class VMPP extends XenAPIObject { } /** - * + * * * @param key the key to remove */ public void removeFromArchiveTargetConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.remove_from_archive_target_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -1057,14 +1058,14 @@ public class VMPP extends XenAPIObject { } /** - * + * * * @param key the key to remove */ public void removeFromArchiveSchedule(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.remove_from_archive_schedule"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -1073,14 +1074,14 @@ public class VMPP extends XenAPIObject { } /** - * + * * * @param key the key to remove */ public void removeFromAlarmConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.remove_from_alarm_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -1089,14 +1090,14 @@ public class VMPP extends XenAPIObject { } /** - * + * * * @param value the value to set */ public void setBackupLastRunTime(Connection c, Date value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.set_backup_last_run_time"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1105,14 +1106,14 @@ public class VMPP extends XenAPIObject { } /** - * + * * * @param value the value to set */ public void setArchiveLastRunTime(Connection c, Date value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.set_archive_last_run_time"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1126,15 +1127,15 @@ public class VMPP extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVMPP(result); + return Types.toSetOfVMPP(result); } /** @@ -1143,15 +1144,15 @@ public class VMPP extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfVMPPVMPPRecord(result); + return Types.toMapOfVMPPVMPPRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/VTPM.java b/deps/XenServerJava/src/com/xensource/xenapi/VTPM.java index 25c332081ef..4ee7b2f366e 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/VTPM.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/VTPM.java @@ -1,19 +1,19 @@ /* * 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 @@ -28,6 +28,7 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ + package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -60,14 +61,14 @@ public class VTPM extends XenAPIObject { * For internal use only. */ VTPM(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -78,7 +79,7 @@ public class VTPM extends XenAPIObject { { if (obj != null && obj instanceof VTPM) { - VTPM other = (VTPM)obj; + VTPM other = (VTPM) obj; return other.ref.equals(this.ref); } else { @@ -108,8 +109,8 @@ public class VTPM extends XenAPIObject { /** * Convert a VTPM.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("VM", this.VM == null ? new VM("OpaqueRef:NULL") : this.VM); map.put("backend", this.backend == null ? new VM("OpaqueRef:NULL") : this.backend); @@ -136,15 +137,15 @@ public class VTPM extends XenAPIObject { * @return all fields from the object */ public VTPM.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VTPM.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVTPMRecord(result); + return Types.toVTPMRecord(result); } /** @@ -154,15 +155,15 @@ public class VTPM extends XenAPIObject { * @return reference to the object */ public static VTPM getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VTPM.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVTPM(result); + return Types.toVTPM(result); } /** @@ -172,9 +173,9 @@ public class VTPM extends XenAPIObject { * @return Task */ public static Task createAsync(Connection c, VTPM.Record record) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VTPM.create"; String session = c.getSessionReference(); Map record_map = record.toMap(); @@ -191,16 +192,16 @@ public class VTPM extends XenAPIObject { * @return reference to the newly created object */ public static VTPM create(Connection c, VTPM.Record record) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VTPM.create"; String session = c.getSessionReference(); Map record_map = record.toMap(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(record_map)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVTPM(result); + return Types.toVTPM(result); } /** @@ -209,9 +210,9 @@ public class VTPM extends XenAPIObject { * @return Task */ public Task destroyAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VTPM.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -225,9 +226,9 @@ public class VTPM extends XenAPIObject { * */ public void destroy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VTPM.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -241,15 +242,15 @@ public class VTPM extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VTPM.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -258,15 +259,15 @@ public class VTPM extends XenAPIObject { * @return value of the field */ public VM getVM(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VTPM.get_VM"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVM(result); + return Types.toVM(result); } /** @@ -275,15 +276,15 @@ public class VTPM extends XenAPIObject { * @return value of the field */ public VM getBackend(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VTPM.get_backend"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVM(result); + return Types.toVM(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/XenAPIObject.java b/deps/XenServerJava/src/com/xensource/xenapi/XenAPIObject.java old mode 100644 new mode 100755 index b9821ee6b7c..815a8746dbb --- a/deps/XenServerJava/src/com/xensource/xenapi/XenAPIObject.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/XenAPIObject.java @@ -1,18 +1,36 @@ -// Copyright 2012 Citrix Systems, Inc. Licensed under the -// Apache License, Version 2.0 (the "License"); you may not use this -// file except in compliance with the License. Citrix Systems, Inc. -// reserves all rights not expressly granted by the License. -// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Automatically generated by addcopyright.py at 04/03/2012 +/* + * 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; public abstract class XenAPIObject { - public abstract String toWireString(); + public abstract String toWireString(); }