Package org.jclouds.vcloud.domain

Examples of org.jclouds.vcloud.domain.VApp


      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("foo", "bar");
      ImmutableSet<String> tags = ImmutableSet.<String>of("tag1", "tag2");
     
      String description = Joiner
               .on('\n')
               .withKeyValueSeparator("=")
               .join(ImmutableMap.<String, String> builder().putAll(metadata)
                        .put("jclouds_tags", Joiner.on(',').join(tags)).build());
     
      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-none.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.getLocation(), location);
      assertEquals(node.getPrivateAddresses(), ImmutableSet.of());
View Full Code Here

      Location location = new LocationBuilder().id("https://1.1.1.1/api/v1.0/vdc/11111").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.getLocation(), location);
   }
View Full Code Here

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

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

         VApp vApp = getVCloudApi().getVAppApi().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().getVAppTemplateApi().captureVAppAsTemplateInVDC(URI.create(node.getId()),
                  group, URI.create(node.getLocation().getId()));
View Full Code Here

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

               }
            }
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

      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("foo", "bar");
      ImmutableSet<String> tags = ImmutableSet.<String>of("tag1", "tag2");
     
      String description = Joiner
               .on('\n')
               .withKeyValueSeparator("=")
               .join(ImmutableMap.<String, String> builder().putAll(metadata)
                        .put("jclouds_tags", Joiner.on(',').join(tags)).build());
     
      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-none.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.getLocation(), location);
      assertEquals(node.getPrivateAddresses(), ImmutableSet.of());
View Full Code Here

      Location location = new LocationBuilder().id("https://1.1.1.1/api/v1.0/vdc/11111").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.getLocation(), location);
   }
View Full Code Here

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

               }
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.