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


##########
engine/schema/src/main/java/com/cloud/upgrade/SystemVmTemplateRegistration.java:
##########
@@ -141,6 +146,14 @@ public SystemVmTemplateRegistration(String 
systemVmTemplateVersion) {
         this.systemVmTemplateVersion = systemVmTemplateVersion;
     }
 
+    public static String getMountCommand(String nfsVersion, String device, 
String dir) {
+        String cmd = "sudo mount -t nfs";
+        if (StringUtils.isNotBlank(nfsVersion)) {
+            cmd = String.format("%s -o vers=%s", cmd, nfsVersion);
+        }
+        return String.format("%s %s %s", cmd, device, dir);
+    }
+

Review Comment:
   this looks like a good generic method for creating the mount command, but it 
is in `SystemVmTemplateRegistration`. Does it make sense to move it to a 
utility and search for other places to use this, @shwstppr ? (some 
deduplication may be resulting)



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