You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by ni...@apache.org on 2014/05/07 00:57:04 UTC
[1/8] git commit: fixing
https://issues.apache.org/jira/browse/STRATOS-633
Repository: incubator-stratos
Updated Branches:
refs/heads/master c6a4c3cc4 -> 5c335754a
fixing https://issues.apache.org/jira/browse/STRATOS-633
Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/3280f085
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/3280f085
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/3280f085
Branch: refs/heads/master
Commit: 3280f0856f6328823a148b79db7fe017f9bc3fb7
Parents: 4dc55a3
Author: Nirmal Fernando <ni...@apache.org>
Authored: Tue Apr 29 10:05:56 2014 +0530
Committer: Nirmal Fernando <ni...@apache.org>
Committed: Tue Apr 29 10:05:56 2014 +0530
----------------------------------------------------------------------
.../apache/stratos/manager/repository/RepositoryNotification.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/3280f085/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/repository/RepositoryNotification.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/repository/RepositoryNotification.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/repository/RepositoryNotification.java
index 8c10d5a..a109de4 100644
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/repository/RepositoryNotification.java
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/repository/RepositoryNotification.java
@@ -57,7 +57,7 @@ public class RepositoryNotification {
if (cartridgeSubscription.getRepository() != null) {
InstanceNotificationPublisher publisher = new InstanceNotificationPublisher();
publisher.sendArtifactUpdateEvent(cartridgeSubscription.getRepository(),
- String.valueOf(cartridgeSubscription.getCluster().getId()),
+ cartridgeSubscription.getCluster().getClusterDomain(),
String.valueOf(cartridgeSubscription.getSubscriber().getTenantId()));
if (log.isDebugEnabled()) {
[8/8] git commit: fixing
https://issues.apache.org/jira/browse/STRATOS-645 - modifications to scaling
drools file
Posted by ni...@apache.org.
fixing https://issues.apache.org/jira/browse/STRATOS-645 - modifications to scaling drools file
Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/5c335754
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/5c335754
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/5c335754
Branch: refs/heads/master
Commit: 5c335754a0bee9489701260f63d6c9bb76795b27
Parents: f13e59b
Author: Nirmal Fernando <ni...@apache.org>
Authored: Wed May 7 04:26:16 2014 +0530
Committer: Nirmal Fernando <ni...@apache.org>
Committed: Wed May 7 04:26:16 2014 +0530
----------------------------------------------------------------------
.../distribution/src/main/conf/scaling.drl | 26 ++++++++++++++------
1 file changed, 18 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/5c335754/products/stratos/modules/distribution/src/main/conf/scaling.drl
----------------------------------------------------------------------
diff --git a/products/stratos/modules/distribution/src/main/conf/scaling.drl b/products/stratos/modules/distribution/src/main/conf/scaling.drl
index c192cd2..8600a27 100644
--- a/products/stratos/modules/distribution/src/main/conf/scaling.drl
+++ b/products/stratos/modules/distribution/src/main/conf/scaling.drl
@@ -67,36 +67,46 @@ dialect "mvel"
eval(log.debug("[scaling] [network-partition] " + $networkPartitionContext.getId() + " [cluster] " + clusterId + " Algorithm name: " + algorithmName))
eval(log.debug("[scaling] [network-partition] " + $networkPartitionContext.getId() + " [cluster] " + clusterId + " Algorithm: " + autoscaleAlgorithm))
+
+ rifUpperLimit : Float() from $loadThresholds.getRequestsInFlight().getUpperLimit()
+ rifLowerLimit : Float() from $loadThresholds.getRequestsInFlight().getLowerLimit()
rifAverage : Float() from $networkPartitionContext.getAverageRequestsInFlight()
rifGradient : Float() from $networkPartitionContext.getRequestsInFlightGradient()
rifSecondDerivative : Float() from $networkPartitionContext.getRequestsInFlightSecondDerivative()
- rifAverageLimit : Float() from $loadThresholds.getRequestsInFlight().getAverage()
rifPredictedValue : Double() from $delegator.getPredictedValueForNextMinute(rifAverage, rifGradient, rifSecondDerivative, 1)
+ mcUpperLimit : Float() from $loadThresholds.getMemoryConsumption().getUpperLimit()
+ mcLowerLimit : Float() from $loadThresholds.getMemoryConsumption().getLowerLimit()
+
memoryConsumptionAverage : Float() from $networkPartitionContext.getAverageMemoryConsumption()
memoryConsumptionGradient : Float() from $networkPartitionContext.getMemoryConsumptionGradient()
memoryConsumptionSecondDerivative : Float() from $networkPartitionContext.getMemoryConsumptionSecondDerivative()
- mcAverageLimit : Float() from $loadThresholds.getMemoryConsumption().getAverage()
mcPredictedValue : Double() from $delegator.getPredictedValueForNextMinute(memoryConsumptionAverage, memoryConsumptionGradient, memoryConsumptionSecondDerivative, 1)
+ laUpperLimit : Float() from $loadThresholds.getLoadAverage().getUpperLimit()
+ laLowerLimit : Float() from $loadThresholds.getLoadAverage().getLowerLimit()
+
loadAverageAverage : Float() from $networkPartitionContext.getAverageLoadAverage()
loadAverageGradient : Float() from $networkPartitionContext.getLoadAverageGradient()
loadAverageSecondDerivative : Float() from $networkPartitionContext.getLoadAverageSecondDerivative()
- laAverageLimit : Float() from $loadThresholds.getLoadAverage().getAverage()
laPredictedValue : Double() from $delegator.getPredictedValueForNextMinute(loadAverageAverage, loadAverageGradient, loadAverageSecondDerivative, 1)
- scaleUp : Boolean() from ((rifReset && (rifPredictedValue > rifAverageLimit * 0.8)) || (mcReset && (mcPredictedValue > mcAverageLimit * 0.8)) || (laReset && (laPredictedValue > laAverageLimit * 0.8)))
- scaleDown : Boolean() from ((rifReset && (rifPredictedValue < rifAverageLimit * 0.1)) && (mcReset && (mcPredictedValue < mcAverageLimit * 0.1)) && (laReset && (laPredictedValue < laAverageLimit * 0.1)))
+ scaleUp : Boolean() from ((rifReset && (rifPredictedValue > rifUpperLimit)) || (mcReset && (mcPredictedValue > mcUpperLimit)) || (laReset && (laPredictedValue > laUpperLimit)))
+ scaleDown : Boolean() from ((rifReset && (rifPredictedValue < rifLowerLimit )) && (mcReset && (mcPredictedValue < mcLowerLimit)) && (laReset && (laPredictedValue < laLowerLimit)))
+ eval(log.debug("[scaling] " + " [cluster] " + clusterId + " RIF Resetted?: " + rifReset))
eval(log.debug("[scaling] " + " [cluster] " + clusterId + " RIF predicted value: " + rifPredictedValue))
- eval(log.debug("[scaling] " + " [cluster] " + clusterId + " RIF average limit: " + rifAverageLimit))
+ eval(log.debug("[scaling] " + " [cluster] " + clusterId + " RIF upper limit: " + rifUpperLimit))
+ eval(log.debug("[scaling] " + " [cluster] " + clusterId + " RIF lower limit: " + rifLowerLimit))
eval(log.debug("[scaling] " + " [cluster] " + clusterId + " MC predicted value: " + mcPredictedValue))
- eval(log.debug("[scaling] " + " [cluster] " + clusterId + " MC average limit: " + mcAverageLimit))
+ eval(log.debug("[scaling] " + " [cluster] " + clusterId + " MC upper limit: " + mcUpperLimit))
+ eval(log.debug("[scaling] " + " [cluster] " + clusterId + " MC lower limit: " + mcLowerLimit))
eval(log.debug("[scaling] " + " [cluster] " + clusterId + " LA predicted value: " + laPredictedValue))
- eval(log.debug("[scaling] " + " [cluster] " + clusterId + " LA Average limit: " + laAverageLimit))
+ eval(log.debug("[scaling] " + " [cluster] " + clusterId + " LA upper limit: " + laUpperLimit))
+ eval(log.debug("[scaling] " + " [cluster] " + clusterId + " LA lower limit: " + laLowerLimit))
eval(log.debug("[scaling] " + " [cluster] " + clusterId + " Scale-up action: " + scaleUp))
eval(log.debug("[scaling] " + " [cluster] " + clusterId + " Scale-down action: " + scaleDown))
[4/8] git commit: fixing
https://issues.apache.org/jira/browse/STRATOS-645
Posted by ni...@apache.org.
fixing https://issues.apache.org/jira/browse/STRATOS-645
Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/9f4c29f5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/9f4c29f5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/9f4c29f5
Branch: refs/heads/master
Commit: 9f4c29f5a36bfcb30d972e28427f2cfda24623f8
Parents: bd79408
Author: Nirmal Fernando <ni...@apache.org>
Authored: Wed May 7 04:22:56 2014 +0530
Committer: Nirmal Fernando <ni...@apache.org>
Committed: Wed May 7 04:22:56 2014 +0530
----------------------------------------------------------------------
.../partials/configure_stratos_wizard.hbs | 21 ++++++--------------
1 file changed, 6 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9f4c29f5/components/org.apache.stratos.manager.console/console/themes/theme1/partials/configure_stratos_wizard.hbs
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/themes/theme1/partials/configure_stratos_wizard.hbs b/components/org.apache.stratos.manager.console/console/themes/theme1/partials/configure_stratos_wizard.hbs
index 229eb59..5f9ea27 100644
--- a/components/org.apache.stratos.manager.console/console/themes/theme1/partials/configure_stratos_wizard.hbs
+++ b/components/org.apache.stratos.manager.console/console/themes/theme1/partials/configure_stratos_wizard.hbs
@@ -307,25 +307,16 @@
"id": "economyPolicy",
"loadThresholds": {
"requestsInFlight": {
- "average": "40",
- "gradient": "0",
- "secondDerivative": "0",
- "scaleDownMarginOfGradient": "1.0",
- "scaleDownMarginOfSecondDerivative": "0.2"
+ "upperLimit": "80",
+ "lowerLimit": "20"
},
"memoryConsumption": {
- "average": "100",
- "gradient": "0",
- "secondDerivative": "0",
- "scaleDownMarginOfGradient": "1.0",
- "scaleDownMarginOfSecondDerivative": "0.2"
+ "upperLimit": "80",
+ "lowerLimit": "20"
},
"loadAverage": {
- "average": "100",
- "gradient": "0",
- "secondDerivative": "0",
- "scaleDownMarginOfGradient": "1.0",
- "scaleDownMarginOfSecondDerivative": "0.2"
+ "upperLimit": "80",
+ "lowerLimit": "20"
}
}
}
[5/8] git commit: fixing
https://issues.apache.org/jira/browse/STRATOS-645 - for autoscaler
Posted by ni...@apache.org.
fixing https://issues.apache.org/jira/browse/STRATOS-645 - for autoscaler
Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/ea1844f0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/ea1844f0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/ea1844f0
Branch: refs/heads/master
Commit: ea1844f0f75773bb85f205ea848e35895e670b93
Parents: 9f4c29f
Author: Nirmal Fernando <ni...@apache.org>
Authored: Wed May 7 04:23:44 2014 +0530
Committer: Nirmal Fernando <ni...@apache.org>
Committed: Wed May 7 04:23:44 2014 +0530
----------------------------------------------------------------------
.../org.apache.stratos.autoscaler/pom.xml | 2 -
.../deployers/AutoscalerPolicyDeployer.java | 114 -------------------
.../deployers/AutoscalerPolicyReader.java | 113 ------------------
.../policy/model/LoadAverageThresholds.java | 52 +++++++++
.../autoscaler/policy/model/LoadThresholds.java | 30 ++---
.../model/MemoryConsumptionThresholds.java | 52 +++++++++
.../model/RequestsInFlightThresholds.java | 53 +++++++++
7 files changed, 172 insertions(+), 244 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/ea1844f0/components/org.apache.stratos.autoscaler/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/pom.xml b/components/org.apache.stratos.autoscaler/pom.xml
index cbc4090..d0d1167 100644
--- a/components/org.apache.stratos.autoscaler/pom.xml
+++ b/components/org.apache.stratos.autoscaler/pom.xml
@@ -196,8 +196,6 @@
</Import-Package>
<Bundle-Activator>org.apache.stratos.autoscaler.internal.ASBundleActivater</Bundle-Activator>
<DynamicImport-Package>*</DynamicImport-Package>
- <!--<Axis2Deployer>AutoscalerPolicyDeployer</Axis2Deployer>
- <Axis2Deployer>DeploymentPolicyDeployer</Axis2Deployer>-->
<Embed-Dependency>*;scope=compile|runtime</Embed-Dependency>
<Embed-Directory>lib</Embed-Directory>
</instructions>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/ea1844f0/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/policy/deployers/AutoscalerPolicyDeployer.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/policy/deployers/AutoscalerPolicyDeployer.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/policy/deployers/AutoscalerPolicyDeployer.java
deleted file mode 100644
index 861dab8..0000000
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/policy/deployers/AutoscalerPolicyDeployer.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.stratos.autoscaler.policy.deployers;
-
-import java.io.File;
-
-import org.apache.axis2.context.ConfigurationContext;
-import org.apache.axis2.deployment.AbstractDeployer;
-import org.apache.axis2.deployment.DeploymentException;
-import org.apache.axis2.deployment.repository.util.DeploymentFileData;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.autoscaler.exception.InvalidPolicyException;
-import org.apache.stratos.autoscaler.policy.PolicyManager;
-import org.apache.stratos.autoscaler.policy.model.AutoscalePolicy;
-
-/**
- *
- * The Axis2 deployer class for Autoscale-policy definitions.
- */
-public class AutoscalerPolicyDeployer extends AbstractDeployer {
-
- private static final Log log = LogFactory.getLog(AutoscalerPolicyDeployer.class);
-
- private static String fileExt="xml"; //default
- private static String deployDirectory=null;
-
- @Override
- public void init(ConfigurationContext context) {
- if(deployDirectory!=null){
- File deployDir = new File(new File(context.getAxisConfiguration().getRepository().getPath()),deployDirectory);
- if(!deployDir.exists()){
- //create policies deployment directory if not exist
- try {
- deployDir.mkdirs();
- } catch (Exception e) {
- log.error("Unable to create policies deployment directory", e);
- }
- }
- }
- }
-
- @Override
- public void setDirectory(String dir) {
- deployDirectory = dir;
- }
-
- @Override
- public void setExtension(String ext) {
- fileExt = ext;
- }
-
- @Override
- public void deploy(DeploymentFileData deploymentFileData) throws DeploymentException {
-
- File policyFile = deploymentFileData.getFile();
- log.debug("Started to deploy the policy: " + policyFile);
-
- try {
-
- AutoscalerPolicyReader reader = new AutoscalerPolicyReader(policyFile);
-
- AutoscalePolicy policy = reader.read();
- PolicyManager.getInstance().deployAutoscalePolicy(policy);
-
- log.info("Successfully deployed the policy specified at "
- + deploymentFileData.getAbsolutePath());
-
- } catch (Exception e) {
- String msg = "Invalid policy artifact at " + deploymentFileData.getAbsolutePath();
- // back up the file
- File fileToBeRenamed = policyFile;
- fileToBeRenamed.renameTo(new File(deploymentFileData.getAbsolutePath() + ".back"));
- log.error(msg, e);
- throw new DeploymentException(msg, e);
- }
- }
-
- @Override
- public void undeploy(String fileName) throws DeploymentException {
- /*
-
- String policyName = policyFile.getName().replaceAll("." + fileExt + "$", "");
- try {
- PolicyManager.getInstance().removeAutoscalePolicy(policyFile);
- log.info("Successfully undeployed the policy specified at " + fileName);
- } catch (InvalidPolicyException e) {
- log.error("unable to remove policy " + policyName , e);
- throw new DeploymentException("unable to remove policy " + policyName ,e);
- }
- */
- }
-
-
-
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/ea1844f0/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/policy/deployers/AutoscalerPolicyReader.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/policy/deployers/AutoscalerPolicyReader.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/policy/deployers/AutoscalerPolicyReader.java
deleted file mode 100644
index c0c79a9..0000000
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/policy/deployers/AutoscalerPolicyReader.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.stratos.autoscaler.policy.deployers;
-
-import java.io.File;
-
-import javax.xml.namespace.QName;
-
-import org.apache.axiom.om.OMElement;
-import org.apache.axis2.deployment.DeploymentException;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.autoscaler.exception.InvalidPolicyException;
-import org.apache.stratos.autoscaler.policy.model.AutoscalePolicy;
-import org.apache.stratos.autoscaler.policy.model.LoadAverage;
-import org.apache.stratos.autoscaler.policy.model.LoadThresholds;
-import org.apache.stratos.autoscaler.policy.model.MemoryConsumption;
-import org.apache.stratos.autoscaler.policy.model.RequestsInFlight;
-
-/**
- *
- * The Reader class for Autoscale-policy definitions.
- */
-public class AutoscalerPolicyReader extends AbstractPolicyReader<AutoscalePolicy> {
-
- private static final Log log = LogFactory.getLog(AutoscalerPolicyReader.class);
-
- public AutoscalerPolicyReader(File file) {
- super(file);
- }
-
- public AutoscalePolicy read() throws InvalidPolicyException{
- AutoscalePolicy policy = new AutoscalePolicy();
- try {
- OMElement docEle = getDocument();
- if("autoscalePolicy".equalsIgnoreCase(docEle.getLocalName())){
- policy.setId(docEle.getAttributeValue(new QName("id")));
- OMElement displayNameEle = docEle.getFirstChildWithName(new QName("displayName"));
- if(displayNameEle!=null){
- policy.setDisplayName(displayNameEle.getText());
- }
- OMElement descriptionEle = docEle.getFirstChildWithName(new QName("description"));
- if(descriptionEle!=null){
- policy.setDescription(descriptionEle.getText());
- }
-
- //LoadThresholds
- OMElement loadThresholdsEle = docEle.getFirstChildWithName(new QName("loadThresholds"));
- LoadThresholds loadThresholds = new LoadThresholds();
-
- //RequestsInFlight
- OMElement reqInFlightEle = loadThresholdsEle.getFirstChildWithName(new QName("requestsInFlight"));
- RequestsInFlight reqInFlight = new RequestsInFlight();
- reqInFlight.setAverage(Float.valueOf(readValueAttr(reqInFlightEle,"average")));
- reqInFlight.setGradient(Float.valueOf(readValueAttr(reqInFlightEle,"gradient")));
- reqInFlight.setSecondDerivative(Float.valueOf(readValueAttr(reqInFlightEle,"secondDerivative")));
- reqInFlight.setScaleDownMarginOfGradient(Float.valueOf(readValueAttr(reqInFlightEle,"scaleDownMarginOfGradient")));
- reqInFlight.setScaleDownMarginOfSecondDerivative(Float.valueOf(readValueAttr(reqInFlightEle,"scaleDownMarginOfSecondDerivative")));
- loadThresholds.setRequestsInFlight(reqInFlight);
-
- //MemoryConsumption
- OMElement memConsumptionEle = loadThresholdsEle.getFirstChildWithName(new QName("memoryConsumption"));
- MemoryConsumption memConsumption = new MemoryConsumption();
- memConsumption.setAverage(Float.valueOf(readValueAttr(memConsumptionEle,"average")));
- memConsumption.setGradient(Float.valueOf(readValueAttr(memConsumptionEle,"gradient")));
- memConsumption.setSecondDerivative(Float.valueOf(readValueAttr(memConsumptionEle,"secondDerivative")));
- memConsumption.setScaleDownMarginOfGradient(Float.valueOf(readValueAttr(memConsumptionEle,"scaleDownMarginOfGradient")));
- memConsumption.setScaleDownMarginOfSecondDerivative(Float.valueOf(readValueAttr(memConsumptionEle,"scaleDownMarginOfSecondDerivative")));
- loadThresholds.setMemoryConsumption(memConsumption);
-
- //LoadAverage
- OMElement loadAvrEle = loadThresholdsEle.getFirstChildWithName(new QName("loadAverage"));
- LoadAverage loadAvr = new LoadAverage();
- loadAvr.setAverage(Float.valueOf(readValueAttr(loadAvrEle,"average")));
- loadAvr.setGradient(Float.valueOf(readValueAttr(loadAvrEle,"gradient")));
- loadAvr.setSecondDerivative(Float.valueOf(readValueAttr(loadAvrEle,"secondDerivative")));
- loadAvr.setScaleDownMarginOfGradient(Float.valueOf(readValueAttr(loadAvrEle,"scaleDownMarginOfGradient")));
- loadAvr.setScaleDownMarginOfSecondDerivative(Float.valueOf(readValueAttr(loadAvrEle,"scaleDownMarginOfSecondDerivative")));
- loadThresholds.setLoadAverage(loadAvr);
-
- policy.setLoadThresholds(loadThresholds);
-
- } else{
- throw new DeploymentException("File is not a valid autoscale policy");
- }
-
- } catch (Exception e){
- log.error("Malformed autoscale policy file", e);
- throw new InvalidPolicyException("Malformed autoscale policy file",e);
- } finally{
- closeStream();
- }
- return policy;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/ea1844f0/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/policy/model/LoadAverageThresholds.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/policy/model/LoadAverageThresholds.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/policy/model/LoadAverageThresholds.java
new file mode 100644
index 0000000..81365e6
--- /dev/null
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/policy/model/LoadAverageThresholds.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.stratos.autoscaler.policy.model;
+
+import java.io.Serializable;
+
+/**
+ * The model class for LoadAverage definition.
+ */
+public class LoadAverageThresholds implements Serializable{
+
+ private static final long serialVersionUID = -2109860338694123343L;
+ private float upperLimit = 80.0F;
+ private float lowerLimit = 20.0F;
+
+ public float getUpperLimit() {
+ return upperLimit;
+ }
+ public void setUpperLimit(float upperLimit) {
+ this.upperLimit = upperLimit;
+ }
+ public float getLowerLimit() {
+ return lowerLimit;
+ }
+ public void setLowerLimit(float lowerLimit) {
+ this.lowerLimit = lowerLimit;
+ }
+
+ @Override
+ public String toString() {
+ return "LoadAverage [upperLimit=" + upperLimit + ", lowerLimit="
+ + lowerLimit + "]";
+ }
+
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/ea1844f0/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/policy/model/LoadThresholds.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/policy/model/LoadThresholds.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/policy/model/LoadThresholds.java
index 61677d7..22e00a6 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/policy/model/LoadThresholds.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/policy/model/LoadThresholds.java
@@ -27,19 +27,19 @@ import java.io.Serializable;
public class LoadThresholds implements Serializable{
private static final long serialVersionUID = -8148571245537655867L;
- private RequestsInFlight requestsInFlight;
- private MemoryConsumption memoryConsumption;
- private LoadAverage loadAverage;
+ private RequestsInFlightThresholds requestsInFlight;
+ private MemoryConsumptionThresholds memoryConsumption;
+ private LoadAverageThresholds loadAverage;
/**
* Gets the value of the requestsInFlight property.
*
* @return
* possible object is
- * {@link RequestsInFlight }
+ * {@link RequestsInFlightThresholds }
*
*/
- public RequestsInFlight getRequestsInFlight() {
+ public RequestsInFlightThresholds getRequestsInFlight() {
return requestsInFlight;
}
@@ -48,10 +48,10 @@ public class LoadThresholds implements Serializable{
*
* @param value
* allowed object is
- * {@link RequestsInFlight }
+ * {@link RequestsInFlightThresholds }
*
*/
- public void setRequestsInFlight(RequestsInFlight value) {
+ public void setRequestsInFlight(RequestsInFlightThresholds value) {
this.requestsInFlight = value;
}
@@ -60,10 +60,10 @@ public class LoadThresholds implements Serializable{
*
* @return
* possible object is
- * {@link MemoryConsumption }
+ * {@link MemoryConsumptionThresholds }
*
*/
- public MemoryConsumption getMemoryConsumption() {
+ public MemoryConsumptionThresholds getMemoryConsumption() {
return memoryConsumption;
}
@@ -72,10 +72,10 @@ public class LoadThresholds implements Serializable{
*
* @param value
* allowed object is
- * {@link MemoryConsumption }
+ * {@link MemoryConsumptionThresholds }
*
*/
- public void setMemoryConsumption(MemoryConsumption value) {
+ public void setMemoryConsumption(MemoryConsumptionThresholds value) {
this.memoryConsumption = value;
}
@@ -84,10 +84,10 @@ public class LoadThresholds implements Serializable{
*
* @return
* possible object is
- * {@link LoadAverage }
+ * {@link LoadAverageThresholds }
*
*/
- public LoadAverage getLoadAverage() {
+ public LoadAverageThresholds getLoadAverage() {
return loadAverage;
}
@@ -96,10 +96,10 @@ public class LoadThresholds implements Serializable{
*
* @param value
* allowed object is
- * {@link LoadAverage }
+ * {@link LoadAverageThresholds }
*
*/
- public void setLoadAverage(LoadAverage value) {
+ public void setLoadAverage(LoadAverageThresholds value) {
this.loadAverage = value;
}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/ea1844f0/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/policy/model/MemoryConsumptionThresholds.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/policy/model/MemoryConsumptionThresholds.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/policy/model/MemoryConsumptionThresholds.java
new file mode 100644
index 0000000..5d637ba
--- /dev/null
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/policy/model/MemoryConsumptionThresholds.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.stratos.autoscaler.policy.model;
+
+import java.io.Serializable;
+
+/**
+ * The model class for MemoryConsumption definition.
+ */
+public class MemoryConsumptionThresholds implements Serializable {
+
+ private static final long serialVersionUID = 5755634390464664663L;
+ private float upperLimit = 80.0F;
+ private float lowerLimit = 20.0F;
+
+ public float getUpperLimit() {
+ return upperLimit;
+ }
+ public void setUpperLimit(float upperLimit) {
+ this.upperLimit = upperLimit;
+ }
+ public float getLowerLimit() {
+ return lowerLimit;
+ }
+ public void setLowerLimit(float lowerLimit) {
+ this.lowerLimit = lowerLimit;
+ }
+
+ @Override
+ public String toString() {
+ return "MemoryConsumption [upperLimit=" + upperLimit + ", lowerLimit="
+ + lowerLimit + "]";
+ }
+
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/ea1844f0/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/policy/model/RequestsInFlightThresholds.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/policy/model/RequestsInFlightThresholds.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/policy/model/RequestsInFlightThresholds.java
new file mode 100644
index 0000000..19b4eaa
--- /dev/null
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/policy/model/RequestsInFlightThresholds.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.stratos.autoscaler.policy.model;
+
+import java.io.Serializable;
+
+/**
+ * The model class for RequestsInFlight definition.
+ */
+public class RequestsInFlightThresholds implements Serializable{
+
+ private static final long serialVersionUID = 8113964958155294290L;
+ private float upperLimit = 80.0F;
+ private float lowerLimit = 20.0F;
+
+ public float getLowerLimit() {
+ return lowerLimit;
+ }
+ public void setLowerLimit(float lowerLimit) {
+ this.lowerLimit = lowerLimit;
+ }
+ public float getUpperLimit() {
+ return upperLimit;
+ }
+ public void setUpperLimit(float upperLimit) {
+ this.upperLimit = upperLimit;
+ }
+ @Override
+ public String toString() {
+ return "RequestsInFlight [upperLimit=" + upperLimit + ", lowerLimit="
+ + lowerLimit + "]";
+ }
+
+
+
+}
\ No newline at end of file
[2/8] git commit: Merge branch 'master' of
https://git-wip-us.apache.org/repos/asf/incubator-stratos
Posted by ni...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-stratos
Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/a9c959da
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/a9c959da
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/a9c959da
Branch: refs/heads/master
Commit: a9c959da65874765e0a7854027f1ee151f57c5ac
Parents: 3280f08 c6a4c3c
Author: Nirmal Fernando <ni...@apache.org>
Authored: Wed May 7 04:03:45 2014 +0530
Committer: Nirmal Fernando <ni...@apache.org>
Committed: Wed May 7 04:03:45 2014 +0530
----------------------------------------------------------------------
.../stratos/cartridge/agent/CartridgeAgent.java | 36 +
.../agent/util/CartridgeAgentConstants.java | 2 +
.../agent/util/CartridgeAgentUtils.java | 5 +-
.../cartridge/agent/util/ExtensionUtils.java | 32 +-
components/org.apache.stratos.cli/pom.xml | 1 +
.../src/main/assembly/src.xml | 2 +-
.../stratos/cli/commands/SubscribeCommand.java | 30 +-
.../impl/CloudControllerServiceImpl.java | 54 +-
.../controller/util/CloudControllerUtil.java | 4 +-
.../LoadBalancerTenantEventReceiver.java | 188 +++---
.../LoadBalancerTopologyEventReceiver.java | 37 +-
.../conf/LoadBalancerConfiguration.java | 2 +-
.../balancer/context/LoadBalancerContext.java | 4 +-
.../context/LoadBalancerContextUtil.java | 364 ++++++++++-
.../context/map/MultiTenantClusterMap.java | 13 +-
.../TenantAwareLoadBalanceEndpoint.java | 295 ++++++---
.../stratos/load/balancer/util/Constants.java | 9 +-
.../test/LoadBalancerConfigurationTest.java | 10 +-
.../controllers/cartridgeSubscribeSubmit.jag | 4 +-
.../service/ServiceDeploymentManager.java | 8 +-
.../manager/CartridgeSubscriptionManager.java | 137 +++-
.../publisher/TenantSynzhronizerTask.java | 18 +-
.../DataInsertionAndRetrievalManager.java | 25 +
.../subscription/CartridgeSubscription.java | 30 +-
.../manager/subscription/SubscriptionData.java | 27 +-
.../subscription/SubscriptionDomain.java | 46 ++
.../utils/CartridgeSubscriptionUtils.java | 20 +-
.../broker/connect/TopicConnector.java | 1 -
.../broker/heartbeat/TopicHealthChecker.java | 23 +-
.../broker/publish/EventPublisher.java | 12 +-
.../broker/publish/TopicPublisher.java | 148 +++--
.../broker/subscribe/TopicSubscriber.java | 119 ++--
.../messaging/domain/tenant/Subscription.java | 77 +++
.../domain/tenant/SubscriptionDomain.java | 41 ++
.../stratos/messaging/domain/tenant/Tenant.java | 29 +-
.../messaging/domain/topology/Member.java | 68 +-
.../messaging/domain/topology/Service.java | 30 +-
.../stratos/messaging/event/ping/PingEvent.java | 30 +
.../tenant/SubscriptionDomainAddedEvent.java | 67 ++
.../tenant/SubscriptionDomainRemovedEvent.java | 60 ++
.../event/tenant/TenantSubscribedEvent.java | 9 +-
.../event/tenant/TenantUnSubscribedEvent.java | 10 +-
.../event/topology/MemberActivatedEvent.java | 40 +-
.../event/topology/ServiceCreatedEvent.java | 37 +-
.../SubscriptionDomainsAddedEventListener.java | 28 +
...SubscriptionDomainsRemovedEventListener.java | 28 +
...SubscriptionDomainAddedMessageProcessor.java | 98 +++
...bscriptionDomainRemovedMessageProcessor.java | 97 +++
.../tenant/TenantMessageProcessorChain.java | 12 +
.../TenantSubscribedMessageProcessor.java | 5 +-
.../TenantUnSubscribedMessageProcessor.java | 2 +-
.../messaging/publish/MessagePublisher.java | 4 +-
.../stratos/messaging/util/Constants.java | 1 +
.../messaging/test/TenantDomainTest.java | 45 ++
.../rest/endpoint/bean/CartridgeInfoBean.java | 6 +-
.../bean/SubscriptionDomainRequest.java | 48 ++
.../handlers/BadRequestExceptionMapper.java | 45 ++
.../handlers/CustomExceptionMapper.java | 13 +-
.../CustomThrowableExceptionMapper.java | 39 ++
.../handlers/GenericExceptionMapper.java | 46 ++
.../stratos/rest/endpoint/mock/MockContext.java | 4 +
.../rest/endpoint/mock/StratosTestAdmin.java | 9 +
.../rest/endpoint/services/ServiceUtils.java | 653 ++++++++++---------
.../rest/endpoint/services/StratosAdmin.java | 43 +-
.../webapp/stratos-test/WEB-INF/cxf-servlet.xml | 41 +-
.../stratos-test/WEB-INF/schemas/schema.xsd | 214 ++++++
.../main/webapp/stratos/WEB-INF/cxf-servlet.xml | 18 +
.../webapp/stratos/WEB-INF/schemas/schema.xsd | 214 ++++++
.../load-balancer/haproxy-extension/pom.xml | 2 +-
.../haproxy-extension/src/main/assembly/bin.xml | 19 +-
.../haproxy-extension/src/main/license/LICENSE | 481 ++++++++++++++
.../haproxy-extension/src/main/notice/NOTICE | 395 +++++++++++
pom.xml | 46 +-
.../modules/distribution/pom.xml | 2 +-
.../distribution/src/main/bin/stratos.sh | 3 +-
.../conf/templates/jndi.properties.template | 6 +-
.../distribution/src/main/license/LICENSE | 5 +-
.../load-balancer/modules/distribution/pom.xml | 1 +
.../distribution/src/main/assembly/bin.xml | 1 +
.../src/main/conf/loadbalancer.conf | 2 +-
.../distribution/src/main/license/LICENSE | 1 -
products/stratos-cli/distribution/pom.xml | 1 +
.../distribution/src/main/assembly/bin.xml | 1 +
.../distribution/src/main/license/LICENSE | 1 -
products/stratos/modules/distribution/pom.xml | 2 +
.../modules/distribution/src/assembly/bin.xml | 2 +-
.../distribution/src/main/license/LICENSE | 6 +-
tools/puppet3/manifests/base.pp | 44 ++
tools/puppet3/manifests/default.pp | 24 +
tools/puppet3/manifests/haproxy.pp | 25 +
tools/puppet3/manifests/lb.pp | 25 +
tools/puppet3/manifests/mysql.pp | 27 +
tools/puppet3/manifests/nodejs.pp | 27 +
tools/puppet3/manifests/nodes.pp | 129 ----
tools/puppet3/manifests/php.pp | 32 +
tools/puppet3/manifests/ruby.pp | 26 +
tools/puppet3/manifests/site.pp | 18 -
tools/puppet3/manifests/tomcat.pp | 28 +
tools/puppet3/manifests/wordpress.pp | 26 +
tools/puppet3/modules/php/manifests/init.pp | 8 +-
.../modules/stratos_base/manifests/init.pp | 63 ++
tools/puppet3/puppet.conf | 1 +
102 files changed, 4432 insertions(+), 965 deletions(-)
----------------------------------------------------------------------
[6/8] git commit: fixing
https://issues.apache.org/jira/browse/STRATOS-645 - for rest EP
Posted by ni...@apache.org.
fixing https://issues.apache.org/jira/browse/STRATOS-645 - for rest EP
Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/57a60faa
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/57a60faa
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/57a60faa
Branch: refs/heads/master
Commit: 57a60faa8a77a386cdea54492ad2b4c2dafd32a2
Parents: ea1844f
Author: Nirmal Fernando <ni...@apache.org>
Authored: Wed May 7 04:24:11 2014 +0530
Committer: Nirmal Fernando <ni...@apache.org>
Committed: Wed May 7 04:24:11 2014 +0530
----------------------------------------------------------------------
.../policy/autoscale/LoadAverage.java | 36 -----------
.../policy/autoscale/LoadAverageThresholds.java | 30 +++++++++
.../policy/autoscale/LoadThresholds.java | 8 +--
.../policy/autoscale/MemoryConsumption.java | 36 -----------
.../autoscale/MemoryConsumptionThresholds.java | 30 +++++++++
.../policy/autoscale/RequestsInFlight.java | 36 -----------
.../autoscale/RequestsInFlightThresholds.java | 31 ++++++++++
.../bean/util/converter/PojoConverter.java | 65 +++++++-------------
8 files changed, 115 insertions(+), 157 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/57a60faa/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/policy/autoscale/LoadAverage.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/policy/autoscale/LoadAverage.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/policy/autoscale/LoadAverage.java
deleted file mode 100644
index d500f90..0000000
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/policy/autoscale/LoadAverage.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.stratos.rest.endpoint.bean.autoscaler.policy.autoscale;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-@XmlRootElement
-public class LoadAverage {
-
- public float average;
-
- public float secondDerivative;
-
- public float gradient;
-
- public float scaleDownMarginOfGradient;
-
- public float scaleDownMarginOfSecondDerivative;
-}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/57a60faa/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/policy/autoscale/LoadAverageThresholds.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/policy/autoscale/LoadAverageThresholds.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/policy/autoscale/LoadAverageThresholds.java
new file mode 100644
index 0000000..ee85353
--- /dev/null
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/policy/autoscale/LoadAverageThresholds.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.stratos.rest.endpoint.bean.autoscaler.policy.autoscale;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement
+public class LoadAverageThresholds {
+
+ public float upperLimit;
+
+ public float lowerLimit;
+}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/57a60faa/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/policy/autoscale/LoadThresholds.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/policy/autoscale/LoadThresholds.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/policy/autoscale/LoadThresholds.java
index a53cf8c..30de3bd 100644
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/policy/autoscale/LoadThresholds.java
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/policy/autoscale/LoadThresholds.java
@@ -24,9 +24,7 @@ import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement
public class LoadThresholds {
- public RequestsInFlight requestsInFlight;
-
- public MemoryConsumption memoryConsumption;
-
- public LoadAverage loadAverage;
+ public RequestsInFlightThresholds requestsInFlight;
+ public MemoryConsumptionThresholds memoryConsumption;
+ public LoadAverageThresholds loadAverage;
}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/57a60faa/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/policy/autoscale/MemoryConsumption.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/policy/autoscale/MemoryConsumption.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/policy/autoscale/MemoryConsumption.java
deleted file mode 100644
index b1c9675..0000000
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/policy/autoscale/MemoryConsumption.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.stratos.rest.endpoint.bean.autoscaler.policy.autoscale;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-@XmlRootElement
-public class MemoryConsumption {
-
- public float average;
-
- public float secondDerivative;
-
- public float gradient;
-
- public float scaleDownMarginOfGradient;
-
- public float scaleDownMarginOfSecondDerivative;
-}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/57a60faa/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/policy/autoscale/MemoryConsumptionThresholds.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/policy/autoscale/MemoryConsumptionThresholds.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/policy/autoscale/MemoryConsumptionThresholds.java
new file mode 100644
index 0000000..261f07c
--- /dev/null
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/policy/autoscale/MemoryConsumptionThresholds.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.stratos.rest.endpoint.bean.autoscaler.policy.autoscale;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement
+public class MemoryConsumptionThresholds {
+
+ public float upperLimit;
+
+ public float lowerLimit;
+}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/57a60faa/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/policy/autoscale/RequestsInFlight.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/policy/autoscale/RequestsInFlight.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/policy/autoscale/RequestsInFlight.java
deleted file mode 100644
index 7e5b7cd..0000000
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/policy/autoscale/RequestsInFlight.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.stratos.rest.endpoint.bean.autoscaler.policy.autoscale;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-@XmlRootElement
-public class RequestsInFlight {
-
- public float average;
-
- public float secondDerivative;
-
- public float gradient;
-
- public float scaleDownMarginOfGradient;
-
- public float scaleDownMarginOfSecondDerivative;
-}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/57a60faa/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/policy/autoscale/RequestsInFlightThresholds.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/policy/autoscale/RequestsInFlightThresholds.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/policy/autoscale/RequestsInFlightThresholds.java
new file mode 100644
index 0000000..d894169
--- /dev/null
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/policy/autoscale/RequestsInFlightThresholds.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.stratos.rest.endpoint.bean.autoscaler.policy.autoscale;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement
+public class RequestsInFlightThresholds {
+
+ public float upperLimit;
+
+ public float lowerLimit;
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/57a60faa/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/util/converter/PojoConverter.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/util/converter/PojoConverter.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/util/converter/PojoConverter.java
index 1208967..3db3b24 100644
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/util/converter/PojoConverter.java
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/util/converter/PojoConverter.java
@@ -236,40 +236,31 @@ public class PojoConverter {
if(autoscalePolicyBean.getLoadThresholds().loadAverage != null) {
//set load average information
- org.apache.stratos.autoscaler.policy.model.LoadAverage loadAverage = new
- org.apache.stratos.autoscaler.policy.model.LoadAverage();
- loadAverage.setAverage(autoscalePolicyBean.getLoadThresholds().loadAverage.average);
- loadAverage.setGradient(autoscalePolicyBean.getLoadThresholds().loadAverage.gradient);
- loadAverage.setSecondDerivative(autoscalePolicyBean.getLoadThresholds().loadAverage.secondDerivative);
- loadAverage.setScaleDownMarginOfGradient(autoscalePolicyBean.getLoadThresholds().loadAverage.scaleDownMarginOfGradient);
- loadAverage.setScaleDownMarginOfSecondDerivative(autoscalePolicyBean.getLoadThresholds().loadAverage.scaleDownMarginOfSecondDerivative);
+ org.apache.stratos.autoscaler.policy.model.LoadAverageThresholds loadAverage = new
+ org.apache.stratos.autoscaler.policy.model.LoadAverageThresholds();
+ loadAverage.setUpperLimit(autoscalePolicyBean.getLoadThresholds().loadAverage.upperLimit);
+ loadAverage.setLowerLimit(autoscalePolicyBean.getLoadThresholds().loadAverage.lowerLimit);
//set load average
loadThresholds.setLoadAverage(loadAverage);
}
if (autoscalePolicyBean.getLoadThresholds().requestsInFlight != null) {
- org.apache.stratos.autoscaler.policy.model.RequestsInFlight requestsInFlight = new
- org.apache.stratos.autoscaler.policy.model.RequestsInFlight();
+ org.apache.stratos.autoscaler.policy.model.RequestsInFlightThresholds requestsInFlight = new
+ org.apache.stratos.autoscaler.policy.model.RequestsInFlightThresholds();
//set request in flight information
- requestsInFlight.setAverage(autoscalePolicyBean.getLoadThresholds().requestsInFlight.average);
- requestsInFlight.setGradient(autoscalePolicyBean.getLoadThresholds().requestsInFlight.gradient);
- requestsInFlight.setSecondDerivative(autoscalePolicyBean.getLoadThresholds().requestsInFlight.secondDerivative);
- requestsInFlight.setScaleDownMarginOfGradient(autoscalePolicyBean.getLoadThresholds().requestsInFlight.scaleDownMarginOfGradient);
- requestsInFlight.setScaleDownMarginOfSecondDerivative(autoscalePolicyBean.getLoadThresholds().requestsInFlight.scaleDownMarginOfSecondDerivative);
+ requestsInFlight.setUpperLimit(autoscalePolicyBean.getLoadThresholds().requestsInFlight.upperLimit);
+ requestsInFlight.setLowerLimit(autoscalePolicyBean.getLoadThresholds().requestsInFlight.lowerLimit);
//set request in flight
loadThresholds.setRequestsInFlight(requestsInFlight);
}
if (autoscalePolicyBean.getLoadThresholds().memoryConsumption != null) {
- org.apache.stratos.autoscaler.policy.model.MemoryConsumption memoryConsumption = new
- org.apache.stratos.autoscaler.policy.model.MemoryConsumption();
+ org.apache.stratos.autoscaler.policy.model.MemoryConsumptionThresholds memoryConsumption = new
+ org.apache.stratos.autoscaler.policy.model.MemoryConsumptionThresholds();
//set memory consumption information
- memoryConsumption.setAverage(autoscalePolicyBean.getLoadThresholds().memoryConsumption.average);
- memoryConsumption.setGradient(autoscalePolicyBean.getLoadThresholds().memoryConsumption.gradient);
- memoryConsumption.setSecondDerivative(autoscalePolicyBean.getLoadThresholds().memoryConsumption.secondDerivative);
- memoryConsumption.setScaleDownMarginOfGradient(autoscalePolicyBean.getLoadThresholds().memoryConsumption.scaleDownMarginOfGradient);
- memoryConsumption.setScaleDownMarginOfSecondDerivative(autoscalePolicyBean.getLoadThresholds().memoryConsumption.scaleDownMarginOfSecondDerivative);
+ memoryConsumption.setUpperLimit(autoscalePolicyBean.getLoadThresholds().memoryConsumption.upperLimit);
+ memoryConsumption.setLowerLimit(autoscalePolicyBean.getLoadThresholds().memoryConsumption.lowerLimit);
//set memory consumption
loadThresholds.setMemoryConsumption(memoryConsumption);
}
@@ -475,35 +466,21 @@ public class PojoConverter {
LoadThresholds loadThresholdBean = new LoadThresholds();
if(loadThresholds.getLoadAverage() != null) {
- LoadAverage loadAverage = new LoadAverage();
- loadAverage.average = loadThresholds.getLoadAverage().getAverage();
- loadAverage.gradient = loadThresholds.getLoadAverage().getGradient();
- loadAverage.scaleDownMarginOfGradient = loadThresholds.getLoadAverage().getScaleDownMarginOfGradient();
- loadAverage.scaleDownMarginOfSecondDerivative = loadThresholds.getLoadAverage().
- getScaleDownMarginOfSecondDerivative();
- loadAverage.secondDerivative = loadThresholds.getLoadAverage().getSecondDerivative();
+ LoadAverageThresholds loadAverage = new LoadAverageThresholds();
+ loadAverage.upperLimit = loadThresholds.getLoadAverage().getUpperLimit();
+ loadAverage.lowerLimit = loadThresholds.getLoadAverage().getLowerLimit();
loadThresholdBean.loadAverage = loadAverage;
}
if(loadThresholds.getMemoryConsumption() != null) {
- MemoryConsumption memoryConsumption = new MemoryConsumption();
- memoryConsumption.average = loadThresholds.getMemoryConsumption().getAverage();
- memoryConsumption.gradient = loadThresholds.getMemoryConsumption().getGradient();
- memoryConsumption.scaleDownMarginOfGradient = loadThresholds.getMemoryConsumption().
- getScaleDownMarginOfGradient();
- memoryConsumption.scaleDownMarginOfSecondDerivative = loadThresholds.getMemoryConsumption().
- getScaleDownMarginOfSecondDerivative();
- memoryConsumption.secondDerivative = loadThresholds.getMemoryConsumption().getSecondDerivative();
+ MemoryConsumptionThresholds memoryConsumption = new MemoryConsumptionThresholds();
+ memoryConsumption.upperLimit = loadThresholds.getMemoryConsumption().getUpperLimit();
+ memoryConsumption.lowerLimit = loadThresholds.getMemoryConsumption().getLowerLimit();
loadThresholdBean.memoryConsumption = memoryConsumption;
}
if(loadThresholds.getRequestsInFlight() != null) {
- RequestsInFlight requestsInFlight = new RequestsInFlight();
- requestsInFlight.average = loadThresholds.getRequestsInFlight().getAverage();
- requestsInFlight.gradient = loadThresholds.getRequestsInFlight().getGradient();
- requestsInFlight.scaleDownMarginOfGradient = loadThresholds.getRequestsInFlight().
- getScaleDownMarginOfGradient();
- requestsInFlight.scaleDownMarginOfSecondDerivative = loadThresholds.getRequestsInFlight().
- getScaleDownMarginOfSecondDerivative();
- requestsInFlight.secondDerivative = loadThresholds.getRequestsInFlight().getSecondDerivative();
+ RequestsInFlightThresholds requestsInFlight = new RequestsInFlightThresholds();
+ requestsInFlight.upperLimit = loadThresholds.getRequestsInFlight().getUpperLimit();
+ requestsInFlight.lowerLimit = loadThresholds.getRequestsInFlight().getLowerLimit();
loadThresholdBean.requestsInFlight = requestsInFlight;
}
[3/8] git commit: fixing few logs and formatting issues
Posted by ni...@apache.org.
fixing few logs and formatting issues
Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/bd794081
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/bd794081
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/bd794081
Branch: refs/heads/master
Commit: bd794081a6650630e021bf8d1f1706ce62549496
Parents: a9c959d
Author: Nirmal Fernando <ni...@apache.org>
Authored: Wed May 7 04:21:17 2014 +0530
Committer: Nirmal Fernando <ni...@apache.org>
Committed: Wed May 7 04:21:17 2014 +0530
----------------------------------------------------------------------
.../git/impl/GitBasedArtifactRepository.java | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/bd794081/components/org.apache.stratos.cartridge.agent/src/main/java/org/apache/stratos/cartridge/agent/artifact/deployment/synchronizer/git/impl/GitBasedArtifactRepository.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cartridge.agent/src/main/java/org/apache/stratos/cartridge/agent/artifact/deployment/synchronizer/git/impl/GitBasedArtifactRepository.java b/components/org.apache.stratos.cartridge.agent/src/main/java/org/apache/stratos/cartridge/agent/artifact/deployment/synchronizer/git/impl/GitBasedArtifactRepository.java
index 0e3982b..c741295 100644
--- a/components/org.apache.stratos.cartridge.agent/src/main/java/org/apache/stratos/cartridge/agent/artifact/deployment/synchronizer/git/impl/GitBasedArtifactRepository.java
+++ b/components/org.apache.stratos.cartridge.agent/src/main/java/org/apache/stratos/cartridge/agent/artifact/deployment/synchronizer/git/impl/GitBasedArtifactRepository.java
@@ -433,24 +433,24 @@ public class GitBasedArtifactRepository {
}*/
if (log.isDebugEnabled()) {
- log.debug("Artifact checkout done by thread " + Thread.currentThread().getName() + " - " +
+ log.debug("Artifact checkout will be done by thread " + Thread.currentThread().getName() + " - " +
Thread.currentThread().getId());
}
int tenantId = Integer.parseInt(repositoryInformation.getTenantId());
// if context for tenant is not initialized
- if(tenantToRepoContextMap.get(tenantId) == null)
+ if(tenantToRepoContextMap.get(tenantId) == null) {
initGitContext(repositoryInformation);
+ }
-
RepositoryContext gitRepoCtx = retrieveCachedGitContext(tenantId);
- if(gitRepoCtx == null) { //to handle super tenant scenario
- // if(log.isDebugEnabled())
- log.info("No git repository context information found for deployment synchronizer");
+
+ if (gitRepoCtx == null) { // to handle super tenant scenario
+ log.info("No git repository context information found for deployment synchronizer");
- return true;
- }
+ return true;
+ }
synchronized (gitRepoCtx) {
if(!gitRepoCtx.cloneExists())
[7/8] git commit: fixing
https://issues.apache.org/jira/browse/STRATOS-645 - for autoscaler wsdl
Posted by ni...@apache.org.
fixing https://issues.apache.org/jira/browse/STRATOS-645 - for autoscaler wsdl
Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/f13e59b4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/f13e59b4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/f13e59b4
Branch: refs/heads/master
Commit: f13e59b4fd54261e0aae0d77aa7322ac32a895a0
Parents: 57a60fa
Author: Nirmal Fernando <ni...@apache.org>
Authored: Wed May 7 04:25:14 2014 +0530
Committer: Nirmal Fernando <ni...@apache.org>
Committed: Wed May 7 04:25:14 2014 +0530
----------------------------------------------------------------------
.../pom.xml | 2 +-
.../src/main/resources/AutoScalerService.wsdl | 119 +++++++------------
2 files changed, 45 insertions(+), 76 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f13e59b4/service-stubs/org.apache.stratos.autoscaler.service.stub/pom.xml
----------------------------------------------------------------------
diff --git a/service-stubs/org.apache.stratos.autoscaler.service.stub/pom.xml b/service-stubs/org.apache.stratos.autoscaler.service.stub/pom.xml
index 8365428..710623f 100644
--- a/service-stubs/org.apache.stratos.autoscaler.service.stub/pom.xml
+++ b/service-stubs/org.apache.stratos.autoscaler.service.stub/pom.xml
@@ -47,7 +47,7 @@
<configuration>
<tasks>
<java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
- <arg line="-uri src/main/resources/AutoScalerService.wsdl -u -uw -o target/generated-code -p org.apache.stratos.autoscaler.stub -ns2p http://policy.deployment.autoscaler.stratos.apache.org/xsd=org.apache.stratos.autoscaler.deployment.policy,http://model.policy.autoscaler.stratos.apache.org/xsd=org.apache.stratos.autoscaler.policy.model,http://exception.autoscaler.stratos.apache.org/xsd=org.apache.stratos.autoscaler.exception,http://partition.deployment.controller.cloud.stratos.apache.org/xsd=org.apache.stratos.cloud.controller.stub.deployment.partition,http://pojo.controller.cloud.stratos.apache.org/xsd=org.apache.stratos.cloud.controller.stub.pojo,http://partition.autoscaler.stratos.apache.org/xsd=org.apache.stratos.autoscaler.partition" />
+ <arg line="-uri src/main/resources/AutoScalerService.wsdl -u -uw -o target/generated-code -p org.apache.stratos.autoscaler.stub -ns2p http://policy.deployment.autoscaler.stratos.apache.org/xsd=org.apache.stratos.autoscaler.deployment.policy,http://model.policy.autoscaler.stratos.apache.org/xsd=org.apache.stratos.autoscaler.policy.model,http://exception.autoscaler.stratos.apache.org/xsd=org.apache.stratos.autoscaler.exception,http://partition.deployment.stub.controller.cloud.stratos.apache.org/xsd=org.apache.stratos.cloud.controller.stub.deployment.partition,http://pojo.stub.controller.cloud.stratos.apache.org/xsd=org.apache.stratos.cloud.controller.stub.pojo,http://partition.autoscaler.stratos.apache.org/xsd=org.apache.stratos.autoscaler.partition" />
<classpath refid="maven.dependency.classpath" />
<classpath refid="maven.compile.classpath" />
<classpath refid="maven.runtime.classpath" />
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/f13e59b4/service-stubs/org.apache.stratos.autoscaler.service.stub/src/main/resources/AutoScalerService.wsdl
----------------------------------------------------------------------
diff --git a/service-stubs/org.apache.stratos.autoscaler.service.stub/src/main/resources/AutoScalerService.wsdl b/service-stubs/org.apache.stratos.autoscaler.service.stub/src/main/resources/AutoScalerService.wsdl
index 422f85f..23b4099 100644
--- a/service-stubs/org.apache.stratos.autoscaler.service.stub/src/main/resources/AutoScalerService.wsdl
+++ b/service-stubs/org.apache.stratos.autoscaler.service.stub/src/main/resources/AutoScalerService.wsdl
@@ -1,26 +1,4 @@
-<?xml version='1.0'?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns="http://api.autoscaler.stratos.apache.org" xmlns:ax28="http://partition.autoscaler.stratos.apache.org/xsd" xmlns:ax25="http://pojo.controller.cloud.stratos.apache.org/xsd" xmlns:ax23="http://policy.deployment.autoscaler.stratos.apache.org/xsd" xmlns:ax24="http://partition.deployment.controller.cloud.stratos.apache.org/xsd" xmlns:ax216="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ax214="http://model.policy.autoscaler.stratos.apache.org/xsd" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://api.autoscaler.stratos.apache.org">
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns="http://api.autoscaler.stratos.apache.org" xmlns:ax28="http://partition.autoscaler.stratos.apache.org/xsd" xmlns:ax25="http://pojo.stub.controller.cloud.stratos.apache.org/xsd" xmlns:ax23="http://policy.deployment.autoscaler.stratos.apache.org/xsd" xmlns:ax24="http://partition.deployment.stub.controller.cloud.stratos.apache.org/xsd" xmlns:ax216="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ax214="http://model.policy.autoscaler.stratos.apache.org/xsd" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://api.autoscaler.stratos.apache.org">
<wsdl:documentation>AutoScalerService</wsdl:documentation>
<wsdl:types>
<xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://exception.autoscaler.stratos.apache.org/xsd">
@@ -40,9 +18,25 @@
</xs:sequence>
</xs:complexType>
</xs:schema>
- <xs:schema xmlns:ax217="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:ax215="http://model.policy.autoscaler.stratos.apache.org/xsd" xmlns:ax212="http://partition.deployment.controller.cloud.stratos.apache.org/xsd" xmlns:ax213="http://partition.autoscaler.stratos.apache.org/xsd" xmlns:ax211="http://policy.deployment.autoscaler.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://api.autoscaler.stratos.apache.org">
+ <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://pojo.stub.controller.cloud.stratos.apache.org/xsd">
+ <xs:complexType name="Properties">
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="properties" nillable="true" type="ax25:Property"></xs:element>
+ <xs:element minOccurs="0" name="propertiesSpecified" type="xs:boolean"></xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="Property">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="nameSpecified" type="xs:boolean"></xs:element>
+ <xs:element minOccurs="0" name="value" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="valueSpecified" type="xs:boolean"></xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:schema>
+ <xs:schema xmlns:ax217="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:ax215="http://model.policy.autoscaler.stratos.apache.org/xsd" xmlns:ax212="http://partition.deployment.stub.controller.cloud.stratos.apache.org/xsd" xmlns:ax213="http://partition.autoscaler.stratos.apache.org/xsd" xmlns:ax211="http://policy.deployment.autoscaler.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://api.autoscaler.stratos.apache.org">
<xs:import namespace="http://policy.deployment.autoscaler.stratos.apache.org/xsd"></xs:import>
- <xs:import namespace="http://partition.deployment.controller.cloud.stratos.apache.org/xsd"></xs:import>
+ <xs:import namespace="http://partition.deployment.stub.controller.cloud.stratos.apache.org/xsd"></xs:import>
<xs:import namespace="http://partition.autoscaler.stratos.apache.org/xsd"></xs:import>
<xs:import namespace="http://model.policy.autoscaler.stratos.apache.org/xsd"></xs:import>
<xs:import namespace="http://exception.autoscaler.stratos.apache.org/xsd"></xs:import>
@@ -326,8 +320,8 @@
</xs:complexType>
</xs:element>
</xs:schema>
- <xs:schema xmlns:ax29="http://partition.deployment.controller.cloud.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://partition.autoscaler.stratos.apache.org/xsd">
- <xs:import namespace="http://partition.deployment.controller.cloud.stratos.apache.org/xsd"></xs:import>
+ <xs:schema xmlns:ax29="http://partition.deployment.stub.controller.cloud.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://partition.autoscaler.stratos.apache.org/xsd">
+ <xs:import namespace="http://partition.deployment.stub.controller.cloud.stratos.apache.org/xsd"></xs:import>
<xs:complexType name="PartitionGroup">
<xs:sequence>
<xs:element minOccurs="0" name="id" nillable="true" type="xs:string"></xs:element>
@@ -347,41 +341,32 @@
</xs:complexType>
<xs:complexType name="LoadThresholds">
<xs:sequence>
- <xs:element minOccurs="0" name="loadAverage" nillable="true" type="ax214:LoadAverage"></xs:element>
- <xs:element minOccurs="0" name="memoryConsumption" nillable="true" type="ax214:MemoryConsumption"></xs:element>
- <xs:element minOccurs="0" name="requestsInFlight" nillable="true" type="ax214:RequestsInFlight"></xs:element>
+ <xs:element minOccurs="0" name="loadAverage" nillable="true" type="ax214:LoadAverageThresholds"></xs:element>
+ <xs:element minOccurs="0" name="memoryConsumption" nillable="true" type="ax214:MemoryConsumptionThresholds"></xs:element>
+ <xs:element minOccurs="0" name="requestsInFlight" nillable="true" type="ax214:RequestsInFlightThresholds"></xs:element>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="LoadAverage">
+ <xs:complexType name="LoadAverageThresholds">
<xs:sequence>
- <xs:element minOccurs="0" name="average" type="xs:float"></xs:element>
- <xs:element minOccurs="0" name="gradient" type="xs:float"></xs:element>
- <xs:element minOccurs="0" name="scaleDownMarginOfGradient" type="xs:float"></xs:element>
- <xs:element minOccurs="0" name="scaleDownMarginOfSecondDerivative" type="xs:float"></xs:element>
- <xs:element minOccurs="0" name="secondDerivative" type="xs:float"></xs:element>
+ <xs:element minOccurs="0" name="lowerLimit" type="xs:float"></xs:element>
+ <xs:element minOccurs="0" name="upperLimit" type="xs:float"></xs:element>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="MemoryConsumption">
+ <xs:complexType name="MemoryConsumptionThresholds">
<xs:sequence>
- <xs:element minOccurs="0" name="average" type="xs:float"></xs:element>
- <xs:element minOccurs="0" name="gradient" type="xs:float"></xs:element>
- <xs:element minOccurs="0" name="scaleDownMarginOfGradient" type="xs:float"></xs:element>
- <xs:element minOccurs="0" name="scaleDownMarginOfSecondDerivative" type="xs:float"></xs:element>
- <xs:element minOccurs="0" name="secondDerivative" type="xs:float"></xs:element>
+ <xs:element minOccurs="0" name="lowerLimit" type="xs:float"></xs:element>
+ <xs:element minOccurs="0" name="upperLimit" type="xs:float"></xs:element>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="RequestsInFlight">
+ <xs:complexType name="RequestsInFlightThresholds">
<xs:sequence>
- <xs:element minOccurs="0" name="average" type="xs:float"></xs:element>
- <xs:element minOccurs="0" name="gradient" type="xs:float"></xs:element>
- <xs:element minOccurs="0" name="scaleDownMarginOfGradient" type="xs:float"></xs:element>
- <xs:element minOccurs="0" name="scaleDownMarginOfSecondDerivative" type="xs:float"></xs:element>
- <xs:element minOccurs="0" name="secondDerivative" type="xs:float"></xs:element>
+ <xs:element minOccurs="0" name="lowerLimit" type="xs:float"></xs:element>
+ <xs:element minOccurs="0" name="upperLimit" type="xs:float"></xs:element>
</xs:sequence>
</xs:complexType>
</xs:schema>
- <xs:schema xmlns:ax27="http://partition.deployment.controller.cloud.stratos.apache.org/xsd" xmlns:ax210="http://partition.autoscaler.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://policy.deployment.autoscaler.stratos.apache.org/xsd">
- <xs:import namespace="http://partition.deployment.controller.cloud.stratos.apache.org/xsd"></xs:import>
+ <xs:schema xmlns:ax27="http://partition.deployment.stub.controller.cloud.stratos.apache.org/xsd" xmlns:ax210="http://partition.autoscaler.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://policy.deployment.autoscaler.stratos.apache.org/xsd">
+ <xs:import namespace="http://partition.deployment.stub.controller.cloud.stratos.apache.org/xsd"></xs:import>
<xs:import namespace="http://partition.autoscaler.stratos.apache.org/xsd"></xs:import>
<xs:complexType name="DeploymentPolicy">
<xs:sequence>
@@ -391,24 +376,8 @@
</xs:sequence>
</xs:complexType>
</xs:schema>
- <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://pojo.controller.cloud.stratos.apache.org/xsd">
- <xs:complexType name="Properties">
- <xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="properties" nillable="true" type="ax25:Property"></xs:element>
- <xs:element minOccurs="0" name="propertiesSpecified" type="xs:boolean"></xs:element>
- </xs:sequence>
- </xs:complexType>
- <xs:complexType name="Property">
- <xs:sequence>
- <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="nameSpecified" type="xs:boolean"></xs:element>
- <xs:element minOccurs="0" name="value" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="valueSpecified" type="xs:boolean"></xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:schema>
- <xs:schema xmlns:ax26="http://pojo.controller.cloud.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://partition.deployment.controller.cloud.stratos.apache.org/xsd">
- <xs:import namespace="http://pojo.controller.cloud.stratos.apache.org/xsd"></xs:import>
+ <xs:schema xmlns:ax26="http://pojo.stub.controller.cloud.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://partition.deployment.stub.controller.cloud.stratos.apache.org/xsd">
+ <xs:import namespace="http://pojo.stub.controller.cloud.stratos.apache.org/xsd"></xs:import>
<xs:complexType name="Partition">
<xs:sequence>
<xs:element minOccurs="0" name="id" nillable="true" type="xs:string"></xs:element>
@@ -1165,22 +1134,22 @@
</wsdl:binding>
<wsdl:service name="AutoScalerService">
<wsdl:port name="AutoScalerServiceHttpSoap11Endpoint" binding="ns:AutoScalerServiceSoap11Binding">
- <soap:address location="http://10.128.181.194:9766/services/AutoScalerService.AutoScalerServiceHttpSoap11Endpoint/"></soap:address>
+ <soap:address location="http://172.17.42.1:9763/services/AutoScalerService.AutoScalerServiceHttpSoap11Endpoint/"></soap:address>
</wsdl:port>
<wsdl:port name="AutoScalerServiceHttpsSoap11Endpoint" binding="ns:AutoScalerServiceSoap11Binding">
- <soap:address location="https://10.128.181.194:9446/services/AutoScalerService.AutoScalerServiceHttpsSoap11Endpoint/"></soap:address>
+ <soap:address location="https://172.17.42.1:9443/services/AutoScalerService.AutoScalerServiceHttpsSoap11Endpoint/"></soap:address>
</wsdl:port>
<wsdl:port name="AutoScalerServiceHttpsSoap12Endpoint" binding="ns:AutoScalerServiceSoap12Binding">
- <soap12:address location="https://10.128.181.194:9446/services/AutoScalerService.AutoScalerServiceHttpsSoap12Endpoint/"></soap12:address>
+ <soap12:address location="https://172.17.42.1:9443/services/AutoScalerService.AutoScalerServiceHttpsSoap12Endpoint/"></soap12:address>
</wsdl:port>
<wsdl:port name="AutoScalerServiceHttpSoap12Endpoint" binding="ns:AutoScalerServiceSoap12Binding">
- <soap12:address location="http://10.128.181.194:9766/services/AutoScalerService.AutoScalerServiceHttpSoap12Endpoint/"></soap12:address>
+ <soap12:address location="http://172.17.42.1:9763/services/AutoScalerService.AutoScalerServiceHttpSoap12Endpoint/"></soap12:address>
</wsdl:port>
<wsdl:port name="AutoScalerServiceHttpEndpoint" binding="ns:AutoScalerServiceHttpBinding">
- <http:address location="http://10.128.181.194:9766/services/AutoScalerService.AutoScalerServiceHttpEndpoint/"></http:address>
+ <http:address location="http://172.17.42.1:9763/services/AutoScalerService.AutoScalerServiceHttpEndpoint/"></http:address>
</wsdl:port>
<wsdl:port name="AutoScalerServiceHttpsEndpoint" binding="ns:AutoScalerServiceHttpBinding">
- <http:address location="https://10.128.181.194:9446/services/AutoScalerService.AutoScalerServiceHttpsEndpoint/"></http:address>
+ <http:address location="https://172.17.42.1:9443/services/AutoScalerService.AutoScalerServiceHttpsEndpoint/"></http:address>
</wsdl:port>
</wsdl:service>
-</wsdl:definitions>
+</wsdl:definitions>
\ No newline at end of file