Package org.jclouds.compute.options

Examples of org.jclouds.compute.options.TemplateOptions


      assertEquals(options.as(CloudStackTemplateOptions.class).getNetworks(), ImmutableSet.of("3"));
   }

   @Test
   public void testNetworkIdStatic() {
      TemplateOptions options = networks(ImmutableSet.of("3"));
      assertEquals(options.as(CloudStackTemplateOptions.class).getNetworks(), ImmutableSet.of("3"));
   }


      assertEquals(options.as(CloudStackTemplateOptions.class).getNetworks(), ImmutableSet.of("3"));
   }

   @Test
   public void testNetworkIds() {
      TemplateOptions options = new CloudStackTemplateOptions().networks(ImmutableSet.of("3"));
      assertEquals(options.as(CloudStackTemplateOptions.class).getNetworks(), ImmutableSet.of("3"));
   }

      assertEquals(options.as(CloudStackTemplateOptions.class).getNetworks(), ImmutableSet.of("3"));
   }

   @Test
   public void testNetworkIdsStatic() {
      TemplateOptions options = networks(ImmutableSet.of("3"));
      assertEquals(options.as(CloudStackTemplateOptions.class).getNetworks(), ImmutableSet.of("3"));
   }

      assertEquals(options.as(CloudStackTemplateOptions.class).getNetworks(), ImmutableSet.of("3"));
   }

   @Test
   public void testIpOnDefaultNetwork() {
      TemplateOptions options = new CloudStackTemplateOptions().ipOnDefaultNetwork("10.0.0.1");
      assertEquals(options.as(CloudStackTemplateOptions.class).getIpOnDefaultNetwork(), "10.0.0.1");
   }

      assertEquals(options.as(CloudStackTemplateOptions.class).getIpOnDefaultNetwork(), "10.0.0.1");
   }

   @Test
   public void testIpOnDefaultNetworkStatic() {
      TemplateOptions options = ipOnDefaultNetwork("10.0.0.1");
      assertEquals(options.as(CloudStackTemplateOptions.class).getIpOnDefaultNetwork(), "10.0.0.1");
   }

   @Test
   public void testIpsToNetwork() {
      Map<String, String> ipsToNetworks = Maps.newHashMap();
      ipsToNetworks.put("10.0.0.1", "5");

      TemplateOptions options = new CloudStackTemplateOptions().ipsToNetworks(ipsToNetworks);
      assertEquals(options.as(CloudStackTemplateOptions.class)
         .getIpsToNetworks().get("10.0.0.1"), "5");
   }

   @Test
   public void testIpsToNetworkStatic() {
      Map<String, String> ipsToNetworks = Maps.newHashMap();
      ipsToNetworks.put("10.0.0.1", "5");

      TemplateOptions options = ipsToNetworks(ipsToNetworks);
      assertEquals(options.as(CloudStackTemplateOptions.class)
         .getIpsToNetworks().get("10.0.0.1"), "5");
   }

         .getIpsToNetworks().get("10.0.0.1"), "5");
   }

   @Test
   public void testSetupStaticNatDefaultsTrue() {
      TemplateOptions options = new CloudStackTemplateOptions();
      assertTrue(options.as(CloudStackTemplateOptions.class)
         .shouldSetupStaticNat());
   }

         .shouldSetupStaticNat());
   }

   @Test
   public void testSetupStaticNat() {
      TemplateOptions options = new CloudStackTemplateOptions().setupStaticNat(false);
      assertFalse(options.as(CloudStackTemplateOptions.class)
         .shouldSetupStaticNat());
   }

         .shouldSetupStaticNat());
   }

   @Test
   public void testSetupStaticNatStatic() {
      TemplateOptions options = setupStaticNat(false);
      assertFalse(options.as(CloudStackTemplateOptions.class)
         .shouldSetupStaticNat());
   }

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.