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

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


   }

   private void createSnapshot(Volume volume) throws TimeoutException {
      System.out.println("Create Snapshot");

      CreateSnapshotOptions options = CreateSnapshotOptions.Builder
            .name(Constants.NAME)
            .description("Snapshot of " + volume.getId());

      Snapshot snapshot = snapshotApi.create(volume.getId(), options);
View Full Code Here


                  .payload(payloadFromResourceWithContentType("/snapshot_create.json", MediaType.APPLICATION_JSON))
                  .build(),
            HttpResponse.builder().statusCode(200).payload(payloadFromResource("/snapshot_create_response.json")).build()
      ).getSnapshotApiForZone("RegionOne");
     
      CreateSnapshotOptions options = CreateSnapshotOptions.Builder
            .name("jclouds-test-snapshot")
            .description("jclouds test snapshot")
            .force();

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

                  .payload(payloadFromResourceWithContentType("/snapshot_create.json", MediaType.APPLICATION_JSON))
                  .build(),
            HttpResponse.builder().statusCode(404).build()
      ).getSnapshotApiForZone("RegionOne");
     
      CreateSnapshotOptions options = CreateSnapshotOptions.Builder
            .name("jclouds-test-snapshot")
            .description("jclouds test snapshot")
            .force();

      api.create("ea6f70ef-2784-40b9-9d14-d7f33c507c3f", options);
View Full Code Here

      super.tearDown();
   }

   public void testCreateVolume() {
      CreateVolumeOptions options = CreateVolumeOptions.Builder
            .name(name)
            .description("description of test volume")
            .availabilityZone(zone);
      testVolume = volumeApi.create(100, options);
     
View Full Code Here

                  .payload(payloadFromResourceWithContentType("/volume_create.json", MediaType.APPLICATION_JSON))
                  .build(),
            HttpResponse.builder().statusCode(200).payload(payloadFromResource("/volume_create_response.json")).build()
      ).getVolumeApiForZone("RegionOne");

      CreateVolumeOptions options = CreateVolumeOptions.Builder
            .name("jclouds-test-volume")
            .description("description of test volume");
      Volume volume = api.create(1, options);
      assertEquals(volume, testVolumeCreate());
   }
View Full Code Here

                  .payload(payloadFromResourceWithContentType("/volume_create.json", MediaType.APPLICATION_JSON))
               .build(),
            HttpResponse.builder().statusCode(404).payload(payloadFromResource("/volume_create_response.json")).build()
      ).getVolumeApiForZone("RegionOne");

      CreateVolumeOptions options = CreateVolumeOptions.Builder
            .name("jclouds-test-volume")
            .description("description of test volume");
      api.create(1, options);
   }
View Full Code Here

      return nodeMetadata;
   }

   private Volume createVolume() throws TimeoutException {
      CreateVolumeOptions options = CreateVolumeOptions.Builder
            .name(Constants.NAME)
            .metadata(ImmutableMap.<String, String> of("key1", "value1"));

      System.out.println("Create Volume");
View Full Code Here

      return null;
    }
   
    RestContext<NovaApi, NovaAsyncApi> nova = context.unwrap();
        VolumeAttachmentApi api = nova.getApi().getVolumeAttachmentExtensionForZone(region).get();
        VolumeAttachment attachment = api.attachVolumeToServerAsDevice(volumeId, instanceId, device);
       
        if (attachment == null) {
      log.fatal("Volume [id]: "+volumeId+" attachment for instance [id]: "+instanceId
          +" was unsuccessful. [region] : " + region
          + " of Iaas : " + iaasInfo);
View Full Code Here

      ).getVolumeAttachmentExtensionForZone("az-1.region-a.geo-1").get();

      Set<? extends VolumeAttachment> attachments = api.listAttachmentsOnServer("instance-1").toSet();
      assertEquals(attachments, ImmutableSet.of(testAttachment()));
      // double-check individual fields
      VolumeAttachment attachment = Iterables.getOnlyElement(attachments);
      assertEquals(attachment.getDevice(), "/dev/vdc");
      assertEquals(attachment.getServerId(), "b4785058-cb80-491b-baa3-e4ee6546450e");
      assertEquals(attachment.getId(), "1");
      assertEquals(attachment.getVolumeId(), "1");
   }
View Full Code Here

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

      VolumeAttachment attachment = api.getAttachmentForVolumeOnServer("1", "instance-1");
      assertEquals(attachment, testAttachment());
   }
View Full Code Here

TOP

Related Classes of org.jclouds.openstack.cinder.v1.domain.VolumeAttachment$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.