Package org.jclouds.abiquo.domain.network

Examples of org.jclouds.abiquo.domain.network.PrivateNetwork$Builder


   }

   @Test(dependsOnMethods = "testUpdateVolume")
   public void testMoveVolume() {
      // Create the new virtual datacenter
      PrivateNetwork network = PrivateNetwork.builder(env.context.getApiContext()).name("DefaultNetwork")
            .gateway("192.168.1.1").address("192.168.1.0").mask(24).build();

      VirtualDatacenter newVdc = VirtualDatacenter.builder(env.context.getApiContext(), env.datacenter, env.enterprise)
            .name("New VDC").network(network).hypervisorType(env.machine.getType()).build();
      newVdc.save();
View Full Code Here


      assertEquals(updated.getName(), "Aloha updated");
   }

   public void testCreateRepeated() {
      PrivateNetwork newnet = PrivateNetwork.builder(env.context.getApiContext()).name("Newnet").gateway("10.0.0.1")
            .address("10.0.0.0").mask(24).build();

      VirtualDatacenter repeated = Builder.fromVirtualDatacenter(env.virtualDatacenter).network(newnet).build();

      repeated.save();
View Full Code Here

      assertNotNull(datacenters);
      assertTrue(size(datacenters) > 0);

      HypervisorType hypervisor = hypervisors.get(0);

      PrivateNetwork network = PrivateNetwork.builder(env.enterpriseAdminContext.getApiContext())
            .name("DefaultNetwork").gateway("192.168.1.1").address("192.168.1.0").mask(24).build();

      VirtualDatacenter virtualDatacenter = VirtualDatacenter
            .builder(env.enterpriseAdminContext.getApiContext(), datacenters.get(0), enterprise)
            .name(PREFIX + "Plain Virtual Aloha from ENT").cpuCountLimits(18, 20).hdLimitsInMb(279172872, 279172872)
View Full Code Here

      assertNotNull(enterprise);

      Datacenter datacenter = env.virtualDatacenter.getDatacenter();
      assertNotNull(datacenter);

      PrivateNetwork network = PrivateNetwork.builder(env.plainUserContext.getApiContext()).name("DefaultNetwork")
            .gateway("192.168.1.1").address("192.168.1.0").mask(24).build();

      VirtualDatacenter virtualDatacenter = VirtualDatacenter
            .builder(env.context.getApiContext(), datacenter, enterprise).name(PREFIX + "Plain Virtual Aloha from VDC")
            .cpuCountLimits(18, 20).hdLimitsInMb(279172872, 279172872).publicIpsLimits(2, 2).ramLimits(19456, 20480)
View Full Code Here

      }, null);
      assertNull(apiIp);
   }

   public void testGetDefaultNetwork() {
      PrivateNetwork network = env.virtualDatacenter.getDefaultNetwork().toPrivateNetwork();

      assertNotNull(network);
      assertEquals(network.getName(), env.privateNetwork.getName());
      assertEquals(network.getType(), env.privateNetwork.getType());
   }
View Full Code Here

   @SuppressWarnings("unchecked")
   private static VirtualDatacenter mockVirtualDatacenter() {
      ApiContext<AbiquoApi> context = EasyMock.createMock(ApiContext.class);
      Datacenter datacenter = EasyMock.createMock(Datacenter.class);
      Enterprise enterprise = EasyMock.createMock(Enterprise.class);
      PrivateNetwork network = EasyMock.createMock(PrivateNetwork.class);

      VirtualDatacenter vdc = VirtualDatacenter.builder(context, datacenter, enterprise) //
            .network(network) //
            .name("mock").build();
      vdc.unwrap().setId(5);
View Full Code Here

   @SuppressWarnings("unchecked")
   private static VirtualDatacenter mockVirtualDatacenter() {
      ApiContext<AbiquoApi> context = EasyMock.createMock(ApiContext.class);
      Datacenter datacenter = EasyMock.createMock(Datacenter.class);
      Enterprise enterprise = EasyMock.createMock(Enterprise.class);
      PrivateNetwork network = EasyMock.createMock(PrivateNetwork.class);

      VirtualDatacenter vdc = VirtualDatacenter.builder(context, datacenter, enterprise) //
            .network(network) //
            .name("mock").build();
      vdc.unwrap().setId(5);
View Full Code Here

   }

   @Test(dependsOnMethods = "testUpdateVolume")
   public void testMoveVolume() {
      // Create the new virtual datacenter
      PrivateNetwork network = PrivateNetwork.builder(env.context.getApiContext()).name("DefaultNetwork")
            .gateway("192.168.1.1").address("192.168.1.0").mask(24).build();

      VirtualDatacenter newVdc = VirtualDatacenter.builder(env.context.getApiContext(), env.datacenter, env.enterprise)
            .name("New VDC").network(network).hypervisorType(env.machine.getType()).build();
      newVdc.save();
View Full Code Here

      assertEquals(updated.getName(), "Aloha updated");
   }

   public void testCreateRepeated() {
      PrivateNetwork newnet = PrivateNetwork.builder(env.context.getApiContext()).name("Newnet").gateway("10.0.0.1")
            .address("10.0.0.0").mask(24).build();

      VirtualDatacenter repeated = Builder.fromVirtualDatacenter(env.virtualDatacenter).network(newnet).build();

      repeated.save();
View Full Code Here

      assertNotNull(datacenters);
      assertTrue(size(datacenters) > 0);

      HypervisorType hypervisor = hypervisors.get(0);

      PrivateNetwork network = PrivateNetwork.builder(env.enterpriseAdminContext.getApiContext())
            .name("DefaultNetwork").gateway("192.168.1.1").address("192.168.1.0").mask(24).build();

      VirtualDatacenter virtualDatacenter = VirtualDatacenter
            .builder(env.enterpriseAdminContext.getApiContext(), datacenters.get(0), enterprise)
            .name(PREFIX + "Plain Virtual Aloha from ENT").cpuCountLimits(18, 20).hdLimitsInMb(279172872, 279172872)
View Full Code Here

TOP

Related Classes of org.jclouds.abiquo.domain.network.PrivateNetwork$Builder

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.