- 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.
This commit is contained in:
John Burwell 2013-08-01 01:41:24 -04:00
parent c92cb4f3d0
commit 6ec9a44429
2 changed files with 11 additions and 2 deletions

View File

@ -7407,9 +7407,13 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
final List<String> 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()]));

View File

@ -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<String> 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()]));