You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by ga...@apache.org on 2015/11/16 15:38:23 UTC

[1/4] stratos git commit: Revert "Adding the unit test to the aws lb extension"

Repository: stratos
Updated Branches:
  refs/heads/stratos-4.1.x f977732b2 -> 44f527018


Revert "Adding the unit test to the aws lb extension"

This reverts commit f977732b25b016a9af281d102b371c9ef3a22713.


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

Branch: refs/heads/stratos-4.1.x
Commit: 8c0b402fb0f374a0cec8761bdc940923e3b87462
Parents: f977732
Author: gayangunarathne <ga...@wso2.com>
Authored: Mon Nov 16 20:06:06 2015 +0530
Committer: gayangunarathne <ga...@wso2.com>
Committed: Mon Nov 16 20:06:06 2015 +0530

----------------------------------------------------------------------
 .../stratos/aws/extension/AwsHelperTest.java    | 82 --------------------
 .../src/test/resources/log4j.properties         | 28 -------
 2 files changed, 110 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/8c0b402f/extensions/load-balancer/modules/aws-extension/src/test/java/org/apache/stratos/aws/extension/AwsHelperTest.java
----------------------------------------------------------------------
diff --git a/extensions/load-balancer/modules/aws-extension/src/test/java/org/apache/stratos/aws/extension/AwsHelperTest.java b/extensions/load-balancer/modules/aws-extension/src/test/java/org/apache/stratos/aws/extension/AwsHelperTest.java
deleted file mode 100644
index 840227d..0000000
--- a/extensions/load-balancer/modules/aws-extension/src/test/java/org/apache/stratos/aws/extension/AwsHelperTest.java
+++ /dev/null
@@ -1,82 +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.aws.extension;
-
-import com.amazonaws.services.ec2.model.Filter;
-import org.apache.stratos.load.balancer.extension.api.exception.LoadBalancerExtensionException;
-
-import org.junit.*;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.Set;
-
-
-/**
- * AwsHelper util test.
- */
-public class AwsHelperTest {
-
-    @Test
-    public void testSecurityGroupFilters()
-		    throws LoadBalancerExtensionException, NoSuchMethodException, InvocationTargetException,
-		           IllegalAccessException {
-	    Set<Filter> filters=(Set<Filter>)genericInvokMethod(new AWSHelper(null,null), "getFilters",2,"Test VPC ID","test");
-
-	    Assert.assertNotNull(filters);
-	    Assert.assertEquals(2,filters.size());
-
-    }
-
-	/**
-	 * Method to access the private methods
-	 * @param obj
-	 * @param methodName
-	 * @param paramCount
-	 * @param params
-	 * @return
-	 */
-	public static Object genericInvokMethod(Object obj, String methodName,
-	                                        int paramCount, Object... params) {
-		Method method;
-		Object requiredObj = null;
-		Object[] parameters = new Object[paramCount];
-		Class<?>[] classArray = new Class<?>[paramCount];
-		for (int i = 0; i < paramCount; i++) {
-			parameters[i] = params[i];
-			classArray[i] = params[i].getClass();
-		}
-		try {
-			method = obj.getClass().getDeclaredMethod(methodName, classArray);
-			method.setAccessible(true);
-			requiredObj = method.invoke(obj, params);
-		} catch (NoSuchMethodException e) {
-			e.printStackTrace();
-		} catch (IllegalArgumentException e) {
-			e.printStackTrace();
-		} catch (IllegalAccessException e) {
-			e.printStackTrace();
-		} catch (InvocationTargetException e) {
-			e.printStackTrace();
-		}
-
-		return requiredObj;
-	}
- }

http://git-wip-us.apache.org/repos/asf/stratos/blob/8c0b402f/extensions/load-balancer/modules/aws-extension/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/extensions/load-balancer/modules/aws-extension/src/test/resources/log4j.properties b/extensions/load-balancer/modules/aws-extension/src/test/resources/log4j.properties
deleted file mode 100644
index 1da5b96..0000000
--- a/extensions/load-balancer/modules/aws-extension/src/test/resources/log4j.properties
+++ /dev/null
@@ -1,28 +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.
-#
-#
-
-log4j.appender.console=org.apache.log4j.ConsoleAppender
-log4j.appender.console.Target=System.out
-log4j.appender.console.layout=org.apache.log4j.PatternLayout
-log4j.appender.console.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p %c{1} [%t] %n%m%n
-
-#Loggers
-log4j.rootLogger=info, console


[2/4] stratos git commit: Fixes for STRATOS-1618 and STRATOS-1617

Posted by ga...@apache.org.
Fixes for STRATOS-1618 and STRATOS-1617


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

Branch: refs/heads/stratos-4.1.x
Commit: 03c30f10e670c2f8a56d128ce80e5ba65eb9c849
Parents: 8c0b402
Author: gayangunarathne <ga...@wso2.com>
Authored: Mon Nov 16 20:06:19 2015 +0530
Committer: gayangunarathne <ga...@wso2.com>
Committed: Mon Nov 16 20:06:34 2015 +0530

----------------------------------------------------------------------
 .../src/main/java/org/apache/stratos/aws/extension/AWSHelper.java | 3 ---
 1 file changed, 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/03c30f10/extensions/load-balancer/modules/aws-extension/src/main/java/org/apache/stratos/aws/extension/AWSHelper.java
----------------------------------------------------------------------
diff --git a/extensions/load-balancer/modules/aws-extension/src/main/java/org/apache/stratos/aws/extension/AWSHelper.java b/extensions/load-balancer/modules/aws-extension/src/main/java/org/apache/stratos/aws/extension/AWSHelper.java
index ea4a446..b29a47b 100644
--- a/extensions/load-balancer/modules/aws-extension/src/main/java/org/apache/stratos/aws/extension/AWSHelper.java
+++ b/extensions/load-balancer/modules/aws-extension/src/main/java/org/apache/stratos/aws/extension/AWSHelper.java
@@ -229,9 +229,6 @@ public class AWSHelper {
         }
     }
 
-	public AWSHelper(String awsAccessKey, String awsSecretKey){
-
-	}
     public int getStatisticsInterval() {
         return statisticsInterval;
     }


[3/4] stratos git commit: Adding the unit test to the aws lb extension

Posted by ga...@apache.org.
Adding the unit test to the aws lb extension


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

Branch: refs/heads/stratos-4.1.x
Commit: 824f0241cd2c044ff2ddf13718968c2019d0a0e0
Parents: 03c30f1
Author: gayangunarathne <ga...@puppet.gayan.org>
Authored: Mon Nov 16 19:05:41 2015 +0530
Committer: gayangunarathne <ga...@wso2.com>
Committed: Mon Nov 16 20:07:23 2015 +0530

----------------------------------------------------------------------
 .../src/main/java/org/apache/stratos/aws/extension/AWSHelper.java | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/824f0241/extensions/load-balancer/modules/aws-extension/src/main/java/org/apache/stratos/aws/extension/AWSHelper.java
----------------------------------------------------------------------
diff --git a/extensions/load-balancer/modules/aws-extension/src/main/java/org/apache/stratos/aws/extension/AWSHelper.java b/extensions/load-balancer/modules/aws-extension/src/main/java/org/apache/stratos/aws/extension/AWSHelper.java
index b29a47b..ea4a446 100644
--- a/extensions/load-balancer/modules/aws-extension/src/main/java/org/apache/stratos/aws/extension/AWSHelper.java
+++ b/extensions/load-balancer/modules/aws-extension/src/main/java/org/apache/stratos/aws/extension/AWSHelper.java
@@ -229,6 +229,9 @@ public class AWSHelper {
         }
     }
 
+	public AWSHelper(String awsAccessKey, String awsSecretKey){
+
+	}
     public int getStatisticsInterval() {
         return statisticsInterval;
     }


[4/4] stratos git commit: Adding the unit test to the aws lb extension

Posted by ga...@apache.org.
Adding the unit test to the aws lb extension


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

Branch: refs/heads/stratos-4.1.x
Commit: 44f527018cb13fcaf2acdf19f397b69fb9561267
Parents: 824f024
Author: gayangunarathne <ga...@puppet.gayan.org>
Authored: Mon Nov 16 19:06:07 2015 +0530
Committer: gayangunarathne <ga...@wso2.com>
Committed: Mon Nov 16 20:07:37 2015 +0530

----------------------------------------------------------------------
 .../stratos/aws/extension/AwsHelperTest.java    | 82 ++++++++++++++++++++
 .../src/test/resources/log4j.properties         | 28 +++++++
 2 files changed, 110 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/44f52701/extensions/load-balancer/modules/aws-extension/src/test/java/org/apache/stratos/aws/extension/AwsHelperTest.java
----------------------------------------------------------------------
diff --git a/extensions/load-balancer/modules/aws-extension/src/test/java/org/apache/stratos/aws/extension/AwsHelperTest.java b/extensions/load-balancer/modules/aws-extension/src/test/java/org/apache/stratos/aws/extension/AwsHelperTest.java
new file mode 100644
index 0000000..840227d
--- /dev/null
+++ b/extensions/load-balancer/modules/aws-extension/src/test/java/org/apache/stratos/aws/extension/AwsHelperTest.java
@@ -0,0 +1,82 @@
+/*
+ * 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.aws.extension;
+
+import com.amazonaws.services.ec2.model.Filter;
+import org.apache.stratos.load.balancer.extension.api.exception.LoadBalancerExtensionException;
+
+import org.junit.*;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.Set;
+
+
+/**
+ * AwsHelper util test.
+ */
+public class AwsHelperTest {
+
+    @Test
+    public void testSecurityGroupFilters()
+		    throws LoadBalancerExtensionException, NoSuchMethodException, InvocationTargetException,
+		           IllegalAccessException {
+	    Set<Filter> filters=(Set<Filter>)genericInvokMethod(new AWSHelper(null,null), "getFilters",2,"Test VPC ID","test");
+
+	    Assert.assertNotNull(filters);
+	    Assert.assertEquals(2,filters.size());
+
+    }
+
+	/**
+	 * Method to access the private methods
+	 * @param obj
+	 * @param methodName
+	 * @param paramCount
+	 * @param params
+	 * @return
+	 */
+	public static Object genericInvokMethod(Object obj, String methodName,
+	                                        int paramCount, Object... params) {
+		Method method;
+		Object requiredObj = null;
+		Object[] parameters = new Object[paramCount];
+		Class<?>[] classArray = new Class<?>[paramCount];
+		for (int i = 0; i < paramCount; i++) {
+			parameters[i] = params[i];
+			classArray[i] = params[i].getClass();
+		}
+		try {
+			method = obj.getClass().getDeclaredMethod(methodName, classArray);
+			method.setAccessible(true);
+			requiredObj = method.invoke(obj, params);
+		} catch (NoSuchMethodException e) {
+			e.printStackTrace();
+		} catch (IllegalArgumentException e) {
+			e.printStackTrace();
+		} catch (IllegalAccessException e) {
+			e.printStackTrace();
+		} catch (InvocationTargetException e) {
+			e.printStackTrace();
+		}
+
+		return requiredObj;
+	}
+ }

http://git-wip-us.apache.org/repos/asf/stratos/blob/44f52701/extensions/load-balancer/modules/aws-extension/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/extensions/load-balancer/modules/aws-extension/src/test/resources/log4j.properties b/extensions/load-balancer/modules/aws-extension/src/test/resources/log4j.properties
new file mode 100644
index 0000000..1da5b96
--- /dev/null
+++ b/extensions/load-balancer/modules/aws-extension/src/test/resources/log4j.properties
@@ -0,0 +1,28 @@
+#
+#
+# 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.
+#
+#
+
+log4j.appender.console=org.apache.log4j.ConsoleAppender
+log4j.appender.console.Target=System.out
+log4j.appender.console.layout=org.apache.log4j.PatternLayout
+log4j.appender.console.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p %c{1} [%t] %n%m%n
+
+#Loggers
+log4j.rootLogger=info, console