Package org.jclouds.openstack.cinder.v1.options

Examples of org.jclouds.openstack.cinder.v1.options.CreateSnapshotOptions$Builder


*/
@Test(groups = "unit", testName = "CloudBlockStorageUSProviderTest")
public class CloudBlockStorageUSProviderTest extends BaseProviderMetadataTest {

   public CloudBlockStorageUSProviderTest() {
      super(new CloudBlockStorageUSProviderMetadata(), new CinderApiMetadata());
   }
View Full Code Here


   public static class Builder extends BaseProviderMetadata.Builder {

      protected Builder(){
         id("rackspace-cloudblockstorage-us")
         .name("Rackspace Next Generation Cloud Block Storage US")
         .apiMetadata(new CinderApiMetadata().toBuilder()
                  .identityName("${userName}")
                  .credentialName("${apiKey}")
                  .defaultEndpoint("https://identity.api.rackspacecloud.com/v2.0/")
                  .endpointName("identity service url ending in /v2.0/")
                  .documentation(URI.create("http://docs.rackspace.com/cbs/api/v1.0/cbs-devguide/content/overview.html"))
View Full Code Here

   public static class Builder extends BaseProviderMetadata.Builder {

      protected Builder() {
         id("rackspace-cloudblockstorage-us")
         .name("Rackspace Next Generation Cloud Block Storage US")
         .apiMetadata(new CinderApiMetadata().toBuilder()
                  .identityName("${userName}")
                  .credentialName("${apiKey}")
                  .defaultEndpoint("https://identity.api.rackspacecloud.com/v2.0/")
                  .endpointName("identity service url ending in /v2.0/")
                  .documentation(URI.create("http://docs.rackspace.com/cbs/api/v1.0/cbs-devguide/content/overview.html"))
View Full Code Here

   public void testListSnapshots() {
      Set<? extends Snapshot> snapshots = snapshotApi.list().toSet();
      assertNotNull(snapshots);
      boolean foundIt = false;
      for (Snapshot snap : snapshots) {
         Snapshot details = snapshotApi.get(snap.getId());
         if (Objects.equal(snap.getVolumeId(), testVolume.getId())) {
            foundIt = true;
         }
         assertNotNull(details);
         assertEquals(details.getId(), snap.getId());
         assertEquals(details.getVolumeId(), snap.getVolumeId());
      }
      assertTrue(foundIt, "Failed to find the snapshot we previously created in listSnapshots() response");
   }
View Full Code Here

   public void testListSnapshotsInDetail() {
      Set<? extends Snapshot> snapshots = snapshotApi.listInDetail().toSet();
      assertNotNull(snapshots);
      boolean foundIt = false;
      for (Snapshot snap : snapshots) {
         Snapshot details = snapshotApi.get(snap.getId());
         if (Objects.equal(snap.getVolumeId(), testVolume.getId())) {
            foundIt = true;
            assertSame(details, testSnapshot);
         }
         assertSame(details, snap);
View Full Code Here

      Set<? extends Snapshot> snapshots = api.listInDetail().toSet();
      assertEquals(snapshots, ImmutableSet.of(testSnapshot()));

      // double-check individual fields
      Snapshot snappy = Iterables.getOnlyElement(snapshots);
      assertEquals(snappy.getId(), "67d03df1-ce5d-4ba7-adbe-492ceb80170b");
      assertEquals(snappy.getVolumeId(), "ea6f70ef-2784-40b9-9d14-d7f33c507c3f");
      assertEquals(snappy.getStatus(), Volume.Status.AVAILABLE);
      assertEquals(snappy.getDescription(), "jclouds test snapshot");
      assertEquals(snappy.getName(), "jclouds-test-snapshot");
      assertEquals(snappy.getSize(), 1);
   }
View Full Code Here

            responseWithKeystoneAccess,
            authenticatedGET().endpoint(endpoint).build(),
            HttpResponse.builder().statusCode(200).payload(payloadFromResource("/snapshot_get.json")).build()
      ).getSnapshotApiForZone("RegionOne");

      Snapshot snapshot = api.get("67d03df1-ce5d-4ba7-adbe-492ceb80170b");
      assertEquals(snapshot, testSnapshot());
   }
View Full Code Here

      CreateSnapshotOptions options = CreateSnapshotOptions.Builder
            .name("jclouds-test-snapshot")
            .description("jclouds test snapshot")
            .force();

      Snapshot snapshot = api.create("ea6f70ef-2784-40b9-9d14-d7f33c507c3f", options);
      assertEquals(snapshot, testSnapshotCreate());
   }
View Full Code Here

         if (status.equals(snapshot.getStatus())) {
            return true;
         }
         else {
            Snapshot snapshotUpdated = snapshotApi.get(snapshot.getId());
            checkNotNull(snapshotUpdated, "Snapshot %s not found.", snapshot.getId());
           
            return status.equals(snapshotUpdated.getStatus());
         }
      }
View Full Code Here

      Set<? extends Snapshot> snapshots = api.listInDetail().toSet();
      assertEquals(snapshots, ImmutableSet.of(testSnapshot()));

      // double-check individual fields
      Snapshot snappy = Iterables.getOnlyElement(snapshots);
      assertEquals(snappy.getId(), "67d03df1-ce5d-4ba7-adbe-492ceb80170b");
      assertEquals(snappy.getVolumeId(), "ea6f70ef-2784-40b9-9d14-d7f33c507c3f");
      assertEquals(snappy.getStatus(), Volume.Status.AVAILABLE);
      assertEquals(snappy.getDescription(), "jclouds test snapshot");
      assertEquals(snappy.getName(), "jclouds-test-snapshot");
      assertEquals(snappy.getSize(), 1);
   }
View Full Code Here

TOP

Related Classes of org.jclouds.openstack.cinder.v1.options.CreateSnapshotOptions$Builder

Copyright © 2018 www.massapicom. 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.