Examples of listAssignableLocations()


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

        Map<HttpRequest, HttpResponse> requestResponseMap = ImmutableMap.<HttpRequest, HttpResponse> builder().put(
                 keystoneAuthWithAccessKeyAndSecretKey, 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.compute.ComputeService.listAssignableLocations()

              .put(LIST_MACHINE_TYPES_REQUEST, LIST_MACHINE_TYPES_RESPONSE)
              .build();

      ComputeService apiWhenServersExist = requestsSendResponses(requestResponseMap);

      Set<? extends Location> locations = apiWhenServersExist.listAssignableLocations();

      assertNotNull(locations);
      assertEquals(locations.size(), 2);
      assertEquals(locations.iterator().next().getId(), "us-central1-a");
View Full Code Here

Examples of org.jclouds.compute.ComputeService.listAssignableLocations()

            .put(extensionsOfNovaRequest, extensionsOfNovaResponse).put(listDetail, listDetailResponse)
            .put(listServers, listServersResponse).put(listFlavorsDetail, listFlavorsDetailResponse).build();

      ComputeService apiWhenServersExist = requestsSendResponses(requestResponseMap);

      Set<? extends Location> locations = apiWhenServersExist.listAssignableLocations();
      assertNotNull(locations);
      assertEquals(locations.size(), 1);
      assertEquals(locations.iterator().next().getId(), "az-1.region-a.geo-1");

      assertNotNull(apiWhenServersExist.listNodes());
View Full Code Here

Examples of org.jclouds.compute.ComputeService.listAssignableLocations()

              .put(LIST_CENTRAL1B_MACHINE_TYPES_REQUEST, LIST_CENTRAL1B_MACHINE_TYPES_RESPONSE)
              .build();

      ComputeService apiWhenServersExist = requestsSendResponses(requestResponseMap);

      Set<? extends Location> locations = apiWhenServersExist.listAssignableLocations();

      assertNotNull(locations);
      assertEquals(locations.size(), 2);
      assertEquals(locations.iterator().next().getId(), "us-central1-a");
View Full Code Here

Examples of org.jclouds.compute.ComputeService.listAssignableLocations()

   @Test
   void testToLocation() {
      assertNull(ToLocation.INSTANCE.apply(null));
      ComputeService compute = getCompute();
      Set<Location> locationSet = ImmutableSet.<Location>builder()
                                              .addAll(transform(compute.listAssignableLocations(), ToLocation.INSTANCE))
                                              .build();
      assertFalse(locationSet.isEmpty());

      for (Location representation : locationSet) {
         assertNotNull(representation.getId());
View Full Code Here

Examples of org.jclouds.compute.ComputeService.listAssignableLocations()

              .put(LIST_CENTRAL1B_MACHINE_TYPES_REQUEST, LIST_CENTRAL1B_MACHINE_TYPES_RESPONSE)
              .build();

      ComputeService apiWhenServersExist = requestsSendResponses(requestResponseMap);

      Set<? extends Location> locations = apiWhenServersExist.listAssignableLocations();

      assertNotNull(locations);
      assertEquals(locations.size(), 2);
      assertEquals(locations.iterator().next().getId(), "us-central1-a");
View Full Code Here

Examples of org.jclouds.compute.ComputeService.listAssignableLocations()

            .put(extensionsOfNovaRequest, extensionsOfNovaResponse).put(listDetail, listDetailResponse)
            .put(listServers, listServersResponse).put(listFlavorsDetail, listFlavorsDetailResponse).build();

      ComputeService apiWhenServersExist = requestsSendResponses(requestResponseMap);

      Set<? extends Location> locations = apiWhenServersExist.listAssignableLocations();
      assertNotNull(locations);
      assertEquals(locations.size(), 1);
      assertEquals(locations.iterator().next().getId(), "az-1.region-a.geo-1");

      assertNotNull(apiWhenServersExist.listNodes());
View Full Code Here

Examples of org.jclouds.compute.ComputeService.listAssignableLocations()

              .put(LIST_CENTRAL1B_MACHINE_TYPES_REQUEST, LIST_CENTRAL1B_MACHINE_TYPES_RESPONSE)
              .build();

      ComputeService apiWhenServersExist = requestsSendResponses(requestResponseMap);

      Set<? extends Location> locations = apiWhenServersExist.listAssignableLocations();

      assertNotNull(locations);
      assertEquals(locations.size(), 2);
      assertEquals(locations.iterator().next().getId(), "us-central1-a");
View Full Code Here

Examples of org.jclouds.compute.ComputeService.listAssignableLocations()

            .put(extensionsOfNovaRequest, extensionsOfNovaResponse).put(listDetail, listDetailResponse)
            .put(listServers, listServersResponse).put(listFlavorsDetail, listFlavorsDetailResponse).build();

      ComputeService apiWhenServersExist = requestsSendResponses(requestResponseMap);

      Set<? extends Location> locations = apiWhenServersExist.listAssignableLocations();
      assertNotNull(locations);
      assertEquals(locations.size(), 1);
      assertEquals(locations.iterator().next().getId(), "az-1.region-a.geo-1");

      assertNotNull(apiWhenServersExist.listNodes());
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.