stratos-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject [36/50] [abbrv] stratos git commit: Update cluster with serviceName
Date Tue, 01 Sep 2015 12:30:14 GMT
Update cluster with serviceName


Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/3ab0f9e5
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/3ab0f9e5
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/3ab0f9e5

Branch: refs/heads/master
Commit: 3ab0f9e56b238f521965f602a5d30d87a5b626c2
Parents: 1f5df1c
Author: gayangunarathne <gayang@wso2.com>
Authored: Sat Aug 29 00:59:18 2015 +0530
Committer: gayangunarathne <gayang@wso2.com>
Committed: Sat Aug 29 00:59:18 2015 +0530

----------------------------------------------------------------------
 .../applications/ApplicationUtils.java          |  2 +-
 .../context/cluster/ClusterContextFactory.java  |  2 +-
 .../messaging/topology/TopologyBuilder.java     |  2 +-
 .../messaging/domain/topology/Cluster.java      | 24 ++++++++++----------
 .../artifacts/application.json                  |  2 +-
 samples/cartridges/kubernetes/php.json          |  2 +-
 6 files changed, 17 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/3ab0f9e5/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/ApplicationUtils.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/ApplicationUtils.java
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/ApplicationUtils.java
index c048034..4eec5f9 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/ApplicationUtils.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/ApplicationUtils.java
@@ -222,7 +222,7 @@ public class ApplicationUtils {
         //basicPayloadData.setDeployment("default");//currently hard coded to default
         basicPayloadData.setMultitenant(String.valueOf(cartridge.getMultiTenant()));
         basicPayloadData.setPortMappings(createPortMappingPayloadString(cartridge));
-        basicPayloadData.setServiceName(cartridge.getType());
+        basicPayloadData.setServiceName(cartridge.getUuid());
         basicPayloadData.setProvider(cartridge.getProvider());
 
         if (repoUrl != null) {

http://git-wip-us.apache.org/repos/asf/stratos/blob/3ab0f9e5/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/ClusterContextFactory.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/ClusterContextFactory.java
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/ClusterContextFactory.java
index 92a6b0a..5637cd3 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/ClusterContextFactory.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/ClusterContextFactory.java
@@ -37,7 +37,7 @@ public class ClusterContextFactory {
             return null;
         }
 
-        String autoscalePolicyName = cluster.getAutoscalePolicyUuid();
+        String autoscalePolicyName = cluster.getAutoscalePolicyName();
 
         if (log.isDebugEnabled()) {
             log.debug("Autoscaler policy name: " + autoscalePolicyName);

http://git-wip-us.apache.org/repos/asf/stratos/blob/3ab0f9e5/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/messaging/topology/TopologyBuilder.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/messaging/topology/TopologyBuilder.java
b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/messaging/topology/TopologyBuilder.java
index 60fd806..142b16f 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/messaging/topology/TopologyBuilder.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/messaging/topology/TopologyBuilder.java
@@ -385,7 +385,7 @@ public class TopologyBuilder {
             try {
                 TopologyManager.acquireWriteLock();
                 Cluster cluster = service.removeCluster(ctxt.getClusterId());
-                deploymentPolicy = cluster.getDeploymentPolicyUuid();
+                deploymentPolicy = cluster.getDeploymentPolicyName();
                 TopologyManager.updateTopology(topology);
             } finally {
                 TopologyManager.releaseWriteLock();

http://git-wip-us.apache.org/repos/asf/stratos/blob/3ab0f9e5/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/Cluster.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/Cluster.java
b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/Cluster.java
index 2437730..babf38c 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/Cluster.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/Cluster.java
@@ -40,8 +40,8 @@ public class Cluster implements Serializable {
 
     private final String serviceName;
     private final String clusterId;
-    private final String autoscalePolicyUuid;
-    private final String deploymentPolicyUuid;
+    private final String autoscalePolicyName;
+    private final String deploymentPolicyName;
 
     private List<String> hostNames;
     private String tenantRange;
@@ -66,8 +66,8 @@ public class Cluster implements Serializable {
     public Cluster(Cluster cluster) {
         this.serviceName = cluster.getServiceName();
         this.clusterId = cluster.getClusterId();
-        this.deploymentPolicyUuid = cluster.getDeploymentPolicyUuid();
-        this.autoscalePolicyUuid = cluster.getAutoscalePolicyUuid();
+        this.deploymentPolicyName = cluster.getDeploymentPolicyName();
+        this.autoscalePolicyName = cluster.getAutoscalePolicyName();
         this.appId = cluster.getAppId();
         this.setHostNames(cluster.getHostNames());
         this.memberMap = cluster.getMemberMap();
@@ -86,8 +86,8 @@ public class Cluster implements Serializable {
                    String autoscalePolicyName, String appId) {
         this.serviceName = serviceName;
         this.clusterId = clusterId;
-        this.deploymentPolicyUuid = deploymentPolicyName;
-        this.autoscalePolicyUuid = autoscalePolicyName;
+        this.deploymentPolicyName = deploymentPolicyName;
+        this.autoscalePolicyName = autoscalePolicyName;
         this.setHostNames(new ArrayList<String>());
         this.memberMap = new HashMap<String, Member>();
         this.appId = appId;
@@ -154,12 +154,12 @@ public class Cluster implements Serializable {
         this.properties = properties;
     }
 
-    public String getAutoscalePolicyUuid() {
-        return autoscalePolicyUuid;
+    public String getAutoscalePolicyName() {
+        return autoscalePolicyName;
     }
 
-    public String getDeploymentPolicyUuid() {
-        return deploymentPolicyUuid;
+    public String getDeploymentPolicyName() {
+        return deploymentPolicyName;
     }
 
     public String getLoadBalanceAlgorithmName() {
@@ -363,8 +363,8 @@ public class Cluster implements Serializable {
     public String toString() {
         return String.format("[serviceName=%s, clusterId=%s, autoscalePolicyName=%s, deploymentPolicyName=%s,
" +
                         "hostNames=%s, tenantRange=%s, loadBalanceAlgorithmName=%s, appId=%s,
parentId=%s, " +
-                        "accessUrls=%s, kubernetesServices=%s]", serviceName, clusterId,
autoscalePolicyUuid,
-                deploymentPolicyUuid, hostNames, tenantRange, loadBalanceAlgorithmName, appId,
parentId,
+                        "accessUrls=%s, kubernetesServices=%s]", serviceName, clusterId,
autoscalePolicyName,
+                deploymentPolicyName, hostNames, tenantRange, loadBalanceAlgorithmName, appId,
parentId,
                 accessUrls, kubernetesServices);
     }
 }

http://git-wip-us.apache.org/repos/asf/stratos/blob/3ab0f9e5/samples/applications/simple/single-cartridge-app/artifacts/application.json
----------------------------------------------------------------------
diff --git a/samples/applications/simple/single-cartridge-app/artifacts/application.json b/samples/applications/simple/single-cartridge-app/artifacts/application.json
index 4043e4f..14eb119 100644
--- a/samples/applications/simple/single-cartridge-app/artifacts/application.json
+++ b/samples/applications/simple/single-cartridge-app/artifacts/application.json
@@ -14,7 +14,7 @@
                     "deploymentPolicy": "deployment-policy-1",
                     "artifactRepository": {
                         "privateRepo": false,
-                        "repoUrl": "https://github.com/lakwarus/single-cartridge.git",
+                        "repoUrl": "",
                         "repoUsername": "",
                         "repoPassword": ""
                     }

http://git-wip-us.apache.org/repos/asf/stratos/blob/3ab0f9e5/samples/cartridges/kubernetes/php.json
----------------------------------------------------------------------
diff --git a/samples/cartridges/kubernetes/php.json b/samples/cartridges/kubernetes/php.json
index 85adc13..260fb22 100755
--- a/samples/cartridges/kubernetes/php.json
+++ b/samples/cartridges/kubernetes/php.json
@@ -12,7 +12,7 @@
         {
             "name": "http-80",
             "protocol": "http",
-            "port": "80",
+            "port": "22",
             "proxyPort": "8281"
         }
     ],


Mime
View raw message