Package org.apache.stratos.cloud.controller.exception

Examples of org.apache.stratos.cloud.controller.exception.InvalidPartitionException


                    String msg =
                                 "Invalid Partition Detected : " + partitionId +
                                         " - Cause: Invalid Region: " + region;
                    log.error(msg);
                    throw new InvalidPartitionException(msg);
                }
               
                iaas.isValidRegion(region);
               
                IaasProvider updatedIaasProvider = new IaasProvider(iaasProvider);
               
                Iaas updatedIaas = CloudControllerUtil.getIaas(updatedIaasProvider);
                updatedIaas.setIaasProvider(updatedIaasProvider);
               
                if (properties.containsKey(Scope.zone.toString())) {
                    String zone = properties.getProperty(Scope.zone.toString());
                    iaas.isValidZone(region, zone);
                    updatedIaasProvider.setProperty(CloudControllerConstants.AVAILABILITY_ZONE, zone);
                    updatedIaas = CloudControllerUtil.getIaas(updatedIaasProvider);
                    updatedIaas.setIaasProvider(updatedIaasProvider);
                }
               
                return updatedIaasProvider;
               
            } else {
               
                return iaasProvider;
            }
        } catch (Exception ex) {
            String msg = "Invalid Partition Detected : "+partitionId+". Cause: "+ex.getMessage();
            log.error(msg, ex);
            throw new InvalidPartitionException(msg, ex);
        }
       
    }
View Full Code Here


                    String msg =
                                 "Invalid Partition Detected : " + partitionId +
                                         " - Cause: Invalid Region: " + region;
                    log.error(msg);
                    throw new InvalidPartitionException(msg);
                }
               
                iaas.isValidRegion(region);
               
                IaasProvider updatedIaasProvider = new IaasProvider(iaasProvider);
                Iaas updatedIaas = CloudControllerUtil.getIaas(updatedIaasProvider);
                updatedIaas.setIaasProvider(updatedIaasProvider);
               
                if (properties.containsKey(Scope.zone.toString())) {
                    String zone = properties.getProperty(Scope.zone.toString());
                    iaas.isValidZone(region, zone);
                   
                    updatedIaasProvider.setProperty(CloudControllerConstants.AVAILABILITY_ZONE, zone);
                    updatedIaas = CloudControllerUtil.getIaas(updatedIaasProvider);
                    updatedIaas.setIaasProvider(updatedIaasProvider);
                }
               
                return updatedIaasProvider;
               
               
            } else {

                return iaasProvider;
            }
        } catch (Exception ex) {
            String msg = "Invalid Partition Detected : "+partitionId+". Cause: "+ex.getMessage();
            log.error(msg, ex);
            throw new InvalidPartitionException(msg, ex);
        }
    }
View Full Code Here

        if (iaasProvider == null) {
            String msg =
                         "Invalid Partition - " + partition.toString() +
                                 ". Cause: Iaas Provider is null for Provider: " + provider;
            log.error(msg);
            throw new InvalidPartitionException(msg);
        }

        Iaas iaas = iaasProvider.getIaas();
       
        if (iaas == null) {
           
            try {
                iaas = CloudControllerUtil.getIaas(iaasProvider);
            } catch (InvalidIaasProviderException e) {
                String msg =
                        "Invalid Partition - " + partition.toString() +
                        ". Cause: Unable to build Iaas of this IaasProvider [Provider] : " + provider+". "+e.getMessage();
                log.error(msg, e);
                throw new InvalidPartitionException(msg, e);
            }
           
        }
       
        PartitionValidator validator = iaas.getPartitionValidator();
View Full Code Here

TOP

Related Classes of org.apache.stratos.cloud.controller.exception.InvalidPartitionException

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.