Package com.vmware.aurora.composition

Examples of com.vmware.aurora.composition.DiskSchema


      logger.info(total + " VMs are successfully created.");
      return success;
   }

   private void setPersistentDiskMode(BaseNode vNode) {
      DiskSchema diskSchema = vNode.getVmSchema().diskSchema;
      if (diskSchema.getDisks() != null) {
         for (Disk disk : diskSchema.getDisks()) {
            disk.mode = DiskMode.persistent;
         }
      }
   }
View Full Code Here


      return networkAdds;
   }

   private VmSchema createVmSchema() {
      VmSchema vmSchema = new VmSchema();
      vmSchema.diskSchema = new DiskSchema();
      vmSchema.networkSchema = new NetworkSchema();
      vmSchema.networkSchema.networks = new ArrayList<Network>();
      vmSchema.resourceSchema = new ResourceSchema();
      return vmSchema;
   }
View Full Code Here

            tmDisk.type = disk.getDiskType().getType();
            tmDisks.add(tmDisk);
         }
      }

      DiskSchema diskSchema = new DiskSchema();
      diskSchema.setName("Disk Schema");
      diskSchema.setDisks(tmDisks);
      this.vmSchema.diskSchema = diskSchema;
   }
View Full Code Here

      resourceSchema.priority =
            com.vmware.aurora.interfaces.model.IDatabaseConfig.Priority.Normal;
      schema.resourceSchema = resourceSchema;

      // prepare disk schema
      DiskSchema diskSchema = new DiskSchema();
      ArrayList<Disk> disks = new ArrayList<Disk>(diskSet.size());
      for (DiskSpec disk : diskSet) {
         Disk tmDisk = new Disk();
         tmDisk.name = disk.getName();
         tmDisk.type = disk.getDiskType().getType();
         tmDisk.initialSizeMB = disk.getSize() * 1024;
         if (disk.getAllocType() != null && !disk.getAllocType().isEmpty())
            tmDisk.allocationType =
                  AllocationType.valueOf(disk.getAllocType().toUpperCase());
         else
            tmDisk.allocationType = null;
         tmDisk.datastore = disk.getTargetDs();
         tmDisk.externalAddress = disk.getExternalAddress();
         tmDisk.vmdkPath = disk.getVmdkPath();
         tmDisk.mode = DiskMode.valueOf(disk.getDiskMode());
         disks.add(tmDisk);
      }
      diskSchema.setParent(templateVmId);
      diskSchema.setParentSnap(templateVmSnapId);
      diskSchema.setDisks(disks);
      schema.diskSchema = diskSchema;

      // prepare network schema

      ArrayList<Network> networks = new ArrayList<Network>();
View Full Code Here

TOP

Related Classes of com.vmware.aurora.composition.DiskSchema

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.