Examples of DeploymentPolicy


Examples of org.apache.stratos.autoscaler.deployment.policy.DeploymentPolicy

        }

        AutoscalePolicy policy =
                                 PolicyManager.getInstance()
                                              .getAutoscalePolicy(autoscalePolicyName);
        DeploymentPolicy deploymentPolicy =
                                            PolicyManager.getInstance()
                                                         .getDeploymentPolicy(deploymentPolicyName);

        if (deploymentPolicy == null) {
            String msg = "Deployment Policy is null. Policy name: " + deploymentPolicyName;
            log.error(msg);
            throw new PolicyValidationException(msg);
        }

        String clusterId = cluster.getClusterId();
        LbClusterMonitor clusterMonitor =
                                        new LbClusterMonitor(clusterId,
                                                           cluster.getServiceName(),
                                                           deploymentPolicy, policy);
        // partition group = network partition context
        for (PartitionGroup partitionGroup : deploymentPolicy.getPartitionGroups()) {

            NetworkPartitionLbHolder networkPartitionLbHolder =
                                                              PartitionManager.getInstance()
                                                                              .getNetworkPartitionLbHolder(partitionGroup.getId());
//                                                              PartitionManager.getInstance()
View Full Code Here

Examples of org.apache.stratos.autoscaler.deployment.policy.DeploymentPolicy

    try {
     
      DeploymentPolicyReader reader = new DeploymentPolicyReader(policyFile);
     
      DeploymentPolicy policy = reader.read();
      PolicyManager.getInstance().addDeploymentPolicyToInformationModel(policy);

      log.info("Successfully deployed the policy specified at "
          + deploymentFileData.getAbsolutePath());
View Full Code Here

Examples of org.apache.stratos.rest.endpoint.bean.autoscaler.policy.deployment.DeploymentPolicy

    public Partition[] getPartitions(String deploymentPolicyId, String partitionGroupId) throws RestAPIException{
        if(!deploymentPolicyMap.containsKey(deploymentPolicyId)){
            throw new RestAPIException("There is no deployment policy with id: " + deploymentPolicyId);
        }
        Partition[] partitions = null;
         DeploymentPolicy deploymentPolicy = deploymentPolicyMap.get(deploymentPolicyId);
         for(PartitionGroup partitionGroup : deploymentPolicy.partitionGroup){
             if(partitionGroup.id.equals(partitionGroupId)){
                 partitions =  partitionGroup.partition.toArray(new Partition[0]);
             }
         }
View Full Code Here

Examples of org.apache.stratos.rest.endpoint.bean.autoscaler.policy.deployment.DeploymentPolicy

    }

    public static DeploymentPolicy populateDeploymentPolicyPojo (org.apache.stratos.autoscaler.deployment.policy.DeploymentPolicy
                                                                 deploymentPolicy) {

        DeploymentPolicy deploymentPolicyBean = new DeploymentPolicy();
        if(deploymentPolicy == null) {
            return deploymentPolicyBean;
        }

        deploymentPolicyBean.id = deploymentPolicy.getId();
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.