cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ahu...@apache.org
Subject [02/20] Applied Tina's patches for removing the xapi jar
Date Wed, 02 Apr 2014 21:23:14 GMT
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e9c81c78/deps/XenServerJava/src/com/xensource/xenapi/VMPP.java
----------------------------------------------------------------------
diff --git a/deps/XenServerJava/src/com/xensource/xenapi/VMPP.java b/deps/XenServerJava/src/com/xensource/xenapi/VMPP.java
deleted file mode 100644
index f49019b..0000000
--- a/deps/XenServerJava/src/com/xensource/xenapi/VMPP.java
+++ /dev/null
@@ -1,1158 +0,0 @@
-/*
- * 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;
-
-/**
- * VM Protection Policy
- *
- * @author Citrix Systems, Inc.
- */
-public class VMPP extends XenAPIObject {
-
-    /**
-     * The XenAPI reference (OpaqueRef) to this object.
-     */
-    protected final String ref;
-
-    /**
-     * For internal use only.
-     */
-    VMPP(String ref) {
-       this.ref = ref;
-    }
-
-    /**
-     * @return The XenAPI reference (OpaqueRef) to this object.
-     */
-    public String toWireString() {
-       return this.ref;
-    }
-
-    /**
-     * If obj is a VMPP, compares XenAPI references for equality.
-     */
-    @Override
-    public boolean equals(Object obj)
-    {
-        if (obj != null && obj instanceof VMPP)
-        {
-            VMPP other = (VMPP) obj;
-            return other.ref.equals(this.ref);
-        } else
-        {
-            return false;
-        }
-    }
-
-    @Override
-    public int hashCode()
-    {
-        return ref.hashCode();
-    }
-
-    /**
-     * Represents all the fields in a VMPP
-     */
-    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", "nameLabel", this.nameLabel);
-            print.printf("%1$20s: %2$s\n", "nameDescription", this.nameDescription);
-            print.printf("%1$20s: %2$s\n", "isPolicyEnabled", this.isPolicyEnabled);
-            print.printf("%1$20s: %2$s\n", "backupType", this.backupType);
-            print.printf("%1$20s: %2$s\n", "backupRetentionValue", this.backupRetentionValue);
-            print.printf("%1$20s: %2$s\n", "backupFrequency", this.backupFrequency);
-            print.printf("%1$20s: %2$s\n", "backupSchedule", this.backupSchedule);
-            print.printf("%1$20s: %2$s\n", "isBackupRunning", this.isBackupRunning);
-            print.printf("%1$20s: %2$s\n", "backupLastRunTime", this.backupLastRunTime);
-            print.printf("%1$20s: %2$s\n", "archiveTargetType", this.archiveTargetType);
-            print.printf("%1$20s: %2$s\n", "archiveTargetConfig", this.archiveTargetConfig);
-            print.printf("%1$20s: %2$s\n", "archiveFrequency", this.archiveFrequency);
-            print.printf("%1$20s: %2$s\n", "archiveSchedule", this.archiveSchedule);
-            print.printf("%1$20s: %2$s\n", "isArchiveRunning", this.isArchiveRunning);
-            print.printf("%1$20s: %2$s\n", "archiveLastRunTime", this.archiveLastRunTime);
-            print.printf("%1$20s: %2$s\n", "VMs", this.VMs);
-            print.printf("%1$20s: %2$s\n", "isAlarmEnabled", this.isAlarmEnabled);
-            print.printf("%1$20s: %2$s\n", "alarmConfig", this.alarmConfig);
-            print.printf("%1$20s: %2$s\n", "recentAlerts", this.recentAlerts);
-            return writer.toString();
-        }
-
-        /**
-         * Convert a VMPP.Record to a Map
-         */
-        public Map<String,Object> toMap() {
-            Map<String,Object> map = new HashMap<String,Object>();
-            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);
-            map.put("is_policy_enabled", this.isPolicyEnabled == null ? false : this.isPolicyEnabled);
-            map.put("backup_type", this.backupType == null ? Types.VmppBackupType.UNRECOGNIZED : this.backupType);
-            map.put("backup_retention_value", this.backupRetentionValue == null ? 0 : this.backupRetentionValue);
-            map.put("backup_frequency", this.backupFrequency == null ? Types.VmppBackupFrequency.UNRECOGNIZED : this.backupFrequency);
-            map.put("backup_schedule", this.backupSchedule == null ? new HashMap<String, String>() : this.backupSchedule);
-            map.put("is_backup_running", this.isBackupRunning == null ? false : this.isBackupRunning);
-            map.put("backup_last_run_time", this.backupLastRunTime == null ? new Date(0) : this.backupLastRunTime);
-            map.put("archive_target_type", this.archiveTargetType == null ? Types.VmppArchiveTargetType.UNRECOGNIZED : this.archiveTargetType);
-            map.put("archive_target_config", this.archiveTargetConfig == null ? new HashMap<String, String>() : this.archiveTargetConfig);
-            map.put("archive_frequency", this.archiveFrequency == null ? Types.VmppArchiveFrequency.UNRECOGNIZED : this.archiveFrequency);
-            map.put("archive_schedule", this.archiveSchedule == null ? new HashMap<String, String>() : this.archiveSchedule);
-            map.put("is_archive_running", this.isArchiveRunning == null ? false : this.isArchiveRunning);
-            map.put("archive_last_run_time", this.archiveLastRunTime == null ? new Date(0) : this.archiveLastRunTime);
-            map.put("VMs", this.VMs == null ? new LinkedHashSet<VM>() : this.VMs);
-            map.put("is_alarm_enabled", this.isAlarmEnabled == null ? false : this.isAlarmEnabled);
-            map.put("alarm_config", this.alarmConfig == null ? new HashMap<String, String>() : this.alarmConfig);
-            map.put("recent_alerts", this.recentAlerts == null ? new LinkedHashSet<String>() : this.recentAlerts);
-            return map;
-        }
-
-        /**
-         * Unique identifier/object reference
-         */
-        public String uuid;
-        /**
-         * a human-readable name
-         */
-        public String nameLabel;
-        /**
-         * a notes field containing human-readable description
-         */
-        public String nameDescription;
-        /**
-         * enable or disable this policy
-         */
-        public Boolean isPolicyEnabled;
-        /**
-         * type of the backup sub-policy
-         */
-        public Types.VmppBackupType backupType;
-        /**
-         * maximum number of backups that should be stored at any time
-         */
-        public Long backupRetentionValue;
-        /**
-         * frequency of the backup schedule
-         */
-        public Types.VmppBackupFrequency backupFrequency;
-        /**
-         * schedule of the backup containing 'hour', 'min', 'days'. Date/time-related information is in XenServer Local Timezone
-         */
-        public Map<String, String> backupSchedule;
-        /**
-         * true if this protection policy's backup is running
-         */
-        public Boolean isBackupRunning;
-        /**
-         * time of the last backup
-         */
-        public Date backupLastRunTime;
-        /**
-         * type of the archive target config
-         */
-        public Types.VmppArchiveTargetType archiveTargetType;
-        /**
-         * configuration for the archive, including its 'location', 'username', 'password'
-         */
-        public Map<String, String> archiveTargetConfig;
-        /**
-         * frequency of the archive schedule
-         */
-        public Types.VmppArchiveFrequency archiveFrequency;
-        /**
-         * schedule of the archive containing 'hour', 'min', 'days'. Date/time-related information is in XenServer Local Timezone
-         */
-        public Map<String, String> archiveSchedule;
-        /**
-         * true if this protection policy's archive is running
-         */
-        public Boolean isArchiveRunning;
-        /**
-         * time of the last archive
-         */
-        public Date archiveLastRunTime;
-        /**
-         * all VMs attached to this protection policy
-         */
-        public Set<VM> VMs;
-        /**
-         * true if alarm is enabled for this policy
-         */
-        public Boolean isAlarmEnabled;
-        /**
-         * configuration for the alarm
-         */
-        public Map<String, String> alarmConfig;
-        /**
-         * recent alerts
-         */
-        public Set<String> recentAlerts;
-    }
-
-    /**
-     * Get a record containing the current state of the given VMPP.
-     *
-     * @return all fields from the object
-     */
-    public VMPP.Record getRecord(Connection c) throws
-       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);
-    }
-
-    /**
-     * Get a reference to the VMPP instance with the specified UUID.
-     *
-     * @param uuid UUID of object to return
-     * @return reference to the object
-     */
-    public static VMPP getByUuid(Connection c, String uuid) throws
-       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);
-    }
-
-    /**
-     * Create a new VMPP instance, and return its handle.
-     *
-     * @param record All constructor arguments
-     * @return Task
-     */
-    public static Task createAsync(Connection c, VMPP.Record record) throws
-       BadServerResponse,
-       XenAPIException,
-       XmlRpcException {
-        String method_call = "Async.VMPP.create";
-        String session = c.getSessionReference();
-        Map<String, Object> 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.toTask(result);
-    }
-
-    /**
-     * Create a new VMPP instance, and return its handle.
-     *
-     * @param record All constructor arguments
-     * @return reference to the newly created object
-     */
-    public static VMPP create(Connection c, VMPP.Record record) throws
-       BadServerResponse,
-       XenAPIException,
-       XmlRpcException {
-        String method_call = "VMPP.create";
-        String session = c.getSessionReference();
-        Map<String, Object> 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);
-    }
-
-    /**
-     * Destroy the specified VMPP instance.
-     *
-     * @return Task
-     */
-    public Task destroyAsync(Connection c) throws
-       BadServerResponse,
-       XenAPIException,
-       XmlRpcException {
-        String method_call = "Async.VMPP.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);
-    }
-
-    /**
-     * Destroy the specified VMPP instance.
-     *
-     */
-    public void destroy(Connection c) throws
-       BadServerResponse,
-       XenAPIException,
-       XmlRpcException {
-        String method_call = "VMPP.destroy";
-        String session = c.getSessionReference();
-        Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
-        Map response = c.dispatch(method_call, method_params);
-        return;
-    }
-
-    /**
-     * Get all the VMPP instances with the given label.
-     *
-     * @param label label of object to return
-     * @return references to objects with matching names
-     */
-    public static Set<VMPP> getByNameLabel(Connection c, String label) throws
-       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);
-    }
-
-    /**
-     * Get the uuid field of the given VMPP.
-     *
-     * @return value of the field
-     */
-    public String getUuid(Connection c) throws
-       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);
-    }
-
-    /**
-     * Get the name/label field of the given VMPP.
-     *
-     * @return value of the field
-     */
-    public String getNameLabel(Connection c) throws
-       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);
-    }
-
-    /**
-     * Get the name/description field of the given VMPP.
-     *
-     * @return value of the field
-     */
-    public String getNameDescription(Connection c) throws
-       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);
-    }
-
-    /**
-     * Get the is_policy_enabled field of the given VMPP.
-     *
-     * @return value of the field
-     */
-    public Boolean getIsPolicyEnabled(Connection c) throws
-       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);
-    }
-
-    /**
-     * Get the backup_type field of the given VMPP.
-     *
-     * @return value of the field
-     */
-    public Types.VmppBackupType getBackupType(Connection c) throws
-       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);
-    }
-
-    /**
-     * Get the backup_retention_value field of the given VMPP.
-     *
-     * @return value of the field
-     */
-    public Long getBackupRetentionValue(Connection c) throws
-       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);
-    }
-
-    /**
-     * Get the backup_frequency field of the given VMPP.
-     *
-     * @return value of the field
-     */
-    public Types.VmppBackupFrequency getBackupFrequency(Connection c) throws
-       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);
-    }
-
-    /**
-     * Get the backup_schedule field of the given VMPP.
-     *
-     * @return value of the field
-     */
-    public Map<String, String> getBackupSchedule(Connection c) throws
-       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);
-    }
-
-    /**
-     * Get the is_backup_running field of the given VMPP.
-     *
-     * @return value of the field
-     */
-    public Boolean getIsBackupRunning(Connection c) throws
-       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);
-    }
-
-    /**
-     * Get the backup_last_run_time field of the given VMPP.
-     *
-     * @return value of the field
-     */
-    public Date getBackupLastRunTime(Connection c) throws
-       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);
-    }
-
-    /**
-     * Get the archive_target_type field of the given VMPP.
-     *
-     * @return value of the field
-     */
-    public Types.VmppArchiveTargetType getArchiveTargetType(Connection c) throws
-       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);
-    }
-
-    /**
-     * Get the archive_target_config field of the given VMPP.
-     *
-     * @return value of the field
-     */
-    public Map<String, String> getArchiveTargetConfig(Connection c) throws
-       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);
-    }
-
-    /**
-     * Get the archive_frequency field of the given VMPP.
-     *
-     * @return value of the field
-     */
-    public Types.VmppArchiveFrequency getArchiveFrequency(Connection c) throws
-       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);
-    }
-
-    /**
-     * Get the archive_schedule field of the given VMPP.
-     *
-     * @return value of the field
-     */
-    public Map<String, String> getArchiveSchedule(Connection c) throws
-       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);
-    }
-
-    /**
-     * Get the is_archive_running field of the given VMPP.
-     *
-     * @return value of the field
-     */
-    public Boolean getIsArchiveRunning(Connection c) throws
-       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);
-    }
-
-    /**
-     * Get the archive_last_run_time field of the given VMPP.
-     *
-     * @return value of the field
-     */
-    public Date getArchiveLastRunTime(Connection c) throws
-       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);
-    }
-
-    /**
-     * Get the VMs field of the given VMPP.
-     *
-     * @return value of the field
-     */
-    public Set<VM> getVMs(Connection c) throws
-       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);
-    }
-
-    /**
-     * Get the is_alarm_enabled field of the given VMPP.
-     *
-     * @return value of the field
-     */
-    public Boolean getIsAlarmEnabled(Connection c) throws
-       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);
-    }
-
-    /**
-     * Get the alarm_config field of the given VMPP.
-     *
-     * @return value of the field
-     */
-    public Map<String, String> getAlarmConfig(Connection c) throws
-       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);
-    }
-
-    /**
-     * Get the recent_alerts field of the given VMPP.
-     *
-     * @return value of the field
-     */
-    public Set<String> getRecentAlerts(Connection c) throws
-       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);
-    }
-
-    /**
-     * Set the name/label field of the given VMPP.
-     *
-     * @param label New value to set
-     */
-    public void setNameLabel(Connection c, String label) throws
-       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)};
-        Map response = c.dispatch(method_call, method_params);
-        return;
-    }
-
-    /**
-     * Set the name/description field of the given VMPP.
-     *
-     * @param description New value to set
-     */
-    public void setNameDescription(Connection c, String description) throws
-       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)};
-        Map response = c.dispatch(method_call, method_params);
-        return;
-    }
-
-    /**
-     * Set the is_policy_enabled field of the given VMPP.
-     *
-     * @param isPolicyEnabled New value to set
-     */
-    public void setIsPolicyEnabled(Connection c, Boolean isPolicyEnabled) throws
-       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)};
-        Map response = c.dispatch(method_call, method_params);
-        return;
-    }
-
-    /**
-     * Set the backup_type field of the given VMPP.
-     *
-     * @param backupType New value to set
-     */
-    public void setBackupType(Connection c, Types.VmppBackupType backupType) throws
-       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)};
-        Map response = c.dispatch(method_call, method_params);
-        return;
-    }
-
-    /**
-     * This call executes the protection policy immediately
-     *
-     * @return An XMLRPC result
-     */
-    public String protectNow(Connection c) throws
-       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);
-    }
-
-    /**
-     * This call archives the snapshot provided as a parameter
-     *
-     * @param snapshot The snapshot to archive
-     * @return An XMLRPC result
-     */
-    public static String archiveNow(Connection c, VM snapshot) throws
-       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);
-    }
-
-    /**
-     * This call fetches a history of alerts for a given protection policy
-     *
-     * @param hoursFromNow how many hours in the past the oldest record to fetch is
-     * @return A list of alerts encoded in xml
-     */
-    public Set<String> getAlerts(Connection c, Long hoursFromNow) throws
-       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);
-    }
-
-    /**
-     * 
-     *
-     * @param value the value to set
-     */
-    public void setBackupRetentionValue(Connection c, Long value) throws
-       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)};
-        Map response = c.dispatch(method_call, method_params);
-        return;
-    }
-
-    /**
-     * Set the value of the backup_frequency field
-     *
-     * @param value the backup frequency
-     */
-    public void setBackupFrequency(Connection c, Types.VmppBackupFrequency value) throws
-       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)};
-        Map response = c.dispatch(method_call, method_params);
-        return;
-    }
-
-    /**
-     * 
-     *
-     * @param value the value to set
-     */
-    public void setBackupSchedule(Connection c, Map<String, String> value) throws
-       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)};
-        Map response = c.dispatch(method_call, method_params);
-        return;
-    }
-
-    /**
-     * Set the value of the archive_frequency field
-     *
-     * @param value the archive frequency
-     */
-    public void setArchiveFrequency(Connection c, Types.VmppArchiveFrequency value) throws
-       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)};
-        Map response = c.dispatch(method_call, method_params);
-        return;
-    }
-
-    /**
-     * 
-     *
-     * @param value the value to set
-     */
-    public void setArchiveSchedule(Connection c, Map<String, String> value) throws
-       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)};
-        Map response = c.dispatch(method_call, method_params);
-        return;
-    }
-
-    /**
-     * Set the value of the archive_target_config_type field
-     *
-     * @param value the archive target config type
-     */
-    public void setArchiveTargetType(Connection c, Types.VmppArchiveTargetType value) throws
-       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)};
-        Map response = c.dispatch(method_call, method_params);
-        return;
-    }
-
-    /**
-     * 
-     *
-     * @param value the value to set
-     */
-    public void setArchiveTargetConfig(Connection c, Map<String, String> value) throws
-       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)};
-        Map response = c.dispatch(method_call, method_params);
-        return;
-    }
-
-    /**
-     * Set the value of the is_alarm_enabled field
-     *
-     * @param value true if alarm is enabled for this policy
-     */
-    public void setIsAlarmEnabled(Connection c, Boolean value) throws
-       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)};
-        Map response = c.dispatch(method_call, method_params);
-        return;
-    }
-
-    /**
-     * 
-     *
-     * @param value the value to set
-     */
-    public void setAlarmConfig(Connection c, Map<String, String> value) throws
-       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)};
-        Map response = c.dispatch(method_call, method_params);
-        return;
-    }
-
-    /**
-     * 
-     *
-     * @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 {
-        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)};
-        Map response = c.dispatch(method_call, method_params);
-        return;
-    }
-
-    /**
-     * 
-     *
-     * @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 {
-        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)};
-        Map response = c.dispatch(method_call, method_params);
-        return;
-    }
-
-    /**
-     * 
-     *
-     * @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 {
-        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)};
-        Map response = c.dispatch(method_call, method_params);
-        return;
-    }
-
-    /**
-     * 
-     *
-     * @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 {
-        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)};
-        Map response = c.dispatch(method_call, method_params);
-        return;
-    }
-
-    /**
-     * 
-     *
-     * @param key the key to remove
-     */
-    public void removeFromBackupSchedule(Connection c, String key) throws
-       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)};
-        Map response = c.dispatch(method_call, method_params);
-        return;
-    }
-
-    /**
-     * 
-     *
-     * @param key the key to remove
-     */
-    public void removeFromArchiveTargetConfig(Connection c, String key) throws
-       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)};
-        Map response = c.dispatch(method_call, method_params);
-        return;
-    }
-
-    /**
-     * 
-     *
-     * @param key the key to remove
-     */
-    public void removeFromArchiveSchedule(Connection c, String key) throws
-       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)};
-        Map response = c.dispatch(method_call, method_params);
-        return;
-    }
-
-    /**
-     * 
-     *
-     * @param key the key to remove
-     */
-    public void removeFromAlarmConfig(Connection c, String key) throws
-       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)};
-        Map response = c.dispatch(method_call, method_params);
-        return;
-    }
-
-    /**
-     * 
-     *
-     * @param value the value to set
-     */
-    public void setBackupLastRunTime(Connection c, Date value) throws
-       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)};
-        Map response = c.dispatch(method_call, method_params);
-        return;
-    }
-
-    /**
-     * 
-     *
-     * @param value the value to set
-     */
-    public void setArchiveLastRunTime(Connection c, Date value) throws
-       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)};
-        Map response = c.dispatch(method_call, method_params);
-        return;
-    }
-
-    /**
-     * Return a list of all the VMPPs known to the system.
-     *
-     * @return references to all objects
-     */
-    public static Set<VMPP> getAll(Connection c) throws
-       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 a map of VMPP references to VMPP records for all VMPPs known to the system.
-     *
-     * @return records of all objects
-     */
-    public static Map<VMPP, VMPP.Record> getAllRecords(Connection c) throws
-       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);
-    }
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e9c81c78/deps/XenServerJava/src/com/xensource/xenapi/VTPM.java
----------------------------------------------------------------------
diff --git a/deps/XenServerJava/src/com/xensource/xenapi/VTPM.java b/deps/XenServerJava/src/com/xensource/xenapi/VTPM.java
deleted file mode 100644
index 4ee7b2f..0000000
--- a/deps/XenServerJava/src/com/xensource/xenapi/VTPM.java
+++ /dev/null
@@ -1,290 +0,0 @@
-/*
- * 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 virtual TPM device
- *
- * @author Citrix Systems, Inc.
- */
-public class VTPM extends XenAPIObject {
-
-    /**
-     * The XenAPI reference (OpaqueRef) to this object.
-     */
-    protected final String ref;
-
-    /**
-     * For internal use only.
-     */
-    VTPM(String ref) {
-       this.ref = ref;
-    }
-
-    /**
-     * @return The XenAPI reference (OpaqueRef) to this object.
-     */
-    public String toWireString() {
-       return this.ref;
-    }
-
-    /**
-     * If obj is a VTPM, compares XenAPI references for equality.
-     */
-    @Override
-    public boolean equals(Object obj)
-    {
-        if (obj != null && obj instanceof VTPM)
-        {
-            VTPM other = (VTPM) obj;
-            return other.ref.equals(this.ref);
-        } else
-        {
-            return false;
-        }
-    }
-
-    @Override
-    public int hashCode()
-    {
-        return ref.hashCode();
-    }
-
-    /**
-     * Represents all the fields in a VTPM
-     */
-    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", "VM", this.VM);
-            print.printf("%1$20s: %2$s\n", "backend", this.backend);
-            return writer.toString();
-        }
-
-        /**
-         * Convert a VTPM.Record to a Map
-         */
-        public Map<String,Object> toMap() {
-            Map<String,Object> map = new HashMap<String,Object>();
-            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);
-            return map;
-        }
-
-        /**
-         * Unique identifier/object reference
-         */
-        public String uuid;
-        /**
-         * the virtual machine
-         */
-        public VM VM;
-        /**
-         * the domain where the backend is located
-         */
-        public VM backend;
-    }
-
-    /**
-     * Get a record containing the current state of the given VTPM.
-     *
-     * @return all fields from the object
-     */
-    public VTPM.Record getRecord(Connection c) throws
-       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);
-    }
-
-    /**
-     * Get a reference to the VTPM instance with the specified UUID.
-     *
-     * @param uuid UUID of object to return
-     * @return reference to the object
-     */
-    public static VTPM getByUuid(Connection c, String uuid) throws
-       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);
-    }
-
-    /**
-     * Create a new VTPM instance, and return its handle.
-     *
-     * @param record All constructor arguments
-     * @return Task
-     */
-    public static Task createAsync(Connection c, VTPM.Record record) throws
-       BadServerResponse,
-       XenAPIException,
-       XmlRpcException {
-        String method_call = "Async.VTPM.create";
-        String session = c.getSessionReference();
-        Map<String, Object> 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.toTask(result);
-    }
-
-    /**
-     * Create a new VTPM instance, and return its handle.
-     *
-     * @param record All constructor arguments
-     * @return reference to the newly created object
-     */
-    public static VTPM create(Connection c, VTPM.Record record) throws
-       BadServerResponse,
-       XenAPIException,
-       XmlRpcException {
-        String method_call = "VTPM.create";
-        String session = c.getSessionReference();
-        Map<String, Object> 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);
-    }
-
-    /**
-     * Destroy the specified VTPM instance.
-     *
-     * @return Task
-     */
-    public Task destroyAsync(Connection c) throws
-       BadServerResponse,
-       XenAPIException,
-       XmlRpcException {
-        String method_call = "Async.VTPM.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);
-    }
-
-    /**
-     * Destroy the specified VTPM instance.
-     *
-     */
-    public void destroy(Connection c) throws
-       BadServerResponse,
-       XenAPIException,
-       XmlRpcException {
-        String method_call = "VTPM.destroy";
-        String session = c.getSessionReference();
-        Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
-        Map response = c.dispatch(method_call, method_params);
-        return;
-    }
-
-    /**
-     * Get the uuid field of the given VTPM.
-     *
-     * @return value of the field
-     */
-    public String getUuid(Connection c) throws
-       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);
-    }
-
-    /**
-     * Get the VM field of the given VTPM.
-     *
-     * @return value of the field
-     */
-    public VM getVM(Connection c) throws
-       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);
-    }
-
-    /**
-     * Get the backend field of the given VTPM.
-     *
-     * @return value of the field
-     */
-    public VM getBackend(Connection c) throws
-       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);
-    }
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e9c81c78/deps/XenServerJava/src/com/xensource/xenapi/XenAPIObject.java
----------------------------------------------------------------------
diff --git a/deps/XenServerJava/src/com/xensource/xenapi/XenAPIObject.java b/deps/XenServerJava/src/com/xensource/xenapi/XenAPIObject.java
deleted file mode 100755
index 815a874..0000000
--- a/deps/XenServerJava/src/com/xensource/xenapi/XenAPIObject.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * 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();
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e9c81c78/plugins/hypervisors/ovm/pom.xml
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/ovm/pom.xml b/plugins/hypervisors/ovm/pom.xml
index e9ab745..926424e 100644
--- a/plugins/hypervisors/ovm/pom.xml
+++ b/plugins/hypervisors/ovm/pom.xml
@@ -28,8 +28,8 @@
   </parent>
   <dependencies>
     <dependency>
-      <groupId>org.apache.cloudstack</groupId>
-      <artifactId>xapi</artifactId>
+      <groupId>net.java.dev.vcc.thirdparty</groupId>
+      <artifactId>xen-api</artifactId>
       <version>${cs.xapi.version}</version>
     </dependency>    
   </dependencies>  

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e9c81c78/plugins/hypervisors/xen/pom.xml
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/xen/pom.xml b/plugins/hypervisors/xen/pom.xml
index 916cf5b..0204157 100644
--- a/plugins/hypervisors/xen/pom.xml
+++ b/plugins/hypervisors/xen/pom.xml
@@ -36,8 +36,8 @@
       <scope>compile</scope>
     </dependency>
     <dependency>
-      <groupId>org.apache.cloudstack</groupId>
-      <artifactId>xapi</artifactId>
+      <groupId>net.java.dev.vcc.thirdparty</groupId>
+      <artifactId>xen-api</artifactId>
       <version>${cs.xapi.version}</version>
     </dependency>
   </dependencies>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e9c81c78/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServerConnectionPool.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServerConnectionPool.java b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServerConnectionPool.java
index 6a8d1cd..ca04673 100644
--- a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServerConnectionPool.java
+++ b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServerConnectionPool.java
@@ -52,6 +52,7 @@ public class XenServerConnectionPool {
     protected HashMap<String /* poolUuid */, XenServerConnection> _conns = new HashMap<String, XenServerConnection>();
     protected int _retries;
     protected int _interval;
+    protected int _connWait = 5;
     protected static long s_sleepOnError = 10 * 1000; // in ms
     static {
         File file = PropertiesUtil.findConfigFile("environment.properties");
@@ -149,12 +150,12 @@ public class XenServerConnectionPool {
     }
 
     public Connection getConnect(String ip, String username, Queue<String> password) {
-        Connection conn = new Connection(getURL(ip), 10);
+        Connection conn = new Connection(getURL(ip), 10, _connWait);
         try {
             loginWithPassword(conn, username, password, APIVersion.latest().toString());
         }  catch (Types.HostIsSlave e) {
             String maddress = e.masterIPAddress;
-            conn = new Connection(getURL(maddress), 10);
+            conn = new Connection(getURL(maddress), 10, _connWait);
             try {
                 loginWithPassword(conn, username, password, APIVersion.latest().toString());
             }  catch (Exception e1) {
@@ -219,7 +220,7 @@ public class XenServerConnectionPool {
 
             if ( mConn == null ) {
                 try {
-                    Connection conn = new Connection(getURL(ipAddress), 5);
+                    Connection conn = new Connection(getURL(ipAddress), 5, _connWait);
                     Session sess = loginWithPassword(conn, username, password, APIVersion.latest().toString());
                     Host host = sess.getThisHost(conn);
                     Boolean hostenabled = host.getEnabled(conn);
@@ -235,11 +236,11 @@ public class XenServerConnectionPool {
                         s_logger.debug(msg);
                         throw new CloudRuntimeException(msg);
                     }
-                    mConn = new XenServerConnection(getURL(ipAddress), ipAddress, username, password, _retries, _interval, wait);
+                    mConn = new XenServerConnection(getURL(ipAddress), ipAddress, username, password, _retries, _interval, wait, _connWait);
                     loginWithPassword(mConn, username, password, APIVersion.latest().toString());
                 }  catch (Types.HostIsSlave e) {
                     String maddress = e.masterIPAddress;
-                    mConn = new XenServerConnection(getURL(maddress), maddress, username, password, _retries, _interval, wait);
+                    mConn = new XenServerConnection(getURL(maddress), maddress, username, password, _retries, _interval, wait, _connWait);
                     try {
                         Session session = loginWithPassword(mConn, username, password, APIVersion.latest().toString());
                         Host host = session.getThisHost(mConn);
@@ -417,8 +418,8 @@ public class XenServerConnectionPool {
         Queue<String> _password;
         String _poolUuid;
 
-        public XenServerConnection(URL url, String ip, String username, Queue<String> password, int retries, int interval, int wait) {
-            super(url, wait);
+        public XenServerConnection(URL url, String ip, String username, Queue<String> password, int retries, int interval, int wait, int connwait) {
+            super(url, wait, connwait);
             _ip = ip;
             _retries = retries;
             _username = username;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e9c81c78/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/Xenserver625StorageProcessor.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/Xenserver625StorageProcessor.java b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/Xenserver625StorageProcessor.java
index dad3d14..4906c35 100644
--- a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/Xenserver625StorageProcessor.java
+++ b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/Xenserver625StorageProcessor.java
@@ -174,7 +174,7 @@ public class Xenserver625StorageProcessor extends XenServerStorageProcessor {
                 }
                 String pUuid = poolsr.getUuid(conn);
                 boolean isISCSI = IsISCSI(poolsr.getType(conn));
-                Task task = srcVdi.copyAsync2(conn, poolsr, null, null);
+                Task task = srcVdi.copyAsync(conn, poolsr, null, null);
                 // poll every 1 seconds ,
                 hypervisorResource.waitForTask(conn, task, 1000, wait * 1000);
                 hypervisorResource.checkForSuccess(conn, task);
@@ -233,7 +233,7 @@ public class Xenserver625StorageProcessor extends XenServerStorageProcessor {
                 if (prevSnapshotUuid != null) {
                     previousSnapshotVdi = VDI.getByUuid(conn,prevSnapshotUuid);
                 }
-                task = snapshotvdi.copyAsync2(conn, ssSR, previousSnapshotVdi, null);
+                task = snapshotvdi.copyAsync(conn, ssSR, previousSnapshotVdi, null);
                 // poll every 1 seconds ,
                 hypervisorResource.waitForTask(conn, task, 1000, wait * 1000);
                 hypervisorResource.checkForSuccess(conn, task);
@@ -344,7 +344,7 @@ public class Xenserver625StorageProcessor extends XenServerStorageProcessor {
 
                     snapshotSr = createFileSr(conn, secondaryStorageMountPath, folder);
 
-                    Task task = snapshotVdi.copyAsync2(conn, snapshotSr, null, null);
+                    Task task = snapshotVdi.copyAsync(conn, snapshotSr, null, null);
                     // poll every 1 seconds ,
                     hypervisorResource.waitForTask(conn, task, 1000, wait * 1000);
                     hypervisorResource.checkForSuccess(conn, task);
@@ -462,7 +462,7 @@ public class Xenserver625StorageProcessor extends XenServerStorageProcessor {
             tmpltSR = createFileSr(conn, uri.getHost() + ":" + uri.getPath(), installPath);
 
             // copy volume to template SR
-            Task task = vol.copyAsync2(conn, tmpltSR, null, null);
+            Task task = vol.copyAsync(conn, tmpltSR, null, null);
             // poll every 1 seconds ,
             hypervisorResource.waitForTask(conn, task, 1000, wait * 1000);
             hypervisorResource.checkForSuccess(conn, task);
@@ -578,7 +578,7 @@ public class Xenserver625StorageProcessor extends XenServerStorageProcessor {
             snapshotChains.add(snapshotVdi);
 
             for(VDI snapChain : snapshotChains) {
-                Task task = snapChain.copyAsync2(conn, null, null, destVdi);
+                Task task = snapChain.copyAsync(conn, null, null, destVdi);
                 // poll every 1 seconds ,
                 hypervisorResource.waitForTask(conn, task, 1000, wait * 1000);
                 hypervisorResource.checkForSuccess(conn, task);
@@ -641,7 +641,7 @@ public class Xenserver625StorageProcessor extends XenServerStorageProcessor {
                 // Look up the volume on the source primary storage pool
                 VDI srcVdi = getVDIbyUuid(conn, srcVolume.getPath());
                 // Copy the volume to secondary storage
-                Task task = srcVdi.copyAsync2(conn, secondaryStorage, null, null);
+                Task task = srcVdi.copyAsync(conn, secondaryStorage, null, null);
                 // poll every 1 seconds ,
                 hypervisorResource.waitForTask(conn, task, 1000, wait * 1000);
                 hypervisorResource.checkForSuccess(conn, task);
@@ -693,7 +693,7 @@ public class Xenserver625StorageProcessor extends XenServerStorageProcessor {
             try {
                 SR primaryStoragePool = hypervisorResource.getStorageRepository(conn, primaryStore.getUuid());
                 VDI srcVdi = VDI.getByUuid(conn, volumeUuid);
-                Task task = srcVdi.copyAsync2(conn, primaryStoragePool, null, null);
+                Task task = srcVdi.copyAsync(conn, primaryStoragePool, null, null);
                 // poll every 1 seconds ,
                 hypervisorResource.waitForTask(conn, task, 1000, wait * 1000);
                 hypervisorResource.checkForSuccess(conn, task);
@@ -777,7 +777,7 @@ public class Xenserver625StorageProcessor extends XenServerStorageProcessor {
             String destVdiUuid = destVdi.getUuid(conn);
 
             for(VDI snapChain : snapshotChains) {
-                Task task = snapChain.copyAsync2(conn, null, null, destVdi);
+                Task task = snapChain.copyAsync(conn, null, null, destVdi);
                 // poll every 1 seconds ,
                 hypervisorResource.waitForTask(conn, task, 1000, wait * 1000);
                 hypervisorResource.checkForSuccess(conn, task);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e9c81c78/plugins/hypervisors/xen/src/org/apache/cloudstack/hypervisor/xenserver/XenServerResourceNewBase.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/xen/src/org/apache/cloudstack/hypervisor/xenserver/XenServerResourceNewBase.java b/plugins/hypervisors/xen/src/org/apache/cloudstack/hypervisor/xenserver/XenServerResourceNewBase.java
index ec203d8..e3626c3 100644
--- a/plugins/hypervisors/xen/src/org/apache/cloudstack/hypervisor/xenserver/XenServerResourceNewBase.java
+++ b/plugins/hypervisors/xen/src/org/apache/cloudstack/hypervisor/xenserver/XenServerResourceNewBase.java
@@ -19,7 +19,6 @@ package org.apache.cloudstack.hypervisor.xenserver;
 
 import java.util.HashMap;
 import java.util.HashSet;
-import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.TimeoutException;
 
@@ -28,6 +27,7 @@ import org.apache.xmlrpc.XmlRpcException;
 
 import com.xensource.xenapi.Connection;
 import com.xensource.xenapi.Event;
+import com.xensource.xenapi.EventBatch;
 import com.xensource.xenapi.Host;
 import com.xensource.xenapi.Pool;
 import com.xensource.xenapi.Task;
@@ -110,10 +110,10 @@ public class XenServerResourceNewBase extends XenServer610Resource {
         String token = "";
         Double t = new Double(timeout / 1000);
         while (true) {
-            Map<?, ?> map = Event.properFrom(c, classes, token, t);
-            token = (String)map.get("token");
+            EventBatch map = Event.from(c, classes, token, t);
+            token = map.token;
             @SuppressWarnings("unchecked")
-            Set<Event.Record> events = (Set<Event.Record>)map.get("events");
+            Set<Event.Record> events = map.events;
             if (events.size() == 0) {
                 String msg = "Async " + timeout / 1000 + " seconds timeout for task " + task.toString();
                 s_logger.warn(msg);
@@ -171,17 +171,17 @@ public class XenServerResourceNewBase extends XenServer610Resource {
             while (!_stop) {
                 try {
                     Connection conn = getConnection();
-                    Map<?, ?> results;
+                    EventBatch results;
                     try {
-                        results = Event.properFrom(conn, _classes, _token, new Double(30));
+                        results = Event.from(conn, _classes, _token, new Double(30));
                     } catch (Exception e) {
                         s_logger.error("Retrying the waiting on VM events due to: ", e);
                         continue;
                     }
 
-                    _token = (String)results.get("token");
+                    _token = results.token;
                     @SuppressWarnings("unchecked")
-                    Set<Event.Record> events = (Set<Event.Record>)results.get("events");
+                    Set<Event.Record> events = results.events;
                     for (Event.Record event : events) {
                         try {
                             if (!(event.snapshot instanceof VM.Record)) {
@@ -308,14 +308,14 @@ public class XenServerResourceNewBase extends XenServer610Resource {
             if (_isMaster) {
                 // Throw away the initial set of events because they're history
                 Connection conn = getConnection();
-                Map<?, ?> results;
+                EventBatch results;
                 try {
-                    results = Event.properFrom(conn, _classes, _token, new Double(30));
+                    results = Event.from(conn, _classes, _token, new Double(30));
                 } catch (Exception e) {
                     s_logger.error("Retrying the waiting on VM events due to: ", e);
                     throw new CloudRuntimeException("Unable to start a listener thread to listen to VM events", e);
                 }
-                _token = (String)results.get("token");
+                _token = results.token;
                 s_logger.debug("Starting the event listener thread for " + _host.uuid);
                 super.start();
             }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e9c81c78/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 50fbe53..53ca09a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -22,7 +22,7 @@
   <version>4.5.0-SNAPSHOT</version>
   <packaging>pom</packaging>
   <name>Apache CloudStack</name>
-  <description>Apache CloudStack is an IaaS (“Infrastracture as a Service”) cloud orchestration platform.</description>
+  <description>Apache CloudStack is an IaaS (“Infrastructure as a Service”) cloud orchestration platform.</description>
   <url>http://www.cloudstack.org</url>
   <scm>
     <connection>scm:git:https://git-wip-us.apache.org/repos/asf/cloudstack.git</connection>
@@ -60,7 +60,7 @@
     <cs.ehcache.version>2.6.6</cs.ehcache.version>
     <cs.gson.version>1.7.2</cs.gson.version>
     <cs.guava.version>14.0-rc1</cs.guava.version>
-    <cs.xapi.version>6.2.0-1-SNAPSHOT</cs.xapi.version>
+    <cs.xapi.version>6.2.0-3</cs.xapi.version>
     <cs.httpclient.version>3.1</cs.httpclient.version>
     <cs.httpcore.version>4.2.1</cs.httpcore.version>
     <cs.mysql.version>5.1.21</cs.mysql.version>
@@ -174,7 +174,6 @@
     <module>server</module>
     <module>usage</module>
     <module>utils</module>
-    <module>deps/XenServerJava</module>
     <module>engine</module>
     <module>plugins</module>
     <module>framework</module>
@@ -449,6 +448,11 @@
       <artifactId>javax.inject</artifactId>
       <version>1</version>
     </dependency>
+    <dependency>
+        <groupId>net.java.dev.vcc.thirdparty</groupId>
+        <artifactId>xen-api</artifactId>
+        <version>${cs.xapi.version}</version>
+    </dependency>
   </dependencies>
 
   <build>
@@ -540,7 +544,7 @@
             <includeTestSourceDirectory>true</includeTestSourceDirectory>
             <sourceDirectory>${project.basedir}</sourceDirectory>
             <includes>**\/*.java</includes>
-            <excludes>**\/deps\/,**\/test\/,**\/target\/,**\/bin\/,**\/*.xml,**\/*.ini,**\/*.sh,**\/*.bat,**\/awsapi\/,**\/XenServerJava\/,**\/apidoc\/</excludes>
+            <excludes>**\/deps\/,**\/test\/,**\/target\/,**\/bin\/,**\/*.xml,**\/*.ini,**\/*.sh,**\/*.bat,**\/awsapi\/,**\/apidoc\/</excludes>
           </configuration>
         </plugin>
         <plugin>
@@ -734,9 +738,6 @@
               <exclude>debian/control</exclude>
               <exclude>debian/dirs</exclude>
               <exclude>debian/rules</exclude>
-              <exclude>deps/XenServerJava/src/com/xensource/xenapi/*.java</exclude>
-              <exclude>deps/XenServerJava/BSD</exclude>
-              <exclude>deps/XenServerJava/Makefile</exclude>
               <exclude>dist/console-proxy/js/jquery.js</exclude>
               <exclude>plugins/hypervisors/hyperv/DotNet/ServerResource/ServerResource.sln</exclude>
               <exclude>plugins/hypervisors/hyperv/DotNet/ServerResource/packages/**</exclude>


Mime
View raw message