Examples of EbsBlockDevice


Examples of com.amazonaws.services.ec2.model.EbsBlockDevice

        {
            registerImageRequest = registerImageRequest.
                    withBlockDeviceMappings(
                            new BlockDeviceMapping().
                                    withDeviceName(rootDeviceName.get()).
                                    withEbs(new EbsBlockDevice().
                                            withSnapshotId(testSnapshot.get().getSnapshotId())),
                            new BlockDeviceMapping().
                                    withDeviceName("/dev/sda2").
                                    withVirtualName("ephemeral0"),
                            new BlockDeviceMapping().
                                    withDeviceName("/dev/sda3").
                                    withVirtualName("ephemeral1"));
        }
        else
        {
            registerImageRequest = registerImageRequest.
                    withBlockDeviceMappings(
                            new BlockDeviceMapping().
                                    withDeviceName(rootDeviceName.get()).
                                    withEbs(new EbsBlockDevice().
                                            withSnapshotId(testSnapshot.get().getSnapshotId())),
                            new BlockDeviceMapping().
                                    withDeviceName("/dev/sdb").
                                    withVirtualName("ephemeral0"),
                            new BlockDeviceMapping().
View Full Code Here

Examples of com.amazonaws.services.ec2.model.EbsBlockDevice

        // Create the block device mapping to describe the root partition.
        BlockDeviceMapping blockDeviceMapping = new BlockDeviceMapping();
        blockDeviceMapping.setDeviceName("/dev/sda1");

        // Set the delete on termination flag to false.
        EbsBlockDevice ebs = new EbsBlockDevice();
        ebs.setDeleteOnTermination(Boolean.FALSE);
        blockDeviceMapping.setEbs(ebs);

        // Add the block device mapping to the block list.
        ArrayList<BlockDeviceMapping> blockList = new ArrayList<BlockDeviceMapping>();
        blockList.add(blockDeviceMapping);
View Full Code Here

Examples of com.amazonaws.services.ec2.model.EbsBlockDevice

            // Create the block device mapping to describe the root partition.
            BlockDeviceMapping blockDeviceMapping = new BlockDeviceMapping();
            blockDeviceMapping.setDeviceName("/dev/sda1");

            // Set the delete on termination flag to false.
            EbsBlockDevice ebs = new EbsBlockDevice();
            ebs.setDeleteOnTermination(Boolean.FALSE);
            blockDeviceMapping.setEbs(ebs);

            // Add the block device mapping to the block list.
            ArrayList<BlockDeviceMapping> blockList = new ArrayList<BlockDeviceMapping>();
            blockList.add(blockDeviceMapping);
View Full Code Here

Examples of com.amazonaws.services.ec2.model.EbsBlockDevice

        List<BlockDeviceMapping> blockDeviceMappings = Lists.newArrayList();
        if (blockDevices != null && blockDevices.size() > 0) {
            for (BlockDevice device : blockDevices) {
                blockDeviceMappings.add(new BlockDeviceMapping()
                    .withDeviceName(device.getName())
                    .withEbs(new EbsBlockDevice()
                        .withVolumeSize(device.getSize())
                        .withDeleteOnTermination(true)
                    ));
            }
        }
View Full Code Here

Examples of com.amazonaws.services.ec2.model.EbsBlockDevice

        {
            registerImageRequest = registerImageRequest.
                    withBlockDeviceMappings(
                            new BlockDeviceMapping().
                                    withDeviceName(rootDeviceName.get()).
                                    withEbs(new EbsBlockDevice().
                                            withSnapshotId(testSnapshot.get().getSnapshotId())),
                            new BlockDeviceMapping().
                                    withDeviceName("/dev/sda2").
                                    withVirtualName("ephemeral0"),
                            new BlockDeviceMapping().
                                    withDeviceName("/dev/sda3").
                                    withVirtualName("ephemeral1"));
        }
        else
        {
            registerImageRequest = registerImageRequest.
                    withBlockDeviceMappings(
                            new BlockDeviceMapping().
                                    withDeviceName(rootDeviceName.get()).
                                    withEbs(new EbsBlockDevice().
                                            withSnapshotId(testSnapshot.get().getSnapshotId())),
                            new BlockDeviceMapping().
                                    withDeviceName("/dev/sdb").
                                    withVirtualName("ephemeral0"),
                            new BlockDeviceMapping().
View Full Code Here

Examples of com.amazonaws.services.ec2.model.EbsBlockDevice

      /** tag image devices */
      for (final BlockDeviceMapping blockDevice : image
          .getBlockDeviceMappings()) {

        final EbsBlockDevice elasticDevice = blockDevice.getEbs();

        if (elasticDevice == null) {
          continue;
        }

        final String snapshotId = elasticDevice.getSnapshotId();

        if (snapshotId == null) {
          continue;
        }

View Full Code Here

Examples of com.amazonaws.services.ec2.model.EbsBlockDevice

    imageUnregister(imageId);

    for (final BlockDeviceMapping blockDevice : image
        .getBlockDeviceMappings()) {

      final EbsBlockDevice elasticDevice = blockDevice.getEbs();

      if (elasticDevice == null) {
        continue;
      }

      final String snapshotId = elasticDevice.getSnapshotId();

      if (snapshotId == null) {
        continue;
      }
View Full Code Here

Examples of com.amazonaws.services.ec2.model.EbsBlockDevice

    private void refreshSnapshotToAMIs() {
        snapshotToAMIs.clear();
        for (Image image : getAWSClient().describeImages()) {
            for (BlockDeviceMapping bdm : image.getBlockDeviceMappings()) {
                EbsBlockDevice ebd = bdm.getEbs();
                if (ebd != null && ebd.getSnapshotId() != null) {
                    LOGGER.debug(String.format("Snapshot %s is used to generate AMI %s",
                            ebd.getSnapshotId(), image.getImageId()));
                    Collection<String> amis = snapshotToAMIs.get(ebd.getSnapshotId());
                    if (amis == null) {
                        amis = new ArrayList<String>();
                        snapshotToAMIs.put(ebd.getSnapshotId(), amis);
                    }
                    amis.add(image.getImageId());
                }
            }
        }
View Full Code Here

Examples of com.amazonaws.services.ec2.model.EbsBlockDevice

    imageUnregister(imageId);

    for (final BlockDeviceMapping blockDevice : image
        .getBlockDeviceMappings()) {

      final EbsBlockDevice elasticDevice = blockDevice.getEbs();

      if (elasticDevice == null) {
        continue;
      }

      final String snapshotId = elasticDevice.getSnapshotId();

      if (snapshotId == null) {
        continue;
      }
View Full Code Here

Examples of com.amazonaws.services.ec2.model.EbsBlockDevice

      /** tag image devices */
      for (final BlockDeviceMapping blockDevice : image
          .getBlockDeviceMappings()) {

        final EbsBlockDevice elasticDevice = blockDevice.getEbs();

        if (elasticDevice == null) {
          continue;
        }

        final String snapshotId = elasticDevice.getSnapshotId();

        if (snapshotId == null) {
          continue;
        }

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.