Examples of Pod


Examples of com.cloud.dc.Pod

    ExternalDhcpManager _dhcpMgr;
    private static final Map<Service, Map<Capability, String>> capabilities = setCapabilities();

    private boolean canHandle(DeployDestination dest, TrafficType trafficType, GuestType networkType) {
        DataCenter dc = dest.getDataCenter();
        Pod pod = dest.getPod();

        if ((pod != null && pod.getExternalDhcp()) && dc.getNetworkType() == NetworkType.Basic && trafficType == TrafficType.Guest
                && networkType == Network.GuestType.Shared) {
            s_logger.debug("External DHCP can handle");
            return true;
        }
View Full Code Here

Examples of com.cloud.dc.Pod

                            DataCenterIpAddressVO dcPrivateIp = _dcDao.allocatePrivateIpAddress(guestConfig.getDataCenterId(), lbProviderDevice.getUuid());
                            if (dcPrivateIp == null) {
                                throw new InsufficientNetworkCapacityException("failed to acquire a priavate IP in the zone " + guestConfig.getDataCenterId() +
                                        " needed for management IP of the load balancer appliance", DataCenter.class, guestConfig.getDataCenterId());
                            }
                            Pod pod = _podDao.findById(dcPrivateIp.getPodId());
                            String lbIP = dcPrivateIp.getIpAddress();
                            String netmask = NetUtils.getCidrNetmask(pod.getCidrSize());
                            String gateway = pod.getGateway();

                            // send CreateLoadBalancerApplianceCommand to the host capable of provisioning
                            CreateLoadBalancerApplianceCommand lbProvisionCmd = new CreateLoadBalancerApplianceCommand(lbIP, netmask, gateway);
                            CreateLoadBalancerApplianceAnswer createLbAnswer = null;
                            try {
View Full Code Here

Examples of com.cloud.dc.Pod

    }

    @Override
    public void reserve(NicProfile nic, Network config, VirtualMachineProfile<? extends VirtualMachine> vm, DeployDestination dest, ReservationContext context) throws InsufficientVirtualNetworkCapcityException,
            InsufficientAddressCapacityException {
        Pod pod = dest.getPod();
       
        Pair<String, Long> ip = _dcDao.allocatePrivateIpAddress(dest.getDataCenter().getId(), dest.getPod().getId(), nic.getId(), context.getReservationId());
        if (ip == null) {
            throw new InsufficientAddressCapacityException("Unable to get a management ip address", Pod.class, pod.getId());
        }
       
        nic.setIp4Address(ip.first());
        nic.setMacAddress(NetUtils.long2Mac(NetUtils.createSequenceBasedMacAddress(ip.second())));
        nic.setGateway(pod.getGateway());
        nic.setFormat(AddressFormat.Ip4);
        String netmask = NetUtils.getCidrNetmask(pod.getCidrSize());
        nic.setNetmask(netmask);
        nic.setBroadcastType(BroadcastDomainType.Native);
        nic.setBroadcastUri(null);
        nic.setIsolationUri(null);
       
View Full Code Here

Examples of com.cloud.dc.Pod

    public DomainRouterVO deployLoadBalancerVM(Long networkId, IPAddressVO ipAddr, Long accountId) { 
        NetworkVO network = _networkDao.findById(networkId);
        DataCenter dc = _dcDao.findById(network.getDataCenterId());
        Long podId = getPodIdForDirectIp(ipAddr);
        Pod pod = podId == null?null:_podDao.findById(podId);
        Map<VirtualMachineProfile.Param, Object> params = new HashMap<VirtualMachineProfile.Param, Object>(
                1);
        params.put(VirtualMachineProfile.Param.ReProgramGuestNetworks, true);
        Account owner = _accountService.getActiveAccountByName("system", new Long(1));
        DeployDestination dest = new DeployDestination(dc, pod, null, null);
View Full Code Here

Examples of org.jclouds.cloudstack.domain.Pod

         HttpResponse.builder()
            .statusCode(200)
            .payload(payloadFromResource("/listpodsresponse.json"))
            .build());

      Pod pod1 = Pod.builder()
         .id("1")
         .name("Dev Pod 1")
         .zoneId("1")
         .zoneName("Dev Zone 1")
         .gateway("10.26.26.254")
         .netmask("255.255.255.0")
         .startIp("10.26.26.50")
         .endIp("10.26.26.100")
         .allocationState(AllocationState.ENABLED)
         .build();
      Pod pod2 = Pod.builder()
         .id("2")
         .name("Dev Pod 2")
         .zoneId("2")
         .zoneName("Dev Zone 2")
         .gateway("10.22.22.254")
View Full Code Here

Examples of org.jclouds.cloudstack.domain.Pod

         HttpResponse.builder()
            .statusCode(200)
            .payload(payloadFromResource("/createpodresponse.json"))
            .build());

      Pod expected = Pod.builder()
         .id("6")
         .name("richard-pod")
         .zoneId("10")
         .zoneName("richard-zone")
         .gateway("172.20.0.254")
         .netmask("255.255.255.0")
         .startIp("172.20.0.1")
         .endIp("172.20.0.250")
         .allocationState(AllocationState.ENABLED)
         .build();

      Pod actual = client.createPod("richard-pod", "10", "172.20.0.1", "172.20.0.250", "172.20.0.254", "255.255.255.0",
         CreatePodOptions.Builder.allocationState(AllocationState.ENABLED));

      assertEquals(actual, expected);
   }
View Full Code Here

Examples of org.jclouds.cloudstack.domain.Pod

         HttpResponse.builder()
            .statusCode(200)
            .payload(payloadFromResource("/updatepodresponse.json"))
            .build());

      Pod expected = Pod.builder()
         .id("7")
         .name("richard-updatedpod")
         .zoneId("11")
         .zoneName("richard-zone")
         .gateway("172.21.0.254")
         .netmask("255.255.255.128")
         .startIp("172.21.0.129")
         .endIp("172.21.0.250")
         .allocationState(AllocationState.DISABLED)
         .build();

      Pod actual = client.updatePod("7", UpdatePodOptions.Builder
         .netmask("255.255.255.128")
         .name("richard-updatepod")
         .startIp("172.21.0.129")
         .endIp("172.21.0.250")
         .gateway("172.21.0.254")
View Full Code Here

Examples of org.jclouds.cloudstack.domain.Pod

      assert null != response;
      long podCount = response.size();
      assertTrue(podCount >= 0);

      for (Pod pod : response) {
         Pod newDetails = Iterables.getOnlyElement(globalAdminClient.getPodClient().listPods(
            ListPodsOptions.Builder.id(pod.getId())));
         assertEquals(pod, newDetails);
         assertEquals(pod, globalAdminClient.getPodClient().getPod(pod.getId()));
         assertNotNull(pod.getId());
         assertFalse(Strings.isNullOrEmpty(pod.getName()));
View Full Code Here

Examples of org.jclouds.cloudstack.domain.Pod

      assertEquals(pod.getAllocationState(), AllocationState.ENABLED);
   }

   @Test(dependsOnMethods = "testCreatePod")
   public void testUpdatePod() {
      Pod updated = globalAdminClient.getPodClient().updatePod(pod.getId(), UpdatePodOptions.Builder
         .name(prefix + "-updatedpod")
         .startIp("172.21.0.129")
         .endIp("172.21.0.250")
         .gateway("172.21.0.254")
         .netmask("255.255.255.128")
         .allocationState(AllocationState.DISABLED)
      );

      assertNotNull(updated);
      assertEquals(updated.getName(), prefix + "-updatedpod");
      assertEquals(updated.getZoneId(), zone.getId());
      assertEquals(updated.getZoneName(), prefix + "-zone-for-pod");
      assertEquals(updated.getStartIp(), "172.21.0.129");
      assertEquals(updated.getEndIp(), "172.21.0.250");
      assertEquals(updated.getGateway(), "172.21.0.254");
      assertEquals(updated.getNetmask(), "255.255.255.128");
      assertEquals(updated.getAllocationState(), AllocationState.DISABLED);
   }
View Full Code Here

Examples of org.jclouds.cloudstack.domain.Pod

      assert null != response;
      long podCount = response.size();
      assertTrue(podCount >= 0);

      for (Pod pod : response) {
         Pod newDetails = Iterables.getOnlyElement(globalAdminClient.getPodClient().listPods(
            ListPodsOptions.Builder.id(pod.getId())));
         assertEquals(pod, newDetails);
         assertEquals(pod, globalAdminClient.getPodClient().getPod(pod.getId()));
         assertNotNull(pod.getId());
         assertFalse(Strings.isNullOrEmpty(pod.getName()));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.