Package org.jclouds.domain

Examples of org.jclouds.domain.LocationBuilder.build()


               .iso3166Codes(iso3166Codes)
               .id(json.containsKey("id") ? json.getString("id") : null)
               .scope(json.containsKey("scope") ? LocationScope.valueOf(json.getString("scope")) : null)
               .metadata(metadata);

        return builder.build();
    }

    /**
     * Takes the inventory item already constructed in
     * {@link #createInventoryItem(com.streamreduce.core.model.Connection, net.sf.json.JSONObject)} and updates its
View Full Code Here


            LocationBuilder builder = new LocationBuilder();
            builder.id(outboundConfiguration.getDestination());
            builder.scope(LocationScope.REGION);
            builder.description(outboundConfiguration.getDestination());

            location = builder.build();
        }

        s3BlobStore.createContainerInLocation(location ,bucketName); //defaults to us-standard if location is null
        return bucketName;
    }
View Full Code Here

        try {
            lb.id(Region.EU_WEST_1)
              .scope(LocationScope.REGION)
              .description("Superfluous description to appease jclouds.");

            store.createContainerInLocation(lb.build(), bucketName);

            for (StorageMetadata sm : store.list()) {
                if (sm.getName().equals(bucketName)) {
                    bucket = sm;
                    break;
View Full Code Here

      for (String region : regions) {
         LocationBuilder builder = new LocationBuilder().scope(LocationScope.REGION).id(region).description(region)
                  .parent(provider);
         if (isoCodesById.containsKey(region))
            builder.iso3166Codes(isoCodesById.get(region).get());
         locations.add(builder.build());
      }
      return locations.build();
   }

}
View Full Code Here

         // regions may be added dynamically, and we prefer to inherit an
         // empty set of codes from a region, then a provider, whose code
         // are likely hard-coded.
         else if (parent.getScope() == LocationScope.REGION)
            builder.iso3166Codes(parent.getIso3166Codes());
         locations.add(builder.build());
      }
      return locations.build();
   }

   private Map<String, Location> setParentOfZoneToRegionOrProvider(Set<String> zoneIds,
View Full Code Here

      for (String zoneId : zoneIds) {
         LocationBuilder builder = new LocationBuilder().scope(LocationScope.ZONE).id(zoneId).description(zoneId)
                  .parent(provider);
         if (isoCodesById.containsKey(zoneId))
            builder.iso3166Codes(isoCodesById.get(zoneId).get());
         locations.add(builder.build());
      }
      return locations.build();
   }

}
View Full Code Here

         for (String region : regions) {
            LocationBuilder builder = new LocationBuilder().scope(LocationScope.REGION).id(region).description(region)
                     .parent(provider);
            if (isoCodesById.containsKey(region))
               builder.iso3166Codes(isoCodesById.get(region).get());
            locations.add(builder.build());
         }
      return locations.build();
   }

}
View Full Code Here

      LocationBuilder builder = new LocationBuilder().scope(LocationScope.ZONE).id(from.getId() + "").description(
               from.getDescription()).parent(provider);
      Map<String, Supplier<Set<String>>> isoCodesById = isoCodesByIdSupplier.get();
      if (isoCodesById.containsKey(from.getId() + ""))
         builder.iso3166Codes(isoCodesById.get(from.getId() + "").get());
      return builder.build();
   }
}
View Full Code Here

      for (ReferenceType org : orgNameToResource.get().values()) {
         LocationBuilder builder = new LocationBuilder().scope(LocationScope.REGION).id(org.getHref().toASCIIString())
                  .description(org.getName()).parent(provider);
         if (isoCodesById.containsKey(org.getHref().toASCIIString()))
            builder.iso3166Codes(isoCodesById.get(org.getHref().toASCIIString()).get());
         Location orgL = builder.build();
         for (ReferenceType vdc : orgNameToVDCResource.get().get(org.getName()).getVDCs().values()) {
            builder = new LocationBuilder().scope(LocationScope.ZONE).id(vdc.getHref().toASCIIString()).description(
                     vdc.getName()).parent(orgL);
            if (isoCodesById.containsKey(vdc.getHref().toASCIIString()))
               builder.iso3166Codes(isoCodesById.get(vdc.getHref().toASCIIString()).get());
View Full Code Here

         for (ReferenceType vdc : orgNameToVDCResource.get().get(org.getName()).getVDCs().values()) {
            builder = new LocationBuilder().scope(LocationScope.ZONE).id(vdc.getHref().toASCIIString()).description(
                     vdc.getName()).parent(orgL);
            if (isoCodesById.containsKey(vdc.getHref().toASCIIString()))
               builder.iso3166Codes(isoCodesById.get(vdc.getHref().toASCIIString()).get());
            locations.add(builder.build());
         }
      }
      return locations;
   }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.