> +
> + Console.Type type = (Console.Type) postParams.get("type");
> +
> + switch (type) {
> + case NOVNC:
> + case XVPVNC:
> + action = "os-getVNCConsole";
> + break;
> + case SPICE_HTML5:
> + action = "os-getSPICEConsole";
> + break;
> + case RDP_HTML5:
> + action = "os-getRDPConsole";
> + break;
> + default:
> + throw new IllegalArgumentException("Invalid type: " + type);
> If at this point the type returned from openstack is not valid, then maybe we
> should throw some exception which
> could be IAE since from a little search I did, I haven't found something more
> appropriate.
That sounds better than somehow silently ignoring it. But in general I don't
think we program defensively for "broken" server responses - if the server
returns unexpected things, jclouds may indeed break. See comment for
`fromValue` below.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/339/files#r13103748