jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ali Bazlamit <notificati...@github.com>
Subject Re: [jclouds/jclouds-labs] JCLOUDS-1386 1&1 Baremetal servers (#431)
Date Thu, 29 Mar 2018 15:23:25 GMT
alibazlamit commented on this pull request.



> -            //check if the bootable device has enough size to run the appliance(image).
-            float minHddSize = volume.getSize();
-            if (volume.isBootDevice()) {
-               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();
+      HardwareFlavour hardwareModel = isFlavor(hardware.getId());
+      boolean isBaremetal = hardware.getName() == null ? false : hardware.getName().contains(baremetalModelsKey);

My intention was to allow the users to just pass in the flavor name i.e. `BMC_XL` or `XL`
as a `hardwareId` to choose between baremetal and cloud servers.

Maybe the `OneandoneTemplateOptions` would be an overkill since the only thing users will
need to provide is the different hardware flavor name which can be achieved using the `public
TemplateBuilder hardwareId(String string);` from the `TeamplateBuilder` class

-- 
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_r178092281
Mime
View raw message