Package org.jclouds.vcloud.director.v1_5.predicates

Examples of org.jclouds.vcloud.director.v1_5.predicates.TaskStatusEquals


               String.format("Task '%s' must reach status %s", task.getOperationName(), running));
   }

   protected boolean taskDoneEventually(Task task) {
      TaskApi taskApi = context.getApi().getTaskApi();
      TaskStatusEquals predicate = new TaskStatusEquals(taskApi, ImmutableSet.of(Task.Status.ABORTED,
               Task.Status.CANCELED, Task.Status.ERROR, Task.Status.SUCCESS), ImmutableSet.<Task.Status> of());
      return retry(predicate, TASK_TIMEOUT_SECONDS * 1000L).apply(task);
   }
View Full Code Here


      assertTrue(retryTaskSuccessLong.apply(task), String.format(TASK_COMPLETE_TIMELY, task));
   }

   protected boolean taskStatusEventually(Task task, Task.Status running, ImmutableSet<Task.Status> immutableSet) {
      TaskApi taskApi = context.getApi().getTaskApi();
      TaskStatusEquals predicate = new TaskStatusEquals(taskApi, running, immutableSet);
      return retry(predicate, TASK_TIMEOUT_SECONDS * 1000L).apply(task);
   }
View Full Code Here

               String.format("Task '%s' must reach status %s", task.getOperationName(), running));
   }

   protected boolean taskDoneEventually(Task task) {
      TaskApi taskApi = context.getApi().getTaskApi();
      TaskStatusEquals predicate = new TaskStatusEquals(taskApi, ImmutableSet.of(Task.Status.ABORTED,
               Task.Status.CANCELED, Task.Status.ERROR, Task.Status.SUCCESS), ImmutableSet.<Task.Status> of());
      return retry(predicate, TASK_TIMEOUT_SECONDS * 1000L).apply(task);
   }
View Full Code Here

      HttpResponse listResponse = HttpResponse.builder()
               .statusCode(200)
               .payload(payloadFromResourceWithContentType("/org/orglist.xml", ORG_LIST + ";version=1.5"))
               .build();
     
      VCloudDirectorApi api = requestsSendResponses(loginRequest, sessionResponse, list, listResponse);


      OrgList expected = OrgList.builder()
            .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();

      assertEquals(api.getOrgApi().list(), expected);
   }
View Full Code Here

            .payload(payloadFromResourceWithContentType("/org/org.xml", ORG + ";version=1.5"))
            .build();
   
   @Test
   public void testGetOrgHref() {
      VCloudDirectorApi api = requestsSendResponses(loginRequest, sessionResponse, get, getResponse);
      assertEquals(api.getOrgApi().get(orgHref), org());
   }
View Full Code Here

           .payload(payloadFromStringWithContentType(orgEntity, ENTITY + ";version=1.5"))
           .build();
  
   @Test
   public void testGetOrgUrn() {
      VCloudDirectorApi api = requestsSendResponses(loginRequest, sessionResponse, resolveOrg, resolveOrgResponse, get, getResponse);
      assertEquals(api.getOrgApi().get(orgUrn), org());
   }
View Full Code Here

            .payload(payloadFromResourceWithContentType("/org/orgMetadata.xml", METADATA))
            .build();

   @Test
   public void testGetOrgMetadataHref() {
      VCloudDirectorApi api = requestsSendResponses(loginRequest, sessionResponse, getMetadata, getMetadataResponse);
      assertEquals(api.getMetadataApi(orgHref).get(), metadata());
   }
View Full Code Here

            .payload(payloadFromResourceWithContentType("/org/orgMetadataValue.xml", METADATA_VALUE))
            .build();

   @Test
   public void testGetOrgMetadataEntryHref() {
      VCloudDirectorApi api = requestsSendResponses(loginRequest, sessionResponse, getMetadataValue, getMetadataValueResponse);
      assertEquals(api.getMetadataApi(orgHref).get("KEY"), "VALUE");
   }
View Full Code Here

            .payload(payloadFromResourceWithContentType("/catalog/catalog.xml", CATALOG + ";version=1.5"))
            .build();
   
   @Test
   public void testGetCatalogHref() {
      VCloudDirectorApi api = requestsSendResponses(loginRequest, sessionResponse, get, getResponse);
      assertEquals(api.getCatalogApi().get(catalogHref), catalog());
   }
View Full Code Here

           .payload(payloadFromStringWithContentType(catalogEntity, ENTITY + ";version=1.5"))
           .build();
  
   @Test
   public void testGetCatalogUrn() {
      VCloudDirectorApi api = requestsSendResponses(loginRequest, sessionResponse, resolveCatalog, resolveCatalogResponse, get, getResponse);
      assertEquals(api.getCatalogApi().get(catalogUrn), catalog());
   }
View Full Code Here

TOP

Related Classes of org.jclouds.vcloud.director.v1_5.predicates.TaskStatusEquals

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.