Examples of listAssignableLocations()


Examples of org.jclouds.blobstore.BlobStore.listAssignableLocations()

   protected Object doExecute() throws Exception {
      BlobStore blobStore = getBlobStore();

      Location location = null;
      if (!locationString.isEmpty()) {
         for (Location loc : blobStore.listAssignableLocations()) {
            if (loc.getId().equalsIgnoreCase(locationString)) {
               location = loc;
               break;
            }
         }
View Full Code Here

Examples of org.jclouds.blobstore.BlobStore.listAssignableLocations()

   @Override
   protected Object doExecute() throws Exception {
      BlobStore blobStore = getBlobStore();
      List<String> locationNames = Lists.newArrayList();

      for (Location loc : blobStore.listAssignableLocations()) {
          locationNames.add(loc.getId());
      }

      Collections.sort(locationNames);
      for (String locationName : locationNames) {
View Full Code Here

Examples of org.jclouds.blobstore.BlobStore.listAssignableLocations()

      // Try to create the same bucket successfully created above in one of the non-US regions to ensure an error is
      // encountered as expected.
      Location location = null;

      for (Location pLocation : store.listAssignableLocations()) {
         if (!ImmutableSet.of(Region.US_STANDARD, Region.US_EAST_1, Region.US_WEST_1, Region.US_WEST_2)
            .contains(pLocation.getId())) {
            location = pLocation;
            break;
         }
View Full Code Here

Examples of org.jclouds.blobstore.BlobStore.listAssignableLocations()

      // Try to create the same bucket successfully created above in one of the non-US regions to ensure an error is
      // encountered as expected.
      Location location = null;

      for (Location pLocation : store.listAssignableLocations()) {
         if (!ImmutableSet.of(Region.US_STANDARD, Region.US_EAST_1, Region.US_WEST_1, Region.US_WEST_2)
            .contains(pLocation.getId())) {
            location = pLocation;
            break;
         }
View Full Code Here

Examples of org.jclouds.blobstore.BlobStore.listAssignableLocations()

        Map<HttpRequest, HttpResponse> requestResponseMap = ImmutableMap.<HttpRequest, HttpResponse> builder().put(
                 keystoneAuthWithUsernameAndPassword, responseWithKeystoneAccess).build();

        BlobStore clientWhenLocationsExist = requestsSendResponses(requestResponseMap);

        Set<? extends Location> locations = clientWhenLocationsExist.listAssignableLocations();
        assertNotNull(locations);
        assertEquals(locations.size(), 1);
        assertEquals(locations.iterator().next().getId(), "region-a.geo-1");
    }
}
View Full Code Here

Examples of org.jclouds.blobstore.BlobStore.listAssignableLocations()

      // Try to create the same bucket successfully created above in one of the non-US regions to ensure an error is
      // encountered as expected.
      Location location = null;

      for (Location pLocation : store.listAssignableLocations()) {
         if (!ImmutableSet.of(Region.US_STANDARD, Region.US_EAST_1, Region.US_WEST_1, Region.US_WEST_2)
            .contains(pLocation.getId())) {
            location = pLocation;
            break;
         }
View Full Code Here

Examples of org.jclouds.blobstore.BlobStore.listAssignableLocations()

   protected Object doExecute() throws Exception {
      BlobStore blobStore = getBlobStore();

      Location location = null;
      if (!locationString.isEmpty()) {
         for (Location loc : blobStore.listAssignableLocations()) {
            if (loc.getId().equalsIgnoreCase(locationString)) {
               location = loc;
               break;
            }
         }
View Full Code Here

Examples of org.jclouds.blobstore.BlobStore.listAssignableLocations()

   @Override
   protected Object doExecute() throws Exception {
      BlobStore blobStore = getBlobStore();
      List<String> locationNames = Lists.newArrayList();

      for (Location loc : blobStore.listAssignableLocations()) {
          locationNames.add(loc.getId());
      }

      Collections.sort(locationNames);
      for (String locationName : locationNames) {
View Full Code Here

Examples of org.jclouds.blobstore.BlobStore.listAssignableLocations()

      // Try to create the same bucket successfully created above in one of the non-US regions to ensure an error is
      // encountered as expected.
      Location location = null;

      for (Location pLocation : store.listAssignableLocations()) {
         if (!ImmutableSet.of(Region.US_STANDARD, Region.US_EAST_1, Region.US_WEST_1, Region.US_WEST_2)
            .contains(pLocation.getId())) {
            location = pLocation;
            break;
         }
View Full Code Here

Examples of org.jclouds.blobstore.BlobStore.listAssignableLocations()

        Map<HttpRequest, HttpResponse> requestResponseMap = ImmutableMap.<HttpRequest, HttpResponse> builder().put(
                 keystoneAuthWithUsernameAndPassword, responseWithKeystoneAccess).build();

        BlobStore clientWhenLocationsExist = requestsSendResponses(requestResponseMap);

        Set<? extends Location> locations = clientWhenLocationsExist.listAssignableLocations();
        assertNotNull(locations);
        assertEquals(locations.size(), 1);
        assertEquals(locations.iterator().next().getId(), "region-a.geo-1");
    }
}
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.