Package org.jclouds.openstack.nova.v2_0.domain

Examples of org.jclouds.openstack.nova.v2_0.domain.VolumeSnapshot$ConcreteBuilder


      if (volumeOption.isPresent()) {
         Set<? extends VolumeSnapshot> snapshots = volumeOption.get().listSnapshotsInDetail().toSet();
         assertNotNull(snapshots);
         boolean foundIt = false;
         for (VolumeSnapshot snap : snapshots) {
            VolumeSnapshot details = volumeOption.get().getSnapshot(snap.getId());
            if (Objects.equal(snap.getVolumeId(), testVolume.getId())) {
               foundIt = true;
               assertSame(details, testSnapshot);
            }
            assertSame(details, snap);
View Full Code Here


            responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,
            authenticatedGET().endpoint(endpoint).build(),
            HttpResponse.builder().statusCode(200).payload(payloadFromResource("/snapshot_details.json")).build()
      ).getVolumeExtensionForZone("az-1.region-a.geo-1").get();

      VolumeSnapshot snapshot = api.getSnapshot("1");
      assertEquals(snapshot, testSnapshot());
   }
View Full Code Here

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

      // double-check individual fields
      VolumeSnapshot snappy = Iterables.getOnlyElement(snapshots);
      assertEquals(snappy.getId(), "7");
      assertEquals(snappy.getVolumeId(), "9");
      assertEquals(snappy.getStatus(), Volume.Status.AVAILABLE);
      assertEquals(snappy.getDescription(), "jclouds live test snapshot");
      assertEquals(snappy.getName(), "jclouds-live-test");
      assertEquals(snappy.getSize(), 1);
   }
View Full Code Here

                  .payload(payloadFromStringWithContentType("{\"snapshot\":{\"display_name\":\"jclouds-live-test\",\"volume_id\":\"13\",\"display_description\":\"jclouds live test snapshot\",\"force\":\"true\"}}", MediaType.APPLICATION_JSON))
                  .build(),
            HttpResponse.builder().statusCode(200).payload(payloadFromResource("/snapshot_details.json")).build()
      ).getVolumeExtensionForZone("az-1.region-a.geo-1").get();

      VolumeSnapshot snapshot = api.createSnapshot("13", CreateVolumeSnapshotOptions.Builder.name("jclouds-live-test").description("jclouds live test snapshot").force());
      assertEquals(snapshot, testSnapshot());
   }
View Full Code Here

      if (volumeOption.isPresent()) {
         Set<? extends VolumeSnapshot> snapshots = volumeOption.get().listSnapshots().toSet();
         assertNotNull(snapshots);
         boolean foundIt = false;
         for (VolumeSnapshot snap : snapshots) {
            VolumeSnapshot details = volumeOption.get().getSnapshot(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

      if (volumeOption.isPresent()) {
         Set<? extends VolumeSnapshot> snapshots = volumeOption.get().listSnapshotsInDetail().toSet();
         assertNotNull(snapshots);
         boolean foundIt = false;
         for (VolumeSnapshot snap : snapshots) {
            VolumeSnapshot details = volumeOption.get().getSnapshot(snap.getId());
            if (Objects.equal(snap.getVolumeId(), testVolume.getId())) {
               foundIt = true;
               assertSame(details, testSnapshot);
            }
            assertSame(details, snap);
View Full Code Here

            responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,
            authenticatedGET().endpoint(endpoint).build(),
            HttpResponse.builder().statusCode(200).payload(payloadFromResource("/snapshot_details.json")).build()
      ).getVolumeExtensionForZone("az-1.region-a.geo-1").get();

      VolumeSnapshot snapshot = api.getSnapshot("1");
      assertEquals(snapshot, testSnapshot());
   }
View Full Code Here

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

      // double-check individual fields
      VolumeSnapshot snappy = Iterables.getOnlyElement(snapshots);
      assertEquals(snappy.getId(), "7");
      assertEquals(snappy.getVolumeId(), "9");
      assertEquals(snappy.getStatus(), Volume.Status.AVAILABLE);
      assertEquals(snappy.getDescription(), "jclouds live test snapshot");
      assertEquals(snappy.getName(), "jclouds-live-test");
      assertEquals(snappy.getSize(), 1);
   }
View Full Code Here

                  .payload(payloadFromStringWithContentType("{\"snapshot\":{\"display_name\":\"jclouds-live-test\",\"volume_id\":\"13\",\"display_description\":\"jclouds live test snapshot\",\"force\":\"true\"}}", MediaType.APPLICATION_JSON))
                  .build(),
            HttpResponse.builder().statusCode(200).payload(payloadFromResource("/snapshot_details.json")).build()
      ).getVolumeExtensionForZone("az-1.region-a.geo-1").get();

      VolumeSnapshot snapshot = api.createSnapshot("13", CreateVolumeSnapshotOptions.Builder.name("jclouds-live-test").description("jclouds live test snapshot").force());
      assertEquals(snapshot, testSnapshot());
   }
View Full Code Here

      if (volumeOption.isPresent()) {
         Set<? extends VolumeSnapshot> snapshots = volumeOption.get().listSnapshots().toSet();
         assertNotNull(snapshots);
         boolean foundIt = false;
         for (VolumeSnapshot snap : snapshots) {
            VolumeSnapshot details = volumeOption.get().getSnapshot(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

TOP

Related Classes of org.jclouds.openstack.nova.v2_0.domain.VolumeSnapshot$ConcreteBuilder

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.