jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Phillips <notificati...@github.com>
Subject Re: [jclouds-labs-openstack] JCLOUDS-494: Change EndpointParam parser to negotiate version for Glance API (#82)
Date Tue, 18 Mar 2014 20:28:11 GMT
> +         public String status;
> +         public String id;
> +         public List<Link> links;
> +      }
> +      public List<Version> versions;
> +   }
> +
> +   private final Supplier<Map<String, Supplier<URI>>> zoneToEndpointSupplier;
> +   private final String apiVersion;
> +   private final LoadingCache<URI, URI> endpointCache;
> +
> +   @Inject
> +   public ZoneToEndpointNegotiateVersion(@Zone Supplier<Map<String, Supplier<URI>>>
zoneToEndpointSupplier,
> +         @ApiVersion String apiVersionString, final HttpClient client, final Json json)
{
> +      this.zoneToEndpointSupplier = checkNotNull(zoneToEndpointSupplier, "zoneToEndpointSupplier");
> +      if(!apiVersionString.startsWith("v"))

Why do we need this logic...backwards-compatibility? Can't we just enforce the fact that it
has to start with a "v"?

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