nacx commented on this pull request.
> @@ -40,6 +51,16 @@
@ConfiguresHttpApi
public class DimensionDataCloudControlHttpApiModule extends
HttpApiModule<DimensionDataCloudControlApi> {
+ @Override
+ protected void installLocations() {
+ super.installLocations();
+
bind(RegionIdToURISupplier.class).to(RegionsToApiEndpoints.class).in(Scopes.SINGLETON);
+
bind(ZoneIdsSupplier.class).to(ZoneIdsFromRegionIdToZoneIdsValues.class).in(Scopes.SINGLETON);
+
bind(RegionIdsSupplier.class).to(RegionIdsFromRegionIdToURIKeySet.class).in(Scopes.SINGLETON);
Remove this binding, as it is the one causing the circular dependency.
The `RegionsToApiEndpoints` supplier that provides the endpoint for each region
uses the `@Region Supplier<Set<String>>` (the `RegionIdsSupplier`). but with
this binding it was being configured to get the regions from the `Map<String,
Supplier<URI>>` generated by the `RegionIdToURISupplier`, thus the circular
dependency.
The default implementation of the `RegionIdsSupplier` just populates the list
of regions based on the value of the `jclouds.regions` property, which is what
we want here, so removing the binding should leave all good and the regions
properly configured.
--
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-labs/pull/433#pullrequestreview-111891587