Package org.jclouds.openstack.cinder.v1.domain

Examples of org.jclouds.openstack.cinder.v1.domain.VolumeAttachment


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

      Volume volume = api.get("60761c60-0f56-4499-b522-ff13e120af10");
      assertEquals(volume, testVolume());
      // double-check equals()
      assertEquals(volume.getName(), "test");
      assertEquals(volume.getZone(), "nova");
      assertEquals(volume.getStatus(), Volume.Status.IN_USE);
      assertEquals(volume.getDescription(), "This is a test volume");
      assertEquals(Iterables.getOnlyElement(volume.getAttachments()), testAttachment());
   }
View Full Code Here


        
         if (status.equals(volume.getStatus())) {
            return true;
         }
         else {
            Volume volumeUpdated = volumeApi.get(volume.getId());
            checkNotNull(volumeUpdated, "Volume %s not found.", volume.getId());
           
            return status.equals(volumeUpdated.getStatus());
         }
      }
View Full Code Here

        
         if (status.equals(volume.getStatus())) {
            return true;
         }
         else {
            Volume volumeUpdated = volumeApi.get(volume.getId());
            checkNotNull(volumeUpdated, "Volume %s not found.", volume.getId());
           
            return status.equals(volumeUpdated.getStatus());
         }
      }
View Full Code Here

   public static void main(String[] args) {
      DeleteVolume deleteVolume = new DeleteVolume();

      try {
         deleteVolume.init(args);
         Volume volume = deleteVolume.getVolume();
         deleteVolume.deleteVolume(volume);
      }
      catch (Exception e) {
         e.printStackTrace();
      }
View Full Code Here

      CreateVolumeAndAttach createVolumeAndAttach = new CreateVolumeAndAttach();

      try {
         createVolumeAndAttach.init(args);
         NodeMetadata node = createVolumeAndAttach.createServer();
         Volume volume = createVolumeAndAttach.createVolume();
         createVolumeAndAttach.attachVolume(volume, node);
         createVolumeAndAttach.mountVolume(node);
      }
      catch (Exception e) {
         e.printStackTrace();
View Full Code Here

            .metadata(ImmutableMap.<String, String> of("key1", "value1"));

      System.out.println("Create Volume");

      // 100 GB is the minimum volume size on the Rackspace Cloud
      Volume volume = volumeApi.create(100, options);

      // Wait for the volume to become Available before moving on
      // If you want to know what's happening during the polling, enable logging. See
      // /jclouds-example/rackspace/src/main/java/org/jclouds/examples/rackspace/Logging.java
      if (!VolumePredicates.awaitAvailable(volumeApi).apply(volume)) {
View Full Code Here

   public static void main(String[] args) {
      CreateSnapshot createSnapshot = new CreateSnapshot();

      try {
         createSnapshot.init(args);
         Volume volume = createSnapshot.getVolume();
         createSnapshot.createSnapshot(volume);
      }
      catch (Exception e) {
         e.printStackTrace();
      }
View Full Code Here

        
         if (status.equals(volume.getStatus())) {
            return true;
         }
         else {
            Volume volumeUpdated = volumeApi.get(volume.getId());
            checkNotNull(volumeUpdated, "Volume %s not found.", volume.getId());
           
            return status.equals(volumeUpdated.getStatus());
         }
      }
View Full Code Here

      String zone = Iterables.getFirst(api.getConfiguredZones(), "nova");
      quotaApi = api.getQuotaApi(zone);
   }

   public void testGetStorageQuotas() throws ExecutionException, InterruptedException {
      VolumeQuota volumeQuota = quotaApi.getByTenant("demo");

      assertTrue(volumeQuota.getGigabytes() >= 0);
      assertTrue(volumeQuota.getVolumes() >= 0);
      assertTrue(volumeQuota.getSnapshots() >= 0);
   }
View Full Code Here

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

      VolumeType type = api.get("1");
      assertEquals(type, testVolumeType());
   }
View Full Code Here

TOP

Related Classes of org.jclouds.openstack.cinder.v1.domain.VolumeAttachment

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.