public ModifyStoragePoolCommand(boolean add, StoragePool pool, String localPath) { this.add = add; this.pool = new StorageFilerTO(pool); this.localPath = localPath; }
@Override public int compare(final DiskTO arg0, final DiskTO arg1) { return arg0.getDiskSeq() > arg1.getDiskSeq() ? 1 : -1; } });
@Override public int compare(NicTO arg0, NicTO arg1) { if (arg0.getDeviceId() < arg1.getDeviceId()) { return -1; } else if (arg0.getDeviceId() == arg1.getDeviceId()) { return 0; } return 1; } });
public DestroyCommand(StoragePool pool, Volume volume, String vmName) { this.volume = new VolumeTO(volume, pool); this.vmName = vmName; }
private String generateAutoScaleVmGroupIdentifier(final LoadBalancerTO lbTO) { return lbTO.getSrcIp() + "-" + lbTO.getSrcPort(); }
public String getPoolUuid() { return pool.getUuid(); }
protected boolean isBroadcastTypeVlanOrVxlan(final NicTO nic) { return nic != null && (nic.getBroadcastType() == Networks.BroadcastDomainType.Vlan || nic.getBroadcastType() == Networks.BroadcastDomainType.Vxlan); }
protected double getVmSpeed(VirtualMachineTO to) { return to.getMaxSpeed() != null ? to.getMaxSpeed() : to.getSpeed(); }
public ScaleVmCommand(String vmName, int cpus, Integer minSpeed, Integer maxSpeed, long minRam, long maxRam, boolean limitCpuUse) { super(); this.vmName = vmName; this.cpus = cpus; this.minSpeed = minSpeed; this.maxSpeed = maxSpeed; this.minRam = minRam; this.maxRam = maxRam; this.vm = new VirtualMachineTO(1L, vmName, null, cpus, minSpeed, maxSpeed, minRam, maxRam, null, null, false, limitCpuUse, null); /*vm.setName(vmName); vm.setCpus(cpus); vm.setRam(minRam, maxRam);*/ }
private String generateAutoScaleServiceGroupName(final LoadBalancerTO lbTO) { /* * ServiceGroup name in NetScaler wont support long names. Providing special name. * Need for introducing uuid because every vmgroup creation should be distinguished. * Ex. (1) create a vm group, delete a vmgroup, create a vmgroup on same lb ip and port * This will reuse all vms from the original vm group in step (1) */ return "Cloud" + lbTO.getAutoScaleVmGroupTO().getUuid().replace("-", ""); }
public String getNetworkUuid() { return super.getUuid(); }
public void setNetworkUuid(String uuid) { super.setUuid(uuid); }
public ManageSnapshotCommand(long snapshotId, String volumePath, StoragePool pool, String preSnapshotPath, String snapshotName, String vmName) { _commandSwitch = ManageSnapshotCommand.CREATE_SNAPSHOT; _volumePath = volumePath; _pool = new StorageFilerTO(pool); _snapshotPath = preSnapshotPath; _snapshotName = snapshotName; _snapshotId = snapshotId; _vmName = vmName; }
public DeleteStoragePoolCommand(StoragePool pool, String localPath) { _pool = new StorageFilerTO(pool); _localPath = localPath; }
public MigrateVolumeCommand(long volumeId, String volumePath, StoragePool sourcePool, StoragePool targetPool) { this(volumeId,volumePath,targetPool, null, Volume.Type.UNKNOWN, -1); this.sourcePool = new StorageFilerTO(sourcePool); }
public CreateCommand(DiskProfile diskCharacteristics, StoragePool pool, boolean executeInSequence) { this(diskCharacteristics, new StorageFilerTO(pool), executeInSequence); this.executeInSequence = executeInSequence; }
public void setPool(StoragePool pool) { this.pool = new StorageFilerTO(pool); }
public void setPool(StoragePool pool) { _pool = new StorageFilerTO(pool); }
public CreateCommand(DiskProfile diskCharacteristics, String templateUrl, StoragePool pool, boolean executeInSequence) { this(diskCharacteristics, templateUrl, new StorageFilerTO(pool), executeInSequence); }