> +                     VersionsJsonResponse versions = 
> json.fromJson(Strings2.toStringAndClose(response), 
> VersionsJsonResponse.class);
> +                     for (VersionsJsonResponse.Version version : 
> versions.versions) {
> +                        if (apiVersion.equals(version.id)) {
> +                           URI versionedEndpointUri = new 
> URI(version.links.get(0).href);
> +                           return new URI(baseEndpointUri.getScheme(), 
> versionedEndpointUri.getUserInfo(),
> +                              versionedEndpointUri.getHost(), 
> versionedEndpointUri.getPort(),
> +                              versionedEndpointUri.getPath(), 
> versionedEndpointUri.getQuery(),
> +                              versionedEndpointUri.getFragment());
> +                        }
> +                     }
> +                  } catch (URISyntaxException ex) {
> +                     throw Throwables.propagate(ex);
> +                  } catch (IOException ex) {
> +                     throw Throwables.propagate(ex);
> +                  }
> +                  throw new HttpException("Glance endpoint does not support 
> API version: " + apiVersion);

Thanks for the pointer @nacx . @demobox : From that list I think 
UnsupportedOperationException makes the most sense, any opinion on that?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/82/files#r11175623

Reply via email to