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


##########
server/src/main/java/com/cloud/alert/SecondaryStorageVmAlertAdapter.java:
##########
@@ -59,92 +59,100 @@ public void onSSVMAlert(Object sender, 
SecStorageVmAlertEventArgs args) {
             throw new CloudRuntimeException("Invalid alert arguments, 
secStorageVm must be set");
         }
 
+        String secStorageVmHostName = "";
+        String secStorageVmPublicIpAddress = "";
+        String secStorageVmPrivateIpAddress = "N/A";
+        Long secStorageVmPodIdToDeployIn = null;
+
+        if (secStorageVm != null) {
+            secStorageVmHostName = secStorageVm.getHostName();
+            secStorageVmPublicIpAddress = secStorageVm.getPublicIpAddress();
+            secStorageVmPrivateIpAddress = secStorageVm.getPrivateIpAddress() 
== null ? "N/A" : secStorageVm.getPrivateIpAddress();
+            secStorageVmPodIdToDeployIn = secStorageVm.getPodIdToDeployIn();
+        }

Review Comment:
   @JoaoJandre , I am just bringing it to your attention. If you feel it isn't 
worth the trouble and you don't think it will be used more than considder my 
remark answerred.
   Just one more opiniated remark; I think it is worth even if it doesn´t save 
lines of code to unify it. It makes clear to the reader that the same is 
happening, as future readers will not see the two peaces at the same time as we 
do now. This can also be solved by a comment of course.



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