diff --git a/cloud.spec b/cloud.spec
index 03e6228744d..b6c40555f88 100644
--- a/cloud.spec
+++ b/cloud.spec
@@ -488,7 +488,7 @@ fi
%{_javadir}/%{name}-trilead-ssh2-build213.jar
%{_javadir}/%{name}-cglib.jar
%{_javadir}/%{name}-mysql-connector-java-5.1.7-bin.jar
-%{_javadir}/%{name}-xenserver-5.6.0-1.jar
+%{_javadir}/%{name}-xenserver-5.6.100-1.jar
%{_javadir}/%{name}-xmlrpc-common-3.*.jar
%{_javadir}/%{name}-xmlrpc-client-3.*.jar
%{_javadir}/%{name}-jstl-1.2.jar
diff --git a/core/.classpath b/core/.classpath
index 4fbdcf5ff6e..db9b9a922f1 100644
--- a/core/.classpath
+++ b/core/.classpath
@@ -38,6 +38,6 @@
-
+
diff --git a/core/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java b/core/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
index dcabd6d5cdf..bff6a33059a 100644
--- a/core/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
+++ b/core/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
@@ -170,7 +170,6 @@ import com.cloud.resource.ServerResource;
import com.cloud.storage.Storage;
import com.cloud.storage.Storage.ImageFormat;
import com.cloud.storage.Storage.StoragePoolType;
-import com.cloud.storage.StorageLayer;
import com.cloud.storage.StoragePoolVO;
import com.cloud.storage.Volume;
import com.cloud.storage.Volume.VolumeType;
@@ -181,7 +180,6 @@ import com.cloud.template.VirtualMachineTemplate.BootloaderType;
import com.cloud.utils.NumbersUtil;
import com.cloud.utils.Pair;
import com.cloud.utils.Ternary;
-import com.cloud.utils.component.ComponentLocator;
import com.cloud.utils.exception.CloudRuntimeException;
import com.cloud.utils.net.NetUtils;
import com.cloud.vm.DiskProfile;
@@ -325,26 +323,18 @@ public abstract class CitrixResourceBase implements ServerResource {
}
protected boolean pingxenserver() {
- Session slaveSession = null;
- Connection slaveConn = null;
- try {
- URL slaveUrl = null;
- slaveUrl = new URL("http://" + _host.ip);
- slaveConn = new Connection(slaveUrl, 100);
- slaveSession = Session.slaveLocalLoginWithPassword(slaveConn, _username, _password);
- return true;
- } catch (Exception e) {
+ Connection conn = _connPool.slaveConnect(_host.ip, _username, _password);
+ if ( conn == null ) {
return false;
- } finally {
- if( slaveSession != null ){
- try{
- Session.localLogout(slaveConn);
- } catch (Exception e) {
-
- }
- slaveConn.dispose();
+ } else {
+ try {
+ Session.localLogout(conn);
+ } catch (Exception e) {
+
}
+ conn.dispose();
}
+ return true;
}
protected String logX(XenAPIObject obj, String msg) {
@@ -4117,6 +4107,7 @@ public abstract class CitrixResourceBase implements ServerResource {
public CitrixResourceBase() {
}
+
@Override
public boolean configure(String name, Map params) throws ConfigurationException {
@@ -4169,6 +4160,7 @@ public abstract class CitrixResourceBase implements ServerResource {
throw new ConfigurationException("Unable to get the uuid");
}
return true;
+
}
void destroyVDI(Connection conn, VDI vdi) {
diff --git a/core/src/com/cloud/hypervisor/xen/resource/XenServerConnectionPool.java b/core/src/com/cloud/hypervisor/xen/resource/XenServerConnectionPool.java
index 9fe2c37440f..f8fc3bb5f24 100644
--- a/core/src/com/cloud/hypervisor/xen/resource/XenServerConnectionPool.java
+++ b/core/src/com/cloud/hypervisor/xen/resource/XenServerConnectionPool.java
@@ -23,8 +23,14 @@ import java.util.HashMap;
import java.util.Map;
import java.util.Set;
+import javax.net.ssl.HostnameVerifier;
+import javax.net.ssl.HttpsURLConnection;
+import javax.net.ssl.SSLSession;
+
import org.apache.log4j.Logger;
import org.apache.xmlrpc.XmlRpcException;
+import org.apache.xmlrpc.client.XmlRpcClient;
+import org.apache.xmlrpc.client.XmlRpcClientConfigImpl;
import com.cloud.utils.exception.CloudRuntimeException;
import com.xensource.xenapi.APIVersion;
@@ -43,11 +49,30 @@ public class XenServerConnectionPool {
protected int _retries;
protected int _interval;
+ static {
+ try {
+ javax.net.ssl.TrustManager[] trustAllCerts = new javax.net.ssl.TrustManager[1];
+ javax.net.ssl.TrustManager tm = new TrustAllManager();
+ trustAllCerts[0] = tm;
+ javax.net.ssl.SSLContext sc = javax.net.ssl.SSLContext.getInstance("TLS");
+ sc.init(null, trustAllCerts, null);
+ javax.net.ssl.HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
+ HostnameVerifier hv = new HostnameVerifier() {
+ public boolean verify(String hostName, SSLSession session) {
+ return true;
+ }
+ };
+ HttpsURLConnection.setDefaultHostnameVerifier(hv);
+ } catch (Exception e) {
+ }
+ }
+
+
protected XenServerConnectionPool() {
_retries = 3;
_interval = 3;
}
-
+
private void addConnect(String poolUuid, XenServerConnection conn){
if( poolUuid == null ) return;
if (s_logger.isDebugEnabled()) {
@@ -96,7 +121,7 @@ public class XenServerConnectionPool {
}
}
- static public boolean joinPool(Connection conn, String hostIp, String masterIp, String username, String password) {
+ public boolean joinPool(Connection conn, String hostIp, String masterIp, String username, String password) {
try {
Pool.join(conn, masterIp, username, password);
if (s_logger.isDebugEnabled()) {
@@ -114,7 +139,7 @@ public class XenServerConnectionPool {
if (s_logger.isDebugEnabled()) {
s_logger.debug("Logging on as the slave to " + hostIp);
}
- slaveConn = new Connection(getURL(hostIp), 100);
+ slaveConn = new Connection(getURL(hostIp));
slaveSession = Session.slaveLocalLoginWithPassword(slaveConn, username, password);
if (s_logger.isDebugEnabled()) {
s_logger.debug("Slave logon successful. session= " + slaveSession);
@@ -175,7 +200,7 @@ public class XenServerConnectionPool {
masterConn = null;
Session slaveSession = null;
- slaveConn = new Connection(getURL(slaveIp), 100);
+ slaveConn = new Connection(getURL(slaveIp));
slaveSession = Session.slaveLocalLoginWithPassword(slaveConn,
username, password);
@@ -193,7 +218,7 @@ public class XenServerConnectionPool {
Session.localLogout(slaveConn);
slaveConn = null;
s_logger.debug("Logging on as the master to " + masterIp);
- masterConn = new Connection(getURL(masterIp), 100);
+ masterConn = new Connection(getURL(masterIp));
Session.loginWithPassword(masterConn, username, password,
APIVersion.latest().toString());
removeConnect(poolUuid);
@@ -240,7 +265,7 @@ public class XenServerConnectionPool {
}
}
- public static void logout(Connection conn) {
+ private void logout(Connection conn) {
try {
s_logger.debug("Logging out of the session "
+ conn.getSessionReference());
@@ -252,40 +277,49 @@ public class XenServerConnectionPool {
}
}
- public Connection masterConnect(String ip, String username, String password) {
- Connection slaveConn = null;
- Connection masterConn = null;
+ public Connection slaveConnect(String ip, String username, String password) {
+ Connection conn = null;
try{
- slaveConn = new Connection(getURL(ip), 100);
+ conn = new Connection(getURL(ip));
+ Session.slaveLocalLoginWithPassword(conn, username, password);
+ return conn;
+ }catch ( Exception e){
+ s_logger.debug("Failed to slave local login to " + ip);
+ }
+ return null;
+ }
+
+ public Connection masterConnect(String ip, String username, String password) {
+ Connection conn = null;
+ try{
+ conn = new Connection(getURL(ip));
+ s_logger.debug("Logging on as the master to " + ip);
+ Session.loginWithPassword(conn, username, password,
+ APIVersion.latest().toString());
+ return conn;
+ }catch ( Exception e){
+ s_logger.debug("Failed to slave local login to " + ip);
+ }
+ throw new RuntimeException("can not log in to master " + ip);
+ }
+
+
+ public String getMasterIp(String ip, String username, String password) {
+ Connection slaveConn = null;
+ try{
+ slaveConn = new Connection(getURL(ip));
Session.slaveLocalLoginWithPassword(slaveConn, username, password);
if (s_logger.isDebugEnabled()) {
s_logger.debug("Slave logon to " + ip);
}
String masterIp = null;
- try {
- Pool.Record pr = getPoolRecord(slaveConn);
- Host master = pr.master;
- masterIp = master.getAddress(slaveConn);
-
- s_logger.debug("Logging on as the master to " + masterIp);
- masterConn = new Connection(getURL(masterIp), 100);
- Session.loginWithPassword(masterConn, username, password,
- APIVersion.latest().toString());
- return masterConn;
- } catch (Exception e) {
- s_logger.debug("Failed to log on as master to ");
- if( masterConn != null ) {
- try {
- Session.logout(masterConn);
- } catch (Exception e1) {
- }
- masterConn.dispose();
- masterConn = null;
- }
- }
+ Pool.Record pr = getPoolRecord(slaveConn);
+ Host master = pr.master;
+ masterIp = master.getAddress(slaveConn);
+ return masterIp;
}catch ( Exception e){
- s_logger.debug("Failed to slave local login to " + ip);
+ s_logger.debug("Failed to slave local login to " + ip + " due to " + e.toString());
} finally {
if( slaveConn != null ) {
try {
@@ -295,23 +329,11 @@ public class XenServerConnectionPool {
slaveConn.dispose();
slaveConn = null;
}
-
}
- return null;
- }
-
- static public Connection slaveConnect(String ip, String username, String password) {
- Connection conn = null;
- try{
- conn = new Connection(getURL(ip), 100);
- Session.slaveLocalLoginWithPassword(conn, username, password);
- return conn;
- }catch ( Exception e){
- s_logger.debug("Failed to slave local login to " + ip);
- }
- return null;
+ throw new RuntimeException("can not get master ip");
}
+
static void PoolSyncDB(Connection conn) {
try {
Set hosts = Host.getAll(conn);
@@ -338,7 +360,7 @@ public class XenServerConnectionPool {
Connection c = null;
try{
s_logger.debug("Trying to transition master to " + slaveIp);
- slaveConn = new Connection(getURL(slaveIp), 100);
+ slaveConn = new Connection(getURL(slaveIp));
Session.slaveLocalLoginWithPassword(slaveConn, username, password);
Pool.emergencyTransitionToMaster(slaveConn);
try {
@@ -349,7 +371,7 @@ public class XenServerConnectionPool {
// restart xapi in 10 sec
forceSleep(10);
// check if the master of this host is set correctly.
- c = new Connection(getURL(slaveIp), 100);
+ c = new Connection(getURL(slaveIp));
for (int i = 0; i < 30; i++) {
try {
Session.loginWithPassword(c, username, password, APIVersion.latest().toString());
@@ -383,13 +405,13 @@ public class XenServerConnectionPool {
}
- static void PoolEmergencyResetMaster(String slaveIp, String masterIp,
+ private void PoolEmergencyResetMaster(String slaveIp, String masterIp,
String username, String password) {
Connection slaveConn = null;
try {
s_logger.debug("Trying to reset master of slave " + slaveIp
+ " to " + masterIp);
- slaveConn = new Connection(getURL(slaveIp), 10);
+ slaveConn = new Connection(getURL(slaveIp));
Session.slaveLocalLoginWithPassword(slaveConn, username, password);
Pool.emergencyResetMaster(slaveConn, masterIp);
if (slaveConn != null) {
@@ -449,7 +471,7 @@ public class XenServerConnectionPool {
String slaveIp = slave.getAddress(conn);
s_logger.debug("Logging on as the slave to " + slaveIp);
- slaveConn = new Connection(getURL(slaveIp), 10);
+ slaveConn = new Connection(getURL(slaveIp));
Session.slaveLocalLoginWithPassword(slaveConn, username, password);
Pool.Record pr = getPoolRecord(slaveConn);
String mIp = pr.master.getAddress(slaveConn);
@@ -476,7 +498,7 @@ public class XenServerConnectionPool {
try {
s_logger.debug("Logging on as the slave to " + slaveIp);
- slaveConn = new Connection(getURL(slaveIp), 10);
+ slaveConn = new Connection(getURL(slaveIp));
Session.slaveLocalLoginWithPassword(slaveConn, username,
password);
Pool.Record slavePoolr = getPoolRecord(slaveConn);
@@ -505,9 +527,9 @@ public class XenServerConnectionPool {
}
}
- static private URL getURL(String ip){
+ private URL getURL(String ip){
try {
- return new URL("http://" + ip);
+ return new URL("https://" + ip);
} catch (Exception e) {
String msg = "Unable to convert IP " + ip + " to URL due to " + e.toString();
if (s_logger.isDebugEnabled()) {
@@ -566,7 +588,7 @@ public class XenServerConnectionPool {
s_logger.debug("Logging on as the slave to " + ipAddress);
}
try {
- sConn = new Connection(getURL(ipAddress), 100);
+ sConn = new Connection(getURL(ipAddress));
Session.slaveLocalLoginWithPassword(sConn,
username, password);
} catch (Exception e){
@@ -652,6 +674,7 @@ public class XenServerConnectionPool {
public class XenServerConnection extends Connection {
long _interval;
int _retries;
+ int _wait;
String _ip;
String _username;
String _password;
@@ -659,7 +682,8 @@ public class XenServerConnectionPool {
public XenServerConnection(URL url, String ip, String username, String password,
int retries, int interval, int wait) {
- super(url, wait);
+ super(url);
+ _wait = wait;
_ip = ip;
_retries = retries;
_username = username;
@@ -671,6 +695,19 @@ public class XenServerConnectionPool {
return _wait;
}
+ @Override
+ protected XmlRpcClient getClientFromURL(URL url)
+ {
+ XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
+ config.setServerURL(url);
+ config.setReplyTimeout(_wait * 1000);
+ config.setConnectionTimeout(10000);
+ XmlRpcClient client = new XmlRpcClient();
+ client.setConfig(config);
+ return client;
+ }
+
+
public String getPoolUuid() {
return _poolUuid;
}
@@ -767,4 +804,29 @@ public class XenServerConnectionPool {
}
+
+ public static class TrustAllManager implements javax.net.ssl.TrustManager, javax.net.ssl.X509TrustManager {
+ public java.security.cert.X509Certificate[] getAcceptedIssuers() {
+ return null;
+ }
+
+ public boolean isServerTrusted(java.security.cert.X509Certificate[] certs) {
+ return true;
+ }
+
+ public boolean isClientTrusted(java.security.cert.X509Certificate[] certs) {
+ return true;
+ }
+
+ public void checkServerTrusted(java.security.cert.X509Certificate[] certs, String authType)
+ throws java.security.cert.CertificateException {
+ return;
+ }
+
+ public void checkClientTrusted(java.security.cert.X509Certificate[] certs, String authType)
+ throws java.security.cert.CertificateException {
+ return;
+ }
+ }
+
}
\ No newline at end of file
diff --git a/debian/cloud-deps.install b/debian/cloud-deps.install
index 76304b070a3..8bd7b6a1531 100644
--- a/debian/cloud-deps.install
+++ b/debian/cloud-deps.install
@@ -12,7 +12,7 @@
/usr/share/java/cloud-trilead-ssh2-build213.jar
/usr/share/java/cloud-cglib.jar
/usr/share/java/cloud-mysql-connector-java-5.1.7-bin.jar
-/usr/share/java/cloud-xenserver-5.6.0-1.jar
+/usr/share/java/cloud-xenserver-5.6.100-1.jar
/usr/share/java/cloud-xmlrpc-common-3.*.jar
/usr/share/java/cloud-xmlrpc-client-3.*.jar
/usr/share/java/cloud-jstl-*.jar
diff --git a/deps/XenServerJava/Makefile b/deps/XenServerJava/Makefile
index 8a0de956069..c78144aa606 100644
--- a/deps/XenServerJava/Makefile
+++ b/deps/XenServerJava/Makefile
@@ -2,9 +2,9 @@
BINDINGJAVAFILES := $(wildcard com/xensource/xenapi/*.java)
BINDINGCLASSFILES := $(BINDINGJAVAFILES:.java=.class)
-BINDINGJAR := xenserver-5.6.0-1.jar
+BINDINGJAR := xenserver-5.6.100-1.jar
-CLASSPATH := :xmlrpc-client-3.1.jar:xmlrpc-common-3.1.jar:ws-commons-util-1.0.2.jar
+CLASSPATH := :../cloud-xmlrpc-client-3.1.3.jar:../cloud-xmlrpc-common-3.1.3.jar:../cloud-ws-commons-util-1.0.2.jar
EXAMPLECLASSPATH := :$(BINDINGJAR)$(CLASSPATH)
.PHONY: all
diff --git a/deps/XenServerJava/README.txt b/deps/XenServerJava/README.txt
index a51e88318a6..feef8c6d667 100644
--- a/deps/XenServerJava/README.txt
+++ b/deps/XenServerJava/README.txt
@@ -1,7 +1,7 @@
XenServerJava
=============
-Version 5.6.0-1.
+Version 5.6.100-1.
XenServerJava is a complete SDK for Citrix XenServer, exposing the XenServer
API as Java classes.
diff --git a/deps/XenServerJava/com/xensource/xenapi/Blob.java b/deps/XenServerJava/com/xensource/xenapi/Blob.java
index ed5e64bb23b..6beadd89ad0 100644
--- a/deps/XenServerJava/com/xensource/xenapi/Blob.java
+++ b/deps/XenServerJava/com/xensource/xenapi/Blob.java
@@ -123,7 +123,7 @@ public class Blob extends XenAPIObject {
}
/**
- * unique identifier/object reference
+ * Unique identifier/object reference
*/
public String uuid;
/**
diff --git a/deps/XenServerJava/com/xensource/xenapi/Bond.java b/deps/XenServerJava/com/xensource/xenapi/Bond.java
index 58a96dca8da..c5593fd111c 100644
--- a/deps/XenServerJava/com/xensource/xenapi/Bond.java
+++ b/deps/XenServerJava/com/xensource/xenapi/Bond.java
@@ -119,7 +119,7 @@ public class Bond extends XenAPIObject {
}
/**
- * unique identifier/object reference
+ * Unique identifier/object reference
*/
public String uuid;
/**
diff --git a/deps/XenServerJava/com/xensource/xenapi/Connection.java b/deps/XenServerJava/com/xensource/xenapi/Connection.java
index 711abc91deb..e20821d104c 100644
--- a/deps/XenServerJava/com/xensource/xenapi/Connection.java
+++ b/deps/XenServerJava/com/xensource/xenapi/Connection.java
@@ -42,7 +42,7 @@ 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.XmlRpcCommonsTransportFactory;
+
import com.xensource.xenapi.Types.BadServerResponse;
import com.xensource.xenapi.Types.SessionAuthenticationFailed;
import com.xensource.xenapi.Types.XenAPIException;
@@ -57,7 +57,7 @@ public class Connection
/**
* The version of the bindings that this class belongs to.
*/
- public static final String BINDINGS_VERSION = "5.6.0-1";
+ public static final String BINDINGS_VERSION = "5.6.100-1";
/**
* true if the connection is to the Rio edition of XenServer. Certain function calls are not allowed.
@@ -68,7 +68,6 @@ public class Connection
public Boolean rioConnection = false;
private APIVersion apiVersion;
- protected int _wait;
/**
* Updated when Session.login_with_password() is called.
@@ -86,7 +85,7 @@ public class Connection
/**
* As seen by the xmlrpc library. From our point of view it's a server.
*/
- protected XmlRpcClient client;
+ private final XmlRpcClient client;
private final boolean deprecatedConstructorUsed;
@@ -164,11 +163,10 @@ public class Connection
* 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);
}
@@ -181,11 +179,10 @@ public class Connection
* Connection object does not call Session.logout. The programmer is responsible for ensuring the Session is logged
* in and out correctly.
*/
- public Connection(URL url, String sessionReference, int wait)
+ public Connection(URL url, String sessionReference)
{
deprecatedConstructorUsed = false;
- this._wait = wait;
this.client = getClientFromURL(url);
this.sessionReference = sessionReference;
}
@@ -281,11 +278,8 @@ public class Connection
{
config.setTimeZone(TimeZone.getTimeZone("UTC"));
config.setServerURL(url);
- config.setReplyTimeout(_wait * 1000);
- config.setConnectionTimeout(_wait / 10 * 1000);
XmlRpcClient client = new XmlRpcClient();
client.setConfig(config);
- client.setTransportFactory(new XmlRpcCommonsTransportFactory(client));
return client;
}
@@ -347,8 +341,7 @@ public class Connection
new Connection(new URL(client_url.getProtocol(),
(String)error[1],
client_url.getPort(),
- client_url.getFile()),
- _wait);
+ client_url.getFile()));
tmp_conn.sessionReference = sessionReference;
try
{
diff --git a/deps/XenServerJava/com/xensource/xenapi/Console.java b/deps/XenServerJava/com/xensource/xenapi/Console.java
index e8c401cc31d..ad4e7888f36 100644
--- a/deps/XenServerJava/com/xensource/xenapi/Console.java
+++ b/deps/XenServerJava/com/xensource/xenapi/Console.java
@@ -121,7 +121,7 @@ public class Console extends XenAPIObject {
}
/**
- * unique identifier/object reference
+ * Unique identifier/object reference
*/
public String uuid;
/**
diff --git a/deps/XenServerJava/com/xensource/xenapi/Crashdump.java b/deps/XenServerJava/com/xensource/xenapi/Crashdump.java
index b1b2f958100..7e5f612ce6f 100644
--- a/deps/XenServerJava/com/xensource/xenapi/Crashdump.java
+++ b/deps/XenServerJava/com/xensource/xenapi/Crashdump.java
@@ -119,7 +119,7 @@ public class Crashdump extends XenAPIObject {
}
/**
- * unique identifier/object reference
+ * Unique identifier/object reference
*/
public String uuid;
/**
diff --git a/deps/XenServerJava/com/xensource/xenapi/Host.java b/deps/XenServerJava/com/xensource/xenapi/Host.java
index 8cb31fb6d7a..dc4e6b47081 100644
--- a/deps/XenServerJava/com/xensource/xenapi/Host.java
+++ b/deps/XenServerJava/com/xensource/xenapi/Host.java
@@ -142,6 +142,7 @@ public class Host extends XenAPIObject {
print.printf("%1$20s: %2$s\n", "biosStrings", this.biosStrings);
print.printf("%1$20s: %2$s\n", "powerOnMode", this.powerOnMode);
print.printf("%1$20s: %2$s\n", "powerOnConfig", this.powerOnConfig);
+ print.printf("%1$20s: %2$s\n", "localCacheSr", this.localCacheSr);
return writer.toString();
}
@@ -193,11 +194,12 @@ public class Host extends XenAPIObject {
map.put("bios_strings", this.biosStrings == null ? new HashMap() : this.biosStrings);
map.put("power_on_mode", this.powerOnMode == null ? "" : this.powerOnMode);
map.put("power_on_config", this.powerOnConfig == null ? new HashMap() : this.powerOnConfig);
+ map.put("local_cache_sr", this.localCacheSr == null ? new SR("OpaqueRef:NULL") : this.localCacheSr);
return map;
}
/**
- * unique identifier/object reference
+ * Unique identifier/object reference
*/
public String uuid;
/**
@@ -368,6 +370,10 @@ public class Host extends XenAPIObject {
* The power on config
*/
public Map powerOnConfig;
+ /**
+ * The SR that is used as a local cache
+ */
+ public SR localCacheSr;
}
/**
@@ -1154,6 +1160,23 @@ public class Host extends XenAPIObject {
return Types.toMapOfStringString(result);
}
+ /**
+ * Get the local_cache_sr field of the given host.
+ *
+ * @return value of the field
+ */
+ public SR getLocalCacheSr(Connection c) throws
+ 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);
+ }
+
/**
* Set the name/label field of the given host.
*
@@ -2448,6 +2471,23 @@ public class Host extends XenAPIObject {
return Types.toDate(result);
}
+ /**
+ * This call queries the host's clock for the current time in the host's local timezone
+ *
+ * @return The current local time
+ */
+ public Date getServerLocaltime(Connection c) throws
+ 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);
+ }
+
/**
* This call enables external authentication on a host
*
@@ -2665,6 +2705,37 @@ public class Host extends XenAPIObject {
return;
}
+ /**
+ * Enable the use of a local SR for caching purposes
+ *
+ * @param sr The SR to use as a local cache
+ */
+ public void enableLocalStorageCaching(Connection c, SR sr) throws
+ 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)};
+ Map response = c.dispatch(method_call, method_params);
+ return;
+ }
+
+ /**
+ * Disable the use of a local SR for caching purposes
+ *
+ */
+ public void disableLocalStorageCaching(Connection c) throws
+ 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)};
+ Map response = c.dispatch(method_call, method_params);
+ return;
+ }
+
/**
* Return a list of all the hosts known to the system.
*
diff --git a/deps/XenServerJava/com/xensource/xenapi/HostCpu.java b/deps/XenServerJava/com/xensource/xenapi/HostCpu.java
index 6087d649820..c8b4bd665cb 100644
--- a/deps/XenServerJava/com/xensource/xenapi/HostCpu.java
+++ b/deps/XenServerJava/com/xensource/xenapi/HostCpu.java
@@ -137,7 +137,7 @@ public class HostCpu extends XenAPIObject {
}
/**
- * unique identifier/object reference
+ * Unique identifier/object reference
*/
public String uuid;
/**
@@ -192,10 +192,11 @@ public class HostCpu extends XenAPIObject {
/**
* Get a record containing the current state of the given host_cpu.
+ * @deprecated
*
* @return all fields from the object
*/
- public HostCpu.Record getRecord(Connection c) throws
+ @Deprecated public HostCpu.Record getRecord(Connection c) throws
BadServerResponse,
XenAPIException,
XmlRpcException {
@@ -209,11 +210,12 @@ public class HostCpu extends XenAPIObject {
/**
* Get a reference to the host_cpu instance with the specified UUID.
+ * @deprecated
*
* @param uuid UUID of object to return
* @return reference to the object
*/
- public static HostCpu getByUuid(Connection c, String uuid) throws
+ @Deprecated public static HostCpu getByUuid(Connection c, String uuid) throws
BadServerResponse,
XenAPIException,
XmlRpcException {
@@ -497,10 +499,11 @@ public class HostCpu extends XenAPIObject {
/**
* Return a list of all the host_cpus known to the system.
+ * @deprecated
*
* @return references to all objects
*/
- public static Set getAll(Connection c) throws
+ @Deprecated public static Set getAll(Connection c) throws
BadServerResponse,
XenAPIException,
XmlRpcException {
diff --git a/deps/XenServerJava/com/xensource/xenapi/HostCrashdump.java b/deps/XenServerJava/com/xensource/xenapi/HostCrashdump.java
index 15ebc99a37d..8c32c8fc1df 100644
--- a/deps/XenServerJava/com/xensource/xenapi/HostCrashdump.java
+++ b/deps/XenServerJava/com/xensource/xenapi/HostCrashdump.java
@@ -121,7 +121,7 @@ public class HostCrashdump extends XenAPIObject {
}
/**
- * unique identifier/object reference
+ * Unique identifier/object reference
*/
public String uuid;
/**
diff --git a/deps/XenServerJava/com/xensource/xenapi/HostMetrics.java b/deps/XenServerJava/com/xensource/xenapi/HostMetrics.java
index a9357f159ba..1bbdf8a8e7e 100644
--- a/deps/XenServerJava/com/xensource/xenapi/HostMetrics.java
+++ b/deps/XenServerJava/com/xensource/xenapi/HostMetrics.java
@@ -123,7 +123,7 @@ public class HostMetrics extends XenAPIObject {
}
/**
- * unique identifier/object reference
+ * Unique identifier/object reference
*/
public String uuid;
/**
diff --git a/deps/XenServerJava/com/xensource/xenapi/HostPatch.java b/deps/XenServerJava/com/xensource/xenapi/HostPatch.java
index dc6136eefc6..9f5c917ab84 100644
--- a/deps/XenServerJava/com/xensource/xenapi/HostPatch.java
+++ b/deps/XenServerJava/com/xensource/xenapi/HostPatch.java
@@ -131,7 +131,7 @@ public class HostPatch extends XenAPIObject {
}
/**
- * unique identifier/object reference
+ * Unique identifier/object reference
*/
public String uuid;
/**
diff --git a/deps/XenServerJava/com/xensource/xenapi/Message.java b/deps/XenServerJava/com/xensource/xenapi/Message.java
index 3c76ccf12b7..5fcdfac8bc3 100644
--- a/deps/XenServerJava/com/xensource/xenapi/Message.java
+++ b/deps/XenServerJava/com/xensource/xenapi/Message.java
@@ -125,7 +125,7 @@ public class Message extends XenAPIObject {
}
/**
- * unique identifier/object reference
+ * Unique identifier/object reference
*/
public String uuid;
/**
diff --git a/deps/XenServerJava/com/xensource/xenapi/Network.java b/deps/XenServerJava/com/xensource/xenapi/Network.java
index 315d3bd5dbf..e9e59d20b07 100644
--- a/deps/XenServerJava/com/xensource/xenapi/Network.java
+++ b/deps/XenServerJava/com/xensource/xenapi/Network.java
@@ -135,7 +135,7 @@ public class Network extends XenAPIObject {
}
/**
- * unique identifier/object reference
+ * Unique identifier/object reference
*/
public String uuid;
/**
diff --git a/deps/XenServerJava/com/xensource/xenapi/PBD.java b/deps/XenServerJava/com/xensource/xenapi/PBD.java
index f16e27c983b..f5f6745cc2c 100644
--- a/deps/XenServerJava/com/xensource/xenapi/PBD.java
+++ b/deps/XenServerJava/com/xensource/xenapi/PBD.java
@@ -123,7 +123,7 @@ public class PBD extends XenAPIObject {
}
/**
- * unique identifier/object reference
+ * Unique identifier/object reference
*/
public String uuid;
/**
diff --git a/deps/XenServerJava/com/xensource/xenapi/PIF.java b/deps/XenServerJava/com/xensource/xenapi/PIF.java
index b4fa1967f29..e1a358e6824 100644
--- a/deps/XenServerJava/com/xensource/xenapi/PIF.java
+++ b/deps/XenServerJava/com/xensource/xenapi/PIF.java
@@ -121,6 +121,8 @@ public class PIF extends XenAPIObject {
print.printf("%1$20s: %2$s\n", "management", this.management);
print.printf("%1$20s: %2$s\n", "otherConfig", this.otherConfig);
print.printf("%1$20s: %2$s\n", "disallowUnplug", this.disallowUnplug);
+ print.printf("%1$20s: %2$s\n", "tunnelAccessPIFOf", this.tunnelAccessPIFOf);
+ print.printf("%1$20s: %2$s\n", "tunnelTransportPIFOf", this.tunnelTransportPIFOf);
return writer.toString();
}
@@ -151,11 +153,13 @@ public class PIF extends XenAPIObject {
map.put("management", this.management == null ? false : this.management);
map.put("other_config", this.otherConfig == null ? new HashMap() : this.otherConfig);
map.put("disallow_unplug", this.disallowUnplug == null ? false : this.disallowUnplug);
+ map.put("tunnel_access_PIF_of", this.tunnelAccessPIFOf == null ? new LinkedHashSet() : this.tunnelAccessPIFOf);
+ map.put("tunnel_transport_PIF_of", this.tunnelTransportPIFOf == null ? new LinkedHashSet() : this.tunnelTransportPIFOf);
return map;
}
/**
- * unique identifier/object reference
+ * Unique identifier/object reference
*/
public String uuid;
/**
@@ -215,33 +219,41 @@ public class PIF extends XenAPIObject {
*/
public String DNS;
/**
- * indicates which bond this interface is part of
+ * Indicates which bond this interface is part of
*/
public Bond bondSlaveOf;
/**
- * indicates this PIF represents the results of a bond
+ * Indicates this PIF represents the results of a bond
*/
public Set bondMasterOf;
/**
- * indicates wich VLAN this interface receives untagged traffic from
+ * Indicates wich VLAN this interface receives untagged traffic from
*/
public VLAN VLANMasterOf;
/**
- * indicates which VLANs this interface transmits tagged traffic to
+ * Indicates which VLANs this interface transmits tagged traffic to
*/
public Set VLANSlaveOf;
/**
- * indicates whether the control software is listening for connections on this interface
+ * Indicates whether the control software is listening for connections on this interface
*/
public Boolean management;
/**
- * additional configuration
+ * Additional configuration
*/
public Map otherConfig;
/**
- * prevent this PIF from being unplugged; set this to notify the management tool-stack that the PIF has a special use and should not be unplugged under any circumstances (e.g. because you're running storage traffic over it)
+ * Prevent this PIF from being unplugged; set this to notify the management tool-stack that the PIF has a special use and should not be unplugged under any circumstances (e.g. because you're running storage traffic over it)
*/
public Boolean disallowUnplug;
+ /**
+ * Indicates to which tunnel this PIF gives access
+ */
+ public Set tunnelAccessPIFOf;
+ /**
+ * Indicates to which tunnel this PIF provides transport
+ */
+ public Set tunnelTransportPIFOf;
}
/**
@@ -653,6 +665,40 @@ public class PIF extends XenAPIObject {
return Types.toBoolean(result);
}
+ /**
+ * Get the tunnel_access_PIF_of field of the given PIF.
+ *
+ * @return value of the field
+ */
+ public Set getTunnelAccessPIFOf(Connection c) throws
+ 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);
+ }
+
+ /**
+ * Get the tunnel_transport_PIF_of field of the given PIF.
+ *
+ * @return value of the field
+ */
+ public Set getTunnelTransportPIFOf(Connection c) throws
+ 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);
+ }
+
/**
* Set the other_config field of the given PIF.
*
@@ -876,6 +922,42 @@ public class PIF extends XenAPIObject {
return;
}
+ /**
+ * Scan for physical interfaces on a host and create PIF objects to represent them. Use BIOS-based device names.
+ *
+ * @param host The host on which to scan
+ * @return Task
+ */
+ public static Task scanBiosAsync(Connection c, Host host) throws
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
+ String method_call = "Async.PIF.scan_bios";
+ String session = c.getSessionReference();
+ Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host)};
+ Map response = c.dispatch(method_call, method_params);
+ Object result = response.get("Value");
+ return Types.toTask(result);
+ }
+
+ /**
+ * Scan for physical interfaces on a host and create PIF objects to represent them. Use BIOS-based device names.
+ *
+ * @param host The host on which to scan
+ * @return List of newly created PIFs
+ */
+ public static Set scanBios(Connection c, Host host) throws
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
+ String method_call = "PIF.scan_bios";
+ String session = c.getSessionReference();
+ Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host)};
+ Map response = c.dispatch(method_call, method_params);
+ Object result = response.get("Value");
+ return Types.toSetOfPIF(result);
+ }
+
/**
* Create a PIF object matching a particular network interface
*
@@ -924,7 +1006,8 @@ public class PIF extends XenAPIObject {
public Task forgetAsync(Connection c) throws
BadServerResponse,
XenAPIException,
- XmlRpcException {
+ XmlRpcException,
+ Types.PifTunnelStillExists {
String method_call = "Async.PIF.forget";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
@@ -940,7 +1023,8 @@ public class PIF extends XenAPIObject {
public void forget(Connection c) throws
BadServerResponse,
XenAPIException,
- XmlRpcException {
+ XmlRpcException,
+ Types.PifTunnelStillExists {
String method_call = "PIF.forget";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
@@ -988,7 +1072,8 @@ public class PIF extends XenAPIObject {
public Task plugAsync(Connection c) throws
BadServerResponse,
XenAPIException,
- XmlRpcException {
+ XmlRpcException,
+ Types.TransportPifNotConfigured {
String method_call = "Async.PIF.plug";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
@@ -1004,7 +1089,8 @@ public class PIF extends XenAPIObject {
public void plug(Connection c) throws
BadServerResponse,
XenAPIException,
- XmlRpcException {
+ XmlRpcException,
+ Types.TransportPifNotConfigured {
String method_call = "PIF.plug";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
diff --git a/deps/XenServerJava/com/xensource/xenapi/PIFMetrics.java b/deps/XenServerJava/com/xensource/xenapi/PIFMetrics.java
index 0ac13c5c0f0..f5996ca818d 100644
--- a/deps/XenServerJava/com/xensource/xenapi/PIFMetrics.java
+++ b/deps/XenServerJava/com/xensource/xenapi/PIFMetrics.java
@@ -137,7 +137,7 @@ public class PIFMetrics extends XenAPIObject {
}
/**
- * unique identifier/object reference
+ * Unique identifier/object reference
*/
public String uuid;
/**
diff --git a/deps/XenServerJava/com/xensource/xenapi/Pool.java b/deps/XenServerJava/com/xensource/xenapi/Pool.java
index 7ac531a258c..2ffbd5f8130 100644
--- a/deps/XenServerJava/com/xensource/xenapi/Pool.java
+++ b/deps/XenServerJava/com/xensource/xenapi/Pool.java
@@ -163,7 +163,7 @@ public class Pool extends XenAPIObject {
}
/**
- * unique identifier/object reference
+ * Unique identifier/object reference
*/
public String uuid;
/**
@@ -2179,6 +2179,88 @@ public class Pool extends XenAPIObject {
return;
}
+ /**
+ * This call tests if a location is valid
+ *
+ * @param config Location config settings to test
+ * @return An XMLRPC result
+ */
+ public String testArchiveTarget(Connection c, Map config) throws
+ 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);
+ }
+
+ /**
+ * This call attempts to enable pool-wide local storage caching
+ *
+ * @return Task
+ */
+ public Task enableLocalStorageCachingAsync(Connection c) throws
+ 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)};
+ Map response = c.dispatch(method_call, method_params);
+ Object result = response.get("Value");
+ return Types.toTask(result);
+ }
+
+ /**
+ * This call attempts to enable pool-wide local storage caching
+ *
+ */
+ public void enableLocalStorageCaching(Connection c) throws
+ 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)};
+ Map response = c.dispatch(method_call, method_params);
+ return;
+ }
+
+ /**
+ * This call disables pool-wide local storage caching
+ *
+ * @return Task
+ */
+ public Task disableLocalStorageCachingAsync(Connection c) throws
+ 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)};
+ Map response = c.dispatch(method_call, method_params);
+ Object result = response.get("Value");
+ return Types.toTask(result);
+ }
+
+ /**
+ * This call disables pool-wide local storage caching
+ *
+ */
+ public void disableLocalStorageCaching(Connection c) throws
+ 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)};
+ Map response = c.dispatch(method_call, method_params);
+ return;
+ }
+
/**
* Return a list of all the pools known to the system.
*
diff --git a/deps/XenServerJava/com/xensource/xenapi/PoolPatch.java b/deps/XenServerJava/com/xensource/xenapi/PoolPatch.java
index 10f4bad5098..1c3e039ff27 100644
--- a/deps/XenServerJava/com/xensource/xenapi/PoolPatch.java
+++ b/deps/XenServerJava/com/xensource/xenapi/PoolPatch.java
@@ -129,7 +129,7 @@ public class PoolPatch extends XenAPIObject {
}
/**
- * unique identifier/object reference
+ * Unique identifier/object reference
*/
public String uuid;
/**
diff --git a/deps/XenServerJava/com/xensource/xenapi/Role.java b/deps/XenServerJava/com/xensource/xenapi/Role.java
index bcd8a856282..6714511229e 100644
--- a/deps/XenServerJava/com/xensource/xenapi/Role.java
+++ b/deps/XenServerJava/com/xensource/xenapi/Role.java
@@ -119,7 +119,7 @@ public class Role extends XenAPIObject {
}
/**
- * unique identifier/object reference
+ * Unique identifier/object reference
*/
public String uuid;
/**
diff --git a/deps/XenServerJava/com/xensource/xenapi/SM.java b/deps/XenServerJava/com/xensource/xenapi/SM.java
index 739c4731f4b..148adf2bc13 100644
--- a/deps/XenServerJava/com/xensource/xenapi/SM.java
+++ b/deps/XenServerJava/com/xensource/xenapi/SM.java
@@ -135,7 +135,7 @@ public class SM extends XenAPIObject {
}
/**
- * unique identifier/object reference
+ * Unique identifier/object reference
*/
public String uuid;
/**
diff --git a/deps/XenServerJava/com/xensource/xenapi/SR.java b/deps/XenServerJava/com/xensource/xenapi/SR.java
index ece50925e5b..32df6337a95 100644
--- a/deps/XenServerJava/com/xensource/xenapi/SR.java
+++ b/deps/XenServerJava/com/xensource/xenapi/SR.java
@@ -116,6 +116,7 @@ public class SR extends XenAPIObject {
print.printf("%1$20s: %2$s\n", "tags", this.tags);
print.printf("%1$20s: %2$s\n", "smConfig", this.smConfig);
print.printf("%1$20s: %2$s\n", "blobs", this.blobs);
+ print.printf("%1$20s: %2$s\n", "localCacheEnabled", this.localCacheEnabled);
return writer.toString();
}
@@ -141,11 +142,12 @@ public class SR extends XenAPIObject {
map.put("tags", this.tags == null ? new LinkedHashSet() : this.tags);
map.put("sm_config", this.smConfig == null ? new HashMap() : this.smConfig);
map.put("blobs", this.blobs == null ? new HashMap() : this.blobs);
+ map.put("local_cache_enabled", this.localCacheEnabled == null ? false : this.localCacheEnabled);
return map;
}
/**
- * unique identifier/object reference
+ * Unique identifier/object reference
*/
public String uuid;
/**
@@ -212,6 +214,10 @@ public class SR extends XenAPIObject {
* Binary blobs associated with this SR
*/
public Map blobs;
+ /**
+ * True if this SR is assigned to be the local cache for its host
+ */
+ public Boolean localCacheEnabled;
}
/**
@@ -556,6 +562,23 @@ public class SR extends XenAPIObject {
return Types.toMapOfStringBlob(result);
}
+ /**
+ * Get the local_cache_enabled field of the given SR.
+ *
+ * @return value of the field
+ */
+ public Boolean getLocalCacheEnabled(Connection c) throws
+ 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);
+ }
+
/**
* Set the name/label field of the given SR.
*
diff --git a/deps/XenServerJava/com/xensource/xenapi/Secret.java b/deps/XenServerJava/com/xensource/xenapi/Secret.java
index 900e2402466..824ee2e8f5a 100644
--- a/deps/XenServerJava/com/xensource/xenapi/Secret.java
+++ b/deps/XenServerJava/com/xensource/xenapi/Secret.java
@@ -115,7 +115,7 @@ public class Secret extends XenAPIObject {
}
/**
- * unique identifier/object reference
+ * Unique identifier/object reference
*/
public String uuid;
/**
diff --git a/deps/XenServerJava/com/xensource/xenapi/Session.java b/deps/XenServerJava/com/xensource/xenapi/Session.java
index 10274417410..946c78f9469 100644
--- a/deps/XenServerJava/com/xensource/xenapi/Session.java
+++ b/deps/XenServerJava/com/xensource/xenapi/Session.java
@@ -111,6 +111,8 @@ public class Session extends XenAPIObject {
print.printf("%1$20s: %2$s\n", "authUserSid", this.authUserSid);
print.printf("%1$20s: %2$s\n", "authUserName", this.authUserName);
print.printf("%1$20s: %2$s\n", "rbacPermissions", this.rbacPermissions);
+ print.printf("%1$20s: %2$s\n", "tasks", this.tasks);
+ print.printf("%1$20s: %2$s\n", "parent", this.parent);
return writer.toString();
}
@@ -131,11 +133,13 @@ public class Session extends XenAPIObject {
map.put("auth_user_sid", this.authUserSid == null ? "" : this.authUserSid);
map.put("auth_user_name", this.authUserName == null ? "" : this.authUserName);
map.put("rbac_permissions", this.rbacPermissions == null ? new LinkedHashSet() : this.rbacPermissions);
+ map.put("tasks", this.tasks == null ? new LinkedHashSet() : this.tasks);
+ map.put("parent", this.parent == null ? new Session("OpaqueRef:NULL") : this.parent);
return map;
}
/**
- * unique identifier/object reference
+ * Unique identifier/object reference
*/
public String uuid;
/**
@@ -182,6 +186,14 @@ public class Session extends XenAPIObject {
* list with all RBAC permissions for this session
*/
public Set rbacPermissions;
+ /**
+ * list of tasks created using the current session
+ */
+ public Set tasks;
+ /**
+ * references the parent session that created this session
+ */
+ public Session parent;
}
/**
@@ -423,6 +435,40 @@ public class Session extends XenAPIObject {
return Types.toSetOfString(result);
}
+ /**
+ * Get the tasks field of the given session.
+ *
+ * @return value of the field
+ */
+ public Set getTasks(Connection c) throws
+ 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);
+ }
+
+ /**
+ * Get the parent field of the given session.
+ *
+ * @return value of the field
+ */
+ public Session getParent(Connection c) throws
+ 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);
+ }
+
/**
* Set the other_config field of the given session.
*
diff --git a/deps/XenServerJava/com/xensource/xenapi/Subject.java b/deps/XenServerJava/com/xensource/xenapi/Subject.java
index 415d9f9792a..ce6fa372e5d 100644
--- a/deps/XenServerJava/com/xensource/xenapi/Subject.java
+++ b/deps/XenServerJava/com/xensource/xenapi/Subject.java
@@ -119,7 +119,7 @@ public class Subject extends XenAPIObject {
}
/**
- * unique identifier/object reference
+ * Unique identifier/object reference
*/
public String uuid;
/**
diff --git a/deps/XenServerJava/com/xensource/xenapi/Task.java b/deps/XenServerJava/com/xensource/xenapi/Task.java
index 6db0bba9876..99632be4e3d 100644
--- a/deps/XenServerJava/com/xensource/xenapi/Task.java
+++ b/deps/XenServerJava/com/xensource/xenapi/Task.java
@@ -143,7 +143,7 @@ public class Task extends XenAPIObject {
}
/**
- * unique identifier/object reference
+ * Unique identifier/object reference
*/
public String uuid;
/**
diff --git a/deps/XenServerJava/com/xensource/xenapi/Tunnel.java b/deps/XenServerJava/com/xensource/xenapi/Tunnel.java
new file mode 100644
index 00000000000..46c4b7ff4b3
--- /dev/null
+++ b/deps/XenServerJava/com/xensource/xenapi/Tunnel.java
@@ -0,0 +1,473 @@
+/*
+ * Copyright (c) 2006-2010 Citrix Systems, Inc.
+ *
+ * This library is free software; you can redistribute it and/or modify it
+ * under the terms of version 2 of the GNU General Public License as published
+ * by the Free Software Foundation, with the additional linking exception as
+ * follows:
+ *
+ * Linking this library statically or dynamically with other modules is
+ * making a combined work based on this library. Thus, the terms and
+ * conditions of the GNU General Public License cover the whole combination.
+ *
+ * As a special exception, the copyright holders of this library give you
+ * permission to link this library with independent modules to produce an
+ * executable, regardless of the license terms of these independent modules,
+ * and to copy and distribute the resulting executable under terms of your
+ * choice, provided that you also meet, for each linked independent module,
+ * the terms and conditions of the license of that module. An independent
+ * module is a module which is not derived from or based on this library. If
+ * you modify this library, you may extend this exception to your version of
+ * the library, but you are not obligated to do so. If you do not wish to do
+ * so, delete this exception statement from your version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+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 tunnel for network traffic
+ *
+ * @author Citrix Systems, Inc.
+ */
+public class Tunnel extends XenAPIObject {
+
+ /**
+ * The XenAPI reference to this object.
+ */
+ protected final String ref;
+
+ /**
+ * For internal use only.
+ */
+ Tunnel(String ref) {
+ this.ref = ref;
+ }
+
+ public String toWireString() {
+ return this.ref;
+ }
+
+ /**
+ * If obj is a Tunnel, compares XenAPI references for equality.
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (obj != null && obj instanceof Tunnel)
+ {
+ Tunnel other = (Tunnel) obj;
+ return other.ref.equals(this.ref);
+ } else
+ {
+ return false;
+ }
+ }
+
+ @Override
+ public int hashCode()
+ {
+ return ref.hashCode();
+ }
+
+ /**
+ * Represents all the fields in a Tunnel
+ */
+ 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", "accessPIF", this.accessPIF);
+ print.printf("%1$20s: %2$s\n", "transportPIF", this.transportPIF);
+ print.printf("%1$20s: %2$s\n", "status", this.status);
+ print.printf("%1$20s: %2$s\n", "otherConfig", this.otherConfig);
+ return writer.toString();
+ }
+
+ /**
+ * Convert a tunnel.Record to a Map
+ */
+ 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);
+ map.put("status", this.status == null ? new HashMap() : this.status);
+ map.put("other_config", this.otherConfig == null ? new HashMap() : this.otherConfig);
+ return map;
+ }
+
+ /**
+ * Unique identifier/object reference
+ */
+ public String uuid;
+ /**
+ * The interface through which the tunnel is accessed
+ */
+ public PIF accessPIF;
+ /**
+ * The interface used by the tunnel
+ */
+ public PIF transportPIF;
+ /**
+ * Status information about the tunnel
+ */
+ public Map status;
+ /**
+ * Additional configuration
+ */
+ public Map otherConfig;
+ }
+
+ /**
+ * Get a record containing the current state of the given tunnel.
+ *
+ * @return all fields from the object
+ */
+ public Tunnel.Record getRecord(Connection c) throws
+ 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);
+ }
+
+ /**
+ * Get a reference to the tunnel instance with the specified UUID.
+ *
+ * @param uuid UUID of object to return
+ * @return reference to the object
+ */
+ public static Tunnel getByUuid(Connection c, String uuid) throws
+ 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);
+ }
+
+ /**
+ * Get the uuid field of the given tunnel.
+ *
+ * @return value of the field
+ */
+ public String getUuid(Connection c) throws
+ 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);
+ }
+
+ /**
+ * Get the access_PIF field of the given tunnel.
+ *
+ * @return value of the field
+ */
+ public PIF getAccessPIF(Connection c) throws
+ 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);
+ }
+
+ /**
+ * Get the transport_PIF field of the given tunnel.
+ *
+ * @return value of the field
+ */
+ public PIF getTransportPIF(Connection c) throws
+ 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);
+ }
+
+ /**
+ * Get the status field of the given tunnel.
+ *
+ * @return value of the field
+ */
+ public Map getStatus(Connection c) throws
+ 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);
+ }
+
+ /**
+ * Get the other_config field of the given tunnel.
+ *
+ * @return value of the field
+ */
+ public Map getOtherConfig(Connection c) throws
+ 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);
+ }
+
+ /**
+ * Set the status field of the given tunnel.
+ *
+ * @param status New value to set
+ */
+ public void setStatus(Connection c, Map status) throws
+ 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)};
+ Map response = c.dispatch(method_call, method_params);
+ return;
+ }
+
+ /**
+ * Add the given key-value pair to the status field of the given tunnel.
+ *
+ * @param key Key to add
+ * @param value Value to add
+ */
+ public void addToStatus(Connection c, String key, String value) throws
+ 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)};
+ Map response = c.dispatch(method_call, method_params);
+ return;
+ }
+
+ /**
+ * Remove the given key and its corresponding value from the status field of the given tunnel. If the key is not in that Map, then do nothing.
+ *
+ * @param key Key to remove
+ */
+ public void removeFromStatus(Connection c, String key) throws
+ 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)};
+ Map response = c.dispatch(method_call, method_params);
+ return;
+ }
+
+ /**
+ * Set the other_config field of the given tunnel.
+ *
+ * @param otherConfig New value to set
+ */
+ public void setOtherConfig(Connection c, Map otherConfig) throws
+ 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)};
+ Map response = c.dispatch(method_call, method_params);
+ return;
+ }
+
+ /**
+ * Add the given key-value pair to the other_config field of the given tunnel.
+ *
+ * @param key Key to add
+ * @param value Value to add
+ */
+ public void addToOtherConfig(Connection c, String key, String value) throws
+ 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)};
+ Map response = c.dispatch(method_call, method_params);
+ return;
+ }
+
+ /**
+ * Remove the given key and its corresponding value from the other_config field of the given tunnel. If the key is not in that Map, then do nothing.
+ *
+ * @param key Key to remove
+ */
+ public void removeFromOtherConfig(Connection c, String key) throws
+ 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)};
+ Map response = c.dispatch(method_call, method_params);
+ return;
+ }
+
+ /**
+ * Create a tunnel
+ *
+ * @param transportPIF PIF which receives the tagged traffic
+ * @param network Network to receive the tunnelled traffic
+ * @return Task
+ */
+ public static Task createAsync(Connection c, PIF transportPIF, Network network) throws
+ 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)};
+ Map response = c.dispatch(method_call, method_params);
+ Object result = response.get("Value");
+ return Types.toTask(result);
+ }
+
+ /**
+ * Create a tunnel
+ *
+ * @param transportPIF PIF which receives the tagged traffic
+ * @param network Network to receive the tunnelled traffic
+ * @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 {
+ 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);
+ }
+
+ /**
+ * Destroy a tunnel
+ *
+ * @return Task
+ */
+ public Task destroyAsync(Connection c) throws
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
+ String method_call = "Async.tunnel.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 a tunnel
+ *
+ */
+ public void destroy(Connection c) throws
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
+ String method_call = "tunnel.destroy";
+ String session = c.getSessionReference();
+ Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
+ Map response = c.dispatch(method_call, method_params);
+ return;
+ }
+
+ /**
+ * Return a list of all the tunnels known to the system.
+ *
+ * @return references to all objects
+ */
+ public static Set getAll(Connection c) throws
+ 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 a map of tunnel references to tunnel records for all tunnels known to the system.
+ *
+ * @return records of all objects
+ */
+ public static Map getAllRecords(Connection c) throws
+ 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);
+ }
+
+}
\ No newline at end of file
diff --git a/deps/XenServerJava/com/xensource/xenapi/Types.java b/deps/XenServerJava/com/xensource/xenapi/Types.java
index 5b8584759cb..7c88a01867c 100644
--- a/deps/XenServerJava/com/xensource/xenapi/Types.java
+++ b/deps/XenServerJava/com/xensource/xenapi/Types.java
@@ -229,6 +229,11 @@ public class Types
String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
throw new Types.VmHvmRequired(p1);
}
+ if (ErrorDescription[0].equals("PIF_TUNNEL_STILL_EXISTS"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.PifTunnelStillExists(p1);
+ }
if (ErrorDescription[0].equals("PIF_BOND_NEEDS_MORE_MEMBERS"))
{
throw new Types.PifBondNeedsMoreMembers();
@@ -253,10 +258,20 @@ public class Types
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();
@@ -425,16 +440,16 @@ public class Types
String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
throw new Types.BootloaderFailed(p1, p2);
}
+ if (ErrorDescription[0].equals("WLB_XENSERVER_MALFORMED_RESPONSE"))
+ {
+ throw new Types.WlbXenserverMalformedResponse();
+ }
if (ErrorDescription[0].equals("POOL_AUTH_ENABLE_FAILED_DUPLICATE_HOSTNAME"))
{
String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
throw new Types.PoolAuthEnableFailedDuplicateHostname(p1, p2);
}
- if (ErrorDescription[0].equals("WLB_XENSERVER_MALFORMED_RESPONSE"))
- {
- throw new Types.WlbXenserverMalformedResponse();
- }
if (ErrorDescription[0].equals("SYSTEM_STATUS_RETRIEVAL_FAILED"))
{
String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
@@ -641,6 +656,11 @@ public class Types
String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
throw new Types.HaNotInstalled(p1);
}
+ if (ErrorDescription[0].equals("DUPLICATE_PIF_DEVICE_NAME"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.DuplicatePifDeviceName(p1);
+ }
if (ErrorDescription[0].equals("VM_BAD_POWER_STATE"))
{
String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
@@ -993,6 +1013,10 @@ public class Types
{
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] : "";
@@ -1011,6 +1035,10 @@ public class Types
String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
throw new Types.PifIsVlan(p1);
}
+ if (ErrorDescription[0].equals("VMPP_ARCHIVE_MORE_FREQUENT_THAN_BACKUP"))
+ {
+ throw new Types.VmppArchiveMoreFrequentThanBackup();
+ }
if (ErrorDescription[0].equals("JOINING_HOST_CANNOT_BE_MASTER_OF_OTHER_HOSTS"))
{
throw new Types.JoiningHostCannotBeMasterOfOtherHosts();
@@ -1234,6 +1262,10 @@ public class Types
String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
throw new Types.VmMemorySizeTooLow(p1);
}
+ if (ErrorDescription[0].equals("VMPP_HAS_VM"))
+ {
+ throw new Types.VmppHasVm();
+ }
if (ErrorDescription[0].equals("HOST_NOT_DISABLED"))
{
throw new Types.HostNotDisabled();
@@ -1320,6 +1352,10 @@ public class Types
String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
throw new Types.PatchPrecheckFailedPrerequisiteMissing(p1, p2);
}
+ if (ErrorDescription[0].equals("WLB_XENSERVER_TIMEOUT"))
+ {
+ throw new Types.WlbXenserverTimeout();
+ }
if (ErrorDescription[0].equals("VM_SNAPSHOT_WITH_QUIESCE_FAILED"))
{
String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
@@ -1331,10 +1367,6 @@ public class Types
String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
throw new Types.PoolAuthDisableFailedWrongCredentials(p1, p2);
}
- if (ErrorDescription[0].equals("WLB_XENSERVER_TIMEOUT"))
- {
- throw new Types.WlbXenserverTimeout();
- }
if (ErrorDescription[0].equals("CERTIFICATE_CORRUPT"))
{
String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
@@ -1360,6 +1392,10 @@ public class Types
String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
throw new Types.XenVssReqErrorNoVolumesSupported(p1, p2);
}
+ if (ErrorDescription[0].equals("HOST_ITS_OWN_SLAVE"))
+ {
+ throw new Types.HostItsOwnSlave();
+ }
if (ErrorDescription[0].equals("REDO_LOG_IS_ENABLED"))
{
throw new Types.RedoLogIsEnabled();
@@ -1419,6 +1455,11 @@ public class Types
{
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();
@@ -1607,12 +1648,6 @@ public class Types
String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
throw new Types.VmNotResidentHere(p1, p2);
}
- if (ErrorDescription[0].equals("POOL_AUTH_ENABLE_FAILED_UNAVAILABLE"))
- {
- String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
- String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
- throw new Types.PoolAuthEnableFailedUnavailable(p1, p2);
- }
if (ErrorDescription[0].equals("HOST_OFFLINE"))
{
String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
@@ -1628,6 +1663,11 @@ public class Types
{
throw new Types.HostHasNoManagementIp();
}
+ if (ErrorDescription[0].equals("TRANSPORT_PIF_NOT_CONFIGURED"))
+ {
+ String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
+ throw new Types.TransportPifNotConfigured(p1);
+ }
if (ErrorDescription[0].equals("HA_IS_ENABLED"))
{
throw new Types.HaIsEnabled();
@@ -1749,6 +1789,33 @@ public class Types
BLOCKED
};
+ public enum Cls {
+ /**
+ * The value does not belong to this enumeration
+ */
+ UNRECOGNIZED,
+ /**
+ * VM
+ */
+ VM,
+ /**
+ * Host
+ */
+ HOST,
+ /**
+ * SR
+ */
+ SR,
+ /**
+ * Pool
+ */
+ POOL,
+ /**
+ * VMPP
+ */
+ VMPP
+ };
+
public enum VdiType {
/**
* The value does not belong to this enumeration
@@ -1788,29 +1855,6 @@ public class Types
REDO_LOG
};
- public enum Cls {
- /**
- * The value does not belong to this enumeration
- */
- UNRECOGNIZED,
- /**
- * VM
- */
- VM,
- /**
- * Host
- */
- HOST,
- /**
- * SR
- */
- SR,
- /**
- * Pool
- */
- POOL
- };
-
public enum AfterApplyGuidance {
/**
* The value does not belong to this enumeration
@@ -1902,6 +1946,25 @@ public class Types
ATTACHING
};
+ public enum ConsoleProtocol {
+ /**
+ * The value does not belong to this enumeration
+ */
+ UNRECOGNIZED,
+ /**
+ * VT100 terminal
+ */
+ VT100,
+ /**
+ * Remote FrameBuffer protocol (as used in VNC)
+ */
+ RFB,
+ /**
+ * Remote Desktop Protocol
+ */
+ RDP
+ };
+
public enum OnCrashBehaviour {
/**
* The value does not belong to this enumeration
@@ -1933,23 +1996,19 @@ public class Types
RENAME_RESTART
};
- public enum ConsoleProtocol {
+ public enum VmppBackupType {
/**
* The value does not belong to this enumeration
*/
UNRECOGNIZED,
/**
- * VT100 terminal
+ * The backup is a snapshot
*/
- VT100,
+ SNAPSHOT,
/**
- * Remote FrameBuffer protocol (as used in VNC)
+ * The backup is a checkpoint
*/
- RFB,
- /**
- * Remote Desktop Protocol
- */
- RDP
+ CHECKPOINT
};
public enum OnNormalExit {
@@ -2035,6 +2094,10 @@ public class Types
* The metrics reported by the guest (as opposed to inferred from outside)
*/
VM_GUEST_METRICS,
+ /**
+ * VM Protection Policy
+ */
+ VMPP,
/**
* A physical host
*/
@@ -2138,7 +2201,11 @@ public class Types
/**
* A secret
*/
- SECRET
+ SECRET,
+ /**
+ * A tunnel for network traffic
+ */
+ TUNNEL
};
public enum HostAllowedOperations {
@@ -2180,6 +2247,48 @@ public class Types
VM_MIGRATE
};
+ public enum VmppArchiveFrequency {
+ /**
+ * The value does not belong to this enumeration
+ */
+ UNRECOGNIZED,
+ /**
+ * Never archive
+ */
+ NEVER,
+ /**
+ * Archive after backup
+ */
+ ALWAYS_AFTER_BACKUP,
+ /**
+ * Daily archives
+ */
+ DAILY,
+ /**
+ * Weekly backups
+ */
+ WEEKLY
+ };
+
+ public enum VmppArchiveTargetType {
+ /**
+ * The value does not belong to this enumeration
+ */
+ UNRECOGNIZED,
+ /**
+ * No target config
+ */
+ NONE,
+ /**
+ * CIFS target config
+ */
+ CIFS,
+ /**
+ * NFS target config
+ */
+ NFS
+ };
+
public enum VbdMode {
/**
* The value does not belong to this enumeration
@@ -2210,6 +2319,21 @@ public class Types
DISK
};
+ public enum OnBoot {
+ /**
+ * The value does not belong to this enumeration
+ */
+ UNRECOGNIZED,
+ /**
+ * The VDI will be reset to the state it was in at the last clone
+ */
+ RESET,
+ /**
+ * The VDIs contents are persistent
+ */
+ PERSIST
+ };
+
public enum VbdOperations {
/**
* The value does not belong to this enumeration
@@ -2249,6 +2373,25 @@ public class Types
UNPAUSE
};
+ public enum VmppBackupFrequency {
+ /**
+ * The value does not belong to this enumeration
+ */
+ UNRECOGNIZED,
+ /**
+ * Hourly backups
+ */
+ HOURLY,
+ /**
+ * Daily backups
+ */
+ DAILY,
+ /**
+ * Weekly backups
+ */
+ WEEKLY
+ };
+
public enum VmPowerState {
/**
* The value does not belong to this enumeration
@@ -2289,6 +2432,10 @@ public class Types
* refers to the operation "copy"
*/
COPY,
+ /**
+ * refers to the operation "create_template"
+ */
+ CREATE_TEMPLATE,
/**
* refers to the operation "revert"
*/
@@ -2673,6 +2820,24 @@ public class Types
}
+ /**
+ * 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
*/
@@ -2759,6 +2924,27 @@ public class Types
}
+ /**
+ * 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.
*/
@@ -2773,6 +2959,20 @@ public class Types
}
+ /**
+ * 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
*/
@@ -3364,6 +3564,20 @@ public class Types
}
+ /**
+ * 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 pool failed to enable external authentication.
*/
@@ -3385,20 +3599,6 @@ public class Types
}
- /**
- * 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.");
- }
-
- }
-
/**
* Retrieving system status from the host failed. A diagnostic reason suitable for support organisations is also returned.
*/
@@ -4129,6 +4329,24 @@ public class Types
}
+ /**
+ * 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;
+ }
+
+ }
+
/**
* 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.
*/
@@ -5374,6 +5592,20 @@ public class Types
}
+ /**
+ * 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
*/
@@ -5438,6 +5670,20 @@ public class Types
}
+ /**
+ * Archive more frequent than backup.
+ */
+ public static class VmppArchiveMoreFrequentThanBackup extends XenAPIException {
+
+ /**
+ * Create a new VmppArchiveMoreFrequentThanBackup
+ */
+ public VmppArchiveMoreFrequentThanBackup() {
+ super("Archive more frequent than backup.");
+ }
+
+ }
+
/**
* The host joining the pool cannot already be a master of another pool.
*/
@@ -6228,6 +6474,20 @@ public class Types
}
+ /**
+ * There is at least on VM assigned to this protection policy.
+ */
+ public static class VmppHasVm extends XenAPIException {
+
+ /**
+ * Create a new VmppHasVm
+ */
+ public VmppHasVm() {
+ super("There is at least on 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.
*/
@@ -6530,6 +6790,20 @@ public class Types
}
+ /**
+ * 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 quiesced-snapshot operation failed for an unexpected reason
*/
@@ -6569,20 +6843,6 @@ public class Types
}
- /**
- * 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 specified certificate is corrupt or unreadable.
*/
@@ -6672,6 +6932,20 @@ public class Types
}
+ /**
+ * 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 operation could not be performed because a redo log is enabled on the Pool.
*/
@@ -6882,6 +7156,24 @@ public class Types
}
+ /**
+ * 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.
*/
@@ -7547,27 +7839,6 @@ public class Types
}
- /**
- * The pool failed to enable external authentication.
- */
- public static class PoolAuthEnableFailedUnavailable extends XenAPIException {
- public final String host;
- public final String message;
-
- /**
- * Create a new PoolAuthEnableFailedUnavailable
- *
- * @param host
- * @param message
- */
- public PoolAuthEnableFailedUnavailable(String host, String message) {
- super("The pool failed to enable external authentication.");
- this.host = host;
- this.message = message;
- }
-
- }
-
/**
* You attempted an operation which involves a host which could not be contacted.
*/
@@ -7621,6 +7892,24 @@ public class Types
}
+ /**
+ * 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
*/
@@ -7956,6 +8245,17 @@ public class Types
}
}
+ public static Types.OnBoot toOnBoot(Object object) {
+ if (object == null) {
+ return null;
+ }
+ try {
+ return OnBoot.valueOf(((String) object).toUpperCase());
+ } catch (IllegalArgumentException ex) {
+ return OnBoot.UNRECOGNIZED;
+ }
+ }
+
public static Types.OnCrashBehaviour toOnCrashBehaviour(Object object) {
if (object == null) {
return null;
@@ -8099,6 +8399,50 @@ public class Types
}
}
+ public static Types.VmppArchiveFrequency toVmppArchiveFrequency(Object object) {
+ if (object == null) {
+ return null;
+ }
+ try {
+ return VmppArchiveFrequency.valueOf(((String) object).toUpperCase());
+ } catch (IllegalArgumentException ex) {
+ return VmppArchiveFrequency.UNRECOGNIZED;
+ }
+ }
+
+ public static Types.VmppArchiveTargetType toVmppArchiveTargetType(Object object) {
+ if (object == null) {
+ return null;
+ }
+ try {
+ return VmppArchiveTargetType.valueOf(((String) object).toUpperCase());
+ } catch (IllegalArgumentException ex) {
+ return VmppArchiveTargetType.UNRECOGNIZED;
+ }
+ }
+
+ public static Types.VmppBackupFrequency toVmppBackupFrequency(Object object) {
+ if (object == null) {
+ return null;
+ }
+ try {
+ return VmppBackupFrequency.valueOf(((String) object).toUpperCase());
+ } catch (IllegalArgumentException ex) {
+ return VmppBackupFrequency.UNRECOGNIZED;
+ }
+ }
+
+ public static Types.VmppBackupType toVmppBackupType(Object object) {
+ if (object == null) {
+ return null;
+ }
+ try {
+ return VmppBackupType.valueOf(((String) object).toUpperCase());
+ } catch (IllegalArgumentException ex) {
+ return VmppBackupType.UNRECOGNIZED;
+ }
+ }
+
public static Set toSetOfString(Object object) {
if (object == null) {
return null;
@@ -8398,6 +8742,19 @@ public class Types
return result;
}
+ public static Set toSetOfVMPP(Object object) {
+ if (object == null) {
+ return null;
+ }
+ Object[] items = (Object[]) object;
+ Set result = new LinkedHashSet();
+ for(Object item: items) {
+ VMPP typed = toVMPP(item);
+ result.add(typed);
+ }
+ return result;
+ }
+
public static Set toSetOfVMGuestMetrics(Object object) {
if (object == null) {
return null;
@@ -8645,6 +9002,19 @@ public class Types
return result;
}
+ public static Set toSetOfTunnel(Object object) {
+ if (object == null) {
+ return null;
+ }
+ Object[] items = (Object[]) object;
+ Set result = new LinkedHashSet();
+ for(Object item: items) {
+ Tunnel typed = toTunnel(item);
+ result.add(typed);
+ }
+ return result;
+ }
+
public static Set toSetOfDataSourceRecord(Object object) {
if (object == null) {
return null;
@@ -9121,6 +9491,21 @@ public class Types
return result;
}
+ public static Map toMapOfVMPPVMPPRecord(Object object) {
+ if (object == null) {
+ return null;
+ }
+ Map map = (Map) object;
+ Map result = new HashMap();
+ Set entries = map.entrySet();
+ for(Map.Entry entry: entries) {
+ VMPP key = toVMPP(entry.getKey());
+ VMPP.Record value = toVMPPRecord(entry.getValue());
+ result.put(key, value);
+ }
+ return result;
+ }
+
public static Map toMapOfVMGuestMetricsVMGuestMetricsRecord(Object object) {
if (object == null) {
return null;
@@ -9406,6 +9791,21 @@ public class Types
return result;
}
+ public static Map toMapOfTunnelTunnelRecord(Object object) {
+ if (object == null) {
+ return null;
+ }
+ Map map = (Map) object;
+ Map result = new HashMap();
+ Set entries = map.entrySet();
+ for(Map.Entry entry: entries) {
+ Tunnel key = toTunnel(entry.getKey());
+ Tunnel.Record value = toTunnelRecord(entry.getValue());
+ result.put(key, value);
+ }
+ return result;
+ }
+
public static Bond toBond(Object object) {
if (object == null) {
return null;
@@ -9497,6 +9897,13 @@ public class Types
return new VM((String) object);
}
+ public static VMPP toVMPP(Object object) {
+ if (object == null) {
+ return null;
+ }
+ return new VMPP((String) object);
+ }
+
public static VMGuestMetrics toVMGuestMetrics(Object object) {
if (object == null) {
return null;
@@ -9637,6 +10044,13 @@ public class Types
return new Task((String) object);
}
+ public static Tunnel toTunnel(Object object) {
+ if (object == null) {
+ return null;
+ }
+ return new Tunnel((String) object);
+ }
+
public static User toUser(Object object) {
if (object == null) {
return null;
@@ -9700,6 +10114,8 @@ public class Types
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"));
return record;
}
@@ -9769,6 +10185,7 @@ public class Types
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"));
return record;
}
@@ -9849,6 +10266,8 @@ public class Types
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"));
return record;
}
@@ -9977,6 +10396,37 @@ public class Types
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"));
+ return record;
+ }
+
+ public static VMPP.Record toVMPPRecord(Object object) {
+ if (object == null) {
+ return null;
+ }
+ 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"));
return record;
}
@@ -10120,6 +10570,7 @@ public class Types
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 HOST: b = toHostRecord(a); break;
case HOST_CRASHDUMP: b = toHostCrashdumpRecord(a); break;
case HOST_PATCH: b = toHostPatchRecord(a); break;
@@ -10146,6 +10597,7 @@ public class Types
case BLOB: b = toBlobRecord(a); break;
case MESSAGE: b = toMessageRecord(a); break;
case SECRET: b = toSecretRecord(a); break;
+ case TUNNEL: b = toTunnelRecord(a); break;
default: throw new RuntimeException("Internal error in auto-generated code whilst unmarshalling event snapshot");
}
record.snapshot = b;
@@ -10201,6 +10653,7 @@ public class Types
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"));
return record;
}
@@ -10406,6 +10859,8 @@ public class Types
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;
}
@@ -10447,6 +10902,20 @@ public class Types
return record;
}
+ public static Tunnel.Record toTunnelRecord(Object object) {
+ if (object == null) {
+ return null;
+ }
+ 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"));
+ return record;
+ }
+
public static User.Record toUserRecord(Object object) {
if (object == null) {
return null;
@@ -10513,6 +10982,10 @@ public class Types
return Types.toVM(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)));
}
@@ -10593,6 +11066,10 @@ public class Types
return Types.toTask(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/com/xensource/xenapi/User.java b/deps/XenServerJava/com/xensource/xenapi/User.java
index 39c92bc5fb8..f0656e7b9db 100644
--- a/deps/XenServerJava/com/xensource/xenapi/User.java
+++ b/deps/XenServerJava/com/xensource/xenapi/User.java
@@ -119,7 +119,7 @@ public class User extends XenAPIObject {
}
/**
- * unique identifier/object reference
+ * Unique identifier/object reference
*/
public String uuid;
/**
@@ -138,10 +138,11 @@ public class User extends XenAPIObject {
/**
* Get a record containing the current state of the given user.
+ * @deprecated
*
* @return all fields from the object
*/
- public User.Record getRecord(Connection c) throws
+ @Deprecated public User.Record getRecord(Connection c) throws
BadServerResponse,
XenAPIException,
XmlRpcException {
@@ -155,11 +156,12 @@ public class User extends XenAPIObject {
/**
* Get a reference to the user instance with the specified UUID.
+ * @deprecated
*
* @param uuid UUID of object to return
* @return reference to the object
*/
- public static User getByUuid(Connection c, String uuid) throws
+ @Deprecated public static User getByUuid(Connection c, String uuid) throws
BadServerResponse,
XenAPIException,
XmlRpcException {
@@ -173,11 +175,12 @@ public class User extends XenAPIObject {
/**
* Create a new user instance, and return its handle.
+ * @deprecated
*
* @param record All constructor arguments
* @return Task
*/
- public static Task createAsync(Connection c, User.Record record) throws
+ @Deprecated public static Task createAsync(Connection c, User.Record record) throws
BadServerResponse,
XenAPIException,
XmlRpcException {
@@ -192,11 +195,12 @@ public class User extends XenAPIObject {
/**
* Create a new user instance, and return its handle.
+ * @deprecated
*
* @param record All constructor arguments
* @return reference to the newly created object
*/
- public static User create(Connection c, User.Record record) throws
+ @Deprecated public static User create(Connection c, User.Record record) throws
BadServerResponse,
XenAPIException,
XmlRpcException {
@@ -211,10 +215,11 @@ public class User extends XenAPIObject {
/**
* Destroy the specified user instance.
+ * @deprecated
*
* @return Task
*/
- public Task destroyAsync(Connection c) throws
+ @Deprecated public Task destroyAsync(Connection c) throws
BadServerResponse,
XenAPIException,
XmlRpcException {
@@ -228,9 +233,10 @@ public class User extends XenAPIObject {
/**
* Destroy the specified user instance.
+ * @deprecated
*
*/
- public void destroy(Connection c) throws
+ @Deprecated public void destroy(Connection c) throws
BadServerResponse,
XenAPIException,
XmlRpcException {
diff --git a/deps/XenServerJava/com/xensource/xenapi/VBD.java b/deps/XenServerJava/com/xensource/xenapi/VBD.java
index 24dcbc255ef..8967608a7e4 100644
--- a/deps/XenServerJava/com/xensource/xenapi/VBD.java
+++ b/deps/XenServerJava/com/xensource/xenapi/VBD.java
@@ -155,7 +155,7 @@ public class VBD extends XenAPIObject {
}
/**
- * unique identifier/object reference
+ * Unique identifier/object reference
*/
public String uuid;
/**
diff --git a/deps/XenServerJava/com/xensource/xenapi/VBDMetrics.java b/deps/XenServerJava/com/xensource/xenapi/VBDMetrics.java
index 700548f978b..0d0ec738819 100644
--- a/deps/XenServerJava/com/xensource/xenapi/VBDMetrics.java
+++ b/deps/XenServerJava/com/xensource/xenapi/VBDMetrics.java
@@ -121,7 +121,7 @@ public class VBDMetrics extends XenAPIObject {
}
/**
- * unique identifier/object reference
+ * Unique identifier/object reference
*/
public String uuid;
/**
diff --git a/deps/XenServerJava/com/xensource/xenapi/VDI.java b/deps/XenServerJava/com/xensource/xenapi/VDI.java
index 4922803289f..7718aaa84f8 100644
--- a/deps/XenServerJava/com/xensource/xenapi/VDI.java
+++ b/deps/XenServerJava/com/xensource/xenapi/VDI.java
@@ -125,6 +125,8 @@ public class VDI extends XenAPIObject {
print.printf("%1$20s: %2$s\n", "snapshots", this.snapshots);
print.printf("%1$20s: %2$s\n", "snapshotTime", this.snapshotTime);
print.printf("%1$20s: %2$s\n", "tags", this.tags);
+ print.printf("%1$20s: %2$s\n", "allowCaching", this.allowCaching);
+ print.printf("%1$20s: %2$s\n", "onBoot", this.onBoot);
return writer.toString();
}
@@ -159,11 +161,13 @@ public class VDI extends XenAPIObject {
map.put("snapshots", this.snapshots == null ? new LinkedHashSet() : this.snapshots);
map.put("snapshot_time", this.snapshotTime == null ? new Date(0) : this.snapshotTime);
map.put("tags", this.tags == null ? new LinkedHashSet() : this.tags);
+ map.put("allow_caching", this.allowCaching == null ? false : this.allowCaching);
+ map.put("on_boot", this.onBoot == null ? Types.OnBoot.UNRECOGNIZED : this.onBoot);
return map;
}
/**
- * unique identifier/object reference
+ * Unique identifier/object reference
*/
public String uuid;
/**
@@ -266,6 +270,14 @@ public class VDI extends XenAPIObject {
* user-specified tags for categorization purposes
*/
public Set tags;
+ /**
+ * true if this VDI is to be cached in the local cache SR
+ */
+ public Boolean allowCaching;
+ /**
+ * The behaviour of this VDI on a VM boot
+ */
+ public Types.OnBoot onBoot;
}
/**
@@ -833,6 +845,40 @@ public class VDI extends XenAPIObject {
return Types.toSetOfString(result);
}
+ /**
+ * Get the allow_caching field of the given VDI.
+ *
+ * @return value of the field
+ */
+ public Boolean getAllowCaching(Connection c) throws
+ 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);
+ }
+
+ /**
+ * Get the on_boot field of the given VDI.
+ *
+ * @return value of the field
+ */
+ public Types.OnBoot getOnBoot(Connection c) throws
+ 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);
+ }
+
/**
* Set the name/label field of the given VDI.
*
diff --git a/deps/XenServerJava/com/xensource/xenapi/VIF.java b/deps/XenServerJava/com/xensource/xenapi/VIF.java
index 113d2d5d1ba..b07b64860d7 100644
--- a/deps/XenServerJava/com/xensource/xenapi/VIF.java
+++ b/deps/XenServerJava/com/xensource/xenapi/VIF.java
@@ -147,7 +147,7 @@ public class VIF extends XenAPIObject {
}
/**
- * unique identifier/object reference
+ * Unique identifier/object reference
*/
public String uuid;
/**
diff --git a/deps/XenServerJava/com/xensource/xenapi/VIFMetrics.java b/deps/XenServerJava/com/xensource/xenapi/VIFMetrics.java
index f8218faf7e1..413f1d9eb38 100644
--- a/deps/XenServerJava/com/xensource/xenapi/VIFMetrics.java
+++ b/deps/XenServerJava/com/xensource/xenapi/VIFMetrics.java
@@ -121,7 +121,7 @@ public class VIFMetrics extends XenAPIObject {
}
/**
- * unique identifier/object reference
+ * Unique identifier/object reference
*/
public String uuid;
/**
diff --git a/deps/XenServerJava/com/xensource/xenapi/VLAN.java b/deps/XenServerJava/com/xensource/xenapi/VLAN.java
index fede33d1eb6..0e20f7e70f4 100644
--- a/deps/XenServerJava/com/xensource/xenapi/VLAN.java
+++ b/deps/XenServerJava/com/xensource/xenapi/VLAN.java
@@ -121,7 +121,7 @@ public class VLAN extends XenAPIObject {
}
/**
- * unique identifier/object reference
+ * Unique identifier/object reference
*/
public String uuid;
/**
diff --git a/deps/XenServerJava/com/xensource/xenapi/VM.java b/deps/XenServerJava/com/xensource/xenapi/VM.java
index dd56390d7c0..18f86b0fc58 100644
--- a/deps/XenServerJava/com/xensource/xenapi/VM.java
+++ b/deps/XenServerJava/com/xensource/xenapi/VM.java
@@ -163,6 +163,8 @@ public class VM extends XenAPIObject {
print.printf("%1$20s: %2$s\n", "parent", this.parent);
print.printf("%1$20s: %2$s\n", "children", this.children);
print.printf("%1$20s: %2$s\n", "biosStrings", this.biosStrings);
+ print.printf("%1$20s: %2$s\n", "protectionPolicy", this.protectionPolicy);
+ print.printf("%1$20s: %2$s\n", "isSnapshotFromVmpp", this.isSnapshotFromVmpp);
return writer.toString();
}
@@ -235,11 +237,13 @@ public class VM extends XenAPIObject {
map.put("parent", this.parent == null ? new VM("OpaqueRef:NULL") : this.parent);
map.put("children", this.children == null ? new LinkedHashSet() : this.children);
map.put("bios_strings", this.biosStrings == null ? new HashMap() : this.biosStrings);
+ map.put("protection_policy", this.protectionPolicy == null ? new VMPP("OpaqueRef:NULL") : this.protectionPolicy);
+ map.put("is_snapshot_from_vmpp", this.isSnapshotFromVmpp == null ? false : this.isSnapshotFromVmpp);
return map;
}
/**
- * unique identifier/object reference
+ * Unique identifier/object reference
*/
public String uuid;
/**
@@ -494,6 +498,14 @@ public class VM extends XenAPIObject {
* BIOS strings
*/
public Map biosStrings;
+ /**
+ * Ref pointing to a protection policy for this VM
+ */
+ public VMPP protectionPolicy;
+ /**
+ * true if this snapshot was created by the protection policy
+ */
+ public Boolean isSnapshotFromVmpp;
}
/**
@@ -1708,6 +1720,40 @@ public class VM extends XenAPIObject {
return Types.toMapOfStringString(result);
}
+ /**
+ * Get the protection_policy field of the given VM.
+ *
+ * @return value of the field
+ */
+ 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);
+ }
+
+ /**
+ * Get the is_snapshot_from_vmpp field of the given VM.
+ *
+ * @return value of the field
+ */
+ 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);
+ }
+
/**
* Set the name/label field of the given VM.
*
@@ -2541,7 +2587,7 @@ public class VM extends XenAPIObject {
}
/**
- * Checkpoints the specified VM, making a new VM. Checkppoint automatically exploits the capabilities of the underlying storage repository in which the VM's disk images are stored (e.g. Copy on Write) and saves the memory image as well.
+ * Checkpoints the specified VM, making a new VM. Checkpoint automatically exploits the capabilities of the underlying storage repository in which the VM's disk images are stored (e.g. Copy on Write) and saves the memory image as well.
*
* @param newName The name of the checkpointed VM
* @return Task
@@ -2564,7 +2610,7 @@ public class VM extends XenAPIObject {
}
/**
- * Checkpoints the specified VM, making a new VM. Checkppoint automatically exploits the capabilities of the underlying storage repository in which the VM's disk images are stored (e.g. Copy on Write) and saves the memory image as well.
+ * Checkpoints the specified VM, making a new VM. Checkpoint automatically exploits the capabilities of the underlying storage repository in which the VM's disk images are stored (e.g. Copy on Write) and saves the memory image as well.
*
* @param newName The name of the checkpointed VM
* @return The reference of the newly created VM.
@@ -4175,6 +4221,22 @@ public class VM extends XenAPIObject {
return;
}
+ /**
+ * Set the value of the protection_policy field
+ *
+ * @param value The value
+ */
+ public void setProtectionPolicy(Connection c, VMPP value) throws
+ 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)};
+ Map response = c.dispatch(method_call, method_params);
+ return;
+ }
+
/**
* Return a list of all the VMs known to the system.
*
diff --git a/deps/XenServerJava/com/xensource/xenapi/VMGuestMetrics.java b/deps/XenServerJava/com/xensource/xenapi/VMGuestMetrics.java
index e641d23045b..5df842c0e8c 100644
--- a/deps/XenServerJava/com/xensource/xenapi/VMGuestMetrics.java
+++ b/deps/XenServerJava/com/xensource/xenapi/VMGuestMetrics.java
@@ -133,7 +133,7 @@ public class VMGuestMetrics extends XenAPIObject {
}
/**
- * unique identifier/object reference
+ * Unique identifier/object reference
*/
public String uuid;
/**
diff --git a/deps/XenServerJava/com/xensource/xenapi/VMMetrics.java b/deps/XenServerJava/com/xensource/xenapi/VMMetrics.java
index 3f36076ebe4..93d91cdd6ce 100644
--- a/deps/XenServerJava/com/xensource/xenapi/VMMetrics.java
+++ b/deps/XenServerJava/com/xensource/xenapi/VMMetrics.java
@@ -135,7 +135,7 @@ public class VMMetrics extends XenAPIObject {
}
/**
- * unique identifier/object reference
+ * Unique identifier/object reference
*/
public String uuid;
/**
diff --git a/deps/XenServerJava/com/xensource/xenapi/VMPP.java b/deps/XenServerJava/com/xensource/xenapi/VMPP.java
new file mode 100644
index 00000000000..1dc75a64b6f
--- /dev/null
+++ b/deps/XenServerJava/com/xensource/xenapi/VMPP.java
@@ -0,0 +1,1157 @@
+/*
+ * Copyright (c) 2006-2010 Citrix Systems, Inc.
+ *
+ * This library is free software; you can redistribute it and/or modify it
+ * under the terms of version 2 of the GNU General Public License as published
+ * by the Free Software Foundation, with the additional linking exception as
+ * follows:
+ *
+ * Linking this library statically or dynamically with other modules is
+ * making a combined work based on this library. Thus, the terms and
+ * conditions of the GNU General Public License cover the whole combination.
+ *
+ * As a special exception, the copyright holders of this library give you
+ * permission to link this library with independent modules to produce an
+ * executable, regardless of the license terms of these independent modules,
+ * and to copy and distribute the resulting executable under terms of your
+ * choice, provided that you also meet, for each linked independent module,
+ * the terms and conditions of the license of that module. An independent
+ * module is a module which is not derived from or based on this library. If
+ * you modify this library, you may extend this exception to your version of
+ * the library, but you are not obligated to do so. If you do not wish to do
+ * so, delete this exception statement from your version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+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 to this object.
+ */
+ protected final String ref;
+
+ /**
+ * For internal use only.
+ */
+ VMPP(String ref) {
+ this.ref = ref;
+ }
+
+ 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 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);
+ 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() : 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() : this.archiveTargetConfig);
+ map.put("archive_frequency", this.archiveFrequency == null ? Types.VmppArchiveFrequency.UNRECOGNIZED : this.archiveFrequency);
+ map.put("archive_schedule", this.archiveSchedule == null ? new HashMap() : 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() : this.VMs);
+ map.put("is_alarm_enabled", this.isAlarmEnabled == null ? false : this.isAlarmEnabled);
+ map.put("alarm_config", this.alarmConfig == null ? new HashMap() : this.alarmConfig);
+ map.put("recent_alerts", this.recentAlerts == null ? new LinkedHashSet() : this.recentAlerts);
+ return map;
+ }
+
+ /**
+ * Unique identifier/object reference
+ */
+ public String uuid;
+ /**
+ * a human-readable name
+ */
+ public String nameLabel;
+ /**
+ * a notes field containg 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 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 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 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 VMs;
+ /**
+ * true if alarm is enabled for this policy
+ */
+ public Boolean isAlarmEnabled;
+ /**
+ * configuration for the alarm
+ */
+ public Map alarmConfig;
+ /**
+ * recent alerts
+ */
+ public Set 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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
diff --git a/deps/XenServerJava/com/xensource/xenapi/VTPM.java b/deps/XenServerJava/com/xensource/xenapi/VTPM.java
index 97f0baec544..b77083255b8 100644
--- a/deps/XenServerJava/com/xensource/xenapi/VTPM.java
+++ b/deps/XenServerJava/com/xensource/xenapi/VTPM.java
@@ -117,7 +117,7 @@ public class VTPM extends XenAPIObject {
}
/**
- * unique identifier/object reference
+ * Unique identifier/object reference
*/
public String uuid;
/**
diff --git a/deps/XenServerJava/ws-commons-util-1.0.2.jar b/deps/XenServerJava/ws-commons-util-1.0.2.jar
deleted file mode 100644
index 3fc364e7f60..00000000000
Binary files a/deps/XenServerJava/ws-commons-util-1.0.2.jar and /dev/null differ
diff --git a/deps/XenServerJava/xenserver-5.6.0-1.jar b/deps/XenServerJava/xenserver-5.6.0-1.jar
deleted file mode 100644
index b6b5e79950a..00000000000
Binary files a/deps/XenServerJava/xenserver-5.6.0-1.jar and /dev/null differ
diff --git a/deps/XenServerJava/xmlrpc-client-3.1.jar b/deps/XenServerJava/xmlrpc-client-3.1.jar
deleted file mode 100644
index a76e6ec96dd..00000000000
Binary files a/deps/XenServerJava/xmlrpc-client-3.1.jar and /dev/null differ
diff --git a/deps/XenServerJava/xmlrpc-common-3.1.jar b/deps/XenServerJava/xmlrpc-common-3.1.jar
deleted file mode 100644
index 862098b10f1..00000000000
Binary files a/deps/XenServerJava/xmlrpc-common-3.1.jar and /dev/null differ
diff --git a/deps/cloud-xenserver-5.6.0-1.jar b/deps/cloud-xenserver-5.6.0-1.jar
deleted file mode 100644
index b6b5e79950a..00000000000
Binary files a/deps/cloud-xenserver-5.6.0-1.jar and /dev/null differ
diff --git a/deps/cloud-xenserver-5.6.100-1.jar b/deps/cloud-xenserver-5.6.100-1.jar
new file mode 100644
index 00000000000..e9e6fc53246
Binary files /dev/null and b/deps/cloud-xenserver-5.6.100-1.jar differ
diff --git a/server/.classpath b/server/.classpath
index fddc52a165d..b18c9660ffe 100644
--- a/server/.classpath
+++ b/server/.classpath
@@ -20,6 +20,6 @@
-
+
diff --git a/server/src/com/cloud/hypervisor/xen/discoverer/XcpServerDiscoverer.java b/server/src/com/cloud/hypervisor/xen/discoverer/XcpServerDiscoverer.java
index a1d30d5ff16..4d8739c5db9 100644
--- a/server/src/com/cloud/hypervisor/xen/discoverer/XcpServerDiscoverer.java
+++ b/server/src/com/cloud/hypervisor/xen/discoverer/XcpServerDiscoverer.java
@@ -134,10 +134,9 @@ public class XcpServerDiscoverer extends DiscovererBase implements Discoverer, L
}
String hostname = url.getHost();
InetAddress ia = InetAddress.getByName(hostname);
- String hostIp = ia.getHostAddress();
-
- conn = _connPool.masterConnect(hostIp, username, password);
-
+ String hostIp = ia.getHostAddress();
+ String masterIp = _connPool.getMasterIp(hostIp, username, password);
+ conn = _connPool.masterConnect(masterIp, username, password);
if (conn == null) {
String msg = "Unable to get a connection to " + url;
s_logger.debug(msg);
@@ -329,7 +328,7 @@ public class XcpServerDiscoverer extends DiscovererBase implements Discoverer, L
username = host.getDetail("username");
password = host.getDetail("password");
String address = host.getPrivateIpAddress();
- Connection hostConn = XenServerConnectionPool.slaveConnect(address, username, password);
+ Connection hostConn = _connPool.slaveConnect(address, username, password);
if (hostConn == null) {
continue;
}
@@ -356,7 +355,7 @@ public class XcpServerDiscoverer extends DiscovererBase implements Discoverer, L
throw new CloudRuntimeException("Unable to reach the pool master of the existing cluster");
}
- if( !XenServerConnectionPool.joinPool(conn, hostIp, masterIp, username, password) ){
+ if( !_connPool.joinPool(conn, hostIp, masterIp, username, password) ){
s_logger.warn("Unable to join the pool");
throw new DiscoveryException("Unable to join the pool");
}
diff --git a/server/src/com/cloud/migration/Db21to22MigrationUtil.java b/server/src/com/cloud/migration/Db21to22MigrationUtil.java
index 3216e28f3e3..d17ea91d83c 100644
--- a/server/src/com/cloud/migration/Db21to22MigrationUtil.java
+++ b/server/src/com/cloud/migration/Db21to22MigrationUtil.java
@@ -64,6 +64,7 @@ public class Db21to22MigrationUtil {
/* add guid in cluster table */
private void setupClusterGuid() {
+ XenServerConnectionPool _connPool = XenServerConnectionPool.getInstance();
List clusters = _clusterDao.listByHyTypeWithoutGuid(HypervisorType.XenServer.toString());
for (ClusterVO cluster : clusters) {
List hosts = _hostDao.listByCluster(cluster.getId());
@@ -75,7 +76,7 @@ public class Db21to22MigrationUtil {
|| password.isEmpty()) {
continue;
}
- Connection conn = XenServerConnectionPool.slaveConnect(ip, username, password);
+ Connection conn = _connPool.slaveConnect(ip, username, password);
if (conn == null)
continue;
Pool.Record pr = null;