Examples of BundleTask


Examples of org.jclouds.ec2.domain.BundleTask

      HttpResponse filterResponse = HttpResponse.builder().statusCode(200)
              .payload(payloadFromResourceWithContentType("/describe_bundle_tasks.xml", "text/xml")).build();

      EC2Api apiWhenExist = requestsSendResponses(describeRegionsRequest, describeRegionsResponse, filter, filterResponse);

      BundleTask task = getOnlyElement(apiWhenExist.getWindowsApi().get().describeBundleTasksInRegionWithFilter("us-east-1",
              ImmutableMultimap.<String, String>builder()
                      .put("instance-id", "i-12345678")
                      .build()));

      assertEquals(task.getBundleId(), "bun-c1a540a8");
   }
View Full Code Here

Examples of org.jclouds.ec2.domain.BundleTask

public class DescribeBundleTasksResponseHandlerTest extends BaseEC2HandlerTest {
   public void testApplyInputStream() {
      DateService dateService = injector.getInstance(DateService.class);
      InputStream is = getClass().getResourceAsStream("/describe_bundle_tasks.xml");

      BundleTask expected = new BundleTask(defaultRegion, "bun-c1a540a8", null, "i-12345678", 20, dateService
            .iso8601DateParse("2008-10-07T11:41:50.000Z"), "canceling", "my-bucket", "winami", dateService
            .iso8601DateParse("2008-10-07T11:51:50.000Z"));

      DescribeBundleTasksResponseHandler handler = injector.getInstance(DescribeBundleTasksResponseHandler.class);
      addDefaultRegionToHandler(handler);
      BundleTask result = Iterables.getOnlyElement(factory.create(handler).parse(is));

      assertEquals(result, expected);
   }
View Full Code Here

Examples of org.jclouds.ec2.domain.BundleTask

public class BundleTaskHandlerTest extends BaseEC2HandlerTest {
   public void testBundleInstance() {
      DateService dateService = injector.getInstance(DateService.class);
      InputStream is = getClass().getResourceAsStream("/bundle_instance.xml");

      BundleTask expected = new BundleTask(defaultRegion, "bun-c1a540a8", null, "i-12345678", 70, dateService
            .iso8601DateParse("2008-10-07T11:41:50.000Z"), "bundling", "my-bucket", "winami", dateService
            .iso8601DateParse("2008-10-07T11:51:50.000Z"));

      BundleTaskHandler handler = injector.getInstance(BundleTaskHandler.class);
      addDefaultRegionToHandler(handler);
      BundleTask result = factory.create(handler).parse(is);

      assertEquals(result, expected);
   }
View Full Code Here

Examples of org.jclouds.ec2.domain.BundleTask

   }

   public void testCancleBundleTask() {
      DateService dateService = injector.getInstance(DateService.class);
      InputStream is = getClass().getResourceAsStream("/cancel_bundle_task.xml");
      BundleTask expected = new BundleTask(defaultRegion, "bun-cla322b9", null, "i-12345678", 20, dateService
            .iso8601DateParse("2008-10-07T11:41:50.000Z"), "canceling", "my-bucket", "my-new-image", dateService
            .iso8601DateParse("2008-10-07T11:51:50.000Z"));

      BundleTaskHandler handler = injector.getInstance(BundleTaskHandler.class);
      addDefaultRegionToHandler(handler);
      BundleTask result = factory.create(handler).parse(is);

      assertEquals(result, expected);
   }
View Full Code Here

Examples of org.jclouds.ec2.domain.BundleTask

      if (region == null)
         region = defaultRegion.get();
      BundleTask.Error error = null;
      if (code != null)
         error = new BundleTask.Error(code, message);
      BundleTask returnVal = new BundleTask(region, bundleId, error, instanceId, progress, startTime,
            state, bucket, prefix, updateTime);
      this.bundleId = null;
      this.code = null;
      this.message = null;
      this.instanceId = null;
View Full Code Here

Examples of org.rhq.bundle.ant.task.BundleTask

        }

        BundleAntProject project = ant.parseBundleDeployFile(
            getFileFromTestClasses("test-bundle-with-manage-root-dir.xml"), null);
        assertNotNull(project);
        BundleTask bundleTask = findBundleTask(project);
        assertNotNull(bundleTask);
        assertNotNull(bundleTask.getDeploymentUnits());
        assertEquals(bundleTask.getDeploymentUnits().size(), 1);
        DeploymentUnitType deploymentUnit = bundleTask.getDeploymentUnits().values().iterator().next();
        assertNotNull(deploymentUnit);

        //assert the compatibility with the legacy attribute
        //noinspection deprecation
        assertEquals(deploymentUnit.getManageRootDir(), "false");
View Full Code Here

Examples of org.rhq.bundle.ant.task.BundleTask

        if (bundleTaskCount > 1) {
            throw new InvalidBuildFileException(
                "More than one rhq:bundle task found - an RHQ bundle Ant build file must contain exactly one rhq:bundle task.");
        }

        BundleTask bundleTask = (BundleTask) preconfigureTask(unconfiguredBundleTask);
        Collection<DeploymentUnitType> deployments = bundleTask.getDeploymentUnits().values();
        if (deployments.isEmpty()) {
            throw new InvalidBuildFileException(
                "The bundle task must contain exactly one rhq:deploymentUnit child element.");
        }
        DeploymentUnitType deployment = deployments.iterator().next();

        if (requireExplicitCompliance && deployment.getCompliance() == null) {
            throw new InvalidBuildFileException(
                "The deployment unit must specifically declare compliance mode of the destination directory.");
        }

        project.setDestinationCompliance(deployment.getCompliance());

        Map<File, String> files = deployment.getLocalFileNames();
        for (String file : files.values()) {
            project.getBundleFileNames().add(file);
        }

        Map<File, String> archives = deployment.getLocalArchiveNames();
        for (String archive : archives.values()) {
            project.getBundleFileNames().add(archive);
        }

        List<String> propertyFiles = bundleTask.getLocalPropertyFiles();
        for (String propFile : propertyFiles) {
            project.getBundleFileNames().add(propFile);
        }

        // note that we do NOT add url-files and url-archives to the BundleFileNames because those are
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.