nvazquez commented on a change in pull request #4907:
URL: https://github.com/apache/cloudstack/pull/4907#discussion_r618532691
##########
File path:
plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java
##########
@@ -2075,8 +2047,17 @@ protected StartAnswer execute(StartCommand cmd) {
//
// Setup ROOT/DATA disk devices
//
+ if (Arrays.stream(sortedDisks).filter(disk -> disk.getType() ==
Volume.Type.ISO).count() > 1 && deployAsIs) {
Review comment:
What about creating a method for this condition and improve readability?
Something like:
```
if (deployAsIs && multipleIsosAtached(sortedDisks)) { .. }
```
##########
File path:
plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java
##########
@@ -2075,8 +2047,17 @@ protected StartAnswer execute(StartCommand cmd) {
//
// Setup ROOT/DATA disk devices
//
+ if (Arrays.stream(sortedDisks).filter(disk -> disk.getType() ==
Volume.Type.ISO).count() > 1 && deployAsIs) {
+ sortedDisks = Arrays.stream(sortedDisks).filter(vol ->
((vol.getPath() != null &&
Review comment:
Looks good but could also be extracted to a method and be tested with
unit tests to increase understanding
--
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:
[email protected]