Package org.jclouds.vcloud.domain

Examples of org.jclouds.vcloud.domain.VApp


      URI VDC = URI.create(template.getLocation().getId());

      logger.debug(">> instantiating vApp vDC(%s) template(%s) name(%s) options(%s) ", VDC, templateId, name, options);

      VApp vAppResponse = client.getVAppTemplateClient().createVAppInVDCByInstantiatingTemplate(name, VDC, templateId,
               options);
      return vAppResponse;
   }
View Full Code Here


         Task task = getVCloudApi().getVAppClient().undeployVApp(URI.create(node.getId()));

         // wait up to ten minutes per above
         assert taskTester.apply(task.getHref()) : node;

         VApp vApp = getVCloudApi().getVAppClient().getVApp(URI.create(node.getId()));

         // wait up to ten minutes per above
         assertEquals(vApp.getStatus(), Status.OFF);

         // vdc is equiv to the node's location
         // vapp uri is the same as the node's id
         vappTemplate = getVCloudApi().getVAppTemplateClient().captureVAppAsTemplateInVDC(URI.create(node.getId()),
                  group, URI.create(node.getLocation().getId()));
View Full Code Here

      for (ReferenceType vdc : org.getVDCs().values()) {
         VDC response = getVCloudApi().getVDCClient().getVDC(vdc.getHref());
         for (ReferenceType item : response.getResourceEntities().values()) {
            if (item.getType().equals(VCloudMediaType.VAPP_XML)) {
               try {
                  VApp app = getVCloudApi().getVAppClient().getVApp(item.getHref());
                  assertNotNull(app);
                  for (Vm vm : app.getChildren()) {
                     assert getVCloudApi().getVmClient().getScreenThumbnailForVm(vm.getHref()) != null;
                  }
               } catch (RuntimeException e) {

               }
View Full Code Here

      for (ReferenceType vdc : org.getVDCs().values()) {
         VDC response = getVCloudApi().getVDCClient().getVDC(vdc.getHref());
         for (ReferenceType item : response.getResourceEntities().values()) {
            if (item.getType().equals(VCloudMediaType.VAPP_XML)) {
               try {
                  VApp app = getVCloudApi().getVAppClient().getVApp(item.getHref());
                  assertNotNull(app);
                  for (Vm vm : app.getChildren()) {
                     assertEquals(getVCloudApi().getVmClient().getVm(vm.getHref()).getHref(), vm.getHref());
                  }
               } catch (RuntimeException e) {

               }
View Full Code Here

         options.blockOnPort(22, 180);
         options.as(VCloudTemplateOptions.class).customizationScript(script);
         options.as(VCloudTemplateOptions.class).description(group);
         node = getOnlyElement(client.createNodesInGroup(group, 1, options));

         VApp vapp = client.getContext().unwrap(VCloudApiMetadata.CONTEXT_TOKEN).getApi().getVAppClient().getVApp(
                  node.getUri());
         assertEquals(vapp.getDescription(), group);

         Vm vm = Iterables.get(vapp.getChildren(), 0);
         String apiOutput = vm.getGuestCustomizationSection().getCustomizationScript();
         checkApiOutput(apiOutput);

         ExecResponse vmTools = client.runScriptOnNode(node.getId(), PARSE_VMTOOLSD,
               wrapInInitScript(false).runAsRoot(false));
View Full Code Here

      for (ReferenceType vdc : org.getVDCs().values()) {
         VDC response = getVCloudApi().getVDCClient().getVDC(vdc.getHref());
         for (ReferenceType item : response.getResourceEntities().values()) {
            if (item.getType().equals(VCloudMediaType.VAPP_XML)) {
               try {
                  VApp app = getVCloudApi().getVAppClient().getVApp(item.getHref());
                  assertNotNull(app);
               } catch (RuntimeException e) {

               }
            }
View Full Code Here

            super.configure();
            bind(ResourceAllocationSettingDataHandler.class).to(VCloudResourceAllocationSettingDataHandler.class);
         }
      });
      Factory factory = injector.getInstance(ParseSax.Factory.class);
      VApp result = factory.create(injector.getInstance(VAppHandler.class)).parse(is);
      assertEquals(result.getName(), "vApp_acole_2");
      assertEquals(result.getDescription(), "foo");
      assertEquals(result.getHref(), URI.create("https://vcenterprise.bluelock.com/api/v1.0/vApp/vapp-607806320"));
      assertEquals(result.getType(), "application/vnd.vmware.vcloud.vApp+xml");
      assertEquals(result.getStatus(), Status.OFF);
      assertEquals(
            result.getVDC(),
            new ReferenceTypeImpl(null, VCloudMediaType.VDC_XML, URI
                  .create("https://vcenterprise.bluelock.com/api/v1.0/vdc/1014839439")));
      assertEquals(result.getTasks(), ImmutableList.of());
      assert result.isOvfDescriptorUploaded();
      assert result.getNetworkSection() != null;
      Vm vm = Iterables.getOnlyElement(result.getChildren());
      VmHandlerTest.checkVm(vm);
   }
View Full Code Here

      Location location = new LocationBuilder().id("https://1.1.1.1/api/v1.0/vdc/1").description("description")
            .scope(LocationScope.PROVIDER).build();
      Injector injector = createInjectorWithLocation(location);
      InputStream is = getClass().getResourceAsStream("/vapp-pool.xml");
      Factory factory = injector.getInstance(ParseSax.Factory.class);
      VApp result = factory.create(injector.getInstance(VAppHandler.class)).parse(is);
      VAppToNodeMetadata converter = injector.getInstance(VAppToNodeMetadata.class);
      NodeMetadata node = converter.apply(result);
      assertNotNull(node);
      assertEquals(node.getUserMetadata(), ImmutableMap.<String, String>of());
      assertEquals(node.getTags(), ImmutableSet.<String>of());
View Full Code Here

      Location location = new LocationBuilder().id("https://1.1.1.1/api/v1.0/vdc/1").description("description")
         .scope(LocationScope.PROVIDER).build();
      Injector injector = createInjectorWithLocation(location);
      InputStream is = getClass().getResourceAsStream("/vapp-pool.xml");
      Factory factory = injector.getInstance(ParseSax.Factory.class);
      VApp result = factory.create(injector.getInstance(VAppHandler.class)).parse(is);
      VAppToNodeMetadata converter = injector.getInstance(VAppToNodeMetadata.class);
      ImmutableMap<String, String> metadata = ImmutableMap.<String, String>of();
      ImmutableSet<String> tags = ImmutableSet.<String>of();

      String description = " user=user_ssoid_1\nuid=3b7bb605-bb30-4e62-a3de-9076b052dee7 label='foo-DEVELOPMENT' date=2013-01-22 17:39:28.252";

      result = new VAppImpl(result.getName(), result.getType(), result.getHref(), result.getStatus(), result.getVDC(),
         description, result.getTasks(), result.isOvfDescriptorUploaded(), result.getChildren(),
         result.getNetworkSection());

      NodeMetadata node = converter.apply(result);
      assertNotNull(node);
      assertEquals(node.getUserMetadata(), metadata);
      assertEquals(node.getTags(), tags);
View Full Code Here

      Location location = new LocationBuilder().id("https://1.1.1.1/api/v1.0/vdc/1").description("description")
         .scope(LocationScope.PROVIDER).build();
      Injector injector = createInjectorWithLocation(location);
      InputStream is = getClass().getResourceAsStream("/vapp-pool.xml");
      Factory factory = injector.getInstance(ParseSax.Factory.class);
      VApp result = factory.create(injector.getInstance(VAppHandler.class)).parse(is);
      VAppToNodeMetadata converter = injector.getInstance(VAppToNodeMetadata.class);
      ImmutableMap<String, String> metadata = ImmutableMap.<String, String>of();
      ImmutableSet<String> tags = ImmutableSet.<String>of();

      String description = " user=user_ssoid_1 uid=3b7bb605-bb30-4e62-a3de-9076b052dee7 label='foo-DEVELOPMENT' date=2013-01-22 17:39:28.252";

      result = new VAppImpl(result.getName(), result.getType(), result.getHref(), result.getStatus(), result.getVDC(),
         description, result.getTasks(), result.isOvfDescriptorUploaded(), result.getChildren(),
         result.getNetworkSection());

      NodeMetadata node = converter.apply(result);
      assertNotNull(node);
      assertEquals(node.getUserMetadata(), metadata);
      assertEquals(node.getTags(), tags);
View Full Code Here

TOP

Related Classes of org.jclouds.vcloud.domain.VApp

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.