From af631c3e0e0e0eaa09558dba5302014cd798c6ef Mon Sep 17 00:00:00 2001 From: John Burwell Date: Thu, 1 Aug 2013 01:41:24 -0400 Subject: [PATCH] - CLOUDSTACK-3229: Works around Introspector bug that does not recognize Boolean typed accessor methods by manualy populating the https value. A generic implementation will be investigated when time permits. --- .../cloud/hypervisor/xen/resource/CitrixResourceBase.java | 6 +++++- .../hypervisor/xen/resource/XenServerStorageProcessor.java | 7 ++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java index 5bdf88e0b70..f22a8621b82 100644 --- a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java +++ b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java @@ -7443,9 +7443,13 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe final List parameters = newArrayList(flattenProperties(s3, S3Utils.ClientOptions.class)); + // https workaround for Introspector bug that does not + // recognize Boolean accessor methods ... parameters.addAll(Arrays.asList("operation", "put", "directory", dir, "filename", filename, "iSCSIFlag", - iSCSIFlag.toString(), "bucket", s3.getBucketName(), "key", key)); + iSCSIFlag.toString(), "bucket", s3.getBucketName(), + "key", key, "https", s3.isHttps() != null ? s3.isHttps().toString() + : "null")); final String result = callHostPluginAsync(connection, "s3xen", "s3", wait, parameters.toArray(new String[parameters.size()])); diff --git a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServerStorageProcessor.java b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServerStorageProcessor.java index 9cd0b33b532..91909521332 100644 --- a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServerStorageProcessor.java +++ b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServerStorageProcessor.java @@ -68,6 +68,7 @@ import org.apache.cloudstack.storage.to.PrimaryDataStoreTO; import org.apache.cloudstack.storage.to.SnapshotObjectTO; import org.apache.cloudstack.storage.to.TemplateObjectTO; import org.apache.cloudstack.storage.to.VolumeObjectTO; +import org.apache.cloudstack.storage.to.VolumeObjectTO; import org.apache.log4j.Logger; import org.apache.xmlrpc.XmlRpcException; @@ -1076,9 +1077,13 @@ public class XenServerStorageProcessor implements StorageProcessor { final List parameters = newArrayList(flattenProperties(s3, S3Utils.ClientOptions.class)); + // https workaround for Introspector bug that does not + // recognize Boolean accessor methods ... parameters.addAll(Arrays.asList("operation", "put", "directory", dir, "filename", filename, "iSCSIFlag", - iSCSIFlag.toString(), "bucket", s3.getBucketName(), "key", key)); + iSCSIFlag.toString(), "bucket", s3.getBucketName(), + "key", key, "https", s3.isHttps() != null ? s3.isHttps().toString() + : "null")); final String result = hypervisorResource.callHostPluginAsync(connection, "s3xen", "s3", wait, parameters.toArray(new String[parameters.size()]));