You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by im...@apache.org on 2014/12/13 14:36:23 UTC
stratos git commit: Moving application deployment successful message
to the correct position
Repository: stratos
Updated Branches:
refs/heads/4.1.0-test 1b1444203 -> 1dba8adae
Moving application deployment successful message to the correct position
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/1dba8ada
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/1dba8ada
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/1dba8ada
Branch: refs/heads/4.1.0-test
Commit: 1dba8adae5d5be50b15167d3c7676b31de1ce059
Parents: 1b14442
Author: Imesh Gunaratne <im...@apache.org>
Authored: Sat Dec 13 19:06:13 2014 +0530
Committer: Imesh Gunaratne <im...@apache.org>
Committed: Sat Dec 13 19:06:13 2014 +0530
----------------------------------------------------------------------
.../rest/endpoint/api/StratosApiV41Utils.java | 20 +++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/1dba8ada/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
index 4084426..899c2e8 100644
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
@@ -976,14 +976,19 @@ public class StratosApiV41Utils {
throw new RestAPIException(e);
}
}
-
+
+ /**
+ * Deploy application with a deployment policy.
+ * @param deploymentPolicyBean
+ * @throws RestAPIException
+ */
public static void deployApplication(
org.apache.stratos.rest.endpoint.bean.autoscaler.policy.deployment.DeploymentPolicy deploymentPolicyBean)
throws RestAPIException {
- if (log.isDebugEnabled()) {
- log.debug("Starting to deploy a deployment policy of application: "
- + deploymentPolicyBean.applicationPolicy.applicationId);
+ if (log.isInfoEnabled()) {
+ log.info(String.format("Starting to deploy application: [application-id] %s [deployment-policy-id] %s",
+ deploymentPolicyBean.applicationPolicy.applicationId, deploymentPolicyBean.id));
}
AutoscalerServiceClient autoscalerServiceClient = getAutoscalerServiceClient();
@@ -994,6 +999,10 @@ public class StratosApiV41Utils {
try {
autoscalerServiceClient.deployDeploymentPolicy(deploymentPolicy);
+ if(log.isInfoEnabled()) {
+ log.info(String.format("Application deployed successfully: [application-id] %s [deployment-policy-id] %s",
+ deploymentPolicy.getApplicationId(), deploymentPolicy.getId()));
+ }
} catch (RemoteException e) {
log.error(e.getMessage(), e);
throw new RestAPIException(e.getMessage(), e);
@@ -1002,9 +1011,6 @@ public class StratosApiV41Utils {
log.error(message, e);
throw new RestAPIException(message, e);
}
-
- log.info(String.format("Application deployed: [application-id] %s [deployment-policy-id] %s",
- deploymentPolicy.getApplicationId(), deploymentPolicy.getId()));
}
}