Package com.vmware.bdd.spectypes

Examples of com.vmware.bdd.spectypes.DiskSpec


      index = 0;
      List<DiskSpec> disks = new ArrayList<DiskSpec>();
      for (int i = 0; i < length - 1; i++) {
         if (allocation[i] != 0) {
            DiskSpec subDisk = new DiskSpec(separable);
            subDisk.setSize(allocation[i]);
            subDisk.setSeparable(false);
            subDisk.setTargetDs(datastores.get(i).getName());
            // new name with index as suffix, e.g., DATA1.vmdk
            subDisk.setName(separable.getName().split("\\.")[0] + index
                  + ".vmdk");

            disks.add(subDisk);
            datastores.get(i).allocate(allocation[i]);
            index++;
View Full Code Here


         if (remain > ds.getFreeSpace()) {
            size = ds.getFreeSpace();
         }
         remain -= size;

         DiskSpec subDisk = new DiskSpec(separable);
         subDisk.setSize(size);
         subDisk.setSeparable(false);
         subDisk.setTargetDs(ds.getName());
         // new name with index as suffix, e.g., DATA1.vmdk
         subDisk.setName(separable.getName().split("\\.")[0] + index + ".vmdk");

         disks.add(subDisk);
         ds.allocate(size);
         index++;
         if (remain == 0)
View Full Code Here

         List<DiskSpec> removed = new ArrayList<DiskSpec>();
         for (DiskSpec disk : node.getDisks()) {
            if (disk.getSplitPolicy() != null
                  && DiskSplitPolicy.BI_SECTOR.equals(disk.getSplitPolicy())) {
               int half = disk.getSize() / 2;
               unseparable.add(new DiskSpec(disk.getName().split("\\.")[0]
                     + "0.vmdk", half, node.getVmName(), false, disk
                     .getDiskType(), disk.getController(), null, disk
                     .getAllocType(), null, null, null));
               unseparable.add(new DiskSpec(disk.getName().split("\\.")[0]
                     + "1.vmdk", disk.getSize() - half, node.getVmName(),
                     false, disk.getDiskType(), disk.getController(), null,
                     disk.getAllocType(), null, null, null));
               removed.add(disk);
            }
View Full Code Here

TOP

Related Classes of com.vmware.bdd.spectypes.DiskSpec

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.