/**
   * Undeploys the virtual appliance.
   *
   * <p>This method will start the undeploy of all the virtual machines in the virtual appliance,
   * and will return an {@link AsyncTask} reference for each undeploy operation. The undeploy will
   * finish when all individual tasks finish.
   *
   * @param forceUndeploy Boolean flag to force the undeploy even if the virtual appliance contains
   *     imported virtual machines.
   * @return The list of tasks corresponding to the undeploy process of each virtual machine in the
   *     appliance.
   */
  public AsyncTask[] undeploy(final boolean forceUndeploy) {
    VirtualMachineTaskDto force = new VirtualMachineTaskDto();
    force.setForceUndeploy(forceUndeploy);

    AcceptedRequestDto<String> response =
        context.getApi().getCloudApi().undeployVirtualAppliance(unwrap(), force);

    return getTasks(response);
  }
示例#2
0
 public static VirtualMachineTaskDto undeployOptions() {
   VirtualMachineTaskDto deploy = new VirtualMachineTaskDto();
   deploy.setForceUndeploy(true);
   return deploy;
 }
示例#3
0
 public static VirtualMachineTaskDto deployOptions() {
   VirtualMachineTaskDto deploy = new VirtualMachineTaskDto();
   deploy.setForceEnterpriseSoftLimits(false);
   return deploy;
 }