> + AutomaticHardwareIdSpec spec = new AutomaticHardwareIdSpec();
> + String hardwareSpec = hardwareId.substring(10);
> + Map<String, String> specValues = Splitter.on(';')
> + .trimResults()
> + .omitEmptyStrings()
> + .withKeyValueSeparator('=')
> + .split(hardwareSpec);
> + if (!specValues.containsKey("ram") ||
> !specValues.containsKey("cores")) {
> + throw new IllegalArgumentException(String.format("Omitted keys on
> hardwareId: %s", hardwareId));
> + }
> + spec.ram = Integer.parseInt(specValues.get("ram"));
> + spec.cores = Double.parseDouble(specValues.get("cores"));
> + return spec;
> + }
> +
> + public static AutomaticHardwareIdSpec
> AutomaticHardwareIdSpecBuilder(Double cores, int ram) {
Also, method names should start with a lower case letter.
---
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/pull/984/files/24d1c709310ffe7e511e13c203f2d7f0d4709d37#r71836068