Package org.jclouds.vcloud.domain.internal

Examples of org.jclouds.vcloud.domain.internal.TaskImpl


   }

   @Override
   public void endElement(String uri, String localName, String qName) {
      if (equalsOrSuffix(qName, "Task")) {
         this.task = new TaskImpl(taskLink.getHref(), operation, status, startTime, endTime, expiryTime, owner, error);
         operation = null;
         taskLink = null;
         status = null;
         startTime = null;
         endTime = null;
View Full Code Here


      assertEquals(result.getType(), "application/vnd.vmware.vcloud.vAppTemplate+xml");
      assertEquals(result.getStatus(), Status.UNRESOLVED);
      assertEquals(result.getVDC(), new ReferenceTypeImpl(null, VCloudMediaType.VDC_XML, URI
               .create("https://vcenterprise.bluelock.com/api/v1.0/vdc/105186609")));
      assertEquals(result.getDescription(), null);
      assertEquals(result.getTasks(), ImmutableList.of(new TaskImpl(URI
               .create("https://vcenterprise.bluelock.com/api/v1.0/task/q62gxhi32xgd9yrqvr"),
               "Copying Virtual Application Template Ubuntu10.04_v2(699683881)", TaskStatus.RUNNING, dateService
                        .iso8601DateParse("2010-09-17T23:20:46.039-04:00"), dateService
                        .iso8601DateParse("9999-12-31T23:59:59.999-05:00"), dateService
                        .iso8601DateParse("2010-12-16T23:20:46.039-05:00"), new ReferenceTypeImpl("Ubuntu10.04_v2",
View Full Code Here

   public void test() {
      InputStream is = getClass().getResourceAsStream("/task-1.0.xml");

      Task result = factory.create(injector.getInstance(TaskHandler.class)).parse(is);

      Task expects = new TaskImpl(URI.create("https://vcenterprise.bluelock.com/api/v1.0/task/3cc08ir8oczbze3n1a3"),
               "Creating Virtual Application vApp_acole_2(607806320)", TaskStatus.RUNNING, dateService
                        .iso8601DateParse("2010-08-23T02:09:52.443-04:00"), dateService
                        .iso8601DateParse("9999-12-31T23:59:59.999-05:00"), dateService
                        .iso8601DateParse("2010-11-21T02:09:52.443-05:00"), new ReferenceTypeImpl("vApp_acole_2",
                        VCloudMediaType.VAPP_XML, URI
View Full Code Here

   public void testTerremark() {
      InputStream is = getClass().getResourceAsStream("/task.xml");

      Task result = factory.create(injector.getInstance(TaskHandler.class)).parse(is);
      Task expects = new TaskImpl(URI.create("https://services.vcloudexpress.terremark.com/api/v0.8/task/3299"), null,
               TaskStatus.SUCCESS, dateService.iso8601DateParse("2009-08-24T21:29:32.983Z"), dateService
                        .iso8601DateParse("2009-08-24T21:29:44.65Z"), null, new ReferenceTypeImpl("Server1",
                        VCloudMediaType.VAPP_XML, URI
                                 .create("https://services.vcloudexpress.terremark.com/api/v0.8/vapp/4012")), null
View Full Code Here

   public void testSelf() {
      InputStream is = getClass().getResourceAsStream("/task-self.xml");

      Task result = factory.create(injector.getInstance(TaskHandler.class)).parse(is);

      Task expects = new TaskImpl(URI.create("https://vcloud.safesecureweb.com/api/v0.8/task/d188849-78"), null,
               TaskStatus.QUEUED, null, null, null, null, null);
      assertEquals(result, expects);

   }
View Full Code Here

   public void testApplyInputStream2() {
      InputStream is = getClass().getResourceAsStream("/task-hosting.xml");

      Task result = factory.create(injector.getInstance(TaskHandler.class)).parse(is);

      Task expects = new TaskImpl(URI.create("https://vcloud.safesecureweb.com/api/v0.8/task/97806"), null,
               TaskStatus.SUCCESS, dateService.iso8601SecondsDateParse("2010-01-14T20:04:51Z"), dateService
                        .iso8601SecondsDateParse("2010-01-14T20:05:02Z"), dateService
                        .iso8601SecondsDateParse("2010-01-15T20:05:02Z"),

               new ReferenceTypeImpl("188849-96", VCloudMediaType.VAPP_XML, URI
View Full Code Here

   public void testError() {
      InputStream is = getClass().getResourceAsStream("/task-error.xml");

      Task result = factory.create(injector.getInstance(TaskHandler.class)).parse(is);

      Task expects = new TaskImpl(URI.create("http://10.150.4.49/api/v0.8/task/23"), null, TaskStatus.ERROR,
               dateService.iso8601SecondsDateParse("2009-12-07T19:05:02Z"), dateService
                        .iso8601SecondsDateParse("2009-12-10T14:40:32Z"), null, new ReferenceTypeImpl("testapp1",
                        VCloudMediaType.VAPP_XML, URI.create("http://10.150.4.49/api/v0.8/vapp/1")), new ErrorImpl(
                        "Error processing job", 500, MinorCode.UNRECOGNIZED,
                        " Error in runDailySummaries date used:2009-12-09 19:40:30.577326+00:00", null));
View Full Code Here

      InputStream is = getClass().getResourceAsStream("/taskslist.xml");

      TasksList result = factory.create(injector.getInstance(TasksListHandler.class)).parse(is);
      assertEquals(result.getLocation(), URI
               .create("https://services.vcloudexpress.terremark.com/api/v0.8/tasksList/1"));
      Task task1 = new TaskImpl(URI.create("https://services.vcloudexpress.terremark.com/api/v0.8/task/3300"),
               null, TaskStatus.SUCCESS, dateService.iso8601DateParse("2009-08-24T21:30:19.587Z"), dateService
                        .iso8601DateParse("2009-08-24T21:30:32.63Z"), null, new ReferenceTypeImpl("Server1",
                        VCloudMediaType.VAPP_XML, URI
                                 .create("https://services.vcloudexpress.terremark.com/api/v0.8/vapp/4012")), null);
      Task task2 = new TaskImpl(URI.create("https://services.vcloudexpress.terremark.com/api/v0.8/task/3299"),
               null, TaskStatus.SUCCESS, dateService.iso8601DateParse("2009-08-24T21:29:32.983Z"), dateService
                        .iso8601DateParse("2009-08-24T21:29:44.65Z"), null, new ReferenceTypeImpl("Server1",
                        VCloudMediaType.VAPP_XML, URI
                                 .create("https://services.vcloudexpress.terremark.com/api/v0.8/vapp/4012")), null);
      assertEquals(result.getTasks(), ImmutableSortedSet.of(task1, task2));
View Full Code Here

      assertEquals(result.getType(), "application/vnd.vmware.vcloud.vAppTemplate+xml");
      assertEquals(result.getStatus(), Status.UNRESOLVED);
      assertEquals(result.getVDC(), new ReferenceTypeImpl(null, VCloudMediaType.VDC_XML, URI
               .create("https://vcenterprise.bluelock.com/api/v1.0/vdc/105186609")));
      assertEquals(result.getDescription(), null);
      assertEquals(result.getTasks(), ImmutableList.of(new TaskImpl(URI
               .create("https://vcenterprise.bluelock.com/api/v1.0/task/q62gxhi32xgd9yrqvr"),
               "Copying Virtual Application Template Ubuntu10.04_v2(699683881)", TaskStatus.RUNNING, dateService
                        .iso8601DateParse("2010-09-17T23:20:46.039-04:00"), dateService
                        .iso8601DateParse("9999-12-31T23:59:59.999-05:00"), dateService
                        .iso8601DateParse("2010-12-16T23:20:46.039-05:00"), new ReferenceTypeImpl("Ubuntu10.04_v2",
View Full Code Here

   public void test() {
      InputStream is = getClass().getResourceAsStream("/task-1.0.xml");

      Task result = factory.create(injector.getInstance(TaskHandler.class)).parse(is);

      Task expects = new TaskImpl(URI.create("https://vcenterprise.bluelock.com/api/v1.0/task/3cc08ir8oczbze3n1a3"),
               "Creating Virtual Application vApp_acole_2(607806320)", TaskStatus.RUNNING, dateService
                        .iso8601DateParse("2010-08-23T02:09:52.443-04:00"), dateService
                        .iso8601DateParse("9999-12-31T23:59:59.999-05:00"), dateService
                        .iso8601DateParse("2010-11-21T02:09:52.443-05:00"), new ReferenceTypeImpl("vApp_acole_2",
                        VCloudMediaType.VAPP_XML, URI
View Full Code Here

TOP

Related Classes of org.jclouds.vcloud.domain.internal.TaskImpl

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.