You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by Ali Bazlamit <no...@github.com> on 2018/05/07 16:05:07 UTC

Re: [jclouds/jclouds-labs] JCLOUDS-1386 1&1 Baremetal servers (#431)

alibazlamit commented on this pull request.



> -               SingleServerAppliance appliance = api.serverApplianceApi().get(image.getId());
-               if (appliance.minHddSize() > volume.getSize()) {
-                  minHddSize = appliance.minHddSize();
-               }
-            }
-            Hdd.CreateHdd hdd = Hdd.CreateHdd.create(minHddSize, volume.isBootDevice());
-            hdds.add(hdd);
-         } catch (Exception ex) {
-            throw Throwables.propagate(ex);
-
+      String imageId = image.getId();
+      Hardware hardwareModel = generateHardwareRequest.isFlavor(hardware.getId());
+      boolean isBaremetal = hardware.getName() == null ? false : hardware.getName().contains(baremetalModelsKey);
+      ServerAppliance workingImage = null;
+
+      //choose the correct image based on the server type baremetal or cloud

Some of the images are of Type ISO and type Image, the ones that are of type ISO are basically an installation of the Linux system and not needed here, this function makes sure to choose the correct boot-able image based on the image from the template at hand

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/431#discussion_r186468957