Package org.apache.stratos.cloud.controller.interfaces

Examples of org.apache.stratos.cloud.controller.interfaces.Iaas


        throw new InvalidIaasProviderException(msg);
      }
     
      Constructor<?> c = Class.forName(iaasProvider.getClassName())
          .getConstructor(IaasProvider.class);
      Iaas iaas = (Iaas) c.newInstance(iaasProvider);
      return iaas;
    } catch (Exception e) {
      String msg = "Class [" + iaasProvider.getClassName()
          + "] which represents the iaas of type: ["
          + iaasProvider.getType() + "] has failed to instantiate.";
View Full Code Here


               
                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 {
View Full Code Here

                }
               
                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;
               
               
View Full Code Here

                                 ". 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();
        validator.setIaasProvider(iaasProvider);
        IaasProvider updatedIaasProvider =
                                           validator.validate(partition.getId(),
                                                              CloudControllerUtil.toJavaUtilProperties(partition.getProperties()));
       
View Full Code Here

TOP

Related Classes of org.apache.stratos.cloud.controller.interfaces.Iaas

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.