khos2ow commented on a change in pull request #2412: CLOUDSTACK-9677: Adding storage policy support for swift as secondary? URL: https://github.com/apache/cloudstack/pull/2412#discussion_r163055953
########## File path: plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/XenServerStorageProcessor.java ########## @@ -914,20 +917,45 @@ public Answer copyVolumeFromPrimaryToSecondary(final CopyCommand cmd) { private boolean swiftUpload(final Connection conn, final SwiftTO swift, final String container, final String ldir, final String lfilename, final Boolean isISCSI, final int wait) { - String result = null; + + List<String> params = getSwiftParams(swift, container, ldir, lfilename, isISCSI); + try { - result = - hypervisorResource.callHostPluginAsync(conn, "swiftxenserver", "swift", wait, "op", "upload", "url", swift.getUrl(), "account", swift.getAccount(), "username", - swift.getUserName(), "key", swift.getKey(), "container", container, "ldir", ldir, "lfilename", lfilename, "isISCSI", isISCSI.toString()); - if (result != null && result.equals("true")) { - return true; - } + String result = hypervisorResource.callHostPluginAsync(conn, "swiftxenserver", "swift", wait, params.toArray(new String[params.size()])); + return "true".equals(result); Review comment: Of course. +1. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services