> + private Integer ram;
> +
> + public static boolean isAutomaticId(String id) {
> + return id.startsWith("automatic:");
> + }
> +
> + public static AutomaticHardwareIdSpec parseId(String hardwareId) {
> + 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));
Give feedback about what is missing.
---
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#r71835996