DaanHoogland commented on code in PR #13598:
URL: https://github.com/apache/cloudstack/pull/13598#discussion_r3613903960


##########
api/src/main/java/org/apache/cloudstack/api/command/admin/host/AddSecondaryStorageCmd.java:
##########
@@ -89,20 +88,15 @@ public long getEntityOwnerId() {
 
     @Override
     public void execute(){
-        try{
-            ImageStore result = _storageService.discoverImageStore(null, 
getUrl(), "NFS", getZoneId(), getDetails());
-            ImageStoreResponse storeResponse = null;
-            if (result != null ) {
-                    storeResponse = 
_responseGenerator.createImageStoreResponse(result);
-                    storeResponse.setResponseName(getCommandName());
-                    storeResponse.setObjectName("secondarystorage");
-                    setResponseObject(storeResponse);
-            } else {
-                throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, 
"Failed to add secondary storage");
-            }
-        } catch (DiscoveryException ex) {
-            logger.warn("Exception: ", ex);
-            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, 
ex.getMessage());
+        ImageStore result = _storageService.discoverImageStore(null, getUrl(), 
"NFS", getZoneId(), getDetails());
+        ImageStoreResponse storeResponse = null;
+        if (result != null ) {

Review Comment:
   not my style, but I’ll have to revisit anyway because of conflicts :/ later..



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to