cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [cloudstack] nvazquez commented on a change in pull request #3575: [WIP DO NOT MERGE] Health check feature for virtual router
Date Mon, 25 Nov 2019 14:05:32 GMT
nvazquez commented on a change in pull request #3575: [WIP DO NOT MERGE] Health check feature
for virtual router
URL: https://github.com/apache/cloudstack/pull/3575#discussion_r350201475
 
 

 ##########
 File path: core/src/main/java/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResource.java
 ##########
 @@ -268,6 +267,53 @@ private CheckS2SVpnConnectionsAnswer execute(CheckS2SVpnConnectionsCommand
cmd)
         return new CheckS2SVpnConnectionsAnswer(cmd, result.isSuccess(), result.getDetails());
     }
 
+    private GetRouterMonitorResultsAnswer execute(GetRouterMonitorResultsCommand cmd) {
+
+        String routerIp = cmd.getAccessDetail(NetworkElementCommand.ROUTER_IP);
+        String args = cmd.shouldPerformFreshChecks() ? "true" : "false";
+        s_logger.debug("Fetching health check result for " + routerIp + " and executing fresh
checks: " + args);
+        ExecutionResult result = _vrDeployer.executeInVR(routerIp, VRScripts.ROUTER_MONITOR_RESULTS,
args);
+        if (result.isSuccess()) {
+            List<String> failingChecks = new ArrayList<>();
+            StringBuilder monitorResults = new StringBuilder();
+            if (!result.getDetails().isEmpty()) {
+                String[] lines = result.getDetails().trim().split("\n");
 
 Review comment:
   To increase readability, can you split this big method into multiple methods?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message