cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e...@apache.org
Subject [11/11] git commit: updated refs/heads/master to 96ad6f6
Date Wed, 01 Jul 2015 13:05:28 GMT
CLOUDSTACK-8590 - Refactoring NiciraNVP resource

   - Change the retry() method to return Answer.createUnsupportedCommandAnswer(command) instead
of throwing an exception

Signed-off-by: wilderrodrigues <wrodrigues@schubergphilis.com>

This closes #546


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/96ad6f6c
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/96ad6f6c
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/96ad6f6c

Branch: refs/heads/master
Commit: 96ad6f6ccd0c18561172ef2e1cbcde28291a6df7
Parents: c601330
Author: wilderrodrigues <wrodrigues@schubergphilis.com>
Authored: Tue Jun 30 12:35:43 2015 +0200
Committer: wilderrodrigues <wrodrigues@schubergphilis.com>
Committed: Wed Jul 1 15:04:58 2015 +0200

----------------------------------------------------------------------
 .../src/com/cloud/network/utils/CommandRetryUtility.java       | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/96ad6f6c/plugins/network-elements/nicira-nvp/src/com/cloud/network/utils/CommandRetryUtility.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/utils/CommandRetryUtility.java
b/plugins/network-elements/nicira-nvp/src/com/cloud/network/utils/CommandRetryUtility.java
index 4969db8..92c198a 100644
--- a/plugins/network-elements/nicira-nvp/src/com/cloud/network/utils/CommandRetryUtility.java
+++ b/plugins/network-elements/nicira-nvp/src/com/cloud/network/utils/CommandRetryUtility.java
@@ -27,13 +27,11 @@ import org.apache.log4j.Logger;
 
 import com.cloud.agent.api.Answer;
 import com.cloud.agent.api.Command;
-import com.cloud.network.resource.NiciraNvpResource;
 import com.cloud.resource.ServerResource;
-import com.cloud.utils.exception.CloudRuntimeException;
 
 public class CommandRetryUtility {
 
-    private static final Logger s_logger = Logger.getLogger(NiciraNvpResource.class);
+    private static final Logger s_logger = Logger.getLogger(CommandRetryUtility.class);
 
     private static final int ZERO = 0;
     private static CommandRetryUtility instance;
@@ -85,7 +83,7 @@ public class CommandRetryUtility {
             final Constructor<? extends Answer> answerConstructor = answerClass.getConstructor(Command.class,
Exception.class);
             return answerConstructor.newInstance(command, error);
         } catch (NoSuchMethodException | SecurityException | InstantiationException | IllegalAccessException
| IllegalArgumentException | InvocationTargetException e) {
-            throw new CloudRuntimeException(e);
+            return Answer.createUnsupportedCommandAnswer(command);
         }
     }
 }
\ No newline at end of file


Mime
View raw message