cloudstack-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CLOUDSTACK-9677) Swift Storage Policy support for Secondary Storage
Date Fri, 19 Jan 2018 13:07:00 GMT

    [ https://issues.apache.org/jira/browse/CLOUDSTACK-9677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16332226#comment-16332226
] 

ASF GitHub Bot commented on CLOUDSTACK-9677:
--------------------------------------------

rafaelweingartner 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_r162615113
 
 

 ##########
 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:
   what about using `org.apache.commons.lang3.BooleanUtils.toBoolean(String)` here?

----------------------------------------------------------------
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:
users@infra.apache.org


> Swift Storage Policy support for Secondary Storage
> --------------------------------------------------
>
>                 Key: CLOUDSTACK-9677
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9677
>             Project: CloudStack
>          Issue Type: Improvement
>      Security Level: Public(Anyone can view this level - this is the default.) 
>            Reporter: Patrick D.
>            Assignee: Patrick D.
>            Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message