trevorflanagan commented on this pull request.
> +@Singleton
+public class DatacenterToLocation implements Function<Datacenter, Location> {
+
+ private final JustProvider justProvider;
+
+ @Inject
+ public DatacenterToLocation(JustProvider justProvider) {
+ this.justProvider = checkNotNull(justProvider, "justProvider");
+ }
+
+ @Override
+ public Location apply(final Datacenter datacenter) {
+ return new
LocationBuilder().id(datacenter.id()).description(datacenter.displayName())
+
.parent(getOnlyElement(justProvider.get())).scope(LocationScope.ZONE)
+ .iso3166Codes(ImmutableSet.<String>of()).metadata(
+ ImmutableMap.<String, Object>of("name",
datacenter.displayName(), "city", datacenter.city(), "state",
Completed as part of
https://github.com/jclouds/jclouds-labs/commit/5c97ea450e870f6bd185ebd99a5e8d3b4f6ea771#diff-d18f26a9949f71dac02cb82caad2dd10
--
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/423#discussion_r182977306