Examples of BlockDeviceMapping


Examples of org.jclouds.ec2.domain.BlockDeviceMapping

      assertEquals(options.buildFormParameters().get("BlockDeviceMapping"), ImmutableList.of());
   }

   @Test
   public void testWithBlockDeviceMappingStatic() {
      BlockDeviceMapping mapping = new BlockDeviceMapping.MapNewVolumeToDevice("/dev/sda1", 120, true, null, null, false);
      RunInstancesOptions options = withBlockDeviceMappings(ImmutableSet
               .<BlockDeviceMapping> of(mapping));
      assertEquals(options.buildFormParameters().get("BlockDeviceMapping.1.DeviceName"),
               ImmutableList.of("/dev/sda1"));
      assertEquals(options.buildFormParameters().get("BlockDeviceMapping.1.Ebs.VolumeSize"),
View Full Code Here

Examples of org.jclouds.openstack.nova.v2_0.domain.BlockDeviceMapping


      NovaApi apiWithNewServer = requestsSendResponses(keystoneAuthWithUsernameAndPasswordAndTenantName,
            responseWithKeystoneAccess, createServer, createServerResponse);

      BlockDeviceMapping blockDeviceMapping = BlockDeviceMapping.builder()
            .uuid("f0c907a5-a26b-48ba-b803-83f6b7450ba5").sourceType("image").destinationType("volume")
            .volumeSize(100).build();

      assertEquals(apiWithNewServer.getServerApi("az-1.region-a.geo-1").create("test-e92", "",
               "12345", new CreateServerOptions().blockDeviceMappings(ImmutableSet.of(blockDeviceMapping))).toString(),
View Full Code Here

Examples of org.jclouds.openstack.nova.v2_0.domain.BlockDeviceMapping

      HttpResponse createServerResponse = HttpResponse.builder().statusCode(404).build();

      NovaApi apiWithNewServer = requestsSendResponses(keystoneAuthWithUsernameAndPasswordAndTenantName,
            responseWithKeystoneAccess, createServer, createServerResponse);

      BlockDeviceMapping blockDeviceMapping = BlockDeviceMapping.builder()
            .uuid("f0c907a5-a26b-48ba-b803-83f6b7450ba5").sourceType("image")
            .destinationType("volume").volumeSize(100).build();

      try {
         apiWithNewServer.getServerApi("az-1.region-a.geo-1").create("test-e92", "", "12345", new CreateServerOptions().blockDeviceMappings(ImmutableSet.of(blockDeviceMapping)));
View Full Code Here

Examples of org.jclouds.openstack.nova.v2_0.domain.BlockDeviceMapping

         ExtensionApi extensionApi = api.getExtensionApi(regionId);

         // check for the existence of the block mapping v2 boot extension
         if (extensionApi.get("os-block-device-mapping-v2-boot") != null) {
            try {
               BlockDeviceMapping blockDeviceMappings = BlockDeviceMapping.builder()
                     .uuid(imageRef).sourceType("image").destinationType("volume")
                     .volumeSize(100).bootIndex(0).build();

               CreateServerOptions options = CreateServerOptions.Builder
                     .blockDeviceMappings(ImmutableSet.of(blockDeviceMappings));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.