Package org.jclouds.compute.options

Examples of org.jclouds.compute.options.TemplateOptions


         .shouldSetupStaticNat());
   }

   @Test
   public void testGenerateKeyPairDefaultsFalse() {
      TemplateOptions options = new CloudStackTemplateOptions();
      assertFalse(options.as(CloudStackTemplateOptions.class)
         .shouldGenerateKeyPair());
   }


         .shouldGenerateKeyPair());
   }

   @Test
   public void testGenerateKeyPair() {
      TemplateOptions options = new CloudStackTemplateOptions().generateKeyPair(true);
      assertTrue(options.as(CloudStackTemplateOptions.class)
         .shouldGenerateKeyPair());
   }

         .shouldGenerateKeyPair());
   }

   @Test
   public void testGenerateKeyPairStatic() {
      TemplateOptions options = generateKeyPair(true);
      assertTrue(options.as(CloudStackTemplateOptions.class)
         .shouldGenerateKeyPair());
   }

         .shouldGenerateKeyPair());
   }

   @Test
   public void testKeyPair() {
      TemplateOptions options = keyPair("test");
      assertEquals(options.as(CloudStackTemplateOptions.class).getKeyPair(), "test");
   }

      assertEquals(options.as(CloudStackTemplateOptions.class).getKeyPair(), "test");
   }

   @Test
   public void testDiskOfferingId() {
      TemplateOptions options = diskOfferingId("test");
      assertEquals(options.as(CloudStackTemplateOptions.class).getDiskOfferingId(), "test");
   }

      assertEquals(options.as(CloudStackTemplateOptions.class).getDiskOfferingId(), "test");
   }

   @Test
   public void testDataDiskSizeDefault() {
      TemplateOptions options = new CloudStackTemplateOptions();
      assertEquals(options.as(CloudStackTemplateOptions.class).getDataDiskSize(), 0);
   }

      assertEquals(options.as(CloudStackTemplateOptions.class).getDataDiskSize(), 0);
   }

   @Test
   public void testDataDiskSize() {
      TemplateOptions options = dataDiskSize(10);
      assertEquals(options.as(CloudStackTemplateOptions.class).getDataDiskSize(), 10);
   }

      assertEquals(options.as(CloudStackTemplateOptions.class).getDataDiskSize(), 10);
   }

   @Test
   public void testAccount() {
      TemplateOptions options = account("test");
      assertEquals(options.as(CloudStackTemplateOptions.class).getAccount(), "test");
   }

      assertEquals(options.as(CloudStackTemplateOptions.class).getAccount(), "test");
   }

   @Test
   public void testDomainId() {
      TemplateOptions options = domainId("test");
      assertEquals(options.as(CloudStackTemplateOptions.class).getDomainId(), "test");
   }

         client.destroyNodesMatching(inGroup(group));
      } catch (Exception e) {

      }

      TemplateOptions options = client.templateOptions().blockOnPort(22, 120);
      try {
         Set<? extends NodeMetadata> nodes = client.createNodesInGroup(group, 1, options);
         NodeMetadata node = get(nodes, 0);
         LoginCredentials good = node.getCredentials();
         assert good.identity != null : nodes;

TOP

Related Classes of org.jclouds.compute.options.TemplateOptions

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.