Package org.jclouds.gogrid.domain

Examples of org.jclouds.gogrid.domain.Job$Builder


   public void testPredicate() {
      final String serverName = "SERVER_NAME";
      Server server = createMock(Server.class);
      expect(server.getName()).andStubReturn(serverName);

      Job job = createMock(Job.class);
      expect(job.getCurrentState()).andReturn(JobState.SUCCEEDED);

      GridJobApi client = createMock(GridJobApi.class);
      expect(client.getJobList(latestJobForObjectByName(serverName))).andReturn(ImmutableSet.<Job> of(job));

      replay(job);
View Full Code Here


      // restart the server
      api.getServerServices().power(nameOfServer, PowerCommand.RESTART);

      Set<Job> jobs = api.getJobServices().getJobsForObjectName(nameOfServer);

      Job latestJob = Iterables.getLast(jobs);
      Long latestJobId = latestJob.getId();

      Job latestJobFetched = Iterables.getOnlyElement(api.getJobServices().getJobsById(latestJobId));

      assert latestJob.equals(latestJobFetched) : "Job and its representation found by ID don't match";

      long[] idsOfAllJobs = new long[jobs.size()];
      int i = 0;
View Full Code Here

            "image", "GSI-f8979644-e646-4711-ad58-d98a5fa3612c",
            "ip", "204.51.240.189",
            "name", "ServerCreated40562",
            "type", "virtual_server");

      Job job = Job.builder().id(250628L).command(Option.createWithIdNameAndDescription(7L, "DeleteVirtualServer", "Delete Virtual Server"))
            .objectType(ObjectType.VIRTUAL_SERVER).createdOn(new Date(1267404528895L)).lastUpdatedOn(new Date(1267404538592L))
            .currentState(JobState.SUCCEEDED).attempts(1).owner("3116784158f0af2d-24076@api.gogrid.com").history(
                  JobProperties.builder().id(940263L).updatedOn(new Date(1267404528897L)).state(JobState.CREATED).build(),
                  JobProperties.builder().id(940264L).updatedOn(new Date(1267404528967L)).state(JobState.QUEUED).build())
            .details(details).build();
View Full Code Here

TOP

Related Classes of org.jclouds.gogrid.domain.Job$Builder

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.