/** Used by other methods to add a custom {@link Task} object. */ private static Task task( String taskId, String name, String description, String status, String operation, String operationName, String startTime) { Task task = Task.builder() .error(Error.builder().build()) .org(Reference.builder().build()) .owner(Reference.builder().build()) .user(Reference.builder().build()) .params(null) .progress(0) .status(status) .operation(operation) .operationName(operationName) .startTime(dateService.iso8601DateParse(startTime)) .endTime(null) .expiryTime(null) .tasks(Sets.<Task>newLinkedHashSet()) .description(description) .name(name) .id("urn:vcloud:" + taskId) .href(URI.create(endpoint + "/task/" + taskId)) .links(Sets.<Link>newLinkedHashSet()) .build(); return task; }
public static Task rebootTask() { return Task.builder() .id("urn:vcloud:task:5bc25a1b-79cb-4904-b53f-4ca09088e434") .name("task") .href( URI.create( "https://vcloudbeta.bluelock.com/api/task/5bc25a1b-79cb-4904-b53f-4ca09088e434")) .link( Link.builder() .rel(Link.Rel.TASK_CANCEL) .href( URI.create( "https://vcloudbeta.bluelock.com/api/task/5bc25a1b-79cb-4904-b53f-4ca09088e434/action/cancel")) .build()) .org( Reference.builder() .href( URI.create( "https://vcloudbeta.bluelock.com/api/org/4559b367-8af2-4ee1-8429-a0d39e7df3de")) .name("jclouds") .type(VCloudDirectorMediaType.ORG) .build()) .operation("Rebooting Virtual Machine damn small(b7e995a7-1468-4873-af39-bc703feefd63)") .operationName("vappReboot") .progress(0) .startTime(dateService.cDateParse("Thu Oct 25 13:39:25 EDT 2012")) .expiryTime(dateService.cDateParse("Wed Jan 23 13:39:25 EST 2013")) .status(Task.Status.RUNNING) .type(VCloudDirectorMediaType.TASK) .build(); }
public final Task updateNetworkTask() { return Task.builder() .status("running") .startTime(dateService.iso8601DateParse("2012-03-14T12:39:23.720-04:00")) .operationName("networkUpdateNetwork") .operation("Updating Network ilsolation01-Jclouds(f3ba8256-6f48-4512-aad6-600e85b4dc38)") .expiryTime(dateService.iso8601DateParse("2012-06-12T12:39:23.720-04:00")) .name("task") .id("urn:vcloud:task:49d2e180-7921-4902-ac39-b4ff5406bb94") .type("application/vnd.vmware.vcloud.task+xml") .href( URI.create( "https://vcloudbeta.bluelock.com/api/task/49d2e180-7921-4902-ac39-b4ff5406bb94")) .link( Link.builder() .rel("task:cancel") .href( URI.create( "https://vcloudbeta.bluelock.com/api/task/49d2e180-7921-4902-ac39-b4ff5406bb94/action/cancel")) .build()) .owner( Reference.builder() .type("application/vnd.vmware.vcloud.network+xml") .name("ilsolation01-Jclouds") .href( URI.create( "https://vcloudbeta.bluelock.com/api/network/f3ba8256-6f48-4512-aad6-600e85b4dc38")) .build()) .user( Reference.builder() .type("application/vnd.vmware.admin.user+xml") .name("*****@*****.**") .href( URI.create( "https://vcloudbeta.bluelock.com/api/admin/user/ae75edd2-12de-414c-8e85-e6ea10442c08")) .build()) .org( Reference.builder() .type("application/vnd.vmware.vcloud.org+xml") .name("JClouds") .href( URI.create( "https://vcloudbeta.bluelock.com/api/org/6f312e42-cd2b-488d-a2bb-97519cd57ed0")) .build()) .build(); }
public static Task suspendTask() { Task task = Task.builder().build(); return task; }
public static Task shutdownTask() { Task task = Task.builder().build(); return task; }
public static Task editVirtualHardwareSectionMemoryTask() { Task task = Task.builder().build(); return task; }
public static Task editProductSectionsTask() { Task task = Task.builder().build(); return task; }
public static Task editOperatingSystemSectionTask() { Task task = Task.builder().build(); return task; }
public static Task insertMediaTask() { Task task = Task.builder().build(); return task; }
public static Task recomposeVAppTask() { Task task = Task.builder().build(); return task; }
public static Task installVMwareToolsTask() { Task task = Task.builder().build(); return task; }
public static Task discardSuspendedStateTask() { Task task = Task.builder().build(); return task; }
public static Task consolidateVAppTask() { Task task = Task.builder().build(); return task; }
public static Task editVirtualHardwareSectionNetworkCardsTask() { Task task = Task.builder().build(); return task; }
public static Task editGuestCustomizationSectionTask() { Task task = Task.builder().build(); return task; }
public static Task editLeaseSettingsSectionTask() { Task task = Task.builder().build(); return task; }
public static Task undeployTask() { Task task = Task.builder().build(); return task; }
public static Task editNetworkConnectionSectionTask() { Task task = Task.builder().build(); return task; }
public static Task upgradeHardwareVersionTask() { Task task = Task.builder().build(); return task; }
public static Task editOwnerTask() { Task task = Task.builder().build(); return task; }
public static Task powerOnTask() { Task task = Task.builder().build(); return task; }
public final Task resetNetworkTask() { return Task.builder().build(); }
public static Task resetTask() { Task task = Task.builder().build(); return task; }
public static final AdminCatalog addCatalogToOrg() { return AdminCatalog.builder() .name("Test Catalog") .id("urn:vcloud:catalog:c56d9159-7838-446f-bb35-9ee12dfbbef3") .type("application/vnd.vmware.admin.catalog+xml") .description("created by testCreateCatalog()") .href( URI.create( "https://vcloudbeta.bluelock.com/api/admin/catalog/c56d9159-7838-446f-bb35-9ee12dfbbef3")) .link( Link.builder() .rel("up") .type("application/vnd.vmware.admin.organization+xml") .href( URI.create( "https://vcloudbeta.bluelock.com/api/admin/org/6f312e42-cd2b-488d-a2bb-97519cd57ed0")) .build()) .link( Link.builder() .rel("alternate") .type("application/vnd.vmware.vcloud.catalog+xml") .href( URI.create( "https://vcloudbeta.bluelock.com/api/catalog/c56d9159-7838-446f-bb35-9ee12dfbbef3")) .build()) .link( Link.builder() .rel("down") .type("application/vnd.vmware.vcloud.owner+xml") .href( URI.create( "https://vcloudbeta.bluelock.com/api/admin/catalog/c56d9159-7838-446f-bb35-9ee12dfbbef3/owner")) .build()) .link( Link.builder() .rel("add") .type("application/vnd.vmware.vcloud.catalogItem+xml") .href( URI.create( "https://vcloudbeta.bluelock.com/api/catalog/c56d9159-7838-446f-bb35-9ee12dfbbef3/catalogItems")) .build()) .link( Link.builder() .rel("edit") .type("application/vnd.vmware.admin.catalog+xml") .href( URI.create( "https://vcloudbeta.bluelock.com/api/admin/catalog/c56d9159-7838-446f-bb35-9ee12dfbbef3")) .build()) .link( Link.builder() .rel("remove") .href( URI.create( "https://vcloudbeta.bluelock.com/api/admin/catalog/c56d9159-7838-446f-bb35-9ee12dfbbef3")) .build()) .link( Link.builder() .rel("down") .type("application/vnd.vmware.vcloud.metadata+xml") .href( URI.create( "https://vcloudbeta.bluelock.com/api/catalog/c56d9159-7838-446f-bb35-9ee12dfbbef3/metadata")) .build()) .tasks( ImmutableSet.<Task>builder() .add( Task.builder() .status("running") .startTime(dateService.iso8601DateParse("2012-03-11T18:43:02.429-04:00")) .operationName("catalogCreateCatalog") .operation( "Creating Catalog Test Catalog(c56d9159-7838-446f-bb35-9ee12dfbbef3)") .expiryTime(dateService.iso8601DateParse("2012-06-09T18:43:02.429-04:00")) .name("task") .id("urn:vcloud:task:20f556f9-9125-4090-9092-0da9f72bedf4") .type("application/vnd.vmware.vcloud.task+xml") .href( URI.create( "https://vcloudbeta.bluelock.com/api/task/20f556f9-9125-4090-9092-0da9f72bedf4")) .link( Link.builder() .rel("task:cancel") .href( URI.create( "https://vcloudbeta.bluelock.com/api/task/20f556f9-9125-4090-9092-0da9f72bedf4/action/cancel")) .build()) .owner( Reference.builder() .type("application/vnd.vmware.vcloud.catalog+xml") .name("Test Catalog") .href( URI.create( "https://vcloudbeta.bluelock.com/api/catalog/c56d9159-7838-446f-bb35-9ee12dfbbef3")) .build()) .user( Reference.builder() .type("application/vnd.vmware.admin.user+xml") .name("*****@*****.**") .href( URI.create( "https://vcloudbeta.bluelock.com/api/admin/user/ae75edd2-12de-414c-8e85-e6ea10442c08")) .build()) .org( Reference.builder() .type("application/vnd.vmware.vcloud.org+xml") .name("JClouds") .href( URI.create( "https://vcloudbeta.bluelock.com/api/org/6f312e42-cd2b-488d-a2bb-97519cd57ed0")) .build()) .build()) .build()) .isPublished(false) .build(); }
public static Task editStartupSectionTask() { Task task = Task.builder().build(); return task; }