Package org.jclouds.trmk.vcloud_0_8.domain

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


         // is not set, they are expected to add NetworkConfig to the options
         // when
         // launching a
         // server.
         Network orgNetwork = client.getNetwork(arg0.getHref());
         NetworkExtendedInfo terremarkNetwork = client.getNetworkExtendedInfo(checkNotNull(
               checkNotNull(orgNetwork, "network at: " + arg0).getNetworkExtension(), "network extension for: " + arg0)
               .getHref());
         return checkNotNull(terremarkNetwork, "terremark network extension at: " + orgNetwork.getNetworkExtension())
               .getNetworkType() == NetworkExtendedInfo.Type.DMZ;
      }
View Full Code Here


public class NetworkExtendedInfoHandlerTest extends BaseHandlerTest {

   public void test1() throws UnknownHostException {
      InputStream is = getClass().getResourceAsStream("/TerremarkNetwork.xml");

      NetworkExtendedInfo result = factory.create(injector.getInstance(NetworkExtendedInfoHandler.class)).parse(is);
      assertEquals(result, new NetworkExtendedInfo("XXXXX", URI
               .create("https://services.enterprisecloud.terremark.com/api/v0.8b-ext2.5/extensions/network/XXXXX"),
               "10.X.X.0/27", "209.X.X.X", "10.X.X.0", "10.X.X.X", "10.X.X.1", NetworkExtendedInfo.Type.DMZ, "279",
               "10.X.X.0/27 (DMZ_279)"));
   }
View Full Code Here

   private String vlan;
   private String friendlyName;

   @Override
   public NetworkExtendedInfo getResult() {
      return new NetworkExtendedInfo(id, href, name, rnatAddress, address, broadcastAddress, gatewayAddress,
            networkType, vlan, friendlyName);
   }
View Full Code Here

         // is not set, they are expected to add NetworkConfig to the options
         // when
         // launching a
         // server.
         Network orgNetwork = client.getNetwork(arg0.getHref());
         NetworkExtendedInfo terremarkNetwork = client.getNetworkExtendedInfo(checkNotNull(
               checkNotNull(orgNetwork, "network at: " + arg0).getNetworkExtension(), "network extension for: " + arg0)
               .getHref());
         return checkNotNull(terremarkNetwork, "terremark network extension at: " + orgNetwork.getNetworkExtension())
               .getNetworkType() == NetworkExtendedInfo.Type.DMZ;
      }
View Full Code Here

public class NodeHandlerTest extends BaseHandlerTest {

   public void test1() throws UnknownHostException {
      InputStream is = getClass().getResourceAsStream("/NodeService.xml");

      Node result = factory.create(injector.getInstance(NodeHandler.class)).parse(is);
      assertEquals(result, new Node("Node for Jim", URI
            .create("https://services.vcloudexpress.terremark.com/api/v0.8/NodeServices/242"), "172.16.20.3", 80,
            false, "Some test node"));
   }
View Full Code Here

            return from.getHref();
         }

      });
      try {
         Org org = uriToOrg.get(from == null ? defaultOrg.get().getHref() : from);
         return getUriFromOrg(org);
      } catch (NullPointerException e) {
         throw new ResourceNotFoundException("org " + from + " not found in: " + uriToOrg, e);
      }
   }
View Full Code Here

   public void testApplyInputStream() {

      InputStream is = getClass().getResourceAsStream("/org.xml");

      Org result =  factory.create(injector.getInstance(OrgHandler.class)).parse(is);
      assertEquals(result.getName(), "adrian@jclouds.org");
      assertEquals(result.getHref(), URI.create("https://services.vcloudexpress.terremark.com/api/v0.8a-ext1.6/org/48"));
      assertEquals(result.getCatalogs(), ImmutableMap.of("Miami Environment 1 Catalog", new ReferenceTypeImpl(
               "Miami Environment 1 Catalog", CATALOG_XML, URI
                        .create("https://services.vcloudexpress.terremark.com/api/v0.8a-ext1.6/vdc/32/catalog"))));
      assertEquals(result.getVDCs(), ImmutableMap.of("Miami Environment 1", new ReferenceTypeImpl(
               "Miami Environment 1", TerremarkVCloudMediaType.VDC_XML, URI
                        .create("https://services.vcloudexpress.terremark.com/api/v0.8a-ext1.6/vdc/32"))));
      assertEquals(result.getTasksLists(), ImmutableMap.of(
            "Miami Environment 1 Tasks List",
            new ReferenceTypeImpl("Miami Environment 1 Tasks List", TASKSLIST_XML, URI
                  .create("https://services.vcloudexpress.terremark.com/api/v0.8a-ext1.6/vdc/32/tasksList"))));
      assertEquals(result.getKeys(), new ReferenceTypeImpl("Keys", "application/vnd.tmrk.vcloudExpress.keysList+xml",
               URI.create("https://services.vcloudexpress.terremark.com/api/v0.8a-ext1.6/extensions/org/48/keys")));

   }
View Full Code Here

      InputStream is = getClass().getResourceAsStream("/InternetServices.xml");

      Set<InternetService> result = factory.create(injector.getInstance(InternetServicesHandler.class)).parse(is);
      assertEquals(result.toString(), ImmutableSet.of(new InternetService("IS_for_Jim2", URI
               .create("https://services.vcloudexpress.terremark.com/api/v0.8/InternetServices/524"),
               new PublicIpAddress("10.1.22.159", URI
                        .create("https://services.vcloudexpress.terremark.com/api/v0.8/PublicIps/4208")), 45,
               Protocol.HTTP, false, 1, "Some test service")).toString());
   }
View Full Code Here

public class PublicIpAddressHandlerTest extends BaseHandlerTest {

   public void test1() throws UnknownHostException {
      InputStream is = getClass().getResourceAsStream("/PublicIpAddress.xml");

      PublicIpAddress result = factory.create(injector.getInstance(PublicIpAddressHandler.class)).parse(is);
      assertEquals(result, new PublicIpAddress("204.51.112.91", URI
            .create("https://services.vcloudexpress.terremark.com/api/v0.8/PublicIps/8720")));
   }
View Full Code Here

            vApp.getName() + "-" + port,
            protocol,
            port,
            withDescription(String.format("port %d access to serverId: %s name: %s", port, vApp.getName(),
                  vApp.getName())));
      PublicIpAddress ip = is.getPublicIpAddress();
      Map<InternetService, PublicIpAddress> result = ImmutableMap.<InternetService, PublicIpAddress> of(is, ip);
      Entry<InternetService, PublicIpAddress> entry = Iterables.getOnlyElement(result.entrySet());
      return entry;
   }
View Full Code Here

TOP

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

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.