Package com.cloud.stack.models

Examples of com.cloud.stack.models.CloudStackZone


        if ( null != zoneName) {
            interestedZones = new String[1];
            interestedZones[0] = zoneName;
        }else {
            CloudStackZone zone = findZone();
            if(zone != null){
                return zone.getId();
            }
        }

        zones = listZones(interestedZones, domainId);
View Full Code Here


        try {
            EC2Address ec2Address = new EC2Address();
            // this gets our networkId
            CloudStackAccount caller = getCurrentAccount();

            CloudStackZone zone = findZone();
            CloudStackNetwork net = findNetwork(zone);
//      CloudStackIpAddress resp = getApi().associateIpAddress(null, null, null, "0036952d-48df-4422-9fd0-94b0885e18cb");
            CloudStackIpAddress resp = getApi().associateIpAddress(zone.getId(), caller.getName(), caller.getDomainId(), net != null ? net.getId():null);
            ec2Address.setAssociatedInstanceId(resp.getId());

            if (resp.getIpAddress() == null) {
                List<CloudStackIpAddress> addrList = getApi().listPublicIpAddresses(null, null, null, null, null, null, null, null, null);
                if (addrList != null && addrList.size() > 0) {
View Full Code Here

            if (zones == null || zones.size() == 0) {
                logger.info("EC2 RunInstances - zone [" + request.getZoneName() + "] not found!");
                throw new EC2ServiceException(ClientError.InvalidZone_NotFound, "ZoneId [" + request.getZoneName() + "] not found!");
            }
            // we choose first zone?
            CloudStackZone zone = zones.get(0);

            // network
            CloudStackNetwork network = findNetwork(zone);

            // now actually deploy the vms
View Full Code Here

        if ( null != zoneName) {
            interestedZones = new String[1];
            interestedZones[0] = zoneName;
        }else {
            CloudStackZone zone = findZone();
            if(zone != null){
                return zone.getId();
            }
        }

        zones = listZones(interestedZones, domainId);
View Full Code Here

    try {
            EC2Address ec2Address = new EC2Address();
            // this gets our networkId
            CloudStackAccount caller = getCurrentAccount();
           
            CloudStackZone zone = findZone();
            CloudStackNetwork net = findNetwork(zone);
//      CloudStackIpAddress resp = getApi().associateIpAddress(null, null, null, "0036952d-48df-4422-9fd0-94b0885e18cb");
            CloudStackIpAddress resp = getApi().associateIpAddress(zone.getId(), caller.getName(), caller.getDomainId(), net != null ? net.getId():null);
      ec2Address.setAssociatedInstanceId(resp.getId());
     
      if (resp.getIpAddress() == null) {
          List<CloudStackIpAddress> addrList = getApi().listPublicIpAddresses(null, null, null, null, null, null, null, null, null);
          if (addrList != null && addrList.size() > 0) {
View Full Code Here

      if (zones == null || zones.size() == 0) {
        logger.info("EC2 RunInstances - zone [" + request.getZoneName() + "] not found!");
        throw new EC2ServiceException(ClientError.InvalidZone_NotFound, "ZoneId [" + request.getZoneName() + "] not found!");
      }
      // we choose first zone?
      CloudStackZone zone = zones.get(0);

      // network
      CloudStackNetwork network = findNetwork(zone);

      // now actually deploy the vms
View Full Code Here

    if ( null != zoneName) {
      interestedZones = new String[1];
      interestedZones[0] = zoneName;
    }else {
        CloudStackZone zone = findZone();
        if(zone != null){
            return zone.getId();
        }
    }

    zones = listZones(interestedZones, domainId);
View Full Code Here

        try {
            EC2Address ec2Address = new EC2Address();
            // this gets our networkId
            CloudStackAccount caller = getCurrentAccount();

            CloudStackZone zone = findZone();
            CloudStackNetwork net = findNetwork(zone);
//      CloudStackIpAddress resp = getApi().associateIpAddress(null, null, null, "0036952d-48df-4422-9fd0-94b0885e18cb");
            CloudStackIpAddress resp = getApi().associateIpAddress(zone.getId(), caller.getName(), caller.getDomainId(), net != null ? net.getId():null);
            ec2Address.setAssociatedInstanceId(resp.getId());

            if (resp.getIpAddress() == null) {
                List<CloudStackIpAddress> addrList = getApi().listPublicIpAddresses(null, null, null, null, null, null, null, null, null);
                if (addrList != null && addrList.size() > 0) {
View Full Code Here

            if (zones == null || zones.size() == 0) {
                logger.info("EC2 RunInstances - zone [" + request.getZoneName() + "] not found!");
                throw new EC2ServiceException(ClientError.InvalidZone_NotFound, "ZoneId [" + request.getZoneName() + "] not found!");
            }
            // we choose first zone?
            CloudStackZone zone = zones.get(0);

            // network
            CloudStackNetwork network = findNetwork(zone);

            // now actually deploy the vms
View Full Code Here

        if ( null != zoneName) {
            interestedZones = new String[1];
            interestedZones[0] = zoneName;
        }else {
            CloudStackZone zone = findZone();
            if(zone != null){
                return zone.getId();
            }
        }

        zones = listZones(interestedZones, domainId);
View Full Code Here

TOP

Related Classes of com.cloud.stack.models.CloudStackZone

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.