Package org.jclouds.trmk.vcloud_0_8.domain

Examples of org.jclouds.trmk.vcloud_0_8.domain.VDC


  }

  @Test(description = "DeleteKeyPair", dependsOnMethods = { "testCreateKeyPair" })
  public void testDeleteKeyPair() {
    String keyPairName = "NewKeyPair";
    Vdc currentVDC = lazyGetVdc();
    Media keyPairsContainer = findOrCreateKeyPairContainerInVDCNamed(currentVDC,
        keyPairContainer, keyPairName);
    Task removeMedia = mediaApi.remove(keyPairsContainer.getId());
    Checks.checkTask(removeMedia);
    assertTrue(retryTaskSuccess.apply(removeMedia),
View Full Code Here


      return networkConfigSection;
   }

   /** Build a {@link NetworkConfiguration} object. */
   private NetworkConfiguration networkConfiguration() {
      Vdc vdc = context.getApi().getVdcApi().get(vdcUrn);
      assertNotNull(vdc, String.format(ENTITY_NON_NULL, VDC));

      Set<Reference> networks = vdc.getAvailableNetworks();
      network = lazyGetNetwork();
      // Look up the network in the Vdc with the id configured for the tests
      Optional<Reference> parentNetwork = tryFind(networks, new Predicate<Reference>() {
         @Override
         public boolean apply(Reference reference) {
View Full Code Here

      }
   }

   @Test(description = "GET /vdc/{id}")
   public void testGetVdc() {
      Vdc vdc = lazyGetVdc();
      assertNotNull(vdc, String.format(OBJ_REQ_LIVE, VDC));
      assertNotEquals("DO NOT USE", vdc.getDescription(), "vDC isn't to be used for testing");
      Checks.checkVdc(vdc);
   }
View Full Code Here

   }

   // TODO Duplicates code in VAppApiLiveTest
   @Test(description = "POST /vdc/{id}/action/instantiateVAppTemplate")
   public void testInstantiateVAppTemplate() {
      Vdc vdc = vdcApi.get(vdcUrn);

      Set<Reference> networks = vdc.getAvailableNetworks();
      Optional<Reference> parentNetwork = Iterables.tryFind(networks, new Predicate<Reference>() {
         @Override
         public boolean apply(Reference reference) {
            return reference.getHref().equals(network.getHref());
         }
View Full Code Here

      }
   }

   @Test(description = "POST /vdc/{id}/media")
   public void testAddMedia() throws URISyntaxException {
      Vdc vdc = lazyGetVdc();
      Link addMedia = find(vdc.getLinks(), and(relEquals("add"), typeEquals(VCloudDirectorMediaType.MEDIA)));

      // TODO: generate an iso
      byte[] iso = new byte[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 };

      Media sourceMedia = Media.builder().type(VCloudDirectorMediaType.MEDIA).name("Test media " + random.nextInt())
View Full Code Here

               .httpRequestBuilder().build(),
            new VcloudHttpResponsePrimer()
               .xmlFilePayload("/vdc/vdc.xml", VCloudDirectorMediaType.VDC)
               .httpResponseBuilder().build());
     
      Vdc expected = getVdc();

      assertEquals(api.getVdcApi().get(vdcURI), expected);
   }
View Full Code Here

      }
   }

   @Test(description = "POST /vdc/{id}/media")
   public void testAddMedia() throws URISyntaxException {
      Vdc vdc = lazyGetVdc();
      Link addMedia = find(vdc.getLinks(), and(relEquals("add"), typeEquals(VCloudDirectorMediaType.MEDIA)));

      // TODO: generate an iso
      byte[] iso = new byte[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 };

      Media sourceMedia = Media.builder().type(VCloudDirectorMediaType.MEDIA).name("Test media " + random.nextInt())
View Full Code Here

      }
   }

   @Test(description = "GET /vdc/{id}")
   public void testGetVdc() {
      Vdc vdc = lazyGetVdc();
      assertNotNull(vdc, String.format(OBJ_REQ_LIVE, VDC));
      assertNotEquals("DO NOT USE", vdc.getDescription(), "vDC isn't to be used for testing");
      Checks.checkVdc(vdc);
   }
View Full Code Here

   }

   // TODO Duplicates code in VAppApiLiveTest
   @Test(description = "POST /vdc/{id}/action/instantiateVAppTemplate")
   public void testInstantiateVAppTemplate() {
      Vdc vdc = vdcApi.get(vdcUrn);

      Set<Reference> networks = vdc.getAvailableNetworks();
      Optional<Reference> parentNetwork = Iterables.tryFind(networks, new Predicate<Reference>() {
         @Override
         public boolean apply(Reference reference) {
            return reference.getHref().equals(network.getHref());
         }
View Full Code Here

      return networkConfigSection;
   }

   /** Build a {@link NetworkConfiguration} object. */
   private NetworkConfiguration networkConfiguration() {
      Vdc vdc = context.getApi().getVdcApi().get(vdcUrn);
      assertNotNull(vdc, String.format(ENTITY_NON_NULL, VDC));

      Set<Reference> networks = vdc.getAvailableNetworks();
      network = lazyGetNetwork();
      // Look up the network in the Vdc with the id configured for the tests
      Optional<Reference> parentNetwork = tryFind(networks, new Predicate<Reference>() {
         @Override
         public boolean apply(Reference reference) {
View Full Code Here

TOP

Related Classes of org.jclouds.trmk.vcloud_0_8.domain.VDC

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.