Package org.jclouds.cloudstack.domain

Examples of org.jclouds.cloudstack.domain.Snapshot


         checkSnapshot(found);
      }
   }

   public void testGetSnapshotNonexistantId() {
      Snapshot found = client.getSnapshotClient().getSnapshot("foo");
      assertNull(found);
   }
View Full Code Here


   public void testCreateSnapshotFromVolume() {
      final Volume volume = getPreferredVolume()//fail fast if none
      logger.info("creating snapshot from volume %s", volume);
      AsyncCreateResponse job = client.getSnapshotClient().createSnapshot(volume.getId());
      assertTrue(jobComplete.apply(job.getJobId()));
      Snapshot snapshot = findSnapshotWithId(job.getId());
      logger.info("created snapshot %s from volume %s", snapshot, volume);
      checkSnapshot(snapshot);
      client.getSnapshotClient().deleteSnapshot(snapshot.getId());
   }
View Full Code Here

      for (String id : snapshotIds) {
         Set<Snapshot> found = client.getSnapshotApi().listSnapshots(ListSnapshotsOptions.Builder.id(id));
         assertNotNull(found);
         assertEquals(1, found.size());
         Snapshot snapshot = Iterables.getOnlyElement(found);
         assertEquals(id, snapshot.getId());
         checkSnapshot(snapshot);
      }
   }
View Full Code Here

      });
      assertNotNull(snapshotIds);
      assertFalse(Iterables.isEmpty(snapshotIds));

      for (String id : snapshotIds) {
         Snapshot found = client.getSnapshotApi().getSnapshot(id);
         assertNotNull(found);
         assertEquals(id, found.getId());
         checkSnapshot(found);
      }
   }
View Full Code Here

         checkSnapshot(found);
      }
   }

   public void testGetSnapshotNonexistantId() {
      Snapshot found = client.getSnapshotApi().getSnapshot("foo");
      assertNull(found);
   }
View Full Code Here

   public void testCreateSnapshotFromVolume() {
      final Volume volume = getPreferredVolume()//fail fast if none
      logger.info("creating snapshot from volume %s", volume);
      AsyncCreateResponse job = client.getSnapshotApi().createSnapshot(volume.getId());
      assertTrue(jobComplete.apply(job.getJobId()));
      Snapshot snapshot = findSnapshotWithId(job.getId());
      logger.info("created snapshot %s from volume %s", snapshot, volume);
      checkSnapshot(snapshot);
      client.getSnapshotApi().deleteSnapshot(snapshot.getId());
   }
View Full Code Here

TOP

Related Classes of org.jclouds.cloudstack.domain.Snapshot

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.