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/11/04 12:28:21 UTC

[1/2] git commit: Removing not implemented exceptions

Repository: stratos
Updated Branches:
  refs/heads/docker-grouping-merge 2a6606f7f -> f55d5447e


Removing not implemented exceptions


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

Branch: refs/heads/docker-grouping-merge
Commit: c8dc8cc8cc9297c26867a0c05a6a0c7a0e9833ae
Parents: 77d1a7c
Author: Imesh Gunaratne <im...@apache.org>
Authored: Tue Nov 4 16:58:06 2014 +0530
Committer: Imesh Gunaratne <im...@apache.org>
Committed: Tue Nov 4 16:58:06 2014 +0530

----------------------------------------------------------------------
 .../manager/client/AutoscalerServiceClient.java |  6 +--
 .../bean/util/converter/PojoConverter.java      | 40 ++++++++++----------
 .../rest/endpoint/services/ServiceUtils.java    | 20 +++++-----
 3 files changed, 30 insertions(+), 36 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/c8dc8cc8/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/client/AutoscalerServiceClient.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/client/AutoscalerServiceClient.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/client/AutoscalerServiceClient.java
index 8572494..2e87cbf 100644
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/client/AutoscalerServiceClient.java
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/client/AutoscalerServiceClient.java
@@ -300,10 +300,6 @@ public class AutoscalerServiceClient {
     }
     
     public void updateClusterMonitor(String clusterId, Properties properties) throws RemoteException, AutoScalerServiceInvalidArgumentExceptionException {
-        //TODO: To be fixed
-        throw new NotImplementedException();
-        //stub.updateClusterMonitor(clusterId, properties);
+        stub.updateClusterMonitor(clusterId, properties);
     }
-
-
 }

http://git-wip-us.apache.org/repos/asf/stratos/blob/c8dc8cc8/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 9ae6fcb..a1fa9c6 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
@@ -242,27 +242,25 @@ public class PojoConverter {
 
 
     public static PropertiesE getASProperties(List<PropertyBean> propertyBeans) {
-        //TODO: To be fixed
-        throw new NotImplementedException();
-//        if (propertyBeans == null || propertyBeans.isEmpty()) {
-//            return null;
-//        }
-//
-//        //convert to an array
-//        PropertyBean[] propertyBeansArray = new PropertyBean[propertyBeans.size()];
-//        propertyBeans.toArray(propertyBeansArray);
-//        PropertyE[] propertyArray = new PropertyE[propertyBeansArray.length];
-//
-//        for (int j = 0; j < propertyBeansArray.length; j++) {
-//            PropertyE property = new PropertyE();
-//            property.setName(propertyBeansArray[j].name);
-//            property.setValue(propertyBeansArray[j].value);
-//            propertyArray[j] = property;
-//        }
-//
-//        PropertiesE properties = new PropertiesE();
-//        properties.setProperties(propertyArray);
-//        return properties;
+        if (propertyBeans == null || propertyBeans.isEmpty()) {
+            return null;
+        }
+
+        //convert to an array
+        PropertyBean[] propertyBeansArray = new PropertyBean[propertyBeans.size()];
+        propertyBeans.toArray(propertyBeansArray);
+        PropertyE[] propertyArray = new PropertyE[propertyBeansArray.length];
+
+        for (int j = 0; j < propertyBeansArray.length; j++) {
+            PropertyE property = new PropertyE();
+            property.setName(propertyBeansArray[j].name);
+            property.setValue(propertyBeansArray[j].value);
+            propertyArray[j] = property;
+        }
+
+        PropertiesE properties = new PropertiesE();
+        properties.setProperties(propertyArray);
+        return properties;
     }
 
     private static NetworkInterfaces getNetworkInterfaces(List<NetworkInterfaceBean> networkInterfaceBeans) {

http://git-wip-us.apache.org/repos/asf/stratos/blob/c8dc8cc8/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/services/ServiceUtils.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/services/ServiceUtils.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/services/ServiceUtils.java
index 0a373cf..4c75e6b 100644
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/services/ServiceUtils.java
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/services/ServiceUtils.java
@@ -26,6 +26,8 @@ import org.apache.commons.logging.LogFactory;
 import org.apache.stratos.autoscaler.applications.pojo.xsd.ApplicationContext;
 import org.apache.stratos.autoscaler.stub.*;
 import org.apache.stratos.autoscaler.stub.deployment.policy.DeploymentPolicy;
+import org.apache.stratos.autoscaler.stub.pojo.PropertiesE;
+import org.apache.stratos.autoscaler.stub.pojo.PropertyE;
 import org.apache.stratos.cloud.controller.stub.CloudControllerServiceInvalidCartridgeTypeExceptionException;
 import org.apache.stratos.autoscaler.stub.AutoScalerServiceApplicationDefinitionExceptionException;
 import org.apache.stratos.autoscaler.stub.AutoScalerServiceInvalidPartitionExceptionException;
@@ -144,16 +146,14 @@ public class ServiceUtils {
         applicationContext.setTeantAdminUsername(userName);
 
         if(appDefinition.getProperty() != null) {
-            //TODO: To be fixed
-            throw new NotImplementedException();
-//            PropertiesE properties = new PropertiesE();
-//            for (org.apache.stratos.manager.composite.application.beans.PropertyBean propertyBean : appDefinition.getProperty()) {
-//                PropertyE property = new PropertyE();
-//                property.setName(propertyBean.getName());
-//                property.setValue(propertyBean.getValue());
-//                properties.addProperties(property);
-//            }
-//            applicationContext.setProperties(properties);
+            PropertiesE properties = new PropertiesE();
+            for (org.apache.stratos.manager.composite.application.beans.PropertyBean propertyBean : appDefinition.getProperty()) {
+                PropertyE property = new PropertyE();
+                property.setName(propertyBean.getName());
+                property.setValue(propertyBean.getValue());
+                properties.addProperties(property);
+            }
+            applicationContext.setProperties(properties);
         }
 
         try {


[2/2] git commit: Merge remote-tracking branch 'origin/docker-grouping-merge' into docker-grouping-merge

Posted by im...@apache.org.
Merge remote-tracking branch 'origin/docker-grouping-merge' into docker-grouping-merge


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

Branch: refs/heads/docker-grouping-merge
Commit: f55d5447e0ca126e1d3d4a989d9129d1830142b4
Parents: c8dc8cc 2a6606f
Author: Imesh Gunaratne <im...@apache.org>
Authored: Tue Nov 4 16:58:16 2014 +0530
Committer: Imesh Gunaratne <im...@apache.org>
Committed: Tue Nov 4 16:58:16 2014 +0530

----------------------------------------------------------------------
 .../status/checker/StatusChecker.java           | 27 +++++++++-----------
 .../controller/topology/TopologyBuilder.java    |  2 ++
 .../manager/client/AutoscalerServiceClient.java |  2 +-
 .../category/DefaultLoadBalancerCategory.java   |  2 +-
 .../ServiceLevelLoadBalancerCategory.java       |  2 +-
 5 files changed, 17 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/f55d5447/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/client/AutoscalerServiceClient.java
----------------------------------------------------------------------