You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by ra...@apache.org on 2015/09/10 23:50:27 UTC

[01/21] stratos git commit: Uplifting automation engine to v4.4.3, dynamically pick ports for integration tests

Repository: stratos
Updated Branches:
  refs/heads/master 83e94cf05 -> c06642708


http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/applications/g-sc-G123-1-sample-applications-test-v1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/applications/g-sc-G123-1-sample-applications-test-v1.json b/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/applications/g-sc-G123-1-sample-applications-test-v1.json
new file mode 100644
index 0000000..70cd69b
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/applications/g-sc-G123-1-sample-applications-test-v1.json
@@ -0,0 +1,86 @@
+{
+    "alias": "g-sc-G123-1-sample-applications-test",
+    "applicationId": "g-sc-G123-1-sample-applications-test",
+    "components": {
+        "cartridges": [],
+        "groups": [
+            {
+                "name": "G1-sample-applications-test",
+                "groupMaxInstances": 1,
+                "groupMinInstances": 1,
+                "alias": "group1-sample-applications-test",
+                "cartridges": [
+                    {
+                        "cartridgeMin": 2,
+                        "cartridgeMax": 3,
+                        "type": "c1-sample-applications-test",
+                        "subscribableInfo": {
+                            "alias": "c1-1x0-sample-applications-test",
+                            "deploymentPolicy": "deployment-policy-sample-applications-test",
+                            "artifactRepository": {
+                                "repoUsername": "user",
+                                "repoUrl": "http://stratos.apache.org:10080/git/default.git",
+                                "privateRepo": true,
+                                "repoPassword": "c-policy"
+                            },
+                            "autoscalingPolicy": "autoscaling-policy-sample-applications-test"
+                        }
+                    }
+                ],
+                "groups": [
+                    {
+                        "name": "G2-sample-applications-test",
+                        "groupMaxInstances": 1,
+                        "groupMinInstances": 1,
+                        "alias": "group2-sample-applications-test",
+                        "cartridges": [
+                            {
+                                "cartridgeMin": 2,
+                                "cartridgeMax": 4,
+                                "type": "c2-sample-applications-test",
+                                "subscribableInfo": {
+                                    "alias": "c2-1x0-sample-applications-test",
+                                    "deploymentPolicy": "deployment-policy-sample-applications-test",
+                                    "artifactRepository": {
+                                        "repoUsername": "user",
+                                        "repoUrl": "http://stratos.apache.org:10080/git/default.git",
+                                        "privateRepo": true,
+                                        "repoPassword": "c-policy"
+                                    },
+                                    "autoscalingPolicy": "autoscaling-policy-sample-applications-test"
+                                }
+                            }
+                        ],
+                        "groups": [
+                            {
+                                "name": "G3-sample-applications-test",
+                                "groupMaxInstances": 3,
+                                "groupMinInstances": 2,
+                                "deploymentPolicy": "deployment-policy-sample-applications-test",
+                                "alias": "group3-sample-applications-test",
+                                "cartridges": [
+                                    {
+                                        "cartridgeMin": 2,
+                                        "cartridgeMax": 3,
+                                        "type": "c3-sample-applications-test",
+                                        "subscribableInfo": {
+                                            "alias": "c3-1x0-sample-applications-test",
+                                            "artifactRepository": {
+                                                "repoUsername": "user",
+                                                "repoUrl": "http://stratos.apache.org:10080/git/default.git",
+                                                "privateRepo": true,
+                                                "repoPassword": "c-policy"
+                                            },
+                                            "autoscalingPolicy": "autoscaling-policy-sample-applications-test"
+                                        }
+                                    }
+                                ],
+                                "groups": []
+                            }
+                        ]
+                    }
+                ]
+            }
+        ]
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/applications/g-sc-G123-1-sample-applications-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/applications/g-sc-G123-1-sample-applications-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/applications/g-sc-G123-1-sample-applications-test.json
new file mode 100644
index 0000000..ca40d63
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/applications/g-sc-G123-1-sample-applications-test.json
@@ -0,0 +1,86 @@
+{
+    "alias": "g-sc-G123-1-sample-applications-test",
+    "applicationId": "g-sc-G123-1-sample-applications-test",
+    "components": {
+        "cartridges": [],
+        "groups": [
+            {
+                "name": "G1-sample-applications-test",
+                "groupMaxInstances": 1,
+                "groupMinInstances": 1,
+                "alias": "group1-sample-applications-test",
+                "cartridges": [
+                    {
+                        "cartridgeMin": 1,
+                        "cartridgeMax": 2,
+                        "type": "c1-sample-applications-test",
+                        "subscribableInfo": {
+                            "alias": "c1-1x0-sample-applications-test",
+                            "deploymentPolicy": "deployment-policy-sample-applications-test",
+                            "artifactRepository": {
+                                "repoUsername": "user",
+                                "repoUrl": "http://stratos.apache.org:10080/git/default.git",
+                                "privateRepo": true,
+                                "repoPassword": "c-policy"
+                            },
+                            "autoscalingPolicy": "autoscaling-policy-sample-applications-test"
+                        }
+                    }
+                ],
+                "groups": [
+                    {
+                        "name": "G2-sample-applications-test",
+                        "groupMaxInstances": 1,
+                        "groupMinInstances": 1,
+                        "alias": "group2-sample-applications-test",
+                        "cartridges": [
+                            {
+                                "cartridgeMin": 1,
+                                "cartridgeMax": 2,
+                                "type": "c2-sample-applications-test",
+                                "subscribableInfo": {
+                                    "alias": "c2-1x0-sample-applications-test",
+                                    "deploymentPolicy": "deployment-policy-sample-applications-test",
+                                    "artifactRepository": {
+                                        "repoUsername": "user",
+                                        "repoUrl": "http://stratos.apache.org:10080/git/default.git",
+                                        "privateRepo": true,
+                                        "repoPassword": "c-policy"
+                                    },
+                                    "autoscalingPolicy": "autoscaling-policy-sample-applications-test"
+                                }
+                            }
+                        ],
+                        "groups": [
+                            {
+                                "name": "G3-sample-applications-test",
+                                "groupMaxInstances": 2,
+                                "groupMinInstances": 1,
+                                "deploymentPolicy": "deployment-policy-sample-applications-test",
+                                "alias": "group3-sample-applications-test",
+                                "cartridges": [
+                                    {
+                                        "cartridgeMin": 1,
+                                        "cartridgeMax": 2,
+                                        "type": "c3-sample-applications-test",
+                                        "subscribableInfo": {
+                                            "alias": "c3-1x0-sample-applications-test",
+                                            "artifactRepository": {
+                                                "repoUsername": "user",
+                                                "repoUrl": "http://stratos.apache.org:10080/git/default.git",
+                                                "privateRepo": true,
+                                                "repoPassword": "c-policy"
+                                            },
+                                            "autoscalingPolicy": "autoscaling-policy-sample-applications-test"
+                                        }
+                                    }
+                                ],
+                                "groups": []
+                            }
+                        ]
+                    }
+                ]
+            }
+        ]
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/applications/sample-applications-test-1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/applications/sample-applications-test-1.json b/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/applications/sample-applications-test-1.json
new file mode 100644
index 0000000..532bee6
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/applications/sample-applications-test-1.json
@@ -0,0 +1,86 @@
+{
+    "alias": "sample-applications-test-1",
+    "applicationId": "sample-applications-test-1",
+    "components": {
+        "cartridges": [],
+        "groups": [
+            {
+                "name": "G1-sample-applications-test",
+                "groupMaxInstances": 1,
+                "groupMinInstances": 1,
+                "alias": "group1-sample-applications-test",
+                "cartridges": [
+                    {
+                        "cartridgeMin": 1,
+                        "cartridgeMax": 2,
+                        "type": "c1-sample-applications-test",
+                        "subscribableInfo": {
+                            "alias": "c1-1x0-sample-applications-test",
+                            "deploymentPolicy": "deployment-policy-sample-applications-test",
+                            "artifactRepository": {
+                                "repoUsername": "user",
+                                "repoUrl": "http://stratos.apache.org:10080/git/default.git",
+                                "privateRepo": true,
+                                "repoPassword": "c-policy"
+                            },
+                            "autoscalingPolicy": "autoscaling-policy-sample-applications-test"
+                        }
+                    }
+                ],
+                "groups": [
+                    {
+                        "name": "G2-sample-applications-test",
+                        "groupMaxInstances": 1,
+                        "groupMinInstances": 1,
+                        "alias": "group2-sample-applications-test",
+                        "cartridges": [
+                            {
+                                "cartridgeMin": 1,
+                                "cartridgeMax": 2,
+                                "type": "c2-sample-applications-test",
+                                "subscribableInfo": {
+                                    "alias": "c2-1x0-sample-applications-test",
+                                    "deploymentPolicy": "deployment-policy-sample-applications-test",
+                                    "artifactRepository": {
+                                        "repoUsername": "user",
+                                        "repoUrl": "http://stratos.apache.org:10080/git/default.git",
+                                        "privateRepo": true,
+                                        "repoPassword": "c-policy"
+                                    },
+                                    "autoscalingPolicy": "autoscaling-policy-sample-applications-test"
+                                }
+                            }
+                        ],
+                        "groups": [
+                            {
+                                "name": "G3-sample-applications-test",
+                                "groupMaxInstances": 2,
+                                "groupMinInstances": 1,
+                                "deploymentPolicy": "deployment-policy-sample-applications-test",
+                                "alias": "group3-sample-applications-test",
+                                "cartridges": [
+                                    {
+                                        "cartridgeMin": 1,
+                                        "cartridgeMax": 2,
+                                        "type": "c3-sample-applications-test",
+                                        "subscribableInfo": {
+                                            "alias": "c3-1x0-sample-applications-test",
+                                            "artifactRepository": {
+                                                "repoUsername": "user",
+                                                "repoUrl": "http://stratos.apache.org:10080/git/default.git",
+                                                "privateRepo": true,
+                                                "repoPassword": "c-policy"
+                                            },
+                                            "autoscalingPolicy": "autoscaling-policy-sample-applications-test"
+                                        }
+                                    }
+                                ],
+                                "groups": []
+                            }
+                        ]
+                    }
+                ]
+            }
+        ]
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/applications/sample-applications-test-2.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/applications/sample-applications-test-2.json b/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/applications/sample-applications-test-2.json
new file mode 100644
index 0000000..6427d7e
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/applications/sample-applications-test-2.json
@@ -0,0 +1,86 @@
+{
+    "alias": "sample-applications-test-2",
+    "applicationId": "sample-applications-test-2",
+    "components": {
+        "cartridges": [],
+        "groups": [
+            {
+                "name": "G1-sample-applications-test",
+                "groupMaxInstances": 1,
+                "groupMinInstances": 1,
+                "alias": "group1-sample-applications-test",
+                "cartridges": [
+                    {
+                        "cartridgeMin": 1,
+                        "cartridgeMax": 2,
+                        "type": "c1-sample-applications-test",
+                        "subscribableInfo": {
+                            "alias": "c1-1x0-sample-applications-test",
+                            "deploymentPolicy": "deployment-policy-sample-applications-test",
+                            "artifactRepository": {
+                                "repoUsername": "user",
+                                "repoUrl": "http://stratos.apache.org:10080/git/default.git",
+                                "privateRepo": true,
+                                "repoPassword": "c-policy"
+                            },
+                            "autoscalingPolicy": "autoscaling-policy-sample-applications-test"
+                        }
+                    }
+                ],
+                "groups": [
+                    {
+                        "name": "G2-sample-applications-test",
+                        "groupMaxInstances": 1,
+                        "groupMinInstances": 1,
+                        "alias": "group2-sample-applications-test",
+                        "cartridges": [
+                            {
+                                "cartridgeMin": 1,
+                                "cartridgeMax": 2,
+                                "type": "c2-sample-applications-test",
+                                "subscribableInfo": {
+                                    "alias": "c2-1x0-sample-applications-test",
+                                    "deploymentPolicy": "deployment-policy-sample-applications-test",
+                                    "artifactRepository": {
+                                        "repoUsername": "user",
+                                        "repoUrl": "http://stratos.apache.org:10080/git/default.git",
+                                        "privateRepo": true,
+                                        "repoPassword": "c-policy"
+                                    },
+                                    "autoscalingPolicy": "autoscaling-policy-sample-applications-test"
+                                }
+                            }
+                        ],
+                        "groups": [
+                            {
+                                "name": "G3-sample-applications-test",
+                                "groupMaxInstances": 2,
+                                "groupMinInstances": 1,
+                                "deploymentPolicy": "deployment-policy-sample-applications-test",
+                                "alias": "group3-sample-applications-test",
+                                "cartridges": [
+                                    {
+                                        "cartridgeMin": 1,
+                                        "cartridgeMax": 2,
+                                        "type": "c3-sample-applications-test",
+                                        "subscribableInfo": {
+                                            "alias": "c3-1x0-sample-applications-test",
+                                            "artifactRepository": {
+                                                "repoUsername": "user",
+                                                "repoUrl": "http://stratos.apache.org:10080/git/default.git",
+                                                "privateRepo": true,
+                                                "repoPassword": "c-policy"
+                                            },
+                                            "autoscalingPolicy": "autoscaling-policy-sample-applications-test"
+                                        }
+                                    }
+                                ],
+                                "groups": []
+                            }
+                        ]
+                    }
+                ]
+            }
+        ]
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/autoscaling-policies/autoscaling-policy-sample-applications-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/autoscaling-policies/autoscaling-policy-sample-applications-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/autoscaling-policies/autoscaling-policy-sample-applications-test.json
new file mode 100644
index 0000000..5bd90ab
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/autoscaling-policies/autoscaling-policy-sample-applications-test.json
@@ -0,0 +1,14 @@
+{
+    "id": "autoscaling-policy-sample-applications-test",
+    "loadThresholds": {
+        "requestsInFlight": {
+            "threshold": 35
+        },
+        "memoryConsumption": {
+            "threshold": 45
+        },
+        "loadAverage": {
+            "threshold": 25
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/cartridges-groups/cartrdige-nested-sample-applications-test-v1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/cartridges-groups/cartrdige-nested-sample-applications-test-v1.json b/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/cartridges-groups/cartrdige-nested-sample-applications-test-v1.json
new file mode 100644
index 0000000..9d1fc7b
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/cartridges-groups/cartrdige-nested-sample-applications-test-v1.json
@@ -0,0 +1,50 @@
+{
+    "name": "G1-sample-applications-test",
+    "dependencies": {
+        "terminationBehaviour": "terminate-none",
+        "startupOrders": [
+            {
+                "aliases": [
+                    "group.group2-sample-applications-test",
+                    "cartridge.c1-1x0-sample-applications-test"
+                ]
+            }
+        ]
+    },
+    "cartridges": [
+        "c1-sample-applications-test"
+    ],
+    "groups": [
+        {
+            "name": "G2-sample-applications-test",
+            "dependencies": {
+                "terminationBehaviour": "terminate-dependents",
+                "startupOrders": [
+                    {
+                        "aliases": [
+                            "group.group3-sample-applications-test",
+                            "cartridge.c2-1x0-sample-applications-test"
+                        ]
+                    }
+                ]
+            },
+            "cartridges": [
+                "c2-sample-applications-test"
+            ],
+            "groups": [
+                {
+                    "name": "G3-sample-applications-test",
+                    "dependencies": {
+                        "terminationBehaviour": "terminate-all",
+                        "startupOrders": []
+                    },
+                    "cartridges": [
+                        "c3-sample-applications-test"
+                    ],
+                    "groups": []
+                }
+            ]
+        }
+    ]
+}
+

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/cartridges-groups/cartrdige-nested-sample-applications-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/cartridges-groups/cartrdige-nested-sample-applications-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/cartridges-groups/cartrdige-nested-sample-applications-test.json
new file mode 100644
index 0000000..9d1fc7b
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/cartridges-groups/cartrdige-nested-sample-applications-test.json
@@ -0,0 +1,50 @@
+{
+    "name": "G1-sample-applications-test",
+    "dependencies": {
+        "terminationBehaviour": "terminate-none",
+        "startupOrders": [
+            {
+                "aliases": [
+                    "group.group2-sample-applications-test",
+                    "cartridge.c1-1x0-sample-applications-test"
+                ]
+            }
+        ]
+    },
+    "cartridges": [
+        "c1-sample-applications-test"
+    ],
+    "groups": [
+        {
+            "name": "G2-sample-applications-test",
+            "dependencies": {
+                "terminationBehaviour": "terminate-dependents",
+                "startupOrders": [
+                    {
+                        "aliases": [
+                            "group.group3-sample-applications-test",
+                            "cartridge.c2-1x0-sample-applications-test"
+                        ]
+                    }
+                ]
+            },
+            "cartridges": [
+                "c2-sample-applications-test"
+            ],
+            "groups": [
+                {
+                    "name": "G3-sample-applications-test",
+                    "dependencies": {
+                        "terminationBehaviour": "terminate-all",
+                        "startupOrders": []
+                    },
+                    "cartridges": [
+                        "c3-sample-applications-test"
+                    ],
+                    "groups": []
+                }
+            ]
+        }
+    ]
+}
+

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/cartridges/mock/c1-sample-applications-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/cartridges/mock/c1-sample-applications-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/cartridges/mock/c1-sample-applications-test.json
new file mode 100755
index 0000000..26f8588
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/cartridges/mock/c1-sample-applications-test.json
@@ -0,0 +1,45 @@
+{
+    "type": "c1-sample-applications-test",
+    "provider": "apache",
+    "host": "stratos.apache.org",
+    "category": "data",
+    "displayName": "c1-sample-applications-test",
+    "description": "c1-sample-applications-test Cartridge",
+    "version": "7",
+    "multiTenant": "false",
+    "portMapping": [
+        {
+            "name": "http-22",
+            "protocol": "http",
+            "port": "22",
+            "proxyPort": "8280"
+        }
+    ],
+    "deployment": {
+    },
+    "iaasProvider": [
+        {
+            "type": "mock",
+            "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
+            "networkInterfaces": [
+                {
+                    "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e"
+                }
+            ],
+            "property": [
+                {
+                    "name": "instanceType",
+                    "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594"
+                },
+                {
+                    "name": "keyPair",
+                    "value": "vishanth-key"
+                },
+                {
+                    "name": "securityGroups",
+                    "value": "default"
+                }
+            ]
+        }
+    ]
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/cartridges/mock/c2-sample-applications-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/cartridges/mock/c2-sample-applications-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/cartridges/mock/c2-sample-applications-test.json
new file mode 100755
index 0000000..0f3c61f
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/cartridges/mock/c2-sample-applications-test.json
@@ -0,0 +1,45 @@
+{
+    "type": "c2-sample-applications-test",
+    "provider": "apache",
+    "host": "stratos.apache.org",
+    "category": "data",
+    "displayName": "c2-sample-applications-test",
+    "description": "c2-sample-applications-test Cartridge",
+    "version": "7",
+    "multiTenant": "false",
+    "portMapping": [
+        {
+            "name": "http-22",
+            "protocol": "http",
+            "port": "22",
+            "proxyPort": "8280"
+        }
+    ],
+    "deployment": {
+    },
+    "iaasProvider": [
+        {
+            "type": "mock",
+            "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
+            "networkInterfaces": [
+                {
+                    "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e"
+                }
+            ],
+            "property": [
+                {
+                    "name": "instanceType",
+                    "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594"
+                },
+                {
+                    "name": "keyPair",
+                    "value": "vishanth-key"
+                },
+                {
+                    "name": "securityGroups",
+                    "value": "default"
+                }
+            ]
+        }
+    ]
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/cartridges/mock/c3-sample-applications-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/cartridges/mock/c3-sample-applications-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/cartridges/mock/c3-sample-applications-test.json
new file mode 100755
index 0000000..c959d53
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/cartridges/mock/c3-sample-applications-test.json
@@ -0,0 +1,45 @@
+{
+    "type": "c3-sample-applications-test",
+    "provider": "apache",
+    "host": "stratos.apache.org",
+    "category": "data",
+    "displayName": "c3-sample-applications-test",
+    "description": "c3-sample-applications-test Cartridge",
+    "version": "7",
+    "multiTenant": "false",
+    "portMapping": [
+        {
+            "name": "http-22",
+            "protocol": "http",
+            "port": "22",
+            "proxyPort": "8280"
+        }
+    ],
+    "deployment": {
+    },
+    "iaasProvider": [
+        {
+            "type": "mock",
+            "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
+            "networkInterfaces": [
+                {
+                    "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e"
+                }
+            ],
+            "property": [
+                {
+                    "name": "instanceType",
+                    "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594"
+                },
+                {
+                    "name": "keyPair",
+                    "value": "vishanth-key"
+                },
+                {
+                    "name": "securityGroups",
+                    "value": "default"
+                }
+            ]
+        }
+    ]
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/deployment-policies/deployment-policy-sample-applications-test-v1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/deployment-policies/deployment-policy-sample-applications-test-v1.json b/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/deployment-policies/deployment-policy-sample-applications-test-v1.json
new file mode 100644
index 0000000..0e35536
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/deployment-policies/deployment-policy-sample-applications-test-v1.json
@@ -0,0 +1,36 @@
+{
+    "id": "deployment-policy-sample-applications-test",
+    "networkPartitions": [
+        {
+            "id": "network-partition-sample-applications-test-1",
+            "partitionAlgo": "one-after-another",
+            "partitions": [
+                {
+                    "id": "partition-1",
+                    "partitionMax": 25
+                },
+                {
+                    "id": "partition-2",
+                    "partitionMax": 20
+                }
+            ]
+        },
+        {
+            "id": "network-partition-sample-applications-test-2",
+            "partitionAlgo": "round-robin",
+            "partitions": [
+                {
+                    "id": "network-partition-2-partition-1",
+                    "partitionMax": 15
+                },
+                {
+                    "id": "network-partition-2-partition-2",
+                    "partitionMax": 5
+                }
+            ]
+        }
+    ]
+}
+
+
+

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/deployment-policies/deployment-policy-sample-applications-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/deployment-policies/deployment-policy-sample-applications-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/deployment-policies/deployment-policy-sample-applications-test.json
new file mode 100644
index 0000000..2e26c25
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/deployment-policies/deployment-policy-sample-applications-test.json
@@ -0,0 +1,32 @@
+{
+    "id": "deployment-policy-sample-applications-test",
+    "networkPartitions": [
+        {
+            "id": "network-partition-sample-applications-test-1",
+            "partitionAlgo": "one-after-another",
+            "partitions": [
+                {
+                    "id": "partition-1",
+                    "partitionMax": 20
+                }
+            ]
+        },
+        {
+            "id": "network-partition-sample-applications-test-2",
+            "partitionAlgo": "round-robin",
+            "partitions": [
+                {
+                    "id": "network-partition-2-partition-1",
+                    "partitionMax": 10
+                },
+                {
+                    "id": "network-partition-2-partition-2",
+                    "partitionMax": 9
+                }
+            ]
+        }
+    ]
+}
+
+
+

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/network-partitions/mock/network-partition-sample-applications-test-1-v1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/network-partitions/mock/network-partition-sample-applications-test-1-v1.json b/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/network-partitions/mock/network-partition-sample-applications-test-1-v1.json
new file mode 100644
index 0000000..2df920e
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/network-partitions/mock/network-partition-sample-applications-test-1-v1.json
@@ -0,0 +1,28 @@
+{
+    "id": "network-partition-sample-applications-test-1",
+    "provider": "mock",
+    "partitions": [
+        {
+            "id": "partition-1",
+            "property": [
+                {
+                    "name": "region",
+                    "value": "default"
+                }
+            ]
+        },
+        {
+            "id": "partition-2",
+            "property": [
+                {
+                    "name": "region",
+                    "value": "default1"
+                },
+                {
+                    "name": "zone",
+                    "value": "z1"
+                }
+            ]
+        }
+    ]
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/network-partitions/mock/network-partition-sample-applications-test-1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/network-partitions/mock/network-partition-sample-applications-test-1.json b/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/network-partitions/mock/network-partition-sample-applications-test-1.json
new file mode 100644
index 0000000..8d7aed5
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/network-partitions/mock/network-partition-sample-applications-test-1.json
@@ -0,0 +1,15 @@
+{
+    "id": "network-partition-sample-applications-test-1",
+    "provider": "mock",
+    "partitions": [
+        {
+            "id": "partition-1",
+            "property": [
+                {
+                    "name": "region",
+                    "value": "default"
+                }
+            ]
+        }
+    ]
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/network-partitions/mock/network-partition-sample-applications-test-2.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/network-partitions/mock/network-partition-sample-applications-test-2.json b/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/network-partitions/mock/network-partition-sample-applications-test-2.json
new file mode 100644
index 0000000..2fd5411
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/network-partitions/mock/network-partition-sample-applications-test-2.json
@@ -0,0 +1,24 @@
+{
+    "id": "network-partition-sample-applications-test-2",
+    "provider": "mock",
+    "partitions": [
+        {
+            "id": "network-partition-2-partition-1",
+            "property": [
+                {
+                    "name": "region",
+                    "value": "default"
+                }
+            ]
+        },
+        {
+            "id": "network-partition-2-partition-2",
+            "property": [
+                {
+                    "name": "region",
+                    "value": "default"
+                }
+            ]
+        }
+    ]
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/single-cluster-scaling-test/application-policies/application-policy-single-cluster-scaling-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/single-cluster-scaling-test/application-policies/application-policy-single-cluster-scaling-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/single-cluster-scaling-test/application-policies/application-policy-single-cluster-scaling-test.json
new file mode 100644
index 0000000..866f568
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/single-cluster-scaling-test/application-policies/application-policy-single-cluster-scaling-test.json
@@ -0,0 +1,13 @@
+{
+    "id": "application-policy-single-cluster-scaling-test",
+    "algorithm": "one-after-another",
+    "networkPartitions": [
+        "network-partition-single-cluster-scaling-test"
+    ],
+    "properties": [
+        {
+            "name": "key-2",
+            "value": "value-2"
+        }
+    ]
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/single-cluster-scaling-test/applications/single-cluster-scaling-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/single-cluster-scaling-test/applications/single-cluster-scaling-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/single-cluster-scaling-test/applications/single-cluster-scaling-test.json
new file mode 100644
index 0000000..f091e26
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/single-cluster-scaling-test/applications/single-cluster-scaling-test.json
@@ -0,0 +1,28 @@
+{
+    "applicationId": "single-cluster-scaling-test",
+    "alias": "single-cluster-scaling-test",
+    "components": {
+        "cartridges": [
+            {
+                "type": "c7-single-cluster-scaling-test",
+                "cartridgeMin": 2,
+                "cartridgeMax": 5,
+                "subscribableInfo": {
+                    "alias": "my-c7",
+                    "autoscalingPolicy": "autoscaling-policy-single-cluster-scaling-test",
+                    "deploymentPolicy": "deployment-policy-single-cluster-scaling-test",
+                    "artifactRepository": {
+                        "privateRepo": false,
+                        "repoUrl": "https://github.com/imesh/stratos-tomcat-applications.git",
+                        "repoUsername": "",
+                        "repoPassword": ""
+                    }
+                }
+            }
+        ],
+        "dependencies": {
+            "terminationBehaviour": "terminate-none"
+        }
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/single-cluster-scaling-test/autoscaling-policies/autoscaling-policy-single-cluster-scaling-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/single-cluster-scaling-test/autoscaling-policies/autoscaling-policy-single-cluster-scaling-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/single-cluster-scaling-test/autoscaling-policies/autoscaling-policy-single-cluster-scaling-test.json
new file mode 100644
index 0000000..31602d1
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/single-cluster-scaling-test/autoscaling-policies/autoscaling-policy-single-cluster-scaling-test.json
@@ -0,0 +1,14 @@
+{
+    "id": "autoscaling-policy-single-cluster-scaling-test",
+    "loadThresholds": {
+        "requestsInFlight": {
+            "threshold": 20
+        },
+        "memoryConsumption": {
+            "threshold": 30
+        },
+        "loadAverage": {
+            "threshold": 25
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/single-cluster-scaling-test/cartridges/mock/c7-single-cluster-scaling-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/single-cluster-scaling-test/cartridges/mock/c7-single-cluster-scaling-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/single-cluster-scaling-test/cartridges/mock/c7-single-cluster-scaling-test.json
new file mode 100755
index 0000000..c8abf51
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/single-cluster-scaling-test/cartridges/mock/c7-single-cluster-scaling-test.json
@@ -0,0 +1,45 @@
+{
+    "type": "c7-single-cluster-scaling-test",
+    "provider": "apache",
+    "host": "stratos.apache.org",
+    "category": "data",
+    "displayName": "c7-single-cluster-scaling-test",
+    "description": "c7-single-cluster-scaling-test Cartridge",
+    "version": "7",
+    "multiTenant": "false",
+    "portMapping": [
+        {
+            "name": "http-22",
+            "protocol": "http",
+            "port": "22",
+            "proxyPort": "8280"
+        }
+    ],
+    "deployment": {
+    },
+    "iaasProvider": [
+        {
+            "type": "mock",
+            "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
+            "networkInterfaces": [
+                {
+                    "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e"
+                }
+            ],
+            "property": [
+                {
+                    "name": "instanceType",
+                    "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594"
+                },
+                {
+                    "name": "keyPair",
+                    "value": "vishanth-key"
+                },
+                {
+                    "name": "securityGroups",
+                    "value": "default"
+                }
+            ]
+        }
+    ]
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/single-cluster-scaling-test/deployment-policies/deployment-policy-single-cluster-scaling-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/single-cluster-scaling-test/deployment-policies/deployment-policy-single-cluster-scaling-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/single-cluster-scaling-test/deployment-policies/deployment-policy-single-cluster-scaling-test.json
new file mode 100644
index 0000000..4818751
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/single-cluster-scaling-test/deployment-policies/deployment-policy-single-cluster-scaling-test.json
@@ -0,0 +1,22 @@
+{
+    "id": "deployment-policy-single-cluster-scaling-test",
+    "networkPartitions": [
+        {
+            "id": "network-partition-single-cluster-scaling-test",
+            "partitionAlgo": "round-robin",
+            "partitions": [
+                {
+                    "id": "network-partition-11-partition-1",
+                    "partitionMax": 3
+                },
+                {
+                    "id": "network-partition-11-partition-2",
+                    "partitionMax": 3
+                }
+            ]
+        }
+    ]
+}
+
+
+

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/single-cluster-scaling-test/network-partitions/mock/network-partition-single-cluster-scaling-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/single-cluster-scaling-test/network-partitions/mock/network-partition-single-cluster-scaling-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/single-cluster-scaling-test/network-partitions/mock/network-partition-single-cluster-scaling-test.json
new file mode 100644
index 0000000..13f1723
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/single-cluster-scaling-test/network-partitions/mock/network-partition-single-cluster-scaling-test.json
@@ -0,0 +1,24 @@
+{
+    "id": "network-partition-single-cluster-scaling-test",
+    "provider": "mock",
+    "partitions": [
+        {
+            "id": "network-partition-11-partition-1",
+            "property": [
+                {
+                    "name": "region",
+                    "value": "default"
+                }
+            ]
+        },
+        {
+            "id": "network-partition-11-partition-2",
+            "property": [
+                {
+                    "name": "region",
+                    "value": "default"
+                }
+            ]
+        }
+    ]
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/stratos-testng.xml
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/stratos-testng.xml b/products/stratos/modules/integration/test-integration/src/test/resources/stratos-testng.xml
new file mode 100644
index 0000000..e9b0bce
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/stratos-testng.xml
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
+
+<suite name="StratosIntegrationSuite">
+    <listeners>
+        <listener class-name="org.wso2.carbon.automation.engine.testlisteners.TestExecutionListener"/>
+        <listener class-name="org.wso2.carbon.automation.engine.testlisteners.TestSuiteListener"/>
+        <listener class-name="org.wso2.carbon.automation.engine.testlisteners.TestTransformerListener"/>
+        <listener class-name="org.wso2.carbon.automation.engine.testlisteners.TestManagerListener"/>
+        <listener class-name="org.wso2.carbon.automation.engine.testlisteners.TestReportListener"/>
+    </listeners>
+    <!--test name="UserTest" preserve-order="true" parallel="false">
+        <classes>
+            <class name="org.apache.stratos.integration.tests.users.UserTest"/>
+        </classes>
+    </test-->
+    <test name="CartridgeTest" preserve-order="true" parallel="false">
+        <classes>
+            <class name="org.apache.stratos.integration.tests.group.CartridgeTest"/>
+        </classes>
+    </test>
+    <test name="CartridgeGroupTest" preserve-order="true" parallel="false">
+        <classes>
+            <class name="org.apache.stratos.integration.tests.group.CartridgeGroupTest"/>
+        </classes>
+    </test>
+    <test name="NetworkPartitionTest" preserve-order="true" parallel="false">
+        <classes>
+            <class name="org.apache.stratos.integration.tests.policies.NetworkPartitionTest"/>
+        </classes>
+    </test>
+    <test name="ApplicationPolicyTest" preserve-order="true" parallel="false">
+        <classes>
+            <class name="org.apache.stratos.integration.tests.policies.ApplicationPolicyTest"/>
+        </classes>
+    </test>
+    <test name="DeploymentPolicyTest" preserve-order="true" parallel="false">
+        <classes>
+            <class name="org.apache.stratos.integration.tests.policies.DeploymentPolicyTest"/>
+        </classes>
+    </test>
+    <test name="AutoscalingPolicyTest" preserve-order="true" parallel="false">
+        <classes>
+            <class name="org.apache.stratos.integration.tests.policies.AutoscalingPolicyTest"/>
+        </classes>
+    </test>
+    <test name="SampleApplicationsTest" preserve-order="true" parallel="false">
+        <classes>
+            <class name="org.apache.stratos.integration.tests.application.SampleApplicationsTest"/>
+        </classes>
+    </test>
+    <test name="ApplicationUpdateTest" preserve-order="true" parallel="false">
+        <classes>
+            <class name="org.apache.stratos.integration.tests.application.ApplicationUpdateTest"/>
+        </classes>
+    </test>
+    <!--test name="SingleClusterScalingTest" preserve-order="true" parallel="false">
+        <classes>
+            <class name="org.apache.stratos.integration.tests.application.SingleClusterScalingTest"/>
+        </classes>
+    </test-->
+    <!--test name="ApplicationBurstingTest" preserve-order="true" parallel="false">
+        <classes>
+            <class name="org.apache.stratos.integration.tests.application.ApplicationBurstingTest"/>
+        </classes>
+    </test-->
+    <test name="PartitionRoundRobinClusterTest" preserve-order="true" parallel="false">
+        <classes>
+            <class name="org.apache.stratos.integration.tests.application.PartitionRoundRobinClusterTest"/>
+        </classes>
+    </test>
+    <!--test name="GroupStartupOrderTest" preserve-order="true" parallel="false">
+        <classes>
+            <class name="org.apache.stratos.integration.tests.application.GroupStartupOrderTest"/>
+        </classes>
+    </test-->
+    <!--test name="GroupTerminationBehaviorTest" preserve-order="true" parallel="false">
+        <classes>
+            <class name="org.apache.stratos.integration.tests.application.GroupTerminationBehaviorTest"/>
+        </classes>
+    </test-->
+</suite>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/tenant/tenant1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/tenant/tenant1.json b/products/stratos/modules/integration/test-integration/src/test/resources/tenant/tenant1.json
new file mode 100644
index 0000000..f575b1b
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/tenant/tenant1.json
@@ -0,0 +1,9 @@
+{
+  "admin": "admin",
+  "firstName": "Frank",
+  "lastName": "Myers",
+  "adminPassword": "admin123",
+  "tenantDomain": "test1.com",
+  "email": "foo1@bar.com",
+  "active": "true"
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/tenant/tenant2.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/tenant/tenant2.json b/products/stratos/modules/integration/test-integration/src/test/resources/tenant/tenant2.json
new file mode 100644
index 0000000..3d2baf2
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/tenant/tenant2.json
@@ -0,0 +1,9 @@
+{
+  "admin": "admin",
+  "firstName": "Frank",
+  "lastName": "Myers",
+  "adminPassword": "admin123",
+  "tenantDomain": "test2.com",
+  "email": "foo2@bar.com",
+  "active": "true"
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/user-test/tenant-1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/user-test/tenant-1.json b/products/stratos/modules/integration/test-integration/src/test/resources/user-test/tenant-1.json
new file mode 100644
index 0000000..0f599e4
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/user-test/tenant-1.json
@@ -0,0 +1,9 @@
+{
+    "admin": "admin",
+    "firstName": "Frank",
+    "lastName": "Myers",
+    "adminPassword": "admin123",
+    "tenantDomain": "frank.com",
+    "email": "foo@bar.com",
+    "active": "true"
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/user-test/user-1-v1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/user-test/user-1-v1.json b/products/stratos/modules/integration/test-integration/src/test/resources/user-test/user-1-v1.json
new file mode 100644
index 0000000..1d2bbfd
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/user-test/user-1-v1.json
@@ -0,0 +1,8 @@
+{
+    "userName": "user-1",
+    "credential": "kim123456",
+    "role": "admin",
+    "firstName": "Frankn",
+    "lastName": "Myersn",
+    "email": "user-1@bar.com"
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/user-test/user-1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/user-test/user-1.json b/products/stratos/modules/integration/test-integration/src/test/resources/user-test/user-1.json
new file mode 100644
index 0000000..6f7da8a
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/user-test/user-1.json
@@ -0,0 +1,8 @@
+{
+    "userName": "user-1",
+    "credential": "kim12345",
+    "role": "admin",
+    "firstName": "Frank",
+    "lastName": "Myers",
+    "email": "foo@bar.com"
+}


[11/21] stratos git commit: Uplifting automation engine to v4.4.3, dynamically pick ports for integration tests

Posted by ra...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/wso2carbon.log
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/wso2carbon.log b/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/wso2carbon.log
deleted file mode 100755
index 82d9968..0000000
--- a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/wso2carbon.log
+++ /dev/null
@@ -1,992 +0,0 @@
-TID: [2015-04-22 20:45:03,242]  INFO {org.wso2.carbon.server.extensions.PatchInstaller} -  Patch changes detected  {org.wso2.carbon.server.extensions.PatchInstaller}
-TID: [2015-04-22 20:45:03,566]  INFO {org.wso2.carbon.server.util.PatchUtils.console} -  Backed up plugins to patch0000 {org.wso2.carbon.server.util.PatchUtils.console}
-TID: [2015-04-22 20:45:04,429]  INFO {org.wso2.carbon.server.util.PatchUtils.console} -  Patch verification started {org.wso2.carbon.server.util.PatchUtils.console}
-TID: [2015-04-22 20:45:04,705]  INFO {org.wso2.carbon.server.util.PatchUtils.console} -  Patch verification successfully completed without encountering any issues. {org.wso2.carbon.server.util.PatchUtils.console}
-TID: [0] [STRATOS] [2015-04-22 20:45:09,454]  INFO {org.wso2.carbon.cassandra.dataaccess.DataAccessComponentManager} -  There is no /repository/conf/etc/cassandra-component.xml. Using the default configuration
-TID: [0] [STRATOS] [2015-04-22 20:45:09,493]  INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} -  Starting WSO2 Carbon...
-TID: [0] [STRATOS] [2015-04-22 20:45:09,496]  INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} -  Operating System : Linux 3.13.0-46-generic, amd64
-TID: [0] [STRATOS] [2015-04-22 20:45:09,496]  INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} -  Java Home        : /opt/jdk1.7.0_67/jre
-TID: [0] [STRATOS] [2015-04-22 20:45:09,496]  INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} -  Java Version     : 1.7.0_67
-TID: [0] [STRATOS] [2015-04-22 20:45:09,496]  INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} -  Java VM          : Java HotSpot(TM) 64-Bit Server VM 24.65-b04,Oracle Corporation
-TID: [0] [STRATOS] [2015-04-22 20:45:09,496]  INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} -  Carbon Home      : /opt/wso2/apache-stratos
-TID: [0] [STRATOS] [2015-04-22 20:45:09,496]  INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} -  Java Temp Dir    : /opt/wso2/apache-stratos/tmp
-TID: [0] [STRATOS] [2015-04-22 20:45:09,496]  INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} -  User             : root, en-US, Etc/UTC
-TID: [0] [STRATOS] [2015-04-22 20:45:09,578]  WARN {org.wso2.carbon.core.bootup.validator.SystemValidator} -  Could not validate the system for configuration parameter : CPU
-TID: [0] [STRATOS] [2015-04-22 20:45:09,579]  WARN {org.wso2.carbon.core.bootup.validator.util.ValidationResultPrinter} -  The default keystore (wso2carbon.jks) is currently being used. To maximize security when deploying to a production environment, configure a new keystore with a unique password in the production server profile.
-TID: [0] [STRATOS] [2015-04-22 20:45:09,579]  WARN {org.wso2.carbon.core.bootup.validator.util.ValidationResultPrinter} -  Swap Memory size (MB): 0 of the system is below the recommended minimum size :2048
-TID: [0] [STRATOS] [2015-04-22 20:45:09,649]  INFO {org.wso2.carbon.databridge.agent.thrift.AgentHolder} -  Agent created !
-TID: [0] [STRATOS] [2015-04-22 20:45:09,667]  INFO {org.wso2.carbon.databridge.agent.thrift.internal.AgentDS} -  Successfully deployed Agent Client
-TID: [0] [STRATOS] [2015-04-22 20:45:09,690]  INFO {org.wso2.carbon.event.input.adaptor.core.internal.ds.InputEventAdaptorServiceTrackerDS} -  Successfully deployed the input event adaptor tracker service
-TID: [0] [STRATOS] [2015-04-22 20:45:09,697]  INFO {org.wso2.carbon.event.input.adaptor.jms.internal.ds.JMSEventAdaptorServiceDS} -  Successfully deployed the input jms event adaptor
-TID: [0] [STRATOS] [2015-04-22 20:45:09,702]  INFO {org.wso2.carbon.event.input.adaptor.manager.core.internal.ds.InputEventAdaptorTypeServiceTrackerDS} -  Successfully deployed the input event adaptor type tracker service
-TID: [0] [STRATOS] [2015-04-22 20:45:09,713]  INFO {org.wso2.carbon.event.output.adaptor.cassandra.internal.ds.CassandraEventAdaptorServiceDS} -  Successfully deployed the output cassandra event adaptor service
-TID: [0] [STRATOS] [2015-04-22 20:45:09,716]  INFO {org.wso2.carbon.event.output.adaptor.core.internal.ds.OutputEventAdaptorServiceTrackerDS} -  Successfully deployed the output event adaptor tracker service
-TID: [0] [STRATOS] [2015-04-22 20:45:09,722]  INFO {org.wso2.carbon.event.output.adaptor.http.internal.ds.HTTPEventAdaptorServiceDS} -  Successfully deployed the output HTTP event adaptor service
-TID: [0] [STRATOS] [2015-04-22 20:45:09,729]  INFO {org.wso2.carbon.event.output.adaptor.jms.internal.ds.JMSEventAdaptorServiceDS} -  Successfully deployed the output jms event adaptor service 
-TID: [0] [STRATOS] [2015-04-22 20:45:09,735]  INFO {org.wso2.carbon.event.output.adaptor.manager.core.internal.ds.OutputEventAdaptorTypeServiceTrackerDS} -  Successfully deployed the event adaptor type tracker service
-TID: [0] [STRATOS] [2015-04-22 20:45:09,748]  INFO {org.wso2.carbon.event.output.adaptor.wso2event.internal.ds.WSO2EventAdaptorServiceDS} -  Successfully deployed the output WSO2Event adaptor service
-TID: [0] [STRATOS] [2015-04-22 20:45:09,767]  INFO {org.wso2.carbon.event.input.adaptor.manager.core.internal.ds.InputEventAdaptorManagerDS} -  Successfully deployed the input event adaptor manager service
-TID: [0] [STRATOS] [2015-04-22 20:45:09,767]  INFO {org.wso2.carbon.event.input.adaptor.core.internal.ds.InputEventAdaptorServiceDS} -  Successfully deployed the input event adaptor service
-TID: [0] [STRATOS] [2015-04-22 20:45:09,778]  INFO {org.wso2.carbon.event.output.adaptor.manager.core.internal.ds.OutputEventAdaptorManagerDS} -  Successfully deployed the output event adaptor manager service
-TID: [0] [STRATOS] [2015-04-22 20:45:09,778]  INFO {org.wso2.carbon.event.output.adaptor.core.internal.ds.OutputEventAdaptorServiceDS} -  Successfully deployed the output event adaptor service
-TID: [0] [STRATOS] [2015-04-22 20:45:09,791]  INFO {org.wso2.carbon.event.statistics.internal.ds.EventStatisticsDS} -  Successfully deployed the event statistics monitoring service
-TID: [0] [STRATOS] [2015-04-22 20:45:10,257]  INFO {org.wso2.carbon.social.internal.SocialComponent} -  Social Activity bundle is activated
-TID: [0] [STRATOS] [2015-04-22 20:45:11,025]  INFO {org.wso2.carbon.cassandra.server.internal.CassandraServerDSComponent} -  There is no /repository/conf/etc/cassandra.yaml. Using the default configuration
-TID: [0] [STRATOS] [2015-04-22 20:45:11,072]  INFO {org.wso2.carbon.event.input.adaptor.wso2event.internal.ds.WSO2EventAdaptorServiceDS} -  Successfully deployed the input WSO2Event adaptor service
-TID: [0] [STRATOS] [2015-04-22 20:45:11,074]  INFO {org.wso2.carbon.loggeraggregator.internal.LogAggregator} -  Successfully started Log Aggregator
-TID: [0] [STRATOS] [2015-04-22 20:45:11,074]  INFO {org.wso2.carbon.databridge.core.internal.DataBridgeDS} -  Successfully deployed Agent Server 
-TID: [0] [STRATOS] [2015-04-22 20:45:11,320]  INFO {org.wso2.carbon.registry.core.jdbc.EmbeddedRegistryService} -  Configured Registry in 178ms
-TID: [0] [STRATOS] [2015-04-22 20:45:11,693]  INFO {org.wso2.carbon.registry.core.internal.RegistryCoreServiceComponent} -  Registry Mode    : READ-WRITE
-TID: [0] [STRATOS] [2015-04-22 20:45:11,781]  INFO {org.wso2.carbon.event.output.adaptor.mysql.internal.ds.MysqlEventAdaptorServiceDS} -  Successfully deployed the output mysql event adaptor service
-TID: [0] [STRATOS] [2015-04-22 20:45:11,783]  INFO {org.wso2.carbon.event.processor.siddhi.extension.internal.SiddhiExtensionDS} -  Successfully activated Property Window
-TID: [0] [STRATOS] [2015-04-22 20:45:11,885]  INFO {org.wso2.carbon.event.builder.core.internal.ds.EventBuilderServiceDS} -  Successfully deployed EventBuilderService.
-TID: [0] [STRATOS] [2015-04-22 20:45:11,908]  INFO {org.wso2.carbon.event.formatter.core.internal.ds.EventFormatterServiceDS} -  Successfully deployed EventFormatterService
-TID: [0] [STRATOS] [2015-04-22 20:45:11,909]  INFO {org.wso2.carbon.event.processor.core.internal.ds.EventProcessorServiceDS} -  Successfully deployed EventProcessorService
-TID: [0] [STRATOS] [2015-04-22 20:45:11,909]  INFO {org.wso2.carbon.event.builder.core.internal.ds.EventBuilderServiceDS} -  Successfully deployed EventBuilder EventReceiver.
-TID: [0] [STRATOS] [2015-04-22 20:45:12,037]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:12,061]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :in_flight_requests_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:12,080]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : gradient_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:12,085]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :gradient_in_flight_requests_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:12,104]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : average_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:12,109]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :average_in_flight_requests_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:12,128]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : average_served_request_count:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:12,134]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :average_served_request_count_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:12,152]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : second_derivative_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:12,157]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :second_derivative_in_flight_requests_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:12,176]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : cartridge_agent_health_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:12,182]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :cartridge_agent_health_stats_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:12,201]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : average_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:12,206]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :average_load_average_stats_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:12,223]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : average_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:12,228]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :average_memory_consumption_stats_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:12,246]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : gradient_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:12,252]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :gradient_load_average_stats_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:12,269]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : gradient_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:12,275]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :gradient_memory_consumption_stats_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:12,290]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : second_derivative_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:12,295]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :second_derivative_memory_consumption_stats_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:12,312]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : second_derivative_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:12,317]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :second_derivative_load_average_stats_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:12,333]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : fault_message:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:12,338]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :fault_message_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:12,354]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : member_average_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:12,359]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :member_average_load_average_stats_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:12,374]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : member_average_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:12,379]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :member_average_memory_consumption_stats_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:12,394]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : member_gradient_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:12,399]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :member_gradient_load_average_stats_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:12,415]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : member_gradient_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:12,421]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :member_gradient_memory_consumption_stats_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:12,439]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : member_second_derivative_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:12,444]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :member_second_derivative_memory_consumption_stats_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:12,461]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : member_second_derivative_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:12,466]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :member_second_derivative_load_average_stats_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:12,466]  INFO {org.wso2.carbon.event.builder.core.internal.ds.EventBuilderServiceDS} -  Successfully deployed EventBuilder PassthroughReceiverConfigurator.
-TID: [0] [STRATOS] [2015-04-22 20:45:12,468]  INFO {org.wso2.carbon.event.stream.manager.core.internal.ds.EventStreamServiceDS} -  Successfully deployed EventStreamService
-TID: [0] [STRATOS] [2015-04-22 20:45:12,485]  INFO {org.wso2.carbon.identity.application.mgt.internal.ApplicationManagementServiceComponent} -  Identity ApplicationManagementComponent bundle is activated
-TID: [0] [STRATOS] [2015-04-22 20:45:13,164]  INFO {org.wso2.carbon.user.core.internal.UserStoreMgtDSComponent} -  Carbon UserStoreMgtDSComponent activated successfully.
-TID: [0] [STRATOS] [2015-04-22 20:45:18,487]  INFO {org.apache.axis2.deployment.ClusterBuilder} -  Clustering has been disabled
-TID: [0] [STRATOS] [2015-04-22 20:45:18,850]  INFO {org.wso2.carbon.identity.user.store.configuration.deployer.UserStoreConfigurationDeployer} -  User Store Configuration Deployer initiated.
-TID: [0] [STRATOS] [2015-04-22 20:45:18,889]  INFO {org.wso2.carbon.stratos.landing.page.deployer.LandingPageWebappDeployer} -  Deployed product landing page webapp: StandardEngine[Catalina].StandardHost[localhost].StandardContext[/home]
-TID: [0] [STRATOS] [2015-04-22 20:45:18,921]  INFO {org.apache.axis2.transport.tcp.TCPTransportSender} -  TCP Sender started
-TID: [0] [STRATOS] [2015-04-22 20:45:18,943]  INFO {org.wso2.carbon.event.processor.core.internal.CarbonEventProcessorService} -  Execution plan deployment held back and in inactive state: AverageHeathRequest. Event receiver not found for stream ID : cartridge_agent_health_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:18,943]  INFO {org.wso2.carbon.event.processor.core.EventProcessorDeployer} -  Execution plan deployment held back and in inactive state : AverageHeathRequest ,waiting for dependency : cartridge_agent_health_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:18,947]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : AverageInFlightRequestsEventFormatter.xml, waiting for dependency : JMSOutputAdaptor
-TID: [0] [STRATOS] [2015-04-22 20:45:18,948]  INFO {org.wso2.carbon.event.processor.core.internal.CarbonEventProcessorService} -  Execution plan deployment held back and in inactive state: AverageInFlightRequestsFinder. Event receiver not found for stream ID : in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:18,948]  INFO {org.wso2.carbon.event.processor.core.EventProcessorDeployer} -  Execution plan deployment held back and in inactive state : AverageInFlightRequestsFinder ,waiting for dependency : in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:18,949]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : AverageLoadAverageEventFormatter.xml, waiting for dependency : JMSOutputAdaptor
-TID: [0] [STRATOS] [2015-04-22 20:45:18,950]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : AverageMemoryConsumptionEventFormatter.xml, waiting for dependency : JMSOutputAdaptor
-TID: [0] [STRATOS] [2015-04-22 20:45:18,951]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : AverageServedRequestsEventFormatter.xml, waiting for dependency : JMSOutputAdaptor
-TID: [0] [STRATOS] [2015-04-22 20:45:18,955]  INFO {org.wso2.carbon.event.input.adaptor.manager.core.InputEventAdaptorDeployer} -  Input Event Adaptor deployed successfully and in active state : DefaultWSO2EventInputAdaptor
-TID: [0] [STRATOS] [2015-04-22 20:45:18,957]  INFO {org.wso2.carbon.event.output.adaptor.manager.core.OutputEventAdaptorDeployer} -  Output Event Adaptor successfully deployed and in active state : DefaultWSO2EventOutputAdaptor
-TID: [0] [STRATOS] [2015-04-22 20:45:19,009]  INFO {org.wso2.carbon.core.deployment.DeploymentInterceptor} -  Deploying Axis2 service: echo {super-tenant}
-TID: [0] [STRATOS] [2015-04-22 20:45:19,079]  INFO {org.apache.axis2.deployment.DeploymentEngine} -  Deploying Web service: Echo.aar - file:/opt/wso2/apache-stratos/repository/deployment/server/axis2services/Echo.aar
-TID: [0] [STRATOS] [2015-04-22 20:45:19,080]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : FaultMessageEventFormatter.xml, waiting for dependency : JMSOutputAdaptor
-TID: [0] [STRATOS] [2015-04-22 20:45:19,080]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : GradientInFlightRequestsEventFormatter.xml, waiting for dependency : JMSOutputAdaptor
-TID: [0] [STRATOS] [2015-04-22 20:45:19,081]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : GradientLoadAverageEventFormatter.xml, waiting for dependency : JMSOutputAdaptor
-TID: [0] [STRATOS] [2015-04-22 20:45:19,082]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : GradientMemoryConsumptionEventFormatter.xml, waiting for dependency : JMSOutputAdaptor
-TID: [0] [STRATOS] [2015-04-22 20:45:19,083]  INFO {org.wso2.carbon.event.processor.core.internal.CarbonEventProcessorService} -  Execution plan deployment held back and in inactive state: GradientOfHealthRequest. Event receiver not found for stream ID : cartridge_agent_health_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,084]  INFO {org.wso2.carbon.event.processor.core.EventProcessorDeployer} -  Execution plan deployment held back and in inactive state : GradientOfHealthRequest ,waiting for dependency : cartridge_agent_health_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,084]  INFO {org.wso2.carbon.event.processor.core.internal.CarbonEventProcessorService} -  Execution plan deployment held back and in inactive state: GradientOfRequestsInFlightFinder. Event receiver not found for stream ID : in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,085]  INFO {org.wso2.carbon.event.processor.core.EventProcessorDeployer} -  Execution plan deployment held back and in inactive state : GradientOfRequestsInFlightFinder ,waiting for dependency : in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,106]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: cartridge_agent_health_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,109]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:cartridge_agent_health_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,110]  INFO {org.wso2.carbon.event.processor.core.EventProcessorDeployer} -  Execution Plan was undeployed successfully : AverageHeathRequest.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:19,305]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:cartridge_agent_health_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,305]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:average_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,305]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:member_average_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,305]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:member_average_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,305]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:average_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,306]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:fault_message:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,306]  INFO {org.wso2.carbon.event.processor.core.EventProcessorDeployer} -  Execution plan is deployed successfully and in active state  : AverageHeathRequest
-TID: [0] [STRATOS] [2015-04-22 20:45:19,306]  INFO {org.wso2.carbon.event.processor.core.EventProcessorDeployer} -  Execution Plan was undeployed successfully : GradientOfHealthRequest.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:19,398]  INFO {org.apache.stratos.common.threading.StratosThreadPool} -  Thread pool created: [type] Executor Service [id] cep.extension.thread.pool [size] 10
-TID: [0] [STRATOS] [2015-04-22 20:45:19,406]  INFO {org.apache.stratos.cep.extension.CEPTopologyEventReceiver} -  CEP topology event receiver thread started
-TID: [0] [STRATOS] [2015-04-22 20:45:19,406]  INFO {org.apache.stratos.messaging.message.receiver.topology.TopologyEventMessageDelegator} -  Topology event message delegator started
-TID: [0] [STRATOS] [2015-04-22 20:45:19,410]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:cartridge_agent_health_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,410]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:gradient_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,410]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:gradient_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,410]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:member_gradient_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,410]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:member_gradient_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,410]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:fault_message:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,410]  INFO {org.wso2.carbon.event.processor.core.EventProcessorDeployer} -  Execution plan is deployed successfully and in active state  : GradientOfHealthRequest
-TID: [0] [STRATOS] [2015-04-22 20:45:19,411]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : HealthStatisticsEventBuilder
-TID: [0] [STRATOS] [2015-04-22 20:45:19,419]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event builder deployment held back and in inactive state :InstanceStatusStatisticsBuilder, Stream validation exception : Input stream definition is not available 
-TID: [0] [STRATOS] [2015-04-22 20:45:19,420]  INFO {org.wso2.carbon.event.output.adaptor.manager.core.OutputEventAdaptorDeployer} -  Output Event Adaptor successfully deployed and in active state : JMSOutputAdaptor
-TID: [0] [STRATOS] [2015-04-22 20:45:19,421]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : AverageInFlightRequestsEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:19,433]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : AverageInFlightRequestsEventFormatter.xml, waiting for dependency : average_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,433]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : AverageLoadAverageEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:19,442]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:average_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,442]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : AverageLoadAverageEventFormatter
-TID: [0] [STRATOS] [2015-04-22 20:45:19,442]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : AverageMemoryConsumptionEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:19,450]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:average_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,450]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : AverageMemoryConsumptionEventFormatter
-TID: [0] [STRATOS] [2015-04-22 20:45:19,450]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : AverageServedRequestsEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:19,458]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : AverageServedRequestsEventFormatter.xml, waiting for dependency : average_served_request_count:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,458]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : FaultMessageEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:19,466]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:fault_message:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,466]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : FaultMessageEventFormatter
-TID: [0] [STRATOS] [2015-04-22 20:45:19,466]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : GradientInFlightRequestsEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:19,474]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : GradientInFlightRequestsEventFormatter.xml, waiting for dependency : gradient_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,474]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : GradientLoadAverageEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:19,481]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:gradient_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,482]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : GradientLoadAverageEventFormatter
-TID: [0] [STRATOS] [2015-04-22 20:45:19,482]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : GradientMemoryConsumptionEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:19,490]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:gradient_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,490]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : GradientMemoryConsumptionEventFormatter
-TID: [0] [STRATOS] [2015-04-22 20:45:19,498]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,500]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,500]  INFO {org.wso2.carbon.event.processor.core.EventProcessorDeployer} -  Execution Plan was undeployed successfully : AverageInFlightRequestsFinder.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:19,512]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : AverageInFlightRequestsEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:19,516]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:average_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,516]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : AverageRequestsInflightEventFormatter
-TID: [0] [STRATOS] [2015-04-22 20:45:19,517]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : AverageServedRequestsEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:19,521]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:average_served_request_count:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,521]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : AverageServedRequestsEventFormatter
-TID: [0] [STRATOS] [2015-04-22 20:45:19,521]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,521]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:average_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,521]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:average_served_request_count:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,521]  INFO {org.wso2.carbon.event.processor.core.EventProcessorDeployer} -  Execution plan is deployed successfully and in active state  : AverageInFlightRequestsFinder
-TID: [0] [STRATOS] [2015-04-22 20:45:19,521]  INFO {org.wso2.carbon.event.processor.core.EventProcessorDeployer} -  Execution Plan was undeployed successfully : GradientOfRequestsInFlightFinder.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:19,527]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : GradientInFlightRequestsEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:19,531]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:gradient_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,531]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : GradientInFlightRequestsEventFormatter
-TID: [0] [STRATOS] [2015-04-22 20:45:19,531]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,531]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:gradient_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,531]  INFO {org.wso2.carbon.event.processor.core.EventProcessorDeployer} -  Execution plan is deployed successfully and in active state  : GradientOfRequestsInFlightFinder
-TID: [0] [STRATOS] [2015-04-22 20:45:19,531]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : LoadBalancerStatisticsEventBuilder
-TID: [0] [STRATOS] [2015-04-22 20:45:19,539]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:member_average_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,539]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : MemberAverageLoadAverageEventFormatter
-TID: [0] [STRATOS] [2015-04-22 20:45:19,547]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:member_average_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,547]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : MemberAverageMemoryConsumptionEventFormatter
-TID: [0] [STRATOS] [2015-04-22 20:45:19,554]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:member_gradient_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,555]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : MemberGradientLoadAverageEventFormatter
-TID: [0] [STRATOS] [2015-04-22 20:45:19,562]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:member_gradient_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,562]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : MemberGradientMemoryConsumptionEventFormatter
-TID: [0] [STRATOS] [2015-04-22 20:45:19,570]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : MemberSecondDerivativeLoadAverageEventFormatter.xml, waiting for dependency : member_second_derivative_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,578]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : MemberSecondDerivativeMemoryConsumptionEventFormatter.xml, waiting for dependency : member_second_derivative_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,603]  INFO {org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer} -  Deployed webapp: StandardEngine[Catalina].StandardHost[localhost].StandardContext[/STRATOS_ROOT].File[/opt/wso2/apache-stratos/repository/deployment/server/webapps/STRATOS_ROOT]
-TID: [0] [STRATOS] [2015-04-22 20:45:19,614]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : SecondDerivativeInFlightRequestsEventFormatter.xml, waiting for dependency : second_derivative_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,621]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : SecondDerivativeLoadAverageEventFormatter.xml, waiting for dependency : second_derivative_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,628]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : SecondDerivativeMemoryConsumptionEventFormatter.xml, waiting for dependency : second_derivative_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,647]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : SecondDerivativeMemoryConsumptionEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:19,651]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:second_derivative_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,652]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : SecondDerivativeMemoryConsumptionEventFormatter
-TID: [0] [STRATOS] [2015-04-22 20:45:19,652]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : SecondDerivativeLoadAverageEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:19,655]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:second_derivative_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,655]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : SecondDerivativeLoadAverageEventFormatter
-TID: [0] [STRATOS] [2015-04-22 20:45:19,656]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : MemberSecondDerivativeMemoryConsumptionEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:19,660]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:member_second_derivative_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,660]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : MemberSecondDerivativeMemoryConsumptionEventFormatter
-TID: [0] [STRATOS] [2015-04-22 20:45:19,660]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : MemberSecondDerivativeLoadAverageEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:19,664]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:member_second_derivative_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,664]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : MemberSecondDerivativeLoadAverageEventFormatter
-TID: [0] [STRATOS] [2015-04-22 20:45:19,664]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:cartridge_agent_health_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,664]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:second_derivative_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,664]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:second_derivative_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,664]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:member_second_derivative_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,664]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:member_second_derivative_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,664]  INFO {org.wso2.carbon.event.processor.core.EventProcessorDeployer} -  Execution plan is deployed successfully and in active state  : SecondDerivativeOfHealthRequest
-TID: [0] [STRATOS] [2015-04-22 20:45:19,669]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : SecondDerivativeInFlightRequestsEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:19,673]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:second_derivative_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,673]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : SecondDerivativeEventFormatter
-TID: [0] [STRATOS] [2015-04-22 20:45:19,673]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,673]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:second_derivative_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,674]  INFO {org.wso2.carbon.event.processor.core.EventProcessorDeployer} -  Execution plan is deployed successfully and in active state  : SecondDerivativeOfRequestsInFlightFinder
-TID: [0] [STRATOS] [2015-04-22 20:45:19,750]  INFO {org.wso2.carbon.core.deployment.DeploymentInterceptor} -  Deploying Axis2 service: Version {super-tenant}
-TID: [0] [STRATOS] [2015-04-22 20:45:19,773]  INFO {org.apache.axis2.deployment.DeploymentEngine} -  Deploying Web service: Version.aar - file:/opt/wso2/apache-stratos/repository/deployment/server/axis2services/Version.aar
-TID: [0] [STRATOS] [2015-04-22 20:45:20,582]  INFO {org.springframework.web.context.support.XmlWebApplicationContext} -  Refreshing Root WebApplicationContext: startup date [Wed Apr 22 20:45:20 UTC 2015]; root of context hierarchy
-TID: [0] [STRATOS] [2015-04-22 20:45:20,627]  INFO {org.springframework.beans.factory.xml.XmlBeanDefinitionReader} -  Loading XML bean definitions from class path resource [META-INF/cxf/cxf.xml]
-TID: [0] [STRATOS] [2015-04-22 20:45:20,699]  INFO {org.springframework.beans.factory.xml.XmlBeanDefinitionReader} -  Loading XML bean definitions from URL [jndi:/localhost/api/WEB-INF/cxf-servlet.xml]
-TID: [0] [STRATOS] [2015-04-22 20:45:20,841]  INFO {org.springframework.beans.factory.support.DefaultListableBeanFactory} -  Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@68204c69: defining beans [cxf,org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,stratosApi,stratosApiV40,stratosApiV41,stratosApiBeanV40,stratosApiBeanV41,basicAuthenticationFilter,sessionAuthenticationFilter,authorizationFilterV40,authorizationFilterV41,exceptionHandler,badRequestExceptionHandler,genericExceptionHandler,throwableExceptionHandler,componentSynchronizerHandler,OAuthFilter,jsonProvider,schemaHolder,theSchemas]; root of factory hierarchy
-TID: [0] [STRATOS] [2015-04-22 20:45:21,353]  INFO {org.apache.cxf.endpoint.ServerImpl} -  Setting the server's publish address to be /
-TID: [0] [STRATOS] [2015-04-22 20:45:21,471]  INFO {org.apache.cxf.endpoint.ServerImpl} -  Setting the server's publish address to be /v4.0
-TID: [0] [STRATOS] [2015-04-22 20:45:21,495]  INFO {org.apache.cxf.endpoint.ServerImpl} -  Setting the server's publish address to be /v4.1
-TID: [0] [STRATOS] [2015-04-22 20:45:21,528]  WARN {org.apache.cxf.jaxrs.utils.ResourceUtils} -  No resource classpath:META-INF/jax-rs-catalog.xml is available
-TID: [0] [STRATOS] [2015-04-22 20:45:21,552]  INFO {org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer} -  Deployed webapp: StandardEngine[Catalina].StandardHost[localhost].StandardContext[/api].File[/opt/wso2/apache-stratos/repository/deployment/server/webapps/api.war]
-TID: [0] [STRATOS] [2015-04-22 20:45:21,601]  INFO {org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer} -  Deployed webapp: StandardEngine[Catalina].StandardHost[localhost].StandardContext[/authenticationendpoint].File[/opt/wso2/apache-stratos/repository/deployment/server/webapps/authenticationendpoint.war]
-TID: [0] [STRATOS] [2015-04-22 20:45:21,606]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: average_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:21,607]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:average_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:21,607]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : average_in_flight_requests_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 20:45:21,611]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: average_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:21,612]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:average_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:21,612]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : average_load_average_stats_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 20:45:21,616]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: average_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:21,617]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:average_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:21,617]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : average_memory_consumption_stats_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 20:45:21,621]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: average_served_request_count:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:21,622]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:average_served_request_count:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:21,623]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : average_served_request_count_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 20:45:21,627]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : cartridge_agent_health_stats_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 20:45:21,636]  WARN {org.wso2.securevault.secret.handler.SecretManagerSecretCallbackHandler} -  SecretManager has not been initialized.Cannot collect secrets.
-TID: [0] [STRATOS] [2015-04-22 20:45:21,636]  WARN {org.apache.stratos.cloud.controller.config.parser.IaasProviderConfigParser} -  Unable to find a value for identity element from Secure Vault.Hence we will try to assign the plain text value (if specified).
-TID: [0] [STRATOS] [2015-04-22 20:45:21,637]  WARN {org.wso2.securevault.secret.handler.SecretManagerSecretCallbackHandler} -  SecretManager has not been initialized.Cannot collect secrets.
-TID: [0] [STRATOS] [2015-04-22 20:45:21,637]  WARN {org.apache.stratos.cloud.controller.config.parser.IaasProviderConfigParser} -  Unable to find a value for credential element from Secure Vault.Hence we will try to assign the plain text value (if specified).
-TID: [0] [STRATOS] [2015-04-22 20:45:21,637]  INFO {org.apache.stratos.cloud.controller.deployers.CloudControllerDeployer} -  Successfully deployed the cloud-controller XML file located at /opt/wso2/apache-stratos/repository/deployment/server/../../conf/cloud-controller.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:22,397]  INFO {org.jaggeryjs.jaggery.app.mgt.TomcatJaggeryWebappsDeployer} -  Deployed webapp: StandardEngine[Catalina].StandardHost[localhost].StandardContext[/console].File[/opt/wso2/apache-stratos/repository/deployment/server/jaggeryapps/console]
-TID: [0] [STRATOS] [2015-04-22 20:45:22,402]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: fault_message:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:22,403]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:fault_message:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:22,403]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : fault_message_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 20:45:22,407]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: gradient_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:22,408]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:gradient_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:22,408]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : gradient_in_flight_requests_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 20:45:22,412]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: gradient_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:22,413]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:gradient_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:22,414]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : gradient_load_average_stats_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 20:45:22,417]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: gradient_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:22,419]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:gradient_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:22,419]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : gradient_memory_consumption_stats_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 20:45:22,422]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : in_flight_requests_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 20:45:22,426]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: member_average_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:22,428]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:member_average_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:22,428]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : member_average_load_average_stats_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 20:45:22,431]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: member_average_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:22,433]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:member_average_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:22,433]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : member_average_memory_consumption_stats_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 20:45:22,437]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: member_gradient_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:22,438]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:member_gradient_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:22,438]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : member_gradient_load_average_stats_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 20:45:22,442]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: member_gradient_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:22,444]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:member_gradient_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:22,444]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : member_gradient_memory_consumption_stats_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 20:45:22,447]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: member_second_derivative_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:22,449]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:member_second_derivative_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:22,449]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : member_second_derivative_load_average_stats_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 20:45:22,453]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: member_second_derivative_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:22,455]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:member_second_derivative_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:22,455]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : member_second_derivative_memory_consumption_stats_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 20:45:23,187]  INFO {org.springframework.web.context.support.XmlWebApplicationContext} -  Refreshing Root WebApplicationContext: startup date [Wed Apr 22 20:45:23 UTC 2015]; root of context hierarchy
-TID: [0] [STRATOS] [2015-04-22 20:45:23,229]  INFO {org.springframework.beans.factory.xml.XmlBeanDefinitionReader} -  Loading XML bean definitions from class path resource [META-INF/cxf/cxf.xml]
-TID: [0] [STRATOS] [2015-04-22 20:45:23,264]  INFO {org.springframework.beans.factory.xml.XmlBeanDefinitionReader} -  Loading XML bean definitions from URL [jndi:/localhost/metadata/WEB-INF/cxf-servlet.xml]
-TID: [0] [STRATOS] [2015-04-22 20:45:23,364]  INFO {org.springframework.beans.factory.support.DefaultListableBeanFactory} -  Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@1b01b46a: defining beans [cxf,org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,stratosMetaDataAdmin,stratosRestEndpointBean,exceptionHandler,genericExceptionHandler,throwableExceptionHandler,OAuthFilter,jsonProvider]; root of factory hierarchy
-TID: [0] [STRATOS] [2015-04-22 20:45:23,855]  INFO {org.apache.cxf.endpoint.ServerImpl} -  Setting the server's publish address to be /api
-TID: [0] [STRATOS] [2015-04-22 20:45:23,906]  INFO {org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer} -  Deployed webapp: StandardEngine[Catalina].StandardHost[localhost].StandardContext[/metadata].File[/opt/wso2/apache-stratos/repository/deployment/server/webapps/metadata.war]
-TID: [0] [STRATOS] [2015-04-22 20:45:24,621]  INFO {org.springframework.web.context.support.XmlWebApplicationContext} -  Refreshing Root WebApplicationContext: startup date [Wed Apr 22 20:45:24 UTC 2015]; root of context hierarchy
-TID: [0] [STRATOS] [2015-04-22 20:45:24,664]  INFO {org.springframework.beans.factory.xml.XmlBeanDefinitionReader} -  Loading XML bean definitions from class path resource [META-INF/cxf/cxf.xml]
-TID: [0] [STRATOS] [2015-04-22 20:45:24,696]  INFO {org.springframework.beans.factory.xml.XmlBeanDefinitionReader} -  Loading XML bean definitions from URL [jndi:/localhost/mock-iaas/WEB-INF/cxf-servlet.xml]
-TID: [0] [STRATOS] [2015-04-22 20:45:24,784]  INFO {org.springframework.beans.factory.support.DefaultListableBeanFactory} -  Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@3b141caf: defining beans [cxf,org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,mockIaasApi,mockIaasApiBean,exceptionHandler,badRequestExceptionHandler,genericExceptionHandler,throwableExceptionHandler,jsonProvider]; root of factory hierarchy
-TID: [0] [STRATOS] [2015-04-22 20:45:25,146]  INFO {org.apache.cxf.endpoint.ServerImpl} -  Setting the server's publish address to be /api
-TID: [0] [STRATOS] [2015-04-22 20:45:25,197]  INFO {org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer} -  Deployed webapp: StandardEngine[Catalina].StandardHost[localhost].StandardContext[/mock-iaas].File[/opt/wso2/apache-stratos/repository/deployment/server/webapps/mock-iaas.war]
-TID: [0] [STRATOS] [2015-04-22 20:45:25,997]  INFO {org.springframework.web.context.support.XmlWebApplicationContext} -  Refreshing Root WebApplicationContext: startup date [Wed Apr 22 20:45:25 UTC 2015]; root of context hierarchy
-TID: [0] [STRATOS] [2015-04-22 20:45:26,039]  INFO {org.springframework.beans.factory.xml.XmlBeanDefinitionReader} -  Loading XML bean definitions from class path resource [META-INF/cxf/cxf.xml]
-TID: [0] [STRATOS] [2015-04-22 20:45:26,071]  INFO {org.springframework.beans.factory.xml.XmlBeanDefinitionReader} -  Loading XML bean definitions from URL [jndi:/localhost/oauth2/WEB-INF/cxf-servlet.xml]
-TID: [0] [STRATOS] [2015-04-22 20:45:26,151]  INFO {org.springframework.beans.factory.support.DefaultListableBeanFactory} -  Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@6a9f420c: defining beans [cxf,org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,tokEP,authzEndpointBean,tokenEndpointBean,revokeEndpointBean,userinfoEndpointBean]; root of factory hierarchy
-TID: [0] [STRATOS] [2015-04-22 20:45:26,496]  INFO {org.apache.cxf.endpoint.ServerImpl} -  Setting the server's publish address to be /
-TID: [0] [STRATOS] [2015-04-22 20:45:26,558]  INFO {org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer} -  Deployed webapp: StandardEngine[Catalina].StandardHost[localhost].StandardContext[/oauth2].File[/opt/wso2/apache-stratos/repository/deployment/server/webapps/oauth2.war]
-TID: [0] [STRATOS] [2015-04-22 20:45:26,569]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: second_derivative_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:26,570]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:second_derivative_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:26,570]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : second_derivative_in_flight_requests_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 20:45:26,573]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: second_derivative_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:26,575]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:second_derivative_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:26,575]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : second_derivative_load_average_stats_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 20:45:26,579]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: second_derivative_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:26,580]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:second_derivative_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:26,581]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : second_derivative_memory_consumption_stats_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 20:45:26,806]  INFO {org.jaggeryjs.jaggery.app.mgt.TomcatJaggeryWebappsDeployer} -  Deployed webapp: StandardEngine[Catalina].StandardHost[localhost].StandardContext[/sso].File[/opt/wso2/apache-stratos/repository/deployment/server/jaggeryapps/sso]
-TID: [0] [STRATOS] [2015-04-22 20:45:26,873]  INFO {org.apache.axis2.deployment.ModuleDeployer} -  Deploying module: addressing-1.6.1-wso2v10 - file:/opt/wso2/apache-stratos/repository/deployment/client/modules/addressing-1.6.1-wso2v10.mar
-TID: [0] [STRATOS] [2015-04-22 20:45:26,877]  INFO {org.apache.axis2.deployment.ModuleDeployer} -  Deploying module: rampart-1.6.1-wso2v8 - file:/opt/wso2/apache-stratos/repository/deployment/client/modules/rampart-1.6.1-wso2v8.mar
-TID: [0] [STRATOS] [2015-04-22 20:45:26,879]  INFO {org.apache.axis2.transport.tcp.TCPTransportSender} -  TCP Sender started
-TID: [0] [STRATOS] [2015-04-22 20:45:27,123]  INFO {org.wso2.carbon.core.deployment.DeploymentInterceptor} -  Deploying Axis2 service: AutoscalerService {super-tenant}
-TID: [0] [STRATOS] [2015-04-22 20:45:27,369]  INFO {org.apache.axis2.deployment.DeploymentEngine} -  Deploying Web service: org.apache.stratos.autoscaler - 
-TID: [0] [STRATOS] [2015-04-22 20:45:27,477]  INFO {org.wso2.carbon.core.deployment.DeploymentInterceptor} -  Deploying Axis2 service: CloudControllerService {super-tenant}
-TID: [0] [STRATOS] [2015-04-22 20:45:27,653]  INFO {org.apache.axis2.deployment.DeploymentEngine} -  Deploying Web service: org.apache.stratos.cloud.controller - 
-TID: [0] [STRATOS] [2015-04-22 20:45:27,679]  INFO {org.wso2.carbon.core.deployment.DeploymentInterceptor} -  Deploying Axis2 service: StratosManagerService {super-tenant}
-TID: [0] [STRATOS] [2015-04-22 20:45:27,749]  INFO {org.apache.axis2.deployment.DeploymentEngine} -  Deploying Web service: org.apache.stratos.manager - 
-TID: [0] [STRATOS] [2015-04-22 20:45:28,223]  WARN {org.apache.axis2.description.java2wsdl.DefaultSchemaGenerator} -  We don't support method overloading. Ignoring [validateAudienceRestriction]
-TID: [0] [STRATOS] [2015-04-22 20:45:28,524]  INFO {org.apache.axis2.deployment.DeploymentEngine} -  Deploying Web service: org.wso2.carbon.idp.mgt - 
-TID: [0] [STRATOS] [2015-04-22 20:45:28,892]  INFO {org.wso2.carbon.core.deployment.DeploymentInterceptor} -  Deploying Axis2 service: wso2carbon-sts {super-tenant}
-TID: [0] [STRATOS] [2015-04-22 20:45:28,940]  INFO {org.apache.axis2.deployment.DeploymentEngine} -  Deploying Web service: org.wso2.carbon.sts - 
-TID: [0] [STRATOS] [2015-04-22 20:45:29,182]  INFO {org.wso2.carbon.core.init.CarbonServerManager} -  Repository       : /opt/wso2/apache-stratos/repository/deployment/server/
-TID: [0] [STRATOS] [2015-04-22 20:45:29,234]  INFO {org.apache.stratos.common.internal.ComponentStartUpSynchronizerImpl} -  Component activation check interval: 1 seconds
-TID: [0] [STRATOS] [2015-04-22 20:45:29,235]  INFO {org.apache.stratos.common.internal.ComponentStartUpSynchronizerImpl} -  Component activation timeout: 600 seconds
-TID: [0] [STRATOS] [2015-04-22 20:45:29,241]  INFO {org.apache.stratos.common.internal.CommonServiceComponent} -  Stratos common service component is activated
-TID: [0] [STRATOS] [2015-04-22 20:45:29,320]  INFO {org.wso2.carbon.core.internal.permission.update.PermissionUpdater} -  Permission cache updated for tenant -1234
-TID: [0] [STRATOS] [2015-04-22 20:45:29,566]  INFO {org.wso2.carbon.databridge.receiver.thrift.internal.ThriftDataReceiver} -  Thrift Server started at 0.0.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:29,574]  INFO {org.wso2.carbon.databridge.receiver.thrift.internal.ThriftDataReceiver} -  Thrift SSL port : 7711
-TID: [0] [STRATOS] [2015-04-22 20:45:29,578]  INFO {org.wso2.carbon.databridge.receiver.thrift.internal.ThriftDataReceiver} -  Thrift port : 7611
-TID: [0] [STRATOS] [2015-04-22 20:45:29,643]  INFO {org.wso2.carbon.event.input.adaptor.wsevent.local.internal.ds.WSEventLocalEventAdaptorServiceDS} -  Successfully deployed the input WSEventLocal adaptor service
-TID: [0] [STRATOS] [2015-04-22 20:45:29,649]  INFO {org.wso2.carbon.event.output.adaptor.wsevent.local.internal.ds.WSEventLocalEventAdaptorServiceDS} -  Successfully deployed the output WSEventLocal adaptor service
-TID: [0] [STRATOS] [2015-04-22 20:45:29,656]  INFO {org.wso2.carbon.event.input.adaptor.email.internal.ds.EmailEventAdaptorServiceDS} -  Successfully deployed the input email event service
-TID: [0] [STRATOS] [2015-04-22 20:45:29,662]  INFO {org.wso2.carbon.event.input.adaptor.wsevent.internal.ds.WSEventAdaptorServiceDS} -  Successfully deployed the input WSEvent adaptor service
-TID: [0] [STRATOS] [2015-04-22 20:45:29,667]  INFO {org.wso2.carbon.event.output.adaptor.email.internal.ds.EmailEventAdaptorServiceDS} -  Successfully deployed the output Email event adaptor service
-TID: [0] [STRATOS] [2015-04-22 20:45:29,671]  INFO {org.wso2.carbon.event.output.adaptor.sms.internal.ds.SMSEventAdaptorServiceDS} -  Successfully deployed the output SMS event adaptor service
-TID: [0] [STRATOS] [2015-04-22 20:45:29,676]  INFO {org.wso2.carbon.event.output.adaptor.wsevent.internal.ds.WSEventAdaptorServiceDS} -  Successfully deployed the output WSEvent adaptor service
-TID: [0] [STRATOS] [2015-04-22 20:45:29,680]  INFO {org.wso2.carbon.identity.application.mgt.ui.internal.ApplicationMgtUIServiceComponent} -  Application Management UI bundle acticated!
-TID: [0] [STRATOS] [2015-04-22 20:45:29,715]  INFO {org.wso2.carbon.idp.mgt.internal.IdPManagementServiceComponent} -  Identity Application Management Database initialization not attempted since 'setup' variable was not provided during startup
-TID: [0] [STRATOS] [2015-04-22 20:45:29,770]  INFO {org.wso2.carbon.identity.core.internal.IdentityCoreServiceComponent} -  Identity Database schema initialization check was skipped since 'setup' variable was not given during startup
-TID: [0] [STRATOS] [2015-04-22 20:45:29,838]  INFO {org.wso2.carbon.core.transports.http.HttpsTransportListener} -  HTTPS port       : 9443
-TID: [0] [STRATOS] [2015-04-22 20:45:29,838]  INFO {org.wso2.carbon.core.transports.http.HttpTransportListener} -  HTTP port        : 9763
-TID: [0] [STRATOS] [2015-04-22 20:45:29,924]  INFO {org.wso2.carbon.ntask.core.service.impl.TaskServiceImpl} -  Task service starting in STANDALONE mode...
-TID: [0] [STRATOS] [2015-04-22 20:45:29,956]  INFO {org.apache.stratos.common.threading.StratosThreadPool} -  Thread pool created: [type] Executor Service [id] autoscaler.thread.pool [size] 50
-TID: [0] [STRATOS] [2015-04-22 20:45:29,956]  INFO {org.apache.stratos.common.threading.StratosThreadPool} -  Thread pool created: [type] Scheduled Executor Service [id] autoscaler.scheduler.thread.pool [size] 5
-TID: [0] [STRATOS] [2015-04-22 20:45:29,958]  INFO {org.apache.stratos.common.internal.ComponentStartUpSynchronizerImpl} -  Autoscaler component is waiting for CloudController component to become active...
-TID: [0] [STRATOS] [2015-04-22 20:45:29,961]  INFO {org.apache.stratos.common.threading.StratosThreadPool} -  Thread pool created: [type] Executor Service [id] cloud.controller.thread.pool [size] 10
-TID: [0] [STRATOS] [2015-04-22 20:45:29,961]  INFO {org.apache.stratos.common.threading.StratosThreadPool} -  Thread pool created: [type] Scheduled Executor Service [id] cloud.controller.scheduler.thread.pool [size] 5
-TID: [0] [STRATOS] [2015-04-22 20:45:29,964]  INFO {org.apache.stratos.common.threading.StratosThreadPool} -  Thread pool created: [type] Executor Service [id] stratos.manager.thread.pool [size] 20
-TID: [0] [STRATOS] [2015-04-22 20:45:29,964]  INFO {org.apache.stratos.common.threading.StratosThreadPool} -  Thread pool created: [type] Scheduled Executor Service [id] stratos.manager.scheduler.thread.pool [size] 5
-TID: [0] [STRATOS] [2015-04-22 20:45:29,964]  INFO {org.apache.stratos.common.threading.StratosThreadPool} -  Thread pool created: [type] Executor Service [id] cloud.controller.context.thread.pool [size] 10
-TID: [0] [STRATOS] [2015-04-22 20:45:29,966]  INFO {org.apache.stratos.common.internal.ComponentStartUpSynchronizerImpl} -  StratosManager component is waiting for CloudController component to become active...
-TID: [0] [STRATOS] [2015-04-22 20:45:29,970]  INFO {org.apache.stratos.common.threading.StratosThreadPool} -  Thread pool created: [type] Executor Service [id] cloud.controller.instance.manager.thread.pool [size] 50
-TID: [0] [STRATOS] [2015-04-22 20:45:29,984]  INFO {org.apache.stratos.cloud.controller.messaging.receiver.application.ApplicationEventReceiver} -  Cloud controller application event receiver thread started
-TID: [0] [STRATOS] [2015-04-22 20:45:29,990]  INFO {org.apache.stratos.cloud.controller.internal.CloudControllerServiceComponent} -  Application event receiver thread started
-TID: [0] [STRATOS] [2015-04-22 20:45:29,990]  INFO {org.apache.stratos.messaging.message.receiver.application.ApplicationsEventMessageDelegator} -  Application status event message delegator started
-TID: [0] [STRATOS] [2015-04-22 20:45:30,008]  INFO {org.apache.stratos.cloud.controller.messaging.receiver.cluster.status.ClusterStatusTopicReceiver} -  Cloud controller Cluster status thread started
-TID: [0] [STRATOS] [2015-04-22 20:45:30,011]  INFO {org.apache.stratos.messaging.message.receiver.cluster.status.ClusterStatusEventMessageDelegator} -  Cluster Status event message delegator started
-TID: [0] [STRATOS] [2015-04-22 20:45:30,011]  INFO {org.apache.stratos.cloud.controller.internal.CloudControllerServiceComponent} -  Cluster status event receiver thread started
-TID: [0] [STRATOS] [2015-04-22 20:45:30,021]  INFO {org.wso2.carbon.core.init.JMXServerManager} -  JMX Service URL  : service:jmx:rmi://localhost:11111/jndi/rmi://localhost:9999/jmxrmi
-TID: [0] [STRATOS] [2015-04-22 20:45:30,021]  INFO {org.apache.stratos.cloud.controller.messaging.receiver.instance.status.InstanceStatusTopicReceiver} -  Cloud controller application status thread started
-TID: [0] [STRATOS] [2015-04-22 20:45:30,022]  INFO {org.wso2.carbon.core.internal.StartupFinalizerServiceComponent} -  Server           :  Apache Stratos-4.1.0
-TID: [0] [STRATOS] [2015-04-22 20:45:30,022]  INFO {org.apache.stratos.cloud.controller.messaging.receiver.instance.status.InstanceStatusTopicReceiver} -  Cloud controller application status thread terminated
-TID: [0] [STRATOS] [2015-04-22 20:45:30,026]  INFO {org.apache.stratos.cloud.controller.internal.CloudControllerServiceComponent} -  Instance status event receiver thread started
-TID: [0] [STRATOS] [2015-04-22 20:45:30,026]  INFO {org.apache.stratos.cloud.controller.internal.CloudControllerServiceComponent} -  Scheduling topology synchronizer task
-TID: [0] [STRATOS] [2015-04-22 20:45:30,021]  INFO {org.apache.stratos.messaging.message.receiver.instance.status.InstanceStatusEventMessageDelegator} -  Instance notifier event message delegator started
-TID: [0] [STRATOS] [2015-04-22 20:45:30,026]  INFO {org.wso2.carbon.core.internal.StartupFinalizerServiceComponent} -  WSO2 Carbon started in 27 sec
-TID: [0] [STRATOS] [2015-04-22 20:45:30,027]  INFO {org.apache.stratos.common.internal.ComponentStartUpSynchronizerImpl} -  CloudController component became active
-TID: [0] [STRATOS] [2015-04-22 20:45:30,027]  INFO {org.apache.stratos.cloud.controller.internal.CloudControllerServiceComponent} -  Cloud controller service component activated
-TID: [0] [STRATOS] [2015-04-22 20:45:30,487]  INFO {org.wso2.carbon.ui.internal.CarbonUIServiceComponent} -  Mgt Console URL  : https://172.16.2.207:9443/carbon/
-TID: [0] [STRATOS] [2015-04-22 20:45:30,966]  INFO {org.apache.stratos.common.internal.ComponentStartUpSynchronizerImpl} -  StratosManager component is waiting for Autoscaler component to become active...
-TID: [0] [STRATOS] [2015-04-22 20:45:30,987]  INFO {org.apache.stratos.autoscaler.event.receiver.topology.AutoscalerTopologyEventReceiver} -  Autoscaler topology receiver thread started
-TID: [0] [STRATOS] [2015-04-22 20:45:30,988]  INFO {org.apache.stratos.messaging.message.receiver.topology.TopologyEventMessageDelegator} -  Topology event message delegator started
-TID: [0] [STRATOS] [2015-04-22 20:45:46,012]  INFO {org.apache.stratos.autoscaler.event.receiver.health.AutoscalerHealthStatEventReceiver} -  Autoscaler health stat event receiver thread started
-TID: [0] [STRATOS] [2015-04-22 20:45:46,015]  INFO {org.apache.stratos.messaging.message.receiver.health.stat.HealthStatEventMessageDelegator} -  Health stat event message delegator started
-TID: [0] [STRATOS] [2015-04-22 20:45:46,029]  INFO {org.apache.stratos.autoscaler.internal.AutoscalerServiceComponent} -  Scheduling tasks to publish applications
-TID: [0] [STRATOS] [2015-04-22 20:45:46,029]  INFO {org.apache.stratos.common.internal.ComponentStartUpSynchronizerImpl} -  Autoscaler component became active
-TID: [0] [STRATOS] [2015-04-22 20:45:46,029]  INFO {org.apache.stratos.autoscaler.internal.AutoscalerServiceComponent} -  Autoscaler service component activated
-TID: [0] [STRATOS] [2015-04-22 20:45:46,970]  INFO {org.apache.stratos.manager.utils.CartridgeConfigFileReader} -  Setting config properties into System properties
-TID: [0] [STRATOS] [2015-04-22 20:45:46,989]  INFO {org.apache.stratos.manager.internal.StratosManagerServiceComponent} -  Tenant event publisher initialized
-TID: [0] [STRATOS] [2015-04-22 20:45:46,993]  INFO {org.apache.stratos.manager.messaging.receiver.StratosManagerInstanceStatusEventReceiver} -  Stratos manager instance status event receiver thread started
-TID: [0] [STRATOS] [2015-04-22 20:45:46,995]  INFO {org.apache.stratos.messaging.message.receiver.instance.status.InstanceStatusEventMessageDelegator} -  Instance notifier event message delegator started
-TID: [0] [STRATOS] [2015-04-22 20:45:47,057]  INFO {org.apache.stratos.manager.messaging.receiver.StratosManagerTopologyEventReceiver} -  Stratos manager topology event receiver thread started
-TID: [0] [STRATOS] [2015-04-22 20:45:47,058]  INFO {org.apache.stratos.messaging.message.receiver.topology.TopologyEventMessageDelegator} -  Topology event message delegator started
-TID: [0] [STRATOS] [2015-04-22 20:45:47,060]  INFO {org.apache.stratos.manager.messaging.receiver.StratosManagerApplicationEventReceiver} -  Stratos manager application event receiver thread started
-TID: [0] [STRATOS] [2015-04-22 20:45:47,060]  INFO {org.apache.stratos.messaging.message.receiver.application.ApplicationsEventMessageDelegator} -  Application status event message delegator started
-TID: [0] [STRATOS] [2015-04-22 20:45:47,104]  INFO {org.apache.stratos.common.internal.ComponentStartUpSynchronizerImpl} -  StratosManager component became active
-TID: [0] [STRATOS] [2015-04-22 20:45:47,106]  INFO {org.apache.stratos.manager.internal.StratosManagerServiceComponent} -  Stratos manager component is activated
-TID: [0] [STRATOS] [2015-04-22 20:45:47,249]  INFO {org.apache.stratos.messaging.message.processor.topology.CompleteTopologyMessageProcessor} -  Topology initialized
-TID: [0] [STRATOS] [2015-04-22 20:45:47,249]  INFO {org.apache.stratos.messaging.message.processor.topology.CompleteTopologyMessageProcessor} -  Topology initialized
-TID: [0] [STRATOS] [2015-04-22 20:45:47,250]  INFO {org.apache.stratos.messaging.message.processor.topology.CompleteTopologyMessageProcessor} -  Topology initialized
-TID: [0] [STRATOS] [2015-04-22 20:45:47,250]  INFO {org.apache.stratos.autoscaler.event.receiver.topology.AutoscalerTopologyEventReceiver} -  [CompleteTopologyEvent] Received: class org.apache.stratos.messaging.event.topology.CompleteTopologyEvent
-TID: [0] [STRATOS] [2015-04-22 20:45:59,750]  INFO {org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceImpl} -  Adding network partition: [network-partition-id] RegionOne-AZ-1
-TID: [0] [STRATOS] [2015-04-22 20:45:59,751]  INFO {org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceImpl} -  Validating partition: [network-partition-id] RegionOne-AZ-1 [partition-id] RegionOne-AZ-1
-TID: [0] [STRATOS] [2015-04-22 20:46:01,196] ERROR {org.apache.stratos.cloud.controller.iaases.openstack.OpenstackIaas} -  Invalid zone: AZ-1 in the region: RegionOne and of the iaas: Core
-TID: [0] [STRATOS] [2015-04-22 20:46:01,197] ERROR {org.apache.stratos.cloud.controller.iaases.openstack.OpenstackPartitionValidator} -  Invalid partition detected: [partition-id] RegionOne-AZ-1Invalid zone: AZ-1 in the region: RegionOne and of the iaas: Core
-org.apache.stratos.cloud.controller.exception.InvalidZoneException: Invalid zone: AZ-1 in the region: RegionOne and of the iaas: Core
-	at org.apache.stratos.cloud.controller.iaases.openstack.OpenstackIaas.isValidZone(OpenstackIaas.java:289)
-	at org.apache.stratos.cloud.controller.iaases.openstack.OpenstackPartitionValidator.validate(OpenstackPartitionValidator.java:69)
-	at org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceUtil.validatePartitionAndGetIaasProvider(CloudControllerServiceUtil.java:97)
-	at org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceUtil.validatePartition(CloudControllerServiceUtil.java:108)
-	at org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceImpl.validatePartition(CloudControllerServiceImpl.java:1015)
-	at org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceImpl.addNetworkPartition(CloudControllerServiceImpl.java:1432)
-	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
-	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
-	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
-	at java.lang.reflect.Method.invoke(Method.java:606)
-	at org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:212)
-	at org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver.invokeBusinessLogic(RPCInOnlyMessageReceiver.java:66)
-	at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:110)
-	at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
-	at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172)
-	at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:146)
-	at org.wso2.carbon.core.transports.CarbonServlet.doPost(CarbonServlet.java:231)
-	at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)
-	at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
-	at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
-	at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)
-	at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:68)
-	at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
-	at org.wso2.carbon.tomcat.ext.servlet.DelegationServlet.service(DelegationServlet.java:68)
-	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
-	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
-	at org.wso2.carbon.tomcat.ext.filter.CharacterSetFilter.doFilter(CharacterSetFilter.java:61)
-	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
-	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
-	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
-	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
-	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
-	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
-	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
-	at org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:178)
-	at org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47)
-	at org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:56)
-	at org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47)
-	at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:141)
-	at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:156)
-	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
-	at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:52)
-	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
-	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
-	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
-	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
-	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1653)
-	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
-	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
-	at java.lang.Thread.run(Thread.java:745)
-TID: [0] [STRATOS] [2

<TRUNCATED>

[19/21] stratos git commit: Uplifting automation engine to v4.4.3, dynamically pick ports for integration tests

Posted by ra...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/PartitionRoundRobinClusterTest.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/PartitionRoundRobinClusterTest.java b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/PartitionRoundRobinClusterTest.java
deleted file mode 100644
index 7f4bd23..0000000
--- a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/PartitionRoundRobinClusterTest.java
+++ /dev/null
@@ -1,311 +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.integration.tests.application;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.common.beans.application.ApplicationBean;
-import org.apache.stratos.integration.tests.RestConstants;
-import org.apache.stratos.integration.tests.StratosTestServerManager;
-import org.apache.stratos.integration.tests.TopologyHandler;
-import org.apache.stratos.messaging.domain.application.Application;
-import org.apache.stratos.messaging.domain.application.ApplicationStatus;
-import org.apache.stratos.messaging.domain.application.ClusterDataHolder;
-import org.apache.stratos.messaging.domain.instance.ClusterInstance;
-import org.apache.stratos.messaging.domain.topology.Cluster;
-import org.apache.stratos.messaging.domain.topology.Member;
-import org.apache.stratos.messaging.domain.topology.Service;
-import org.apache.stratos.messaging.message.receiver.application.ApplicationManager;
-import org.apache.stratos.messaging.message.receiver.topology.TopologyManager;
-import org.testng.annotations.Test;
-
-import java.util.*;
-
-import static junit.framework.Assert.*;
-
-/**
- * This will handle the scale-up and scale-down of a particular cluster bursting test cases
- */
-public class PartitionRoundRobinClusterTest extends StratosTestServerManager {
-    private static final Log log = LogFactory.getLog(SampleApplicationsTest.class);
-    private static final String RESOURCES_PATH = "/partition-round-robin-cluster-test";
-
-
-    @Test
-    public void testDeployApplication() {
-        try {
-            log.info("-------------------------------Started application Bursting test case-------------------------------");
-
-            String autoscalingPolicyId = "autoscaling-policy-partition-round-robin-test";
-
-            boolean addedScalingPolicy = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.AUTOSCALING_POLICIES_PATH
-                            + "/" + autoscalingPolicyId + ".json",
-                    RestConstants.AUTOSCALING_POLICIES, RestConstants.AUTOSCALING_POLICIES_NAME);
-            assertEquals(addedScalingPolicy, true);
-
-            boolean addedC1 = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "c7-partition-round-robin-test.json",
-                    RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
-            assertEquals(addedC1, true);
-
-            boolean addedN1 = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
-                            "network-partition-partition-round-robin-test.json",
-                    RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
-            assertEquals(addedN1, true);
-
-            boolean addedDep = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.DEPLOYMENT_POLICIES_PATH + "/" +
-                            "deployment-policy-partition-round-robin-test.json",
-                    RestConstants.DEPLOYMENT_POLICIES, RestConstants.DEPLOYMENT_POLICIES_NAME);
-            assertEquals(addedDep, true);
-
-            boolean added = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.APPLICATIONS_PATH + "/" +
-                            "partition-round-robin-test.json", RestConstants.APPLICATIONS,
-                    RestConstants.APPLICATIONS_NAME);
-            assertEquals(added, true);
-
-            ApplicationBean bean = (ApplicationBean) restClientTenant1.getEntity(RestConstants.APPLICATIONS,
-                    "partition-round-robin-test", ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
-            assertEquals(bean.getApplicationId(), "partition-round-robin-test");
-
-            boolean addAppPolicy = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.APPLICATION_POLICIES_PATH + "/" +
-                            "application-policy-partition-round-robin-test.json", RestConstants.APPLICATION_POLICIES,
-                    RestConstants.APPLICATION_POLICIES_NAME);
-            assertEquals(addAppPolicy, true);
-
-            //deploy the application
-            String resourcePath = RestConstants.APPLICATIONS + "/" + "partition-round-robin-test" +
-                    RestConstants.APPLICATIONS_DEPLOY + "/" + "application-policy-partition-round-robin-test";
-            boolean deployed = restClientTenant1.deployEntity(resourcePath,
-                    RestConstants.APPLICATIONS_NAME);
-            assertEquals(deployed, true);
-
-
-            //Application active handling
-            TopologyHandler.getInstance().assertApplicationStatus(bean.getApplicationId(),
-                    ApplicationStatus.Active, tenant1Id);
-
-            //Cluster active handling
-            TopologyHandler.getInstance().assertClusterActivation(bean.getApplicationId(), tenant1Id);
-
-            //Verifying whether members got created using round robin algorithm
-           /* assertClusterWithRoundRobinAlgorithm(bean.getApplicationId());
-
-            //Application in-active handling
-            log.info("Waiting for the faulty member detection from " +
-                    "CEP as the statistics are stopped...");
-            TopologyHandler.getInstance().assertApplicationStatus(bean.getApplicationId(),
-                    ApplicationStatus.Inactive,tenant1Id);       */
-
-            //Application active handling after application becomes active again
-            TopologyHandler.getInstance().assertApplicationStatus(bean.getApplicationId(),
-                    ApplicationStatus.Active,tenant1Id);
-
-            //Cluster active handling
-            TopologyHandler.getInstance().assertClusterActivation(bean.getApplicationId(),tenant1Id);
-
-            boolean removedAuto = restClientTenant1.removeEntity(RestConstants.AUTOSCALING_POLICIES,
-                    autoscalingPolicyId, RestConstants.AUTOSCALING_POLICIES_NAME);
-            assertEquals(removedAuto, false);
-
-            boolean removedNet = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
-                    "network-partition-partition-round-robin-test",
-                    RestConstants.NETWORK_PARTITIONS_NAME);
-            //Trying to remove the used network partition
-            assertEquals(removedNet, false);
-
-            boolean removedDep = restClientTenant1.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
-                    "deployment-policy-partition-round-robin-test", RestConstants.DEPLOYMENT_POLICIES_NAME);
-            assertEquals(removedDep, false);
-
-            //Un-deploying the application
-            String resourcePathUndeploy = RestConstants.APPLICATIONS + "/" + "partition-round-robin-test" +
-                    RestConstants.APPLICATIONS_UNDEPLOY;
-
-            boolean unDeployed = restClientTenant1.undeployEntity(resourcePathUndeploy,
-                    RestConstants.APPLICATIONS_NAME);
-            assertEquals(unDeployed, true);
-
-            boolean undeploy = TopologyHandler.getInstance().assertApplicationUndeploy("partition-round-robin-test", tenant1Id);
-            if (!undeploy) {
-                //Need to forcefully undeploy the application
-                log.info("Force undeployment is going to start for the [application] " + "partition-round-robin-test");
-
-                restClientTenant1.undeployEntity(RestConstants.APPLICATIONS + "/" + "partition-round-robin-test" +
-                        RestConstants.APPLICATIONS_UNDEPLOY + "?force=true", RestConstants.APPLICATIONS);
-
-                boolean forceUndeployed = TopologyHandler.getInstance().assertApplicationUndeploy("partition-round-robin-test", tenant1Id);
-                assertEquals(String.format("Forceful undeployment failed for the application %s",
-                        "partition-round-robin-test"), forceUndeployed, true);
-
-            }
-
-            boolean removed = restClientTenant1.removeEntity(RestConstants.APPLICATIONS, "partition-round-robin-test",
-                    RestConstants.APPLICATIONS_NAME);
-            assertEquals(removed, true);
-
-            ApplicationBean beanRemoved = (ApplicationBean) restClientTenant1.getEntity(RestConstants.APPLICATIONS,
-                    "partition-round-robin-test", ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
-            assertEquals(beanRemoved, null);
-
-            boolean removedC1 = restClientTenant1.removeEntity(RestConstants.CARTRIDGES, "c7-partition-round-robin-test",
-                    RestConstants.CARTRIDGES_NAME);
-            assertEquals(removedC1, true);
-
-
-            removedAuto = restClientTenant1.removeEntity(RestConstants.AUTOSCALING_POLICIES,
-                    autoscalingPolicyId, RestConstants.AUTOSCALING_POLICIES_NAME);
-            assertEquals(removedAuto, true);
-
-            removedDep = restClientTenant1.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
-                    "deployment-policy-partition-round-robin-test", RestConstants.DEPLOYMENT_POLICIES_NAME);
-            assertEquals(removedDep, true);
-
-            removedNet = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
-                    "network-partition-partition-round-robin-test", RestConstants.NETWORK_PARTITIONS_NAME);
-            assertEquals(removedNet, false);
-
-
-            boolean removeAppPolicy = restClientTenant1.removeEntity(RestConstants.APPLICATION_POLICIES,
-                    "application-policy-partition-round-robin-test", RestConstants.APPLICATION_POLICIES_NAME);
-            assertEquals(removeAppPolicy, true);
-
-            removedNet = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
-                    "network-partition-partition-round-robin-test", RestConstants.NETWORK_PARTITIONS_NAME);
-            assertEquals(removedNet, true);
-
-            log.info("-------------------------------Ended application bursting test case-------------------------------");
-
-        } catch (Exception e) {
-            log.error("An error occurred while handling  application bursting", e);
-            assertTrue("An error occurred while handling  application bursting", false);
-        }
-    }
-
-    /**
-     * Assert application activation
-     *
-     * @param applicationName
-     */
-    private void assertClusterWithRoundRobinAlgorithm(String applicationName) {
-        Application application = ApplicationManager.getApplications().getApplicationByTenant(applicationName, tenant1Id);
-        assertNotNull(String.format("Application is not found: [application-id] %s",
-                applicationName), application);
-
-        Set<ClusterDataHolder> clusterDataHolderSet = application.getClusterDataRecursively();
-        for (ClusterDataHolder clusterDataHolder : clusterDataHolderSet) {
-            String serviceUUid = clusterDataHolder.getServiceUuid();
-            String clusterId = clusterDataHolder.getClusterId();
-            Service service = TopologyManager.getTopology().getService(serviceUUid);
-            assertNotNull(String.format("Service is not found: [application-id] %s [service] %s",
-                    applicationName, serviceUUid), service);
-
-            Cluster cluster = service.getCluster(clusterId);
-            assertNotNull(String.format("Cluster is not found: [application-id] %s [service] %s [cluster-id] %s",
-                    applicationName, serviceUUid, clusterId), cluster);
-
-            for (ClusterInstance instance : cluster.getInstanceIdToInstanceContextMap().values()) {
-                List<String> partitionsUsedInMembers = new ArrayList<String>();
-                Map<String, List<Long>> partitionIdToMembersMap = new HashMap<String, List<Long>>();
-                String p1 = "network-partition-11-partition-1";
-                String p2 = "network-partition-11-partition-2";
-                for (Member member : cluster.getMembers()) {
-                    String partitionId = member.getPartitionId();
-                    if(p1.equals("network-partition-11-partition-1")) {
-                        p1 = partitionId;
-                    }
-                    else if(!p1.equals(partitionId)&&p2.equals("network-partition-11-partition-2")){
-                        p2 = partitionId;
-                    }
-                    if (!partitionIdToMembersMap.containsKey(partitionId)) {
-                        List<Long> members = new ArrayList<Long>();
-                        members.add(member.getInitTime());
-                        partitionIdToMembersMap.put(partitionId, members);
-                    } else {
-                        partitionIdToMembersMap.get(partitionId).add(member.getInitTime());
-                    }
-                    if (!partitionsUsedInMembers.contains(partitionId)) {
-                        partitionsUsedInMembers.add(partitionId);
-                    }
-                }
-
-                List<Long> p1InitTime = partitionIdToMembersMap.get(p1);
-                Collections.sort(p1InitTime);
-
-                List<Long> p2InitTime = partitionIdToMembersMap.get(p2);
-                Collections.sort(p2InitTime);
-
-                List<Long> allInitTime = new ArrayList<Long>();
-                allInitTime.addAll(p1InitTime);
-                allInitTime.addAll(p2InitTime);
-                Collections.sort(allInitTime);
-
-                int p1Index = -1;
-                int p2Index = -1;
-                String previousPartition = null;
-                for (int i = 0; i < allInitTime.size(); i++) {
-                    if (previousPartition == null) {
-                        if (p1InitTime.get(0) == allInitTime.get(i)) {
-                            previousPartition = p1;
-                            p1Index++;
-                        } else if (p2InitTime.get(0) == allInitTime.get(i)) {
-                            previousPartition = p2;
-                            p2Index++;
-
-                        }
-                    } else if (previousPartition.equals(p1)) {
-                        p2Index++;
-                        previousPartition = p2;
-                        assertEquals("Partition-2 doesn't not contain correct values in current " +
-                                "iteration", allInitTime.get(allInitTime.size()-1), p2InitTime.get(p2Index));
-                        if (p1Index >= 0) {
-                            assertEquals("Partition-1 doesn't not contain correct values in the " +
-                                    "previous iteration", allInitTime.get(i - 1), p1InitTime.get(p1Index));
-                            if (p1Index + 1 <= (p1InitTime.size() - 1) && i + 1 <= (allInitTime.size() - 1)) {
-                                assertEquals("Partition-1 doesn't not contain correct " +
-                                                "values in the next iteration",
-                                        allInitTime.get(i + 1), p1InitTime.get(p1Index + 1));
-
-                            }
-                        }
-                    } else {
-                        p1Index++;
-                        previousPartition = p1;
-                        assertEquals("Partition-1 doesn't not contain correct values in current " +
-                                "iteration", allInitTime.get(i), p1InitTime.get(p1Index));
-                        if (p2Index >= 0) {
-                            assertEquals("Partition-2 doesn't not contain correct values  " +
-                                    "in the previous iteration", allInitTime.get(i - 1), p2InitTime.get(p2Index));
-                            if ((p2Index + 1) <= (p2InitTime.size() - 1) && (i + 1) <= (allInitTime.size() - 1)) {
-                                assertEquals("Partition-2 doesn't not contain correct values  " +
-                                                "in the next iteration",
-                                        allInitTime.get(i + 1), p2InitTime.get(p2Index + 1));
-                            }
-                        }
-                    }
-
-                }
-
-
-            }
-
-        }
-
-
-    }
-    
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/SampleApplicationsTest.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/SampleApplicationsTest.java b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/SampleApplicationsTest.java
deleted file mode 100644
index dea1f8a..0000000
--- a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/SampleApplicationsTest.java
+++ /dev/null
@@ -1,252 +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.integration.tests.application;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.common.beans.application.ApplicationBean;
-import org.apache.stratos.common.beans.cartridge.CartridgeGroupBean;
-import org.apache.stratos.common.beans.cartridge.CartridgeGroupReferenceBean;
-import org.apache.stratos.common.beans.cartridge.CartridgeReferenceBean;
-import org.apache.stratos.integration.tests.RestConstants;
-import org.apache.stratos.integration.tests.StratosTestServerManager;
-import org.testng.annotations.Test;
-
-import static junit.framework.Assert.*;
-
-/**
- * Sample application tests with application add, .
- */
-public class SampleApplicationsTest extends StratosTestServerManager {
-    private static final Log log = LogFactory.getLog(SampleApplicationsTest.class);
-    private static final String RESOURCES_PATH = "/sample-applications-test";
-
-    @Test
-    public void testApplication() {
-        log.info("-------------------------------Started application test case-------------------------------");
-        try {
-            String autoscalingPolicyId = "autoscaling-policy-sample-applications-test";
-
-            boolean addedScalingPolicy = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.AUTOSCALING_POLICIES_PATH
-                            + "/" + autoscalingPolicyId + ".json",
-                    RestConstants.AUTOSCALING_POLICIES, RestConstants.AUTOSCALING_POLICIES_NAME);
-            assertEquals(addedScalingPolicy, true);
-
-            boolean addedC1 = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "c1-sample-applications-test.json",
-                    RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
-            assertEquals(addedC1, true);
-
-            boolean addedC2 = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "c2-sample-applications-test.json",
-                    RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
-            assertEquals(addedC2, true);
-
-            boolean addedC3 = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "c3-sample-applications-test.json",
-                    RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
-            assertEquals(addedC3, true);
-
-            boolean addedG1 = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGE_GROUPS_PATH +
-                            "/" + "cartrdige-nested-sample-applications-test.json", RestConstants.CARTRIDGE_GROUPS,
-                    RestConstants.CARTRIDGE_GROUPS_NAME);
-            assertEquals(addedG1, true);
-
-            CartridgeGroupBean beanG1 = (CartridgeGroupBean) restClientTenant1.
-                    getEntity(RestConstants.CARTRIDGE_GROUPS, "G1-sample-applications-test",
-                            CartridgeGroupBean.class, RestConstants.CARTRIDGE_GROUPS_NAME);
-            assertEquals(beanG1.getName(), "G1-sample-applications-test");
-
-            boolean addedN1 = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
-                            "network-partition-sample-applications-test-1.json",
-                    RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
-            assertEquals(addedN1, true);
-
-            boolean addedN2 = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
-                            "network-partition-sample-applications-test-2.json",
-                    RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
-            assertEquals(addedN2, true);
-
-            boolean addedDep = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.DEPLOYMENT_POLICIES_PATH + "/" +
-                            "deployment-policy-sample-applications-test.json",
-                    RestConstants.DEPLOYMENT_POLICIES, RestConstants.DEPLOYMENT_POLICIES_NAME);
-            assertEquals(addedDep, true);
-
-            boolean added = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.APPLICATIONS_PATH + "/" +
-                            "g-sc-G123-1-sample-applications-test.json", RestConstants.APPLICATIONS,
-                    RestConstants.APPLICATIONS_NAME);
-            assertEquals(added, true);
-
-            ApplicationBean bean = (ApplicationBean) restClientTenant1.getEntity(RestConstants.APPLICATIONS,
-                    "g-sc-G123-1-sample-applications-test", ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
-            assertEquals(bean.getApplicationId(), "g-sc-G123-1-sample-applications-test");
-
-            CartridgeGroupReferenceBean group1 = bean.getComponents().getGroups().get(0);
-            CartridgeGroupReferenceBean group2 = group1.getGroups().get(0);
-            CartridgeGroupReferenceBean group3 = group2.getGroups().get(0);
-            CartridgeReferenceBean c1 = group1.getCartridges().get(0);
-            CartridgeReferenceBean c2 = group2.getCartridges().get(0);
-            CartridgeReferenceBean c3 = group3.getCartridges().get(0);
-
-            assertEquals(group1.getName(), "G1-sample-applications-test");
-            assertEquals(group1.getAlias(), "group1-sample-applications-test");
-            assertEquals(group1.getGroupMaxInstances(), 1);
-            assertEquals(group1.getGroupMinInstances(), 1);
-
-            assertEquals(c1.getType(), "c1-sample-applications-test");
-            assertEquals(c1.getCartridgeMin(), 1);
-            assertEquals(c1.getCartridgeMax(), 2);
-
-            assertEquals(group2.getAlias(), "group2-sample-applications-test");
-            assertEquals(group2.getName(), "G2-sample-applications-test");
-            assertEquals(group2.getGroupMaxInstances(), 1);
-            assertEquals(group2.getGroupMinInstances(), 1);
-
-            assertEquals(c2.getType(), "c2-sample-applications-test");
-            assertEquals(c2.getCartridgeMin(), 1);
-            assertEquals(c2.getCartridgeMax(), 2);
-
-            assertEquals(group3.getAlias(), "group3-sample-applications-test");
-            assertEquals(group3.getName(), "G3-sample-applications-test");
-            assertEquals(group3.getGroupMaxInstances(), 2);
-            assertEquals(group3.getGroupMinInstances(), 1);
-
-            assertEquals(c3.getType(), "c3-sample-applications-test");
-            assertEquals(c3.getCartridgeMin(), 1);
-            assertEquals(c3.getCartridgeMax(), 2);
-
-            bean = (ApplicationBean) restClientTenant2.getEntity(RestConstants.APPLICATIONS,
-                    "g-sc-G123-1-sample-applications-test", ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
-
-            assertNull("Application found in tenant 2",bean);
-
-            boolean updated = restClientTenant1.updateEntity(RESOURCES_PATH + RestConstants.APPLICATIONS_PATH +
-                            "/g-sc-G123-1-sample-applications-test-v1.json",
-                    RestConstants.APPLICATIONS, RestConstants.APPLICATIONS_NAME);
-            assertEquals(updated, true);
-
-            ApplicationBean updatedBean = (ApplicationBean) restClientTenant1.getEntity(RestConstants.APPLICATIONS,
-                    "g-sc-G123-1-sample-applications-test", ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
-
-            assertEquals(updatedBean.getApplicationId(), "g-sc-G123-1-sample-applications-test");
-
-            group1 = updatedBean.getComponents().getGroups().get(0);
-            group2 = group1.getGroups().get(0);
-            group3 = group2.getGroups().get(0);
-            c1 = group1.getCartridges().get(0);
-            c2 = group2.getCartridges().get(0);
-            c3 = group3.getCartridges().get(0);
-
-            assertEquals(group1.getName(), "G1-sample-applications-test");
-            assertEquals(group1.getAlias(), "group1-sample-applications-test");
-            assertEquals(group1.getGroupMaxInstances(), 1);
-            assertEquals(group1.getGroupMinInstances(), 1);
-
-            assertEquals(c1.getType(), "c1-sample-applications-test");
-            assertEquals(c1.getCartridgeMin(), 2);
-            assertEquals(c1.getCartridgeMax(), 3);
-
-            assertEquals(group2.getAlias(), "group2-sample-applications-test");
-            assertEquals(group2.getName(), "G2-sample-applications-test");
-            assertEquals(group2.getGroupMaxInstances(), 1);
-            assertEquals(group2.getGroupMinInstances(), 1);
-
-            assertEquals(c2.getType(), "c2-sample-applications-test");
-            assertEquals(c2.getCartridgeMin(), 2);
-            assertEquals(c2.getCartridgeMax(), 4);
-
-            assertEquals(group3.getAlias(), "group3-sample-applications-test");
-            assertEquals(group3.getName(), "G3-sample-applications-test");
-            assertEquals(group3.getGroupMaxInstances(), 3);
-            assertEquals(group3.getGroupMinInstances(), 2);
-
-            assertEquals(c3.getType(), "c3-sample-applications-test");
-            assertEquals(c3.getCartridgeMin(), 2);
-            assertEquals(c3.getCartridgeMax(), 3);
-
-            updatedBean = (ApplicationBean) restClientTenant2.getEntity(RestConstants.APPLICATIONS,
-                    "g-sc-G123-1-sample-applications-test", ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
-
-            assertNull("Application found in tenant 2",updatedBean);
-
-            boolean removedGroup = restClientTenant1.removeEntity(RestConstants.CARTRIDGE_GROUPS, "G1-sample-applications-test",
-                    RestConstants.CARTRIDGE_GROUPS_NAME);
-            assertFalse(removedGroup);
-
-            boolean removedAuto = restClientTenant1.removeEntity(RestConstants.AUTOSCALING_POLICIES,
-                    autoscalingPolicyId, RestConstants.AUTOSCALING_POLICIES_NAME);
-            assertFalse(removedAuto);
-
-            boolean removedNet = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
-                    "network-partition-sample-applications-test-1",
-                    RestConstants.NETWORK_PARTITIONS_NAME);
-            //Trying to remove the used network partition
-            assertFalse(removedNet);
-
-            boolean removedDep = restClientTenant1.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
-                    "deployment-policy-sample-applications-test", RestConstants.DEPLOYMENT_POLICIES_NAME);
-            assertFalse(removedDep);
-
-            boolean removed = restClientTenant1.removeEntity(RestConstants.APPLICATIONS, "g-sc-G123-1-sample-applications-test",
-                    RestConstants.APPLICATIONS_NAME);
-            assertTrue(removed);
-
-            ApplicationBean beanRemoved = (ApplicationBean) restClientTenant1.getEntity(RestConstants.APPLICATIONS,
-                    "g-sc-G123-1-sample-applications-test", ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
-            assertEquals(beanRemoved, null);
-
-            removedGroup = restClientTenant1.removeEntity(RestConstants.CARTRIDGE_GROUPS, "G1-sample-applications-test",
-                    RestConstants.CARTRIDGE_GROUPS_NAME);
-            assertEquals(removedGroup, true);
-
-            boolean removedC1 = restClientTenant1.removeEntity(RestConstants.CARTRIDGES, "c1-sample-applications-test",
-                    RestConstants.CARTRIDGES_NAME);
-            assertEquals(removedC1, true);
-
-            boolean removedC2 = restClientTenant1.removeEntity(RestConstants.CARTRIDGES, "c2-sample-applications-test",
-                    RestConstants.CARTRIDGES_NAME);
-            assertEquals(removedC2, true);
-
-            boolean removedC3 = restClientTenant1.removeEntity(RestConstants.CARTRIDGES, "c3-sample-applications-test",
-                    RestConstants.CARTRIDGES_NAME);
-            assertEquals(removedC3, true);
-
-            removedAuto = restClientTenant1.removeEntity(RestConstants.AUTOSCALING_POLICIES,
-                    autoscalingPolicyId, RestConstants.AUTOSCALING_POLICIES_NAME);
-            assertEquals(removedAuto, true);
-
-            removedDep = restClientTenant1.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
-                    "deployment-policy-sample-applications-test", RestConstants.DEPLOYMENT_POLICIES_NAME);
-            assertEquals(removedDep, true);
-
-            removedNet = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
-                    "network-partition-sample-applications-test-1", RestConstants.NETWORK_PARTITIONS_NAME);
-            assertEquals(removedNet, true);
-
-            boolean removedN2 = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
-                    "network-partition-sample-applications-test-2", RestConstants.NETWORK_PARTITIONS_NAME);
-            assertEquals(String.format("[Network partition] network-partition-sample-applications-test-2 " +
-                    "could not be removed for [application] g-sc-G123-1-sample-applications-test"),removedN2, true);
-
-            log.info("-------------------------------Ended application test case-------------------------------");
-
-        } catch (Exception e) {
-            log.error("An error occurred while handling application test case", e);
-            assertTrue("An error occurred while handling application test case", false);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/SingleClusterScalingTest.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/SingleClusterScalingTest.java b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/SingleClusterScalingTest.java
deleted file mode 100644
index 46412db..0000000
--- a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/SingleClusterScalingTest.java
+++ /dev/null
@@ -1,359 +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.integration.tests.application;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.common.beans.application.ApplicationBean;
-import org.apache.stratos.common.beans.policy.deployment.ApplicationPolicyBean;
-import org.apache.stratos.integration.tests.RestConstants;
-import org.apache.stratos.integration.tests.StratosTestServerManager;
-import org.apache.stratos.integration.tests.TopologyHandler;
-import org.apache.stratos.messaging.domain.application.Application;
-import org.apache.stratos.messaging.domain.application.ApplicationStatus;
-import org.apache.stratos.messaging.domain.application.ClusterDataHolder;
-import org.apache.stratos.messaging.domain.instance.ClusterInstance;
-import org.apache.stratos.messaging.domain.topology.Cluster;
-import org.apache.stratos.messaging.domain.topology.Member;
-import org.apache.stratos.messaging.domain.topology.MemberStatus;
-import org.apache.stratos.messaging.domain.topology.Service;
-import org.apache.stratos.messaging.message.receiver.application.ApplicationManager;
-import org.apache.stratos.messaging.message.receiver.topology.TopologyManager;
-import org.testng.annotations.Test;
-
-import java.util.Set;
-
-import static junit.framework.Assert.*;
-
-/**
- * This will handle the scale-up and scale-down of a particular cluster bursting test cases
- */
-public class SingleClusterScalingTest extends StratosTestServerManager {
-    private static final Log log = LogFactory.getLog(SampleApplicationsTest.class);
-    private static final String RESOURCES_PATH = "/single-cluster-scaling-test";
-    private static final int CLUSTER_SCALE_UP_TIMEOUT = 180000;
-    private static final int CLUSTER_SCALE_DOWN_TIMEOUT = 360000;
-    private int activeInstancesAfterScaleup = 0;
-
-
-    @Test
-    public void testDeployApplication() {
-        try {
-            log.info("-------------------------------Started application Bursting test case-------------------------------");
-
-            String autoscalingPolicyId = "autoscaling-policy-single-cluster-scaling-test";
-
-            boolean addedScalingPolicy = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.AUTOSCALING_POLICIES_PATH
-                            + "/" + autoscalingPolicyId + ".json",
-                    RestConstants.AUTOSCALING_POLICIES, RestConstants.AUTOSCALING_POLICIES_NAME);
-            assertEquals(addedScalingPolicy, true);
-
-            boolean addedC1 = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "c7-single-cluster-scaling-test.json",
-                    RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
-            assertEquals(addedC1, true);
-
-            boolean addedN1 = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
-                            "network-partition-single-cluster-scaling-test.json",
-                    RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
-            assertEquals(addedN1, true);
-
-            boolean addedDep = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.DEPLOYMENT_POLICIES_PATH + "/" +
-                            "deployment-policy-single-cluster-scaling-test.json",
-                    RestConstants.DEPLOYMENT_POLICIES, RestConstants.DEPLOYMENT_POLICIES_NAME);
-            assertEquals(addedDep, true);
-
-            boolean added = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.APPLICATIONS_PATH + "/" +
-                            "single-cluster-scaling-test.json", RestConstants.APPLICATIONS,
-                    RestConstants.APPLICATIONS_NAME);
-            assertEquals(added, true);
-
-            ApplicationBean bean = (ApplicationBean) restClientTenant1.getEntity(RestConstants.APPLICATIONS,
-                    "single-cluster-scaling-test", ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
-            assertEquals(bean.getApplicationId(), "single-cluster-scaling-test");
-
-            boolean addAppPolicy = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.APPLICATION_POLICIES_PATH + "/" +
-                            "application-policy-single-cluster-scaling-test.json", RestConstants.APPLICATION_POLICIES,
-                    RestConstants.APPLICATION_POLICIES_NAME);
-            assertEquals(addAppPolicy, true);
-
-            ApplicationPolicyBean policyBean = (ApplicationPolicyBean) restClientTenant1.getEntity(
-                    RestConstants.APPLICATION_POLICIES,
-                    "application-policy-single-cluster-scaling-test", ApplicationPolicyBean.class,
-                    RestConstants.APPLICATION_POLICIES_NAME);
-
-            //deploy the application
-            String resourcePath = RestConstants.APPLICATIONS + "/" + "single-cluster-scaling-test" +
-                    RestConstants.APPLICATIONS_DEPLOY + "/" + "application-policy-single-cluster-scaling-test";
-            boolean deployed = restClientTenant1.deployEntity(resourcePath,
-                    RestConstants.APPLICATIONS_NAME);
-            assertEquals(deployed, true);
-
-            //Application active handling
-            TopologyHandler.getInstance().assertApplicationStatus(bean.getApplicationId()
-                    , ApplicationStatus.Active, tenant1Id);
-
-            //Cluster active handling
-            TopologyHandler.getInstance().assertClusterActivation(bean.getApplicationId(), tenant1Id);
-
-            //Verifying whether members got created using round robin algorithm
-            assertClusterWithScalingup(bean.getApplicationId(), tenant1Id);
-
-            boolean removedAuto = restClientTenant1.removeEntity(RestConstants.AUTOSCALING_POLICIES,
-                    autoscalingPolicyId, RestConstants.AUTOSCALING_POLICIES_NAME);
-            assertEquals(removedAuto, false);
-
-            boolean removedNet = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
-                    "network-partition-single-cluster-scaling-test",
-                    RestConstants.NETWORK_PARTITIONS_NAME);
-            //Trying to remove the used network partition
-            assertEquals(removedNet, false);
-
-            boolean removedDep = restClientTenant1.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
-                    "deployment-policy-single-cluster-scaling-test", RestConstants.DEPLOYMENT_POLICIES_NAME);
-            assertEquals(removedDep, false);
-
-            //Un-deploying the application
-            String resourcePathUndeploy = RestConstants.APPLICATIONS + "/" + "single-cluster-scaling-test" +
-                    RestConstants.APPLICATIONS_UNDEPLOY;
-
-            boolean unDeployed = restClientTenant1.undeployEntity(resourcePathUndeploy,
-                    RestConstants.APPLICATIONS_NAME);
-            assertEquals(unDeployed, true);
-
-            boolean undeploy = TopologyHandler.getInstance().assertApplicationUndeploy("single-cluster-scaling-test", tenant1Id);
-            if (!undeploy) {
-                //Need to forcefully undeploy the application
-                log.info("Force undeployment is going to start for the [application] " + "single-cluster-scaling-test");
-
-                restClientTenant1.undeployEntity(RestConstants.APPLICATIONS + "/" + "single-cluster-scaling-test" +
-                        RestConstants.APPLICATIONS_UNDEPLOY + "?force=true", RestConstants.APPLICATIONS);
-
-                boolean forceUndeployed = TopologyHandler.getInstance().assertApplicationUndeploy("single-cluster-scaling-test", tenant1Id);
-                assertEquals(String.format("Forceful undeployment failed for the application %s",
-                        "single-cluster-scaling-test"), forceUndeployed, true);
-
-            }
-
-            boolean removed = restClientTenant1.removeEntity(RestConstants.APPLICATIONS, "single-cluster-scaling-test",
-                    RestConstants.APPLICATIONS_NAME);
-            assertEquals(removed, true);
-
-            ApplicationBean beanRemoved = (ApplicationBean) restClientTenant1.getEntity(RestConstants.APPLICATIONS,
-                    "single-cluster-scaling-test", ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
-            assertEquals(beanRemoved, null);
-
-            boolean removedC1 = restClientTenant1.removeEntity(RestConstants.CARTRIDGES, "c7-single-cluster-scaling-test",
-                    RestConstants.CARTRIDGES_NAME);
-            assertEquals(removedC1, true);
-
-
-            removedAuto = restClientTenant1.removeEntity(RestConstants.AUTOSCALING_POLICIES,
-                    autoscalingPolicyId, RestConstants.AUTOSCALING_POLICIES_NAME);
-            assertEquals(removedAuto, true);
-
-            removedDep = restClientTenant1.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
-                    "deployment-policy-single-cluster-scaling-test", RestConstants.DEPLOYMENT_POLICIES_NAME);
-            assertEquals(removedDep, true);
-
-            removedNet = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
-                    "network-partition-single-cluster-scaling-test", RestConstants.NETWORK_PARTITIONS_NAME);
-            assertEquals(removedNet, false);
-
-
-            boolean removeAppPolicy = restClientTenant1.removeEntity(RestConstants.APPLICATION_POLICIES,
-                    "application-policy-single-cluster-scaling-test", RestConstants.APPLICATION_POLICIES_NAME);
-            assertEquals(removeAppPolicy, true);
-
-            removedNet = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
-                    "network-partition-single-cluster-scaling-test", RestConstants.NETWORK_PARTITIONS_NAME);
-            assertEquals(removedNet, true);
-
-            log.info("-------------------------Ended application bursting test case-------------------------");
-
-        } catch (Exception e) {
-            log.error("An error occurred while handling  application bursting", e);
-            assertTrue("An error occurred while handling  application bursting", false);
-        }
-    }
-
-    /**
-     * Assert application activation
-     *
-     * @param applicationName
-     * @param tenantId
-     */
-    private void assertClusterWithScalingup(String applicationName, int tenantId) {
-        Application application = ApplicationManager.getApplications().getApplicationByTenant(applicationName, tenantId);
-        assertNotNull(String.format("Application is not found: [application-id] %s",
-                applicationName), application);
-        boolean clusterScaleup = false;
-        String clusterId = null;
-        long startTime = System.currentTimeMillis();
-        while (!clusterScaleup) {
-            try {
-                Thread.sleep(1000);
-            } catch (InterruptedException ignore) {
-            }
-            Set<ClusterDataHolder> clusterDataHolderSet = application.getClusterDataRecursively();
-            for (ClusterDataHolder clusterDataHolder : clusterDataHolderSet) {
-                String serviceUuid = clusterDataHolder.getServiceUuid();
-                clusterId = clusterDataHolder.getClusterId();
-                Service service = TopologyManager.getTopology().getService(serviceUuid);
-                assertNotNull(String.format("Service is not found: [application-id] %s [service] %s",
-                        applicationName, serviceUuid), service);
-
-                Cluster cluster = service.getCluster(clusterId);
-                assertNotNull(String.format("Cluster is not found: [application-id] %s [service] %s [cluster-id] %s",
-                        applicationName, serviceUuid, clusterId), cluster);
-                for (ClusterInstance instance : cluster.getInstanceIdToInstanceContextMap().values()) {
-                    int activeInstances = 0;
-                    for (Member member : cluster.getMembers()) {
-                        if (member.getClusterInstanceId().equals(instance.getInstanceId())) {
-                            if (member.getStatus().equals(MemberStatus.Active)) {
-                                activeInstances++;
-                            }
-                        }
-                    }
-                    clusterScaleup = activeInstances >= clusterDataHolder.getMinInstances();
-                    if(clusterScaleup) {
-                        activeInstancesAfterScaleup = activeInstances;
-                        break;
-                    }
-                }
-                application = ApplicationManager.getApplications().getApplicationByTenant(applicationName, tenantId);
-                if ((System.currentTimeMillis() - startTime) > CLUSTER_SCALE_UP_TIMEOUT) {
-                    break;
-                }
-            }
-        }
-        assertEquals(String.format("Cluster did not get scaled up: [cluster-id] %s", clusterId),
-                clusterScaleup, true);
-    }
-
-    /**
-     * Assert application activation
-     *
-     * @param applicationName
-     */
-    private void assertClusterWithScaleDown(String applicationName,int tenantId) {
-        Application application = ApplicationManager.getApplications().getApplicationByTenant(applicationName,tenantId);
-        assertNotNull(String.format("Application is not found: [application-id] %s",
-                applicationName), application);
-        boolean clusterScaleDown = false;
-        String clusterId = null;
-        long startTime = System.currentTimeMillis();
-        while (!clusterScaleDown) {
-            try {
-                Thread.sleep(1000);
-            } catch (InterruptedException ignore) {
-            }
-            Set<ClusterDataHolder> clusterDataHolderSet = application.getClusterDataRecursively();
-            for (ClusterDataHolder clusterDataHolder : clusterDataHolderSet) {
-                String serviceName = clusterDataHolder.getServiceUuid();
-                clusterId = clusterDataHolder.getClusterId();
-                Service service = TopologyManager.getTopology().getService(serviceName);
-                assertNotNull(String.format("Service is not found: [application-id] %s [service] %s",
-                        applicationName, serviceName), service);
-
-                Cluster cluster = service.getCluster(clusterId);
-                assertNotNull(String.format("Cluster is not found: [application-id] %s [service] %s [cluster-id] %s",
-                        applicationName, serviceName, clusterId), cluster);
-                for (ClusterInstance instance : cluster.getInstanceIdToInstanceContextMap().values()) {
-                    int activeInstances = 0;
-                    for (Member member : cluster.getMembers()) {
-                        if (member.getClusterInstanceId().equals(instance.getInstanceId())) {
-                            if (member.getStatus().equals(MemberStatus.Active)) {
-                                activeInstances++;
-                            }
-                        }
-                    }
-
-                    if(activeInstances > activeInstancesAfterScaleup) {
-                        activeInstancesAfterScaleup = activeInstances;
-                    }
-
-                    clusterScaleDown = activeInstancesAfterScaleup - 1 == activeInstances;
-                    if(clusterScaleDown) {
-                        break;
-                    }
-
-                }
-
-                application = ApplicationManager.getApplications().getApplicationByTenant(applicationName,tenantId);
-                if ((System.currentTimeMillis() - startTime) > CLUSTER_SCALE_DOWN_TIMEOUT) {
-                    break;
-                }
-            }
-        }
-        assertEquals(String.format("Cluster did not get scaled up: [cluster-id] %s", clusterId),
-                clusterScaleDown, true);
-    }
-
-    /**
-     * Assert application activation
-     *
-     * @param applicationName
-     */
-    private void assertClusterScaleDownToMinimumCount(String applicationName) {
-        Application application = ApplicationManager.getApplications().getApplication(applicationName);
-        assertNotNull(String.format("Application is not found: [application-id] %s",
-                applicationName), application);
-        boolean clusterScaleDown = false;
-        String clusterId = null;
-        long startTime = System.currentTimeMillis();
-        while (!clusterScaleDown) {
-            try {
-                Thread.sleep(1000);
-            } catch (InterruptedException ignore) {
-            }
-            Set<ClusterDataHolder> clusterDataHolderSet = application.getClusterDataRecursively();
-            for (ClusterDataHolder clusterDataHolder : clusterDataHolderSet) {
-                String serviceName = clusterDataHolder.getServiceType();
-                clusterId = clusterDataHolder.getClusterId();
-                Service service = TopologyManager.getTopology().getService(serviceName);
-                assertNotNull(String.format("Service is not found: [application-id] %s [service] %s",
-                        applicationName, serviceName), service);
-
-                Cluster cluster = service.getCluster(clusterId);
-                assertNotNull(String.format("Cluster is not found: [application-id] %s [service] %s [cluster-id] %s",
-                        applicationName, serviceName, clusterId), cluster);
-                for (ClusterInstance instance : cluster.getInstanceIdToInstanceContextMap().values()) {
-                    int activeInstances = 0;
-                    for (Member member : cluster.getMembers()) {
-                        if (member.getClusterInstanceId().equals(instance.getInstanceId())) {
-                            if (member.getStatus().equals(MemberStatus.Active)) {
-                                activeInstances++;
-                            }
-                        }
-                    }
-                    clusterScaleDown = activeInstances == clusterDataHolder.getMinInstances();
-                    if(clusterScaleDown) {
-                        break;
-                    }
-                }
-                application = ApplicationManager.getApplications().getApplication(applicationName);
-                if ((System.currentTimeMillis() - startTime) > CLUSTER_SCALE_DOWN_TIMEOUT) {
-                    break;
-                }
-            }
-        }
-        assertEquals(String.format("Cluster did not get scaled up: [cluster-id] %s", clusterId),
-                clusterScaleDown, true);
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/group/CartridgeGroupTest.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/group/CartridgeGroupTest.java b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/group/CartridgeGroupTest.java
deleted file mode 100644
index 9b6eefe..0000000
--- a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/group/CartridgeGroupTest.java
+++ /dev/null
@@ -1,150 +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.integration.tests.group;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.common.beans.cartridge.CartridgeGroupBean;
-import org.apache.stratos.integration.tests.RestConstants;
-import org.apache.stratos.integration.tests.StratosTestServerManager;
-import org.testng.annotations.Test;
-
-import static junit.framework.Assert.assertEquals;
-import static junit.framework.Assert.assertNull;
-import static junit.framework.Assert.assertTrue;
-
-/**
- * Test to handle Cartridge group CRUD operations
- */
-public class CartridgeGroupTest extends StratosTestServerManager {
-    private static final Log log = LogFactory.getLog(CartridgeGroupTest.class);
-    private static final String RESOURCES_PATH = "/cartridge-group-test";
-
-    @Test
-    public void testCartridgeGroup() {
-        try {
-            log.info("-------------------------Started Cartridge group test case-------------------------");
-
-            boolean addedC1 = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH +
-                            "/" + "c4-cartridge-group-test.json",
-                    RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
-            assertEquals(String.format("Cartridge did not added: [cartridge-name] %s",
-                    "c4-cartridge-group-test"), addedC1, true);
-
-            boolean addedC2 = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH +
-                            "/" + "c5-cartridge-group-test.json",
-                    RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
-            assertEquals(String.format("Cartridge did not added: [cartridge-name] %s",
-                    "c5-cartridge-group-test"), addedC2, true);
-
-            boolean addedC3 = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH +
-                            "/" + "c6-cartridge-group-test.json",
-                    RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
-            assertEquals(String.format("Cartridge did not added: [cartridge-name] %s",
-                    "c6-cartridge-group-test"), addedC3, true);
-
-            boolean added = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGE_GROUPS_PATH +
-                            "/" + "g4-g5-g6-cartridge-group-test.json", RestConstants.CARTRIDGE_GROUPS,
-                    RestConstants.CARTRIDGE_GROUPS_NAME);
-            assertEquals(String.format("Cartridge Group did not added: [cartridge-group-name] %s",
-                    "g4-g5-g6-cartridge-group-test"), added, true);
-
-            CartridgeGroupBean bean = (CartridgeGroupBean) restClientTenant1.
-                    getEntity(RestConstants.CARTRIDGE_GROUPS, "G4-cartridge-group-test",
-                            CartridgeGroupBean.class, RestConstants.CARTRIDGE_GROUPS_NAME);
-            assertEquals(String.format("Cartridge Group name did not match: [cartridge-group-name] %s",
-                    "g4-g5-g6-cartridge-group-test.json"), bean.getName(), "G4-cartridge-group-test");
-
-            CartridgeGroupBean tenant2Bean = (CartridgeGroupBean) restClientTenant2.
-                    getEntity(RestConstants.CARTRIDGE_GROUPS, "G4-cartridge-group-test",
-                            CartridgeGroupBean.class, RestConstants.CARTRIDGE_GROUPS_NAME);
-            assertNull(String.format("Cartridge Group name fouund in tenant 2: [cartridge-group-name] %s",
-                    bean.getName()),tenant2Bean);
-
-            boolean updated = restClientTenant1.updateEntity(RESOURCES_PATH + RestConstants.CARTRIDGE_GROUPS_PATH +
-                            "/" + "g4-g5-g6-cartridge-group-test-v1.json",
-                    RestConstants.CARTRIDGE_GROUPS, RestConstants.CARTRIDGE_GROUPS_NAME);
-            assertEquals(String.format("Cartridge Group did not updated: [cartridge-group-name] %s",
-                    "g4-g5-g6-cartridge-group-test"), updated, true);
-
-            CartridgeGroupBean updatedBean = (CartridgeGroupBean) restClientTenant1.
-                    getEntity(RestConstants.CARTRIDGE_GROUPS, "G4-cartridge-group-test",
-                            CartridgeGroupBean.class, RestConstants.CARTRIDGE_GROUPS_NAME);
-            assertEquals(String.format("Updated Cartridge Group didn't match: [cartridge-group-name] %s",
-                    "g4-g5-g6-cartridge-group-test"), updatedBean.getName(), "G4-cartridge-group-test");
-
-            updatedBean = (CartridgeGroupBean) restClientTenant2.
-                    getEntity(RestConstants.CARTRIDGE_GROUPS, "G4-cartridge-group-test",
-                            CartridgeGroupBean.class, RestConstants.CARTRIDGE_GROUPS_NAME);
-            assertNull(String.format("Updated Cartridge Group found in other tenant: [cartridge-group-name] %s",
-                    "g4-g5-g6-cartridge-group-test"), updatedBean);
-
-            boolean removedC1 = restClientTenant1.removeEntity(RestConstants.CARTRIDGES, "c4-cartridge-group-test",
-                    RestConstants.CARTRIDGE_GROUPS_NAME);
-            assertEquals(String.format("Cartridge can be removed while it is used in " +
-                    "cartridge group: [cartridge-name] %s", "c4-cartridge-group-test"), removedC1, false);
-
-            boolean removedC2 = restClientTenant1.removeEntity(RestConstants.CARTRIDGES, "c5-cartridge-group-test",
-                    RestConstants.CARTRIDGE_GROUPS_NAME);
-            assertEquals(String.format("Cartridge can be removed while it is used in " +
-                            "cartridge group: [cartridge-name] %s",
-                    "c5-cartridge-group-test"), removedC2, false);
-
-            boolean removedC3 = restClientTenant1.removeEntity(RestConstants.CARTRIDGES, "c6-cartridge-group-test",
-                    RestConstants.CARTRIDGE_GROUPS_NAME);
-            assertEquals(String.format("Cartridge can be removed while it is used in " +
-                            "cartridge group: [cartridge-name] %s",
-                    "c6-cartridge-group-test"), removedC3, false);
-
-            boolean removed = restClientTenant1.removeEntity(RestConstants.CARTRIDGE_GROUPS, "G4-cartridge-group-test",
-                    RestConstants.CARTRIDGE_GROUPS_NAME);
-            assertEquals(String.format("Cartridge Group did not removed: [cartridge-group-name] %s",
-                    "g4-g5-g6-cartridge-group-test"), removed, true);
-
-            CartridgeGroupBean beanRemoved = (CartridgeGroupBean) restClientTenant1.
-                    getEntity(RestConstants.CARTRIDGE_GROUPS, "G4-cartridge-group-test",
-                            CartridgeGroupBean.class, RestConstants.CARTRIDGE_GROUPS_NAME);
-            assertEquals(String.format("Cartridge Group did not removed completely: " +
-                            "[cartridge-group-name] %s",
-                    "g4-g5-g6-cartridge-group-test"), beanRemoved, null);
-
-            removedC1 = restClientTenant1.removeEntity(RestConstants.CARTRIDGES, "c4-cartridge-group-test",
-                    RestConstants.CARTRIDGE_GROUPS_NAME);
-            assertEquals(String.format("Cartridge can not be removed : [cartridge-name] %s",
-                    "c4-cartridge-group-test"), removedC1, true);
-
-            removedC2 = restClientTenant1.removeEntity(RestConstants.CARTRIDGES, "c5-cartridge-group-test",
-                    RestConstants.CARTRIDGE_GROUPS_NAME);
-            assertEquals(String.format("Cartridge can not be removed : [cartridge-name] %s",
-                    "c5-cartridge-group-test"), removedC2, true);
-
-            removedC3 = restClientTenant1.removeEntity(RestConstants.CARTRIDGES, "c6-cartridge-group-test",
-                    RestConstants.CARTRIDGE_GROUPS_NAME);
-            assertEquals(String.format("Cartridge can not be removed : [cartridge-name] %s",
-                    "c6-cartridge-group-test"), removedC3, true);
-
-            log.info("-------------------------Ended Cartridge group test case-------------------------");
-
-        } catch (Exception e) {
-            log.error("An error occurred while handling Cartridge group test case", e);
-            assertTrue("An error occurred while handling Cartridge group test case", false);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/group/CartridgeTest.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/group/CartridgeTest.java b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/group/CartridgeTest.java
deleted file mode 100644
index afbdc1a..0000000
--- a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/group/CartridgeTest.java
+++ /dev/null
@@ -1,191 +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.integration.tests.group;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.common.beans.PropertyBean;
-import org.apache.stratos.common.beans.cartridge.CartridgeBean;
-import org.apache.stratos.integration.tests.RestConstants;
-import org.apache.stratos.integration.tests.StratosTestServerManager;
-import org.testng.annotations.Test;
-
-import static junit.framework.Assert.*;
-
-/**
- * Test to handle Cartridge CRUD operations
- */
-public class CartridgeTest extends StratosTestServerManager {
-    private static final Log log = LogFactory.getLog(CartridgeTest.class);
-    private static final String RESOURCES_PATH = "/cartridge-test";
-
-
-    @Test
-    public void testCartridge() {
-        log.info("--------------------Started Cartridge test case-----------------------------");
-
-        try {
-            String cartridgeType = "c0-cartridge-test";
-            boolean added = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" +
-                            cartridgeType + ".json",
-                    RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
-            assertEquals(added, true);
-            CartridgeBean bean = (CartridgeBean) restClientTenant1.
-                    getEntity(RestConstants.CARTRIDGES, cartridgeType,
-                            CartridgeBean.class, RestConstants.CARTRIDGES_NAME);
-            assertEquals(bean.getCategory(), "Application");
-
-            for (PropertyBean property : bean.getProperty()) {
-                if (property.getName().equals("payload_parameter.CEP_IP")) {
-                    assertEquals(property.getValue(), "octl.qmog.cisco.com");
-                } else if (property.getName().equals("payload_parameter.CEP_ADMIN_PASSWORD")) {
-                    assertEquals(property.getValue(), "admin");
-                } else if (property.getName().equals("payload_parameter.MONITORING_SERVER_IP")) {
-                    assertEquals(property.getValue(), "octl.qmog.cisco.com");
-                } else if (property.getName().equals("payload_parameter.QTCM_NETWORK_COUNT")) {
-                    assertEquals(property.getValue(), "1");
-                } else if (property.getName().equals("payload_parameter.MONITORING_SERVER_ADMIN_PASSWORD")) {
-                    assertEquals(property.getValue(), "admin");
-                } else if (property.getName().equals("payload_parameter.QTCM_DNS_SEGMENT")) {
-                    assertEquals(property.getValue(), "test");
-                } else if (property.getName().equals("payload_parameter.MONITORING_SERVER_SECURE_PORT")) {
-                    assertEquals(property.getValue(), "7711");
-                } else if (property.getName().equals("payload_parameter.MONITORING_SERVER_PORT")) {
-                    assertEquals(property.getValue(), "7611");
-                } else if (property.getName().equals("payload_parameter.CEP_PORT")) {
-                    assertEquals(property.getValue(), "7611");
-                } else if (property.getName().equals("payload_parameter.MB_PORT")) {
-                    assertEquals(property.getValue(), "61616");
-                }
-            }
-            bean = (CartridgeBean) restClientTenant2.
-                    getEntity(RestConstants.CARTRIDGES, cartridgeType,
-                            CartridgeBean.class, RestConstants.CARTRIDGES_NAME);
-            assertNull("Cartridge exists in other tenant", bean);
-            boolean updated = restClientTenant1.updateEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" +
-                            cartridgeType + "-v1.json",
-                    RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
-            assertEquals(updated, true);
-            CartridgeBean updatedBean = (CartridgeBean) restClientTenant1.
-                    getEntity(RestConstants.CARTRIDGES, cartridgeType,
-                            CartridgeBean.class, RestConstants.CARTRIDGES_NAME);
-            assertEquals(updatedBean.getType(), "c0-cartridge-test");
-            assertEquals(updatedBean.getCategory(), "Data");
-            assertEquals(updatedBean.getHost(), "qmog.cisco.com12");
-            for (PropertyBean property : updatedBean.getProperty()) {
-                if (property.getName().equals("payload_parameter.CEP_IP")) {
-                    assertEquals(property.getValue(), "octl.qmog.cisco.com123");
-                } else if (property.getName().equals("payload_parameter.CEP_ADMIN_PASSWORD")) {
-                    assertEquals(property.getValue(), "admin123");
-                } else if (property.getName().equals("payload_parameter.MONITORING_SERVER_IP")) {
-                    assertEquals(property.getValue(), "octl.qmog.cisco.com123");
-                } else if (property.getName().equals("payload_parameter.QTCM_NETWORK_COUNT")) {
-                    assertEquals(property.getValue(), "3");
-                } else if (property.getName().equals("payload_parameter.MONITORING_SERVER_ADMIN_PASSWORD")) {
-                    assertEquals(property.getValue(), "admin123");
-                } else if (property.getName().equals("payload_parameter.QTCM_DNS_SEGMENT")) {
-                    assertEquals(property.getValue(), "test123");
-                } else if (property.getName().equals("payload_parameter.MONITORING_SERVER_SECURE_PORT")) {
-                    assertEquals(property.getValue(), "7712");
-                } else if (property.getName().equals("payload_parameter.MONITORING_SERVER_PORT")) {
-                    assertEquals(property.getValue(), "7612");
-                } else if (property.getName().equals("payload_parameter.CEP_PORT")) {
-                    assertEquals(property.getValue(), "7612");
-                } else if (property.getName().equals("payload_parameter.MB_PORT")) {
-                    assertEquals(property.getValue(), "61617");
-                }
-            }
-
-            bean = (CartridgeBean) restClientTenant2.
-                    getEntity(RestConstants.CARTRIDGES, cartridgeType,
-                            CartridgeBean.class, RestConstants.CARTRIDGES_NAME);
-            assertNull("Cartridge exists in other tenant", bean);
-
-            added = restClientTenant2.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" +
-                            cartridgeType + ".json",
-                    RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
-            assertEquals(added, true);
-
-            updated = restClientTenant2.updateEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" +
-                            cartridgeType + "-v1.json",
-                    RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
-            assertEquals(updated, true);
-
-            updatedBean = (CartridgeBean) restClientTenant2.
-                    getEntity(RestConstants.CARTRIDGES, cartridgeType,
-                            CartridgeBean.class, RestConstants.CARTRIDGES_NAME);
-            assertEquals(updatedBean.getType(), "c0-cartridge-test");
-            assertEquals(updatedBean.getCategory(), "Data");
-            assertEquals(updatedBean.getHost(), "qmog.cisco.com12");
-            for (PropertyBean property : updatedBean.getProperty()) {
-                if (property.getName().equals("payload_parameter.CEP_IP")) {
-                    assertEquals(property.getValue(), "octl.qmog.cisco.com123");
-                } else if (property.getName().equals("payload_parameter.CEP_ADMIN_PASSWORD")) {
-                    assertEquals(property.getValue(), "admin123");
-                } else if (property.getName().equals("payload_parameter.MONITORING_SERVER_IP")) {
-                    assertEquals(property.getValue(), "octl.qmog.cisco.com123");
-                } else if (property.getName().equals("payload_parameter.QTCM_NETWORK_COUNT")) {
-                    assertEquals(property.getValue(), "3");
-                } else if (property.getName().equals("payload_parameter.MONITORING_SERVER_ADMIN_PASSWORD")) {
-                    assertEquals(property.getValue(), "admin123");
-                } else if (property.getName().equals("payload_parameter.QTCM_DNS_SEGMENT")) {
-                    assertEquals(property.getValue(), "test123");
-                } else if (property.getName().equals("payload_parameter.MONITORING_SERVER_SECURE_PORT")) {
-                    assertEquals(property.getValue(), "7712");
-                } else if (property.getName().equals("payload_parameter.MONITORING_SERVER_PORT")) {
-                    assertEquals(property.getValue(), "7612");
-                } else if (property.getName().equals("payload_parameter.CEP_PORT")) {
-                    assertEquals(property.getValue(), "7612");
-                } else if (property.getName().equals("payload_parameter.MB_PORT")) {
-                    assertEquals(property.getValue(), "61617");
-                }
-            }
-            boolean removed = restClientTenant1.removeEntity(RestConstants.CARTRIDGES, cartridgeType,
-                    RestConstants.CARTRIDGES_NAME);
-            assertEquals(removed, true);
-
-            bean = (CartridgeBean) restClientTenant2.
-                    getEntity(RestConstants.CARTRIDGES, cartridgeType,
-                            CartridgeBean.class, RestConstants.CARTRIDGES_NAME);
-            assertNotNull("Cartridge not exists in other tenant", bean);
-
-            CartridgeBean beanRemoved = (CartridgeBean) restClientTenant1.
-                    getEntity(RestConstants.CARTRIDGES, cartridgeType,
-                            CartridgeBean.class, RestConstants.CARTRIDGES_NAME);
-            assertEquals(beanRemoved, null);
-
-            removed = restClientTenant2.removeEntity(RestConstants.CARTRIDGES, cartridgeType,
-                    RestConstants.CARTRIDGES_NAME);
-            assertEquals(removed, true);
-
-            beanRemoved = (CartridgeBean) restClientTenant2.
-                    getEntity(RestConstants.CARTRIDGES, cartridgeType,
-                            CartridgeBean.class, RestConstants.CARTRIDGES_NAME);
-            assertEquals(beanRemoved, null);
-
-
-
-            log.info("---------------------------Ended Cartridge test case-------------------------");
-        } catch (Exception e) {
-            log.error("An error occurred while handling RESTConstants.CARTRIDGES_PATH", e);
-            assertTrue("An error occurred while handling RESTConstants.CARTRIDGES_PATH", false);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/policies/ApplicationPolicyTest.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/policies/ApplicationPolicyTest.java b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/policies/ApplicationPolicyTest.java
deleted file mode 100644
index 6800200..0000000
--- a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/policies/ApplicationPolicyTest.java
+++ /dev/null
@@ -1,190 +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.integration.tests.policies;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.common.beans.PropertyBean;
-import org.apache.stratos.common.beans.partition.NetworkPartitionBean;
-import org.apache.stratos.common.beans.policy.deployment.ApplicationPolicyBean;
-import org.apache.stratos.integration.tests.RestConstants;
-import org.apache.stratos.integration.tests.StratosTestServerManager;
-import org.testng.annotations.Test;
-
-import static junit.framework.Assert.*;
-
-/**
- * Test to handle Network partition CRUD operations
- */
-public class ApplicationPolicyTest extends StratosTestServerManager {
-    private static final Log log = LogFactory.getLog(ApplicationPolicyTest.class);
-    private static final String RESOURCES_PATH = "/application-policy-test";
-
-
-    @Test
-    public void testApplicationPolicy() {
-        try {
-            String applicationPolicyId = "application-policy-application-policy-test";
-            log.info("-------------------------Started Application policy test case-------------------------");
-
-            boolean addedN1 = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
-                            "network-partition-application-policy-test-1" + ".json",
-                    RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
-            assertEquals(addedN1, true);
-
-            boolean addedN2 = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
-                            "network-partition-application-policy-test-2" + ".json",
-                    RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
-            assertEquals(addedN2, true);
-
-            boolean addedDep = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.APPLICATION_POLICIES_PATH + "/" +
-                            applicationPolicyId + ".json",
-                    RestConstants.APPLICATION_POLICIES, RestConstants.APPLICATION_POLICIES_NAME);
-            assertEquals(addedDep, true);
-
-            ApplicationPolicyBean bean = (ApplicationPolicyBean) restClientTenant1.
-                    getEntity(RestConstants.APPLICATION_POLICIES, applicationPolicyId,
-                            ApplicationPolicyBean.class, RestConstants.APPLICATION_POLICIES_NAME);
-            assertEquals(bean.getId(), applicationPolicyId);
-            assertEquals(String.format("The expected algorithm %s is not found in %s",
-                    "one-after-another", applicationPolicyId), bean.getAlgorithm(), "one-after-another");
-            assertEquals(String.format("The expected id %s is not found",
-                    applicationPolicyId), bean.getId(), applicationPolicyId);
-            assertEquals(String.format("The expected networkpartitions size %s is not found in %s",
-                    2, applicationPolicyId), bean.getNetworkPartitions().length, 2);
-            assertEquals(String.format("The first network partition is not %s in %s",
-                            "network-partition-application-policy-test-1", applicationPolicyId), bean.getNetworkPartitions()[0],
-                    "network-partition-application-policy-test-1");
-            assertEquals(String.format("The Second network partition is not %s in %s",
-                            "network-partition-application-policy-test-2", applicationPolicyId), bean.getNetworkPartitions()[1],
-                    "network-partition-application-policy-test-2");
-            boolean algoFound = false;
-            for (PropertyBean propertyBean : bean.getProperties()) {
-                if (propertyBean.getName().equals("networkPartitionGroups")) {
-                    assertEquals(String.format("The networkPartitionGroups algorithm %s is not found in %s",
-                                    "network-partition-application-policy-test-1,network-partition-application-policy-test-2", applicationPolicyId),
-                            propertyBean.getValue(), "network-partition-application-policy-test-1,network-partition-application-policy-test-2");
-                    algoFound = true;
-
-                }
-            }
-            if (!algoFound) {
-                assertTrue(String.format("The networkPartitionGroups property is not found in %s",
-                        applicationPolicyId), false);
-            }
-
-            bean = (ApplicationPolicyBean) restClientTenant2.
-                    getEntity(RestConstants.APPLICATION_POLICIES, applicationPolicyId,
-                            ApplicationPolicyBean.class, RestConstants.APPLICATION_POLICIES_NAME);
-            assertNull("Application policy bean found in tenant 2",bean);
-
-            addedN1 = restClientTenant2.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
-                            "network-partition-application-policy-test-1" + ".json",
-                    RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
-            assertEquals(addedN1, true);
-
-            addedN2 = restClientTenant2.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
-                            "network-partition-application-policy-test-2" + ".json",
-                    RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
-            assertEquals(addedN2, true);
-
-            boolean addedTenant2Dep = restClientTenant2.addEntity(RESOURCES_PATH + RestConstants.APPLICATION_POLICIES_PATH + "/" +
-                            applicationPolicyId + ".json",
-                    RestConstants.APPLICATION_POLICIES, RestConstants.APPLICATION_POLICIES_NAME);
-            assertEquals(addedTenant2Dep, true);
-
-            ApplicationPolicyBean tenant2bean = (ApplicationPolicyBean) restClientTenant2.
-                    getEntity(RestConstants.APPLICATION_POLICIES, applicationPolicyId,
-                            ApplicationPolicyBean.class, RestConstants.APPLICATION_POLICIES_NAME);
-            assertNotNull("Application is not exist in tenant 2", tenant2bean);
-
-
-            boolean removedNet = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
-                    "network-partition-application-policy-test-1", RestConstants.NETWORK_PARTITIONS_NAME);
-            //Trying to remove the used network partition
-            assertEquals(removedNet, false);
-
-            boolean removedDep = restClientTenant1.removeEntity(RestConstants.APPLICATION_POLICIES,
-                    applicationPolicyId, RestConstants.APPLICATION_POLICIES_NAME);
-            assertEquals(removedDep, true);
-
-            ApplicationPolicyBean beanRemovedDep = (ApplicationPolicyBean) restClientTenant1.
-                    getEntity(RestConstants.APPLICATION_POLICIES, applicationPolicyId,
-                            ApplicationPolicyBean.class, RestConstants.APPLICATION_POLICIES_NAME);
-            assertEquals(beanRemovedDep, null);
-
-            boolean removedN1 = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
-                    "network-partition-application-policy-test-1", RestConstants.NETWORK_PARTITIONS_NAME);
-            assertEquals(removedN1, true);
-
-            NetworkPartitionBean beanRemovedN1 = (NetworkPartitionBean) restClientTenant1.
-                    getEntity(RestConstants.NETWORK_PARTITIONS, "network-partition-application-policy-test-1",
-                            NetworkPartitionBean.class, RestConstants.NETWORK_PARTITIONS_NAME);
-            assertEquals(beanRemovedN1, null);
-
-            boolean removedN2 = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
-                    "network-partition-application-policy-test-2", RestConstants.NETWORK_PARTITIONS_NAME);
-            assertEquals(removedN2, true);
-
-            NetworkPartitionBean beanRemovedN2 = (NetworkPartitionBean) restClientTenant1.
-                    getEntity(RestConstants.NETWORK_PARTITIONS, "network-partition-application-policy-test-2",
-                            NetworkPartitionBean.class, RestConstants.NETWORK_PARTITIONS_NAME);
-            assertEquals(beanRemovedN2, null);
-
-            tenant2bean = (ApplicationPolicyBean) restClientTenant2.
-                    getEntity(RestConstants.APPLICATION_POLICIES, applicationPolicyId,
-                            ApplicationPolicyBean.class, RestConstants.APPLICATION_POLICIES_NAME);
-            assertNotNull("Application is not exist in tenant 2", tenant2bean);
-
-            removedDep = restClientTenant2.removeEntity(RestConstants.APPLICATION_POLICIES,
-                    applicationPolicyId, RestConstants.APPLICATION_POLICIES_NAME);
-            assertEquals(removedDep, true);
-
-            beanRemovedDep = (ApplicationPolicyBean) restClientTenant2.
-                    getEntity(RestConstants.APPLICATION_POLICIES, applicationPolicyId,
-                            ApplicationPolicyBean.class, RestConstants.APPLICATION_POLICIES_NAME);
-            assertEquals(beanRemovedDep, null);
-
-            removedN1 = restClientTenant2.removeEntity(RestConstants.NETWORK_PARTITIONS,
-                    "network-partition-application-policy-test-1", RestConstants.NETWORK_PARTITIONS_NAME);
-            assertEquals(removedN1, true);
-
-            beanRemovedN1 = (NetworkPartitionBean) restClientTenant2.
-                    getEntity(RestConstants.NETWORK_PARTITIONS, "network-partition-application-policy-test-1",
-                            NetworkPartitionBean.class, RestConstants.NETWORK_PARTITIONS_NAME);
-            assertEquals(beanRemovedN1, null);
-
-            removedN2 = restClientTenant2.removeEntity(RestConstants.NETWORK_PARTITIONS,
-                    "network-partition-application-policy-test-2", RestConstants.NETWORK_PARTITIONS_NAME);
-            assertEquals(removedN2, true);
-
-            beanRemovedN2 = (NetworkPartitionBean) restClientTenant2.
-                    getEntity(RestConstants.NETWORK_PARTITIONS, "network-partition-application-policy-test-2",
-                            NetworkPartitionBean.class, RestConstants.NETWORK_PARTITIONS_NAME);
-            assertEquals(beanRemovedN2, null);
-
-            log.info("-------------------------Ended deployment policy test case-------------------------");
-
-        } catch (Exception e) {
-            log.error("An error occurred while handling deployment policy", e);
-            assertTrue("An error occurred while handling deployment policy", false);
-        }
-    }
-}


[20/21] stratos git commit: Uplifting automation engine to v4.4.3, dynamically pick ports for integration tests

Posted by ra...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/ApplicationBurstingTest.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/ApplicationBurstingTest.java b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/ApplicationBurstingTest.java
deleted file mode 100644
index f210b12..0000000
--- a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/ApplicationBurstingTest.java
+++ /dev/null
@@ -1,242 +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.integration.tests.application;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.common.beans.application.ApplicationBean;
-import org.apache.stratos.common.beans.cartridge.CartridgeGroupBean;
-import org.apache.stratos.common.beans.policy.deployment.ApplicationPolicyBean;
-import org.apache.stratos.integration.tests.RestConstants;
-import org.apache.stratos.integration.tests.StratosTestServerManager;
-import org.apache.stratos.integration.tests.TopologyHandler;
-import org.apache.stratos.messaging.domain.application.ApplicationStatus;
-import org.testng.annotations.Test;
-
-import static junit.framework.Assert.assertEquals;
-import static junit.framework.Assert.assertTrue;
-
-/**
- * This will handle the application bursting test cases
- */
-public class ApplicationBurstingTest extends StratosTestServerManager {
-    private static final Log log = LogFactory.getLog(SampleApplicationsTest.class);
-    private static final String RESOURCES_PATH = "/application-bursting-test";
-
-
-    @Test
-    public void testApplicationBusting() {
-        try {
-            log.info("----------------------------Started application Bursting test case----------------------------");
-
-            String autoscalingPolicyId = "autoscaling-policy-application-bursting-test";
-
-            boolean addedScalingPolicy =
-                    restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.AUTOSCALING_POLICIES_PATH
-                                    + "/" + autoscalingPolicyId + ".json",
-                            RestConstants.AUTOSCALING_POLICIES, RestConstants.AUTOSCALING_POLICIES_NAME);
-            assertEquals(addedScalingPolicy, true);
-
-            boolean addedC1 = restClientTenant1.addEntity(
-                    RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "esb-application-bursting-test.json",
-                    RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
-            assertEquals(addedC1, true);
-
-            boolean addedC2 = restClientTenant1.addEntity(
-                    RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "php-application-bursting-test.json",
-                    RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
-            assertEquals(addedC2, true);
-
-            boolean addedC3 = restClientTenant1.addEntity(
-                    RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "tomcat-application-bursting-test.json",
-                    RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
-            assertEquals(addedC3, true);
-
-            boolean addedG1 = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGE_GROUPS_PATH +
-                            "/" + "esb-php-group-application-bursting-test.json", RestConstants.CARTRIDGE_GROUPS,
-                    RestConstants.CARTRIDGE_GROUPS_NAME);
-            assertEquals(addedG1, true);
-
-            CartridgeGroupBean beanG1 = (CartridgeGroupBean) restClientTenant1.
-                    getEntity(RestConstants.CARTRIDGE_GROUPS, "esb-php-group-application-bursting-test",
-                            CartridgeGroupBean.class, RestConstants.CARTRIDGE_GROUPS_NAME);
-            assertEquals(beanG1.getName(), "esb-php-group-application-bursting-test");
-
-            boolean addedN1 = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
-                            "network-partition-application-bursting-test-1.json",
-                    RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
-            assertEquals(addedN1, true);
-
-            boolean addedN2 = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
-                            "network-partition-application-bursting-test-2.json",
-                    RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
-            assertEquals(addedN2, true);
-
-            boolean addedDep =
-                    restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.DEPLOYMENT_POLICIES_PATH + "/" +
-                                    "deployment-policy-application-bursting-test.json",
-                            RestConstants.DEPLOYMENT_POLICIES, RestConstants.DEPLOYMENT_POLICIES_NAME);
-            assertEquals(addedDep, true);
-
-            boolean added = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.APPLICATIONS_PATH + "/" +
-                            "app-bursting-single-cartriddge-group.json", RestConstants.APPLICATIONS,
-                    RestConstants.APPLICATIONS_NAME);
-            assertEquals(added, true);
-
-            ApplicationBean bean = (ApplicationBean) restClientTenant1.getEntity(RestConstants.APPLICATIONS,
-                    "application-bursting-test", ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
-            assertEquals(bean.getApplicationId(), "application-bursting-test");
-
-            boolean addAppPolicy =
-                    restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.APPLICATION_POLICIES_PATH + "/" +
-                                    "application-policy-application-bursting-test.json",
-                            RestConstants.APPLICATION_POLICIES,
-                            RestConstants.APPLICATION_POLICIES_NAME);
-            assertEquals(addAppPolicy, true);
-
-            ApplicationPolicyBean policyBean = (ApplicationPolicyBean) restClientTenant1.getEntity(
-                    RestConstants.APPLICATION_POLICIES,
-                    "application-policy-application-bursting-test", ApplicationPolicyBean.class,
-                    RestConstants.APPLICATION_POLICIES_NAME);
-
-            //deploy the application
-            String resourcePath = RestConstants.APPLICATIONS + "/" + "application-bursting-test" +
-                    RestConstants.APPLICATIONS_DEPLOY + "/" + "application-policy-application-bursting-test";
-            boolean deployed = restClientTenant1.deployEntity(resourcePath,
-                    RestConstants.APPLICATIONS_NAME);
-            assertEquals(deployed, true);
-
-            //Application active handling
-            TopologyHandler.getInstance().assertApplicationStatus(bean.getApplicationId(),
-                    ApplicationStatus.Active, tenant1Id);
-
-            //Group active handling
-            TopologyHandler.getInstance().assertGroupActivation(bean.getApplicationId(), tenant1Id);
-
-            //Cluster active handling
-            TopologyHandler.getInstance().assertClusterActivation(bean.getApplicationId(), tenant1Id);
-
-            boolean removedGroup = restClientTenant1
-                    .removeEntity(RestConstants.CARTRIDGE_GROUPS, "esb-php-group-application-bursting-test",
-                            RestConstants.CARTRIDGE_GROUPS_NAME);
-            assertEquals(removedGroup, false);
-
-            boolean removedAuto = restClientTenant1.removeEntity(RestConstants.AUTOSCALING_POLICIES,
-                    autoscalingPolicyId, RestConstants.AUTOSCALING_POLICIES_NAME);
-            assertEquals(removedAuto, false);
-
-            boolean removedNet = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
-                    "network-partition-application-bursting-test-1",
-                    RestConstants.NETWORK_PARTITIONS_NAME);
-            //Trying to remove the used network partition
-            assertEquals(removedNet, false);
-
-            boolean removedDep = restClientTenant1.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
-                    "deployment-policy-application-bursting-test", RestConstants.DEPLOYMENT_POLICIES_NAME);
-            assertEquals(removedDep, false);
-
-            //Un-deploying the application
-            String resourcePathUndeploy = RestConstants.APPLICATIONS + "/" + "application-bursting-test" +
-                    RestConstants.APPLICATIONS_UNDEPLOY;
-
-            boolean unDeployed = restClientTenant1.undeployEntity(resourcePathUndeploy,
-                    RestConstants.APPLICATIONS_NAME);
-            assertEquals(unDeployed, true);
-
-            boolean undeploy = TopologyHandler.getInstance().assertApplicationUndeploy("application-bursting-test",
-                    tenant1Id);
-            if (!undeploy) {
-                //Need to forcefully undeploy the application
-                log.info("Force undeployment is going to start for the [application] " + "application-bursting-test");
-
-                restClientTenant1.undeployEntity(RestConstants.APPLICATIONS + "/" + "application-bursting-test" +
-                        RestConstants.APPLICATIONS_UNDEPLOY + "?force=true", RestConstants.APPLICATIONS);
-
-                boolean forceUndeployed = TopologyHandler.getInstance().assertApplicationUndeploy(
-                        "application-bursting-test", tenant1Id);
-                assertEquals(String.format("Forceful undeployment failed for the application %s",
-                        "application-bursting-test"), forceUndeployed, true);
-
-            }
-
-            boolean removed = restClientTenant1.removeEntity(RestConstants.APPLICATIONS, "application-bursting-test",
-                    RestConstants.APPLICATIONS_NAME);
-            assertEquals(removed, true);
-
-            ApplicationBean beanRemoved = (ApplicationBean) restClientTenant1.getEntity(RestConstants.APPLICATIONS,
-                    "application-bursting-test", ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
-            assertEquals(beanRemoved, null);
-
-            removedGroup = restClientTenant1
-                    .removeEntity(RestConstants.CARTRIDGE_GROUPS, "esb-php-group-application-bursting-test",
-                            RestConstants.CARTRIDGE_GROUPS_NAME);
-            assertEquals(removedGroup, true);
-
-            boolean removedC1 =
-                    restClientTenant1.removeEntity(RestConstants.CARTRIDGES, "esb-application-bursting-test",
-                            RestConstants.CARTRIDGES_NAME);
-            assertEquals(removedC1, true);
-
-            boolean removedC2 =
-                    restClientTenant1.removeEntity(RestConstants.CARTRIDGES, "php-application-bursting-test",
-                            RestConstants.CARTRIDGES_NAME);
-            assertEquals(removedC2, true);
-
-            boolean removedC3 =
-                    restClientTenant1.removeEntity(RestConstants.CARTRIDGES, "tomcat-application-bursting-test",
-                            RestConstants.CARTRIDGES_NAME);
-            assertEquals(removedC3, true);
-
-            removedAuto = restClientTenant1.removeEntity(RestConstants.AUTOSCALING_POLICIES,
-                    autoscalingPolicyId, RestConstants.AUTOSCALING_POLICIES_NAME);
-            assertEquals(removedAuto, true);
-
-            removedDep = restClientTenant1.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
-                    "deployment-policy-application-bursting-test", RestConstants.DEPLOYMENT_POLICIES_NAME);
-            assertEquals(removedDep, true);
-
-            removedNet = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
-                    "network-partition-application-bursting-test-1", RestConstants.NETWORK_PARTITIONS_NAME);
-            assertEquals(removedNet, false);
-
-            boolean removedN2 = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
-                    "network-partition-application-bursting-test-2", RestConstants.NETWORK_PARTITIONS_NAME);
-            assertEquals(removedN2, false);
-
-            boolean removeAppPolicy = restClientTenant1.removeEntity(RestConstants.APPLICATION_POLICIES,
-                    "application-policy-application-bursting-test", RestConstants.APPLICATION_POLICIES_NAME);
-            assertEquals(removeAppPolicy, true);
-
-            removedNet = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
-                    "network-partition-application-bursting-test-1", RestConstants.NETWORK_PARTITIONS_NAME);
-            assertEquals(removedNet, true);
-
-            removedN2 = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
-                    "network-partition-application-bursting-test-2", RestConstants.NETWORK_PARTITIONS_NAME);
-            assertEquals(removedN2, true);
-
-            log.info("----------------------------Ended application bursting test case----------------------------");
-
-        }
-        catch (Exception e) {
-            log.error("An error occurred while handling  application bursting", e);
-            assertTrue("An error occurred while handling  application bursting", false);
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/ApplicationUpdateTest.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/ApplicationUpdateTest.java b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/ApplicationUpdateTest.java
deleted file mode 100644
index 9ba62f6..0000000
--- a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/ApplicationUpdateTest.java
+++ /dev/null
@@ -1,261 +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.integration.tests.application;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.common.beans.application.ApplicationBean;
-import org.apache.stratos.common.beans.cartridge.CartridgeGroupBean;
-import org.apache.stratos.common.beans.policy.deployment.ApplicationPolicyBean;
-import org.apache.stratos.integration.tests.RestConstants;
-import org.apache.stratos.integration.tests.StratosTestServerManager;
-import org.apache.stratos.integration.tests.TopologyHandler;
-import org.apache.stratos.integration.tests.rest.RestClient;
-import org.apache.stratos.messaging.domain.application.ApplicationStatus;
-import org.testng.annotations.Test;
-
-import static junit.framework.Assert.assertEquals;
-import static junit.framework.Assert.assertTrue;
-
-/**
- * Sample application tests with application add, .
- */
-public class ApplicationUpdateTest extends StratosTestServerManager {
-    private static final Log log = LogFactory.getLog(ApplicationUpdateTest.class);
-    private static final String RESOURCES_PATH = "/application-update-test";
-
-    @Test
-    public void testDeployApplication() {
-        try {
-
-            String autoscalingPolicyId = "autoscaling-policy-application-update-test";
-            String applicationId="g-sc-G123-1-application-update-test";
-
-            testApplicationRuntimeForTenant(restClientTenant1,tenant1Id,autoscalingPolicyId)  ;
-
-            TopologyHandler.getInstance().assertApplicationForNonAvailability(applicationId,tenant2Id);
-
-            //Updating application
-            boolean updated = restClientTenant1.updateEntity(RESOURCES_PATH + RestConstants.APPLICATIONS_PATH + "/" +
-                            "g-sc-G123-1-application-update-test-v1.json", RestConstants.APPLICATIONS,
-                    RestConstants.APPLICATIONS_NAME);
-            assertEquals(updated, true);
-
-            TopologyHandler.getInstance().assertGroupInstanceCount(applicationId, "group3-application-update-test", 1, tenant1Id);
-
-            TopologyHandler.getInstance().assertClusterMinMemberCount(applicationId, 1, tenant1Id);
-
-            ApplicationBean updatedBean = (ApplicationBean) restClientTenant1.getEntity(RestConstants.APPLICATIONS,
-                    "g-sc-G123-1-application-update-test", ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
-            assertEquals(updatedBean.getApplicationId(), "g-sc-G123-1-application-update-test");
-
-            TopologyHandler.getInstance().assertApplicationForNonAvailability(applicationId,tenant2Id);
-
-            boolean removedGroup = restClientTenant1.removeEntity(RestConstants.CARTRIDGE_GROUPS, "G1-application-update-test",
-                    RestConstants.CARTRIDGE_GROUPS_NAME);
-            assertEquals(removedGroup, false);
-
-            boolean removedAuto = restClientTenant1.removeEntity(RestConstants.AUTOSCALING_POLICIES,
-                    autoscalingPolicyId, RestConstants.AUTOSCALING_POLICIES_NAME);
-            assertEquals(removedAuto, false);
-
-            boolean removedNet = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
-                    "network-partition-application-update-test-1",
-                    RestConstants.NETWORK_PARTITIONS_NAME);
-            //Trying to remove the used network partition
-            assertEquals(removedNet, false);
-
-            boolean removedDep = restClientTenant1.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
-                    "deployment-policy-application-update-test", RestConstants.DEPLOYMENT_POLICIES_NAME);
-            assertEquals(removedDep, false);
-
-            testApplicationRuntimeForTenant(restClientTenant2,tenant2Id,autoscalingPolicyId);
-
-            testApplicationUndeplymentForTenant(restClientTenant1,tenant1Id,autoscalingPolicyId);
-
-            TopologyHandler.getInstance().assertApplicationForNonAvailability(applicationId,tenant1Id);
-
-            testApplicationUndeplymentForTenant(restClientTenant2,tenant2Id,autoscalingPolicyId);
-
-            log.info("-------------------------Ended application runtime update test case-------------------------");
-
-        } catch (Exception e) {
-            log.error("An error occurred while handling application deployment/undeployment and update", e);
-            assertTrue("An error occurred while handling application deployment/undeployment and update", false);
-        }
-    }
-
-    private void testApplicationRuntimeForTenant(RestClient restClientTenant,int tenantId, String autoscalingPolicyId ){
-
-        boolean addedScalingPolicy = restClientTenant.addEntity(RESOURCES_PATH + RestConstants.AUTOSCALING_POLICIES_PATH
-                        + "/" + autoscalingPolicyId + ".json",
-                RestConstants.AUTOSCALING_POLICIES, RestConstants.AUTOSCALING_POLICIES_NAME);
-        assertEquals(addedScalingPolicy, true);
-
-        boolean addedC1 = restClientTenant.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "c1-application-update-test.json",
-                RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
-        assertEquals(addedC1, true);
-
-        boolean addedC2 = restClientTenant.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "c2-application-update-test.json",
-                RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
-        assertEquals(addedC2, true);
-
-        boolean addedC3 = restClientTenant.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "c3-application-update-test.json",
-                RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
-        assertEquals(addedC3, true);
-
-        boolean addedG1 = restClientTenant.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGE_GROUPS_PATH +
-                        "/" + "cartrdige-nested-application-update-test.json", RestConstants.CARTRIDGE_GROUPS,
-                RestConstants.CARTRIDGE_GROUPS_NAME);
-        assertEquals(addedG1, true);
-
-        CartridgeGroupBean beanG1 = (CartridgeGroupBean) restClientTenant.
-                getEntity(RestConstants.CARTRIDGE_GROUPS, "G1-application-update-test",
-                        CartridgeGroupBean.class, RestConstants.CARTRIDGE_GROUPS_NAME);
-        assertEquals(beanG1.getName(), "G1-application-update-test");
-
-        boolean addedN1 = restClientTenant.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
-                        "network-partition-application-update-test-1.json",
-                RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
-        assertEquals(addedN1, true);
-
-        boolean addedN2 = restClientTenant.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
-                        "network-partition-application-update-test-2.json",
-                RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
-        assertEquals(addedN2, true);
-
-        boolean addedDep = restClientTenant.addEntity(RESOURCES_PATH + RestConstants.DEPLOYMENT_POLICIES_PATH + "/" +
-                        "deployment-policy-application-update-test.json",
-                RestConstants.DEPLOYMENT_POLICIES, RestConstants.DEPLOYMENT_POLICIES_NAME);
-        assertEquals(addedDep, true);
-
-        boolean added = restClientTenant.addEntity(RESOURCES_PATH + RestConstants.APPLICATIONS_PATH + "/" +
-                        "g-sc-G123-1-application-update-test.json", RestConstants.APPLICATIONS,
-                RestConstants.APPLICATIONS_NAME);
-        assertEquals(added, true);
-
-        ApplicationBean bean = (ApplicationBean) restClientTenant.getEntity(RestConstants.APPLICATIONS,
-                "g-sc-G123-1-application-update-test", ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
-        assertEquals(bean.getApplicationId(), "g-sc-G123-1-application-update-test");
-
-        boolean addAppPolicy = restClientTenant.addEntity(RESOURCES_PATH + RestConstants.APPLICATION_POLICIES_PATH + "/" +
-                        "application-policy-application-update-test.json", RestConstants.APPLICATION_POLICIES,
-                RestConstants.APPLICATION_POLICIES_NAME);
-        assertEquals(addAppPolicy, true);
-
-        ApplicationPolicyBean policyBean = (ApplicationPolicyBean) restClientTenant.getEntity(
-                RestConstants.APPLICATION_POLICIES,
-                "application-policy-application-update-test", ApplicationPolicyBean.class,
-                RestConstants.APPLICATION_POLICIES_NAME);
-
-        //deploy the application
-        String resourcePath = RestConstants.APPLICATIONS + "/" + "g-sc-G123-1-application-update-test" +
-                RestConstants.APPLICATIONS_DEPLOY + "/" + "application-policy-application-update-test";
-        boolean deployed = restClientTenant.deployEntity(resourcePath,
-                RestConstants.APPLICATIONS_NAME);
-        assertEquals(deployed, true);
-
-        //Application active handling
-        TopologyHandler.getInstance().assertApplicationStatus(bean.getApplicationId(),
-                ApplicationStatus.Active, tenantId);
-
-        //Group active handling
-        TopologyHandler.getInstance().assertGroupActivation(bean.getApplicationId(), tenantId);
-
-        //Cluster active handling
-        TopologyHandler.getInstance().assertClusterActivation(bean.getApplicationId(), tenantId);
-    }
-
-    private void testApplicationUndeplymentForTenant(RestClient restClientTenant,int tenantId,String autoscalingPolicyId){
-
-        String resourcePathUndeploy = RestConstants.APPLICATIONS + "/" + "g-sc-G123-1-application-update-test" +
-                RestConstants.APPLICATIONS_UNDEPLOY;
-
-        boolean unDeployed = restClientTenant.undeployEntity(resourcePathUndeploy,
-                RestConstants.APPLICATIONS_NAME);
-        assertEquals(unDeployed, true);
-
-        boolean undeploy = TopologyHandler.getInstance().assertApplicationUndeploy("g-sc-G123-1-application-update-test", tenantId);
-        if (!undeploy) {
-            //Need to forcefully undeploy the application
-            log.info("Force undeployment is going to start for the [application] " + "g-sc-G123-1-application-update-test");
-
-            restClientTenant.undeployEntity(RestConstants.APPLICATIONS + "/" + "g-sc-G123-1-application-update-test" +
-                    RestConstants.APPLICATIONS_UNDEPLOY + "?force=true", RestConstants.APPLICATIONS);
-
-            boolean forceUndeployed = TopologyHandler.getInstance().assertApplicationUndeploy("g-sc-G123-1-application-update-test", tenantId);
-            assertEquals(String.format("Forceful undeployment failed for the application %s",
-                    "g-sc-G123-1-application-update-test"), forceUndeployed, true);
-
-        }
-
-        boolean removed = restClientTenant.removeEntity(RestConstants.APPLICATIONS, "g-sc-G123-1-application-update-test",
-                RestConstants.APPLICATIONS_NAME);
-        assertEquals(removed, true);
-
-        ApplicationBean beanRemoved = (ApplicationBean) restClientTenant.getEntity(RestConstants.APPLICATIONS,
-                "g-sc-G123-1-application-update-test", ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
-        assertEquals(beanRemoved, null);
-
-        boolean removedGroup = restClientTenant.removeEntity(RestConstants.CARTRIDGE_GROUPS, "G1-application-update-test",
-                RestConstants.CARTRIDGE_GROUPS_NAME);
-        assertEquals(removedGroup, true);
-
-        boolean removedC1 = restClientTenant.removeEntity(RestConstants.CARTRIDGES, "c1-application-update-test",
-                RestConstants.CARTRIDGES_NAME);
-        assertEquals(removedC1, true);
-
-        boolean removedC2 = restClientTenant.removeEntity(RestConstants.CARTRIDGES, "c2-application-update-test",
-                RestConstants.CARTRIDGES_NAME);
-        assertEquals(removedC2, true);
-
-        boolean removedC3 = restClientTenant.removeEntity(RestConstants.CARTRIDGES, "c3-application-update-test",
-                RestConstants.CARTRIDGES_NAME);
-        assertEquals(removedC3, true);
-
-        boolean removedAuto = restClientTenant.removeEntity(RestConstants.AUTOSCALING_POLICIES,
-                autoscalingPolicyId, RestConstants.AUTOSCALING_POLICIES_NAME);
-        assertEquals(removedAuto, true);
-
-        boolean removedDep = restClientTenant.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
-                "deployment-policy-application-update-test", RestConstants.DEPLOYMENT_POLICIES_NAME);
-        assertEquals(removedDep, true);
-
-        boolean removedNet = restClientTenant.removeEntity(RestConstants.NETWORK_PARTITIONS,
-                "network-partition-application-update-test-1", RestConstants.NETWORK_PARTITIONS_NAME);
-        assertEquals(removedNet, false);
-
-        boolean removedN2 = restClientTenant.removeEntity(RestConstants.NETWORK_PARTITIONS,
-                "network-partition-application-update-test-2", RestConstants.NETWORK_PARTITIONS_NAME);
-        assertEquals(removedN2, false);
-
-        boolean removeAppPolicy = restClientTenant.removeEntity(RestConstants.APPLICATION_POLICIES,
-                "application-policy-application-update-test", RestConstants.APPLICATION_POLICIES_NAME);
-        assertEquals(removeAppPolicy, true);
-
-        removedNet = restClientTenant.removeEntity(RestConstants.NETWORK_PARTITIONS,
-                "network-partition-application-update-test-1", RestConstants.NETWORK_PARTITIONS_NAME);
-        assertEquals(removedNet, true);
-
-        removedN2 = restClientTenant.removeEntity(RestConstants.NETWORK_PARTITIONS,
-                "network-partition-application-update-test-2", RestConstants.NETWORK_PARTITIONS_NAME);
-        assertEquals(removedN2, true);
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/GroupStartupOrderTest.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/GroupStartupOrderTest.java b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/GroupStartupOrderTest.java
deleted file mode 100644
index 07af23d..0000000
--- a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/GroupStartupOrderTest.java
+++ /dev/null
@@ -1,260 +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.integration.tests.application;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.common.beans.application.ApplicationBean;
-import org.apache.stratos.common.beans.cartridge.CartridgeGroupBean;
-import org.apache.stratos.common.beans.policy.deployment.ApplicationPolicyBean;
-import org.apache.stratos.integration.tests.RestConstants;
-import org.apache.stratos.integration.tests.StratosTestServerManager;
-import org.apache.stratos.integration.tests.TopologyHandler;
-import org.apache.stratos.messaging.domain.application.ApplicationStatus;
-import org.testng.annotations.Test;
-
-
-import static junit.framework.Assert.assertEquals;
-import static junit.framework.Assert.assertTrue;
-
-
-
-
-/**
- * Handling the startup order of the group
- */
-public class GroupStartupOrderTest extends StratosTestServerManager {
-    private static final Log log = LogFactory.getLog(SampleApplicationsTest.class);
-    private static final String RESOURCES_PATH = "/application-bursting-test";
-
-    @Test
-    public void testApplicationBusting() {
-        try {
-            log.info("-------------------------------Started application Bursting test case-------------------------------");
-
-            String autoscalingPolicyId = "autoscaling-policy-application-bursting-test";
-
-            boolean addedScalingPolicy = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.AUTOSCALING_POLICIES_PATH
-                            + "/" + autoscalingPolicyId + ".json",
-                    RestConstants.AUTOSCALING_POLICIES, RestConstants.AUTOSCALING_POLICIES_NAME);
-            assertEquals(addedScalingPolicy, true);
-
-            boolean addedC1 = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "esb-application-bursting-test.json",
-                    RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
-            assertEquals(addedC1, true);
-
-            boolean addedC2 = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "php-application-bursting-test.json",
-                    RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
-            assertEquals(addedC2, true);
-
-            boolean addedC3 = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "tomcat-application-bursting-test.json",
-                    RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
-            assertEquals(addedC3, true);
-
-
-            boolean addedC5 = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "tomcat1-group-startup-order-test.json",
-                    RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
-            assertTrue(addedC5);
-
-            boolean addedC6 = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "tomcat2-group-startup-order-test.json",
-                    RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
-            assertTrue(addedC6);
-
-            boolean addedC7 = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "tomcat3-group-startup-order-test.json",
-                    RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
-            assertTrue(addedC7);
-
-            boolean addedC8 = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "tomcat-group-startup-order-test.json",
-                    RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
-            assertTrue(addedC8);
-
-            boolean addedG1 = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGE_GROUPS_PATH +
-                            "/" + "esb-php-group-startup-order-test.json", RestConstants.CARTRIDGE_GROUPS,
-                    RestConstants.CARTRIDGE_GROUPS_NAME);
-            assertEquals(addedG1, true);
-
-            CartridgeGroupBean beanG1 = (CartridgeGroupBean) restClientTenant1.
-                    getEntity(RestConstants.CARTRIDGE_GROUPS, "esb-php-group-application-bursting-test",
-                            CartridgeGroupBean.class, RestConstants.CARTRIDGE_GROUPS_NAME);
-            assertEquals(beanG1.getName(), "esb-php-group-application-bursting-test");
-
-            boolean addedG2 = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGE_GROUPS_PATH +
-                            "/" + "group6-group-startup-order-test.json", RestConstants.CARTRIDGE_GROUPS,
-                    RestConstants.CARTRIDGE_GROUPS_NAME);
-            assertTrue(addedG2);
-
-            boolean addedG3 = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGE_GROUPS_PATH +
-                            "/" + "group8-group-startup-order-test.json", RestConstants.CARTRIDGE_GROUPS,
-                    RestConstants.CARTRIDGE_GROUPS_NAME);
-            assertTrue(addedG3);
-
-            boolean addedN1 = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
-                            "network-partition-application-bursting-test-1.json",
-                    RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
-            assertEquals(addedN1, true);
-
-
-            boolean addedN2 = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
-                            "network-partition-application-bursting-test-2.json",
-                    RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
-            assertEquals(addedN2, true);
-
-            boolean addedDep = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.DEPLOYMENT_POLICIES_PATH + "/" +
-                            "deployment-policy-application-bursting-test.json",
-                    RestConstants.DEPLOYMENT_POLICIES, RestConstants.DEPLOYMENT_POLICIES_NAME);
-            assertEquals(addedDep, true);
-
-            boolean added = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.APPLICATIONS_PATH + "/" +
-                            "app-bursting-single-cartriddge-group.json", RestConstants.APPLICATIONS,
-                    RestConstants.APPLICATIONS_NAME);
-            assertEquals(added, true);
-
-            ApplicationBean bean = (ApplicationBean) restClientTenant1.getEntity(RestConstants.APPLICATIONS,
-                    "application-bursting-test", ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
-            assertEquals(bean.getApplicationId(), "application-bursting-test");
-
-            boolean addAppPolicy = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.APPLICATION_POLICIES_PATH + "/" +
-                            "application-policy-application-bursting-test.json", RestConstants.APPLICATION_POLICIES,
-                    RestConstants.APPLICATION_POLICIES_NAME);
-            assertEquals(addAppPolicy, true);
-
-            ApplicationPolicyBean policyBean = (ApplicationPolicyBean) restClientTenant1.getEntity(
-                    RestConstants.APPLICATION_POLICIES,
-                    "application-policy-application-bursting-test", ApplicationPolicyBean.class,
-                    RestConstants.APPLICATION_POLICIES_NAME);
-
-            //deploy the application
-            String resourcePath = RestConstants.APPLICATIONS + "/" + "application-bursting-test" +
-                    RestConstants.APPLICATIONS_DEPLOY + "/" + "application-policy-application-bursting-test";
-            boolean deployed = restClientTenant1.deployEntity(resourcePath,
-                    RestConstants.APPLICATIONS_NAME);
-            assertEquals(deployed, true);
-
-            //Application active handling
-            TopologyHandler.getInstance().assertApplicationStatus(bean.getApplicationId(),
-                    ApplicationStatus.Active, tenant1Id);
-
-            TopologyHandler.getInstance().assertApplicationForNonAvailability(bean.getApplicationId(),tenant2Id);
-
-            //Group active handling
-            TopologyHandler.getInstance().assertGroupActivation(bean.getApplicationId(), tenant1Id);
-
-            //Cluster active handling
-            TopologyHandler.getInstance().assertClusterActivation(bean.getApplicationId(), tenant1Id);
-
-            boolean removedGroup = restClientTenant1.removeEntity(RestConstants.CARTRIDGE_GROUPS, "esb-php-group-application-bursting-test",
-                    RestConstants.CARTRIDGE_GROUPS_NAME);
-            assertEquals(removedGroup, false);
-
-            boolean removedAuto = restClientTenant1.removeEntity(RestConstants.AUTOSCALING_POLICIES,
-                    autoscalingPolicyId, RestConstants.AUTOSCALING_POLICIES_NAME);
-            assertEquals(removedAuto, false);
-
-            boolean removedNet = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
-                    "network-partition-application-bursting-test-1",
-                    RestConstants.NETWORK_PARTITIONS_NAME);
-            //Trying to remove the used network partition
-            assertEquals(removedNet, false);
-
-            boolean removedDep = restClientTenant1.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
-                    "deployment-policy-application-bursting-test", RestConstants.DEPLOYMENT_POLICIES_NAME);
-            assertEquals(removedDep, false);
-
-            //Un-deploying the application
-            String resourcePathUndeploy = RestConstants.APPLICATIONS + "/" + "application-bursting-test" +
-                    RestConstants.APPLICATIONS_UNDEPLOY;
-
-            boolean unDeployed = restClientTenant1.undeployEntity(resourcePathUndeploy,
-                    RestConstants.APPLICATIONS_NAME);
-            assertEquals(unDeployed, true);
-
-            boolean undeploy = TopologyHandler.getInstance().assertApplicationUndeploy("application-bursting-test", tenant1Id);
-            if (!undeploy) {
-                //Need to forcefully undeploy the application
-                log.info("Force undeployment is going to start for the [application] " + "application-bursting-test");
-
-                restClientTenant1.undeployEntity(RestConstants.APPLICATIONS + "/" + "application-bursting-test" +
-                        RestConstants.APPLICATIONS_UNDEPLOY + "?force=true", RestConstants.APPLICATIONS);
-
-                boolean forceUndeployed = TopologyHandler.getInstance().assertApplicationUndeploy("application-bursting-test", tenant1Id);
-                assertEquals(String.format("Forceful undeployment failed for the application %s",
-                        "application-bursting-test"), forceUndeployed, true);
-
-            }
-
-            boolean removed = restClientTenant1.removeEntity(RestConstants.APPLICATIONS, "application-bursting-test",
-                    RestConstants.APPLICATIONS_NAME);
-            assertEquals(removed, true);
-
-            ApplicationBean beanRemoved = (ApplicationBean) restClientTenant1.getEntity(RestConstants.APPLICATIONS,
-                    "application-bursting-test", ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
-            assertEquals(beanRemoved, null);
-
-            removedGroup = restClientTenant1.removeEntity(RestConstants.CARTRIDGE_GROUPS, "esb-php-group-application-bursting-test",
-                    RestConstants.CARTRIDGE_GROUPS_NAME);
-            assertEquals(removedGroup, true);
-
-            boolean removedC1 = restClientTenant1.removeEntity(RestConstants.CARTRIDGES, "esb-application-bursting-test",
-                    RestConstants.CARTRIDGES_NAME);
-            assertEquals(removedC1, true);
-
-            boolean removedC2 = restClientTenant1.removeEntity(RestConstants.CARTRIDGES, "php-application-bursting-test",
-                    RestConstants.CARTRIDGES_NAME);
-            assertEquals(removedC2, true);
-
-            boolean removedC3 = restClientTenant1.removeEntity(RestConstants.CARTRIDGES, "tomcat-application-bursting-test",
-                    RestConstants.CARTRIDGES_NAME);
-            assertEquals(removedC3, true);
-
-            removedAuto = restClientTenant1.removeEntity(RestConstants.AUTOSCALING_POLICIES,
-                    autoscalingPolicyId, RestConstants.AUTOSCALING_POLICIES_NAME);
-            assertEquals(removedAuto, true);
-
-            removedDep = restClientTenant1.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
-                    "deployment-policy-application-bursting-test", RestConstants.DEPLOYMENT_POLICIES_NAME);
-            assertEquals(removedDep, true);
-
-            removedNet = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
-                    "network-partition-application-bursting-test-1", RestConstants.NETWORK_PARTITIONS_NAME);
-            assertEquals(removedNet, false);
-
-            boolean removedN2 = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
-                    "network-partition-application-bursting-test-2", RestConstants.NETWORK_PARTITIONS_NAME);
-            assertEquals(removedN2, false);
-
-            boolean removeAppPolicy = restClientTenant1.removeEntity(RestConstants.APPLICATION_POLICIES,
-                    "application-policy-application-bursting-test", RestConstants.APPLICATION_POLICIES_NAME);
-            assertEquals(removeAppPolicy, true);
-
-            removedNet = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
-                    "network-partition-application-bursting-test-1", RestConstants.NETWORK_PARTITIONS_NAME);
-            assertEquals(removedNet, true);
-
-            removedN2 = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
-                    "network-partition-application-bursting-test-2", RestConstants.NETWORK_PARTITIONS_NAME);
-            assertEquals(removedN2, true);
-
-            log.info("-------------------------------Ended application bursting test case-------------------------------");
-
-        } catch (Exception e) {
-            log.error("An error occurred while handling  application bursting", e);
-            assertTrue("An error occurred while handling  application bursting", false);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/GroupTerminationBehaviorTest.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/GroupTerminationBehaviorTest.java b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/GroupTerminationBehaviorTest.java
deleted file mode 100644
index 475ddd4..0000000
--- a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/GroupTerminationBehaviorTest.java
+++ /dev/null
@@ -1,402 +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.integration.tests.application;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.common.beans.application.ApplicationBean;
-import org.apache.stratos.common.beans.cartridge.CartridgeGroupBean;
-import org.apache.stratos.common.beans.policy.deployment.ApplicationPolicyBean;
-import org.apache.stratos.integration.tests.RestConstants;
-import org.apache.stratos.integration.tests.StratosTestServerManager;
-import org.apache.stratos.integration.tests.TopologyHandler;
-import org.apache.stratos.messaging.domain.application.Application;
-import org.apache.stratos.messaging.domain.application.ApplicationStatus;
-import org.testng.annotations.Test;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import static junit.framework.Assert.*;
-
-/**
- * Handling the termination behavior of the group
- */
-public class GroupTerminationBehaviorTest extends StratosTestServerManager {
-    private static final Log log = LogFactory.getLog(GroupTerminationBehaviorTest.class);
-    private static final String RESOURCES_PATH = "/group-termination-behavior-test";
-    private static final int GROUP_INACTIVE_TIMEOUT = 300000;
-
-    @Test
-    public void testTerminationBehavior() {
-        try {
-            log.info("-------------------------------Started application termination behavior test case-------------------------------");
-
-            String autoscalingPolicyId = "autoscaling-policy-group-termination-behavior-test";
-            TopologyHandler topologyHandler = TopologyHandler.getInstance();
-
-            boolean addedScalingPolicy = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.AUTOSCALING_POLICIES_PATH
-                            + "/" + autoscalingPolicyId + ".json",
-                    RestConstants.AUTOSCALING_POLICIES, RestConstants.AUTOSCALING_POLICIES_NAME);
-            assertTrue(addedScalingPolicy);
-
-            boolean addedC1 = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "c1-group-termination-behavior-test.json",
-                    RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
-            assertTrue(addedC1);
-
-            boolean addedC2 = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "c2-group-termination-behavior-test.json",
-                    RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
-            assertTrue(addedC2);
-
-            boolean addedC3 = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "c3-group-termination-behavior-test.json",
-                    RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
-            assertTrue(addedC3);
-
-            boolean addedC4 = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "c4-group-termination-behavior-test.json",
-                    RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
-            assertTrue(addedC4);
-
-            boolean addedG1 = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGE_GROUPS_PATH +
-                            "/" + "cartridge-groups-group-termination-behavior-test.json", RestConstants.CARTRIDGE_GROUPS,
-                    RestConstants.CARTRIDGE_GROUPS_NAME);
-            assertTrue(addedG1);
-
-            CartridgeGroupBean beanG1 = (CartridgeGroupBean) restClientTenant1.
-                    getEntity(RestConstants.CARTRIDGE_GROUPS, "g-sc-G4-group-termination-behavior-test",
-                            CartridgeGroupBean.class, RestConstants.CARTRIDGE_GROUPS_NAME);
-            assertEquals(beanG1.getName(), "g-sc-G4-group-termination-behavior-test");
-
-            boolean addedN1 = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
-                            "network-partition-group-termination-behavior-test-1.json",
-                    RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
-            assertTrue(addedN1);
-
-            boolean addedDep = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.DEPLOYMENT_POLICIES_PATH + "/" +
-                            "deployment-policy-group-termination-behavior-test.json",
-                    RestConstants.DEPLOYMENT_POLICIES, RestConstants.DEPLOYMENT_POLICIES_NAME);
-            assertTrue(addedDep);
-
-            boolean added = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.APPLICATIONS_PATH + "/" +
-                            "group-termination-behavior-test.json", RestConstants.APPLICATIONS,
-                    RestConstants.APPLICATIONS_NAME);
-            assertTrue(added);
-
-            ApplicationBean bean = (ApplicationBean) restClientTenant1.getEntity(RestConstants.APPLICATIONS,
-                    "group-termination-behavior-test", ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
-            assertEquals(bean.getApplicationId(), "group-termination-behavior-test");
-
-            boolean addAppPolicy = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.APPLICATION_POLICIES_PATH + "/" +
-                            "application-policy-group-termination-behavior-test.json", RestConstants.APPLICATION_POLICIES,
-                    RestConstants.APPLICATION_POLICIES_NAME);
-            assertTrue(addAppPolicy);
-
-            ApplicationPolicyBean policyBean = (ApplicationPolicyBean) restClientTenant1.getEntity(
-                    RestConstants.APPLICATION_POLICIES,
-                    "application-policy-group-termination-behavior-test", ApplicationPolicyBean.class,
-                    RestConstants.APPLICATION_POLICIES_NAME);
-
-            //deploy the application
-            String resourcePath = RestConstants.APPLICATIONS + "/" + "group-termination-behavior-test" +
-                    RestConstants.APPLICATIONS_DEPLOY + "/" + "application-policy-group-termination-behavior-test";
-            boolean deployed = restClientTenant1.deployEntity(resourcePath,
-                    RestConstants.APPLICATIONS_NAME);
-            assertTrue(deployed);
-
-            //Application active handling
-            topologyHandler.assertApplicationStatus(bean.getApplicationId(),
-                    ApplicationStatus.Active,tenant1Id);
-
-            Application depApplication= topologyHandler.getApplication(bean.getApplicationId(), tenant1Id);
-            String groupId = topologyHandler.generateId(depApplication.getUniqueIdentifier(),
-                    "g-G1-1x0-group-termination-behavior-test", depApplication.getUniqueIdentifier() + "-1");
-
-            String clusterIdC3 = topologyHandler.
-                    getClusterIdFromAlias(bean.getApplicationId(),
-                            "c3-1x0-group-termination-behavior-test",tenant1Id);
-
-            String clusterIdC4 = topologyHandler.
-                    getClusterIdFromAlias(bean.getApplicationId(),
-                            "c4-1x0-group-termination-behavior-test",tenant1Id);
-
-            String clusterIdC2 = topologyHandler.
-                    getClusterIdFromAlias(bean.getApplicationId(),
-                            "c2-1x0-group-termination-behavior-test",tenant1Id);
-
-            assertCreationOfNodes(groupId, clusterIdC2);
-            assertCreationOfNodes(clusterIdC3, clusterIdC4);
-
-
-            //Group active handling
-            topologyHandler.assertGroupActivation(bean.getApplicationId(),tenant1Id);
-
-            //Cluster active handling
-            topologyHandler.assertClusterActivation(bean.getApplicationId(),tenant1Id);
-
-            //Terminate one member in the cluster
-            TopologyHandler.getInstance().terminateMemberFromCluster(
-                    "c3-group-termination-behavior-test",
-                    bean.getApplicationId(),
-                    mockIaasApiClient,tenant1Id);
-
-            List<String> clusterIds = new ArrayList<String>();
-            clusterIds.add(clusterIdC3);
-            clusterIds.add(clusterIdC4);
-            clusterIds.add(clusterIdC2);
-
-
-            //Application active handling
-            topologyHandler.assertApplicationStatus(bean.getApplicationId(),
-                    ApplicationStatus.Active,tenant1Id);
-
-            assertCreationOfNodes(groupId, clusterIdC2);
-
-            assertCreationOfNodes(clusterIdC3, clusterIdC4);
-
-            //Group active handling
-            topologyHandler.assertGroupActivation(bean.getApplicationId(),tenant1Id);
-
-            //Cluster active handling
-            topologyHandler.assertClusterActivation(bean.getApplicationId(),tenant1Id);
-
-            boolean removedGroup = restClientTenant1.removeEntity(RestConstants.CARTRIDGE_GROUPS,
-                    "g-sc-G4-group-termination-behavior-test",
-                    RestConstants.CARTRIDGE_GROUPS_NAME);
-            assertFalse(removedGroup);
-
-            boolean removedAuto = restClientTenant1.removeEntity(RestConstants.AUTOSCALING_POLICIES,
-                    autoscalingPolicyId, RestConstants.AUTOSCALING_POLICIES_NAME);
-            assertFalse(removedAuto);
-
-            boolean removedNet = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
-                    "network-partition-group-termination-behavior-test-1",
-                    RestConstants.NETWORK_PARTITIONS_NAME);
-            //Trying to remove the used network partition
-            assertFalse(removedNet);
-
-            boolean removedDep = restClientTenant1.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
-                    "deployment-policy-group-termination-behavior-test", RestConstants.DEPLOYMENT_POLICIES_NAME);
-            assertFalse(removedDep);
-
-            //Un-deploying the application
-            String resourcePathUndeploy = RestConstants.APPLICATIONS + "/" + "group-termination-behavior-test" +
-                    RestConstants.APPLICATIONS_UNDEPLOY;
-
-            boolean unDeployed = restClientTenant1.undeployEntity(resourcePathUndeploy,
-                    RestConstants.APPLICATIONS_NAME);
-            assertTrue(unDeployed);
-
-            boolean undeploy = topologyHandler.assertApplicationUndeploy("group-termination-behavior-test",tenant1Id);
-            if (!undeploy) {
-                //Need to forcefully undeploy the application
-                log.info("Force undeployment is going to start for the [application] " + "group-termination-behavior-test");
-
-                restClientTenant1.undeployEntity(RestConstants.APPLICATIONS + "/" + "group-termination-behavior-test" +
-                        RestConstants.APPLICATIONS_UNDEPLOY + "?force=true", RestConstants.APPLICATIONS);
-
-                boolean forceUndeployed = topologyHandler.assertApplicationUndeploy("group-termination-behavior-test",tenant1Id);
-                assertTrue(String.format("Forceful undeployment failed for the application %s",
-                        "group-termination-behavior-test"), forceUndeployed);
-
-            }
-
-            boolean removed = restClientTenant1.removeEntity(RestConstants.APPLICATIONS, "group-termination-behavior-test",
-                    RestConstants.APPLICATIONS_NAME);
-            assertTrue(removed);
-
-            ApplicationBean beanRemoved = (ApplicationBean) restClientTenant1.getEntity(RestConstants.APPLICATIONS,
-                    "group-termination-behavior-test", ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
-            assertNull(beanRemoved);
-
-            removedGroup = restClientTenant1.removeEntity(RestConstants.CARTRIDGE_GROUPS,
-                    "g-sc-G4-group-termination-behavior-test",
-                    RestConstants.CARTRIDGE_GROUPS_NAME);
-            assertTrue(removedGroup);
-
-            boolean removedC1 = restClientTenant1.removeEntity(RestConstants.CARTRIDGES, "c1-group-termination-behavior-test",
-                    RestConstants.CARTRIDGES_NAME);
-            assertTrue(removedC1);
-
-            boolean removedC2 = restClientTenant1.removeEntity(RestConstants.CARTRIDGES, "c2-group-termination-behavior-test",
-                    RestConstants.CARTRIDGES_NAME);
-            assertTrue(removedC2);
-
-            boolean removedC3 = restClientTenant1.removeEntity(RestConstants.CARTRIDGES, "c3-group-termination-behavior-test",
-                    RestConstants.CARTRIDGES_NAME);
-            assertTrue(removedC3);
-
-            boolean removedC4 = restClientTenant1.removeEntity(RestConstants.CARTRIDGES, "c4-group-termination-behavior-test",
-                    RestConstants.CARTRIDGES_NAME);
-            assertTrue(removedC4);
-
-            removedAuto = restClientTenant1.removeEntity(RestConstants.AUTOSCALING_POLICIES,
-                    autoscalingPolicyId, RestConstants.AUTOSCALING_POLICIES_NAME);
-            assertTrue(removedAuto);
-
-            removedDep = restClientTenant1.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
-                    "deployment-policy-group-termination-behavior-test", RestConstants.DEPLOYMENT_POLICIES_NAME);
-            assertTrue(removedDep);
-
-            removedNet = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
-                    "network-partition-group-termination-behavior-test-1", RestConstants.NETWORK_PARTITIONS_NAME);
-            assertFalse(removedNet);
-
-            boolean removeAppPolicy = restClientTenant1.removeEntity(RestConstants.APPLICATION_POLICIES,
-                    "application-policy-group-termination-behavior-test", RestConstants.APPLICATION_POLICIES_NAME);
-            assertTrue(removeAppPolicy);
-
-            removedNet = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
-                    "network-partition-group-termination-behavior-test-1", RestConstants.NETWORK_PARTITIONS_NAME);
-            assertTrue(removedNet);
-
-            log.info("-------------------------------Ended application termination behavior test case-------------------------------");
-
-        } catch (Exception e) {
-            log.error("An error occurred while handling  application termination behavior", e);
-            assertTrue("An error occurred while handling  application termination behavior", false);
-        }
-    }
-
-    private void assertGroupInactive(String groupId, String clusterId) {
-        long startTime = System.currentTimeMillis();
-        Map<String, Long> inActiveMap = TopologyHandler.getInstance().getInActiveMembers();
-
-        while (!inActiveMap.containsKey(clusterId)) {
-            try {
-                Thread.sleep(1000);
-            } catch (InterruptedException ignore) {
-            }
-            inActiveMap = TopologyHandler.getInstance().getInActiveMembers();
-            if ((System.currentTimeMillis() - startTime) > GROUP_INACTIVE_TIMEOUT) {
-                break;
-            }
-        }
-        assertTrue(inActiveMap.containsKey(clusterId));
-
-        while (!inActiveMap.containsKey(groupId)) {
-            try {
-                Thread.sleep(1000);
-            } catch (InterruptedException ignore) {
-            }
-            inActiveMap = TopologyHandler.getInstance().getInActiveMembers();
-            if ((System.currentTimeMillis() - startTime) > GROUP_INACTIVE_TIMEOUT) {
-                break;
-            }
-        }
-        assertTrue(inActiveMap.containsKey(groupId));
-
-    }
-
-    private void assertTerminatingOfNodes(String groupId, List<String> clusterIds) {
-        Map<String, Long> terminatingMembers = TopologyHandler.getInstance().getTerminatingMembers();
-        for (String clusterId : clusterIds) {
-            long startTime = System.currentTimeMillis();
-            while (!terminatingMembers.containsKey(clusterId)) {
-                try {
-                    Thread.sleep(1000);
-                } catch (InterruptedException ignore) {
-                }
-                terminatingMembers = TopologyHandler.getInstance().getTerminatingMembers();
-                if ((System.currentTimeMillis() - startTime) > GROUP_INACTIVE_TIMEOUT) {
-                    break;
-                }
-            }
-            assertTrue(terminatingMembers.containsKey(groupId));
-        }
-        long startTime = System.currentTimeMillis();
-        while (!terminatingMembers.containsKey(groupId)) {
-            try {
-                Thread.sleep(1000);
-            } catch (InterruptedException ignore) {
-            }
-            terminatingMembers = TopologyHandler.getInstance().getTerminatingMembers();
-            if ((System.currentTimeMillis() - startTime) > GROUP_INACTIVE_TIMEOUT) {
-                break;
-            }
-        }
-        assertTrue(terminatingMembers.containsKey(groupId));
-
-    }
-
-    private void assertTerminationOfNodes(String groupId, List<String> clusterIds) {
-        long startTime = System.currentTimeMillis();
-        Map<String, Long> terminatedMembers = TopologyHandler.getInstance().getTerminatedMembers();
-
-        for (String clusterId : clusterIds) {
-            while (!terminatedMembers.containsKey(clusterId)) {
-                try {
-                    Thread.sleep(1000);
-                } catch (InterruptedException ignore) {
-                }
-                terminatedMembers = TopologyHandler.getInstance().getTerminatedMembers();
-                if ((System.currentTimeMillis() - startTime) > GROUP_INACTIVE_TIMEOUT) {
-                    break;
-                }
-            }
-            assertTrue(terminatedMembers.containsKey(clusterId));
-        }
-
-        while (!terminatedMembers.containsKey(groupId)) {
-            try {
-                Thread.sleep(1000);
-            } catch (InterruptedException ignore) {
-            }
-            terminatedMembers = TopologyHandler.getInstance().getTerminatedMembers();
-            if ((System.currentTimeMillis() - startTime) > GROUP_INACTIVE_TIMEOUT) {
-                break;
-            }
-        }
-
-        assertTrue(terminatedMembers.containsKey(groupId));
-    }
-
-    private void assertCreationOfNodes(String firstNodeId, String secondNodeId) {
-        //group1 started first, then cluster started later
-        long startTime = System.currentTimeMillis();
-        Map<String, Long> activeMembers = TopologyHandler.getInstance().getActivateddMembers();
-        Map<String, Long> createdMembers = TopologyHandler.getInstance().getCreatedMembers();
-        //Active member should be available at the time cluster is started to create.
-        while(!activeMembers.containsKey(firstNodeId)) {
-            try {
-                Thread.sleep(1000);
-            } catch (InterruptedException e) {
-            }
-            activeMembers = TopologyHandler.getInstance().getActivateddMembers();
-            if ((System.currentTimeMillis() - startTime) > GROUP_INACTIVE_TIMEOUT) {
-                break;
-            }
-        }
-        assertTrue(activeMembers.containsKey(firstNodeId));
-
-        while(!createdMembers.containsKey(secondNodeId)) {
-            try {
-                Thread.sleep(1000);
-            } catch (InterruptedException e) {
-            }
-            createdMembers = TopologyHandler.getInstance().getCreatedMembers();
-            if ((System.currentTimeMillis() - startTime) > GROUP_INACTIVE_TIMEOUT) {
-                break;
-            }
-        }
-
-        assertTrue(createdMembers.containsKey(secondNodeId));
-
-        assertTrue(createdMembers.get(secondNodeId) > activeMembers.get(firstNodeId));
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/PartitionOneAfterAnotherClusterTest.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/PartitionOneAfterAnotherClusterTest.java b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/PartitionOneAfterAnotherClusterTest.java
deleted file mode 100644
index 427db7d..0000000
--- a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/PartitionOneAfterAnotherClusterTest.java
+++ /dev/null
@@ -1,298 +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.integration.tests.application;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.common.beans.application.ApplicationBean;
-import org.apache.stratos.common.beans.policy.deployment.ApplicationPolicyBean;
-import org.apache.stratos.integration.tests.RestConstants;
-import org.apache.stratos.integration.tests.StratosTestServerManager;
-import org.apache.stratos.integration.tests.TopologyHandler;
-import org.apache.stratos.messaging.domain.application.Application;
-import org.apache.stratos.messaging.domain.application.ApplicationStatus;
-import org.apache.stratos.messaging.domain.application.ClusterDataHolder;
-import org.apache.stratos.messaging.domain.instance.ClusterInstance;
-import org.apache.stratos.messaging.domain.topology.Cluster;
-import org.apache.stratos.messaging.domain.topology.Member;
-import org.apache.stratos.messaging.domain.topology.Service;
-import org.apache.stratos.messaging.message.receiver.application.ApplicationManager;
-import org.apache.stratos.messaging.message.receiver.topology.TopologyManager;
-import org.testng.annotations.Test;
-
-import java.util.*;
-
-import static junit.framework.Assert.*;
-
-/**
- * This will handle the scale-up and scale-down of a particular cluster bursting test cases
- */
-public class PartitionOneAfterAnotherClusterTest extends StratosTestServerManager {
-    private static final Log log = LogFactory.getLog(SampleApplicationsTest.class);
-    private static final String RESOURCES_PATH = "/partition-round-robin-cluster-test";
-
-
-    @Test
-    public void testDeployApplication() {
-        try {
-            log.info("-------------------------------Started Partition One after another test case-------------------------------");
-
-            String autoscalingPolicyId = "autoscaling-policy-3";
-
-            boolean addedScalingPolicy = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.AUTOSCALING_POLICIES_PATH
-                            + "/" + autoscalingPolicyId + ".json",
-                    RestConstants.AUTOSCALING_POLICIES, RestConstants.AUTOSCALING_POLICIES_NAME);
-            assertEquals(addedScalingPolicy, true);
-
-            boolean addedC1 = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "c7.json",
-                    RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
-            assertEquals(addedC1, true);
-
-            boolean addedN1 = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
-                            "network-partition-11.json",
-                    RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
-            assertEquals(addedN1, true);
-
-            boolean addedDep = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.DEPLOYMENT_POLICIES_PATH + "/" +
-                            "deployment-policy-5.json",
-                    RestConstants.DEPLOYMENT_POLICIES, RestConstants.DEPLOYMENT_POLICIES_NAME);
-            assertEquals(addedDep, true);
-
-            boolean added = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.APPLICATIONS_PATH + "/" +
-                            "single-cluster-scaling-test.json", RestConstants.APPLICATIONS,
-                    RestConstants.APPLICATIONS_NAME);
-            assertEquals(added, true);
-
-            ApplicationBean bean = (ApplicationBean) restClientTenant1.getEntity(RestConstants.APPLICATIONS,
-                    "single-cluster-scaling-test", ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
-            assertEquals(bean.getApplicationId(), "single-cluster-scaling-test");
-
-            boolean addAppPolicy = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.APPLICATION_POLICIES_PATH + "/" +
-                            "application-policy-4.json", RestConstants.APPLICATION_POLICIES,
-                    RestConstants.APPLICATION_POLICIES_NAME);
-            assertEquals(addAppPolicy, true);
-
-            ApplicationPolicyBean policyBean = (ApplicationPolicyBean) restClientTenant1.getEntity(
-                    RestConstants.APPLICATION_POLICIES,
-                    "application-policy-4", ApplicationPolicyBean.class,
-                    RestConstants.APPLICATION_POLICIES_NAME);
-
-            //deploy the application
-            String resourcePath = RestConstants.APPLICATIONS + "/" + "single-cluster-scaling-test" +
-                    RestConstants.APPLICATIONS_DEPLOY + "/" + "application-policy-4";
-            boolean deployed = restClientTenant1.deployEntity(resourcePath,
-                    RestConstants.APPLICATIONS_NAME);
-            assertEquals(deployed, true);
-
-            //Application active handling
-            TopologyHandler.getInstance().assertApplicationStatus(bean.getApplicationId(),
-                    ApplicationStatus.Active, tenant1Id);
-
-            //Cluster active handling
-            TopologyHandler.getInstance().assertClusterActivation(bean.getApplicationId(), tenant1Id);
-
-            //Verifying whether members got created using round robin algorithm
-            assertClusterWithRoundRobinAlgorithm(bean.getApplicationId());
-
-            //Removing one member from cluster and check for auto healing
-
-
-            boolean removedAuto = restClientTenant1.removeEntity(RestConstants.AUTOSCALING_POLICIES,
-                    autoscalingPolicyId, RestConstants.AUTOSCALING_POLICIES_NAME);
-            assertEquals(removedAuto, false);
-
-            boolean removedNet = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
-                    "network-partition-11",
-                    RestConstants.NETWORK_PARTITIONS_NAME);
-            //Trying to remove the used network partition
-            assertEquals(removedNet, false);
-
-            boolean removedDep = restClientTenant1.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
-                    "deployment-policy-5", RestConstants.DEPLOYMENT_POLICIES_NAME);
-            assertEquals(removedDep, false);
-
-            //Un-deploying the application
-            String resourcePathUndeploy = RestConstants.APPLICATIONS + "/" + "single-cluster-scaling-test" +
-                    RestConstants.APPLICATIONS_UNDEPLOY;
-
-            boolean unDeployed = restClientTenant1.undeployEntity(resourcePathUndeploy,
-                    RestConstants.APPLICATIONS_NAME);
-            assertEquals(unDeployed, true);
-
-            boolean undeploy = TopologyHandler.getInstance().assertApplicationUndeploy("single-cluster-scaling-test", tenant1Id);
-            if (!undeploy) {
-                //Need to forcefully undeploy the application
-                log.info("Force undeployment is going to start for the [application] " + "single-cluster-scaling-test");
-
-                restClientTenant1.undeployEntity(RestConstants.APPLICATIONS + "/" + "single-cluster-scaling-test" +
-                        RestConstants.APPLICATIONS_UNDEPLOY + "?force=true", RestConstants.APPLICATIONS);
-
-                boolean forceUndeployed = TopologyHandler.getInstance().assertApplicationUndeploy("single-cluster-scaling-test", tenant1Id);
-                assertEquals(String.format("Forceful undeployment failed for the application %s",
-                        "single-cluster-scaling-test"), forceUndeployed, true);
-
-            }
-
-            boolean removed = restClientTenant1.removeEntity(RestConstants.APPLICATIONS, "single-cluster-scaling-test",
-                    RestConstants.APPLICATIONS_NAME);
-            assertEquals(removed, true);
-
-            ApplicationBean beanRemoved = (ApplicationBean) restClientTenant1.getEntity(RestConstants.APPLICATIONS,
-                    "single-cluster-scaling-test", ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
-            assertEquals(beanRemoved, null);
-
-            boolean removedC1 = restClientTenant1.removeEntity(RestConstants.CARTRIDGES, "c7",
-                    RestConstants.CARTRIDGES_NAME);
-            assertEquals(removedC1, true);
-
-
-            removedAuto = restClientTenant1.removeEntity(RestConstants.AUTOSCALING_POLICIES,
-                    autoscalingPolicyId, RestConstants.AUTOSCALING_POLICIES_NAME);
-            assertEquals(removedAuto, true);
-
-            removedDep = restClientTenant1.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
-                    "deployment-policy-5", RestConstants.DEPLOYMENT_POLICIES_NAME);
-            assertEquals(removedDep, true);
-
-            removedNet = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
-                    "network-partition-11", RestConstants.NETWORK_PARTITIONS_NAME);
-            assertEquals(removedNet, false);
-
-
-            boolean removeAppPolicy = restClientTenant1.removeEntity(RestConstants.APPLICATION_POLICIES,
-                    "application-policy-4", RestConstants.APPLICATION_POLICIES_NAME);
-            assertEquals(removeAppPolicy, true);
-
-            removedNet = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
-                    "network-partition-11", RestConstants.NETWORK_PARTITIONS_NAME);
-            assertEquals(removedNet, true);
-
-            log.info("-------------------------------Ended Partition one after another test case-------------------------------");
-
-        } catch (Exception e) {
-            log.error("An error occurred while handling  application bursting", e);
-            assertTrue("An error occurred while handling  application bursting", false);
-        }
-    }
-
-    /**
-     * Assert application activation
-     *
-     * @param applicationName
-     */
-    private void assertClusterWithRoundRobinAlgorithm(String applicationName) {
-        Application application = ApplicationManager.getApplications().getApplication(applicationName);
-        assertNotNull(String.format("Application is not found: [application-id] %s",
-                applicationName), application);
-
-        Set<ClusterDataHolder> clusterDataHolderSet = application.getClusterDataRecursively();
-        for (ClusterDataHolder clusterDataHolder : clusterDataHolderSet) {
-            String serviceName = clusterDataHolder.getServiceType();
-            String clusterId = clusterDataHolder.getClusterId();
-            Service service = TopologyManager.getTopology().getService(serviceName);
-            assertNotNull(String.format("Service is not found: [application-id] %s [service] %s",
-                    applicationName, serviceName), service);
-
-            Cluster cluster = service.getCluster(clusterId);
-            assertNotNull(String.format("Cluster is not found: [application-id] %s [service] %s [cluster-id] %s",
-                    applicationName, serviceName, clusterId), cluster);
-
-            for (ClusterInstance instance : cluster.getInstanceIdToInstanceContextMap().values()) {
-                List<String> partitionsUsedInMembers = new ArrayList<String>();
-                Map<String, List<Long>> partitionIdToMembersMap = new HashMap<String, List<Long>>();
-                for (Member member : cluster.getMembers()) {
-                    String partitionId = member.getPartitionId();
-                    if (!partitionIdToMembersMap.containsKey(partitionId)) {
-                        List<Long> members = new ArrayList<Long>();
-                        members.add(member.getInitTime());
-                        partitionIdToMembersMap.put(partitionId, members);
-                    } else {
-                        partitionIdToMembersMap.get(partitionId).add(member.getInitTime());
-                    }
-                    if (!partitionsUsedInMembers.contains(partitionId)) {
-                        partitionsUsedInMembers.add(partitionId);
-                    }
-                }
-                String p1 = "network-partition-11-partition-1";
-                String p2 = "network-partition-11-partition-2";
-                List<Long> p1InitTime = partitionIdToMembersMap.get(p1);
-                Collections.sort(p1InitTime);
-
-                List<Long> p2InitTime = partitionIdToMembersMap.get(p2);
-                Collections.sort(p2InitTime);
-
-                List<Long> allInitTime = new ArrayList<Long>();
-                allInitTime.addAll(p1InitTime);
-                allInitTime.addAll(p2InitTime);
-                Collections.sort(allInitTime);
-
-                int p1Index = -1;
-                int p2Index = -1;
-                String previousPartition = null;
-                for (int i = 0; i < allInitTime.size(); i++) {
-                    if (previousPartition == null) {
-                        if (p1InitTime.get(0) == allInitTime.get(i)) {
-                            previousPartition = p1;
-                            p1Index++;
-                        } else if (p2InitTime.get(0) == allInitTime.get(i)) {
-                            previousPartition = p2;
-                            p2Index++;
-
-                        }
-                    } else if (previousPartition.equals(p1)) {
-                        p2Index++;
-                        previousPartition = p2;
-                        assertEquals("Partition-2 doesn't not contain correct values in current " +
-                                "iteration", allInitTime.get(i), p2InitTime.get(p2Index));
-                        if (p1Index >= 0) {
-                            assertEquals("Partition-1 doesn't not contain correct values in the " +
-                                    "previous iteration", allInitTime.get(i - 1), p1InitTime.get(p1Index));
-                            if (p1Index + 1 <= (p1InitTime.size() - 1) && i + 1 <= (allInitTime.size() - 1)) {
-                                assertEquals("Partition-1 doesn't not contain correct " +
-                                                "values in the next iteration",
-                                        allInitTime.get(i + 1), p1InitTime.get(p1Index + 1));
-
-                            }
-                        }
-                    } else {
-                        p1Index++;
-                        previousPartition = p1;
-                        assertEquals("Partition-1 doesn't not contain correct values in current " +
-                                "iteration", allInitTime.get(i), p1InitTime.get(p1Index));
-                        if (p2Index >= 0) {
-                            assertEquals("Partition-2 doesn't not contain correct values  " +
-                                    "in the previous iteration", allInitTime.get(i - 1), p2InitTime.get(p2Index));
-                            if ((p2Index + 1) <= (p2InitTime.size() - 1) && (i + 1) <= (allInitTime.size() - 1)) {
-                                assertEquals("Partition-2 doesn't not contain correct values  " +
-                                                "in the next iteration",
-                                        allInitTime.get(i + 1), p2InitTime.get(p2Index + 1));
-                            }
-                        }
-                    }
-
-                }
-
-
-            }
-
-        }
-
-
-    }
-}


[10/21] stratos git commit: Uplifting automation engine to v4.4.3, dynamically pick ports for integration tests

Posted by ra...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/group-termination-behavior-test/application-policies/application-policy-group-termination-behavior-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/group-termination-behavior-test/application-policies/application-policy-group-termination-behavior-test.json b/products/stratos/modules/integration/src/test/resources/group-termination-behavior-test/application-policies/application-policy-group-termination-behavior-test.json
deleted file mode 100644
index 15e757b..0000000
--- a/products/stratos/modules/integration/src/test/resources/group-termination-behavior-test/application-policies/application-policy-group-termination-behavior-test.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{
-    "id": "application-policy-group-termination-behavior-test",
-    "algorithm": "one-after-another",
-    "networkPartitions": [
-        "network-partition-group-termination-behavior-test-1"
-    ],
-    "properties": [
-        {
-            "name": "networkPartitionGroups",
-            "value": "network-partition-group-termination-behavior-test-1"
-        },
-        {
-            "name": "key-2",
-            "value": "value-2"
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/group-termination-behavior-test/applications/group-termination-behavior-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/group-termination-behavior-test/applications/group-termination-behavior-test.json b/products/stratos/modules/integration/src/test/resources/group-termination-behavior-test/applications/group-termination-behavior-test.json
deleted file mode 100644
index 70432ae..0000000
--- a/products/stratos/modules/integration/src/test/resources/group-termination-behavior-test/applications/group-termination-behavior-test.json
+++ /dev/null
@@ -1,101 +0,0 @@
-{
-    "alias": "group-termination-behavior-test",
-    "applicationId": "group-termination-behavior-test",
-    "components": {
-        "cartridges": [],
-        "groups": [
-            {
-                "name": "g-sc-G4-group-termination-behavior-test",
-                "groupMaxInstances": 1,
-                "groupMinInstances": 1,
-                "alias": "my-g-sc-G4-group-termination-behavior-test",
-                "cartridges": [
-                    {
-                        "cartridgeMin": 1,
-                        "cartridgeMax": 1,
-                        "type": "c1-group-termination-behavior-test",
-                        "subscribableInfo": {
-                            "alias": "c1-1x0-group-termination-behavior-test",
-                            "deploymentPolicy": "deployment-policy-group-termination-behavior-test",
-                            "artifactRepository": {
-                                "repoUsername": "user",
-                                "repoUrl": "http://octl.qmog.cisco.com:10080/git/default.git",
-                                "privateRepo": true,
-                                "repoPassword": "c-policy"
-                            },
-                            "autoscalingPolicy": "autoscaling-policy-group-termination-behavior-test"
-                        }
-                    }
-                ],
-                "groups": [
-                    {
-                        "name": "g-G3-group-termination-behavior-test",
-                        "groupMaxInstances": 1,
-                        "groupMinInstances": 1,
-                        "alias": "g-G3-1x0-group-termination-behavior-test",
-                        "cartridges": [
-                            {
-                                "cartridgeMin": 1,
-                                "cartridgeMax": 1,
-                                "type": "c2-group-termination-behavior-test",
-                                "subscribableInfo": {
-                                    "alias": "c2-1x0-group-termination-behavior-test",
-                                    "deploymentPolicy": "deployment-policy-group-termination-behavior-test",
-                                    "artifactRepository": {
-                                        "repoUsername": "user",
-                                        "repoUrl": "http://octl.qmog.cisco.com:10080/git/default.git",
-                                        "privateRepo": true,
-                                        "repoPassword": "c-policy"
-                                    },
-                                    "autoscalingPolicy": "autoscaling-policy-group-termination-behavior-test"
-                                }
-                            }
-                        ],
-                        "groups": [
-                            {
-                                "name": "g-G1-group-termination-behavior-test",
-                                "groupMaxInstances": 1,
-                                "groupMinInstances": 1,
-                                "alias": "g-G1-1x0-group-termination-behavior-test",
-                                "cartridges": [
-                                    {
-                                        "cartridgeMin": 1,
-                                        "cartridgeMax": 1,
-                                        "type": "c4-group-termination-behavior-test",
-                                        "subscribableInfo": {
-                                            "alias": "c4-1x0-group-termination-behavior-test",
-                                            "deploymentPolicy": "deployment-policy-group-termination-behavior-test",
-                                            "artifactRepository": {
-                                                "repoUsername": "user",
-                                                "repoUrl": "http://octl.qmog.cisco.com:10080/git/default.git",
-                                                "privateRepo": true,
-                                                "repoPassword": "c-policy"
-                                            },
-                                            "autoscalingPolicy": "autoscaling-policy-group-termination-behavior-test"
-                                        }
-                                    },
-                                    {
-                                        "cartridgeMin": 1,
-                                        "cartridgeMax": 1,
-                                        "type": "c3-group-termination-behavior-test",
-                                        "subscribableInfo": {
-                                            "alias": "c3-1x0-group-termination-behavior-test",
-                                            "deploymentPolicy": "deployment-policy-group-termination-behavior-test",
-                                            "artifactRepository": {
-                                                "repoUsername": "user",
-                                                "repoUrl": "http://octl.qmog.cisco.com:10080/git/default.git",
-                                                "privateRepo": true,
-                                                "repoPassword": "c-policy"
-                                            },
-                                            "autoscalingPolicy": "autoscaling-policy-group-termination-behavior-test"
-                                        }
-                                    }
-                                ]
-                            }
-                        ]
-                    }
-                ]
-            }
-        ]
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/group-termination-behavior-test/autoscaling-policies/autoscaling-policy-group-termination-behavior-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/group-termination-behavior-test/autoscaling-policies/autoscaling-policy-group-termination-behavior-test.json b/products/stratos/modules/integration/src/test/resources/group-termination-behavior-test/autoscaling-policies/autoscaling-policy-group-termination-behavior-test.json
deleted file mode 100644
index fd81d17..0000000
--- a/products/stratos/modules/integration/src/test/resources/group-termination-behavior-test/autoscaling-policies/autoscaling-policy-group-termination-behavior-test.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
-    "id": "autoscaling-policy-group-termination-behavior-test",
-    "loadThresholds": {
-        "requestsInFlight": {
-            "threshold": 35
-        },
-        "memoryConsumption": {
-            "threshold": 45
-        },
-        "loadAverage": {
-            "threshold": 25
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/group-termination-behavior-test/cartridges-groups/cartridge-groups-group-termination-behavior-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/group-termination-behavior-test/cartridges-groups/cartridge-groups-group-termination-behavior-test.json b/products/stratos/modules/integration/src/test/resources/group-termination-behavior-test/cartridges-groups/cartridge-groups-group-termination-behavior-test.json
deleted file mode 100644
index 2d69021..0000000
--- a/products/stratos/modules/integration/src/test/resources/group-termination-behavior-test/cartridges-groups/cartridge-groups-group-termination-behavior-test.json
+++ /dev/null
@@ -1,58 +0,0 @@
-{
-  "name": "g-sc-G4-group-termination-behavior-test",
-  "dependencies": {
-    "terminationBehaviour": "terminate-none",
-    "startupOrders": [
-      {
-        "aliases": [
-          "group.g-G3-1x0-group-termination-behavior-test",
-          "cartridge.c1-1x0-group-termination-behavior-test"
-        ]
-      }
-    ]
-  },
-  "cartridges": [
-    "c1-group-termination-behavior-test"
-  ],
-  "groups": [
-    {
-      "name": "g-G3-group-termination-behavior-test",
-      "dependencies": {
-        "terminationBehaviour": "terminate-dependents",
-        "startupOrders": [
-          {
-            "aliases": [
-              "group.g-G1-1x0-group-termination-behavior-test",
-              "cartridge.c2-1x0-group-termination-behavior-test"
-            ]
-          }
-        ]
-      },
-      "cartridges": [
-        "c2-group-termination-behavior-test"
-      ],
-      "groups": [
-          {
-              "name": "g-G1-group-termination-behavior-test",
-              "dependencies": {
-                  "terminationBehaviour": "terminate-all",
-                  "startupOrders": [
-                      {
-                          "aliases": [
-                              "cartridge.c3-1x0-group-termination-behavior-test",
-                              "cartridge.c4-1x0-group-termination-behavior-test"
-                          ]
-                      }
-                  ]
-              },
-              "cartridges": [
-                  "c3-group-termination-behavior-test",
-                  "c4-group-termination-behavior-test"
-              ],
-              "groups": [
-              ]
-          }
-      ]
-    }
-  ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/group-termination-behavior-test/cartridges/mock/c1-group-termination-behavior-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/group-termination-behavior-test/cartridges/mock/c1-group-termination-behavior-test.json b/products/stratos/modules/integration/src/test/resources/group-termination-behavior-test/cartridges/mock/c1-group-termination-behavior-test.json
deleted file mode 100755
index 343fcd5..0000000
--- a/products/stratos/modules/integration/src/test/resources/group-termination-behavior-test/cartridges/mock/c1-group-termination-behavior-test.json
+++ /dev/null
@@ -1,45 +0,0 @@
-{
-    "type": "c1-group-termination-behavior-test",
-    "provider": "apache",
-    "host": "stratos.apache.org",
-    "category": "data",
-    "displayName": "c1-group-termination-behavior-test",
-    "description": "c1-group-termination-behavior-test Cartridge",
-    "version": "7",
-    "multiTenant": "false",
-    "portMapping": [
-        {
-            "protocol": "http",
-            "port": "22",
-            "proxyPort": "8280"
-        }
-    ],
-    "deployment": {
-    },
-    "iaasProvider": [
-        {
-            "type": "mock",
-            "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
-            "networkInterfaces": [
-                {
-                    "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e"
-                }
-            ],
-
-            "property": [
-                {
-                    "name": "instanceType",
-                    "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594"
-                },
-                {
-                    "name": "keyPair",
-                    "value": "vishanth-key"
-                },
-                {
-                    "name": "securityGroups",
-                    "value": "default"
-                }
-            ]
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/group-termination-behavior-test/cartridges/mock/c2-group-termination-behavior-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/group-termination-behavior-test/cartridges/mock/c2-group-termination-behavior-test.json b/products/stratos/modules/integration/src/test/resources/group-termination-behavior-test/cartridges/mock/c2-group-termination-behavior-test.json
deleted file mode 100755
index 3d16511..0000000
--- a/products/stratos/modules/integration/src/test/resources/group-termination-behavior-test/cartridges/mock/c2-group-termination-behavior-test.json
+++ /dev/null
@@ -1,45 +0,0 @@
-{
-    "type": "c2-group-termination-behavior-test",
-    "provider": "apache",
-    "host": "stratos.apache.org",
-    "category": "data",
-    "displayName": "c2-group-termination-behavior-test",
-    "description": "c2-group-termination-behavior-test Cartridge",
-    "version": "7",
-    "multiTenant": "false",
-    "portMapping": [
-        {
-            "protocol": "http",
-            "port": "22",
-            "proxyPort": "8280"
-        }
-    ],
-    "deployment": {
-    },
-    "iaasProvider": [
-        {
-            "type": "mock",
-            "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
-            "networkInterfaces": [
-                {
-                    "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e"
-                }
-            ],
-
-            "property": [
-                {
-                    "name": "instanceType",
-                    "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594"
-                },
-                {
-                    "name": "keyPair",
-                    "value": "vishanth-key"
-                },
-                {
-                    "name": "securityGroups",
-                    "value": "default"
-                }
-            ]
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/group-termination-behavior-test/cartridges/mock/c3-group-termination-behavior-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/group-termination-behavior-test/cartridges/mock/c3-group-termination-behavior-test.json b/products/stratos/modules/integration/src/test/resources/group-termination-behavior-test/cartridges/mock/c3-group-termination-behavior-test.json
deleted file mode 100755
index 10aeb5d..0000000
--- a/products/stratos/modules/integration/src/test/resources/group-termination-behavior-test/cartridges/mock/c3-group-termination-behavior-test.json
+++ /dev/null
@@ -1,45 +0,0 @@
-{
-    "type": "c3-group-termination-behavior-test",
-    "provider": "apache",
-    "host": "stratos.apache.org",
-    "category": "data",
-    "displayName": "c3-group-termination-behavior-test",
-    "description": "c3-group-termination-behavior-test Cartridge",
-    "version": "7",
-    "multiTenant": "false",
-    "portMapping": [
-        {
-            "protocol": "http",
-            "port": "22",
-            "proxyPort": "8280"
-        }
-    ],
-    "deployment": {
-    },
-    "iaasProvider": [
-        {
-            "type": "mock",
-            "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
-            "networkInterfaces": [
-                {
-                    "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e"
-                }
-            ],
-
-            "property": [
-                {
-                    "name": "instanceType",
-                    "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594"
-                },
-                {
-                    "name": "keyPair",
-                    "value": "vishanth-key"
-                },
-                {
-                    "name": "securityGroups",
-                    "value": "default"
-                }
-            ]
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/group-termination-behavior-test/cartridges/mock/c4-group-termination-behavior-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/group-termination-behavior-test/cartridges/mock/c4-group-termination-behavior-test.json b/products/stratos/modules/integration/src/test/resources/group-termination-behavior-test/cartridges/mock/c4-group-termination-behavior-test.json
deleted file mode 100755
index 45414de..0000000
--- a/products/stratos/modules/integration/src/test/resources/group-termination-behavior-test/cartridges/mock/c4-group-termination-behavior-test.json
+++ /dev/null
@@ -1,45 +0,0 @@
-{
-    "type": "c4-group-termination-behavior-test",
-    "provider": "apache",
-    "host": "stratos.apache.org",
-    "category": "data",
-    "displayName": "c4-group-termination-behavior-test",
-    "description": "c4-group-termination-behavior-test Cartridge",
-    "version": "7",
-    "multiTenant": "false",
-    "portMapping": [
-        {
-            "protocol": "http",
-            "port": "22",
-            "proxyPort": "8280"
-        }
-    ],
-    "deployment": {
-    },
-    "iaasProvider": [
-        {
-            "type": "mock",
-            "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
-            "networkInterfaces": [
-                {
-                    "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e"
-                }
-            ],
-
-            "property": [
-                {
-                    "name": "instanceType",
-                    "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594"
-                },
-                {
-                    "name": "keyPair",
-                    "value": "vishanth-key"
-                },
-                {
-                    "name": "securityGroups",
-                    "value": "default"
-                }
-            ]
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/group-termination-behavior-test/deployment-policies/deployment-policy-group-termination-behavior-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/group-termination-behavior-test/deployment-policies/deployment-policy-group-termination-behavior-test.json b/products/stratos/modules/integration/src/test/resources/group-termination-behavior-test/deployment-policies/deployment-policy-group-termination-behavior-test.json
deleted file mode 100644
index 035ad73..0000000
--- a/products/stratos/modules/integration/src/test/resources/group-termination-behavior-test/deployment-policies/deployment-policy-group-termination-behavior-test.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
-    "id": "deployment-policy-group-termination-behavior-test",
-    "networkPartitions": [
-        {
-            "id": "network-partition-group-termination-behavior-test-1",
-            "partitionAlgo": "one-after-another",
-            "partitions": [
-                {
-                    "id": "partition-1",
-                    "partitionMax": 4
-                }
-            ]
-        }
-    ]
-}
-
-
-

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/group-termination-behavior-test/network-partitions/mock/network-partition-group-termination-behavior-test-1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/group-termination-behavior-test/network-partitions/mock/network-partition-group-termination-behavior-test-1.json b/products/stratos/modules/integration/src/test/resources/group-termination-behavior-test/network-partitions/mock/network-partition-group-termination-behavior-test-1.json
deleted file mode 100644
index 13abc47..0000000
--- a/products/stratos/modules/integration/src/test/resources/group-termination-behavior-test/network-partitions/mock/network-partition-group-termination-behavior-test-1.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
-    "id": "network-partition-group-termination-behavior-test-1",
-    "provider": "mock",
-    "partitions": [
-        {
-            "id": "partition-1",
-            "property": [
-                {
-                    "name": "region",
-                    "value": "default"
-                }
-            ]
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/instrumentation.txt
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/instrumentation.txt b/products/stratos/modules/integration/src/test/resources/instrumentation.txt
deleted file mode 100644
index 304c1b8..0000000
--- a/products/stratos/modules/integration/src/test/resources/instrumentation.txt
+++ /dev/null
@@ -1 +0,0 @@
-org.apache.stratos.*
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/keys/wso2carbon.jks
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/keys/wso2carbon.jks b/products/stratos/modules/integration/src/test/resources/keys/wso2carbon.jks
deleted file mode 100755
index 7942c53..0000000
Binary files a/products/stratos/modules/integration/src/test/resources/keys/wso2carbon.jks and /dev/null differ

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/network-partition-test/network-partitions/mock/network-partition-network-partition-test-1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/network-partition-test/network-partitions/mock/network-partition-network-partition-test-1.json b/products/stratos/modules/integration/src/test/resources/network-partition-test/network-partitions/mock/network-partition-network-partition-test-1.json
deleted file mode 100644
index d673796..0000000
--- a/products/stratos/modules/integration/src/test/resources/network-partition-test/network-partitions/mock/network-partition-network-partition-test-1.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
-    "id": "network-partition-network-partition-test-1",
-    "provider": "mock",
-    "partitions": [
-        {
-            "id": "partition-1",
-            "property": [
-                {
-                    "name": "region",
-                    "value": "default"
-                }
-            ]
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/network-partition-test/network-partitions/mock/network-partition-network-partition-test-2.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/network-partition-test/network-partitions/mock/network-partition-network-partition-test-2.json b/products/stratos/modules/integration/src/test/resources/network-partition-test/network-partitions/mock/network-partition-network-partition-test-2.json
deleted file mode 100644
index 3e1ba76..0000000
--- a/products/stratos/modules/integration/src/test/resources/network-partition-test/network-partitions/mock/network-partition-network-partition-test-2.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
-    "id": "network-partition-network-partition-test-2",
-    "provider": "mock",
-    "partitions": [
-        {
-            "id": "partition-1",
-            "property": [
-                {
-                    "name": "region",
-                    "value": "default"
-                }
-            ]
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/network-partition-test/network-partitions/mock/network-partition-network-partition-test-v1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/network-partition-test/network-partitions/mock/network-partition-network-partition-test-v1.json b/products/stratos/modules/integration/src/test/resources/network-partition-test/network-partitions/mock/network-partition-network-partition-test-v1.json
deleted file mode 100644
index ad4796f..0000000
--- a/products/stratos/modules/integration/src/test/resources/network-partition-test/network-partitions/mock/network-partition-network-partition-test-v1.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
-    "id": "network-partition-network-partition-test",
-    "provider": "mock",
-    "partitions": [
-        {
-            "id": "partition-1",
-            "property": [
-                {
-                    "name": "region",
-                    "value": "default"
-                }
-            ]
-        },
-        {
-            "id": "partition-2",
-            "property": [
-                {
-                    "name": "region",
-                    "value": "default1"
-                },
-                {
-                    "name": "zone",
-                    "value": "z1"
-                }
-            ]
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/network-partition-test/network-partitions/mock/network-partition-network-partition-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/network-partition-test/network-partitions/mock/network-partition-network-partition-test.json b/products/stratos/modules/integration/src/test/resources/network-partition-test/network-partitions/mock/network-partition-network-partition-test.json
deleted file mode 100644
index 1ecc5ba..0000000
--- a/products/stratos/modules/integration/src/test/resources/network-partition-test/network-partitions/mock/network-partition-network-partition-test.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
-    "id": "network-partition-network-partition-test",
-    "provider": "mock",
-    "partitions": [
-        {
-            "id": "partition-1",
-            "property": [
-                {
-                    "name": "region",
-                    "value": "default"
-                }
-            ]
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/partition-round-robin-cluster-test/application-policies/application-policy-partition-round-robin-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/partition-round-robin-cluster-test/application-policies/application-policy-partition-round-robin-test.json b/products/stratos/modules/integration/src/test/resources/partition-round-robin-cluster-test/application-policies/application-policy-partition-round-robin-test.json
deleted file mode 100644
index ffd9702..0000000
--- a/products/stratos/modules/integration/src/test/resources/partition-round-robin-cluster-test/application-policies/application-policy-partition-round-robin-test.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
-    "id": "application-policy-partition-round-robin-test",
-    "algorithm": "one-after-another",
-    "networkPartitions": [
-        "network-partition-partition-round-robin-test"
-    ],
-    "properties": [
-        {
-            "name": "key-2",
-            "value": "value-2"
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/partition-round-robin-cluster-test/applications/partition-round-robin-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/partition-round-robin-cluster-test/applications/partition-round-robin-test.json b/products/stratos/modules/integration/src/test/resources/partition-round-robin-cluster-test/applications/partition-round-robin-test.json
deleted file mode 100644
index 1726eb4..0000000
--- a/products/stratos/modules/integration/src/test/resources/partition-round-robin-cluster-test/applications/partition-round-robin-test.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
-    "applicationId": "partition-round-robin-test",
-    "alias": "partition-round-robin-test",
-    "components": {
-        "cartridges": [
-            {
-                "type": "c7-partition-round-robin-test",
-                "cartridgeMin": 6,
-                "cartridgeMax": 8,
-                "subscribableInfo": {
-                    "alias": "my-c7",
-                    "autoscalingPolicy": "autoscaling-policy-partition-round-robin-test",
-                    "deploymentPolicy": "deployment-policy-partition-round-robin-test",
-                    "artifactRepository": {
-                        "privateRepo": false,
-                        "repoUrl": "https://github.com/imesh/stratos-tomcat-applications.git",
-                        "repoUsername": "",
-                        "repoPassword": ""
-                    }
-                }
-            }
-        ],
-        "dependencies": {
-            "terminationBehaviour": "terminate-none"
-        }
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/partition-round-robin-cluster-test/autoscaling-policies/autoscaling-policy-partition-round-robin-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/partition-round-robin-cluster-test/autoscaling-policies/autoscaling-policy-partition-round-robin-test.json b/products/stratos/modules/integration/src/test/resources/partition-round-robin-cluster-test/autoscaling-policies/autoscaling-policy-partition-round-robin-test.json
deleted file mode 100644
index bca9b14..0000000
--- a/products/stratos/modules/integration/src/test/resources/partition-round-robin-cluster-test/autoscaling-policies/autoscaling-policy-partition-round-robin-test.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
-    "id": "autoscaling-policy-partition-round-robin-test",
-    "loadThresholds": {
-        "requestsInFlight": {
-            "threshold": 20
-        },
-        "memoryConsumption": {
-            "threshold": 30
-        },
-        "loadAverage": {
-            "threshold": 25
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/partition-round-robin-cluster-test/cartridges/mock/c7-partition-round-robin-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/partition-round-robin-cluster-test/cartridges/mock/c7-partition-round-robin-test.json b/products/stratos/modules/integration/src/test/resources/partition-round-robin-cluster-test/cartridges/mock/c7-partition-round-robin-test.json
deleted file mode 100755
index 9a513ce..0000000
--- a/products/stratos/modules/integration/src/test/resources/partition-round-robin-cluster-test/cartridges/mock/c7-partition-round-robin-test.json
+++ /dev/null
@@ -1,45 +0,0 @@
-{
-    "type": "c7-partition-round-robin-test",
-    "provider": "apache",
-    "host": "stratos.apache.org",
-    "category": "data",
-    "displayName": "c7-partition-round-robin-test",
-    "description": "c7-partition-round-robin-test Cartridge",
-    "version": "7",
-    "multiTenant": "false",
-    "portMapping": [
-        {
-            "name": "http-22",
-            "protocol": "http",
-            "port": "22",
-            "proxyPort": "8280"
-        }
-    ],
-    "deployment": {
-    },
-    "iaasProvider": [
-        {
-            "type": "mock",
-            "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
-            "networkInterfaces": [
-                {
-                    "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e"
-                }
-            ],
-            "property": [
-                {
-                    "name": "instanceType",
-                    "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594"
-                },
-                {
-                    "name": "keyPair",
-                    "value": "vishanth-key"
-                },
-                {
-                    "name": "securityGroups",
-                    "value": "default"
-                }
-            ]
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/partition-round-robin-cluster-test/deployment-policies/deployment-policy-partition-round-robin-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/partition-round-robin-cluster-test/deployment-policies/deployment-policy-partition-round-robin-test.json b/products/stratos/modules/integration/src/test/resources/partition-round-robin-cluster-test/deployment-policies/deployment-policy-partition-round-robin-test.json
deleted file mode 100644
index 721ffb9..0000000
--- a/products/stratos/modules/integration/src/test/resources/partition-round-robin-cluster-test/deployment-policies/deployment-policy-partition-round-robin-test.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
-    "id": "deployment-policy-partition-round-robin-test",
-    "networkPartitions": [
-        {
-            "id": "network-partition-partition-round-robin-test",
-            "partitionAlgo": "round-robin",
-            "partitions": [
-                {
-                    "id": "network-partition-11-partition-1",
-                    "partitionMax": 5
-                },
-                {
-                    "id": "network-partition-11-partition-2",
-                    "partitionMax": 5
-                }
-            ]
-        }
-    ]
-}
-
-
-

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/partition-round-robin-cluster-test/network-partitions/mock/network-partition-partition-round-robin-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/partition-round-robin-cluster-test/network-partitions/mock/network-partition-partition-round-robin-test.json b/products/stratos/modules/integration/src/test/resources/partition-round-robin-cluster-test/network-partitions/mock/network-partition-partition-round-robin-test.json
deleted file mode 100644
index 0386304..0000000
--- a/products/stratos/modules/integration/src/test/resources/partition-round-robin-cluster-test/network-partitions/mock/network-partition-partition-round-robin-test.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
-    "id": "network-partition-partition-round-robin-test",
-    "provider": "mock",
-    "partitions": [
-        {
-            "id": "network-partition-11-partition-1",
-            "property": [
-                {
-                    "name": "region",
-                    "value": "default"
-                }
-            ]
-        },
-        {
-            "id": "network-partition-11-partition-2",
-            "property": [
-                {
-                    "name": "region",
-                    "value": "default"
-                }
-            ]
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/sample-applications-test/application-policies/application-policy-sample-applications-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/sample-applications-test/application-policies/application-policy-sample-applications-test.json b/products/stratos/modules/integration/src/test/resources/sample-applications-test/application-policies/application-policy-sample-applications-test.json
deleted file mode 100644
index a4e83e6..0000000
--- a/products/stratos/modules/integration/src/test/resources/sample-applications-test/application-policies/application-policy-sample-applications-test.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
-    "id": "application-policy-sample-applications-test",
-    "algorithm": "one-after-another",
-    "networkPartitions": [
-        "network-partition-sample-applications-test-1",
-        "network-partition-sample-applications-test-2"
-    ],
-    "properties": [
-        {
-            "name": "networkPartitionGroups",
-            "value": "network-partition-sample-applications-test-1,network-partition-sample-applications-test-2"
-        },
-        {
-            "name": "key-2",
-            "value": "value-2"
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/sample-applications-test/applications/g-sc-G123-1-sample-applications-test-v1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/sample-applications-test/applications/g-sc-G123-1-sample-applications-test-v1.json b/products/stratos/modules/integration/src/test/resources/sample-applications-test/applications/g-sc-G123-1-sample-applications-test-v1.json
deleted file mode 100644
index 70cd69b..0000000
--- a/products/stratos/modules/integration/src/test/resources/sample-applications-test/applications/g-sc-G123-1-sample-applications-test-v1.json
+++ /dev/null
@@ -1,86 +0,0 @@
-{
-    "alias": "g-sc-G123-1-sample-applications-test",
-    "applicationId": "g-sc-G123-1-sample-applications-test",
-    "components": {
-        "cartridges": [],
-        "groups": [
-            {
-                "name": "G1-sample-applications-test",
-                "groupMaxInstances": 1,
-                "groupMinInstances": 1,
-                "alias": "group1-sample-applications-test",
-                "cartridges": [
-                    {
-                        "cartridgeMin": 2,
-                        "cartridgeMax": 3,
-                        "type": "c1-sample-applications-test",
-                        "subscribableInfo": {
-                            "alias": "c1-1x0-sample-applications-test",
-                            "deploymentPolicy": "deployment-policy-sample-applications-test",
-                            "artifactRepository": {
-                                "repoUsername": "user",
-                                "repoUrl": "http://stratos.apache.org:10080/git/default.git",
-                                "privateRepo": true,
-                                "repoPassword": "c-policy"
-                            },
-                            "autoscalingPolicy": "autoscaling-policy-sample-applications-test"
-                        }
-                    }
-                ],
-                "groups": [
-                    {
-                        "name": "G2-sample-applications-test",
-                        "groupMaxInstances": 1,
-                        "groupMinInstances": 1,
-                        "alias": "group2-sample-applications-test",
-                        "cartridges": [
-                            {
-                                "cartridgeMin": 2,
-                                "cartridgeMax": 4,
-                                "type": "c2-sample-applications-test",
-                                "subscribableInfo": {
-                                    "alias": "c2-1x0-sample-applications-test",
-                                    "deploymentPolicy": "deployment-policy-sample-applications-test",
-                                    "artifactRepository": {
-                                        "repoUsername": "user",
-                                        "repoUrl": "http://stratos.apache.org:10080/git/default.git",
-                                        "privateRepo": true,
-                                        "repoPassword": "c-policy"
-                                    },
-                                    "autoscalingPolicy": "autoscaling-policy-sample-applications-test"
-                                }
-                            }
-                        ],
-                        "groups": [
-                            {
-                                "name": "G3-sample-applications-test",
-                                "groupMaxInstances": 3,
-                                "groupMinInstances": 2,
-                                "deploymentPolicy": "deployment-policy-sample-applications-test",
-                                "alias": "group3-sample-applications-test",
-                                "cartridges": [
-                                    {
-                                        "cartridgeMin": 2,
-                                        "cartridgeMax": 3,
-                                        "type": "c3-sample-applications-test",
-                                        "subscribableInfo": {
-                                            "alias": "c3-1x0-sample-applications-test",
-                                            "artifactRepository": {
-                                                "repoUsername": "user",
-                                                "repoUrl": "http://stratos.apache.org:10080/git/default.git",
-                                                "privateRepo": true,
-                                                "repoPassword": "c-policy"
-                                            },
-                                            "autoscalingPolicy": "autoscaling-policy-sample-applications-test"
-                                        }
-                                    }
-                                ],
-                                "groups": []
-                            }
-                        ]
-                    }
-                ]
-            }
-        ]
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/sample-applications-test/applications/g-sc-G123-1-sample-applications-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/sample-applications-test/applications/g-sc-G123-1-sample-applications-test.json b/products/stratos/modules/integration/src/test/resources/sample-applications-test/applications/g-sc-G123-1-sample-applications-test.json
deleted file mode 100644
index ca40d63..0000000
--- a/products/stratos/modules/integration/src/test/resources/sample-applications-test/applications/g-sc-G123-1-sample-applications-test.json
+++ /dev/null
@@ -1,86 +0,0 @@
-{
-    "alias": "g-sc-G123-1-sample-applications-test",
-    "applicationId": "g-sc-G123-1-sample-applications-test",
-    "components": {
-        "cartridges": [],
-        "groups": [
-            {
-                "name": "G1-sample-applications-test",
-                "groupMaxInstances": 1,
-                "groupMinInstances": 1,
-                "alias": "group1-sample-applications-test",
-                "cartridges": [
-                    {
-                        "cartridgeMin": 1,
-                        "cartridgeMax": 2,
-                        "type": "c1-sample-applications-test",
-                        "subscribableInfo": {
-                            "alias": "c1-1x0-sample-applications-test",
-                            "deploymentPolicy": "deployment-policy-sample-applications-test",
-                            "artifactRepository": {
-                                "repoUsername": "user",
-                                "repoUrl": "http://stratos.apache.org:10080/git/default.git",
-                                "privateRepo": true,
-                                "repoPassword": "c-policy"
-                            },
-                            "autoscalingPolicy": "autoscaling-policy-sample-applications-test"
-                        }
-                    }
-                ],
-                "groups": [
-                    {
-                        "name": "G2-sample-applications-test",
-                        "groupMaxInstances": 1,
-                        "groupMinInstances": 1,
-                        "alias": "group2-sample-applications-test",
-                        "cartridges": [
-                            {
-                                "cartridgeMin": 1,
-                                "cartridgeMax": 2,
-                                "type": "c2-sample-applications-test",
-                                "subscribableInfo": {
-                                    "alias": "c2-1x0-sample-applications-test",
-                                    "deploymentPolicy": "deployment-policy-sample-applications-test",
-                                    "artifactRepository": {
-                                        "repoUsername": "user",
-                                        "repoUrl": "http://stratos.apache.org:10080/git/default.git",
-                                        "privateRepo": true,
-                                        "repoPassword": "c-policy"
-                                    },
-                                    "autoscalingPolicy": "autoscaling-policy-sample-applications-test"
-                                }
-                            }
-                        ],
-                        "groups": [
-                            {
-                                "name": "G3-sample-applications-test",
-                                "groupMaxInstances": 2,
-                                "groupMinInstances": 1,
-                                "deploymentPolicy": "deployment-policy-sample-applications-test",
-                                "alias": "group3-sample-applications-test",
-                                "cartridges": [
-                                    {
-                                        "cartridgeMin": 1,
-                                        "cartridgeMax": 2,
-                                        "type": "c3-sample-applications-test",
-                                        "subscribableInfo": {
-                                            "alias": "c3-1x0-sample-applications-test",
-                                            "artifactRepository": {
-                                                "repoUsername": "user",
-                                                "repoUrl": "http://stratos.apache.org:10080/git/default.git",
-                                                "privateRepo": true,
-                                                "repoPassword": "c-policy"
-                                            },
-                                            "autoscalingPolicy": "autoscaling-policy-sample-applications-test"
-                                        }
-                                    }
-                                ],
-                                "groups": []
-                            }
-                        ]
-                    }
-                ]
-            }
-        ]
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/sample-applications-test/applications/sample-applications-test-1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/sample-applications-test/applications/sample-applications-test-1.json b/products/stratos/modules/integration/src/test/resources/sample-applications-test/applications/sample-applications-test-1.json
deleted file mode 100644
index 532bee6..0000000
--- a/products/stratos/modules/integration/src/test/resources/sample-applications-test/applications/sample-applications-test-1.json
+++ /dev/null
@@ -1,86 +0,0 @@
-{
-    "alias": "sample-applications-test-1",
-    "applicationId": "sample-applications-test-1",
-    "components": {
-        "cartridges": [],
-        "groups": [
-            {
-                "name": "G1-sample-applications-test",
-                "groupMaxInstances": 1,
-                "groupMinInstances": 1,
-                "alias": "group1-sample-applications-test",
-                "cartridges": [
-                    {
-                        "cartridgeMin": 1,
-                        "cartridgeMax": 2,
-                        "type": "c1-sample-applications-test",
-                        "subscribableInfo": {
-                            "alias": "c1-1x0-sample-applications-test",
-                            "deploymentPolicy": "deployment-policy-sample-applications-test",
-                            "artifactRepository": {
-                                "repoUsername": "user",
-                                "repoUrl": "http://stratos.apache.org:10080/git/default.git",
-                                "privateRepo": true,
-                                "repoPassword": "c-policy"
-                            },
-                            "autoscalingPolicy": "autoscaling-policy-sample-applications-test"
-                        }
-                    }
-                ],
-                "groups": [
-                    {
-                        "name": "G2-sample-applications-test",
-                        "groupMaxInstances": 1,
-                        "groupMinInstances": 1,
-                        "alias": "group2-sample-applications-test",
-                        "cartridges": [
-                            {
-                                "cartridgeMin": 1,
-                                "cartridgeMax": 2,
-                                "type": "c2-sample-applications-test",
-                                "subscribableInfo": {
-                                    "alias": "c2-1x0-sample-applications-test",
-                                    "deploymentPolicy": "deployment-policy-sample-applications-test",
-                                    "artifactRepository": {
-                                        "repoUsername": "user",
-                                        "repoUrl": "http://stratos.apache.org:10080/git/default.git",
-                                        "privateRepo": true,
-                                        "repoPassword": "c-policy"
-                                    },
-                                    "autoscalingPolicy": "autoscaling-policy-sample-applications-test"
-                                }
-                            }
-                        ],
-                        "groups": [
-                            {
-                                "name": "G3-sample-applications-test",
-                                "groupMaxInstances": 2,
-                                "groupMinInstances": 1,
-                                "deploymentPolicy": "deployment-policy-sample-applications-test",
-                                "alias": "group3-sample-applications-test",
-                                "cartridges": [
-                                    {
-                                        "cartridgeMin": 1,
-                                        "cartridgeMax": 2,
-                                        "type": "c3-sample-applications-test",
-                                        "subscribableInfo": {
-                                            "alias": "c3-1x0-sample-applications-test",
-                                            "artifactRepository": {
-                                                "repoUsername": "user",
-                                                "repoUrl": "http://stratos.apache.org:10080/git/default.git",
-                                                "privateRepo": true,
-                                                "repoPassword": "c-policy"
-                                            },
-                                            "autoscalingPolicy": "autoscaling-policy-sample-applications-test"
-                                        }
-                                    }
-                                ],
-                                "groups": []
-                            }
-                        ]
-                    }
-                ]
-            }
-        ]
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/sample-applications-test/applications/sample-applications-test-2.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/sample-applications-test/applications/sample-applications-test-2.json b/products/stratos/modules/integration/src/test/resources/sample-applications-test/applications/sample-applications-test-2.json
deleted file mode 100644
index 6427d7e..0000000
--- a/products/stratos/modules/integration/src/test/resources/sample-applications-test/applications/sample-applications-test-2.json
+++ /dev/null
@@ -1,86 +0,0 @@
-{
-    "alias": "sample-applications-test-2",
-    "applicationId": "sample-applications-test-2",
-    "components": {
-        "cartridges": [],
-        "groups": [
-            {
-                "name": "G1-sample-applications-test",
-                "groupMaxInstances": 1,
-                "groupMinInstances": 1,
-                "alias": "group1-sample-applications-test",
-                "cartridges": [
-                    {
-                        "cartridgeMin": 1,
-                        "cartridgeMax": 2,
-                        "type": "c1-sample-applications-test",
-                        "subscribableInfo": {
-                            "alias": "c1-1x0-sample-applications-test",
-                            "deploymentPolicy": "deployment-policy-sample-applications-test",
-                            "artifactRepository": {
-                                "repoUsername": "user",
-                                "repoUrl": "http://stratos.apache.org:10080/git/default.git",
-                                "privateRepo": true,
-                                "repoPassword": "c-policy"
-                            },
-                            "autoscalingPolicy": "autoscaling-policy-sample-applications-test"
-                        }
-                    }
-                ],
-                "groups": [
-                    {
-                        "name": "G2-sample-applications-test",
-                        "groupMaxInstances": 1,
-                        "groupMinInstances": 1,
-                        "alias": "group2-sample-applications-test",
-                        "cartridges": [
-                            {
-                                "cartridgeMin": 1,
-                                "cartridgeMax": 2,
-                                "type": "c2-sample-applications-test",
-                                "subscribableInfo": {
-                                    "alias": "c2-1x0-sample-applications-test",
-                                    "deploymentPolicy": "deployment-policy-sample-applications-test",
-                                    "artifactRepository": {
-                                        "repoUsername": "user",
-                                        "repoUrl": "http://stratos.apache.org:10080/git/default.git",
-                                        "privateRepo": true,
-                                        "repoPassword": "c-policy"
-                                    },
-                                    "autoscalingPolicy": "autoscaling-policy-sample-applications-test"
-                                }
-                            }
-                        ],
-                        "groups": [
-                            {
-                                "name": "G3-sample-applications-test",
-                                "groupMaxInstances": 2,
-                                "groupMinInstances": 1,
-                                "deploymentPolicy": "deployment-policy-sample-applications-test",
-                                "alias": "group3-sample-applications-test",
-                                "cartridges": [
-                                    {
-                                        "cartridgeMin": 1,
-                                        "cartridgeMax": 2,
-                                        "type": "c3-sample-applications-test",
-                                        "subscribableInfo": {
-                                            "alias": "c3-1x0-sample-applications-test",
-                                            "artifactRepository": {
-                                                "repoUsername": "user",
-                                                "repoUrl": "http://stratos.apache.org:10080/git/default.git",
-                                                "privateRepo": true,
-                                                "repoPassword": "c-policy"
-                                            },
-                                            "autoscalingPolicy": "autoscaling-policy-sample-applications-test"
-                                        }
-                                    }
-                                ],
-                                "groups": []
-                            }
-                        ]
-                    }
-                ]
-            }
-        ]
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/sample-applications-test/autoscaling-policies/autoscaling-policy-sample-applications-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/sample-applications-test/autoscaling-policies/autoscaling-policy-sample-applications-test.json b/products/stratos/modules/integration/src/test/resources/sample-applications-test/autoscaling-policies/autoscaling-policy-sample-applications-test.json
deleted file mode 100644
index 5bd90ab..0000000
--- a/products/stratos/modules/integration/src/test/resources/sample-applications-test/autoscaling-policies/autoscaling-policy-sample-applications-test.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
-    "id": "autoscaling-policy-sample-applications-test",
-    "loadThresholds": {
-        "requestsInFlight": {
-            "threshold": 35
-        },
-        "memoryConsumption": {
-            "threshold": 45
-        },
-        "loadAverage": {
-            "threshold": 25
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/sample-applications-test/cartridges-groups/cartrdige-nested-sample-applications-test-v1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/sample-applications-test/cartridges-groups/cartrdige-nested-sample-applications-test-v1.json b/products/stratos/modules/integration/src/test/resources/sample-applications-test/cartridges-groups/cartrdige-nested-sample-applications-test-v1.json
deleted file mode 100644
index 9d1fc7b..0000000
--- a/products/stratos/modules/integration/src/test/resources/sample-applications-test/cartridges-groups/cartrdige-nested-sample-applications-test-v1.json
+++ /dev/null
@@ -1,50 +0,0 @@
-{
-    "name": "G1-sample-applications-test",
-    "dependencies": {
-        "terminationBehaviour": "terminate-none",
-        "startupOrders": [
-            {
-                "aliases": [
-                    "group.group2-sample-applications-test",
-                    "cartridge.c1-1x0-sample-applications-test"
-                ]
-            }
-        ]
-    },
-    "cartridges": [
-        "c1-sample-applications-test"
-    ],
-    "groups": [
-        {
-            "name": "G2-sample-applications-test",
-            "dependencies": {
-                "terminationBehaviour": "terminate-dependents",
-                "startupOrders": [
-                    {
-                        "aliases": [
-                            "group.group3-sample-applications-test",
-                            "cartridge.c2-1x0-sample-applications-test"
-                        ]
-                    }
-                ]
-            },
-            "cartridges": [
-                "c2-sample-applications-test"
-            ],
-            "groups": [
-                {
-                    "name": "G3-sample-applications-test",
-                    "dependencies": {
-                        "terminationBehaviour": "terminate-all",
-                        "startupOrders": []
-                    },
-                    "cartridges": [
-                        "c3-sample-applications-test"
-                    ],
-                    "groups": []
-                }
-            ]
-        }
-    ]
-}
-

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/sample-applications-test/cartridges-groups/cartrdige-nested-sample-applications-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/sample-applications-test/cartridges-groups/cartrdige-nested-sample-applications-test.json b/products/stratos/modules/integration/src/test/resources/sample-applications-test/cartridges-groups/cartrdige-nested-sample-applications-test.json
deleted file mode 100644
index 9d1fc7b..0000000
--- a/products/stratos/modules/integration/src/test/resources/sample-applications-test/cartridges-groups/cartrdige-nested-sample-applications-test.json
+++ /dev/null
@@ -1,50 +0,0 @@
-{
-    "name": "G1-sample-applications-test",
-    "dependencies": {
-        "terminationBehaviour": "terminate-none",
-        "startupOrders": [
-            {
-                "aliases": [
-                    "group.group2-sample-applications-test",
-                    "cartridge.c1-1x0-sample-applications-test"
-                ]
-            }
-        ]
-    },
-    "cartridges": [
-        "c1-sample-applications-test"
-    ],
-    "groups": [
-        {
-            "name": "G2-sample-applications-test",
-            "dependencies": {
-                "terminationBehaviour": "terminate-dependents",
-                "startupOrders": [
-                    {
-                        "aliases": [
-                            "group.group3-sample-applications-test",
-                            "cartridge.c2-1x0-sample-applications-test"
-                        ]
-                    }
-                ]
-            },
-            "cartridges": [
-                "c2-sample-applications-test"
-            ],
-            "groups": [
-                {
-                    "name": "G3-sample-applications-test",
-                    "dependencies": {
-                        "terminationBehaviour": "terminate-all",
-                        "startupOrders": []
-                    },
-                    "cartridges": [
-                        "c3-sample-applications-test"
-                    ],
-                    "groups": []
-                }
-            ]
-        }
-    ]
-}
-

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/sample-applications-test/cartridges/mock/c1-sample-applications-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/sample-applications-test/cartridges/mock/c1-sample-applications-test.json b/products/stratos/modules/integration/src/test/resources/sample-applications-test/cartridges/mock/c1-sample-applications-test.json
deleted file mode 100755
index 26f8588..0000000
--- a/products/stratos/modules/integration/src/test/resources/sample-applications-test/cartridges/mock/c1-sample-applications-test.json
+++ /dev/null
@@ -1,45 +0,0 @@
-{
-    "type": "c1-sample-applications-test",
-    "provider": "apache",
-    "host": "stratos.apache.org",
-    "category": "data",
-    "displayName": "c1-sample-applications-test",
-    "description": "c1-sample-applications-test Cartridge",
-    "version": "7",
-    "multiTenant": "false",
-    "portMapping": [
-        {
-            "name": "http-22",
-            "protocol": "http",
-            "port": "22",
-            "proxyPort": "8280"
-        }
-    ],
-    "deployment": {
-    },
-    "iaasProvider": [
-        {
-            "type": "mock",
-            "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
-            "networkInterfaces": [
-                {
-                    "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e"
-                }
-            ],
-            "property": [
-                {
-                    "name": "instanceType",
-                    "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594"
-                },
-                {
-                    "name": "keyPair",
-                    "value": "vishanth-key"
-                },
-                {
-                    "name": "securityGroups",
-                    "value": "default"
-                }
-            ]
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/sample-applications-test/cartridges/mock/c2-sample-applications-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/sample-applications-test/cartridges/mock/c2-sample-applications-test.json b/products/stratos/modules/integration/src/test/resources/sample-applications-test/cartridges/mock/c2-sample-applications-test.json
deleted file mode 100755
index 0f3c61f..0000000
--- a/products/stratos/modules/integration/src/test/resources/sample-applications-test/cartridges/mock/c2-sample-applications-test.json
+++ /dev/null
@@ -1,45 +0,0 @@
-{
-    "type": "c2-sample-applications-test",
-    "provider": "apache",
-    "host": "stratos.apache.org",
-    "category": "data",
-    "displayName": "c2-sample-applications-test",
-    "description": "c2-sample-applications-test Cartridge",
-    "version": "7",
-    "multiTenant": "false",
-    "portMapping": [
-        {
-            "name": "http-22",
-            "protocol": "http",
-            "port": "22",
-            "proxyPort": "8280"
-        }
-    ],
-    "deployment": {
-    },
-    "iaasProvider": [
-        {
-            "type": "mock",
-            "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
-            "networkInterfaces": [
-                {
-                    "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e"
-                }
-            ],
-            "property": [
-                {
-                    "name": "instanceType",
-                    "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594"
-                },
-                {
-                    "name": "keyPair",
-                    "value": "vishanth-key"
-                },
-                {
-                    "name": "securityGroups",
-                    "value": "default"
-                }
-            ]
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/sample-applications-test/cartridges/mock/c3-sample-applications-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/sample-applications-test/cartridges/mock/c3-sample-applications-test.json b/products/stratos/modules/integration/src/test/resources/sample-applications-test/cartridges/mock/c3-sample-applications-test.json
deleted file mode 100755
index c959d53..0000000
--- a/products/stratos/modules/integration/src/test/resources/sample-applications-test/cartridges/mock/c3-sample-applications-test.json
+++ /dev/null
@@ -1,45 +0,0 @@
-{
-    "type": "c3-sample-applications-test",
-    "provider": "apache",
-    "host": "stratos.apache.org",
-    "category": "data",
-    "displayName": "c3-sample-applications-test",
-    "description": "c3-sample-applications-test Cartridge",
-    "version": "7",
-    "multiTenant": "false",
-    "portMapping": [
-        {
-            "name": "http-22",
-            "protocol": "http",
-            "port": "22",
-            "proxyPort": "8280"
-        }
-    ],
-    "deployment": {
-    },
-    "iaasProvider": [
-        {
-            "type": "mock",
-            "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
-            "networkInterfaces": [
-                {
-                    "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e"
-                }
-            ],
-            "property": [
-                {
-                    "name": "instanceType",
-                    "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594"
-                },
-                {
-                    "name": "keyPair",
-                    "value": "vishanth-key"
-                },
-                {
-                    "name": "securityGroups",
-                    "value": "default"
-                }
-            ]
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/sample-applications-test/deployment-policies/deployment-policy-sample-applications-test-v1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/sample-applications-test/deployment-policies/deployment-policy-sample-applications-test-v1.json b/products/stratos/modules/integration/src/test/resources/sample-applications-test/deployment-policies/deployment-policy-sample-applications-test-v1.json
deleted file mode 100644
index 0e35536..0000000
--- a/products/stratos/modules/integration/src/test/resources/sample-applications-test/deployment-policies/deployment-policy-sample-applications-test-v1.json
+++ /dev/null
@@ -1,36 +0,0 @@
-{
-    "id": "deployment-policy-sample-applications-test",
-    "networkPartitions": [
-        {
-            "id": "network-partition-sample-applications-test-1",
-            "partitionAlgo": "one-after-another",
-            "partitions": [
-                {
-                    "id": "partition-1",
-                    "partitionMax": 25
-                },
-                {
-                    "id": "partition-2",
-                    "partitionMax": 20
-                }
-            ]
-        },
-        {
-            "id": "network-partition-sample-applications-test-2",
-            "partitionAlgo": "round-robin",
-            "partitions": [
-                {
-                    "id": "network-partition-2-partition-1",
-                    "partitionMax": 15
-                },
-                {
-                    "id": "network-partition-2-partition-2",
-                    "partitionMax": 5
-                }
-            ]
-        }
-    ]
-}
-
-
-

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/sample-applications-test/deployment-policies/deployment-policy-sample-applications-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/sample-applications-test/deployment-policies/deployment-policy-sample-applications-test.json b/products/stratos/modules/integration/src/test/resources/sample-applications-test/deployment-policies/deployment-policy-sample-applications-test.json
deleted file mode 100644
index 2e26c25..0000000
--- a/products/stratos/modules/integration/src/test/resources/sample-applications-test/deployment-policies/deployment-policy-sample-applications-test.json
+++ /dev/null
@@ -1,32 +0,0 @@
-{
-    "id": "deployment-policy-sample-applications-test",
-    "networkPartitions": [
-        {
-            "id": "network-partition-sample-applications-test-1",
-            "partitionAlgo": "one-after-another",
-            "partitions": [
-                {
-                    "id": "partition-1",
-                    "partitionMax": 20
-                }
-            ]
-        },
-        {
-            "id": "network-partition-sample-applications-test-2",
-            "partitionAlgo": "round-robin",
-            "partitions": [
-                {
-                    "id": "network-partition-2-partition-1",
-                    "partitionMax": 10
-                },
-                {
-                    "id": "network-partition-2-partition-2",
-                    "partitionMax": 9
-                }
-            ]
-        }
-    ]
-}
-
-
-

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/sample-applications-test/network-partitions/mock/network-partition-sample-applications-test-1-v1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/sample-applications-test/network-partitions/mock/network-partition-sample-applications-test-1-v1.json b/products/stratos/modules/integration/src/test/resources/sample-applications-test/network-partitions/mock/network-partition-sample-applications-test-1-v1.json
deleted file mode 100644
index 2df920e..0000000
--- a/products/stratos/modules/integration/src/test/resources/sample-applications-test/network-partitions/mock/network-partition-sample-applications-test-1-v1.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
-    "id": "network-partition-sample-applications-test-1",
-    "provider": "mock",
-    "partitions": [
-        {
-            "id": "partition-1",
-            "property": [
-                {
-                    "name": "region",
-                    "value": "default"
-                }
-            ]
-        },
-        {
-            "id": "partition-2",
-            "property": [
-                {
-                    "name": "region",
-                    "value": "default1"
-                },
-                {
-                    "name": "zone",
-                    "value": "z1"
-                }
-            ]
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/sample-applications-test/network-partitions/mock/network-partition-sample-applications-test-1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/sample-applications-test/network-partitions/mock/network-partition-sample-applications-test-1.json b/products/stratos/modules/integration/src/test/resources/sample-applications-test/network-partitions/mock/network-partition-sample-applications-test-1.json
deleted file mode 100644
index 8d7aed5..0000000
--- a/products/stratos/modules/integration/src/test/resources/sample-applications-test/network-partitions/mock/network-partition-sample-applications-test-1.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
-    "id": "network-partition-sample-applications-test-1",
-    "provider": "mock",
-    "partitions": [
-        {
-            "id": "partition-1",
-            "property": [
-                {
-                    "name": "region",
-                    "value": "default"
-                }
-            ]
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/sample-applications-test/network-partitions/mock/network-partition-sample-applications-test-2.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/sample-applications-test/network-partitions/mock/network-partition-sample-applications-test-2.json b/products/stratos/modules/integration/src/test/resources/sample-applications-test/network-partitions/mock/network-partition-sample-applications-test-2.json
deleted file mode 100644
index 2fd5411..0000000
--- a/products/stratos/modules/integration/src/test/resources/sample-applications-test/network-partitions/mock/network-partition-sample-applications-test-2.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
-    "id": "network-partition-sample-applications-test-2",
-    "provider": "mock",
-    "partitions": [
-        {
-            "id": "network-partition-2-partition-1",
-            "property": [
-                {
-                    "name": "region",
-                    "value": "default"
-                }
-            ]
-        },
-        {
-            "id": "network-partition-2-partition-2",
-            "property": [
-                {
-                    "name": "region",
-                    "value": "default"
-                }
-            ]
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/single-cluster-scaling-test/application-policies/application-policy-single-cluster-scaling-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/single-cluster-scaling-test/application-policies/application-policy-single-cluster-scaling-test.json b/products/stratos/modules/integration/src/test/resources/single-cluster-scaling-test/application-policies/application-policy-single-cluster-scaling-test.json
deleted file mode 100644
index 866f568..0000000
--- a/products/stratos/modules/integration/src/test/resources/single-cluster-scaling-test/application-policies/application-policy-single-cluster-scaling-test.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
-    "id": "application-policy-single-cluster-scaling-test",
-    "algorithm": "one-after-another",
-    "networkPartitions": [
-        "network-partition-single-cluster-scaling-test"
-    ],
-    "properties": [
-        {
-            "name": "key-2",
-            "value": "value-2"
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/single-cluster-scaling-test/applications/single-cluster-scaling-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/single-cluster-scaling-test/applications/single-cluster-scaling-test.json b/products/stratos/modules/integration/src/test/resources/single-cluster-scaling-test/applications/single-cluster-scaling-test.json
deleted file mode 100644
index f091e26..0000000
--- a/products/stratos/modules/integration/src/test/resources/single-cluster-scaling-test/applications/single-cluster-scaling-test.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
-    "applicationId": "single-cluster-scaling-test",
-    "alias": "single-cluster-scaling-test",
-    "components": {
-        "cartridges": [
-            {
-                "type": "c7-single-cluster-scaling-test",
-                "cartridgeMin": 2,
-                "cartridgeMax": 5,
-                "subscribableInfo": {
-                    "alias": "my-c7",
-                    "autoscalingPolicy": "autoscaling-policy-single-cluster-scaling-test",
-                    "deploymentPolicy": "deployment-policy-single-cluster-scaling-test",
-                    "artifactRepository": {
-                        "privateRepo": false,
-                        "repoUrl": "https://github.com/imesh/stratos-tomcat-applications.git",
-                        "repoUsername": "",
-                        "repoPassword": ""
-                    }
-                }
-            }
-        ],
-        "dependencies": {
-            "terminationBehaviour": "terminate-none"
-        }
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/single-cluster-scaling-test/autoscaling-policies/autoscaling-policy-single-cluster-scaling-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/single-cluster-scaling-test/autoscaling-policies/autoscaling-policy-single-cluster-scaling-test.json b/products/stratos/modules/integration/src/test/resources/single-cluster-scaling-test/autoscaling-policies/autoscaling-policy-single-cluster-scaling-test.json
deleted file mode 100644
index 31602d1..0000000
--- a/products/stratos/modules/integration/src/test/resources/single-cluster-scaling-test/autoscaling-policies/autoscaling-policy-single-cluster-scaling-test.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
-    "id": "autoscaling-policy-single-cluster-scaling-test",
-    "loadThresholds": {
-        "requestsInFlight": {
-            "threshold": 20
-        },
-        "memoryConsumption": {
-            "threshold": 30
-        },
-        "loadAverage": {
-            "threshold": 25
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/single-cluster-scaling-test/cartridges/mock/c7-single-cluster-scaling-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/single-cluster-scaling-test/cartridges/mock/c7-single-cluster-scaling-test.json b/products/stratos/modules/integration/src/test/resources/single-cluster-scaling-test/cartridges/mock/c7-single-cluster-scaling-test.json
deleted file mode 100755
index c8abf51..0000000
--- a/products/stratos/modules/integration/src/test/resources/single-cluster-scaling-test/cartridges/mock/c7-single-cluster-scaling-test.json
+++ /dev/null
@@ -1,45 +0,0 @@
-{
-    "type": "c7-single-cluster-scaling-test",
-    "provider": "apache",
-    "host": "stratos.apache.org",
-    "category": "data",
-    "displayName": "c7-single-cluster-scaling-test",
-    "description": "c7-single-cluster-scaling-test Cartridge",
-    "version": "7",
-    "multiTenant": "false",
-    "portMapping": [
-        {
-            "name": "http-22",
-            "protocol": "http",
-            "port": "22",
-            "proxyPort": "8280"
-        }
-    ],
-    "deployment": {
-    },
-    "iaasProvider": [
-        {
-            "type": "mock",
-            "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
-            "networkInterfaces": [
-                {
-                    "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e"
-                }
-            ],
-            "property": [
-                {
-                    "name": "instanceType",
-                    "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594"
-                },
-                {
-                    "name": "keyPair",
-                    "value": "vishanth-key"
-                },
-                {
-                    "name": "securityGroups",
-                    "value": "default"
-                }
-            ]
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/single-cluster-scaling-test/deployment-policies/deployment-policy-single-cluster-scaling-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/single-cluster-scaling-test/deployment-policies/deployment-policy-single-cluster-scaling-test.json b/products/stratos/modules/integration/src/test/resources/single-cluster-scaling-test/deployment-policies/deployment-policy-single-cluster-scaling-test.json
deleted file mode 100644
index 4818751..0000000
--- a/products/stratos/modules/integration/src/test/resources/single-cluster-scaling-test/deployment-policies/deployment-policy-single-cluster-scaling-test.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
-    "id": "deployment-policy-single-cluster-scaling-test",
-    "networkPartitions": [
-        {
-            "id": "network-partition-single-cluster-scaling-test",
-            "partitionAlgo": "round-robin",
-            "partitions": [
-                {
-                    "id": "network-partition-11-partition-1",
-                    "partitionMax": 3
-                },
-                {
-                    "id": "network-partition-11-partition-2",
-                    "partitionMax": 3
-                }
-            ]
-        }
-    ]
-}
-
-
-

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/single-cluster-scaling-test/network-partitions/mock/network-partition-single-cluster-scaling-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/single-cluster-scaling-test/network-partitions/mock/network-partition-single-cluster-scaling-test.json b/products/stratos/modules/integration/src/test/resources/single-cluster-scaling-test/network-partitions/mock/network-partition-single-cluster-scaling-test.json
deleted file mode 100644
index 13f1723..0000000
--- a/products/stratos/modules/integration/src/test/resources/single-cluster-scaling-test/network-partitions/mock/network-partition-single-cluster-scaling-test.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
-    "id": "network-partition-single-cluster-scaling-test",
-    "provider": "mock",
-    "partitions": [
-        {
-            "id": "network-partition-11-partition-1",
-            "property": [
-                {
-                    "name": "region",
-                    "value": "default"
-                }
-            ]
-        },
-        {
-            "id": "network-partition-11-partition-2",
-            "property": [
-                {
-                    "name": "region",
-                    "value": "default"
-                }
-            ]
-        }
-    ]
-}


[13/21] stratos git commit: Uplifting automation engine to v4.4.3, dynamically pick ports for integration tests

Posted by ra...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/wso2carbon-working 2.log
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/wso2carbon-working 2.log b/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/wso2carbon-working 2.log
deleted file mode 100755
index 2dfb31f..0000000
--- a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/wso2carbon-working 2.log	
+++ /dev/null
@@ -1,1053 +0,0 @@
-TID: [2015-04-22 21:13:10,694]  INFO {org.wso2.carbon.server.extensions.PatchInstaller} -  Patch changes detected  {org.wso2.carbon.server.extensions.PatchInstaller}
-TID: [2015-04-22 21:13:11,008]  INFO {org.wso2.carbon.server.util.PatchUtils.console} -  Backed up plugins to patch0000 {org.wso2.carbon.server.util.PatchUtils.console}
-TID: [2015-04-22 21:13:11,857]  INFO {org.wso2.carbon.server.util.PatchUtils.console} -  Patch verification started {org.wso2.carbon.server.util.PatchUtils.console}
-TID: [2015-04-22 21:13:12,133]  INFO {org.wso2.carbon.server.util.PatchUtils.console} -  Patch verification successfully completed without encountering any issues. {org.wso2.carbon.server.util.PatchUtils.console}
-TID: [0] [STRATOS] [2015-04-22 21:13:16,841]  INFO {org.wso2.carbon.cassandra.dataaccess.DataAccessComponentManager} -  There is no /repository/conf/etc/cassandra-component.xml. Using the default configuration
-TID: [0] [STRATOS] [2015-04-22 21:13:16,877]  INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} -  Starting WSO2 Carbon...
-TID: [0] [STRATOS] [2015-04-22 21:13:16,879]  INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} -  Operating System : Linux 3.13.0-46-generic, amd64
-TID: [0] [STRATOS] [2015-04-22 21:13:16,879]  INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} -  Java Home        : /opt/jdk1.7.0_67/jre
-TID: [0] [STRATOS] [2015-04-22 21:13:16,879]  INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} -  Java Version     : 1.7.0_67
-TID: [0] [STRATOS] [2015-04-22 21:13:16,879]  INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} -  Java VM          : Java HotSpot(TM) 64-Bit Server VM 24.65-b04,Oracle Corporation
-TID: [0] [STRATOS] [2015-04-22 21:13:16,879]  INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} -  Carbon Home      : /opt/wso2/apache-stratos
-TID: [0] [STRATOS] [2015-04-22 21:13:16,880]  INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} -  Java Temp Dir    : /opt/wso2/apache-stratos/tmp
-TID: [0] [STRATOS] [2015-04-22 21:13:16,880]  INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} -  User             : root, en-US, Etc/UTC
-TID: [0] [STRATOS] [2015-04-22 21:13:16,955]  WARN {org.wso2.carbon.core.bootup.validator.SystemValidator} -  Could not validate the system for configuration parameter : CPU
-TID: [0] [STRATOS] [2015-04-22 21:13:16,956]  WARN {org.wso2.carbon.core.bootup.validator.util.ValidationResultPrinter} -  The default keystore (wso2carbon.jks) is currently being used. To maximize security when deploying to a production environment, configure a new keystore with a unique password in the production server profile.
-TID: [0] [STRATOS] [2015-04-22 21:13:16,956]  WARN {org.wso2.carbon.core.bootup.validator.util.ValidationResultPrinter} -  Swap Memory size (MB): 0 of the system is below the recommended minimum size :2048
-TID: [0] [STRATOS] [2015-04-22 21:13:17,021]  INFO {org.wso2.carbon.databridge.agent.thrift.AgentHolder} -  Agent created !
-TID: [0] [STRATOS] [2015-04-22 21:13:17,039]  INFO {org.wso2.carbon.databridge.agent.thrift.internal.AgentDS} -  Successfully deployed Agent Client
-TID: [0] [STRATOS] [2015-04-22 21:13:17,063]  INFO {org.wso2.carbon.event.input.adaptor.core.internal.ds.InputEventAdaptorServiceTrackerDS} -  Successfully deployed the input event adaptor tracker service
-TID: [0] [STRATOS] [2015-04-22 21:13:17,069]  INFO {org.wso2.carbon.event.input.adaptor.jms.internal.ds.JMSEventAdaptorServiceDS} -  Successfully deployed the input jms event adaptor
-TID: [0] [STRATOS] [2015-04-22 21:13:17,074]  INFO {org.wso2.carbon.event.input.adaptor.manager.core.internal.ds.InputEventAdaptorTypeServiceTrackerDS} -  Successfully deployed the input event adaptor type tracker service
-TID: [0] [STRATOS] [2015-04-22 21:13:17,085]  INFO {org.wso2.carbon.event.output.adaptor.cassandra.internal.ds.CassandraEventAdaptorServiceDS} -  Successfully deployed the output cassandra event adaptor service
-TID: [0] [STRATOS] [2015-04-22 21:13:17,089]  INFO {org.wso2.carbon.event.output.adaptor.core.internal.ds.OutputEventAdaptorServiceTrackerDS} -  Successfully deployed the output event adaptor tracker service
-TID: [0] [STRATOS] [2015-04-22 21:13:17,095]  INFO {org.wso2.carbon.event.output.adaptor.http.internal.ds.HTTPEventAdaptorServiceDS} -  Successfully deployed the output HTTP event adaptor service
-TID: [0] [STRATOS] [2015-04-22 21:13:17,101]  INFO {org.wso2.carbon.event.output.adaptor.jms.internal.ds.JMSEventAdaptorServiceDS} -  Successfully deployed the output jms event adaptor service 
-TID: [0] [STRATOS] [2015-04-22 21:13:17,107]  INFO {org.wso2.carbon.event.output.adaptor.manager.core.internal.ds.OutputEventAdaptorTypeServiceTrackerDS} -  Successfully deployed the event adaptor type tracker service
-TID: [0] [STRATOS] [2015-04-22 21:13:17,120]  INFO {org.wso2.carbon.event.output.adaptor.wso2event.internal.ds.WSO2EventAdaptorServiceDS} -  Successfully deployed the output WSO2Event adaptor service
-TID: [0] [STRATOS] [2015-04-22 21:13:17,139]  INFO {org.wso2.carbon.event.input.adaptor.manager.core.internal.ds.InputEventAdaptorManagerDS} -  Successfully deployed the input event adaptor manager service
-TID: [0] [STRATOS] [2015-04-22 21:13:17,139]  INFO {org.wso2.carbon.event.input.adaptor.core.internal.ds.InputEventAdaptorServiceDS} -  Successfully deployed the input event adaptor service
-TID: [0] [STRATOS] [2015-04-22 21:13:17,150]  INFO {org.wso2.carbon.event.output.adaptor.manager.core.internal.ds.OutputEventAdaptorManagerDS} -  Successfully deployed the output event adaptor manager service
-TID: [0] [STRATOS] [2015-04-22 21:13:17,150]  INFO {org.wso2.carbon.event.output.adaptor.core.internal.ds.OutputEventAdaptorServiceDS} -  Successfully deployed the output event adaptor service
-TID: [0] [STRATOS] [2015-04-22 21:13:17,162]  INFO {org.wso2.carbon.event.statistics.internal.ds.EventStatisticsDS} -  Successfully deployed the event statistics monitoring service
-TID: [0] [STRATOS] [2015-04-22 21:13:17,620]  INFO {org.wso2.carbon.social.internal.SocialComponent} -  Social Activity bundle is activated
-TID: [0] [STRATOS] [2015-04-22 21:13:18,407]  INFO {org.wso2.carbon.cassandra.server.internal.CassandraServerDSComponent} -  There is no /repository/conf/etc/cassandra.yaml. Using the default configuration
-TID: [0] [STRATOS] [2015-04-22 21:13:18,451]  INFO {org.wso2.carbon.event.input.adaptor.wso2event.internal.ds.WSO2EventAdaptorServiceDS} -  Successfully deployed the input WSO2Event adaptor service
-TID: [0] [STRATOS] [2015-04-22 21:13:18,453]  INFO {org.wso2.carbon.loggeraggregator.internal.LogAggregator} -  Successfully started Log Aggregator
-TID: [0] [STRATOS] [2015-04-22 21:13:18,453]  INFO {org.wso2.carbon.databridge.core.internal.DataBridgeDS} -  Successfully deployed Agent Server 
-TID: [0] [STRATOS] [2015-04-22 21:13:18,683]  INFO {org.wso2.carbon.registry.core.jdbc.EmbeddedRegistryService} -  Configured Registry in 167ms
-TID: [0] [STRATOS] [2015-04-22 21:13:19,032]  INFO {org.wso2.carbon.registry.core.internal.RegistryCoreServiceComponent} -  Registry Mode    : READ-WRITE
-TID: [0] [STRATOS] [2015-04-22 21:13:19,109]  INFO {org.wso2.carbon.event.output.adaptor.mysql.internal.ds.MysqlEventAdaptorServiceDS} -  Successfully deployed the output mysql event adaptor service
-TID: [0] [STRATOS] [2015-04-22 21:13:19,110]  INFO {org.wso2.carbon.event.processor.siddhi.extension.internal.SiddhiExtensionDS} -  Successfully activated Property Window
-TID: [0] [STRATOS] [2015-04-22 21:13:19,200]  INFO {org.wso2.carbon.event.builder.core.internal.ds.EventBuilderServiceDS} -  Successfully deployed EventBuilderService.
-TID: [0] [STRATOS] [2015-04-22 21:13:19,220]  INFO {org.wso2.carbon.event.formatter.core.internal.ds.EventFormatterServiceDS} -  Successfully deployed EventFormatterService
-TID: [0] [STRATOS] [2015-04-22 21:13:19,221]  INFO {org.wso2.carbon.event.processor.core.internal.ds.EventProcessorServiceDS} -  Successfully deployed EventProcessorService
-TID: [0] [STRATOS] [2015-04-22 21:13:19,221]  INFO {org.wso2.carbon.event.builder.core.internal.ds.EventBuilderServiceDS} -  Successfully deployed EventBuilder EventReceiver.
-TID: [0] [STRATOS] [2015-04-22 21:13:19,281]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:19,340]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :in_flight_requests_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:19,359]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : gradient_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:19,364]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :gradient_in_flight_requests_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:19,381]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : average_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:19,385]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :average_in_flight_requests_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:19,403]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : average_served_request_count:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:19,408]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :average_served_request_count_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:19,425]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : second_derivative_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:19,429]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :second_derivative_in_flight_requests_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:19,445]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : cartridge_agent_health_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:19,450]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :cartridge_agent_health_stats_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:19,466]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : average_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:19,470]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :average_load_average_stats_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:19,487]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : average_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:19,492]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :average_memory_consumption_stats_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:19,509]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : gradient_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:19,514]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :gradient_load_average_stats_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:19,530]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : gradient_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:19,535]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :gradient_memory_consumption_stats_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:19,551]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : second_derivative_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:19,555]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :second_derivative_memory_consumption_stats_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:19,571]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : second_derivative_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:19,576]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :second_derivative_load_average_stats_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:19,592]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : fault_message:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:19,597]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :fault_message_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:19,614]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : member_average_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:19,618]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :member_average_load_average_stats_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:19,635]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : member_average_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:19,640]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :member_average_memory_consumption_stats_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:19,656]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : member_gradient_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:19,661]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :member_gradient_load_average_stats_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:19,679]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : member_gradient_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:19,684]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :member_gradient_memory_consumption_stats_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:19,702]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : member_second_derivative_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:19,707]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :member_second_derivative_memory_consumption_stats_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:19,725]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : member_second_derivative_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:19,730]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :member_second_derivative_load_average_stats_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:19,730]  INFO {org.wso2.carbon.event.builder.core.internal.ds.EventBuilderServiceDS} -  Successfully deployed EventBuilder PassthroughReceiverConfigurator.
-TID: [0] [STRATOS] [2015-04-22 21:13:19,732]  INFO {org.wso2.carbon.event.stream.manager.core.internal.ds.EventStreamServiceDS} -  Successfully deployed EventStreamService
-TID: [0] [STRATOS] [2015-04-22 21:13:19,748]  INFO {org.wso2.carbon.identity.application.mgt.internal.ApplicationManagementServiceComponent} -  Identity ApplicationManagementComponent bundle is activated
-TID: [0] [STRATOS] [2015-04-22 21:13:20,286]  INFO {org.wso2.carbon.user.core.internal.UserStoreMgtDSComponent} -  Carbon UserStoreMgtDSComponent activated successfully.
-TID: [0] [STRATOS] [2015-04-22 21:13:25,504]  INFO {org.apache.axis2.deployment.ClusterBuilder} -  Clustering has been disabled
-TID: [0] [STRATOS] [2015-04-22 21:13:25,858]  INFO {org.wso2.carbon.identity.user.store.configuration.deployer.UserStoreConfigurationDeployer} -  User Store Configuration Deployer initiated.
-TID: [0] [STRATOS] [2015-04-22 21:13:25,898]  INFO {org.wso2.carbon.stratos.landing.page.deployer.LandingPageWebappDeployer} -  Deployed product landing page webapp: StandardEngine[Catalina].StandardHost[localhost].StandardContext[/home]
-TID: [0] [STRATOS] [2015-04-22 21:13:25,930]  INFO {org.apache.axis2.transport.tcp.TCPTransportSender} -  TCP Sender started
-TID: [0] [STRATOS] [2015-04-22 21:13:25,951]  INFO {org.wso2.carbon.event.processor.core.internal.CarbonEventProcessorService} -  Execution plan deployment held back and in inactive state: AverageHeathRequest. Event receiver not found for stream ID : cartridge_agent_health_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:25,951]  INFO {org.wso2.carbon.event.processor.core.EventProcessorDeployer} -  Execution plan deployment held back and in inactive state : AverageHeathRequest ,waiting for dependency : cartridge_agent_health_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:25,955]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : AverageInFlightRequestsEventFormatter.xml, waiting for dependency : JMSOutputAdaptor
-TID: [0] [STRATOS] [2015-04-22 21:13:25,956]  INFO {org.wso2.carbon.event.processor.core.internal.CarbonEventProcessorService} -  Execution plan deployment held back and in inactive state: AverageInFlightRequestsFinder. Event receiver not found for stream ID : in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:25,956]  INFO {org.wso2.carbon.event.processor.core.EventProcessorDeployer} -  Execution plan deployment held back and in inactive state : AverageInFlightRequestsFinder ,waiting for dependency : in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:25,957]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : AverageLoadAverageEventFormatter.xml, waiting for dependency : JMSOutputAdaptor
-TID: [0] [STRATOS] [2015-04-22 21:13:25,958]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : AverageMemoryConsumptionEventFormatter.xml, waiting for dependency : JMSOutputAdaptor
-TID: [0] [STRATOS] [2015-04-22 21:13:25,958]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : AverageServedRequestsEventFormatter.xml, waiting for dependency : JMSOutputAdaptor
-TID: [0] [STRATOS] [2015-04-22 21:13:25,962]  INFO {org.wso2.carbon.event.input.adaptor.manager.core.InputEventAdaptorDeployer} -  Input Event Adaptor deployed successfully and in active state : DefaultWSO2EventInputAdaptor
-TID: [0] [STRATOS] [2015-04-22 21:13:25,965]  INFO {org.wso2.carbon.event.output.adaptor.manager.core.OutputEventAdaptorDeployer} -  Output Event Adaptor successfully deployed and in active state : DefaultWSO2EventOutputAdaptor
-TID: [0] [STRATOS] [2015-04-22 21:13:26,018]  INFO {org.wso2.carbon.core.deployment.DeploymentInterceptor} -  Deploying Axis2 service: echo {super-tenant}
-TID: [0] [STRATOS] [2015-04-22 21:13:26,081]  INFO {org.apache.axis2.deployment.DeploymentEngine} -  Deploying Web service: Echo.aar - file:/opt/wso2/apache-stratos/repository/deployment/server/axis2services/Echo.aar
-TID: [0] [STRATOS] [2015-04-22 21:13:26,082]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : FaultMessageEventFormatter.xml, waiting for dependency : JMSOutputAdaptor
-TID: [0] [STRATOS] [2015-04-22 21:13:26,083]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : GradientInFlightRequestsEventFormatter.xml, waiting for dependency : JMSOutputAdaptor
-TID: [0] [STRATOS] [2015-04-22 21:13:26,084]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : GradientLoadAverageEventFormatter.xml, waiting for dependency : JMSOutputAdaptor
-TID: [0] [STRATOS] [2015-04-22 21:13:26,085]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : GradientMemoryConsumptionEventFormatter.xml, waiting for dependency : JMSOutputAdaptor
-TID: [0] [STRATOS] [2015-04-22 21:13:26,086]  INFO {org.wso2.carbon.event.processor.core.internal.CarbonEventProcessorService} -  Execution plan deployment held back and in inactive state: GradientOfHealthRequest. Event receiver not found for stream ID : cartridge_agent_health_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,086]  INFO {org.wso2.carbon.event.processor.core.EventProcessorDeployer} -  Execution plan deployment held back and in inactive state : GradientOfHealthRequest ,waiting for dependency : cartridge_agent_health_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,087]  INFO {org.wso2.carbon.event.processor.core.internal.CarbonEventProcessorService} -  Execution plan deployment held back and in inactive state: GradientOfRequestsInFlightFinder. Event receiver not found for stream ID : in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,087]  INFO {org.wso2.carbon.event.processor.core.EventProcessorDeployer} -  Execution plan deployment held back and in inactive state : GradientOfRequestsInFlightFinder ,waiting for dependency : in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,110]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: cartridge_agent_health_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,113]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:cartridge_agent_health_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,114]  INFO {org.wso2.carbon.event.processor.core.EventProcessorDeployer} -  Execution Plan was undeployed successfully : AverageHeathRequest.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:26,308]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:cartridge_agent_health_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,308]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:average_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,308]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:member_average_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,308]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:member_average_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,309]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:average_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,309]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:fault_message:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,309]  INFO {org.wso2.carbon.event.processor.core.EventProcessorDeployer} -  Execution plan is deployed successfully and in active state  : AverageHeathRequest
-TID: [0] [STRATOS] [2015-04-22 21:13:26,309]  INFO {org.wso2.carbon.event.processor.core.EventProcessorDeployer} -  Execution Plan was undeployed successfully : GradientOfHealthRequest.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:26,401]  INFO {org.apache.stratos.common.threading.StratosThreadPool} -  Thread pool created: [type] Executor Service [id] cep.extension.thread.pool [size] 10
-TID: [0] [STRATOS] [2015-04-22 21:13:26,406]  INFO {org.apache.stratos.cep.extension.CEPTopologyEventReceiver} -  CEP topology event receiver thread started
-TID: [0] [STRATOS] [2015-04-22 21:13:26,406]  INFO {org.apache.stratos.messaging.message.receiver.topology.TopologyEventMessageDelegator} -  Topology event message delegator started
-TID: [0] [STRATOS] [2015-04-22 21:13:26,409]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:cartridge_agent_health_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,410]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:gradient_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,410]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:gradient_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,410]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:member_gradient_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,410]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:member_gradient_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,410]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:fault_message:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,410]  INFO {org.wso2.carbon.event.processor.core.EventProcessorDeployer} -  Execution plan is deployed successfully and in active state  : GradientOfHealthRequest
-TID: [0] [STRATOS] [2015-04-22 21:13:26,413]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : HealthStatisticsEventBuilder
-TID: [0] [STRATOS] [2015-04-22 21:13:26,425]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event builder deployment held back and in inactive state :InstanceStatusStatisticsBuilder, Stream validation exception : Input stream definition is not available 
-TID: [0] [STRATOS] [2015-04-22 21:13:26,426]  INFO {org.wso2.carbon.event.output.adaptor.manager.core.OutputEventAdaptorDeployer} -  Output Event Adaptor successfully deployed and in active state : JMSOutputAdaptor
-TID: [0] [STRATOS] [2015-04-22 21:13:26,427]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : AverageInFlightRequestsEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:26,440]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : AverageInFlightRequestsEventFormatter.xml, waiting for dependency : average_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,440]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : AverageLoadAverageEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:26,452]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:average_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,452]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : AverageLoadAverageEventFormatter
-TID: [0] [STRATOS] [2015-04-22 21:13:26,452]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : AverageMemoryConsumptionEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:26,460]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:average_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,461]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : AverageMemoryConsumptionEventFormatter
-TID: [0] [STRATOS] [2015-04-22 21:13:26,461]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : AverageServedRequestsEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:26,469]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : AverageServedRequestsEventFormatter.xml, waiting for dependency : average_served_request_count:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,469]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : FaultMessageEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:26,476]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:fault_message:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,477]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : FaultMessageEventFormatter
-TID: [0] [STRATOS] [2015-04-22 21:13:26,477]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : GradientInFlightRequestsEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:26,484]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : GradientInFlightRequestsEventFormatter.xml, waiting for dependency : gradient_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,484]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : GradientLoadAverageEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:26,492]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:gradient_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,492]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : GradientLoadAverageEventFormatter
-TID: [0] [STRATOS] [2015-04-22 21:13:26,492]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : GradientMemoryConsumptionEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:26,500]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:gradient_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,500]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : GradientMemoryConsumptionEventFormatter
-TID: [0] [STRATOS] [2015-04-22 21:13:26,508]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,509]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,509]  INFO {org.wso2.carbon.event.processor.core.EventProcessorDeployer} -  Execution Plan was undeployed successfully : AverageInFlightRequestsFinder.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:26,522]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : AverageInFlightRequestsEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:26,526]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:average_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,526]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : AverageRequestsInflightEventFormatter
-TID: [0] [STRATOS] [2015-04-22 21:13:26,527]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : AverageServedRequestsEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:26,530]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:average_served_request_count:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,531]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : AverageServedRequestsEventFormatter
-TID: [0] [STRATOS] [2015-04-22 21:13:26,531]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,531]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:average_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,531]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:average_served_request_count:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,531]  INFO {org.wso2.carbon.event.processor.core.EventProcessorDeployer} -  Execution plan is deployed successfully and in active state  : AverageInFlightRequestsFinder
-TID: [0] [STRATOS] [2015-04-22 21:13:26,531]  INFO {org.wso2.carbon.event.processor.core.EventProcessorDeployer} -  Execution Plan was undeployed successfully : GradientOfRequestsInFlightFinder.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:26,537]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : GradientInFlightRequestsEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:26,541]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:gradient_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,541]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : GradientInFlightRequestsEventFormatter
-TID: [0] [STRATOS] [2015-04-22 21:13:26,541]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,541]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:gradient_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,541]  INFO {org.wso2.carbon.event.processor.core.EventProcessorDeployer} -  Execution plan is deployed successfully and in active state  : GradientOfRequestsInFlightFinder
-TID: [0] [STRATOS] [2015-04-22 21:13:26,541]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : LoadBalancerStatisticsEventBuilder
-TID: [0] [STRATOS] [2015-04-22 21:13:26,549]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:member_average_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,549]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : MemberAverageLoadAverageEventFormatter
-TID: [0] [STRATOS] [2015-04-22 21:13:26,557]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:member_average_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,557]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : MemberAverageMemoryConsumptionEventFormatter
-TID: [0] [STRATOS] [2015-04-22 21:13:26,565]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:member_gradient_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,565]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : MemberGradientLoadAverageEventFormatter
-TID: [0] [STRATOS] [2015-04-22 21:13:26,573]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:member_gradient_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,573]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : MemberGradientMemoryConsumptionEventFormatter
-TID: [0] [STRATOS] [2015-04-22 21:13:26,581]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : MemberSecondDerivativeLoadAverageEventFormatter.xml, waiting for dependency : member_second_derivative_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,588]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : MemberSecondDerivativeMemoryConsumptionEventFormatter.xml, waiting for dependency : member_second_derivative_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,613]  INFO {org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer} -  Deployed webapp: StandardEngine[Catalina].StandardHost[localhost].StandardContext[/STRATOS_ROOT].File[/opt/wso2/apache-stratos/repository/deployment/server/webapps/STRATOS_ROOT]
-TID: [0] [STRATOS] [2015-04-22 21:13:26,625]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : SecondDerivativeInFlightRequestsEventFormatter.xml, waiting for dependency : second_derivative_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,632]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : SecondDerivativeLoadAverageEventFormatter.xml, waiting for dependency : second_derivative_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,641]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : SecondDerivativeMemoryConsumptionEventFormatter.xml, waiting for dependency : second_derivative_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,659]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : SecondDerivativeMemoryConsumptionEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:26,663]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:second_derivative_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,663]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : SecondDerivativeMemoryConsumptionEventFormatter
-TID: [0] [STRATOS] [2015-04-22 21:13:26,664]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : SecondDerivativeLoadAverageEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:26,668]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:second_derivative_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,668]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : SecondDerivativeLoadAverageEventFormatter
-TID: [0] [STRATOS] [2015-04-22 21:13:26,668]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : MemberSecondDerivativeMemoryConsumptionEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:26,672]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:member_second_derivative_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,672]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : MemberSecondDerivativeMemoryConsumptionEventFormatter
-TID: [0] [STRATOS] [2015-04-22 21:13:26,672]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : MemberSecondDerivativeLoadAverageEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:26,676]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:member_second_derivative_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,676]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : MemberSecondDerivativeLoadAverageEventFormatter
-TID: [0] [STRATOS] [2015-04-22 21:13:26,676]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:cartridge_agent_health_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,676]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:second_derivative_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,676]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:second_derivative_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,676]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:member_second_derivative_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,676]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:member_second_derivative_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,676]  INFO {org.wso2.carbon.event.processor.core.EventProcessorDeployer} -  Execution plan is deployed successfully and in active state  : SecondDerivativeOfHealthRequest
-TID: [0] [STRATOS] [2015-04-22 21:13:26,681]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : SecondDerivativeInFlightRequestsEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:26,685]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:second_derivative_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,685]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : SecondDerivativeEventFormatter
-TID: [0] [STRATOS] [2015-04-22 21:13:26,685]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,685]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:second_derivative_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,685]  INFO {org.wso2.carbon.event.processor.core.EventProcessorDeployer} -  Execution plan is deployed successfully and in active state  : SecondDerivativeOfRequestsInFlightFinder
-TID: [0] [STRATOS] [2015-04-22 21:13:26,758]  INFO {org.wso2.carbon.core.deployment.DeploymentInterceptor} -  Deploying Axis2 service: Version {super-tenant}
-TID: [0] [STRATOS] [2015-04-22 21:13:26,781]  INFO {org.apache.axis2.deployment.DeploymentEngine} -  Deploying Web service: Version.aar - file:/opt/wso2/apache-stratos/repository/deployment/server/axis2services/Version.aar
-TID: [0] [STRATOS] [2015-04-22 21:13:27,542]  INFO {org.springframework.web.context.support.XmlWebApplicationContext} -  Refreshing Root WebApplicationContext: startup date [Wed Apr 22 21:13:27 UTC 2015]; root of context hierarchy
-TID: [0] [STRATOS] [2015-04-22 21:13:27,626]  INFO {org.springframework.beans.factory.xml.XmlBeanDefinitionReader} -  Loading XML bean definitions from class path resource [META-INF/cxf/cxf.xml]
-TID: [0] [STRATOS] [2015-04-22 21:13:27,696]  INFO {org.springframework.beans.factory.xml.XmlBeanDefinitionReader} -  Loading XML bean definitions from URL [jndi:/localhost/api/WEB-INF/cxf-servlet.xml]
-TID: [0] [STRATOS] [2015-04-22 21:13:27,819]  INFO {org.springframework.beans.factory.support.DefaultListableBeanFactory} -  Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@5f0c5ef9: defining beans [cxf,org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,stratosApi,stratosApiV40,stratosApiV41,stratosApiBeanV40,stratosApiBeanV41,basicAuthenticationFilter,sessionAuthenticationFilter,authorizationFilterV40,authorizationFilterV41,exceptionHandler,badRequestExceptionHandler,genericExceptionHandler,throwableExceptionHandler,componentSynchronizerHandler,OAuthFilter,jsonProvider,schemaHolder,theSchemas]; root of factory hierarchy
-TID: [0] [STRATOS] [2015-04-22 21:13:28,319]  INFO {org.apache.cxf.endpoint.ServerImpl} -  Setting the server's publish address to be /
-TID: [0] [STRATOS] [2015-04-22 21:13:28,432]  INFO {org.apache.cxf.endpoint.ServerImpl} -  Setting the server's publish address to be /v4.0
-TID: [0] [STRATOS] [2015-04-22 21:13:28,455]  INFO {org.apache.cxf.endpoint.ServerImpl} -  Setting the server's publish address to be /v4.1
-TID: [0] [STRATOS] [2015-04-22 21:13:28,487]  WARN {org.apache.cxf.jaxrs.utils.ResourceUtils} -  No resource classpath:META-INF/jax-rs-catalog.xml is available
-TID: [0] [STRATOS] [2015-04-22 21:13:28,511]  INFO {org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer} -  Deployed webapp: StandardEngine[Catalina].StandardHost[localhost].StandardContext[/api].File[/opt/wso2/apache-stratos/repository/deployment/server/webapps/api.war]
-TID: [0] [STRATOS] [2015-04-22 21:13:28,556]  INFO {org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer} -  Deployed webapp: StandardEngine[Catalina].StandardHost[localhost].StandardContext[/authenticationendpoint].File[/opt/wso2/apache-stratos/repository/deployment/server/webapps/authenticationendpoint.war]
-TID: [0] [STRATOS] [2015-04-22 21:13:28,561]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: average_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:28,562]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:average_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:28,562]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : average_in_flight_requests_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 21:13:28,566]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: average_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:28,567]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:average_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:28,568]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : average_load_average_stats_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 21:13:28,571]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: average_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:28,573]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:average_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:28,573]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : average_memory_consumption_stats_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 21:13:28,576]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: average_served_request_count:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:28,578]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:average_served_request_count:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:28,578]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : average_served_request_count_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 21:13:28,581]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : cartridge_agent_health_stats_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 21:13:28,588]  WARN {org.wso2.securevault.secret.handler.SecretManagerSecretCallbackHandler} -  SecretManager has not been initialized.Cannot collect secrets.
-TID: [0] [STRATOS] [2015-04-22 21:13:28,588]  WARN {org.apache.stratos.cloud.controller.config.parser.IaasProviderConfigParser} -  Unable to find a value for identity element from Secure Vault.Hence we will try to assign the plain text value (if specified).
-TID: [0] [STRATOS] [2015-04-22 21:13:28,589]  WARN {org.wso2.securevault.secret.handler.SecretManagerSecretCallbackHandler} -  SecretManager has not been initialized.Cannot collect secrets.
-TID: [0] [STRATOS] [2015-04-22 21:13:28,589]  WARN {org.apache.stratos.cloud.controller.config.parser.IaasProviderConfigParser} -  Unable to find a value for credential element from Secure Vault.Hence we will try to assign the plain text value (if specified).
-TID: [0] [STRATOS] [2015-04-22 21:13:28,589]  INFO {org.apache.stratos.cloud.controller.deployers.CloudControllerDeployer} -  Successfully deployed the cloud-controller XML file located at /opt/wso2/apache-stratos/repository/deployment/server/../../conf/cloud-controller.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:29,344]  INFO {org.jaggeryjs.jaggery.app.mgt.TomcatJaggeryWebappsDeployer} -  Deployed webapp: StandardEngine[Catalina].StandardHost[localhost].StandardContext[/console].File[/opt/wso2/apache-stratos/repository/deployment/server/jaggeryapps/console]
-TID: [0] [STRATOS] [2015-04-22 21:13:29,350]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: fault_message:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:29,351]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:fault_message:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:29,351]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : fault_message_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 21:13:29,356]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: gradient_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:29,357]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:gradient_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:29,358]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : gradient_in_flight_requests_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 21:13:29,362]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: gradient_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:29,364]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:gradient_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:29,364]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : gradient_load_average_stats_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 21:13:29,368]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: gradient_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:29,369]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:gradient_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:29,369]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : gradient_memory_consumption_stats_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 21:13:29,373]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : in_flight_requests_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 21:13:29,377]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: member_average_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:29,379]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:member_average_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:29,379]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : member_average_load_average_stats_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 21:13:29,383]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: member_average_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:29,385]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:member_average_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:29,385]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : member_average_memory_consumption_stats_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 21:13:29,389]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: member_gradient_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:29,390]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:member_gradient_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:29,390]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : member_gradient_load_average_stats_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 21:13:29,394]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: member_gradient_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:29,396]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:member_gradient_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:29,396]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : member_gradient_memory_consumption_stats_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 21:13:29,400]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: member_second_derivative_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:29,402]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:member_second_derivative_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:29,402]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : member_second_derivative_load_average_stats_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 21:13:29,406]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: member_second_derivative_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:29,408]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:member_second_derivative_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:29,408]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : member_second_derivative_memory_consumption_stats_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 21:13:30,125]  INFO {org.springframework.web.context.support.XmlWebApplicationContext} -  Refreshing Root WebApplicationContext: startup date [Wed Apr 22 21:13:30 UTC 2015]; root of context hierarchy
-TID: [0] [STRATOS] [2015-04-22 21:13:30,168]  INFO {org.springframework.beans.factory.xml.XmlBeanDefinitionReader} -  Loading XML bean definitions from class path resource [META-INF/cxf/cxf.xml]
-TID: [0] [STRATOS] [2015-04-22 21:13:30,204]  INFO {org.springframework.beans.factory.xml.XmlBeanDefinitionReader} -  Loading XML bean definitions from URL [jndi:/localhost/metadata/WEB-INF/cxf-servlet.xml]
-TID: [0] [STRATOS] [2015-04-22 21:13:30,299]  INFO {org.springframework.beans.factory.support.DefaultListableBeanFactory} -  Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@47cdc4af: defining beans [cxf,org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,stratosMetaDataAdmin,stratosRestEndpointBean,exceptionHandler,genericExceptionHandler,throwableExceptionHandler,OAuthFilter,jsonProvider]; root of factory hierarchy
-TID: [0] [STRATOS] [2015-04-22 21:13:30,774]  INFO {org.apache.cxf.endpoint.ServerImpl} -  Setting the server's publish address to be /api
-TID: [0] [STRATOS] [2015-04-22 21:13:30,827]  INFO {org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer} -  Deployed webapp: StandardEngine[Catalina].StandardHost[localhost].StandardContext[/metadata].File[/opt/wso2/apache-stratos/repository/deployment/server/webapps/metadata.war]
-TID: [0] [STRATOS] [2015-04-22 21:13:31,529]  INFO {org.springframework.web.context.support.XmlWebApplicationContext} -  Refreshing Root WebApplicationContext: startup date [Wed Apr 22 21:13:31 UTC 2015]; root of context hierarchy
-TID: [0] [STRATOS] [2015-04-22 21:13:31,570]  INFO {org.springframework.beans.factory.xml.XmlBeanDefinitionReader} -  Loading XML bean definitions from class path resource [META-INF/cxf/cxf.xml]
-TID: [0] [STRATOS] [2015-04-22 21:13:31,601]  INFO {org.springframework.beans.factory.xml.XmlBeanDefinitionReader} -  Loading XML bean definitions from URL [jndi:/localhost/mock-iaas/WEB-INF/cxf-servlet.xml]
-TID: [0] [STRATOS] [2015-04-22 21:13:31,685]  INFO {org.springframework.beans.factory.support.DefaultListableBeanFactory} -  Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@3d731d5a: defining beans [cxf,org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,mockIaasApi,mockIaasApiBean,exceptionHandler,badRequestExceptionHandler,genericExceptionHandler,throwableExceptionHandler,jsonProvider]; root of factory hierarchy
-TID: [0] [STRATOS] [2015-04-22 21:13:32,038]  INFO {org.apache.cxf.endpoint.ServerImpl} -  Setting the server's publish address to be /api
-TID: [0] [STRATOS] [2015-04-22 21:13:32,087]  INFO {org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer} -  Deployed webapp: StandardEngine[Catalina].StandardHost[localhost].StandardContext[/mock-iaas].File[/opt/wso2/apache-stratos/repository/deployment/server/webapps/mock-iaas.war]
-TID: [0] [STRATOS] [2015-04-22 21:13:32,861]  INFO {org.springframework.web.context.support.XmlWebApplicationContext} -  Refreshing Root WebApplicationContext: startup date [Wed Apr 22 21:13:32 UTC 2015]; root of context hierarchy
-TID: [0] [STRATOS] [2015-04-22 21:13:32,901]  INFO {org.springframework.beans.factory.xml.XmlBeanDefinitionReader} -  Loading XML bean definitions from class path resource [META-INF/cxf/cxf.xml]
-TID: [0] [STRATOS] [2015-04-22 21:13:32,932]  INFO {org.springframework.beans.factory.xml.XmlBeanDefinitionReader} -  Loading XML bean definitions from URL [jndi:/localhost/oauth2/WEB-INF/cxf-servlet.xml]
-TID: [0] [STRATOS] [2015-04-22 21:13:33,013]  INFO {org.springframework.beans.factory.support.DefaultListableBeanFactory} -  Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@6bbe35d2: defining beans [cxf,org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,tokEP,authzEndpointBean,tokenEndpointBean,revokeEndpointBean,userinfoEndpointBean]; root of factory hierarchy
-TID: [0] [STRATOS] [2015-04-22 21:13:33,348]  INFO {org.apache.cxf.endpoint.ServerImpl} -  Setting the server's publish address to be /
-TID: [0] [STRATOS] [2015-04-22 21:13:33,409]  INFO {org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer} -  Deployed webapp: StandardEngine[Catalina].StandardHost[localhost].StandardContext[/oauth2].File[/opt/wso2/apache-stratos/repository/deployment/server/webapps/oauth2.war]
-TID: [0] [STRATOS] [2015-04-22 21:13:33,416]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: second_derivative_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:33,417]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:second_derivative_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:33,417]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : second_derivative_in_flight_requests_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 21:13:33,421]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: second_derivative_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:33,423]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:second_derivative_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:33,423]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : second_derivative_load_average_stats_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 21:13:33,426]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: second_derivative_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:33,428]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:second_derivative_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:33,428]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : second_derivative_memory_consumption_stats_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 21:13:33,660]  INFO {org.jaggeryjs.jaggery.app.mgt.TomcatJaggeryWebappsDeployer} -  Deployed webapp: StandardEngine[Catalina].StandardHost[localhost].StandardContext[/sso].File[/opt/wso2/apache-stratos/repository/deployment/server/jaggeryapps/sso]
-TID: [0] [STRATOS] [2015-04-22 21:13:33,726]  INFO {org.apache.axis2.deployment.ModuleDeployer} -  Deploying module: addressing-1.6.1-wso2v10 - file:/opt/wso2/apache-stratos/repository/deployment/client/modules/addressing-1.6.1-wso2v10.mar
-TID: [0] [STRATOS] [2015-04-22 21:13:33,730]  INFO {org.apache.axis2.deployment.ModuleDeployer} -  Deploying module: rampart-1.6.1-wso2v8 - file:/opt/wso2/apache-stratos/repository/deployment/client/modules/rampart-1.6.1-wso2v8.mar
-TID: [0] [STRATOS] [2015-04-22 21:13:33,732]  INFO {org.apache.axis2.transport.tcp.TCPTransportSender} -  TCP Sender started
-TID: [0] [STRATOS] [2015-04-22 21:13:33,972]  INFO {org.wso2.carbon.core.deployment.DeploymentInterceptor} -  Deploying Axis2 service: AutoscalerService {super-tenant}
-TID: [0] [STRATOS] [2015-04-22 21:13:34,290]  INFO {org.apache.axis2.deployment.DeploymentEngine} -  Deploying Web service: org.apache.stratos.autoscaler - 
-TID: [0] [STRATOS] [2015-04-22 21:13:34,401]  INFO {org.wso2.carbon.core.deployment.DeploymentInterceptor} -  Deploying Axis2 service: CloudControllerService {super-tenant}
-TID: [0] [STRATOS] [2015-04-22 21:13:34,550]  INFO {org.apache.axis2.deployment.DeploymentEngine} -  Deploying Web service: org.apache.stratos.cloud.controller - 
-TID: [0] [STRATOS] [2015-04-22 21:13:34,573]  INFO {org.wso2.carbon.core.deployment.DeploymentInterceptor} -  Deploying Axis2 service: StratosManagerService {super-tenant}
-TID: [0] [STRATOS] [2015-04-22 21:13:34,693]  INFO {org.apache.axis2.deployment.DeploymentEngine} -  Deploying Web service: org.apache.stratos.manager - 
-TID: [0] [STRATOS] [2015-04-22 21:13:35,228]  WARN {org.apache.axis2.description.java2wsdl.DefaultSchemaGenerator} -  We don't support method overloading. Ignoring [validateAudienceRestriction]
-TID: [0] [STRATOS] [2015-04-22 21:13:35,453]  INFO {org.apache.axis2.deployment.DeploymentEngine} -  Deploying Web service: org.wso2.carbon.idp.mgt - 
-TID: [0] [STRATOS] [2015-04-22 21:13:35,777]  INFO {org.wso2.carbon.core.deployment.DeploymentInterceptor} -  Deploying Axis2 service: wso2carbon-sts {super-tenant}
-TID: [0] [STRATOS] [2015-04-22 21:13:35,820]  INFO {org.apache.axis2.deployment.DeploymentEngine} -  Deploying Web service: org.wso2.carbon.sts - 
-TID: [0] [STRATOS] [2015-04-22 21:13:36,051]  INFO {org.wso2.carbon.core.init.CarbonServerManager} -  Repository       : /opt/wso2/apache-stratos/repository/deployment/server/
-TID: [0] [STRATOS] [2015-04-22 21:13:36,110]  INFO {org.apache.stratos.common.internal.ComponentStartUpSynchronizerImpl} -  Component activation check interval: 1 seconds
-TID: [0] [STRATOS] [2015-04-22 21:13:36,110]  INFO {org.apache.stratos.common.internal.ComponentStartUpSynchronizerImpl} -  Component activation timeout: 600 seconds
-TID: [0] [STRATOS] [2015-04-22 21:13:36,118]  INFO {org.apache.stratos.common.internal.CommonServiceComponent} -  Stratos common service component is activated
-TID: [0] [STRATOS] [2015-04-22 21:13:36,197]  INFO {org.wso2.carbon.core.internal.permission.update.PermissionUpdater} -  Permission cache updated for tenant -1234
-TID: [0] [STRATOS] [2015-04-22 21:13:36,470]  INFO {org.wso2.carbon.databridge.receiver.thrift.internal.ThriftDataReceiver} -  Thrift Server started at 0.0.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:36,479]  INFO {org.wso2.carbon.databridge.receiver.thrift.internal.ThriftDataReceiver} -  Thrift SSL port : 7711
-TID: [0] [STRATOS] [2015-04-22 21:13:36,483]  INFO {org.wso2.carbon.databridge.receiver.thrift.internal.ThriftDataReceiver} -  Thrift port : 7611
-TID: [0] [STRATOS] [2015-04-22 21:13:36,551]  INFO {org.wso2.carbon.event.input.adaptor.wsevent.local.internal.ds.WSEventLocalEventAdaptorServiceDS} -  Successfully deployed the input WSEventLocal adaptor service
-TID: [0] [STRATOS] [2015-04-22 21:13:36,558]  INFO {org.wso2.carbon.event.output.adaptor.wsevent.local.internal.ds.WSEventLocalEventAdaptorServiceDS} -  Successfully deployed the output WSEventLocal adaptor service
-TID: [0] [STRATOS] [2015-04-22 21:13:36,567]  INFO {org.wso2.carbon.event.input.adaptor.email.internal.ds.EmailEventAdaptorServiceDS} -  Successfully deployed the input email event service
-TID: [0] [STRATOS] [2015-04-22 21:13:36,573]  INFO {org.wso2.carbon.event.input.adaptor.wsevent.internal.ds.WSEventAdaptorServiceDS} -  Successfully deployed the input WSEvent adaptor service
-TID: [0] [STRATOS] [2015-04-22 21:13:36,580]  INFO {org.wso2.carbon.event.output.adaptor.email.internal.ds.EmailEventAdaptorServiceDS} -  Successfully deployed the output Email event adaptor service
-TID: [0] [STRATOS] [2015-04-22 21:13:36,587]  INFO {org.wso2.carbon.event.output.adaptor.sms.internal.ds.SMSEventAdaptorServiceDS} -  Successfully deployed the output SMS event adaptor service
-TID: [0] [STRATOS] [2015-04-22 21:13:36,595]  INFO {org.wso2.carbon.event.output.adaptor.wsevent.internal.ds.WSEventAdaptorServiceDS} -  Successfully deployed the output WSEvent adaptor service
-TID: [0] [STRATOS] [2015-04-22 21:13:36,600]  INFO {org.wso2.carbon.identity.application.mgt.ui.internal.ApplicationMgtUIServiceComponent} -  Application Management UI bundle acticated!
-TID: [0] [STRATOS] [2015-04-22 21:13:36,641]  INFO {org.wso2.carbon.idp.mgt.internal.IdPManagementServiceComponent} -  Identity Application Management Database initialization not attempted since 'setup' variable was not provided during startup
-TID: [0] [STRATOS] [2015-04-22 21:13:36,734]  INFO {org.wso2.carbon.identity.core.internal.IdentityCoreServiceComponent} -  Identity Database schema initialization check was skipped since 'setup' variable was not given during startup
-TID: [0] [STRATOS] [2015-04-22 21:13:36,868]  INFO {org.wso2.carbon.core.transports.http.HttpsTransportListener} -  HTTPS port       : 9443
-TID: [0] [STRATOS] [2015-04-22 21:13:36,868]  INFO {org.wso2.carbon.core.transports.http.HttpTransportListener} -  HTTP port        : 9763
-TID: [0] [STRATOS] [2015-04-22 21:13:36,968]  INFO {org.wso2.carbon.ntask.core.service.impl.TaskServiceImpl} -  Task service starting in STANDALONE mode...
-TID: [0] [STRATOS] [2015-04-22 21:13:37,007]  INFO {org.apache.stratos.common.threading.StratosThreadPool} -  Thread pool created: [type] Executor Service [id] autoscaler.thread.pool [size] 50
-TID: [0] [STRATOS] [2015-04-22 21:13:37,007]  INFO {org.apache.stratos.common.threading.StratosThreadPool} -  Thread pool created: [type] Scheduled Executor Service [id] autoscaler.scheduler.thread.pool [size] 5
-TID: [0] [STRATOS] [2015-04-22 21:13:37,009]  INFO {org.apache.stratos.common.internal.ComponentStartUpSynchronizerImpl} -  Autoscaler component is waiting for CloudController component to become active...
-TID: [0] [STRATOS] [2015-04-22 21:13:37,015]  INFO {org.apache.stratos.common.threading.StratosThreadPool} -  Thread pool created: [type] Executor Service [id] cloud.controller.thread.pool [size] 10
-TID: [0] [STRATOS] [2015-04-22 21:13:37,016]  INFO {org.apache.stratos.common.threading.StratosThreadPool} -  Thread pool created: [type] Scheduled Executor Service [id] cloud.controller.scheduler.thread.pool [size] 5
-TID: [0] [STRATOS] [2015-04-22 21:13:37,019]  INFO {org.apache.stratos.common.threading.StratosThreadPool} -  Thread pool created: [type] Executor Service [id] cloud.controller.context.thread.pool [size] 10
-TID: [0] [STRATOS] [2015-04-22 21:13:37,020]  INFO {org.apache.stratos.common.threading.StratosThreadPool} -  Thread pool created: [type] Executor Service [id] stratos.manager.thread.pool [size] 20
-TID: [0] [STRATOS] [2015-04-22 21:13:37,020]  INFO {org.apache.stratos.common.threading.StratosThreadPool} -  Thread pool created: [type] Scheduled Executor Service [id] stratos.manager.scheduler.thread.pool [size] 5
-TID: [0] [STRATOS] [2015-04-22 21:13:37,021]  INFO {org.apache.stratos.common.internal.ComponentStartUpSynchronizerImpl} -  StratosManager component is waiting for CloudController component to become active...
-TID: [0] [STRATOS] [2015-04-22 21:13:37,025]  INFO {org.apache.stratos.common.threading.StratosThreadPool} -  Thread pool created: [type] Executor Service [id] cloud.controller.instance.manager.thread.pool [size] 50
-TID: [0] [STRATOS] [2015-04-22 21:13:37,040]  INFO {org.apache.stratos.cloud.controller.messaging.receiver.application.ApplicationEventReceiver} -  Cloud controller application event receiver thread started
-TID: [0] [STRATOS] [2015-04-22 21:13:37,043]  INFO {org.apache.stratos.cloud.controller.internal.CloudControllerServiceComponent} -  Application event receiver thread started
-TID: [0] [STRATOS] [2015-04-22 21:13:37,047]  INFO {org.apache.stratos.messaging.message.receiver.application.ApplicationsEventMessageDelegator} -  Application status event message delegator started
-TID: [0] [STRATOS] [2015-04-22 21:13:37,060]  INFO {org.wso2.carbon.core.init.JMXServerManager} -  JMX Service URL  : service:jmx:rmi://localhost:11111/jndi/rmi://localhost:9999/jmxrmi
-TID: [0] [STRATOS] [2015-04-22 21:13:37,061]  INFO {org.wso2.carbon.core.internal.StartupFinalizerServiceComponent} -  Server           :  Apache Stratos-4.1.0
-TID: [0] [STRATOS] [2015-04-22 21:13:37,061]  INFO {org.wso2.carbon.core.internal.StartupFinalizerServiceComponent} -  WSO2 Carbon started in 26 sec
-TID: [0] [STRATOS] [2015-04-22 21:13:37,063]  INFO {org.apache.stratos.cloud.controller.messaging.receiver.cluster.status.ClusterStatusTopicReceiver} -  Cloud controller Cluster status thread started
-TID: [0] [STRATOS] [2015-04-22 21:13:37,063]  INFO {org.apache.stratos.cloud.controller.internal.CloudControllerServiceComponent} -  Cluster status event receiver thread started
-TID: [0] [STRATOS] [2015-04-22 21:13:37,063]  INFO {org.apache.stratos.messaging.message.receiver.cluster.status.ClusterStatusEventMessageDelegator} -  Cluster Status event message delegator started
-TID: [0] [STRATOS] [2015-04-22 21:13:37,087]  INFO {org.apache.stratos.cloud.controller.messaging.receiver.instance.status.InstanceStatusTopicReceiver} -  Cloud controller application status thread started
-TID: [0] [STRATOS] [2015-04-22 21:13:37,091]  INFO {org.apache.stratos.cloud.controller.messaging.receiver.instance.status.InstanceStatusTopicReceiver} -  Cloud controller application status thread terminated
-TID: [0] [STRATOS] [2015-04-22 21:13:37,091]  INFO {org.apache.stratos.cloud.controller.internal.CloudControllerServiceComponent} -  Instance status event receiver thread started
-TID: [0] [STRATOS] [2015-04-22 21:13:37,091]  INFO {org.apache.stratos.cloud.controller.internal.CloudControllerServiceComponent} -  Scheduling topology synchronizer task
-TID: [0] [STRATOS] [2015-04-22 21:13:37,091]  INFO {org.apache.stratos.messaging.message.receiver.instance.status.InstanceStatusEventMessageDelegator} -  Instance notifier event message delegator started
-TID: [0] [STRATOS] [2015-04-22 21:13:37,098]  INFO {org.apache.stratos.common.internal.ComponentStartUpSynchronizerImpl} -  CloudController component became active
-TID: [0] [STRATOS] [2015-04-22 21:13:37,098]  INFO {org.apache.stratos.cloud.controller.internal.CloudControllerServiceComponent} -  Cloud controller service component activated
-TID: [0] [STRATOS] [2015-04-22 21:13:37,577]  INFO {org.wso2.carbon.ui.internal.CarbonUIServiceComponent} -  Mgt Console URL  : https://172.16.2.207:9443/carbon/
-TID: [0] [STRATOS] [2015-04-22 21:13:38,022]  INFO {org.apache.stratos.common.internal.ComponentStartUpSynchronizerImpl} -  StratosManager component is waiting for Autoscaler component to become active...
-TID: [0] [STRATOS] [2015-04-22 21:13:38,037]  INFO {org.apache.stratos.autoscaler.event.receiver.topology.AutoscalerTopologyEventReceiver} -  Autoscaler topology receiver thread started
-TID: [0] [STRATOS] [2015-04-22 21:13:38,038]  INFO {org.apache.stratos.messaging.message.receiver.topology.TopologyEventMessageDelegator} -  Topology event message delegator started
-TID: [0] [STRATOS] [2015-04-22 21:13:53,061]  INFO {org.apache.stratos.autoscaler.event.receiver.health.AutoscalerHealthStatEventReceiver} -  Autoscaler health stat event receiver thread started
-TID: [0] [STRATOS] [2015-04-22 21:13:53,061]  INFO {org.apache.stratos.messaging.message.receiver.health.stat.HealthStatEventMessageDelegator} -  Health stat event message delegator started
-TID: [0] [STRATOS] [2015-04-22 21:13:53,080]  INFO {org.apache.stratos.autoscaler.internal.AutoscalerServiceComponent} -  Scheduling tasks to publish applications
-TID: [0] [STRATOS] [2015-04-22 21:13:53,080]  INFO {org.apache.stratos.common.internal.ComponentStartUpSynchronizerImpl} -  Autoscaler component became active
-TID: [0] [STRATOS] [2015-04-22 21:13:53,080]  INFO {org.apache.stratos.autoscaler.internal.AutoscalerServiceComponent} -  Autoscaler service component activated
-TID: [0] [STRATOS] [2015-04-22 21:13:54,025]  INFO {org.apache.stratos.manager.utils.CartridgeConfigFileReader} -  Setting config properties into System properties
-TID: [0] [STRATOS] [2015-04-22 21:13:54,045]  INFO {org.apache.stratos.manager.internal.StratosManagerServiceComponent} -  Tenant event publisher initialized
-TID: [0] [STRATOS] [2015-04-22 21:13:54,050]  INFO {org.apache.stratos.manager.messaging.receiver.StratosManagerInstanceStatusEventReceiver} -  Stratos manager instance status event receiver thread started
-TID: [0] [STRATOS] [2015-04-22 21:13:54,051]  INFO {org.apache.stratos.messaging.message.receiver.instance.status.InstanceStatusEventMessageDelegator} -  Instance notifier event message delegator started
-TID: [0] [STRATOS] [2015-04-22 21:13:54,116]  INFO {org.apache.stratos.manager.messaging.receiver.StratosManagerTopologyEventReceiver} -  Stratos manager topology event receiver thread started
-TID: [0] [STRATOS] [2015-04-22 21:13:54,116]  INFO {org.apache.stratos.messaging.message.receiver.topology.TopologyEventMessageDelegator} -  Topology event message delegator started
-TID: [0] [STRATOS] [2015-04-22 21:13:54,120]  INFO {org.apache.stratos.manager.messaging.receiver.StratosManagerApplicationEventReceiver} -  Stratos manager application event receiver thread started
-TID: [0] [STRATOS] [2015-04-22 21:13:54,120]  INFO {org.apache.stratos.messaging.message.receiver.application.ApplicationsEventMessageDelegator} -  Application status event message delegator started
-TID: [0] [STRATOS] [2015-04-22 21:13:54,161]  INFO {org.apache.stratos.common.internal.ComponentStartUpSynchronizerImpl} -  StratosManager component became active
-TID: [0] [STRATOS] [2015-04-22 21:13:54,162]  INFO {org.apache.stratos.manager.internal.StratosManagerServiceComponent} -  Stratos manager component is activated
-TID: [0] [STRATOS] [2015-04-22 21:13:54,292]  INFO {org.apache.stratos.messaging.message.processor.topology.CompleteTopologyMessageProcessor} -  Topology initialized
-TID: [0] [STRATOS] [2015-04-22 21:13:54,292]  INFO {org.apache.stratos.messaging.message.processor.topology.CompleteTopologyMessageProcessor} -  Topology initialized
-TID: [0] [STRATOS] [2015-04-22 21:13:54,292]  INFO {org.apache.stratos.messaging.message.processor.topology.CompleteTopologyMessageProcessor} -  Topology initialized
-TID: [0] [STRATOS] [2015-04-22 21:13:54,293]  INFO {org.apache.stratos.autoscaler.event.receiver.topology.AutoscalerTopologyEventReceiver} -  [CompleteTopologyEvent] Received: class org.apache.stratos.messaging.event.topology.CompleteTopologyEvent
-TID: [0] [STRATOS] [2015-04-22 21:14:07,092]  INFO {org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceImpl} -  Adding network partition: [network-partition-id] RegionOne-AZ-1
-TID: [0] [STRATOS] [2015-04-22 21:14:07,092]  INFO {org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceImpl} -  Validating partition: [network-partition-id] RegionOne-AZ-1 [partition-id] RegionOne-AZ-1
-TID: [0] [STRATOS] [2015-04-22 21:14:08,551] ERROR {org.apache.stratos.cloud.controller.iaases.openstack.OpenstackIaas} -  Invalid zone: AZ-1 in the region: RegionOne and of the iaas: Core
-TID: [0] [STRATOS] [2015-04-22 21:14:08,552] ERROR {org.apache.stratos.cloud.controller.iaases.openstack.OpenstackPartitionValidator} -  Invalid partition detected: [partition-id] RegionOne-AZ-1Invalid zone: AZ-1 in the region: RegionOne and of the iaas: Core
-org.apache.stratos.cloud.controller.exception.InvalidZoneException: Invalid zone: AZ-1 in the region: RegionOne and of the iaas: Core
-	at org.apache.stratos.cloud.controller.iaases.openstack.OpenstackIaas.isValidZone(OpenstackIaas.java:289)
-	at org.apache.stratos.cloud.controller.iaases.openstack.OpenstackPartitionValidator.validate(OpenstackPartitionValidator.java:69)
-	at org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceUtil.validatePartitionAndGetIaasProvider(CloudControllerServiceUtil.java:97)
-	at org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceUtil.validatePartition(CloudControllerServiceUtil.java:108)
-	at org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceImpl.validatePartition(CloudControllerServiceImpl.java:1015)
-	at org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceImpl.addNetworkPartition(CloudControllerServiceImpl.java:1432)
-	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
-	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
-	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
-	at java.lang.reflect.Method.invoke(Method.java:606)
-	at org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:212)
-	at org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver.invokeBusinessLogic(RPCInOnlyMessageReceiver.java:66)
-	at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:110)
-	at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
-	at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172)
-	at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:146)
-	at org.wso2.carbon.core.transports.CarbonServlet.doPost(CarbonServlet.java:231)
-	at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)
-	at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
-	at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
-	at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)
-	at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:68)
-	at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
-	at org.wso2.carbon.tomcat.ext.servlet.DelegationServlet.service(DelegationServlet.java:68)
-	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
-	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
-	at org.wso2.carbon.tomcat.ext.filter.CharacterSetFilter.doFilter(CharacterSetFilter.java:61)
-	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
-	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
-	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
-	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
-	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
-	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
-	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
-	at org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:178)
-	at org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47)
-	at org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:56)
-	at org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47)
-	at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:141)
-	at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:156)
-	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
-	at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:52)
-	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
-	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
-	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
-	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
-	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1653)
-	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
-	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
-	at java.lang.Thread.r

<TRUNCATED>

[03/21] stratos git commit: Uplifting automation engine to v4.4.3, dynamically pick ports for integration tests

Posted by ra...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/cartridge-test/cartridges/mock/c0-cartridge-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/cartridge-test/cartridges/mock/c0-cartridge-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/cartridge-test/cartridges/mock/c0-cartridge-test.json
new file mode 100755
index 0000000..056d510
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/cartridge-test/cartridges/mock/c0-cartridge-test.json
@@ -0,0 +1,124 @@
+{
+    "category": "Application",
+    "description": "c0-cartridge-test Cartridge",
+    "displayName": "c0-cartridge-test",
+    "host": "qmog.cisco.com",
+    "iaasProvider": [
+        {
+            "imageId": "RegionOne/16e7e35b-0c88-4605-90ce-cbef9e9dde0f",
+            "maxInstanceLimit": "4",
+            "networkInterfaces": [
+                {
+                    "floatingNetworks": [
+                        {
+                            "name": "public",
+                            "networkUuid": "26b4aa2b-06bc-4e4f-a6eb-c19fbc211af6"
+                        }
+                    ],
+                    "name": "core",
+                    "networkUuid": "5e107fbd-4820-47ad-84ea-6f135496f889"
+                }
+            ],
+            "property": [
+                {
+                    "name": "instanceType",
+                    "value": "RegionOne/2cdbd576-8c9b-4c2d-8b1a-0f79dc4fb809"
+                },
+                {
+                    "name": "keyPair",
+                    "value": "phoenix"
+                },
+                {
+                    "name": "autoAssignIp",
+                    "value": "false"
+                },
+                {
+                    "name": "securityGroups",
+                    "value": "default"
+                }
+            ],
+            "type": "mock"
+        }
+    ],
+    "multiTenant": "false",
+    "portMapping": [
+        {
+            "port": "22",
+            "protocol": "http",
+            "proxyPort": "8280"
+        }
+    ],
+    "property": [
+        {
+            "name": "payload_parameter.MB_IP",
+            "value": "octl.qmog.cisco.com"
+        },
+        {
+            "name": "payload_parameter.MB_PORT",
+            "value": "61616"
+        },
+        {
+            "name": "payload_parameter.CEP_IP",
+            "value": "octl.qmog.cisco.com"
+        },
+        {
+            "name": "payload_parameter.CEP_PORT",
+            "value": "7611"
+        },
+        {
+            "name": "payload_parameter.CEP_ADMIN_USERNAME",
+            "value": "admin"
+        },
+        {
+            "name": "payload_parameter.CEP_ADMIN_PASSWORD",
+            "value": "admin"
+        },
+        {
+            "name": "payload_parameter.CERT_TRUSTSTORE",
+            "value": "/opt/apache-stratos-cartridge-agent/security/client-truststore.jks"
+        },
+        {
+            "name": "payload_parameter.TRUSTSTORE_PASSWORD",
+            "value": "wso2carbon"
+        },
+        {
+            "name": "payload_parameter.ENABLE_DATA_PUBLISHER",
+            "value": "false"
+        },
+        {
+            "name": "payload_parameter.MONITORING_SERVER_IP",
+            "value": "octl.qmog.cisco.com"
+        },
+        {
+            "name": "payload_parameter.MONITORING_SERVER_PORT",
+            "value": "7611"
+        },
+        {
+            "name": "payload_parameter.MONITORING_SERVER_SECURE_PORT",
+            "value": "7711"
+        },
+        {
+            "name": "payload_parameter.MONITORING_SERVER_ADMIN_USERNAME",
+            "value": "admin"
+        },
+        {
+            "name": "payload_parameter.MONITORING_SERVER_ADMIN_PASSWORD",
+            "value": "admin"
+        },
+        {
+            "name": "payload_parameter.QTCM_DNS_SEGMENT",
+            "value": "test"
+        },
+        {
+            "name": "payload_parameter.QTCM_NETWORK_COUNT",
+            "value": "1"
+        },
+        {
+            "name": "payload_parameter.SIMPLE_PROPERTY",
+            "value": "value"
+        }
+    ],
+    "provider": "cisco",
+    "type": "c0-cartridge-test",
+    "version": "1.0"
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/cartridge-test/cartridges/mock/c1-cartridge-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/cartridge-test/cartridges/mock/c1-cartridge-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/cartridge-test/cartridges/mock/c1-cartridge-test.json
new file mode 100755
index 0000000..2251af1
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/cartridge-test/cartridges/mock/c1-cartridge-test.json
@@ -0,0 +1,124 @@
+{
+    "category": "Application",
+    "description": "c1-cartridge-test Cartridge",
+    "displayName": "c1-cartridge-test",
+    "host": "qmog.cisco.com",
+    "iaasProvider": [
+        {
+            "imageId": "RegionOne/16e7e35b-0c88-4605-90ce-cbef9e9dde0f",
+            "maxInstanceLimit": "4",
+            "networkInterfaces": [
+                {
+                    "floatingNetworks": [
+                        {
+                            "name": "public",
+                            "networkUuid": "26b4aa2b-06bc-4e4f-a6eb-c19fbc211af6"
+                        }
+                    ],
+                    "name": "core",
+                    "networkUuid": "5e107fbd-4820-47ad-84ea-6f135496f889"
+                }
+            ],
+            "property": [
+                {
+                    "name": "instanceType",
+                    "value": "RegionOne/2cdbd576-8c9b-4c2d-8b1a-0f79dc4fb809"
+                },
+                {
+                    "name": "keyPair",
+                    "value": "phoenix"
+                },
+                {
+                    "name": "autoAssignIp",
+                    "value": "false"
+                },
+                {
+                    "name": "securityGroups",
+                    "value": "default"
+                }
+            ],
+            "type": "mock"
+        }
+    ],
+    "multiTenant": "false",
+    "portMapping": [
+        {
+            "port": "22",
+            "protocol": "http",
+            "proxyPort": "8280"
+        }
+    ],
+    "property": [
+        {
+            "name": "payload_parameter.MB_IP",
+            "value": "octl.qmog.cisco.com"
+        },
+        {
+            "name": "payload_parameter.MB_PORT",
+            "value": "61616"
+        },
+        {
+            "name": "payload_parameter.CEP_IP",
+            "value": "octl.qmog.cisco.com"
+        },
+        {
+            "name": "payload_parameter.CEP_PORT",
+            "value": "7611"
+        },
+        {
+            "name": "payload_parameter.CEP_ADMIN_USERNAME",
+            "value": "admin"
+        },
+        {
+            "name": "payload_parameter.CEP_ADMIN_PASSWORD",
+            "value": "admin"
+        },
+        {
+            "name": "payload_parameter.CERT_TRUSTSTORE",
+            "value": "/opt/apache-stratos-cartridge-agent/security/client-truststore.jks"
+        },
+        {
+            "name": "payload_parameter.TRUSTSTORE_PASSWORD",
+            "value": "wso2carbon"
+        },
+        {
+            "name": "payload_parameter.ENABLE_DATA_PUBLISHER",
+            "value": "false"
+        },
+        {
+            "name": "payload_parameter.MONITORING_SERVER_IP",
+            "value": "octl.qmog.cisco.com"
+        },
+        {
+            "name": "payload_parameter.MONITORING_SERVER_PORT",
+            "value": "7611"
+        },
+        {
+            "name": "payload_parameter.MONITORING_SERVER_SECURE_PORT",
+            "value": "7711"
+        },
+        {
+            "name": "payload_parameter.MONITORING_SERVER_ADMIN_USERNAME",
+            "value": "admin"
+        },
+        {
+            "name": "payload_parameter.MONITORING_SERVER_ADMIN_PASSWORD",
+            "value": "admin"
+        },
+        {
+            "name": "payload_parameter.QTCM_DNS_SEGMENT",
+            "value": "test"
+        },
+        {
+            "name": "payload_parameter.QTCM_NETWORK_COUNT",
+            "value": "1"
+        },
+        {
+            "name": "payload_parameter.SIMPLE_PROPERTY",
+            "value": "value"
+        }
+    ],
+    "provider": "cisco",
+    "type": "c1-cartridge-test",
+    "version": "1.0"
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/cartridge-test/cartridges/mock/c2-cartridge-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/cartridge-test/cartridges/mock/c2-cartridge-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/cartridge-test/cartridges/mock/c2-cartridge-test.json
new file mode 100755
index 0000000..ce821f1
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/cartridge-test/cartridges/mock/c2-cartridge-test.json
@@ -0,0 +1,124 @@
+{
+    "category": "Application",
+    "description": "c2-cartridge-test Cartridge",
+    "displayName": "c2-cartridge-test",
+    "host": "qmog.cisco.com",
+    "iaasProvider": [
+        {
+            "imageId": "RegionOne/16e7e35b-0c88-4605-90ce-cbef9e9dde0f",
+            "maxInstanceLimit": "4",
+            "networkInterfaces": [
+                {
+                    "floatingNetworks": [
+                        {
+                            "name": "public",
+                            "networkUuid": "26b4aa2b-06bc-4e4f-a6eb-c19fbc211af6"
+                        }
+                    ],
+                    "name": "core",
+                    "networkUuid": "5e107fbd-4820-47ad-84ea-6f135496f889"
+                }
+            ],
+            "property": [
+                {
+                    "name": "instanceType",
+                    "value": "RegionOne/2cdbd576-8c9b-4c2d-8b1a-0f79dc4fb809"
+                },
+                {
+                    "name": "keyPair",
+                    "value": "phoenix"
+                },
+                {
+                    "name": "autoAssignIp",
+                    "value": "false"
+                },
+                {
+                    "name": "securityGroups",
+                    "value": "default"
+                }
+            ],
+            "type": "mock"
+        }
+    ],
+    "multiTenant": "false",
+    "portMapping": [
+        {
+            "port": "22",
+            "protocol": "http",
+            "proxyPort": "8280"
+        }
+    ],
+    "property": [
+        {
+            "name": "payload_parameter.MB_IP",
+            "value": "octl.qmog.cisco.com"
+        },
+        {
+            "name": "payload_parameter.MB_PORT",
+            "value": "61616"
+        },
+        {
+            "name": "payload_parameter.CEP_IP",
+            "value": "octl.qmog.cisco.com"
+        },
+        {
+            "name": "payload_parameter.CEP_PORT",
+            "value": "7611"
+        },
+        {
+            "name": "payload_parameter.CEP_ADMIN_USERNAME",
+            "value": "admin"
+        },
+        {
+            "name": "payload_parameter.CEP_ADMIN_PASSWORD",
+            "value": "admin"
+        },
+        {
+            "name": "payload_parameter.CERT_TRUSTSTORE",
+            "value": "/opt/apache-stratos-cartridge-agent/security/client-truststore.jks"
+        },
+        {
+            "name": "payload_parameter.TRUSTSTORE_PASSWORD",
+            "value": "wso2carbon"
+        },
+        {
+            "name": "payload_parameter.ENABLE_DATA_PUBLISHER",
+            "value": "false"
+        },
+        {
+            "name": "payload_parameter.MONITORING_SERVER_IP",
+            "value": "octl.qmog.cisco.com"
+        },
+        {
+            "name": "payload_parameter.MONITORING_SERVER_PORT",
+            "value": "7611"
+        },
+        {
+            "name": "payload_parameter.MONITORING_SERVER_SECURE_PORT",
+            "value": "7711"
+        },
+        {
+            "name": "payload_parameter.MONITORING_SERVER_ADMIN_USERNAME",
+            "value": "admin"
+        },
+        {
+            "name": "payload_parameter.MONITORING_SERVER_ADMIN_PASSWORD",
+            "value": "admin"
+        },
+        {
+            "name": "payload_parameter.QTCM_DNS_SEGMENT",
+            "value": "test"
+        },
+        {
+            "name": "payload_parameter.QTCM_NETWORK_COUNT",
+            "value": "1"
+        },
+        {
+            "name": "payload_parameter.SIMPLE_PROPERTY",
+            "value": "value"
+        }
+    ],
+    "provider": "cisco",
+    "type": "c2-cartridge-test",
+    "version": "1.0"
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/common/JMSOutputAdaptor.xml
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/common/JMSOutputAdaptor.xml b/products/stratos/modules/integration/test-integration/src/test/resources/common/JMSOutputAdaptor.xml
new file mode 100755
index 0000000..f00a8d8
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/common/JMSOutputAdaptor.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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.
+
+-->
+
+<outputEventAdaptor name="JMSOutputAdaptor" statistics="disable"
+  trace="enable" type="jms" xmlns="http://wso2.org/carbon/eventadaptormanager">
+  <!--property name="java.naming.provider.url">CEP_HOME/repository/conf/jndi.properties</property-->
+  <property name="java.naming.provider.url">tcp://localhost:ACTIVEMQ_DYNAMIC_PORT</property>
+  <property name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</property>
+  <property name="transport.jms.ConnectionFactoryJNDIName">TopicConnectionFactory</property>
+  <property name="transport.jms.DestinationType">topic</property>
+</outputEventAdaptor>

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/common/autoscaler.xml
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/common/autoscaler.xml b/products/stratos/modules/integration/test-integration/src/test/resources/common/autoscaler.xml
new file mode 100644
index 0000000..f4a40d1
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/common/autoscaler.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 
+       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.
+-->
+<configuration>
+    <autoscaler>
+        <cloudController>
+            <hostname>localhost</hostname>
+            <port>STRATOS_SECURE_DYNAMIC_PORT</port>
+            <!-- CC client timout in ms -->
+            <clientTimeout>300000</clientTimeout>
+        </cloudController>
+        <stratosManager>
+            <hostname>localhost</hostname>
+            <port>STRATOS_SECURE_DYNAMIC_PORT</port>
+            <!-- SM client timeout in ms -->
+            <clientTimeout>300000</clientTimeout>
+        </stratosManager>
+	<identity>
+                <hostname>localhost</hostname>
+                <port>STRATOS_SECURE_DYNAMIC_PORT</port>
+                <clientTimeout>300000</clientTimeout>
+        </identity>
+        <member>
+            <spinAfterTerminate>false</spinAfterTerminate>
+            <!-- this is the maximum time(ms) a member can be in pending member state -->
+            <pendingMemberExpiryTimeout>900000</pendingMemberExpiryTimeout>
+            <!-- this is the maximum time(ms) a member can be in obsoleted member state -->
+            <obsoletedMemberExpiryTimeout>86400000</obsoletedMemberExpiryTimeout>
+            <!-- this is the maximum time(ms) a member can be in pending termination member state -->
+            <pendingTerminationMemberExpiryTimeout>1800000</pendingTerminationMemberExpiryTimeout>
+        </member>
+        <cluster>
+            <!-- cluster monitoring interval (ms) -->
+            <monitorInterval>90000</monitorInterval>
+        </cluster>
+        <threadpool>
+            <identifier>Autoscaler</identifier>
+            <threadPoolSize>10</threadPoolSize>
+        </threadpool>
+    </autoscaler>
+</configuration>

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/common/cartridge-config.properties
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/common/cartridge-config.properties b/products/stratos/modules/integration/test-integration/src/test/resources/common/cartridge-config.properties
new file mode 100644
index 0000000..553c20c
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/common/cartridge-config.properties
@@ -0,0 +1,27 @@
+#
+# 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.
+#
+
+autoscaler.service.url=https://localhost:STRATOS_SECURE_DYNAMIC_PORT/services/AutoscalerService/
+cloud.controller.service.url=https://localhost:STRATOS_SECURE_DYNAMIC_PORT/services/CloudControllerService/
+stratos.manager.service.url=https://localhost:STRATOS_SECURE_DYNAMIC_PORT/services/StratosManagerService/
+puppet.ip=127.0.0.1
+puppet.hostname=puppet.stratos.apache.org
+puppet.dns.available=false
+puppet.environment=stratos
+

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/common/cloud-controller.xml
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/common/cloud-controller.xml b/products/stratos/modules/integration/test-integration/src/test/resources/common/cloud-controller.xml
new file mode 100644
index 0000000..7620fbe
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/common/cloud-controller.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+       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.
+-->
+<cloudController xmlns:svns="http://org.wso2.securevault/configuration">
+    <svns:secureVault provider="org.wso2.securevault.secret.handler.SecretManagerSecretCallbackHandler"/>
+
+    <!-- BAM data publisher configuration -->
+    <dataPublisher enable="false">
+        <bamServer>
+            <!-- BAM server URL should be specified in carbon.xml -->
+            <adminUserName>admin</adminUserName>
+            <adminPassword svns:secretAlias="cloud.controller.bam.server.admin.password">admin</adminPassword>
+        </bamServer>
+        <!-- Default cron expression is '1 * * * * ? *' meaning 'first second of every minute'.
+             Optional element. -->
+        <cron>1 * * * * ? *</cron>
+    </dataPublisher>
+
+    <!-- Complete topology event publisher cron configuration -->
+    <topologySync enable="true">
+        <property name="cron" value="1 * * * * ? *"/>
+    </topologySync>
+
+    <!-- Specify the properties that are common to an IaaS here. This element
+        is not necessary [0..1]. But you can use this section to avoid specifying
+        same property over and over again. -->
+    <iaasProviders>
+        <!-- iaasProvider type="openstack" name="Openstack">
+            <className>org.apache.stratos.cloud.controller.iaases.openstack.OpenstackIaas</className>
+            <provider>openstack-nova</provider>
+            <identity svns:secretAlias="cloud.controller.openstack.identity">project:username</identity>
+            <credential svns:secretAlias="cloud.controller.openstack.credential">credential</credential>
+            <property name="jclouds.endpoint" value="http://192.168.16.99:5000/v2.0" />
+            <property name="jclouds.openstack-nova.auto-create-floating-ips" value="false"/>
+            <property name="jclouds.api-version" value="2.0/" />
+            <property name="openstack.networking.provider" value="nova" />
+            <property name="keyPair" value="keypair-name" />
+            <property name="securityGroups" value="default" />
+        </iaasProvider -->
+        <!-- iaasProvider type="ec2" name="Amazon EC2">
+            <className>org.apache.stratos.cloud.controller.iaases.ec2.EC2Iaas</className>
+            <provider>aws-ec2</provider>
+            <identity svns:secretAlias="cloud.controller.ec2.identity">identity</identity>
+            <credential svns:secretAlias="cloud.controller.ec2.credential">credential</credential>
+            <property name="jclouds.ec2.ami-query" value="owner-id=owner-id;state=available;image-type=machine"/>
+            <property name="availabilityZone" value="ap-southeast-1b"/>
+            <property name="securityGroups" value="default"/>
+            <property name="autoAssignIp" value="true" />
+            <property name="keyPair" value="keypair-name"/>
+        </iaasProvider -->
+        <iaasProvider type="kubernetes" name="Kubernetes">
+            <className>org.apache.stratos.cloud.controller.iaases.kubernetes.KubernetesIaas</className>
+            <provider>kubernetes</provider>
+            <identity svns:secretAlias="cloud.controller.kubernetes.identity">identity</identity>
+            <credential svns:secretAlias="cloud.controller.kubernetes.credential">credential</credential>
+        </iaasProvider>
+        <iaasProvider type="mock" name="Mock">
+            <className>org.apache.stratos.cloud.controller.iaases.mock.MockIaas</className>
+            <provider>mock</provider>
+            <identity svns:secretAlias="cloud.controller.mock.identity">identity</identity>
+            <credential svns:secretAlias="cloud.controller.mock.credential">credential</credential>
+            <property name="api.endpoint" value="https://localhost:STRATOS_SECURE_DYNAMIC_PORT/mock-iaas/api"/>
+        </iaasProvider>
+    </iaasProviders>
+</cloudController>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/common/identity.xml
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/common/identity.xml b/products/stratos/modules/integration/test-integration/src/test/resources/common/identity.xml
new file mode 100644
index 0000000..55e86eb
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/common/identity.xml
@@ -0,0 +1,260 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  ~ 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.
+  -->
+
+<Server xmlns="http://wso2.org/projects/carbon/carbon.xml">
+
+	<JDBCPersistenceManager>
+		<DataSource>
+			<!-- Include a data source name (jndiConfigName) from the set of data 
+				sources defined in master-datasources.xml -->
+			<Name>jdbc/WSO2CarbonDB</Name>
+		</DataSource>
+		<!-- If the identity database is created from another place and if it is 
+			required to skip schema initialization during the server start up, set the 
+			following property to "true". -->
+		<!-- <SkipDBSchemaCreation>false</SkipDBSchemaCreation> -->
+	</JDBCPersistenceManager>
+
+	<!-- Security configurations -->
+	<Security>
+		<UserTrustedRPStore>
+			<Location>${carbon.home}/repository/resources/security/userRP.jks
+			</Location>
+			<!-- Keystore type (JKS/PKCS12 etc.) -->
+			<Type>JKS</Type>
+			<!-- Keystore password -->
+			<Password>wso2carbon</Password>
+			<!-- Private Key password -->
+			<KeyPassword>wso2carbon</KeyPassword>
+		</UserTrustedRPStore>
+
+		<!-- The directory under which all other KeyStore files will be stored -->
+		<KeyStoresDir>${carbon.home}/conf/keystores</KeyStoresDir>
+	</Security>
+
+	<Identity>
+		<IssuerPolicy>SelfAndManaged</IssuerPolicy>
+		<TokenValidationPolicy>CertValidate</TokenValidationPolicy>
+		<BlackList></BlackList>
+		<WhiteList></WhiteList>
+		<System>
+			<KeyStore></KeyStore>
+			<StorePass></StorePass>
+		</System>
+	</Identity>
+
+	<OpenID>
+		<OpenIDServerUrl>https://localhost:STRATOS_SECURE_DYNAMIC_PORT/openidserver</OpenIDServerUrl>
+		<OpenIDUserPattern>https://localhost:STRATOS_SECURE_DYNAMIC_PORT/openid/</OpenIDUserPattern>
+		<!-- If the users must be prompted for approval -->
+		<OpenIDSkipUserConsent>false</OpenIDSkipUserConsent>
+		<!-- Expiry time of the OpenID RememberMe token in minutes -->
+		<OpenIDRememberMeExpiry>7200</OpenIDRememberMeExpiry>
+		<!-- Multifactor Authentication configuration -->
+	        <UseMultifactorAuthentication>false</UseMultifactorAuthentication>	
+        	<!-- To enable or disable openid dumb mode -->
+        	<DisableOpenIDDumbMode>false</DisableOpenIDDumbMode>
+		<!-- remember me session timeout in seconds -->
+		<SessionTimeout>36000</SessionTimeout>
+		<!-- skips authentication if valid SAML2 Web SSO browser session available -->
+		<AcceptSAMLSSOLogin>false</AcceptSAMLSSOLogin>
+		<ClaimsRetrieverImplClass>org.wso2.carbon.identity.provider.openid.claims.DefaultClaimsRetriever</ClaimsRetrieverImplClass>
+	</OpenID>
+
+	<OAuth>
+		<RequestTokenUrl>https://localhost:STRATOS_SECURE_DYNAMIC_PORT/oauth/request-token</RequestTokenUrl>
+		<AccessTokenUrl>https://localhost:STRATOS_SECURE_DYNAMIC_PORT/oauth/access-token</AccessTokenUrl>
+		<AuthorizeUrl>https://localhost:STRATOS_SECURE_DYNAMIC_PORT/oauth/authorize-url</AuthorizeUrl>
+		<!-- Default validity period for Authorization Code in seconds -->
+		<AuthorizationCodeDefaultValidityPeriod>300</AuthorizationCodeDefaultValidityPeriod>
+		<!-- Default validity period for user access tokens in seconds -->
+		<AccessTokenDefaultValidityPeriod>3602</AccessTokenDefaultValidityPeriod>
+		<!-- Default validity period for application access tokens in seconds -->
+		<UserAccessTokenDefaultValidityPeriod>3603</UserAccessTokenDefaultValidityPeriod>
+		<!-- Validity period for refresh token -->		
+		<RefreshTokenValidityPeriod>84600</RefreshTokenValidityPeriod>
+		<!-- Timestamp skew in seconds -->
+		<TimestampSkew>300</TimestampSkew>
+		<!-- Enable OAuth caching -->
+		<EnableOAuthCache>true</EnableOAuthCache>
+		<!-- Enable renewal of refresh token for refresh_token grant -->
+		<RenewRefreshTokenForRefreshGrant>true</RenewRefreshTokenForRefreshGrant>
+		<!-- Process the token before storing it in database, e.g. encrypting -->
+		<TokenPersistenceProcessor>org.wso2.carbon.identity.oauth.tokenprocessor.PlainTextPersistenceProcessor</TokenPersistenceProcessor>
+		<!-- Supported Client Autnetication Methods -->
+		<ClientAuthHandlers>
+		    <ClientAuthHandlerImplClass>org.wso2.carbon.identity.oauth2.token.handlers.clientauth.BasicAuthClientAuthHandler</ClientAuthHandlerImplClass>
+		</ClientAuthHandlers>		
+		<!-- Supported Response Types -->
+		<SupportedResponseTypes>
+		    <SupportedResponseType>
+		    	<ResponseTypeName>token</ResponseTypeName>
+			<ResponseTypeHandlerImplClass>org.wso2.carbon.identity.oauth2.authz.handlers.TokenResponseTypeHandler</ResponseTypeHandlerImplClass>
+		    </SupportedResponseType>
+		    <SupportedResponseType>
+		    	<ResponseTypeName>code</ResponseTypeName>
+			<ResponseTypeHandlerImplClass>org.wso2.carbon.identity.oauth2.authz.handlers.CodeResponseTypeHandler</ResponseTypeHandlerImplClass>
+		    </SupportedResponseType>
+		</SupportedResponseTypes>
+		<!-- Supported Grant Types -->
+		<SupportedGrantTypes>
+		    <SupportedGrantType>
+		    	<GrantTypeName>authorization_code</GrantTypeName>
+			<GrantTypeHandlerImplClass>org.wso2.carbon.identity.oauth2.token.handlers.grant.AuthorizationCodeGrantHandler</GrantTypeHandlerImplClass>
+		    </SupportedGrantType>
+		    <SupportedGrantType>
+		    	<GrantTypeName>password</GrantTypeName>
+			<GrantTypeHandlerImplClass>org.wso2.carbon.identity.oauth2.token.handlers.grant.PasswordGrantHandler</GrantTypeHandlerImplClass>
+		    </SupportedGrantType>
+		    <SupportedGrantType>
+		    	<GrantTypeName>refresh_token</GrantTypeName>
+			<GrantTypeHandlerImplClass>org.wso2.carbon.identity.oauth2.token.handlers.grant.RefreshGrantHandler</GrantTypeHandlerImplClass>
+		    </SupportedGrantType>
+		    <SupportedGrantType>
+		    	<GrantTypeName>client_credentials</GrantTypeName>
+			<GrantTypeHandlerImplClass>org.apache.stratos.custom.handlers.granttype.ClientCredentialsGrantHandler</GrantTypeHandlerImplClass>
+		    </SupportedGrantType>
+		    <SupportedGrantType>
+		    	<GrantTypeName>urn:ietf:params:oauth:grant-type:saml2-bearer</GrantTypeName>
+			<GrantTypeHandlerImplClass>org.wso2.carbon.identity.oauth2.token.handlers.grant.saml.SAML2BearerGrantHandler</GrantTypeHandlerImplClass>
+		    </SupportedGrantType>
+		    <SupportedGrantType>
+                        <GrantTypeName>iwa:ntlm</GrantTypeName>
+                        <GrantTypeHandlerImplClass>org.wso2.carbon.identity.oauth2.token.handlers.grant.iwa.ntlm.NTLMAuthenticationGrantHandler</GrantTypeHandlerImplClass>
+                    </SupportedGrantType>
+		</SupportedGrantTypes>
+		<OAuthCallbackHandlers>
+			<OAuthCallbackHandler Class="org.wso2.carbon.identity.oauth.callback.DefaultCallbackHandler" />
+		</OAuthCallbackHandlers>
+		<!--TokenValidators>
+			<TokenValidator type="bearer" class="org.wso2.carbon.identity.oauth2.validators.DefaultOAuth2TokenValidator"/>
+		</TokenValidators-->
+		<!-- Assertions can be used to embedd parameters into access token. -->
+		<EnableAssertions>
+			<UserName>false</UserName>
+		</EnableAssertions>
+
+		<!-- This should be set to true when using multiple user stores and keys 
+			should saved into different tables according to the user store. By default 
+			all the application keys are saved in to the same table. UserName Assertion 
+			should be 'true' to use this. -->
+		<EnableAccessTokenPartitioning>false</EnableAccessTokenPartitioning>
+		<!-- user store domain names and mapping to new table name. eg: if you 
+			provide 'A:foo.com', foo.com should be the user store domain name and 'A' 
+			represent the relavant mapping of token store table, i.e. tokens will be 
+			added to a table called IDN_OAUTH2_ACCESS_TOKEN_A. -->
+		<AccessTokenPartitioningDomains><!-- A:foo.com, B:bar.com -->
+		</AccessTokenPartitioningDomains>
+		<AuthorizationContextTokenGeneration>		
+			<Enabled>false</Enabled>
+			<TokenGeneratorImplClass>org.wso2.carbon.identity.oauth2.authcontext.JWTTokenGenerator</TokenGeneratorImplClass>
+			<ClaimsRetrieverImplClass>org.wso2.carbon.identity.oauth2.authcontext.DefaultClaimsRetriever</ClaimsRetrieverImplClass>
+			<ConsumerDialectURI>http://wso2.org/claims</ConsumerDialectURI>
+			<SignatureAlgorithm>SHA256withRSA</SignatureAlgorithm>
+			<AuthorizationContextTTL>15</AuthorizationContextTTL>
+		</AuthorizationContextTokenGeneration>
+		<SAML2Grant>
+			<!--SAML2TokenHandler></SAML2TokenHandler-->
+		</SAML2Grant>
+                <OpenIDConnect>
+                         <IDTokenBuilder>org.wso2.carbon.identity.openidconnect.DefaultIDTokenBuilder</IDTokenBuilder>
+                         <IDTokenIssuerID>https://localhost:STRATOS_SECURE_DYNAMIC_PORT/oauth2endpoints/token</IDTokenIssuerID>
+                         <IDTokenSubjectClaim>http://wso2.org/claims/givenname</IDTokenSubjectClaim>
+                         <IDTokenCustomClaimsCallBackHandler>org.wso2.carbon.identity.openidconnect.SAMLAssertionClaimsCallback</IDTokenCustomClaimsCallBackHandler>
+                         <IDTokenExpiration>-1</IDTokenExpiration>
+                         <UserInfoEndpointClaimDialect>http://wso2.org/claims</UserInfoEndpointClaimDialect>
+                         <UserInfoEndpointClaimRetriever>org.wso2.carbon.identity.oauth.endpoint.user.impl.UserInfoUserStoreClaimRetriever</UserInfoEndpointClaimRetriever>
+                         <UserInfoEndpointRequestValidator>org.wso2.carbon.identity.oauth.endpoint.user.impl.UserInforRequestDefaultValidator</UserInfoEndpointRequestValidator>
+                         <UserInfoEndpointAccessTokenValidator>org.wso2.carbon.identity.oauth.endpoint.user.impl.UserInfoISAccessTokenValidator</UserInfoEndpointAccessTokenValidator>
+                         <UserInfoEndpointResponseBuilder>org.wso2.carbon.identity.oauth.endpoint.user.impl.UserInfoJSONResponseBuilder</UserInfoEndpointResponseBuilder>
+                         <SkipUserConsent>false</SkipUserConsent>
+                </OpenIDConnect>
+	</OAuth>
+
+	<MultifactorAuthentication>
+		<XMPPSettings>
+			<XMPPConfig>
+				<XMPPProvider>gtalk</XMPPProvider>
+				<XMPPServer>talk.google.com</XMPPServer>
+				<XMPPPort>5222</XMPPPort>
+				<XMPPExt>gmail.com</XMPPExt>
+				<XMPPUserName>multifactor1@gmail.com</XMPPUserName>
+				<XMPPPassword>wso2carbon</XMPPPassword>
+			</XMPPConfig>
+		</XMPPSettings>
+	</MultifactorAuthentication>
+
+	<SSOService>
+		<EntityId>localhost</EntityId>
+		<IdentityProviderURL>https://localhost:STRATOS_SECURE_DYNAMIC_PORT/samlsso</IdentityProviderURL>
+		<SingleLogoutRetryCount>5</SingleLogoutRetryCount>
+		<SingleLogoutRetryInterval>60000</SingleLogoutRetryInterval> <!-- in milli seconds -->
+		<TenantPartitioningEnabled>false</TenantPartitioningEnabled>
+		<SessionTimeout>36000</SessionTimeout> <!-- remember me session timeout in seconds -->
+		<!-- skips authentication if valid SAML2 Web SSO browser session available -->
+		<AttributeStatementBuilder>org.wso2.carbon.identity.sso.saml.attributes.UserAttributeStatementBuilder</AttributeStatementBuilder>
+                <AttributesClaimDialect>http://wso2.org/claims</AttributesClaimDialect>
+		<AcceptOpenIDLogin>false</AcceptOpenIDLogin>
+		<ClaimsRetrieverImplClass>org.wso2.carbon.identity.sso.saml.builders.claims.DefaultClaimsRetriever</ClaimsRetrieverImplClass>
+		<SAMLSSOEncrypter>org.wso2.carbon.identity.sso.saml.builders.encryption.DefaultSSOEncrypter</SAMLSSOEncrypter>
+                <SAMLSSOSigner>org.wso2.carbon.identity.sso.saml.builders.signature.DefaultSSOSigner</SAMLSSOSigner>
+                <SAML2HTTPRedirectSignatureValidator>org.wso2.carbon.identity.sso.saml.validators.SAML2HTTPRedirectDeflateSignatureValidator</SAML2HTTPRedirectSignatureValidator>
+                <!--SAMLSSOResponseBuilder>org.wso2.carbon.identity.sso.saml.builders.DefaultResponseBuilder</SAMLSSOResponseBuilder-->
+
+		<!-- SAML Token validity period in minutes -->
+                <SAMLResponseValidityPeriod>5</SAMLResponseValidityPeriod>
+                <UseAuthenticatedUserDomain>false</UseAuthenticatedUserDomain>
+	</SSOService>
+
+	<EntitlementSettings>
+		<!-- Uncomment this to enable on-demand policy loading -->
+		<!--OnDemandPolicyLoading> <Enable>true</Enable> <MaxInMemoryPolicies>100</MaxInMemoryPolicies> 
+			</OnDemandPolicyLoading -->
+		<DecisionCaching>
+			<Enable>true</Enable>
+			<CachingInterval>36000</CachingInterval>
+		</DecisionCaching>
+		<AttributeCaching>
+			<Enable>true</Enable>
+		</AttributeCaching>
+		<ThirftBasedEntitlementConfig>
+			<EnableThriftService>true</EnableThriftService>
+			<ReceivePort>${Ports.ThriftEntitlementReceivePort}</ReceivePort>
+			<ClientTimeout>10000</ClientTimeout>
+			<KeyStore>
+				<Location>${carbon.home}/repository/resources/security/wso2carbon.jks</Location>
+				<Password>wso2carbon</Password>
+			</KeyStore>
+		</ThirftBasedEntitlementConfig>
+	</EntitlementSettings>
+
+	<SCIMAuthenticators>
+		<Authenticator class="org.wso2.carbon.identity.scim.provider.auth.BasicAuthHandler">
+			<Property name="Priority">5</Property>
+		</Authenticator>
+		<Authenticator class="org.wso2.carbon.identity.scim.provider.auth.OAuthHandler">
+			<Property name="Priority">10</Property>
+			<Property name="AuthorizationServer">local://services</Property>
+			<!--Property name="AuthorizationServer">https://localhost:9443/services</Property>
+			<Property name="UserName">admin</Property>
+			<Property name="Password">admin</Property-->
+		</Authenticator>
+	</SCIMAuthenticators>
+</Server>

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/common/jndi.properties
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/common/jndi.properties b/products/stratos/modules/integration/test-integration/src/test/resources/common/jndi.properties
new file mode 100644
index 0000000..a2cfea7
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/common/jndi.properties
@@ -0,0 +1,22 @@
+#
+# 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.
+#
+
+connectionfactoryName=TopicConnectionFactory
+java.naming.provider.url=tcp://localhost:ACTIVEMQ_DYNAMIC_PORT
+java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/common/log4j.properties
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/common/log4j.properties b/products/stratos/modules/integration/test-integration/src/test/resources/common/log4j.properties
new file mode 100644
index 0000000..72ad1c4
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/common/log4j.properties
@@ -0,0 +1,206 @@
+#
+# 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.
+#
+
+#
+# This is the log4j configuration file used by Stratos
+#
+
+log4j.rootLogger=INFO, CARBON_CONSOLE, CARBON_LOGFILE, CARBON_MEMORY, CARBON_SYS_LOG
+
+log4j.logger.AUDIT_LOG=INFO, AUDIT_LOGFILE
+log4j.logger.org.apache.axis2.wsdl.codegen.writer.PrettyPrinter=ERROR, CARBON_LOGFILE, CARBON_MEMORY
+log4j.logger.org.apache.axis2.clustering=INFO
+log4j.logger.org.apache=INFO
+log4j.logger.org.apache.catalina=WARN
+log4j.logger.org.apache.tomcat=WARN
+log4j.logger.org.wso2.carbon.apacheds=WARN
+log4j.logger.org.apache.directory.server.ldap=WARN
+log4j.logger.org.apache.directory.server.core.event=WARN
+log4j.logger.com.atomikos=INFO,ATOMIKOS
+log4j.logger.org.quartz=WARN
+log4j.logger.org.apache.jackrabbit.webdav=WARN
+log4j.logger.org.apache.juddi=ERROR
+log4j.logger.org.apache.commons.digester.Digester=WARN
+log4j.logger.org.apache.jasper.compiler.TldLocationsCache=WARN
+log4j.logger.org.apache.qpid=WARN
+log4j.logger.org.apache.qpid.server.Main=INFO
+log4j.logger.qpid.message=WARN
+log4j.logger.qpid.message.broker.listening=INFO
+log4j.logger.org.apache.tiles=WARN
+log4j.logger.org.apache.commons.httpclient=ERROR
+log4j.logger.org.apache.coyote=WARN
+log4j.logger.org.apache.solr=ERROR
+log4j.logger.org.infinispan=WARN
+log4j.logger.org.jgroups=ERROR
+log4j.logger.me.prettyprint.cassandra.hector.TimingLogger=ERROR
+log4j.logger.org.wso2=INFO
+
+# Apache Stratos logging configuration
+log4j.logger.org.apache.stratos.manager=INFO
+log4j.logger.org.apache.stratos.autoscaler=INFO
+log4j.logger.org.apache.stratos.messaging=INFO
+log4j.logger.org.apache.stratos.cloud.controller=INFO
+log4j.logger.org.wso2.andes.client=ERROR
+# Autoscaler rule logs
+log4j.logger.org.apache.stratos.autoscaler.rule.RuleLog=INFO
+
+# Apache jclouds
+#log4j.logger.jclouds.wire=DEBUG
+#log4j.logger.jclouds.headers=DEBUG
+#log4j.logger.org.jclouds=DEBUG
+
+# CEP Window processors
+#log4j.logger.org.apache.stratos.cep.extension.FaultHandlingWindowProcessor=DEBUG
+
+log4j.logger.org.apache.axis2.enterprise=FATAL, CARBON_LOGFILE, CARBON_MEMORY
+log4j.logger.org.opensaml.xml=WARN, CARBON_LOGFILE, CARBON_MEMORY
+log4j.logger.org.apache.directory.shared.ldap=WARN, CARBON_LOGFILE, CARBON_MEMORY
+log4j.logger.org.apache.directory.server.ldap.handlers=WARN, CARBON_LOGFILE, CARBON_MEMORY 
+
+# Following are to remove false error messages from startup (IS)
+log4j.logger.org.apache.directory.shared.ldap.entry.DefaultServerAttribute=FATAL, CARBON_LOGFILE, CARBON_MEMORY
+log4j.logger.org.apache.directory.server.core.DefaultDirectoryService=ERROR, CARBON_LOGFILE, CARBON_MEMORY
+log4j.logger.org.apache.directory.shared.ldap.ldif.LdifReader=ERROR, CARBON_LOGFILE, CARBON_MEMORY
+log4j.logger.org.apache.directory.server.ldap.LdapProtocolHandler=ERROR, CARBON_LOGFILE, CARBON_MEMORY
+log4j.logger.org.apache.directory.server.core=ERROR, CARBON_LOGFILE, CARBON_MEMORY
+
+# Hive logging configuration
+log4j.logger.DataNucleus=ERROR
+log4j.logger.Datastore=ERROR
+log4j.logger.Datastore.Schema=ERROR
+log4j.logger.JPOX.Datastore=ERROR
+log4j.logger.JPOX.Plugin=ERROR
+log4j.logger.JPOX.MetaData=ERROR
+log4j.logger.JPOX.Query=ERROR
+log4j.logger.JPOX.General=ERROR
+log4j.logger.JPOX.Enhancer=ERROR
+log4j.logger.org.apache.hadoop.hive=WARN
+log4j.logger.hive=WARN
+log4j.logger.ExecMapper=WARN
+log4j.logger.ExecReducer=WARN
+log4j.logger.net.sf.ehcache.config.ConfigurationFactory=ERROR
+log4j.logger.org.apache.axis2.clustering.tribes.Axis2GroupChannel=FATAL
+
+log4j.logger.trace.messages=TRACE,CARBON_TRACE_LOGFILE
+
+log4j.additivity.org.apache.axis2.clustering=false
+log4j.additivity.com.atomikos=false
+
+# CARBON_CONSOLE is set to be a ConsoleAppender using a PatternLayout.
+log4j.appender.CARBON_CONSOLE=org.apache.log4j.ConsoleAppender
+log4j.appender.CARBON_CONSOLE.layout=org.wso2.carbon.utils.logging.TenantAwarePatternLayout
+# ConversionPattern will be overridden by the configuration setting in the DB
+log4j.appender.CARBON_CONSOLE.layout.ConversionPattern=[%d] %P%5p {%c} - %x %m%n
+log4j.appender.CARBON_CONSOLE.layout.TenantPattern=%U%@%D[%T]
+log4j.appender.CARBON_CONSOLE.threshold=DEBUG
+
+# CARBON_MEMORY is set to be a MemoryAppender using a PatternLayout.
+log4j.appender.CARBON_MEMORY=org.wso2.carbon.logging.appenders.MemoryAppender
+log4j.appender.CARBON_MEMORY.layout=org.apache.log4j.PatternLayout
+log4j.appender.CARBON_MEMORY.bufferSize=200
+# ConversionPattern will be overridden by the configuration setting in the DB
+#log4j.appender.CARBON_MEMORY.layout.ConversionPattern=[%d] %5p - %x %m {%c}%n
+log4j.appender.CARBON_MEMORY.layout.ConversionPattern=[%d] %5p {%c} - %x %m%n
+log4j.appender.CARBON_MEMORY.threshold=DEBUG
+
+
+# CARBON_LOGFILE is set to be a DailyRollingFileAppender using a PatternLayout.
+log4j.appender.CARBON_LOGFILE=org.apache.log4j.RollingFileAppender
+log4j.appender.CARBON_LOGFILE.MaxFileSize=10000KB
+log4j.appender.CARBON_LOGFILE.MaxBackupIndex=10
+# Log file will be overridden by the configuration setting in the DB
+# This path should be relative to WSO2 Carbon Home
+log4j.appender.CARBON_LOGFILE.File=${carbon.home}/repository/logs/${instance.log}/wso2carbon${instance.log}.log
+log4j.appender.CARBON_LOGFILE.Append=true
+log4j.appender.CARBON_LOGFILE.layout=org.wso2.carbon.utils.logging.TenantAwarePatternLayout
+# ConversionPattern will be overridden by the configuration setting in the DB
+log4j.appender.CARBON_LOGFILE.layout.ConversionPattern=TID: [%T] [%S] [%d] %P%5p {%c} - %x %m%n
+log4j.appender.CARBON_LOGFILE.layout.TenantPattern=%U%@%D [%T] [%S]
+log4j.appender.CARBON_LOGFILE.threshold=DEBUG
+
+log4j.appender.CARBON_SYS_LOG = org.apache.log4j.net.SyslogAppender
+log4j.appender.CARBON_SYS_LOG.layout=org.apache.log4j.PatternLayout
+log4j.appender.CARBON_SYS_LOG.layout.ConversionPattern=[%d] %5p {%c} - %x %m%n
+log4j.appender.CARBON_SYS_LOG.SyslogHost=localhost
+log4j.appender.CARBON_SYS_LOG.Facility=USER
+log4j.appender.CARBON_SYS_LOG.threshold=DEBUG
+
+# LOGEVENT is set to be a LogEventAppender using a PatternLayout to send logs to LOGEVENT 
+log4j.appender.LOGEVENT=org.wso2.carbon.logging.appender.LogEventAppender
+log4j.appender.LOGEVENT.url=tcp://10.100.3.103:7611
+log4j.appender.LOGEVENT.layout=org.wso2.carbon.utils.logging.TenantAwarePatternLayout
+log4j.appender.LOGEVENT.columnList=%T,%S,%A,%d,%c,%p,%m,%H,%I,%Stacktrace
+log4j.appender.LOGEVENT.userName=admin
+log4j.appender.LOGEVENT.password=admin
+
+# Appender config to CARBON_TRACE_LOGFILE
+log4j.appender.CARBON_TRACE_LOGFILE=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.CARBON_TRACE_LOGFILE.File=${carbon.home}/repository/logs/${instance.log}/wso2carbon-trace-messages${instance.log}.log
+log4j.appender.CARBON_TRACE_LOGFILE.Append=true
+log4j.appender.CARBON_TRACE_LOGFILE.layout=org.wso2.carbon.utils.logging.TenantAwarePatternLayout
+log4j.appender.CARBON_TRACE_LOGFILE.layout.ConversionPattern=[%d] %P%5p {%c} - %x %m%n
+log4j.appender.CARBON_TRACE_LOGFILE.layout.TenantPattern=%U%@%D [%T] [%S]
+log4j.appender.CARBON_TRACE_LOGFILE.threshold=TRACE
+log4j.additivity.trace.messages=false
+
+# Appender config to AUDIT_LOGFILE
+log4j.appender.AUDIT_LOGFILE=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.AUDIT_LOGFILE.File=${carbon.home}/repository/logs/audit.log
+log4j.appender.AUDIT_LOGFILE.Append=true
+log4j.appender.AUDIT_LOGFILE.layout=org.wso2.carbon.utils.logging.TenantAwarePatternLayout
+log4j.appender.AUDIT_LOGFILE.layout.ConversionPattern=[%d] %P%5p - %x %m %n
+log4j.appender.AUDIT_LOGFILE.layout.TenantPattern=%U%@%D [%T] [%S]
+log4j.appender.AUDIT_LOGFILE.threshold=INFO
+log4j.additivity.AUDIT_LOG=false
+
+# The event trace logger dumps enough information @INFO level.
+# Writes events received by DataBridge
+log4j.category.LOG_AGGREGATOR_LOGGER=INFO, LOG_AGGREGATOR_FILE_APPENDER
+log4j.additivity.LOG_AGGREGATOR_LOGGER=false
+log4j.appender.LOG_AGGREGATOR_FILE_APPENDER=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.LOG_AGGREGATOR_FILE_APPENDER.File=${carbon.home}/repository/logs/${instance.log}/aggregate${instance.log}.log
+log4j.appender.LOG_AGGREGATOR_FILE_APPENDER.Append=true
+log4j.appender.LOG_AGGREGATOR_FILE_APPENDER.layout=org.apache.log4j.PatternLayout
+log4j.appender.LOG_AGGREGATOR_FILE_APPENDER.layout.ConversionPattern=%m%n
+
+# The event trace logger dumps enough information @INFO level, but maybe pushed upto TRACE.
+# Writes only run-time/event processing time tracing/debug messages for event passing through trace
+# enabled transport adapters event formatters, builders and processors. Enabling event tracing on these has a performance impact
+log4j.category.EVENT_TRACE_LOGGER=INFO, EVENT_TRACE_APPENDER
+log4j.additivity.EVENT_TRACE_LOGGER=false
+log4j.appender.EVENT_TRACE_APPENDER=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.EVENT_TRACE_APPENDER.File=${carbon.home}/repository/logs/${instance.log}/wso2-cep-trace${instance.log}.log
+log4j.appender.EVENT_TRACE_APPENDER.Append=true
+log4j.appender.EVENT_TRACE_APPENDER.layout=org.apache.log4j.PatternLayout
+log4j.appender.EVENT_TRACE_APPENDER.layout.ConversionPattern=%d{HH:mm:ss,SSS} [%X{ip}-%X{host}] [%t] %5p %c{1} %m%n
+
+# Appender config to send Atomikos transaction logs to new log file tm.out.
+log4j.appender.ATOMIKOS = org.apache.log4j.RollingFileAppender
+log4j.appender.ATOMIKOS.File = repository/logs/tm.out
+log4j.appender.ATOMIKOS.Append = true
+log4j.appender.ATOMIKOS.layout = org.apache.log4j.PatternLayout
+log4j.appender.ATOMIKOS.layout.ConversionPattern=%p %t %c - %m%n
+
+# This file is used to override the default logger settings, and is used to remove unwanted logs from Shindig appearing on the console.
+
+# Specification of Handler used by Console Logger
+handlers=java.util.logging.ConsoleHandler
+
+# Replacing default INFO level with SEVERE
+java.util.logging.ConsoleHandler.level=SEVERE

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/common/mock-iaas.xml
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/common/mock-iaas.xml b/products/stratos/modules/integration/test-integration/src/test/resources/common/mock-iaas.xml
new file mode 100644
index 0000000..0f6b206
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/common/mock-iaas.xml
@@ -0,0 +1,123 @@
+<!--
+  ~ 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.
+  -->
+
+<mock-iaas enabled="true">
+    <health-statistics>
+        <cartridge type="tomcat">
+            <!-- factor:memory-consumption|load-average|requests-in-flight-->
+            <!-- mode:loop|continue|stop -->
+            <!-- Mode defines the action needs to be taken after the last sample value:
+                 loop: start from beginning
+                 continue: continue the last sample value
+                 stop: stop publishing statistics -->
+            <pattern factor="memory-consumption" mode="continue">
+                <!-- Sample values -->
+                <sampleValues>20,30,40,50,60,70,50,40,30,20</sampleValues>
+                <!-- Duration of each sample value in seconds -->
+                <sampleDuration>60</sampleDuration>
+            </pattern>
+            <pattern factor="load-average" mode="continue">
+                <!-- Sample values -->
+                <sampleValues>20</sampleValues>
+                <!-- Duration of each sample value in seconds -->
+                <sampleDuration>60</sampleDuration>
+            </pattern>
+        </cartridge>
+        <cartridge type="c7-single-cluster-scaling-test">
+            <!-- factor:memory-consumption|load-average|requests-in-flight-->
+            <!-- mode:loop|continue|stop -->
+            <!-- Mode defines the action needs to be taken after the last sample value:
+                 loop: start from beginning
+                 continue: continue the last sample value
+                 stop: stop publishing statistics -->
+            <pattern factor="memory-consumption" mode="continue">
+                <!-- Sample values -->
+                <sampleValues>60,70,80,90,90,90,40,60,50,60</sampleValues>
+                <!-- Duration of each sample value in seconds -->
+                <sampleDuration>60</sampleDuration>
+            </pattern>
+            <pattern factor="load-average" mode="continue">
+                <!-- Sample values -->
+                <sampleValues>70,70,70</sampleValues>
+                <!-- Duration of each sample value in seconds -->
+                <sampleDuration>60</sampleDuration>
+            </pattern>
+        </cartridge>
+        <cartridge type="c7-partition-round-robin-test">
+            <!-- factor:memory-consumption|load-average|requests-in-flight-->
+            <!-- mode:loop|continue|stop -->
+            <!-- Mode defines the action needs to be taken after the last sample value:
+                 loop: start from beginning
+                 continue: continue the last sample value
+                 stop: stop publishing statistics -->
+            <pattern factor="memory-consumption" mode="stop">
+                <!-- Sample values -->
+                <sampleValues>20,20,20,20</sampleValues>
+                <!-- Duration of each sample value in seconds -->
+                <sampleDuration>30</sampleDuration>
+            </pattern>
+            <pattern factor="load-average" mode="stop">
+                <!-- Sample values -->
+                <sampleValues>20,20,20,20</sampleValues>
+                <!-- Duration of each sample value in seconds -->
+                <sampleDuration>30</sampleDuration>
+            </pattern>
+        </cartridge>
+        <cartridge type="c3-group-termination-behavior-test">
+            <!-- factor:memory-consumption|load-average|requests-in-flight-->
+            <!-- mode:loop|continue|stop -->
+            <!-- Mode defines the action needs to be taken after the last sample value:
+                 loop: start from beginning
+                 continue: continue the last sample value
+                 stop: stop publishing statistics -->
+            <pattern factor="memory-consumption" mode="stop">
+                <!-- Sample values -->
+                <sampleValues>20,20,20</sampleValues>
+                <!-- Duration of each sample value in seconds -->
+                <sampleDuration>60</sampleDuration>
+            </pattern>
+            <pattern factor="load-average" mode="stop">
+                <!-- Sample values -->
+                <sampleValues>20,20,20</sampleValues>
+                <!-- Duration of each sample value in seconds -->
+                <sampleDuration>60</sampleDuration>
+            </pattern>
+        </cartridge>
+        <cartridge type="php">
+            <!-- factor:memory-consumption|load-average|requests-in-flight-->
+            <!-- mode:loop|continue|stop -->
+            <!-- Mode defines the action needs to be taken after the last sample value:
+                 loop: start from beginning
+                 continue: continue the last sample value
+                 stop: stop publishing statistics -->
+            <pattern factor="memory-consumption" mode="continue">
+                <!-- Sample values -->
+                <sampleValues>20,30,40,50,60,70,50,40,30,20</sampleValues>
+                <!-- Duration of each sample value in seconds -->
+                <sampleDuration>60</sampleDuration>
+            </pattern>
+            <pattern factor="load-average" mode="continue">
+                <!-- Sample values -->
+                <sampleValues>20</sampleValues>
+                <!-- Duration of each sample value in seconds -->
+                <sampleDuration>60</sampleDuration>
+            </pattern>
+        </cartridge>
+    </health-statistics>
+</mock-iaas>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/common/scaling.drl
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/common/scaling.drl b/products/stratos/modules/integration/test-integration/src/test/resources/common/scaling.drl
new file mode 100644
index 0000000..f515d28
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/common/scaling.drl
@@ -0,0 +1,324 @@
+/*
+ * 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
+
+import org.apache.stratos.messaging.domain.topology.Service;
+import org.apache.stratos.messaging.domain.topology.Cluster;
+import org.apache.stratos.autoscaler.context.AutoscalerContext;
+import org.apache.stratos.autoscaler.context.member.MemberStatsContext;
+import org.apache.stratos.autoscaler.util.AutoscalerConstants;
+import org.apache.stratos.autoscaler.context.partition.network.NetworkPartitionContext;
+import org.apache.stratos.autoscaler.pojo.policy.PolicyManager;
+import org.apache.stratos.autoscaler.pojo.policy.autoscale.AutoscalePolicy;
+import org.apache.stratos.autoscaler.pojo.policy.autoscale.RequestsInFlight;
+import org.apache.stratos.autoscaler.pojo.policy.autoscale.LoadThresholds;
+import org.apache.stratos.autoscaler.pojo.policy.autoscale.MemoryConsumption;
+import org.apache.stratos.autoscaler.pojo.policy.autoscale.LoadAverage;
+import org.apache.stratos.autoscaler.algorithms.PartitionAlgorithm;
+import org.apache.stratos.autoscaler.algorithms.partition.OneAfterAnother;
+import org.apache.stratos.autoscaler.algorithms.partition.RoundRobin;
+import org.apache.stratos.autoscaler.context.partition.ClusterLevelPartitionContext;
+import org.apache.stratos.autoscaler.rule.AutoscalerRuleEvaluator;
+import org.apache.stratos.cloud.controller.stub.domain.Partition;
+import org.apache.stratos.cloud.controller.stub.domain.MemberContext;
+import org.apache.stratos.autoscaler.context.cluster.ClusterInstanceContext;
+
+import org.apache.stratos.autoscaler.pojo.policy.autoscale.LoadAverage
+import org.apache.stratos.autoscaler.pojo.policy.autoscale.MemoryConsumption
+
+global org.apache.stratos.autoscaler.rule.RuleLog log;
+global org.apache.stratos.autoscaler.rule.RuleTasksDelegator delegator;
+global org.apache.stratos.autoscaler.pojo.policy.autoscale.AutoscalePolicy autoscalePolicy;
+global java.lang.String applicationId;
+global java.lang.String clusterId;
+global java.lang.Boolean rifReset;
+global java.lang.Boolean mcReset;
+global java.lang.Boolean laReset;
+global java.lang.Boolean isPrimary;
+global java.util.List primaryMembers;
+global java.lang.Boolean arspiReset;
+global java.lang.String algorithmName;
+
+rule "Scaling Rule"
+dialect "mvel"
+	when
+       clusterInstanceContext : ClusterInstanceContext ()
+
+        loadThresholds : LoadThresholds() from  autoscalePolicy.getLoadThresholds()
+        partitionAlgorithm : PartitionAlgorithm() from  delegator.getPartitionAlgorithm(algorithmName)
+
+        eval(log.debug("Running scale up rule: [network-partition] " + clusterInstanceContext.getNetworkPartitionId() +
+            " [cluster] " + clusterId))
+        eval(log.debug("[scaling] [network-partition] " + clusterInstanceContext.getNetworkPartitionId() + " [cluster] "
+            + clusterId + " Algorithm name: " + algorithmName))
+
+	
+        rifThreshold : Float() from  loadThresholds.getRequestsInFlightThreshold()
+
+        rifAverage : Float() from  clusterInstanceContext.getAverageRequestsInFlight()
+        rifGradient : Float() from  clusterInstanceContext.getRequestsInFlightGradient()
+        rifSecondDerivative : Float() from  clusterInstanceContext.getRequestsInFlightSecondDerivative()
+	    rifPredictedValue : Double() from delegator.getPredictedValueForNextMinute(rifAverage, rifGradient, rifSecondDerivative, 1)
+
+        mcThreshold : Float() from  loadThresholds.getMemoryConsumptionThreshold()
+
+        mcPredictedValue : Double() from delegator.getMemoryConsumptionPredictedValue(clusterInstanceContext)
+
+        laThreshold : Float() from  loadThresholds.getLoadAverageThreshold()
+
+        laPredictedValue : Double() from delegator.getLoadAveragePredictedValue(clusterInstanceContext)
+
+        activeInstancesCount : Integer() from clusterInstanceContext.getActiveMemberCount()
+        maxInstancesCount : Integer() from clusterInstanceContext.getMaxInstanceCount()
+        minInstancesCount : Integer() from clusterInstanceContext.getMinInstanceCount()
+        requestsServedPerInstance : Float() from  clusterInstanceContext.getRequestsServedPerInstance()
+        averageRequestsServedPerInstance : Float() from  clusterInstanceContext.getAverageRequestsServedPerInstance()
+
+        numberOfInstancesReuquiredBasedOnRif : Integer() from delegator.getNumberOfInstancesRequiredBasedOnRif(
+            rifPredictedValue, rifThreshold)
+        numberOfInstancesReuquiredBasedOnMemoryConsumption : Integer() from
+            delegator.getNumberOfInstancesRequiredBasedOnMemoryConsumption(mcThreshold, mcPredictedValue, minInstancesCount,
+            maxInstancesCount)
+        numberOfInstancesReuquiredBasedOnLoadAverage : Integer() from
+            delegator.getNumberOfInstancesRequiredBasedOnLoadAverage(laThreshold, laPredictedValue, minInstancesCount)
+
+        numberOfRequiredInstances : Integer() from delegator.getMaxNumberOfInstancesRequired(
+            numberOfInstancesReuquiredBasedOnRif, numberOfInstancesReuquiredBasedOnMemoryConsumption, mcReset,
+            numberOfInstancesReuquiredBasedOnLoadAverage, laReset)
+
+
+
+        scaleUp : Boolean() from (activeInstancesCount < numberOfRequiredInstances)
+        scaleDown : Boolean() from (activeInstancesCount > numberOfRequiredInstances || (numberOfRequiredInstances == 1 && activeInstancesCount == 1))
+
+
+        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 threshold: " + rifThreshold))
+
+        eval(log.debug("[scaling] " + "[cluster] " + clusterId + " MC predicted value: " + mcPredictedValue))
+        eval(log.debug("[scaling] " + "[cluster] " + clusterId + " MC threshold: " + mcThreshold))
+
+        eval(log.debug("[scaling] " + "[cluster] " + clusterId + " LA predicted value: " + laPredictedValue))
+        eval(log.debug("[scaling] " + "[cluster] " + clusterId + " LA threshold: " + laThreshold))
+
+        eval(log.debug("[scaling] " + "[cluster] " + clusterId + " Scale-up action: " + scaleUp))
+        eval(log.debug("[scaling] " + "[cluster] " + clusterId + " Scale-down action: " + scaleDown))
+
+	then
+
+	    log.debug("[scaling] Number of required instances based on stats: " + numberOfRequiredInstances + " " +
+	        "[active instances count] " + activeInstancesCount + " [network-partition] " +
+	        clusterInstanceContext.getNetworkPartitionId() + " [cluster] " + clusterId);
+
+        int nonTerminatedMembers = clusterInstanceContext.getNonTerminatedMemberCount();
+        if(scaleUp){
+
+            int clusterMaxMembers = clusterInstanceContext.getMaxInstanceCount();
+            if (nonTerminatedMembers < clusterMaxMembers) {
+
+                int additionalInstances = 0;
+                if(clusterMaxMembers < numberOfRequiredInstances){
+
+                    additionalInstances = clusterMaxMembers - nonTerminatedMembers;
+                    log.info("[scale-up] Required member count based on stat based scaling is higher than max, hence"
+                            + " notifying to parent for possible group scaling or app bursting. [cluster] " + clusterId
+                            + " [instance id]" + clusterInstanceContext.getId() + " [max] " + clusterMaxMembers
+                            + " [number of required instances] " + numberOfRequiredInstances
+                            + " [additional instances to be created] " + additionalInstances);
+                    delegator.delegateScalingOverMaxNotification(clusterId, clusterInstanceContext.getNetworkPartitionId(),
+                        clusterInstanceContext.getId());
+                } else {
+
+                    additionalInstances = numberOfRequiredInstances - nonTerminatedMembers;
+                }
+
+                clusterInstanceContext.resetScaleDownRequestsCount();
+
+                log.debug("[scale-up] " + " [has scaling dependents] " + clusterInstanceContext.hasScalingDependants() +
+                    " [cluster] " + clusterId );
+                if(clusterInstanceContext.hasScalingDependants()) {
+
+                    log.debug("[scale-up] Notifying dependencies [cluster] " + clusterId);
+                    delegator.delegateScalingDependencyNotification(clusterId, clusterInstanceContext.getNetworkPartitionId(),
+                        clusterInstanceContext.getId(), numberOfRequiredInstances, clusterInstanceContext.getMinInstanceCount());
+                } else {
+
+                    boolean partitionsAvailable = true;
+                    int count = 0;
+
+                    String autoscalingReason = (numberOfRequiredInstances == numberOfInstancesReuquiredBasedOnRif)?"Scaling up due to RIF, [Predicted Value] "+rifPredictedValue+" [Threshold] "+rifThreshold:(numberOfRequiredInstances== numberOfInstancesReuquiredBasedOnMemoryConsumption)?"Scaling up due to MC, [Predicted Value] "+mcPredictedValue+" [Threshold] "+mcThreshold:"Scaling up due to LA, [Predicted Value] "+laPredictedValue+" [Threshold] "+laThreshold;
+                    autoscalingReason += " [Number of required instances] "+numberOfRequiredInstances+" [Cluster Max Members] "+clusterMaxMembers+" [Additional instances to be created] " + additionalInstances;
+
+
+                    while(count != additionalInstances && partitionsAvailable){
+
+                        ClusterLevelPartitionContext partitionContext = (ClusterLevelPartitionContext) partitionAlgorithm.getNextScaleUpPartitionContext(clusterInstanceContext.getPartitionCtxtsAsAnArray());
+                        if(partitionContext != null){
+
+                            log.info("[scale-up] Partition available, hence trying to spawn an instance to scale up! " +
+                                " [application id] " + applicationId +
+                                " [cluster] " + clusterId + " [instance id] " + clusterInstanceContext.getId() +
+                                " [network-partition] " + clusterInstanceContext.getNetworkPartitionId() +
+                                " [partition] " + partitionContext.getPartitionId() +
+                                " scaleup due to RIF: " + (rifReset && (rifPredictedValue > rifThreshold)) +
+                                " [rifPredictedValue] " + rifPredictedValue + " [rifThreshold] " + rifThreshold +
+                                " scaleup due to MC: " + (mcReset && (mcPredictedValue > mcThreshold)) +
+                                " [mcPredictedValue] " + mcPredictedValue + " [mcThreshold] " + mcThreshold +
+                                " scaleup due to LA: " + (laReset && (laPredictedValue > laThreshold)) +
+                                " [laPredictedValue] " + laPredictedValue + " [laThreshold] " + laThreshold);
+
+                            log.debug("[scale-up] " + " [partition] " + partitionContext.getPartitionId() + " [cluster] " + clusterId );
+                            long scalingTime = System.currentTimeMillis();
+                            delegator.delegateSpawn(partitionContext, clusterId, clusterInstanceContext.getId(), isPrimary,autoscalingReason,scalingTime);
+                            count++;
+                        } else {
+
+                            log.warn("[scale-up] No more partition available even though " +
+                             "cartridge-max is not reached!, [cluster] " + clusterId +
+                            " Please update deployment-policy with new partitions or with higher " +
+                             "partition-max");
+                            partitionsAvailable = false;
+                        }
+                    }
+                }
+            } else {
+                log.info("[scale-up] Trying to scale up over max, hence not scaling up cluster itself and
+                        notifying to parent for possible group scaling or app bursting.
+                        [cluster] " + clusterId + " [instance id]" + clusterInstanceContext.getId() +
+                        " [max] " + clusterMaxMembers);
+                delegator.delegateScalingOverMaxNotification(clusterId, clusterInstanceContext.getNetworkPartitionId(),
+                    clusterInstanceContext.getId());
+            }
+        } else if(scaleDown){
+
+            if(nonTerminatedMembers > clusterInstanceContext.getMinInstanceCount){
+
+                log.debug("[scale-down] Decided to Scale down [cluster] " + clusterId);
+                if(clusterInstanceContext.getScaleDownRequestsCount() >= 0 ){
+
+                    log.debug("[scale-down] Reached scale down requests threshold [cluster] " + clusterId + " Count " +
+                        clusterInstanceContext.getScaleDownRequestsCount());
+
+                    if(clusterInstanceContext.hasScalingDependants()) {
+
+                        log.debug("[scale-up] Notifying dependencies [cluster] " + clusterId);
+                        delegator.delegateScalingDependencyNotification(clusterId, clusterInstanceContext.getNetworkPartitionId(),
+                            clusterInstanceContext.getId(), numberOfRequiredInstances, clusterInstanceContext.getMinInstanceCount());
+                    } else{
+
+                        MemberStatsContext selectedMemberStatsContext = null;
+                        double lowestOverallLoad = 0.0;
+                        boolean foundAValue = false;
+                        ClusterLevelPartitionContext partitionContext = (ClusterLevelPartitionContext) partitionAlgorithm.getNextScaleDownPartitionContext(clusterInstanceContext.getPartitionCtxtsAsAnArray());
+                        if(partitionContext != null){
+                            log.info("[scale-down] Partition available to scale down " +
+                                " [application id] " + applicationId +
+                                " [cluster] " + clusterId + " [instance id] " + clusterInstanceContext.getId() +
+                                " [network-partition] " + clusterInstanceContext.getNetworkPartitionId() +
+                                " [partition] " + partitionContext.getPartitionId() +
+                                " scaledown due to RIF: " + (rifReset && (rifPredictedValue < rifThreshold)) +
+                                " [rifPredictedValue] " + rifPredictedValue + " [rifThreshold] " + rifThreshold +
+                                " scaledown due to MC: " + (mcReset && (mcPredictedValue < mcThreshold)) +
+                                " [mcPredictedValue] " + mcPredictedValue + " [mcThreshold] " + mcThreshold +
+                                " scaledown due to LA: " + (laReset && (laPredictedValue < laThreshold)) +
+                                " [laPredictedValue] " + laPredictedValue + " [laThreshold] " + laThreshold
+                            );
+
+                            // In partition context member stat context, all the primary members need to be
+                            // avoided being selected as the member to terminated
+
+
+                            for(MemberStatsContext memberStatsContext: partitionContext.getMemberStatsContexts().values()){
+
+                                if( !primaryMembers.contains(memberStatsContext.getMemberId()) ) {
+
+                                LoadAverage loadAverage = memberStatsContext.getLoadAverage();
+                                log.debug("[scale-down] " + " [cluster] "
+                                    + clusterId + " [member] " + memberStatsContext.getMemberId() + " Load average: " + loadAverage);
+
+                                MemoryConsumption memoryConsumption = memberStatsContext.getMemoryConsumption();
+                                log.debug("[scale-down] " + " [partition] " + partitionContext.getPartitionId() + " [cluster] "
+                                    + clusterId + " [member] " + memberStatsContext.getMemberId() + " Memory consumption: " +
+                                    memoryConsumption);
+
+                                double predictedCpu = delegator.getPredictedValueForNextMinute(loadAverage.getAverage(),
+                                    loadAverage.getGradient(),loadAverage.getSecondDerivative(), 1);
+                                log.debug("[scale-down] " + " [partition] " + partitionContext.getPartitionId() + " [cluster] "
+                                    + clusterId + " [member] " + memberStatsContext.getMemberId() + " Predicted CPU: " + predictedCpu);
+
+                                double predictedMemoryConsumption = delegator.getPredictedValueForNextMinute(
+                                    memoryConsumption.getAverage(),memoryConsumption.getGradient(),memoryConsumption.getSecondDerivative(), 1);
+                                log.debug("[scale-down] " + " [partition] " + partitionContext.getPartitionId() + " [cluster] "
+                                    + clusterId + " [member] " + memberStatsContext.getMemberId() + " Predicted memory consumption: " +
+                                        predictedMemoryConsumption);
+
+                                double overallLoad = (predictedCpu + predictedMemoryConsumption) / 2;
+                                log.debug("[scale-down] " + " [partition] " + partitionContext.getPartitionId() + " [cluster] "
+                                    + clusterId + " [member] " + memberStatsContext.getMemberId() + " Overall load: " + overallLoad);
+
+                                if(!foundAValue){
+                                    foundAValue = true;
+                                    selectedMemberStatsContext = memberStatsContext;
+                                    lowestOverallLoad = overallLoad;
+                                } else if(overallLoad < lowestOverallLoad){
+                                    selectedMemberStatsContext = memberStatsContext;
+                                    lowestOverallLoad = overallLoad;
+                                }
+
+
+                              }
+
+                            }
+                            if(selectedMemberStatsContext != null) {
+                                log.info("[scale-down] Trying to terminating an instace to scale down!" );
+                                log.debug("[scale-down] " + " [partition] " + partitionContext.getPartitionId() + " [cluster] "
+                                    + clusterId + " Member with lowest overall load: " + selectedMemberStatsContext.getMemberId());
+
+                                delegator.delegateTerminate(partitionContext, selectedMemberStatsContext.getMemberId());
+                            }
+                        }
+                    }
+                } else{
+                     log.debug("[scale-down] Not reached scale down requests threshold. " + clusterId + " Count " +
+                        clusterInstanceContext.getScaleDownRequestsCount());
+                     clusterInstanceContext.increaseScaleDownRequestsCount();
+
+                }
+            } else {
+                log.debug("[scale-down] Min is reached, hence not scaling down [cluster] " + clusterId + " [instance id]"
+                    + clusterInstanceContext.getId());
+                //if(clusterInstanceContext.isInGroupScalingEnabledSubtree()){
+
+                    delegator.delegateScalingDownBeyondMinNotification(clusterId, clusterInstanceContext.getNetworkPartitionId(),
+                        clusterInstanceContext.getId());
+                //}
+            }
+        }  else{
+            log.debug("[scaling] No decision made to either scale up or scale down ... [cluster] " + clusterId + " [instance id]"
+             + clusterInstanceContext.getId());
+
+        }
+
+end
+
+
+
+

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/common/thrift-client-config.xml
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/common/thrift-client-config.xml b/products/stratos/modules/integration/test-integration/src/test/resources/common/thrift-client-config.xml
new file mode 100644
index 0000000..f89e2c2
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/common/thrift-client-config.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+
+<!-- Apache thrift client configuration for publishing statistics to WSO2 CEP -->
+<thriftClientConfiguration>
+    <username>admin</username>
+    <password>admin</password>
+    <ip>localhost</ip>
+    <port>THRIFT_DYNAMIC_PORT</port>
+</thriftClientConfiguration>

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/deployment-policy-test/deployment-policies/deployment-policy-deployment-policy-test-1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/deployment-policy-test/deployment-policies/deployment-policy-deployment-policy-test-1.json b/products/stratos/modules/integration/test-integration/src/test/resources/deployment-policy-test/deployment-policies/deployment-policy-deployment-policy-test-1.json
new file mode 100644
index 0000000..edab5bd
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/deployment-policy-test/deployment-policies/deployment-policy-deployment-policy-test-1.json
@@ -0,0 +1,32 @@
+{
+    "id": "deployment-policy-deployment-policy-test-1",
+    "networkPartitions": [
+        {
+            "id": "network-partition-deployment-policy-test-1",
+            "partitionAlgo": "one-after-another",
+            "partitions": [
+                {
+                    "id": "partition-1",
+                    "partitionMax": 20
+                }
+            ]
+        },
+        {
+            "id": "network-partition-deployment-policy-test-2",
+            "partitionAlgo": "round-robin",
+            "partitions": [
+                {
+                    "id": "network-partition-6-partition-1",
+                    "partitionMax": 10
+                },
+                {
+                    "id": "network-partition-6-partition-2",
+                    "partitionMax": 9
+                }
+            ]
+        }
+    ]
+}
+
+
+

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/deployment-policy-test/deployment-policies/deployment-policy-deployment-policy-test-2.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/deployment-policy-test/deployment-policies/deployment-policy-deployment-policy-test-2.json b/products/stratos/modules/integration/test-integration/src/test/resources/deployment-policy-test/deployment-policies/deployment-policy-deployment-policy-test-2.json
new file mode 100644
index 0000000..18cb31c
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/deployment-policy-test/deployment-policies/deployment-policy-deployment-policy-test-2.json
@@ -0,0 +1,32 @@
+{
+    "id": "deployment-policy-deployment-policy-test-2",
+    "networkPartitions": [
+        {
+            "id": "network-partition-deployment-policy-test-1",
+            "partitionAlgo": "one-after-another",
+            "partitions": [
+                {
+                    "id": "partition-1",
+                    "partitionMax": 20
+                }
+            ]
+        },
+        {
+            "id": "network-partition-deployment-policy-test-2",
+            "partitionAlgo": "round-robin",
+            "partitions": [
+                {
+                    "id": "network-partition-6-partition-1",
+                    "partitionMax": 10
+                },
+                {
+                    "id": "network-partition-6-partition-2",
+                    "partitionMax": 9
+                }
+            ]
+        }
+    ]
+}
+
+
+

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/deployment-policy-test/deployment-policies/deployment-policy-deployment-policy-test-v1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/deployment-policy-test/deployment-policies/deployment-policy-deployment-policy-test-v1.json b/products/stratos/modules/integration/test-integration/src/test/resources/deployment-policy-test/deployment-policies/deployment-policy-deployment-policy-test-v1.json
new file mode 100644
index 0000000..6c73878
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/deployment-policy-test/deployment-policies/deployment-policy-deployment-policy-test-v1.json
@@ -0,0 +1,36 @@
+{
+    "id": "deployment-policy-deployment-policy-test",
+    "networkPartitions": [
+        {
+            "id": "network-partition-deployment-policy-test-1",
+            "partitionAlgo": "one-after-another",
+            "partitions": [
+                {
+                    "id": "partition-1",
+                    "partitionMax": 25
+                },
+                {
+                    "id": "partition-2",
+                    "partitionMax": 20
+                }
+            ]
+        },
+        {
+            "id": "network-partition-deployment-policy-test-2",
+            "partitionAlgo": "round-robin",
+            "partitions": [
+                {
+                    "id": "network-partition-6-partition-1",
+                    "partitionMax": 15
+                },
+                {
+                    "id": "network-partition-6-partition-2",
+                    "partitionMax": 5
+                }
+            ]
+        }
+    ]
+}
+
+
+


[09/21] stratos git commit: Uplifting automation engine to v4.4.3, dynamically pick ports for integration tests

Posted by ra...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/stratos-testing.xml
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/stratos-testing.xml b/products/stratos/modules/integration/src/test/resources/stratos-testing.xml
deleted file mode 100644
index 065ff5a..0000000
--- a/products/stratos/modules/integration/src/test/resources/stratos-testing.xml
+++ /dev/null
@@ -1,82 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ 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.
-  -->
-
-<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
-
-<suite name="StratosIntegrationSuite">
-
-          <test name="CartridgeTest">
-              <classes>
-                  <class name="org.apache.stratos.integration.tests.group.CartridgeTest" />
-              </classes>
-          </test>
-          <test name="CartridgeGroupTest" >
-              <classes>
-                  <class name="org.apache.stratos.integration.tests.group.CartridgeGroupTest" />
-              </classes>
-          </test>
-
-          <test name="NetworkPartitionTest">
-              <classes>
-                  <class name="org.apache.stratos.integration.tests.policies.NetworkPartitionTest" />
-              </classes>
-          </test>
-          <test name="ApplicationPolicyTest">
-              <classes>
-                  <class name="org.apache.stratos.integration.tests.policies.ApplicationPolicyTest" />
-              </classes>
-          </test>
-          <test name="DeploymentPolicyTest">
-              <classes>
-                  <class name="org.apache.stratos.integration.tests.policies.DeploymentPolicyTest" />
-              </classes>
-          </test>
-          <test name="AutoscalingPolicyTest">
-              <classes>
-                  <class name="org.apache.stratos.integration.tests.policies.AutoscalingPolicyTest" />
-              </classes>
-          </test>
-           <test name="SampleApplicationsTest">
-               <classes>
-                   <class name="org.apache.stratos.integration.tests.application.SampleApplicationsTest" />
-               </classes>
-           </test>
-          <test name="ApplicationBurstingTest">
-              <classes>
-                  <class name="org.apache.stratos.integration.tests.application.ApplicationBurstingTest" />
-              </classes>
-          </test>
-           <test name="SingleClusterScalingTest">
-               <classes>
-                   <class name="org.apache.stratos.integration.tests.application.SingleClusterScalingTest" />
-               </classes>
-           </test>
-           <test name="PartitionRoundRobinClusterTest">
-               <classes>
-                   <class name="org.apache.stratos.integration.tests.application.PartitionRoundRobinClusterTest" />
-               </classes>
-           </test>
-
-            <test name="GroupTerminationBehaviorTest">
-                <classes>
-                    <class name="org.apache.stratos.integration.tests.application.GroupTerminationBehaviorTest" />
-             </classes>
-    </test>
-</suite>

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/tenant/tenant1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/tenant/tenant1.json b/products/stratos/modules/integration/src/test/resources/tenant/tenant1.json
deleted file mode 100644
index f575b1b..0000000
--- a/products/stratos/modules/integration/src/test/resources/tenant/tenant1.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
-  "admin": "admin",
-  "firstName": "Frank",
-  "lastName": "Myers",
-  "adminPassword": "admin123",
-  "tenantDomain": "test1.com",
-  "email": "foo1@bar.com",
-  "active": "true"
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/tenant/tenant2.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/tenant/tenant2.json b/products/stratos/modules/integration/src/test/resources/tenant/tenant2.json
deleted file mode 100644
index 3d2baf2..0000000
--- a/products/stratos/modules/integration/src/test/resources/tenant/tenant2.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
-  "admin": "admin",
-  "firstName": "Frank",
-  "lastName": "Myers",
-  "adminPassword": "admin123",
-  "tenantDomain": "test2.com",
-  "email": "foo2@bar.com",
-  "active": "true"
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/test-conf/integration-test.properties
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/test-conf/integration-test.properties b/products/stratos/modules/integration/src/test/resources/test-conf/integration-test.properties
deleted file mode 100644
index e856975..0000000
--- a/products/stratos/modules/integration/src/test/resources/test-conf/integration-test.properties
+++ /dev/null
@@ -1,30 +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.
-
-# Stratos distribution properties added via filters during the build
-distribution.path=/../../../distribution/target/${stratos.distribution.name}-${project.version}.zip
-distribution.version=${project.version}
-distribution.name=${stratos.distribution.name}
-carbon.port.offset=0
-activemq.bind.address=tcp://localhost:61617
-stratos.endpoint=http://localhost:9763
-stratos.admin.username=admin
-stratos.admin.password=admin
-stratos.tenant1.username=admin@test1.com
-stratos.tenant1.password=admin123
-stratos.tenant2.username=admin@test2.com
-stratos.tenant2.password=admin123
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/user-test/tenant-1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/user-test/tenant-1.json b/products/stratos/modules/integration/src/test/resources/user-test/tenant-1.json
deleted file mode 100644
index 0f599e4..0000000
--- a/products/stratos/modules/integration/src/test/resources/user-test/tenant-1.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
-    "admin": "admin",
-    "firstName": "Frank",
-    "lastName": "Myers",
-    "adminPassword": "admin123",
-    "tenantDomain": "frank.com",
-    "email": "foo@bar.com",
-    "active": "true"
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/user-test/user-1-v1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/user-test/user-1-v1.json b/products/stratos/modules/integration/src/test/resources/user-test/user-1-v1.json
deleted file mode 100644
index 1d2bbfd..0000000
--- a/products/stratos/modules/integration/src/test/resources/user-test/user-1-v1.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-    "userName": "user-1",
-    "credential": "kim123456",
-    "role": "admin",
-    "firstName": "Frankn",
-    "lastName": "Myersn",
-    "email": "user-1@bar.com"
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/user-test/user-1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/user-test/user-1.json b/products/stratos/modules/integration/src/test/resources/user-test/user-1.json
deleted file mode 100644
index 6f7da8a..0000000
--- a/products/stratos/modules/integration/src/test/resources/user-test/user-1.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-    "userName": "user-1",
-    "credential": "kim12345",
-    "role": "admin",
-    "firstName": "Frank",
-    "lastName": "Myers",
-    "email": "foo@bar.com"
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-common/pom.xml
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-common/pom.xml b/products/stratos/modules/integration/test-common/pom.xml
new file mode 100755
index 0000000..751e570
--- /dev/null
+++ b/products/stratos/modules/integration/test-common/pom.xml
@@ -0,0 +1,126 @@
+<!--
+  ~ 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.
+  -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.stratos</groupId>
+        <artifactId>stratos-integration</artifactId>
+        <version>4.2.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>org.apache.stratos.integration.common</artifactId>
+    <packaging>jar</packaging>
+    <name>Apache Stratos - Integration Common Module</name>
+    <description>Apache Stratos Integration Common Module</description>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-exec</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.stratos</groupId>
+            <artifactId>org.apache.stratos.common</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.wso2.carbon.automation</groupId>
+            <artifactId>org.wso2.carbon.automation.test.utils</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.wso2.carbon.automationutils</groupId>
+            <artifactId>org.wso2.carbon.integration.common.admin.client</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.wso2.carbon.automation</groupId>
+            <artifactId>org.wso2.carbon.automation.extensions</artifactId>
+            <scope>compile</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.apache.tomcat.embed</groupId>
+                    <artifactId>tomcat-embed-core</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.tomcat.embed</groupId>
+                    <artifactId>tomcat-embed-logging-juli</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.slf4j</groupId>
+                    <artifactId>slf4j-api</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.wso2.carbon.automationutils</groupId>
+            <artifactId>org.wso2.carbon.integration.common.utils</artifactId>
+            <scope>compile</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.slf4j</groupId>
+                    <artifactId>log4j-over-slf4j</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.slf4j</groupId>
+                    <artifactId>jul-to-slf4j</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.slf4j</groupId>
+                    <artifactId>slf4j-jdk14</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.wso2.carbon.automation</groupId>
+            <artifactId>org.wso2.carbon.automation.engine</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.activemq</groupId>
+            <artifactId>activemq-all</artifactId>
+            <version>5.10.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.httpcomponents.wso2</groupId>
+            <artifactId>httpcore</artifactId>
+            <version>${httpcore.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.httpcomponents.wso2</groupId>
+            <artifactId>httpclient</artifactId>
+            <version>${httpclient.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.stratos</groupId>
+            <artifactId>org.apache.stratos.messaging</artifactId>
+            <version>${project.version}</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.stratos</groupId>
+            <artifactId>org.apache.stratos.mock.iaas.client</artifactId>
+            <version>${project.version}</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.jacoco</groupId>
+            <artifactId>org.jacoco.agent</artifactId>
+        </dependency>
+    </dependencies>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-common/src/main/java/org/apache/stratos/integration/common/RestConstants.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-common/src/main/java/org/apache/stratos/integration/common/RestConstants.java b/products/stratos/modules/integration/test-common/src/main/java/org/apache/stratos/integration/common/RestConstants.java
new file mode 100644
index 0000000..335008c
--- /dev/null
+++ b/products/stratos/modules/integration/test-common/src/main/java/org/apache/stratos/integration/common/RestConstants.java
@@ -0,0 +1,63 @@
+/*
+ * 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.integration.common;
+
+/**
+ * Constant class to keep track of rest endpoint context
+ */
+public class RestConstants {
+    public static final String API = "api";
+    public static final String AUTOSCALING_POLICIES = "/" + API + "/autoscalingPolicies";
+    public static final String USERS = "/" + API + "/users";
+    public static final String TENANTS = "/" + API + "/tenants";
+    public static final String DEPLOYMENT_POLICIES = "/" + API + "/deploymentPolicies";
+    public static final String NETWORK_PARTITIONS = "/" + API + "/networkPartitions";
+    public static final String CARTRIDGES = "/" + API + "/cartridges";
+    public static final String CARTRIDGE_GROUPS = "/" + API + "/cartridgeGroups";
+    public static final String APPLICATION_POLICIES = "/" + API + "/applicationPolicies";
+    public static final String APPLICATIONS = "/" + API + "/applications";
+    public static final String APPLICATIONS_RUNTIME = "/runtime";
+    public static final String APPLICATIONS_DEPLOY = "/deploy";
+    public static final String APPLICATIONS_UNDEPLOY = "/undeploy";
+
+    public static final String AUTOSCALING_POLICIES_PATH = "/autoscaling-policies/";
+    public static final String AUTOSCALING_POLICIES_NAME = "autoscalingPolicy";
+    public static final String CARTRIDGE_GROUPS_PATH = "/cartridges-groups/";
+    public static final String CARTRIDGE_GROUPS_NAME = "cartridgeGroup";
+    public static final String CARTRIDGES_PATH = "/cartridges/mock/";
+    public static final String CARTRIDGES_NAME = "cartridge";
+    public static final String NETWORK_PARTITIONS_PATH = "/network-partitions/mock/";
+    public static final String NETWORK_PARTITIONS_NAME = "networkPartition";
+    public static final String USERS_NAME = "users";
+    public static final String DEPLOYMENT_POLICIES_PATH = "/deployment-policies/";
+    public static final String DEPLOYMENT_POLICIES_NAME = "deploymentPolicy";
+    public static final String APPLICATIONS_PATH = "/applications/";
+    public static final String APPLICATIONS_NAME = "application";
+    public static final String APPLICATION_POLICIES_PATH = "/application-policies/";
+    public static final String APPLICATION_POLICIES_NAME = "applicationPolicy";
+
+    public static final String TENANT1_RESOURCE ="/tenant/tenant1.json";
+    public static final String TENANT2_RESOURCE ="/tenant/tenant2.json";
+    public static final String TENANT1_GET_RESOURCE ="test1.com";
+    public static final String TENANT2_GET_RESOURCE ="test2.com";
+    public static final String TENANT_API = "/" + API + "/tenants";
+    public static final String TENANTS_NAME = "tenants";
+
+
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-common/src/main/java/org/apache/stratos/integration/common/StratosTestServerManager.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-common/src/main/java/org/apache/stratos/integration/common/StratosTestServerManager.java b/products/stratos/modules/integration/test-common/src/main/java/org/apache/stratos/integration/common/StratosTestServerManager.java
new file mode 100644
index 0000000..ed233c4
--- /dev/null
+++ b/products/stratos/modules/integration/test-common/src/main/java/org/apache/stratos/integration/common/StratosTestServerManager.java
@@ -0,0 +1,619 @@
+/*
+ * Copyright 2005-2015 WSO2, Inc. (http://wso2.com)
+ *
+ * Licensed 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.integration.common;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.IOUtils;
+import org.apache.commons.lang3.ArrayUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.stratos.common.constants.StratosConstants;
+import org.wso2.carbon.automation.engine.context.AutomationContext;
+import org.wso2.carbon.automation.engine.context.beans.User;
+import org.wso2.carbon.automation.engine.exceptions.AutomationFrameworkException;
+import org.wso2.carbon.automation.engine.frameworkutils.CodeCoverageUtils;
+import org.wso2.carbon.automation.engine.frameworkutils.FrameworkPathUtil;
+import org.wso2.carbon.automation.engine.frameworkutils.ReportGenerator;
+import org.wso2.carbon.automation.engine.frameworkutils.TestFrameworkUtils;
+import org.wso2.carbon.automation.extensions.servers.carbonserver.CarbonServerManager;
+import org.wso2.carbon.automation.extensions.servers.carbonserver.TestServerManager;
+import org.wso2.carbon.automation.extensions.servers.utils.ArchiveExtractor;
+import org.wso2.carbon.automation.extensions.servers.utils.ClientConnectionUtil;
+import org.wso2.carbon.automation.extensions.servers.utils.FileManipulator;
+import org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader;
+
+import javax.xml.xpath.XPathExpressionException;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.net.URL;
+import java.nio.charset.StandardCharsets;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+
+import static org.testng.Assert.assertNotNull;
+import static org.testng.Assert.assertTrue;
+
+public class StratosTestServerManager extends TestServerManager {
+    private static final Log log = LogFactory.getLog(StratosTestServerManager.class);
+    public static final String PATH_SEP = File.separator;
+    public static final String MOCK_IAAS_XML_FILENAME = "mock-iaas.xml";
+    public static final String SCALING_DROOL_FILENAME = "scaling.drl";
+    public static final String JNDI_PROPERTIES_FILENAME = "jndi.properties";
+    public static final String JMS_OUTPUT_ADAPTER_FILENAME = "JMSOutputAdaptor.xml";
+    public static final String CLOUD_CONTROLLER_FILENAME = "cloud-controller.xml";
+    public static final String AUTOSCALER_FILENAME = "autoscaler.xml";
+    public static final String CARTRIDGE_CONFIG_PROPERTIES_FILENAME = "cartridge-config.properties";
+    public static final String IDENTITY_FILENAME = "identity.xml";
+    private static final String LOG4J_PROPERTIES_FILENAME = "log4j.properties";
+    private static final String THRIFT_CLIENT_CONFIG_FILENAME = "thrift-client-config.xml";
+    private int activeMQDynamicPort;
+    private int stratosSecureDynamicPort;
+    private int stratosDynamicPort;
+    private int thriftDynamicPort;
+    private int thriftSecureDynamicPort;
+    private String webAppURL;
+    private String webAppURLHttps;
+
+    public StratosTestServerManager(AutomationContext context) {
+        super(context);
+        this.carbonServer = new StratosServerManager(context);
+    }
+
+    public StratosTestServerManager(AutomationContext context, String carbonZip, Map<String, String> commandMap) {
+        super(context, carbonZip, commandMap);
+        this.carbonServer = new StratosServerManager(context);
+        this.carbonZip = carbonZip;
+        if (commandMap.get("-DportOffset") != null) {
+            this.portOffset = Integer.parseInt((String) commandMap.get("-DportOffset"));
+            this.commandMap = commandMap;
+        } else {
+            throw new IllegalArgumentException("portOffset value must be set in command list");
+        }
+    }
+
+    public StratosTestServerManager(AutomationContext context, int portOffset) {
+        super(context, portOffset);
+        this.carbonServer = new StratosServerManager(context);
+        this.portOffset = portOffset;
+        this.commandMap.put("-DportOffset", String.valueOf(portOffset));
+    }
+
+    public StratosTestServerManager(AutomationContext context, String carbonZip) {
+        super(context, carbonZip);
+        this.carbonServer = new StratosServerManager(context);
+        this.carbonZip = carbonZip;
+    }
+
+    public String startServer() throws AutomationFrameworkException, IOException, XPathExpressionException {
+        if (this.carbonHome == null) {
+            if (this.carbonZip == null) {
+                this.carbonZip = System.getProperty("carbon.zip");
+            }
+
+            if (this.carbonZip == null) {
+                throw new IllegalArgumentException("carbon zip file cannot find in the given location");
+            }
+
+            this.carbonHome = this.carbonServer.setUpCarbonHome(this.carbonZip);
+            this.configureServer();
+        }
+
+        log.info("Carbon Home - " + this.carbonHome);
+        if (this.commandMap.get("-DportOffset") != null) {
+            this.portOffset = Integer.parseInt((String) this.commandMap.get("-DportOffset"));
+        } else {
+            this.portOffset = 0;
+        }
+
+        this.carbonServer.startServerUsingCarbonHome(this.carbonHome, this.commandMap);
+        return this.carbonHome;
+    }
+
+    public void configureServer() throws AutomationFrameworkException {
+        try {
+            log.info("Configuring server using CARBON_HOME: " + carbonHome);
+            copyArtifacts();
+
+            // set truststores and jndi.properties path
+            setSystemproperties();
+        }
+        catch (IOException e) {
+            throw new AutomationFrameworkException("Could not configure Stratos server", e);
+        }
+    }
+
+    public void stopServer() throws AutomationFrameworkException {
+        super.stopServer();
+    }
+
+    protected void copyArtifacts() throws IOException {
+        String commonResourcesPath = Util.getCommonResourcesFolderPath();
+        copyConfigFile(commonResourcesPath, MOCK_IAAS_XML_FILENAME, Util.CARBON_CONF_PATH);
+        copyConfigFile(commonResourcesPath, JNDI_PROPERTIES_FILENAME, Util.CARBON_CONF_PATH);
+        copyConfigFile(commonResourcesPath, LOG4J_PROPERTIES_FILENAME, Util.CARBON_CONF_PATH);
+        copyConfigFile(commonResourcesPath, CLOUD_CONTROLLER_FILENAME, Util.CARBON_CONF_PATH);
+        copyConfigFile(commonResourcesPath, AUTOSCALER_FILENAME, Util.CARBON_CONF_PATH);
+        copyConfigFile(commonResourcesPath, CARTRIDGE_CONFIG_PROPERTIES_FILENAME, Util.CARBON_CONF_PATH);
+        copyConfigFile(commonResourcesPath, IDENTITY_FILENAME, Util.CARBON_CONF_PATH);
+        copyConfigFile(commonResourcesPath, THRIFT_CLIENT_CONFIG_FILENAME, Util.CARBON_CONF_PATH);
+        copyConfigFile(commonResourcesPath, SCALING_DROOL_FILENAME,
+                Util.CARBON_CONF_PATH + PATH_SEP + "drools");
+        copyConfigFile(commonResourcesPath, JMS_OUTPUT_ADAPTER_FILENAME,
+                "repository" + PATH_SEP + "deployment" + PATH_SEP + "server" + PATH_SEP + "outputeventadaptors");
+
+    }
+
+    private void copyConfigFile(String filePath, String fileName, String destinationFolder)
+            throws IOException {
+        assertNotNull(carbonHome, "CARBON_HOME is null");
+        String fileAbsPath = filePath + PATH_SEP + fileName;
+        log.info("Copying file: " + fileAbsPath);
+        File srcFile = new File(fileAbsPath);
+        assertTrue(srcFile.exists(), "File does not exist [file] " + srcFile.getAbsolutePath());
+        File destFile = new File(carbonHome + PATH_SEP + destinationFolder + PATH_SEP + fileName);
+        FileUtils.copyFile(srcFile, destFile);
+        log.info("Copying file [source] " + srcFile.getAbsolutePath() + " to [dest] " + destFile.getAbsolutePath());
+
+        // replace placeholders with dynamic values
+        String content = IOUtils.toString(new FileInputStream(destFile), StandardCharsets.UTF_8.displayName());
+        content = content.replaceAll(Util.ACTIVEMQ_DYNAMIC_PORT_PLACEHOLDER, String.valueOf(activeMQDynamicPort));
+        content = content.replaceAll(Util.STRATOS_SECURE_DYNAMIC_PORT_PLACEHOLDER,
+                String.valueOf(stratosSecureDynamicPort));
+        content = content.replaceAll(Util.STRATOS_DYNAMIC_PORT_PLACEHOLDER,
+                String.valueOf(stratosDynamicPort));
+        content = content.replaceAll(Util.THRIFT_SECURE_DYNAMIC_PORT_PLACEHOLDER,
+                String.valueOf(thriftSecureDynamicPort));
+        content = content.replaceAll(Util.THRIFT_DYNAMIC_PORT_PLACEHOLDER, String.valueOf(thriftDynamicPort));
+        IOUtils.write(content, new FileOutputStream(destFile), StandardCharsets.UTF_8.displayName());
+    }
+
+    public void setSystemproperties() throws AutomationFrameworkException {
+        URL resourceUrl = getClass().getResource(File.separator + "keystores" + File.separator
+                + "products" + File.separator + "wso2carbon.jks");
+        System.setProperty("javax.net.ssl.trustStore", resourceUrl.getPath());
+        System.setProperty("javax.net.ssl.trustStorePassword", "wso2carbon");
+        System.setProperty("javax.net.ssl.trustStoreType", "JKS");
+        log.info("trustStore set to " + resourceUrl.getPath());
+
+        // Set jndi.properties.dir system property for initializing event receivers
+        System.setProperty("jndi.properties.dir", carbonHome + PATH_SEP + Util.CARBON_CONF_PATH);
+        try {
+            String autoscalerServiceURL = webAppURLHttps + "/services/AutoscalerService";
+            System.setProperty(StratosConstants.AUTOSCALER_SERVICE_URL, autoscalerServiceURL);
+            log.info("Autoscaler service URL set to " + autoscalerServiceURL);
+        }
+        catch (Exception e) {
+            throw new AutomationFrameworkException("Could not set autoscaler service URL system property", e);
+        }
+    }
+
+    public int getActiveMQDynamicPort() {
+        return activeMQDynamicPort;
+    }
+
+    public void setActiveMQDynamicPort(int activeMQDynamicPort) {
+        this.activeMQDynamicPort = activeMQDynamicPort;
+    }
+
+    public int getStratosSecureDynamicPort() {
+        return stratosSecureDynamicPort;
+    }
+
+    public void setStratosSecureDynamicPort(int stratosSecureDynamicPort) {
+        this.stratosSecureDynamicPort = stratosSecureDynamicPort;
+    }
+
+    public int getStratosDynamicPort() {
+        return stratosDynamicPort;
+    }
+
+    public void setStratosDynamicPort(int stratosDynamicPort) {
+        this.stratosDynamicPort = stratosDynamicPort;
+    }
+
+    public int getThriftDynamicPort() {
+        return thriftDynamicPort;
+    }
+
+    public void setThriftDynamicPort(int thriftDynamicPort) {
+        this.thriftDynamicPort = thriftDynamicPort;
+    }
+
+    public int getThriftSecureDynamicPort() {
+        return thriftSecureDynamicPort;
+    }
+
+    public void setThriftSecureDynamicPort(int thriftSecureDynamicPort) {
+        this.thriftSecureDynamicPort = thriftSecureDynamicPort;
+    }
+
+    public String getWebAppURL() {
+        return webAppURL;
+    }
+
+    public String getWebAppURLHttps() {
+        return webAppURLHttps;
+    }
+
+    public void setWebAppURL(String webAppURL) {
+        this.webAppURL = webAppURL;
+    }
+
+    public void setWebAppURLHttps(String webAppURLHttps) {
+        this.webAppURLHttps = webAppURLHttps;
+    }
+}
+
+// TODO: get rid of this class once startup script issue is fixed in automation engine
+class StratosServerManager extends CarbonServerManager {
+    private final static Log log = LogFactory.getLog(StratosServerManager.class);
+    private Process process;
+    private String carbonHome;
+    private AutomationContext automationContext;
+    private ServerLogReader inputStreamHandler;
+    private ServerLogReader errorStreamHandler;
+    private boolean isCoverageEnable = false;
+    private String coverageDumpFilePath;
+    private int portOffset = 0;
+    private static final String SERVER_SHUTDOWN_MESSAGE = "Halting JVM";
+    private static final String SERVER_STARTUP_MESSAGE = "Mgt Console URL";
+    private static final long DEFAULT_START_STOP_WAIT_MS = 300000L;
+    private static final String CMD_ARG = "cmdArg";
+    private static int defaultHttpPort = Integer.parseInt("9763");
+    private static int defaultHttpsPort = Integer.parseInt("9443");
+
+    public StratosServerManager(AutomationContext context) {
+        super(context);
+        this.automationContext = context;
+    }
+
+    public synchronized void startServerUsingCarbonHome(String carbonHome, Map<String, String> commandMap)
+            throws AutomationFrameworkException {
+        if (this.process == null) {
+            this.portOffset = this.checkPortAvailability(commandMap);
+            Process tempProcess = null;
+
+            try {
+                if (!commandMap.isEmpty() && this.getPortOffsetFromCommandMap(commandMap) == 0) {
+                    System.setProperty("carbon.home", carbonHome);
+                }
+
+                File e = new File(carbonHome);
+                log.info("Starting carbon server............. ");
+                String scriptName = TestFrameworkUtils.getStartupScriptFileName(carbonHome);
+                String[] parameters = this.expandServerStartupCommandList(commandMap);
+                String[] cmdArray;
+                if (System.getProperty("os.name").toLowerCase().contains("windows")) {
+                    e = new File(carbonHome + File.separator + "bin");
+                    cmdArray = new String[]{"cmd.exe", "/c", scriptName + ".bat"};
+                    cmdArray = this.mergePropertiesToCommandArray(parameters, cmdArray);
+                    tempProcess = Runtime.getRuntime().exec(cmdArray, (String[]) null, e);
+                } else {
+                    cmdArray = new String[]{"sh", "bin/" + scriptName + ".sh"};
+                    cmdArray = this.mergePropertiesToCommandArray(parameters, cmdArray);
+                    tempProcess = Runtime.getRuntime().exec(cmdArray, (String[]) null, e);
+                }
+
+                this.errorStreamHandler = new ServerLogReader("errorStream", tempProcess.getErrorStream());
+                this.inputStreamHandler = new ServerLogReader("inputStream", tempProcess.getInputStream());
+                this.inputStreamHandler.start();
+                this.errorStreamHandler.start();
+                Runtime.getRuntime().addShutdownHook(new Thread() {
+                    public void run() {
+                        try {
+                            StratosServerManager.this.serverShutdown(StratosServerManager.this.portOffset);
+                        }
+                        catch (Exception var2) {
+                            log.error("Error while server shutdown ..", var2);
+                        }
+
+                    }
+                });
+                ClientConnectionUtil.waitForPort(defaultHttpPort + this.portOffset, 300000L, false,
+                        (String) this.automationContext.getInstance().getHosts().get("default"));
+                long time = System.currentTimeMillis() + 60000L;
+
+                while (true) {
+                    if (this.inputStreamHandler.getOutput().contains("Mgt Console URL") ||
+                            System.currentTimeMillis() >= time) {
+                        int httpsPort = defaultHttpsPort + this.portOffset;
+                        String backendURL = this.automationContext.getContextUrls().getSecureServiceUrl()
+                                .replaceAll("(:\\d+)", ":" + httpsPort);
+                        User superUser = this.automationContext.getSuperTenant().getTenantAdmin();
+                        ClientConnectionUtil.waitForLogin(backendURL, superUser);
+                        log.info("Server started successfully.");
+                        break;
+                    }
+                }
+            }
+            catch (XPathExpressionException | IOException var13) {
+                throw new IllegalStateException("Unable to start server", var13);
+            }
+
+            this.process = tempProcess;
+        }
+    }
+
+    private int checkPortAvailability(Map<String, String> commandMap) throws AutomationFrameworkException {
+        int portOffset = this.getPortOffsetFromCommandMap(commandMap);
+        if (ClientConnectionUtil.isPortOpen(defaultHttpPort + portOffset)) {
+            throw new AutomationFrameworkException(
+                    "Unable to start carbon server on port " + (defaultHttpPort + portOffset) +
+                            " : Port already in use");
+        } else if (ClientConnectionUtil.isPortOpen(defaultHttpsPort + portOffset)) {
+            throw new AutomationFrameworkException(
+                    "Unable to start carbon server on port " + (defaultHttpsPort + portOffset) +
+                            " : Port already in use");
+        } else {
+            return portOffset;
+        }
+    }
+
+    private String[] mergePropertiesToCommandArray(String[] parameters, String[] cmdArray) {
+        if (parameters != null) {
+            cmdArray = this.mergerArrays(cmdArray, parameters);
+        }
+
+        return cmdArray;
+    }
+
+    public synchronized String setUpCarbonHome(String carbonServerZipFile)
+            throws IOException, AutomationFrameworkException {
+        if (this.process != null) {
+            return this.carbonHome;
+        } else {
+            int indexOfZip = carbonServerZipFile.lastIndexOf(".zip");
+            if (indexOfZip == -1) {
+                throw new IllegalArgumentException(carbonServerZipFile + " is not a zip file");
+            } else {
+                String fileSeparator = File.separator.equals("\\") ? "\\" : "/";
+                if (fileSeparator.equals("\\")) {
+                    carbonServerZipFile = carbonServerZipFile.replace("/", "\\");
+                }
+
+                String extractedCarbonDir = carbonServerZipFile
+                        .substring(carbonServerZipFile.lastIndexOf(fileSeparator) + 1, indexOfZip);
+                FileManipulator.deleteDir(extractedCarbonDir);
+                String extractDir = "carbontmp" + System.currentTimeMillis();
+                String baseDir = System.getProperty("basedir", ".") + File.separator + "target";
+                log.info("Extracting carbon zip file.. ");
+                (new ArchiveExtractor()).extractFile(carbonServerZipFile, baseDir + File.separator + extractDir);
+                this.carbonHome =
+                        (new File(baseDir)).getAbsolutePath() + File.separator + extractDir + File.separator +
+                                extractedCarbonDir;
+
+                try {
+                    this.isCoverageEnable =
+                            Boolean.parseBoolean(this.automationContext.getConfigurationValue("//coverage"));
+                }
+                catch (XPathExpressionException var8) {
+                    throw new AutomationFrameworkException("Coverage configuration not found in automation.xml",
+                            var8);
+                }
+                // Fix startup script issue by copying stratos.sh as stratos-server.sh
+                // TODO: remove this class after automation engine provides a way to pass startup script name
+                // currently startup script should be either wso2server.sh or contain the string 'server'
+                FileUtils.copyFile(new File(carbonHome + File.separator + "bin" + File.separator + "stratos.sh"),
+                        new File(carbonHome + File.separator + "bin" + File.separator + "stratos-server.sh"));
+
+                if (this.isCoverageEnable) {
+                    this.instrumentForCoverage();
+                }
+
+                return this.carbonHome;
+            }
+        }
+    }
+
+    public synchronized void serverShutdown(int portOffset) throws AutomationFrameworkException {
+        if (this.process != null) {
+            log.info("Shutting down server..");
+            if (ClientConnectionUtil.isPortOpen(Integer.parseInt("9443") + portOffset)) {
+                int e = defaultHttpsPort + portOffset;
+                String url = null;
+
+                try {
+                    url = this.automationContext.getContextUrls().getBackEndUrl();
+                }
+                catch (XPathExpressionException var10) {
+                    throw new AutomationFrameworkException("Get context failed", var10);
+                }
+
+                String backendURL = url.replaceAll("(:\\d+)", ":" + e);
+
+                try {
+                    ClientConnectionUtil.sendForcefulShutDownRequest(backendURL,
+                            this.automationContext.getSuperTenant().getContextUser().getUserName(),
+                            this.automationContext.getSuperTenant().getContextUser().getPassword());
+                }
+                catch (AutomationFrameworkException var8) {
+                    throw new AutomationFrameworkException("Get context failed", var8);
+                }
+                catch (XPathExpressionException var9) {
+                    throw new AutomationFrameworkException("Get context failed", var9);
+                }
+
+                long time = System.currentTimeMillis() + 300000L;
+
+                while (!this.inputStreamHandler.getOutput().contains("Halting JVM") &&
+                        System.currentTimeMillis() < time) {
+                    ;
+                }
+
+                log.info("Server stopped successfully...");
+            }
+
+            this.inputStreamHandler.stop();
+            this.errorStreamHandler.stop();
+            this.process.destroy();
+            this.process = null;
+            if (this.isCoverageEnable) {
+                try {
+                    log.info("Generating Jacoco code coverage...");
+                    this.generateCoverageReport(new File(
+                            this.carbonHome + File.separator + "repository" + File.separator + "components" +
+                                    File.separator + "plugins" + File.separator));
+                }
+                catch (IOException var7) {
+                    log.error("Failed to generate code coverage ", var7);
+                    throw new AutomationFrameworkException("Failed to generate code coverage ", var7);
+                }
+            }
+
+            if (portOffset == 0) {
+                System.clearProperty("carbon.home");
+            }
+        }
+
+    }
+
+    private void generateCoverageReport(File classesDir) throws IOException, AutomationFrameworkException {
+        CodeCoverageUtils
+                .executeMerge(FrameworkPathUtil.getJacocoCoverageHome(),
+                        FrameworkPathUtil.getCoverageMergeFilePath());
+        ReportGenerator reportGenerator =
+                new ReportGenerator(new File(FrameworkPathUtil.getCoverageMergeFilePath()), classesDir,
+                        new File(CodeCoverageUtils.getJacocoReportDirectory()), (File) null);
+        reportGenerator.create();
+        log.info("Jacoco coverage dump file path : " + FrameworkPathUtil.getCoverageDumpFilePath());
+        log.info("Jacoco class file path : " + classesDir);
+        log.info("Jacoco coverage HTML report path : " + CodeCoverageUtils.getJacocoReportDirectory() +
+                File.separator + "index.html");
+    }
+
+    public synchronized void restartGracefully() throws AutomationFrameworkException {
+        try {
+            int time = defaultHttpsPort + this.portOffset;
+            String backendURL =
+                    this.automationContext.getContextUrls().getSecureServiceUrl().replaceAll("(:\\d+)", ":" + time);
+            User e = this.automationContext.getSuperTenant().getTenantAdmin();
+            ClientConnectionUtil.sendGraceFullRestartRequest(backendURL, e.getUserName(), e.getPassword());
+        }
+        catch (XPathExpressionException var5) {
+            throw new AutomationFrameworkException("restart failed", var5);
+        }
+
+        long time1 = System.currentTimeMillis() + 300000L;
+
+        while (!this.inputStreamHandler.getOutput().contains("Halting JVM") && System.currentTimeMillis() < time1) {
+            ;
+        }
+
+        time1 = System.currentTimeMillis();
+
+        while (System.currentTimeMillis() < time1 + 5000L) {
+            ;
+        }
+
+        try {
+            ClientConnectionUtil.waitForPort(
+                    Integer.parseInt((String) this.automationContext.getInstance().getPorts().get("https")),
+                    (String) this.automationContext.getInstance().getHosts().get("default"));
+            ClientConnectionUtil.waitForLogin(this.automationContext);
+        }
+        catch (XPathExpressionException var4) {
+            throw new AutomationFrameworkException("Connection attempt to carbon server failed", var4);
+        }
+    }
+
+    private String[] expandServerStartupCommandList(Map<String, String> commandMap) {
+        if (commandMap != null && commandMap.size() != 0) {
+            String[] cmdParaArray = null;
+            String cmdArg = null;
+            if (commandMap.containsKey("cmdArg")) {
+                cmdArg = (String) commandMap.get("cmdArg");
+                cmdParaArray = cmdArg.trim().split("\\s+");
+                commandMap.remove("cmdArg");
+            }
+
+            String[] parameterArray = new String[commandMap.size()];
+            int arrayIndex = 0;
+            Set entries = commandMap.entrySet();
+
+            String parameter;
+            for (Iterator i$ = entries.iterator(); i$.hasNext(); parameterArray[arrayIndex++] = parameter) {
+                Map.Entry entry = (Map.Entry) i$.next();
+                String key = (String) entry.getKey();
+                String value = (String) entry.getValue();
+                if (value != null && !value.isEmpty()) {
+                    parameter = key + "=" + value;
+                } else {
+                    parameter = key;
+                }
+            }
+
+            if (cmdArg != null) {
+                commandMap.put("cmdArg", cmdArg);
+            }
+
+            if (cmdParaArray != null && cmdParaArray.length != 0) {
+                return (String[]) ArrayUtils.addAll(parameterArray, cmdParaArray);
+            } else {
+                return parameterArray;
+            }
+        } else {
+            return null;
+        }
+    }
+
+    private int getPortOffsetFromCommandMap(Map<String, String> commandMap) {
+        return commandMap.containsKey("-DportOffset") ? Integer.parseInt((String) commandMap.get("-DportOffset")) :
+                0;
+    }
+
+    private String[] mergerArrays(String[] array1, String[] array2) {
+        return (String[]) ArrayUtils.addAll(array1, array2);
+    }
+
+    private void insertJacocoAgentToShellScript(String scriptName) throws IOException {
+        String jacocoAgentFile = CodeCoverageUtils.getJacocoAgentJarLocation();
+        this.coverageDumpFilePath = FrameworkPathUtil.getCoverageDumpFilePath();
+        CodeCoverageUtils.insertStringToFile(
+                new File(this.carbonHome + File.separator + "bin" + File.separator + scriptName + ".sh"),
+                new File(this.carbonHome + File.separator + "tmp" + File.separator + scriptName + ".sh"),
+                "-Dwso2.server.standalone=true",
+                "-javaagent:" + jacocoAgentFile + "=destfile=" + this.coverageDumpFilePath + "" +
+                        ",append=true,includes=" + CodeCoverageUtils.getInclusionJarsPattern(":") + " \\");
+    }
+
+    private void insertJacocoAgentToBatScript(String scriptName) throws IOException {
+        String jacocoAgentFile = CodeCoverageUtils.getJacocoAgentJarLocation();
+        this.coverageDumpFilePath = FrameworkPathUtil.getCoverageDumpFilePath();
+        CodeCoverageUtils.insertJacocoAgentToStartupBat(
+                new File(this.carbonHome + File.separator + "bin" + File.separator + scriptName + ".bat"),
+                new File(this.carbonHome + File.separator + "tmp" + File.separator + scriptName + ".bat"),
+                "-Dcatalina.base", "-javaagent:" + jacocoAgentFile + "=destfile=" + this.coverageDumpFilePath + "" +
+                        ",append=true,includes=" + CodeCoverageUtils.getInclusionJarsPattern(":"));
+    }
+
+    private void instrumentForCoverage() throws IOException, AutomationFrameworkException {
+        String scriptName = TestFrameworkUtils.getStartupScriptFileName(this.carbonHome);
+        if (System.getProperty("os.name").toLowerCase().contains("windows")) {
+            this.insertJacocoAgentToBatScript(scriptName);
+            if (log.isDebugEnabled()) {
+                log.debug("Included files " + CodeCoverageUtils.getInclusionJarsPattern(":"));
+                log.debug("Excluded files " + CodeCoverageUtils.getExclusionJarsPattern(":"));
+            }
+        } else {
+            this.insertJacocoAgentToShellScript(scriptName);
+        }
+
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-common/src/main/java/org/apache/stratos/integration/common/TopologyHandler.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-common/src/main/java/org/apache/stratos/integration/common/TopologyHandler.java b/products/stratos/modules/integration/test-common/src/main/java/org/apache/stratos/integration/common/TopologyHandler.java
new file mode 100644
index 0000000..84ec17f
--- /dev/null
+++ b/products/stratos/modules/integration/test-common/src/main/java/org/apache/stratos/integration/common/TopologyHandler.java
@@ -0,0 +1,689 @@
+/*
+ * 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.integration.common;
+
+import org.apache.commons.lang.StringUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.stratos.autoscaler.stub.pojo.ApplicationContext;
+import org.apache.stratos.common.client.AutoscalerServiceClient;
+import org.apache.stratos.common.threading.StratosThreadPool;
+import org.apache.stratos.integration.common.rest.IntegrationMockClient;
+import org.apache.stratos.messaging.domain.application.*;
+import org.apache.stratos.messaging.domain.instance.ClusterInstance;
+import org.apache.stratos.messaging.domain.instance.GroupInstance;
+import org.apache.stratos.messaging.domain.topology.Cluster;
+import org.apache.stratos.messaging.domain.topology.Member;
+import org.apache.stratos.messaging.domain.topology.MemberStatus;
+import org.apache.stratos.messaging.domain.topology.Service;
+import org.apache.stratos.messaging.event.Event;
+import org.apache.stratos.messaging.event.application.*;
+import org.apache.stratos.messaging.event.topology.*;
+import org.apache.stratos.messaging.listener.application.*;
+import org.apache.stratos.messaging.listener.topology.*;
+import org.apache.stratos.messaging.message.receiver.application.ApplicationManager;
+import org.apache.stratos.messaging.message.receiver.application.ApplicationsEventReceiver;
+import org.apache.stratos.messaging.message.receiver.topology.TopologyEventReceiver;
+import org.apache.stratos.messaging.message.receiver.topology.TopologyManager;
+
+import java.io.File;
+import java.rmi.RemoteException;
+import java.util.Collection;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ExecutorService;
+
+import static org.testng.AssertJUnit.*;
+
+/**
+ * To start the Topology receivers
+ */
+public class TopologyHandler {
+    private static final Log log = LogFactory.getLog(TopologyHandler.class);
+
+
+    public static final int APPLICATION_ACTIVATION_TIMEOUT = 400000;
+    public static final int APPLICATION_UNDEPLOYMENT_TIMEOUT = 60000;
+    public static final int APPLICATION_TOPOLOGY_TIMEOUT = 60000;
+
+    public static final String APPLICATION_STATUS_CREATED = "Created";
+    public static final String APPLICATION_STATUS_UNDEPLOYING = "Undeploying";
+    private ApplicationsEventReceiver applicationsEventReceiver;
+    private TopologyEventReceiver topologyEventReceiver;
+    public static TopologyHandler topologyHandler;
+    private Map<String, Long> terminatedMembers = new ConcurrentHashMap<String, Long>();
+    private Map<String, Long> terminatingMembers = new ConcurrentHashMap<String, Long>();
+    private Map<String, Long> createdMembers = new ConcurrentHashMap<String, Long>();
+    private Map<String, Long> inActiveMembers = new ConcurrentHashMap<String, Long>();
+    private Map<String, Long> activateddMembers = new ConcurrentHashMap<String, Long>();
+
+    private TopologyHandler() {
+        initializeApplicationEventReceiver();
+        initializeTopologyEventReceiver();
+        assertApplicationTopologyInitialized();
+        assertTopologyInitialized();
+        addTopologyEventListeners();
+        addApplicationEventListeners();
+    }
+
+    public static TopologyHandler getInstance() {
+        if (topologyHandler == null) {
+            synchronized (TopologyHandler.class) {
+                if (topologyHandler == null) {
+                    topologyHandler = new TopologyHandler();
+                }
+            }
+        }
+        return topologyHandler;
+    }
+
+
+    /**
+     * Initialize application event receiver
+     */
+    private void initializeApplicationEventReceiver() {
+        if (applicationsEventReceiver == null) {
+            applicationsEventReceiver = new ApplicationsEventReceiver();
+            ExecutorService executorService = StratosThreadPool.getExecutorService("STRATOS_TEST_SERVER", 1);
+            applicationsEventReceiver.setExecutorService(executorService);
+            applicationsEventReceiver.execute();
+        }
+    }
+
+    /**
+     * Initialize Topology event receiver
+     */
+    private void initializeTopologyEventReceiver() {
+        if (topologyEventReceiver == null) {
+            topologyEventReceiver = new TopologyEventReceiver();
+            ExecutorService executorService = StratosThreadPool.getExecutorService("STRATOS_TEST_SERVER1", 1);
+            topologyEventReceiver.setExecutorService(executorService);
+            topologyEventReceiver.execute();
+        }
+    }
+
+    /**
+     * Assert application Topology initialization
+     */
+    private void assertApplicationTopologyInitialized() {
+        long startTime = System.currentTimeMillis();
+        boolean applicationTopologyInitialized = ApplicationManager.getApplications().isInitialized();
+        while (!applicationTopologyInitialized) {
+            try {
+                Thread.sleep(1000);
+            }
+            catch (InterruptedException ignore) {
+            }
+            applicationTopologyInitialized = ApplicationManager.getApplications().isInitialized();
+            if ((System.currentTimeMillis() - startTime) > APPLICATION_TOPOLOGY_TIMEOUT) {
+                break;
+            }
+        }
+        assertEquals(String.format("Application Topology didn't get initialized "), applicationTopologyInitialized,
+                true);
+    }
+
+    /**
+     * Assert Topology initialization
+     */
+    private void assertTopologyInitialized() {
+        long startTime = System.currentTimeMillis();
+        boolean topologyInitialized = TopologyManager.getTopology().isInitialized();
+        while (!topologyInitialized) {
+            try {
+                Thread.sleep(1000);
+            }
+            catch (InterruptedException ignore) {
+            }
+            topologyInitialized = TopologyManager.getTopology().isInitialized();
+            if ((System.currentTimeMillis() - startTime) > APPLICATION_TOPOLOGY_TIMEOUT) {
+                break;
+            }
+        }
+        assertEquals(String.format("Topology didn't get initialized "), topologyInitialized, true);
+    }
+
+    /**
+     * Assert application activation
+     *
+     * @param tenantId
+     * @param applicationName
+     */
+    public void assertApplicationStatus(String applicationName, ApplicationStatus status, int tenantId) {
+        long startTime = System.currentTimeMillis();
+        Application application =
+                ApplicationManager.getApplications().getApplicationByTenant(applicationName, tenantId);
+        while (!((application != null) && (application.getStatus() == status))) {
+            try {
+                Thread.sleep(1000);
+            }
+            catch (InterruptedException ignore) {
+            }
+            application = ApplicationManager.getApplications().getApplicationByTenant(applicationName, tenantId);
+            if ((System.currentTimeMillis() - startTime) > APPLICATION_ACTIVATION_TIMEOUT) {
+                break;
+            }
+        }
+        assertNotNull(String.format("Application is not found: [application-id] %s", applicationName), application);
+        assertEquals(String.format("Application status did not change to %s: [application-id] %s",
+                        status.toString(), applicationName),
+                status, application.getStatus());
+    }
+
+    public Application getApplication(String applicationName, int tenantId) {
+        return ApplicationManager.getApplications().getApplicationByTenant(applicationName, tenantId);
+    }
+
+    public void assertApplicationForNonAvailability(String applicationName, int tenantId) {
+
+        Application application =
+                ApplicationManager.getApplications().getApplicationByTenant(applicationName, tenantId);
+        assertNull(String.format("Application is found for other tenant : [application-id] %s", applicationName),
+                application);
+    }
+
+    /**
+     * Assert application activation
+     *
+     * @param applicationName
+     * @param tenantId
+     */
+    public void assertGroupActivation(String applicationName, int tenantId) {
+        Application application =
+                ApplicationManager.getApplications().getApplicationByTenant(applicationName, tenantId);
+        assertNotNull(String.format("Application is not found: [application-id] %s",
+                applicationName), application);
+
+        Collection<Group> groups = application.getAllGroupsRecursively();
+        for (Group group : groups) {
+            assertEquals(group.getInstanceContextCount() >= group.getGroupMinInstances(), true);
+        }
+    }
+
+    /**
+     * Assert application activation
+     *
+     * @param applicationName
+     * @param tenantId
+     */
+    public void assertClusterActivation(String applicationName, int tenantId) {
+        Application application =
+                ApplicationManager.getApplications().getApplicationByTenant(applicationName, tenantId);
+        assertNotNull(String.format("Application is not found: [application-id] %s",
+                applicationName), application);
+
+        Set<ClusterDataHolder> clusterDataHolderSet = application.getClusterDataRecursively();
+        for (ClusterDataHolder clusterDataHolder : clusterDataHolderSet) {
+            String serviceUuid = clusterDataHolder.getServiceUuid();
+            String clusterId = clusterDataHolder.getClusterId();
+            Service service = TopologyManager.getTopology().getService(serviceUuid);
+            assertNotNull(String.format("Service is not found: [application-id] %s [service] %s",
+                    applicationName, serviceUuid), service);
+
+            Cluster cluster = service.getCluster(clusterId);
+            assertNotNull(String.format("Cluster is not found: [application-id] %s [service] %s [cluster-id] %s",
+                    applicationName, serviceUuid, clusterId), cluster);
+            boolean clusterActive = false;
+
+            for (ClusterInstance instance : cluster.getInstanceIdToInstanceContextMap().values()) {
+                int activeInstances = 0;
+                for (Member member : cluster.getMembers()) {
+                    if (member.getClusterInstanceId().equals(instance.getInstanceId())) {
+                        if (member.getStatus().equals(MemberStatus.Active)) {
+                            activeInstances++;
+                        }
+                    }
+                }
+                clusterActive = activeInstances >= clusterDataHolder.getMinInstances();
+
+                if (!clusterActive) {
+                    break;
+                }
+            }
+            assertEquals(String.format("Cluster status did not change to active: [cluster-id] %s", clusterId),
+                    clusterActive, true);
+        }
+
+    }
+
+    /**
+     * Assert application activation
+     *
+     * @param tenantId
+     * @param applicationName
+     */
+
+    public void terminateMemberFromCluster(String cartridgeName, String applicationName,
+                                           IntegrationMockClient mockIaasApiClient, int tenantId) {
+        Application application =
+                ApplicationManager.getApplications().getApplicationByTenant(applicationName, tenantId);
+        assertNotNull(String.format("Application is not found: [application-id] %s",
+                applicationName), application);
+
+        Set<ClusterDataHolder> clusterDataHolderSet = application.getClusterDataRecursively();
+        for (ClusterDataHolder clusterDataHolder : clusterDataHolderSet) {
+            String serviceUuid = clusterDataHolder.getServiceUuid();
+            if (cartridgeName.equals(serviceUuid)) {
+                String clusterId = clusterDataHolder.getClusterId();
+                Service service = TopologyManager.getTopology().getService(serviceUuid);
+                assertNotNull(String.format("Service is not found: [application-id] %s [service uuid] %s",
+                        applicationName, serviceUuid), service);
+
+                Cluster cluster = service.getCluster(clusterId);
+                assertNotNull(String.format("Cluster is not found: [application-id] %s [service] %s [cluster-id] %s",
+                        applicationName, serviceUuid, clusterId), cluster);
+                boolean memberTerminated = false;
+
+                for (ClusterInstance instance : cluster.getInstanceIdToInstanceContextMap().values()) {
+                    for (Member member : cluster.getMembers()) {
+                        if (member.getClusterInstanceId().equals(instance.getInstanceId())) {
+                            if (member.getStatus().equals(MemberStatus.Active)) {
+                                mockIaasApiClient.terminateInstance(member.getMemberId());
+                                memberTerminated = true;
+                                break;
+                            }
+                        }
+                    }
+
+                    if (memberTerminated) {
+                        break;
+                    }
+
+                }
+                assertTrue("Any member couldn't be terminated from the mock IaaS client", memberTerminated);
+            }
+
+        }
+
+    }
+
+    public void assertClusterMinMemberCount(String applicationName, int minMembers, int tenantId) {
+        long startTime = System.currentTimeMillis();
+
+        Application application =
+                ApplicationManager.getApplications().getApplicationByTenant(applicationName, tenantId);
+        assertNotNull(String.format("Application is not found: [application-id] %s",
+                applicationName), application);
+
+        Set<ClusterDataHolder> clusterDataHolderSet = application.getClusterDataRecursively();
+        for (ClusterDataHolder clusterDataHolder : clusterDataHolderSet) {
+            String serviceName = clusterDataHolder.getServiceUuid();
+            String clusterId = clusterDataHolder.getClusterId();
+            Service service = TopologyManager.getTopology().getService(serviceName);
+            assertNotNull(String.format("Service is not found: [application-id] %s [service] %s",
+                    applicationName, serviceName), service);
+
+            Cluster cluster = service.getCluster(clusterId);
+            assertNotNull(String.format("Cluster is not found: [application-id] %s [service] %s [cluster-id] %s",
+                    applicationName, serviceName, clusterId), cluster);
+            boolean clusterActive = false;
+
+            for (ClusterInstance instance : cluster.getInstanceIdToInstanceContextMap().values()) {
+                int activeInstances = 0;
+                for (Member member : cluster.getMembers()) {
+                    if (member.getClusterInstanceId().equals(instance.getInstanceId())) {
+                        if (member.getStatus().equals(MemberStatus.Active)) {
+                            activeInstances++;
+                        }
+                    }
+                }
+                clusterActive = activeInstances >= minMembers;
+
+                while (!clusterActive) {
+                    try {
+                        Thread.sleep(1000);
+                    }
+                    catch (InterruptedException ignore) {
+                    }
+                    service = TopologyManager.getTopology().getService(serviceName);
+                    assertNotNull(String.format("Service is not found: [application-id] %s [service] %s",
+                            applicationName, serviceName), service);
+
+                    cluster = service.getCluster(clusterId);
+                    activeInstances = 0;
+                    for (Member member : cluster.getMembers()) {
+                        if (member.getClusterInstanceId().equals(instance.getInstanceId())) {
+                            if (member.getStatus().equals(MemberStatus.Active)) {
+                                activeInstances++;
+                            }
+                        }
+                    }
+                    clusterActive = activeInstances >= minMembers;
+                    assertNotNull(
+                            String.format("Cluster is not found: [application-id] %s [service] %s [cluster-id] %s",
+                                    applicationName, serviceName, clusterId), cluster);
+
+                    if ((System.currentTimeMillis() - startTime) > APPLICATION_ACTIVATION_TIMEOUT) {
+                        break;
+                    }
+                }
+            }
+            assertEquals(String.format("Cluster status did not change to active: [cluster-id] %s", clusterId),
+                    clusterActive, true);
+        }
+
+    }
+
+
+    /**
+     * Assert application activation
+     *
+     * @param applicationName
+     * @param tenantId
+     */
+    public boolean assertApplicationUndeploy(String applicationName, int tenantId) {
+        long startTime = System.currentTimeMillis();
+        Application application =
+                ApplicationManager.getApplications().getApplicationByTenant(applicationName, tenantId);
+        ApplicationContext applicationContext = null;
+        try {
+            applicationContext =
+                    AutoscalerServiceClient.getInstance().getApplicationByTenant(applicationName, tenantId);
+        }
+        catch (RemoteException e) {
+            log.error("Error while getting the application context for [application] " + applicationName);
+        }
+        while (((application != null) && application.getInstanceContextCount() > 0) ||
+                (applicationContext == null || applicationContext.getStatus().equals(APPLICATION_STATUS_UNDEPLOYING))) {
+            try {
+                Thread.sleep(1000);
+            }
+            catch (InterruptedException ignore) {
+            }
+            application = ApplicationManager.getApplications().getApplicationByTenant(applicationName, tenantId);
+            try {
+                applicationContext =
+                        AutoscalerServiceClient.getInstance().getApplicationByTenant(applicationName, tenantId);
+            }
+            catch (RemoteException e) {
+                log.error("Error while getting the application context for [application] " + applicationName);
+            }
+            if ((System.currentTimeMillis() - startTime) > APPLICATION_UNDEPLOYMENT_TIMEOUT) {
+                break;
+            }
+        }
+
+        assertNotNull(String.format("Application is not found: [application-id] %s",
+                applicationName), application);
+        assertNotNull(String.format("Application Context is not found: [application-id] %s",
+                applicationName), applicationContext);
+
+        //Force undeployment after the graceful deployment
+        if (application.getInstanceContextCount() > 0 ||
+                applicationContext.getStatus().equals(APPLICATION_STATUS_UNDEPLOYING)) {
+            return false;
+        }
+        assertEquals(
+                String.format("Application status did not change to Created: [application-id] %s", applicationName),
+                APPLICATION_STATUS_CREATED, applicationContext.getStatus());
+        return true;
+    }
+
+    /**
+     * Assert application activation
+     *
+     * @param tenantId
+     * @param applicationName
+     */
+    public void assertGroupInstanceCount(String applicationName, String groupAlias, int count, int tenantId) {
+        long startTime = System.currentTimeMillis();
+        Application application =
+                ApplicationManager.getApplications().getApplicationByTenant(applicationName, tenantId);
+        if (application != null) {
+            Group group = application.getGroupRecursively(groupAlias);
+            while (group.getInstanceContextCount() != count) {
+                try {
+                    Thread.sleep(1000);
+                }
+                catch (InterruptedException ignore) {
+                }
+                if ((System.currentTimeMillis() - startTime) > APPLICATION_ACTIVATION_TIMEOUT) {
+                    break;
+                }
+            }
+            for (GroupInstance instance : group.getInstanceIdToInstanceContextMap().values()) {
+                while (!instance.getStatus().equals(GroupStatus.Active)) {
+                    try {
+                        Thread.sleep(1000);
+                    }
+                    catch (InterruptedException ignore) {
+                    }
+                    if ((System.currentTimeMillis() - startTime) > APPLICATION_ACTIVATION_TIMEOUT) {
+                        break;
+                    }
+                }
+            }
+            assertEquals(
+                    String.format("Application status did not change to active: [application-id] %s", applicationName),
+                    group.getInstanceContextCount(), count);
+        }
+        assertNotNull(String.format("Application is not found: [application-id] %s", applicationName), application);
+
+    }
+
+    public void assertApplicationNotExists(String applicationName) {
+        Application application = ApplicationManager.getApplications().getApplication(applicationName);
+        assertNull(String.format("Application is found in the topology : [application-id] %s", applicationName),
+                application);
+    }
+
+    /**
+     * Get resources folder path
+     *
+     * @return
+     */
+    private String getResourcesFolderPath() {
+        String path = getClass().getResource("/").getPath();
+        return StringUtils.removeEnd(path, File.separator);
+    }
+
+    private void addTopologyEventListeners() {
+        topologyEventReceiver.addEventListener(new MemberTerminatedEventListener() {
+            @Override
+            protected void onEvent(Event event) {
+                MemberTerminatedEvent memberTerminatedEvent = (MemberTerminatedEvent) event;
+                getTerminatedMembers().put(memberTerminatedEvent.getMemberId(), System.currentTimeMillis());
+
+            }
+        });
+
+
+        topologyEventReceiver.addEventListener(new ClusterInstanceCreatedEventListener() {
+            @Override
+            protected void onEvent(Event event) {
+                ClusterInstanceCreatedEvent event1 = (ClusterInstanceCreatedEvent) event;
+                String clusterId = event1.getClusterId();
+                getCreatedMembers().put(clusterId, System.currentTimeMillis());
+            }
+        });
+
+        topologyEventReceiver.addEventListener(new ClusterInstanceActivatedEventListener() {
+            @Override
+            protected void onEvent(Event event) {
+                ClusterInstanceActivatedEvent event1 = (ClusterInstanceActivatedEvent) event;
+                String clusterId = event1.getClusterId();
+                getActivateddMembers().put(clusterId, System.currentTimeMillis());
+
+            }
+        });
+
+        topologyEventReceiver.addEventListener(new ClusterInstanceInactivateEventListener() {
+            @Override
+            protected void onEvent(Event event) {
+                ClusterInstanceInactivateEvent event1 = (ClusterInstanceInactivateEvent) event;
+                String clusterId = event1.getClusterId();
+                getInActiveMembers().put(clusterId, System.currentTimeMillis());
+            }
+        });
+
+        topologyEventReceiver.addEventListener(new ClusterInstanceTerminatedEventListener() {
+            @Override
+            protected void onEvent(Event event) {
+                ClusterInstanceTerminatedEvent event1 = (ClusterInstanceTerminatedEvent) event;
+                String clusterId = event1.getClusterId();
+                getTerminatedMembers().put(clusterId, System.currentTimeMillis());
+            }
+        });
+
+        topologyEventReceiver.addEventListener(new ClusterInstanceTerminatingEventListener() {
+            @Override
+            protected void onEvent(Event event) {
+                ClusterInstanceTerminatingEvent event1 = (ClusterInstanceTerminatingEvent) event;
+                String clusterId = event1.getClusterId();
+                getTerminatingMembers().put(clusterId, System.currentTimeMillis());
+            }
+        });
+
+
+    }
+
+    private void addApplicationEventListeners() {
+
+        applicationsEventReceiver.addEventListener(new GroupInstanceCreatedEventListener() {
+            @Override
+            protected void onEvent(Event event) {
+                GroupInstanceCreatedEvent event1 = (GroupInstanceCreatedEvent) event;
+                String appId = event1.getAppId();
+                String groupId = event1.getGroupId();
+                String instanceId = event1.getGroupInstance().getInstanceId();
+                String id = generateId(appId, groupId, instanceId);
+                getCreatedMembers().put(id, System.currentTimeMillis());
+
+            }
+        });
+
+        applicationsEventReceiver.addEventListener(new GroupInstanceActivatedEventListener() {
+            @Override
+            protected void onEvent(Event event) {
+                GroupInstanceActivatedEvent event1 = (GroupInstanceActivatedEvent) event;
+                String appId = event1.getAppId();
+                String groupId = event1.getGroupId();
+                String instanceId = event1.getInstanceId();
+                String id = generateId(appId, groupId, instanceId);
+                getActivateddMembers().put(id, System.currentTimeMillis());
+            }
+        });
+
+        applicationsEventReceiver.addEventListener(new GroupInstanceInactivateEventListener() {
+            @Override
+            protected void onEvent(Event event) {
+                GroupInstanceInactivatedEvent event1 = (GroupInstanceInactivatedEvent) event;
+                String appId = event1.getAppId();
+                String groupId = event1.getGroupId();
+                String instanceId = event1.getInstanceId();
+                String id = generateId(appId, groupId, instanceId);
+                getInActiveMembers().put(id, System.currentTimeMillis());
+            }
+        });
+
+        applicationsEventReceiver.addEventListener(new GroupInstanceTerminatedEventListener() {
+            @Override
+            protected void onEvent(Event event) {
+                GroupInstanceTerminatedEvent event1 = (GroupInstanceTerminatedEvent) event;
+                String appId = event1.getAppId();
+                String groupId = event1.getGroupId();
+                String instanceId = event1.getInstanceId();
+                String id = generateId(appId, groupId, instanceId);
+                getTerminatedMembers().put(id, System.currentTimeMillis());
+            }
+        });
+
+        applicationsEventReceiver.addEventListener(new GroupInstanceTerminatingEventListener() {
+            @Override
+            protected void onEvent(Event event) {
+                GroupInstanceTerminatingEvent event1 = (GroupInstanceTerminatingEvent) event;
+                String appId = event1.getAppId();
+                String groupId = event1.getGroupId();
+                String instanceId = event1.getInstanceId();
+                String id = generateId(appId, groupId, instanceId);
+                getTerminatingMembers().put(id, System.currentTimeMillis());
+            }
+        });
+    }
+
+    public String generateId(String appId, String groupId, String instanceId) {
+        return appId + "-" + groupId + "-" + instanceId;
+    }
+
+    public String getClusterIdFromAlias(String applicationId, String alias, int tenantId) {
+        Application application = ApplicationManager.getApplications().getApplicationByTenant(applicationId, tenantId);
+        assertNotNull(application);
+
+        ClusterDataHolder dataHolder = application.getClusterDataHolderRecursivelyByAlias(alias);
+        assertNotNull(dataHolder);
+
+        return dataHolder.getClusterId();
+    }
+
+
+    public void removeMembersFromMaps(String applicationId) {
+        for (Map.Entry<String, Long> entry : getActivateddMembers().entrySet()) {
+            if (entry.getKey().contains(applicationId)) {
+                getActivateddMembers().remove(entry.getKey());
+            }
+        }
+
+        for (Map.Entry<String, Long> entry : getTerminatedMembers().entrySet()) {
+            if (entry.getKey().contains(applicationId)) {
+                getTerminatedMembers().remove(entry.getKey());
+            }
+        }
+    }
+
+    public Map<String, Long> getTerminatedMembers() {
+        return terminatedMembers;
+    }
+
+    public void setTerminatedMembers(Map<String, Long> terminatedMembers) {
+        this.terminatedMembers = terminatedMembers;
+    }
+
+    public Map<String, Long> getTerminatingMembers() {
+        return terminatingMembers;
+    }
+
+    public void setTerminatingMembers(Map<String, Long> terminatingMembers) {
+        this.terminatingMembers = terminatingMembers;
+    }
+
+    public Map<String, Long> getCreatedMembers() {
+        return createdMembers;
+    }
+
+    public void setCreatedMembers(Map<String, Long> createdMembers) {
+        this.createdMembers = createdMembers;
+    }
+
+    public Map<String, Long> getInActiveMembers() {
+        return inActiveMembers;
+    }
+
+    public void setInActiveMembers(Map<String, Long> inActiveMembers) {
+        this.inActiveMembers = inActiveMembers;
+    }
+
+    public Map<String, Long> getActivateddMembers() {
+        return activateddMembers;
+    }
+
+    public void setActivateddMembers(Map<String, Long> activateddMembers) {
+        this.activateddMembers = activateddMembers;
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-common/src/main/java/org/apache/stratos/integration/common/Util.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-common/src/main/java/org/apache/stratos/integration/common/Util.java b/products/stratos/modules/integration/test-common/src/main/java/org/apache/stratos/integration/common/Util.java
new file mode 100644
index 0000000..4cdf4a7
--- /dev/null
+++ b/products/stratos/modules/integration/test-common/src/main/java/org/apache/stratos/integration/common/Util.java
@@ -0,0 +1,84 @@
+/*
+ * Copyright 2005-2015 WSO2, Inc. (http://wso2.com)
+ *
+ * Licensed 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.integration.common;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.ServerSocket;
+
+public class Util {
+    public static final String CARBON_ZIP_KEY = "carbon.zip";
+    public static final String ACTIVEMQ_BIND_ADDRESS = "activemq.bind.address";
+    public static final String CARBON_CONF_PATH = "repository" + File.separator + "conf";
+    public static final String BASE_PATH = Util.class.getResource(File.separator).getPath();
+    public static final int MIN_PORT_NUMBER = 1;
+    public static final int MAX_PORT_NUMBER = 65535;
+    public static final int SUPER_TENANT_ID = -1234;
+
+    public static final String STRATOS_SECURE_DYNAMIC_PORT_PLACEHOLDER = "STRATOS_SECURE_DYNAMIC_PORT";
+    public static final String ACTIVEMQ_DYNAMIC_PORT_PLACEHOLDER = "ACTIVEMQ_DYNAMIC_PORT";
+    public static final String THRIFT_DYNAMIC_PORT_PLACEHOLDER = "THRIFT_DYNAMIC_PORT";
+    public static final String STRATOS_DYNAMIC_PORT_PLACEHOLDER = "STRATOS_DYNAMIC_PORT";
+    public static final String THRIFT_SECURE_DYNAMIC_PORT_PLACEHOLDER = "THRIFT_SECURE_DYNAMIC_PORT";
+
+    public static final int THRIFT_DEFAULT_PORT = 7611;
+    public static final int THRIFT_DEFAULT_SECURE_PORT = 7711;
+    public static final int STRATOS_DEFAULT_PORT = 9763;
+    public static final int STRATOS_DEFAULT_SECURE_PORT = 9443;
+    public static final int STRATOS_DEFAULT_RMI_REGISTRY_PORT = 9999;
+    public static final int STRATOS_DEFAULT_RMI_SERVER_PORT = 11111;
+
+    /**
+     * Get resources folder path
+     *
+     * @return path to resources folder
+     */
+    public static String getCommonResourcesFolderPath() {
+        return BASE_PATH + ".." + File.separator + ".." + File.separator + "src" + File.separator + "test" +
+                File.separator + "resources" + File.separator + "common";
+    }
+
+    /**
+     * Checks to see if a specific port is available.
+     *
+     * @param port the port to check for availability
+     */
+    public static boolean isPortAvailable(int port) {
+        if (port < Util.MIN_PORT_NUMBER || port > Util.MAX_PORT_NUMBER) {
+            throw new IllegalArgumentException("Invalid start port: " + port);
+        }
+
+        ServerSocket ss = null;
+        try {
+            ss = new ServerSocket(port);
+            ss.setReuseAddress(true);
+            return true;
+        }
+        catch (IOException ignored) {
+        }
+        finally {
+            if (ss != null) {
+                try {
+                    ss.close();
+                }
+                catch (IOException ignored) {
+                }
+            }
+        }
+        return false;
+    }
+}
\ No newline at end of file


[02/21] stratos git commit: Uplifting automation engine to v4.4.3, dynamically pick ports for integration tests

Posted by ra...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/deployment-policy-test/deployment-policies/deployment-policy-deployment-policy-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/deployment-policy-test/deployment-policies/deployment-policy-deployment-policy-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/deployment-policy-test/deployment-policies/deployment-policy-deployment-policy-test.json
new file mode 100644
index 0000000..49b3e0d
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/deployment-policy-test/deployment-policies/deployment-policy-deployment-policy-test.json
@@ -0,0 +1,32 @@
+{
+    "id": "deployment-policy-deployment-policy-test",
+    "networkPartitions": [
+        {
+            "id": "network-partition-deployment-policy-test-1",
+            "partitionAlgo": "one-after-another",
+            "partitions": [
+                {
+                    "id": "partition-1",
+                    "partitionMax": 20
+                }
+            ]
+        },
+        {
+            "id": "network-partition-deployment-policy-test-2",
+            "partitionAlgo": "round-robin",
+            "partitions": [
+                {
+                    "id": "network-partition-6-partition-1",
+                    "partitionMax": 10
+                },
+                {
+                    "id": "network-partition-6-partition-2",
+                    "partitionMax": 9
+                }
+            ]
+        }
+    ]
+}
+
+
+

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/deployment-policy-test/network-partitions/mock/network-partition-deployment-policy-test-1-v1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/deployment-policy-test/network-partitions/mock/network-partition-deployment-policy-test-1-v1.json b/products/stratos/modules/integration/test-integration/src/test/resources/deployment-policy-test/network-partitions/mock/network-partition-deployment-policy-test-1-v1.json
new file mode 100644
index 0000000..9670e48
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/deployment-policy-test/network-partitions/mock/network-partition-deployment-policy-test-1-v1.json
@@ -0,0 +1,28 @@
+{
+    "id": "network-partition-deployment-policy-test-1",
+    "provider": "mock",
+    "partitions": [
+        {
+            "id": "partition-1",
+            "property": [
+                {
+                    "name": "region",
+                    "value": "default"
+                }
+            ]
+        },
+        {
+            "id": "partition-2",
+            "property": [
+                {
+                    "name": "region",
+                    "value": "default1"
+                },
+                {
+                    "name": "zone",
+                    "value": "z1"
+                }
+            ]
+        }
+    ]
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/deployment-policy-test/network-partitions/mock/network-partition-deployment-policy-test-1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/deployment-policy-test/network-partitions/mock/network-partition-deployment-policy-test-1.json b/products/stratos/modules/integration/test-integration/src/test/resources/deployment-policy-test/network-partitions/mock/network-partition-deployment-policy-test-1.json
new file mode 100644
index 0000000..3b420fe
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/deployment-policy-test/network-partitions/mock/network-partition-deployment-policy-test-1.json
@@ -0,0 +1,15 @@
+{
+    "id": "network-partition-deployment-policy-test-1",
+    "provider": "mock",
+    "partitions": [
+        {
+            "id": "partition-1",
+            "property": [
+                {
+                    "name": "region",
+                    "value": "default"
+                }
+            ]
+        }
+    ]
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/deployment-policy-test/network-partitions/mock/network-partition-deployment-policy-test-2.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/deployment-policy-test/network-partitions/mock/network-partition-deployment-policy-test-2.json b/products/stratos/modules/integration/test-integration/src/test/resources/deployment-policy-test/network-partitions/mock/network-partition-deployment-policy-test-2.json
new file mode 100644
index 0000000..890ee6c
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/deployment-policy-test/network-partitions/mock/network-partition-deployment-policy-test-2.json
@@ -0,0 +1,24 @@
+{
+    "id": "network-partition-deployment-policy-test-2",
+    "provider": "mock",
+    "partitions": [
+        {
+            "id": "network-partition-6-partition-1",
+            "property": [
+                {
+                    "name": "region",
+                    "value": "default"
+                }
+            ]
+        },
+        {
+            "id": "network-partition-6-partition-2",
+            "property": [
+                {
+                    "name": "region",
+                    "value": "default"
+                }
+            ]
+        }
+    ]
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/filters.txt
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/filters.txt b/products/stratos/modules/integration/test-integration/src/test/resources/filters.txt
new file mode 100644
index 0000000..0b3d4cc
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/filters.txt
@@ -0,0 +1,16 @@
+-*.stub*
+-*.stub_
+-*.stub_4.0.0
+-*.stub-
+-org.eclipse.*
+-*.equinox.*
+-samples.*
+-*.log4j*
+-*.axis2*
+-*startup*
+-org.wso2.carbon.caching.core.identity.*
+-org.wso2.carbon.caching.core.permissiontree.*
+-org.wso2.carbon.caching.infinispan.*
+-org.wso2.carbon.event.core.internal.delivery.jms.*
+-org.wso2.carbon.event.core.qpid.*
+-org.wso2.carbon.registry.synchronization.*

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/application-policies/application-policy-group-startup-order-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/application-policies/application-policy-group-startup-order-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/application-policies/application-policy-group-startup-order-test.json
new file mode 100644
index 0000000..e7d80a5
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/application-policies/application-policy-group-startup-order-test.json
@@ -0,0 +1,13 @@
+{
+    "id": "application-policy-group-startup-order-test",
+    "algorithm": "one-after-another",
+    "networkPartitions": [
+        "network-partition-group-startup-order-test-1"
+    ],
+    "properties": [
+        {
+            "name": "key-2",
+            "value": "value-2"
+        }
+    ]
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/applications/group-startup-order-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/applications/group-startup-order-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/applications/group-startup-order-test.json
new file mode 100644
index 0000000..60ed310
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/applications/group-startup-order-test.json
@@ -0,0 +1,206 @@
+{
+    "applicationId": "group-startup-order-test",
+    "alias": "group-startup-order-test",
+    "components": {
+        "groups": [
+            {
+                "name": "group6-group-startup-order-test",
+                "alias": "my-group6-group-startup-order-test",
+                "groupMinInstances": 1,
+                "groupMaxInstances": 1,
+                "groups": [
+                    {
+                        "name": "group7-group-startup-order-test",
+                        "alias": "my-group7-group-startup-order-test",
+                        "deploymentPolicy": "deployment-policy-group-startup-order-test",
+                        "groupMinInstances": 1,
+                        "groupMaxInstances": 1,
+                        "cartridges": [
+                            {
+                                "type": "tomcat-group-startup-order-test",
+                                "cartridgeMin": 1,
+                                "cartridgeMax": 2,
+                                "subscribableInfo": {
+                                    "alias": "my-group7-tomcat-group-startup-order-test",
+                                    "autoscalingPolicy": "autoscaling-policy-group-startup-order-test",
+                                    "artifactRepository": {
+                                        "privateRepo": false,
+                                        "repoUrl": "https://github.com/imesh/stratos-tomcat1-applications.git",
+                                        "repoUsername": "",
+                                        "repoPassword": ""
+                                    }
+                                }
+                            },
+                            {
+                                "type": "tomcat1-group-startup-order-test",
+                                "cartridgeMin": 1,
+                                "cartridgeMax": 2,
+                                "subscribableInfo": {
+                                    "alias": "my-group7-tomcat1-group-startup-order-test",
+                                    "autoscalingPolicy": "autoscaling-policy-group-startup-order-test",
+                                    "artifactRepository": {
+                                        "privateRepo": false,
+                                        "repoUrl": "https://github.com/imesh/stratos-tomcat1-applications.git",
+                                        "repoUsername": "",
+                                        "repoPassword": ""
+                                    }
+                                }
+                            }
+                        ]
+                    },
+                    {
+                        "name": "group-tom2-group-startup-order-test",
+                        "alias": "my-group6-group-tom2-group-startup-order-test",
+                        "deploymentPolicy": "deployment-policy-group-startup-order-test",
+                        "groupMinInstances": 1,
+                        "groupMaxInstances": 1,
+                        "cartridges": [
+                            {
+                                "type": "tomcat2-group-startup-order-test",
+                                "cartridgeMin": 1,
+                                "cartridgeMax": 2,
+                                "subscribableInfo": {
+                                    "alias": "my-group-tom2-tomcat2-group-startup-order-test",
+                                    "autoscalingPolicy": "autoscaling-policy-group-startup-order-test",
+                                    "artifactRepository": {
+                                        "privateRepo": false,
+                                        "repoUrl": "https://github.com/imesh/stratos-tomcat2-applications.git",
+                                        "repoUsername": "",
+                                        "repoPassword": ""
+                                    }
+                                }
+                            },
+                            {
+                                "type": "tomcat3-group-startup-order-test",
+                                "cartridgeMin": 1,
+                                "cartridgeMax": 2,
+                                "subscribableInfo": {
+                                    "alias": "my-group-tom2-tomcat3-group-startup-order-test",
+                                    "autoscalingPolicy": "autoscaling-policy-group-startup-order-test",
+                                    "artifactRepository": {
+                                        "privateRepo": false,
+                                        "repoUrl": "https://github.com/imesh/stratos-tomcat2-applications.git",
+                                        "repoUsername": "",
+                                        "repoPassword": ""
+                                    }
+                                }
+                            }
+                        ]
+                    }
+                ]
+            },
+            {
+                "name": "group8-group-startup-order-test",
+                "alias": "my-group8-group-startup-order-test",
+                "groupMinInstances": 1,
+                "groupMaxInstances": 1,
+                "deploymentPolicy": "deployment-policy-group-startup-order-test",
+                "groups": [
+                    {
+                        "name": "group9-group-startup-order-test",
+                        "alias": "my-group9-group-startup-order-test",
+                        "groupMinInstances": 1,
+                        "groupMaxInstances": 1,
+                        "cartridges": [
+                            {
+                                "type": "tomcat1-group-startup-order-test",
+                                "cartridgeMin": 1,
+                                "cartridgeMax": 2,
+                                "subscribableInfo": {
+                                    "alias": "my-tomcat1-group9-group-startup-order-test",
+                                    "autoscalingPolicy": "autoscaling-policy-group-startup-order-test",
+                                    "artifactRepository": {
+                                        "privateRepo": false,
+                                        "repoUrl": "https://github.com/imesh/stratos-tomcat1-applications.git",
+                                        "repoUsername": "",
+                                        "repoPassword": ""
+                                    }
+                                }
+                            }
+                        ]
+                    }
+                ],
+                "cartridges": [
+                    {
+                        "type": "tomcat2-group-startup-order-test",
+                        "cartridgeMin": 1,
+                        "cartridgeMax": 2,
+                        "subscribableInfo": {
+                            "alias": "my-tomcat2-group8-group-startup-order-test",
+                            "autoscalingPolicy": "autoscaling-policy-group-startup-order-test",
+                            "artifactRepository": {
+                                "privateRepo": false,
+                                "repoUrl": "https://github.com/imesh/stratos-tomcat2-applications.git",
+                                "repoUsername": "",
+                                "repoPassword": ""
+                            }
+                        }
+                    },
+                    {
+                        "type": "tomcat-group-startup-order-test",
+                        "cartridgeMin": 1,
+                        "cartridgeMax": 2,
+                        "subscribableInfo": {
+                            "alias": "my-tomcat-group8-group-startup-order-test",
+                            "autoscalingPolicy": "autoscaling-policy-group-startup-order-test",
+                            "artifactRepository": {
+                                "privateRepo": false,
+                                "repoUrl": "https://github.com/imesh/stratos-tomcat2-applications.git",
+                                "repoUsername": "",
+                                "repoPassword": ""
+                            }
+                        }
+                    }
+                ]
+            }
+        ],
+        "cartridges": [
+            {
+                "type": "stratos-lb-group-startup-order-test",
+                "cartridgeMin": 1,
+                "cartridgeMax": 2,
+                "subscribableInfo": {
+                    "alias": "my-stratos-lb-group-startup-order-test",
+                    "autoscalingPolicy": "autoscaling-policy-group-startup-order-test",
+                    "deploymentPolicy": "deployment-policy-group-startup-order-test"
+                }
+            },
+            {
+                "type": "tomcat-group-startup-order-test",
+                "cartridgeMin": 1,
+                "cartridgeMax": 2,
+                "subscribableInfo": {
+                    "alias": "my-tomcat-group-startup-order-test",
+                    "autoscalingPolicy": "autoscaling-policy-group-startup-order-test",
+                    "deploymentPolicy": "deployment-policy-group-startup-order-test",
+                    "artifactRepository": {
+                        "privateRepo": false,
+                        "repoUrl": "https://github.com/imesh/stratos-tomcat-applications.git",
+                        "repoUsername": "",
+                        "repoPassword": ""
+                    }
+                }
+            }
+        ],
+        "dependencies": {
+            "startupOrders": [
+                {
+                    "aliases": [
+                        "cartridge.my-stratos-lb-group-startup-order-test",
+                        "cartridge.my-tomcat-group-startup-order-test",
+                        "group.my-group8-group-startup-order-test"
+                    ]
+                },
+                {
+                    "aliases": [
+                        "cartridge.my-stratos-lb-group-startup-order-test",
+                        "cartridge.my-tomcat-group-startup-order-test",
+                        "group.my-group6-group-startup-order-test"
+                    ]
+                }
+            ],
+            "terminationBehaviour": "terminate-all"
+        }
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/autoscaling-policies/autoscaling-policy-group-startup-order-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/autoscaling-policies/autoscaling-policy-group-startup-order-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/autoscaling-policies/autoscaling-policy-group-startup-order-test.json
new file mode 100644
index 0000000..0c6ec97
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/autoscaling-policies/autoscaling-policy-group-startup-order-test.json
@@ -0,0 +1,14 @@
+{
+    "id": "autoscaling-policy-group-startup-order-test",
+    "loadThresholds": {
+        "requestsInFlight": {
+            "threshold": 35
+        },
+        "memoryConsumption": {
+            "threshold": 45
+        },
+        "loadAverage": {
+            "threshold": 25
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/cartridges-groups/group6-group-startup-order-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/cartridges-groups/group6-group-startup-order-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/cartridges-groups/group6-group-startup-order-test.json
new file mode 100644
index 0000000..75d71fb
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/cartridges-groups/group6-group-startup-order-test.json
@@ -0,0 +1,44 @@
+{
+    "name": "group6-group-startup-order-test",
+    "groups": [
+        {
+            "name": "group7-group-startup-order-test",
+            "cartridges": [
+                "tomcat-group-startup-order-test",
+                "tomcat1-group-startup-order-test"
+            ],
+            "dependencies": {
+                "terminationBehaviour": "terminate-none",
+                "startupOrders": [
+                    {
+                        "aliases": [
+                            "cartridge.my-group7-tomcat-group-startup-order-test",
+                            "cartridge.my-group7-tomcat1-group-startup-order-test"
+                        ]
+                    }
+                ]
+            }
+        },
+        {
+            "name": "group-tom2-group-startup-order-test",
+            "dependencies": {
+                "terminationBehaviour": "terminate-none",
+                "startupOrders": [
+                    {
+                        "aliases": [
+                            "cartridge.my-group-tom2-tomcat2-group-startup-order-test",
+                            "cartridge.my-group-tom2-tomcat3-group-startup-order-test"
+                        ]
+                    }
+                ]
+            },
+            "cartridges": [
+                "tomcat2-group-startup-order-test",
+                "tomcat3-group-startup-order-test"
+            ]
+        }
+    ]
+}
+
+
+

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/cartridges-groups/group8-group-startup-order-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/cartridges-groups/group8-group-startup-order-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/cartridges-groups/group8-group-startup-order-test.json
new file mode 100644
index 0000000..c83b1ce
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/cartridges-groups/group8-group-startup-order-test.json
@@ -0,0 +1,18 @@
+{
+    "name": "group8-group-startup-order-test",
+    "groups": [
+        {
+            "name": "group9-group-startup-order-test",
+            "cartridges": [
+                "tomcat1-group-startup-order-test"
+            ]
+        }
+    ],
+    "cartridges": [
+        "tomcat2-group-startup-order-test","tomcat-group-startup-order-test"
+    ],
+    "dependencies": {
+        "terminationBehaviour": "terminate-all"
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/cartridges/mock/esb-group-startup-order-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/cartridges/mock/esb-group-startup-order-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/cartridges/mock/esb-group-startup-order-test.json
new file mode 100755
index 0000000..b6f428e
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/cartridges/mock/esb-group-startup-order-test.json
@@ -0,0 +1,50 @@
+{
+    "type": "esb-group-startup-order-test",
+    "provider": "apache",
+    "host": "stratos.apache.org",
+    "category": "framework",
+    "displayName": "esb-group-startup-order-test",
+    "description": "esb-group-startup-order-test Cartridge",
+    "version": "7",
+    "multiTenant": "false",
+    "portMapping": [
+        {
+            "name": "http-22",
+            "protocol": "http",
+            "port": "22",
+            "proxyPort": "8280"
+        }
+    ],
+    "deployment": {
+    },
+    "iaasProvider": [
+        {
+            "type": "mock",
+            "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
+            "networkInterfaces": [
+                {
+                    "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e"
+                }
+            ],
+            "property": [
+                {
+                    "name": "instanceType",
+                    "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594"
+                },
+                {
+                    "name": "keyPair",
+                    "value": "vishanth-key"
+                },
+                {
+                    "name": "securityGroups",
+                    "value": "default"
+                }
+            ]
+        }
+    ],
+    "metadataKeys": [
+        "server_ip",
+        "username",
+        "password"
+    ]
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/cartridges/mock/php-group-startup-order-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/cartridges/mock/php-group-startup-order-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/cartridges/mock/php-group-startup-order-test.json
new file mode 100755
index 0000000..95f78a5
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/cartridges/mock/php-group-startup-order-test.json
@@ -0,0 +1,51 @@
+{
+    "type": "php-group-startup-order-test",
+    "provider": "apache",
+    "category": "framework",
+    "host": "php.stratos.org",
+    "displayName": "php-group-startup-order-test",
+    "description": "php-group-startup-order-test Cartridge",
+    "version": "7",
+    "multiTenant": "false",
+    "portMapping": [
+        {
+            "name": "http-80",
+            "protocol": "http",
+            "port": "8080",
+            "proxyPort": "8280"
+        },
+        {
+            "name": "http-22",
+            "protocol": "tcp",
+            "port": "22",
+            "proxyPort": "8222"
+        }
+    ],
+    "deployment": {
+    },
+    "iaasProvider": [
+        {
+            "type": "mock",
+            "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
+            "networkInterfaces": [
+                {
+                    "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e"
+                }
+            ],
+            "property": [
+                {
+                    "name": "instanceType",
+                    "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594"
+                },
+                {
+                    "name": "keyPair",
+                    "value": "reka"
+                },
+                {
+                    "name": "securityGroups",
+                    "value": "default"
+                }
+            ]
+        }
+    ]
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/cartridges/mock/stratos-lb-group-startup-order-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/cartridges/mock/stratos-lb-group-startup-order-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/cartridges/mock/stratos-lb-group-startup-order-test.json
new file mode 100755
index 0000000..1c665b7
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/cartridges/mock/stratos-lb-group-startup-order-test.json
@@ -0,0 +1,44 @@
+{
+    "type": "stratos-lb-group-startup-order-test",
+    "provider": "stratos",
+    "category": "load-balancer",
+    "host": "complex-app-with-lb",
+    "displayName": "Stratos Load Balancer",
+    "description": "Stratos Load Balancer Cartridge",
+    "version": "7",
+    "multiTenant": "false",
+    "portMapping": [
+        {
+            "name": "http-22",
+            "protocol": "http",
+            "port": "22",
+            "proxyPort": "8280"
+        }
+    ],
+    "deployment": {
+    },
+    "iaasProvider": [
+        {
+            "type": "mock",
+            "imageId": "image1",
+            "property": [
+                {
+                    "name": "instanceType",
+                    "value": "instanceType1"
+                },
+                {
+                    "name": "keyPair",
+                    "value": "default"
+                },
+                {
+                    "name": "securityGroups",
+                    "value": "default"
+                }
+            ]
+        }
+    ],
+    "metadataKeys": [
+        "writeparam3",
+        "writeparam4"
+    ]
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/cartridges/mock/tomcat-group-startup-order-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/cartridges/mock/tomcat-group-startup-order-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/cartridges/mock/tomcat-group-startup-order-test.json
new file mode 100755
index 0000000..7cf895a
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/cartridges/mock/tomcat-group-startup-order-test.json
@@ -0,0 +1,53 @@
+{
+    "type": "tomcat-group-startup-order-test",
+    "provider": "apache",
+    "host": "tomcat.stratos.org",
+    "category": "framework",
+    "displayName": "tomcat-group-startup-order-test",
+    "description": "tomcat-group-startup-order-test Cartridge",
+    "version": "7",
+    "multiTenant": "false",
+    "portMapping": [
+        {
+            "name": "http-22",
+            "protocol": "http",
+            "port": "22",
+            "proxyPort": "8280"
+        },
+        {
+            "protocol": "http",
+            "port": "8080",
+            "proxyPort": "80"
+        }
+    ],
+    "deployment": {
+    },
+    "iaasProvider": [
+        {
+            "type": "mock",
+            "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
+            "networkInterfaces": [
+                {
+                    "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e"
+                }
+            ],
+            "property": [
+                {
+                    "name": "instanceType",
+                    "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594"
+                },
+                {
+                    "name": "keyPair",
+                    "value": "vishanth-key"
+                },
+                {
+                    "name": "securityGroups",
+                    "value": "default"
+                }
+            ]
+        }
+    ],
+    "metadataKeys": [
+        "url"
+    ]
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/cartridges/mock/tomcat1-group-startup-order-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/cartridges/mock/tomcat1-group-startup-order-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/cartridges/mock/tomcat1-group-startup-order-test.json
new file mode 100755
index 0000000..02a1cfd
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/cartridges/mock/tomcat1-group-startup-order-test.json
@@ -0,0 +1,45 @@
+{
+    "type": "tomcat1-group-startup-order-test",
+    "provider": "apache",
+    "category": "framework",
+    "host": "tomcat1-group-startup-order-test.stratos.org",
+    "displayName": "tomcat1-group-startup-order-test",
+    "description": "tomcat1-group-startup-order-test Cartridge",
+    "version": "7",
+    "multiTenant": "false",
+    "portMapping": [
+        {
+            "name": "http-22",
+            "protocol": "http",
+            "port": "22",
+            "proxyPort": "8280"
+        }
+    ],
+    "deployment": {
+    },
+    "iaasProvider": [
+        {
+            "type": "mock",
+            "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
+            "networkInterfaces": [
+                {
+                    "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e"
+                }
+            ],
+            "property": [
+                {
+                    "name": "instanceType",
+                    "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594"
+                },
+                {
+                    "name": "keyPair",
+                    "value": "reka"
+                },
+                {
+                    "name": "securityGroups",
+                    "value": "default"
+                }
+            ]
+        }
+    ]
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/cartridges/mock/tomcat2-group-startup-order-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/cartridges/mock/tomcat2-group-startup-order-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/cartridges/mock/tomcat2-group-startup-order-test.json
new file mode 100755
index 0000000..0d2055f
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/cartridges/mock/tomcat2-group-startup-order-test.json
@@ -0,0 +1,49 @@
+{
+    "type": "tomcat2-group-startup-order-test",
+    "provider": "apache",
+    "category": "framework",
+    "host": "tomcat2-group-startup-order-test.stratos.org",
+    "displayName": "tomcat2-group-startup-order-test",
+    "description": "tomcat2-group-startup-order-test Cartridge",
+    "version": "7",
+    "multiTenant": "false",
+    "portMapping": [
+        {
+            "name": "http-22",
+            "protocol": "http",
+            "port": "22",
+            "proxyPort": "8280"
+        }
+    ],
+    "deployment": {
+    },
+    "iaasProvider": [
+        {
+            "type": "mock",
+            "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
+            "networkInterfaces": [
+                {
+                    "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e"
+                }
+            ],
+            "property": [
+                {
+                    "name": "instanceType",
+                    "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594"
+                },
+                {
+                    "name": "keyPair",
+                    "value": "reka"
+                },
+                {
+                    "name": "securityGroups",
+                    "value": "default"
+                }
+            ]
+        }
+    ],
+    "metadataKeys": [
+        "writeparam5",
+        "writeparam6"
+    ]
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/cartridges/mock/tomcat3-group-startup-order-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/cartridges/mock/tomcat3-group-startup-order-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/cartridges/mock/tomcat3-group-startup-order-test.json
new file mode 100755
index 0000000..b4397cb
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/cartridges/mock/tomcat3-group-startup-order-test.json
@@ -0,0 +1,31 @@
+{
+    "type": "tomcat3-group-startup-order-test",
+    "provider": "apache",
+    "host": "tomcat.stratos.org",
+    "category": "framework",
+    "displayName": "Tomcat 7",
+    "description": "Tomcat 7 Cartridge",
+    "version": "7",
+    "multiTenant": "false",
+    "portMapping": [
+        {
+            "name": "http-8080",
+            "protocol": "http",
+            "port": "8080",
+            "proxyPort": "8280"
+        }
+    ],
+    "deployment": {
+        "baseDir": "/opt/tomcat/webapps"
+    },
+    "iaasProvider": [
+        {
+            "type": "mock",
+            "imageId": "not-needed",
+            "networkInterfaces": [
+            ],
+            "property": [
+            ]
+        }
+    ]
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/deployment-policies/deployment-policy-group-startup-order-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/deployment-policies/deployment-policy-group-startup-order-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/deployment-policies/deployment-policy-group-startup-order-test.json
new file mode 100644
index 0000000..72f24fc
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/deployment-policies/deployment-policy-group-startup-order-test.json
@@ -0,0 +1,18 @@
+{
+    "id": "deployment-policy-group-startup-order-test",
+    "networkPartitions": [
+        {
+            "id": "network-partition-group-startup-order-test-1",
+            "partitionAlgo": "one-after-another",
+            "partitions": [
+                {
+                    "id": "partition-1",
+                    "partitionMax": 4
+                }
+            ]
+        }
+    ]
+}
+
+
+

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/network-partitions/mock/network-partition-group-startup-order-test-1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/network-partitions/mock/network-partition-group-startup-order-test-1.json b/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/network-partitions/mock/network-partition-group-startup-order-test-1.json
new file mode 100644
index 0000000..238f640
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/network-partitions/mock/network-partition-group-startup-order-test-1.json
@@ -0,0 +1,15 @@
+{
+    "id": "network-partition-group-startup-order-test-1",
+    "provider": "mock",
+    "partitions": [
+        {
+            "id": "partition-1",
+            "property": [
+                {
+                    "name": "region",
+                    "value": "default"
+                }
+            ]
+        }
+    ]
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/network-partitions/mock/network-partition-group-startup-order-test-2.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/network-partitions/mock/network-partition-group-startup-order-test-2.json b/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/network-partitions/mock/network-partition-group-startup-order-test-2.json
new file mode 100644
index 0000000..7372b78
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/group-startup-order-test/network-partitions/mock/network-partition-group-startup-order-test-2.json
@@ -0,0 +1,24 @@
+{
+    "id": "network-partition-group-startup-order-test-2",
+    "provider": "mock",
+    "partitions": [
+        {
+            "id": "network-partition-10-partition-1",
+            "property": [
+                {
+                    "name": "region",
+                    "value": "default"
+                }
+            ]
+        },
+        {
+            "id": "network-partition-10-partition-2",
+            "property": [
+                {
+                    "name": "region",
+                    "value": "default"
+                }
+            ]
+        }
+    ]
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/group-termination-behavior-test/application-policies/application-policy-group-termination-behavior-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/group-termination-behavior-test/application-policies/application-policy-group-termination-behavior-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/group-termination-behavior-test/application-policies/application-policy-group-termination-behavior-test.json
new file mode 100644
index 0000000..15e757b
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/group-termination-behavior-test/application-policies/application-policy-group-termination-behavior-test.json
@@ -0,0 +1,17 @@
+{
+    "id": "application-policy-group-termination-behavior-test",
+    "algorithm": "one-after-another",
+    "networkPartitions": [
+        "network-partition-group-termination-behavior-test-1"
+    ],
+    "properties": [
+        {
+            "name": "networkPartitionGroups",
+            "value": "network-partition-group-termination-behavior-test-1"
+        },
+        {
+            "name": "key-2",
+            "value": "value-2"
+        }
+    ]
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/group-termination-behavior-test/applications/group-termination-behavior-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/group-termination-behavior-test/applications/group-termination-behavior-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/group-termination-behavior-test/applications/group-termination-behavior-test.json
new file mode 100644
index 0000000..70432ae
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/group-termination-behavior-test/applications/group-termination-behavior-test.json
@@ -0,0 +1,101 @@
+{
+    "alias": "group-termination-behavior-test",
+    "applicationId": "group-termination-behavior-test",
+    "components": {
+        "cartridges": [],
+        "groups": [
+            {
+                "name": "g-sc-G4-group-termination-behavior-test",
+                "groupMaxInstances": 1,
+                "groupMinInstances": 1,
+                "alias": "my-g-sc-G4-group-termination-behavior-test",
+                "cartridges": [
+                    {
+                        "cartridgeMin": 1,
+                        "cartridgeMax": 1,
+                        "type": "c1-group-termination-behavior-test",
+                        "subscribableInfo": {
+                            "alias": "c1-1x0-group-termination-behavior-test",
+                            "deploymentPolicy": "deployment-policy-group-termination-behavior-test",
+                            "artifactRepository": {
+                                "repoUsername": "user",
+                                "repoUrl": "http://octl.qmog.cisco.com:10080/git/default.git",
+                                "privateRepo": true,
+                                "repoPassword": "c-policy"
+                            },
+                            "autoscalingPolicy": "autoscaling-policy-group-termination-behavior-test"
+                        }
+                    }
+                ],
+                "groups": [
+                    {
+                        "name": "g-G3-group-termination-behavior-test",
+                        "groupMaxInstances": 1,
+                        "groupMinInstances": 1,
+                        "alias": "g-G3-1x0-group-termination-behavior-test",
+                        "cartridges": [
+                            {
+                                "cartridgeMin": 1,
+                                "cartridgeMax": 1,
+                                "type": "c2-group-termination-behavior-test",
+                                "subscribableInfo": {
+                                    "alias": "c2-1x0-group-termination-behavior-test",
+                                    "deploymentPolicy": "deployment-policy-group-termination-behavior-test",
+                                    "artifactRepository": {
+                                        "repoUsername": "user",
+                                        "repoUrl": "http://octl.qmog.cisco.com:10080/git/default.git",
+                                        "privateRepo": true,
+                                        "repoPassword": "c-policy"
+                                    },
+                                    "autoscalingPolicy": "autoscaling-policy-group-termination-behavior-test"
+                                }
+                            }
+                        ],
+                        "groups": [
+                            {
+                                "name": "g-G1-group-termination-behavior-test",
+                                "groupMaxInstances": 1,
+                                "groupMinInstances": 1,
+                                "alias": "g-G1-1x0-group-termination-behavior-test",
+                                "cartridges": [
+                                    {
+                                        "cartridgeMin": 1,
+                                        "cartridgeMax": 1,
+                                        "type": "c4-group-termination-behavior-test",
+                                        "subscribableInfo": {
+                                            "alias": "c4-1x0-group-termination-behavior-test",
+                                            "deploymentPolicy": "deployment-policy-group-termination-behavior-test",
+                                            "artifactRepository": {
+                                                "repoUsername": "user",
+                                                "repoUrl": "http://octl.qmog.cisco.com:10080/git/default.git",
+                                                "privateRepo": true,
+                                                "repoPassword": "c-policy"
+                                            },
+                                            "autoscalingPolicy": "autoscaling-policy-group-termination-behavior-test"
+                                        }
+                                    },
+                                    {
+                                        "cartridgeMin": 1,
+                                        "cartridgeMax": 1,
+                                        "type": "c3-group-termination-behavior-test",
+                                        "subscribableInfo": {
+                                            "alias": "c3-1x0-group-termination-behavior-test",
+                                            "deploymentPolicy": "deployment-policy-group-termination-behavior-test",
+                                            "artifactRepository": {
+                                                "repoUsername": "user",
+                                                "repoUrl": "http://octl.qmog.cisco.com:10080/git/default.git",
+                                                "privateRepo": true,
+                                                "repoPassword": "c-policy"
+                                            },
+                                            "autoscalingPolicy": "autoscaling-policy-group-termination-behavior-test"
+                                        }
+                                    }
+                                ]
+                            }
+                        ]
+                    }
+                ]
+            }
+        ]
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/group-termination-behavior-test/autoscaling-policies/autoscaling-policy-group-termination-behavior-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/group-termination-behavior-test/autoscaling-policies/autoscaling-policy-group-termination-behavior-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/group-termination-behavior-test/autoscaling-policies/autoscaling-policy-group-termination-behavior-test.json
new file mode 100644
index 0000000..fd81d17
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/group-termination-behavior-test/autoscaling-policies/autoscaling-policy-group-termination-behavior-test.json
@@ -0,0 +1,14 @@
+{
+    "id": "autoscaling-policy-group-termination-behavior-test",
+    "loadThresholds": {
+        "requestsInFlight": {
+            "threshold": 35
+        },
+        "memoryConsumption": {
+            "threshold": 45
+        },
+        "loadAverage": {
+            "threshold": 25
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/group-termination-behavior-test/cartridges-groups/cartridge-groups-group-termination-behavior-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/group-termination-behavior-test/cartridges-groups/cartridge-groups-group-termination-behavior-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/group-termination-behavior-test/cartridges-groups/cartridge-groups-group-termination-behavior-test.json
new file mode 100644
index 0000000..2d69021
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/group-termination-behavior-test/cartridges-groups/cartridge-groups-group-termination-behavior-test.json
@@ -0,0 +1,58 @@
+{
+  "name": "g-sc-G4-group-termination-behavior-test",
+  "dependencies": {
+    "terminationBehaviour": "terminate-none",
+    "startupOrders": [
+      {
+        "aliases": [
+          "group.g-G3-1x0-group-termination-behavior-test",
+          "cartridge.c1-1x0-group-termination-behavior-test"
+        ]
+      }
+    ]
+  },
+  "cartridges": [
+    "c1-group-termination-behavior-test"
+  ],
+  "groups": [
+    {
+      "name": "g-G3-group-termination-behavior-test",
+      "dependencies": {
+        "terminationBehaviour": "terminate-dependents",
+        "startupOrders": [
+          {
+            "aliases": [
+              "group.g-G1-1x0-group-termination-behavior-test",
+              "cartridge.c2-1x0-group-termination-behavior-test"
+            ]
+          }
+        ]
+      },
+      "cartridges": [
+        "c2-group-termination-behavior-test"
+      ],
+      "groups": [
+          {
+              "name": "g-G1-group-termination-behavior-test",
+              "dependencies": {
+                  "terminationBehaviour": "terminate-all",
+                  "startupOrders": [
+                      {
+                          "aliases": [
+                              "cartridge.c3-1x0-group-termination-behavior-test",
+                              "cartridge.c4-1x0-group-termination-behavior-test"
+                          ]
+                      }
+                  ]
+              },
+              "cartridges": [
+                  "c3-group-termination-behavior-test",
+                  "c4-group-termination-behavior-test"
+              ],
+              "groups": [
+              ]
+          }
+      ]
+    }
+  ]
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/group-termination-behavior-test/cartridges/mock/c1-group-termination-behavior-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/group-termination-behavior-test/cartridges/mock/c1-group-termination-behavior-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/group-termination-behavior-test/cartridges/mock/c1-group-termination-behavior-test.json
new file mode 100755
index 0000000..343fcd5
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/group-termination-behavior-test/cartridges/mock/c1-group-termination-behavior-test.json
@@ -0,0 +1,45 @@
+{
+    "type": "c1-group-termination-behavior-test",
+    "provider": "apache",
+    "host": "stratos.apache.org",
+    "category": "data",
+    "displayName": "c1-group-termination-behavior-test",
+    "description": "c1-group-termination-behavior-test Cartridge",
+    "version": "7",
+    "multiTenant": "false",
+    "portMapping": [
+        {
+            "protocol": "http",
+            "port": "22",
+            "proxyPort": "8280"
+        }
+    ],
+    "deployment": {
+    },
+    "iaasProvider": [
+        {
+            "type": "mock",
+            "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
+            "networkInterfaces": [
+                {
+                    "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e"
+                }
+            ],
+
+            "property": [
+                {
+                    "name": "instanceType",
+                    "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594"
+                },
+                {
+                    "name": "keyPair",
+                    "value": "vishanth-key"
+                },
+                {
+                    "name": "securityGroups",
+                    "value": "default"
+                }
+            ]
+        }
+    ]
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/group-termination-behavior-test/cartridges/mock/c2-group-termination-behavior-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/group-termination-behavior-test/cartridges/mock/c2-group-termination-behavior-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/group-termination-behavior-test/cartridges/mock/c2-group-termination-behavior-test.json
new file mode 100755
index 0000000..3d16511
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/group-termination-behavior-test/cartridges/mock/c2-group-termination-behavior-test.json
@@ -0,0 +1,45 @@
+{
+    "type": "c2-group-termination-behavior-test",
+    "provider": "apache",
+    "host": "stratos.apache.org",
+    "category": "data",
+    "displayName": "c2-group-termination-behavior-test",
+    "description": "c2-group-termination-behavior-test Cartridge",
+    "version": "7",
+    "multiTenant": "false",
+    "portMapping": [
+        {
+            "protocol": "http",
+            "port": "22",
+            "proxyPort": "8280"
+        }
+    ],
+    "deployment": {
+    },
+    "iaasProvider": [
+        {
+            "type": "mock",
+            "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
+            "networkInterfaces": [
+                {
+                    "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e"
+                }
+            ],
+
+            "property": [
+                {
+                    "name": "instanceType",
+                    "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594"
+                },
+                {
+                    "name": "keyPair",
+                    "value": "vishanth-key"
+                },
+                {
+                    "name": "securityGroups",
+                    "value": "default"
+                }
+            ]
+        }
+    ]
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/group-termination-behavior-test/cartridges/mock/c3-group-termination-behavior-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/group-termination-behavior-test/cartridges/mock/c3-group-termination-behavior-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/group-termination-behavior-test/cartridges/mock/c3-group-termination-behavior-test.json
new file mode 100755
index 0000000..10aeb5d
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/group-termination-behavior-test/cartridges/mock/c3-group-termination-behavior-test.json
@@ -0,0 +1,45 @@
+{
+    "type": "c3-group-termination-behavior-test",
+    "provider": "apache",
+    "host": "stratos.apache.org",
+    "category": "data",
+    "displayName": "c3-group-termination-behavior-test",
+    "description": "c3-group-termination-behavior-test Cartridge",
+    "version": "7",
+    "multiTenant": "false",
+    "portMapping": [
+        {
+            "protocol": "http",
+            "port": "22",
+            "proxyPort": "8280"
+        }
+    ],
+    "deployment": {
+    },
+    "iaasProvider": [
+        {
+            "type": "mock",
+            "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
+            "networkInterfaces": [
+                {
+                    "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e"
+                }
+            ],
+
+            "property": [
+                {
+                    "name": "instanceType",
+                    "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594"
+                },
+                {
+                    "name": "keyPair",
+                    "value": "vishanth-key"
+                },
+                {
+                    "name": "securityGroups",
+                    "value": "default"
+                }
+            ]
+        }
+    ]
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/group-termination-behavior-test/cartridges/mock/c4-group-termination-behavior-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/group-termination-behavior-test/cartridges/mock/c4-group-termination-behavior-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/group-termination-behavior-test/cartridges/mock/c4-group-termination-behavior-test.json
new file mode 100755
index 0000000..45414de
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/group-termination-behavior-test/cartridges/mock/c4-group-termination-behavior-test.json
@@ -0,0 +1,45 @@
+{
+    "type": "c4-group-termination-behavior-test",
+    "provider": "apache",
+    "host": "stratos.apache.org",
+    "category": "data",
+    "displayName": "c4-group-termination-behavior-test",
+    "description": "c4-group-termination-behavior-test Cartridge",
+    "version": "7",
+    "multiTenant": "false",
+    "portMapping": [
+        {
+            "protocol": "http",
+            "port": "22",
+            "proxyPort": "8280"
+        }
+    ],
+    "deployment": {
+    },
+    "iaasProvider": [
+        {
+            "type": "mock",
+            "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
+            "networkInterfaces": [
+                {
+                    "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e"
+                }
+            ],
+
+            "property": [
+                {
+                    "name": "instanceType",
+                    "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594"
+                },
+                {
+                    "name": "keyPair",
+                    "value": "vishanth-key"
+                },
+                {
+                    "name": "securityGroups",
+                    "value": "default"
+                }
+            ]
+        }
+    ]
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/group-termination-behavior-test/deployment-policies/deployment-policy-group-termination-behavior-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/group-termination-behavior-test/deployment-policies/deployment-policy-group-termination-behavior-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/group-termination-behavior-test/deployment-policies/deployment-policy-group-termination-behavior-test.json
new file mode 100644
index 0000000..035ad73
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/group-termination-behavior-test/deployment-policies/deployment-policy-group-termination-behavior-test.json
@@ -0,0 +1,18 @@
+{
+    "id": "deployment-policy-group-termination-behavior-test",
+    "networkPartitions": [
+        {
+            "id": "network-partition-group-termination-behavior-test-1",
+            "partitionAlgo": "one-after-another",
+            "partitions": [
+                {
+                    "id": "partition-1",
+                    "partitionMax": 4
+                }
+            ]
+        }
+    ]
+}
+
+
+

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/group-termination-behavior-test/network-partitions/mock/network-partition-group-termination-behavior-test-1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/group-termination-behavior-test/network-partitions/mock/network-partition-group-termination-behavior-test-1.json b/products/stratos/modules/integration/test-integration/src/test/resources/group-termination-behavior-test/network-partitions/mock/network-partition-group-termination-behavior-test-1.json
new file mode 100644
index 0000000..13abc47
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/group-termination-behavior-test/network-partitions/mock/network-partition-group-termination-behavior-test-1.json
@@ -0,0 +1,15 @@
+{
+    "id": "network-partition-group-termination-behavior-test-1",
+    "provider": "mock",
+    "partitions": [
+        {
+            "id": "partition-1",
+            "property": [
+                {
+                    "name": "region",
+                    "value": "default"
+                }
+            ]
+        }
+    ]
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/instrumentation.txt
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/instrumentation.txt b/products/stratos/modules/integration/test-integration/src/test/resources/instrumentation.txt
new file mode 100644
index 0000000..304c1b8
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/instrumentation.txt
@@ -0,0 +1 @@
+org.apache.stratos.*
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/keystores/products/client-truststore.jks
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/keystores/products/client-truststore.jks b/products/stratos/modules/integration/test-integration/src/test/resources/keystores/products/client-truststore.jks
new file mode 100644
index 0000000..2d22c24
Binary files /dev/null and b/products/stratos/modules/integration/test-integration/src/test/resources/keystores/products/client-truststore.jks differ

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/keystores/products/userRP.jks
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/keystores/products/userRP.jks b/products/stratos/modules/integration/test-integration/src/test/resources/keystores/products/userRP.jks
new file mode 100644
index 0000000..2536ea8
Binary files /dev/null and b/products/stratos/modules/integration/test-integration/src/test/resources/keystores/products/userRP.jks differ

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/keystores/products/wso2carbon.jks
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/keystores/products/wso2carbon.jks b/products/stratos/modules/integration/test-integration/src/test/resources/keystores/products/wso2carbon.jks
new file mode 100644
index 0000000..7942c53
Binary files /dev/null and b/products/stratos/modules/integration/test-integration/src/test/resources/keystores/products/wso2carbon.jks differ

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/network-partition-test/network-partitions/mock/network-partition-network-partition-test-1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/network-partition-test/network-partitions/mock/network-partition-network-partition-test-1.json b/products/stratos/modules/integration/test-integration/src/test/resources/network-partition-test/network-partitions/mock/network-partition-network-partition-test-1.json
new file mode 100644
index 0000000..d673796
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/network-partition-test/network-partitions/mock/network-partition-network-partition-test-1.json
@@ -0,0 +1,15 @@
+{
+    "id": "network-partition-network-partition-test-1",
+    "provider": "mock",
+    "partitions": [
+        {
+            "id": "partition-1",
+            "property": [
+                {
+                    "name": "region",
+                    "value": "default"
+                }
+            ]
+        }
+    ]
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/network-partition-test/network-partitions/mock/network-partition-network-partition-test-2.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/network-partition-test/network-partitions/mock/network-partition-network-partition-test-2.json b/products/stratos/modules/integration/test-integration/src/test/resources/network-partition-test/network-partitions/mock/network-partition-network-partition-test-2.json
new file mode 100644
index 0000000..3e1ba76
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/network-partition-test/network-partitions/mock/network-partition-network-partition-test-2.json
@@ -0,0 +1,15 @@
+{
+    "id": "network-partition-network-partition-test-2",
+    "provider": "mock",
+    "partitions": [
+        {
+            "id": "partition-1",
+            "property": [
+                {
+                    "name": "region",
+                    "value": "default"
+                }
+            ]
+        }
+    ]
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/network-partition-test/network-partitions/mock/network-partition-network-partition-test-v1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/network-partition-test/network-partitions/mock/network-partition-network-partition-test-v1.json b/products/stratos/modules/integration/test-integration/src/test/resources/network-partition-test/network-partitions/mock/network-partition-network-partition-test-v1.json
new file mode 100644
index 0000000..ad4796f
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/network-partition-test/network-partitions/mock/network-partition-network-partition-test-v1.json
@@ -0,0 +1,28 @@
+{
+    "id": "network-partition-network-partition-test",
+    "provider": "mock",
+    "partitions": [
+        {
+            "id": "partition-1",
+            "property": [
+                {
+                    "name": "region",
+                    "value": "default"
+                }
+            ]
+        },
+        {
+            "id": "partition-2",
+            "property": [
+                {
+                    "name": "region",
+                    "value": "default1"
+                },
+                {
+                    "name": "zone",
+                    "value": "z1"
+                }
+            ]
+        }
+    ]
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/network-partition-test/network-partitions/mock/network-partition-network-partition-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/network-partition-test/network-partitions/mock/network-partition-network-partition-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/network-partition-test/network-partitions/mock/network-partition-network-partition-test.json
new file mode 100644
index 0000000..1ecc5ba
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/network-partition-test/network-partitions/mock/network-partition-network-partition-test.json
@@ -0,0 +1,15 @@
+{
+    "id": "network-partition-network-partition-test",
+    "provider": "mock",
+    "partitions": [
+        {
+            "id": "partition-1",
+            "property": [
+                {
+                    "name": "region",
+                    "value": "default"
+                }
+            ]
+        }
+    ]
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/partition-round-robin-cluster-test/application-policies/application-policy-partition-round-robin-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/partition-round-robin-cluster-test/application-policies/application-policy-partition-round-robin-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/partition-round-robin-cluster-test/application-policies/application-policy-partition-round-robin-test.json
new file mode 100644
index 0000000..ffd9702
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/partition-round-robin-cluster-test/application-policies/application-policy-partition-round-robin-test.json
@@ -0,0 +1,13 @@
+{
+    "id": "application-policy-partition-round-robin-test",
+    "algorithm": "one-after-another",
+    "networkPartitions": [
+        "network-partition-partition-round-robin-test"
+    ],
+    "properties": [
+        {
+            "name": "key-2",
+            "value": "value-2"
+        }
+    ]
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/partition-round-robin-cluster-test/applications/partition-round-robin-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/partition-round-robin-cluster-test/applications/partition-round-robin-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/partition-round-robin-cluster-test/applications/partition-round-robin-test.json
new file mode 100644
index 0000000..1726eb4
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/partition-round-robin-cluster-test/applications/partition-round-robin-test.json
@@ -0,0 +1,28 @@
+{
+    "applicationId": "partition-round-robin-test",
+    "alias": "partition-round-robin-test",
+    "components": {
+        "cartridges": [
+            {
+                "type": "c7-partition-round-robin-test",
+                "cartridgeMin": 6,
+                "cartridgeMax": 8,
+                "subscribableInfo": {
+                    "alias": "my-c7",
+                    "autoscalingPolicy": "autoscaling-policy-partition-round-robin-test",
+                    "deploymentPolicy": "deployment-policy-partition-round-robin-test",
+                    "artifactRepository": {
+                        "privateRepo": false,
+                        "repoUrl": "https://github.com/imesh/stratos-tomcat-applications.git",
+                        "repoUsername": "",
+                        "repoPassword": ""
+                    }
+                }
+            }
+        ],
+        "dependencies": {
+            "terminationBehaviour": "terminate-none"
+        }
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/partition-round-robin-cluster-test/autoscaling-policies/autoscaling-policy-partition-round-robin-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/partition-round-robin-cluster-test/autoscaling-policies/autoscaling-policy-partition-round-robin-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/partition-round-robin-cluster-test/autoscaling-policies/autoscaling-policy-partition-round-robin-test.json
new file mode 100644
index 0000000..bca9b14
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/partition-round-robin-cluster-test/autoscaling-policies/autoscaling-policy-partition-round-robin-test.json
@@ -0,0 +1,14 @@
+{
+    "id": "autoscaling-policy-partition-round-robin-test",
+    "loadThresholds": {
+        "requestsInFlight": {
+            "threshold": 20
+        },
+        "memoryConsumption": {
+            "threshold": 30
+        },
+        "loadAverage": {
+            "threshold": 25
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/partition-round-robin-cluster-test/cartridges/mock/c7-partition-round-robin-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/partition-round-robin-cluster-test/cartridges/mock/c7-partition-round-robin-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/partition-round-robin-cluster-test/cartridges/mock/c7-partition-round-robin-test.json
new file mode 100755
index 0000000..9a513ce
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/partition-round-robin-cluster-test/cartridges/mock/c7-partition-round-robin-test.json
@@ -0,0 +1,45 @@
+{
+    "type": "c7-partition-round-robin-test",
+    "provider": "apache",
+    "host": "stratos.apache.org",
+    "category": "data",
+    "displayName": "c7-partition-round-robin-test",
+    "description": "c7-partition-round-robin-test Cartridge",
+    "version": "7",
+    "multiTenant": "false",
+    "portMapping": [
+        {
+            "name": "http-22",
+            "protocol": "http",
+            "port": "22",
+            "proxyPort": "8280"
+        }
+    ],
+    "deployment": {
+    },
+    "iaasProvider": [
+        {
+            "type": "mock",
+            "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
+            "networkInterfaces": [
+                {
+                    "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e"
+                }
+            ],
+            "property": [
+                {
+                    "name": "instanceType",
+                    "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594"
+                },
+                {
+                    "name": "keyPair",
+                    "value": "vishanth-key"
+                },
+                {
+                    "name": "securityGroups",
+                    "value": "default"
+                }
+            ]
+        }
+    ]
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/partition-round-robin-cluster-test/deployment-policies/deployment-policy-partition-round-robin-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/partition-round-robin-cluster-test/deployment-policies/deployment-policy-partition-round-robin-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/partition-round-robin-cluster-test/deployment-policies/deployment-policy-partition-round-robin-test.json
new file mode 100644
index 0000000..721ffb9
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/partition-round-robin-cluster-test/deployment-policies/deployment-policy-partition-round-robin-test.json
@@ -0,0 +1,22 @@
+{
+    "id": "deployment-policy-partition-round-robin-test",
+    "networkPartitions": [
+        {
+            "id": "network-partition-partition-round-robin-test",
+            "partitionAlgo": "round-robin",
+            "partitions": [
+                {
+                    "id": "network-partition-11-partition-1",
+                    "partitionMax": 5
+                },
+                {
+                    "id": "network-partition-11-partition-2",
+                    "partitionMax": 5
+                }
+            ]
+        }
+    ]
+}
+
+
+

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/partition-round-robin-cluster-test/network-partitions/mock/network-partition-partition-round-robin-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/partition-round-robin-cluster-test/network-partitions/mock/network-partition-partition-round-robin-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/partition-round-robin-cluster-test/network-partitions/mock/network-partition-partition-round-robin-test.json
new file mode 100644
index 0000000..0386304
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/partition-round-robin-cluster-test/network-partitions/mock/network-partition-partition-round-robin-test.json
@@ -0,0 +1,24 @@
+{
+    "id": "network-partition-partition-round-robin-test",
+    "provider": "mock",
+    "partitions": [
+        {
+            "id": "network-partition-11-partition-1",
+            "property": [
+                {
+                    "name": "region",
+                    "value": "default"
+                }
+            ]
+        },
+        {
+            "id": "network-partition-11-partition-2",
+            "property": [
+                {
+                    "name": "region",
+                    "value": "default"
+                }
+            ]
+        }
+    ]
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/application-policies/application-policy-sample-applications-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/application-policies/application-policy-sample-applications-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/application-policies/application-policy-sample-applications-test.json
new file mode 100644
index 0000000..a4e83e6
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/sample-applications-test/application-policies/application-policy-sample-applications-test.json
@@ -0,0 +1,18 @@
+{
+    "id": "application-policy-sample-applications-test",
+    "algorithm": "one-after-another",
+    "networkPartitions": [
+        "network-partition-sample-applications-test-1",
+        "network-partition-sample-applications-test-2"
+    ],
+    "properties": [
+        {
+            "name": "networkPartitionGroups",
+            "value": "network-partition-sample-applications-test-1,network-partition-sample-applications-test-2"
+        },
+        {
+            "name": "key-2",
+            "value": "value-2"
+        }
+    ]
+}


[14/21] stratos git commit: Uplifting automation engine to v4.4.3, dynamically pick ports for integration tests

Posted by ra...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/wso2carbon 2.log
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/wso2carbon 2.log b/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/wso2carbon 2.log
deleted file mode 100755
index 82d9968..0000000
--- a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/wso2carbon 2.log	
+++ /dev/null
@@ -1,992 +0,0 @@
-TID: [2015-04-22 20:45:03,242]  INFO {org.wso2.carbon.server.extensions.PatchInstaller} -  Patch changes detected  {org.wso2.carbon.server.extensions.PatchInstaller}
-TID: [2015-04-22 20:45:03,566]  INFO {org.wso2.carbon.server.util.PatchUtils.console} -  Backed up plugins to patch0000 {org.wso2.carbon.server.util.PatchUtils.console}
-TID: [2015-04-22 20:45:04,429]  INFO {org.wso2.carbon.server.util.PatchUtils.console} -  Patch verification started {org.wso2.carbon.server.util.PatchUtils.console}
-TID: [2015-04-22 20:45:04,705]  INFO {org.wso2.carbon.server.util.PatchUtils.console} -  Patch verification successfully completed without encountering any issues. {org.wso2.carbon.server.util.PatchUtils.console}
-TID: [0] [STRATOS] [2015-04-22 20:45:09,454]  INFO {org.wso2.carbon.cassandra.dataaccess.DataAccessComponentManager} -  There is no /repository/conf/etc/cassandra-component.xml. Using the default configuration
-TID: [0] [STRATOS] [2015-04-22 20:45:09,493]  INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} -  Starting WSO2 Carbon...
-TID: [0] [STRATOS] [2015-04-22 20:45:09,496]  INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} -  Operating System : Linux 3.13.0-46-generic, amd64
-TID: [0] [STRATOS] [2015-04-22 20:45:09,496]  INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} -  Java Home        : /opt/jdk1.7.0_67/jre
-TID: [0] [STRATOS] [2015-04-22 20:45:09,496]  INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} -  Java Version     : 1.7.0_67
-TID: [0] [STRATOS] [2015-04-22 20:45:09,496]  INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} -  Java VM          : Java HotSpot(TM) 64-Bit Server VM 24.65-b04,Oracle Corporation
-TID: [0] [STRATOS] [2015-04-22 20:45:09,496]  INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} -  Carbon Home      : /opt/wso2/apache-stratos
-TID: [0] [STRATOS] [2015-04-22 20:45:09,496]  INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} -  Java Temp Dir    : /opt/wso2/apache-stratos/tmp
-TID: [0] [STRATOS] [2015-04-22 20:45:09,496]  INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} -  User             : root, en-US, Etc/UTC
-TID: [0] [STRATOS] [2015-04-22 20:45:09,578]  WARN {org.wso2.carbon.core.bootup.validator.SystemValidator} -  Could not validate the system for configuration parameter : CPU
-TID: [0] [STRATOS] [2015-04-22 20:45:09,579]  WARN {org.wso2.carbon.core.bootup.validator.util.ValidationResultPrinter} -  The default keystore (wso2carbon.jks) is currently being used. To maximize security when deploying to a production environment, configure a new keystore with a unique password in the production server profile.
-TID: [0] [STRATOS] [2015-04-22 20:45:09,579]  WARN {org.wso2.carbon.core.bootup.validator.util.ValidationResultPrinter} -  Swap Memory size (MB): 0 of the system is below the recommended minimum size :2048
-TID: [0] [STRATOS] [2015-04-22 20:45:09,649]  INFO {org.wso2.carbon.databridge.agent.thrift.AgentHolder} -  Agent created !
-TID: [0] [STRATOS] [2015-04-22 20:45:09,667]  INFO {org.wso2.carbon.databridge.agent.thrift.internal.AgentDS} -  Successfully deployed Agent Client
-TID: [0] [STRATOS] [2015-04-22 20:45:09,690]  INFO {org.wso2.carbon.event.input.adaptor.core.internal.ds.InputEventAdaptorServiceTrackerDS} -  Successfully deployed the input event adaptor tracker service
-TID: [0] [STRATOS] [2015-04-22 20:45:09,697]  INFO {org.wso2.carbon.event.input.adaptor.jms.internal.ds.JMSEventAdaptorServiceDS} -  Successfully deployed the input jms event adaptor
-TID: [0] [STRATOS] [2015-04-22 20:45:09,702]  INFO {org.wso2.carbon.event.input.adaptor.manager.core.internal.ds.InputEventAdaptorTypeServiceTrackerDS} -  Successfully deployed the input event adaptor type tracker service
-TID: [0] [STRATOS] [2015-04-22 20:45:09,713]  INFO {org.wso2.carbon.event.output.adaptor.cassandra.internal.ds.CassandraEventAdaptorServiceDS} -  Successfully deployed the output cassandra event adaptor service
-TID: [0] [STRATOS] [2015-04-22 20:45:09,716]  INFO {org.wso2.carbon.event.output.adaptor.core.internal.ds.OutputEventAdaptorServiceTrackerDS} -  Successfully deployed the output event adaptor tracker service
-TID: [0] [STRATOS] [2015-04-22 20:45:09,722]  INFO {org.wso2.carbon.event.output.adaptor.http.internal.ds.HTTPEventAdaptorServiceDS} -  Successfully deployed the output HTTP event adaptor service
-TID: [0] [STRATOS] [2015-04-22 20:45:09,729]  INFO {org.wso2.carbon.event.output.adaptor.jms.internal.ds.JMSEventAdaptorServiceDS} -  Successfully deployed the output jms event adaptor service 
-TID: [0] [STRATOS] [2015-04-22 20:45:09,735]  INFO {org.wso2.carbon.event.output.adaptor.manager.core.internal.ds.OutputEventAdaptorTypeServiceTrackerDS} -  Successfully deployed the event adaptor type tracker service
-TID: [0] [STRATOS] [2015-04-22 20:45:09,748]  INFO {org.wso2.carbon.event.output.adaptor.wso2event.internal.ds.WSO2EventAdaptorServiceDS} -  Successfully deployed the output WSO2Event adaptor service
-TID: [0] [STRATOS] [2015-04-22 20:45:09,767]  INFO {org.wso2.carbon.event.input.adaptor.manager.core.internal.ds.InputEventAdaptorManagerDS} -  Successfully deployed the input event adaptor manager service
-TID: [0] [STRATOS] [2015-04-22 20:45:09,767]  INFO {org.wso2.carbon.event.input.adaptor.core.internal.ds.InputEventAdaptorServiceDS} -  Successfully deployed the input event adaptor service
-TID: [0] [STRATOS] [2015-04-22 20:45:09,778]  INFO {org.wso2.carbon.event.output.adaptor.manager.core.internal.ds.OutputEventAdaptorManagerDS} -  Successfully deployed the output event adaptor manager service
-TID: [0] [STRATOS] [2015-04-22 20:45:09,778]  INFO {org.wso2.carbon.event.output.adaptor.core.internal.ds.OutputEventAdaptorServiceDS} -  Successfully deployed the output event adaptor service
-TID: [0] [STRATOS] [2015-04-22 20:45:09,791]  INFO {org.wso2.carbon.event.statistics.internal.ds.EventStatisticsDS} -  Successfully deployed the event statistics monitoring service
-TID: [0] [STRATOS] [2015-04-22 20:45:10,257]  INFO {org.wso2.carbon.social.internal.SocialComponent} -  Social Activity bundle is activated
-TID: [0] [STRATOS] [2015-04-22 20:45:11,025]  INFO {org.wso2.carbon.cassandra.server.internal.CassandraServerDSComponent} -  There is no /repository/conf/etc/cassandra.yaml. Using the default configuration
-TID: [0] [STRATOS] [2015-04-22 20:45:11,072]  INFO {org.wso2.carbon.event.input.adaptor.wso2event.internal.ds.WSO2EventAdaptorServiceDS} -  Successfully deployed the input WSO2Event adaptor service
-TID: [0] [STRATOS] [2015-04-22 20:45:11,074]  INFO {org.wso2.carbon.loggeraggregator.internal.LogAggregator} -  Successfully started Log Aggregator
-TID: [0] [STRATOS] [2015-04-22 20:45:11,074]  INFO {org.wso2.carbon.databridge.core.internal.DataBridgeDS} -  Successfully deployed Agent Server 
-TID: [0] [STRATOS] [2015-04-22 20:45:11,320]  INFO {org.wso2.carbon.registry.core.jdbc.EmbeddedRegistryService} -  Configured Registry in 178ms
-TID: [0] [STRATOS] [2015-04-22 20:45:11,693]  INFO {org.wso2.carbon.registry.core.internal.RegistryCoreServiceComponent} -  Registry Mode    : READ-WRITE
-TID: [0] [STRATOS] [2015-04-22 20:45:11,781]  INFO {org.wso2.carbon.event.output.adaptor.mysql.internal.ds.MysqlEventAdaptorServiceDS} -  Successfully deployed the output mysql event adaptor service
-TID: [0] [STRATOS] [2015-04-22 20:45:11,783]  INFO {org.wso2.carbon.event.processor.siddhi.extension.internal.SiddhiExtensionDS} -  Successfully activated Property Window
-TID: [0] [STRATOS] [2015-04-22 20:45:11,885]  INFO {org.wso2.carbon.event.builder.core.internal.ds.EventBuilderServiceDS} -  Successfully deployed EventBuilderService.
-TID: [0] [STRATOS] [2015-04-22 20:45:11,908]  INFO {org.wso2.carbon.event.formatter.core.internal.ds.EventFormatterServiceDS} -  Successfully deployed EventFormatterService
-TID: [0] [STRATOS] [2015-04-22 20:45:11,909]  INFO {org.wso2.carbon.event.processor.core.internal.ds.EventProcessorServiceDS} -  Successfully deployed EventProcessorService
-TID: [0] [STRATOS] [2015-04-22 20:45:11,909]  INFO {org.wso2.carbon.event.builder.core.internal.ds.EventBuilderServiceDS} -  Successfully deployed EventBuilder EventReceiver.
-TID: [0] [STRATOS] [2015-04-22 20:45:12,037]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:12,061]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :in_flight_requests_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:12,080]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : gradient_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:12,085]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :gradient_in_flight_requests_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:12,104]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : average_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:12,109]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :average_in_flight_requests_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:12,128]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : average_served_request_count:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:12,134]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :average_served_request_count_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:12,152]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : second_derivative_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:12,157]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :second_derivative_in_flight_requests_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:12,176]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : cartridge_agent_health_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:12,182]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :cartridge_agent_health_stats_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:12,201]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : average_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:12,206]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :average_load_average_stats_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:12,223]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : average_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:12,228]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :average_memory_consumption_stats_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:12,246]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : gradient_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:12,252]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :gradient_load_average_stats_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:12,269]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : gradient_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:12,275]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :gradient_memory_consumption_stats_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:12,290]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : second_derivative_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:12,295]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :second_derivative_memory_consumption_stats_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:12,312]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : second_derivative_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:12,317]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :second_derivative_load_average_stats_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:12,333]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : fault_message:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:12,338]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :fault_message_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:12,354]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : member_average_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:12,359]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :member_average_load_average_stats_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:12,374]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : member_average_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:12,379]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :member_average_memory_consumption_stats_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:12,394]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : member_gradient_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:12,399]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :member_gradient_load_average_stats_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:12,415]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : member_gradient_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:12,421]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :member_gradient_memory_consumption_stats_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:12,439]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : member_second_derivative_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:12,444]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :member_second_derivative_memory_consumption_stats_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:12,461]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : member_second_derivative_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:12,466]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :member_second_derivative_load_average_stats_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:12,466]  INFO {org.wso2.carbon.event.builder.core.internal.ds.EventBuilderServiceDS} -  Successfully deployed EventBuilder PassthroughReceiverConfigurator.
-TID: [0] [STRATOS] [2015-04-22 20:45:12,468]  INFO {org.wso2.carbon.event.stream.manager.core.internal.ds.EventStreamServiceDS} -  Successfully deployed EventStreamService
-TID: [0] [STRATOS] [2015-04-22 20:45:12,485]  INFO {org.wso2.carbon.identity.application.mgt.internal.ApplicationManagementServiceComponent} -  Identity ApplicationManagementComponent bundle is activated
-TID: [0] [STRATOS] [2015-04-22 20:45:13,164]  INFO {org.wso2.carbon.user.core.internal.UserStoreMgtDSComponent} -  Carbon UserStoreMgtDSComponent activated successfully.
-TID: [0] [STRATOS] [2015-04-22 20:45:18,487]  INFO {org.apache.axis2.deployment.ClusterBuilder} -  Clustering has been disabled
-TID: [0] [STRATOS] [2015-04-22 20:45:18,850]  INFO {org.wso2.carbon.identity.user.store.configuration.deployer.UserStoreConfigurationDeployer} -  User Store Configuration Deployer initiated.
-TID: [0] [STRATOS] [2015-04-22 20:45:18,889]  INFO {org.wso2.carbon.stratos.landing.page.deployer.LandingPageWebappDeployer} -  Deployed product landing page webapp: StandardEngine[Catalina].StandardHost[localhost].StandardContext[/home]
-TID: [0] [STRATOS] [2015-04-22 20:45:18,921]  INFO {org.apache.axis2.transport.tcp.TCPTransportSender} -  TCP Sender started
-TID: [0] [STRATOS] [2015-04-22 20:45:18,943]  INFO {org.wso2.carbon.event.processor.core.internal.CarbonEventProcessorService} -  Execution plan deployment held back and in inactive state: AverageHeathRequest. Event receiver not found for stream ID : cartridge_agent_health_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:18,943]  INFO {org.wso2.carbon.event.processor.core.EventProcessorDeployer} -  Execution plan deployment held back and in inactive state : AverageHeathRequest ,waiting for dependency : cartridge_agent_health_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:18,947]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : AverageInFlightRequestsEventFormatter.xml, waiting for dependency : JMSOutputAdaptor
-TID: [0] [STRATOS] [2015-04-22 20:45:18,948]  INFO {org.wso2.carbon.event.processor.core.internal.CarbonEventProcessorService} -  Execution plan deployment held back and in inactive state: AverageInFlightRequestsFinder. Event receiver not found for stream ID : in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:18,948]  INFO {org.wso2.carbon.event.processor.core.EventProcessorDeployer} -  Execution plan deployment held back and in inactive state : AverageInFlightRequestsFinder ,waiting for dependency : in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:18,949]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : AverageLoadAverageEventFormatter.xml, waiting for dependency : JMSOutputAdaptor
-TID: [0] [STRATOS] [2015-04-22 20:45:18,950]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : AverageMemoryConsumptionEventFormatter.xml, waiting for dependency : JMSOutputAdaptor
-TID: [0] [STRATOS] [2015-04-22 20:45:18,951]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : AverageServedRequestsEventFormatter.xml, waiting for dependency : JMSOutputAdaptor
-TID: [0] [STRATOS] [2015-04-22 20:45:18,955]  INFO {org.wso2.carbon.event.input.adaptor.manager.core.InputEventAdaptorDeployer} -  Input Event Adaptor deployed successfully and in active state : DefaultWSO2EventInputAdaptor
-TID: [0] [STRATOS] [2015-04-22 20:45:18,957]  INFO {org.wso2.carbon.event.output.adaptor.manager.core.OutputEventAdaptorDeployer} -  Output Event Adaptor successfully deployed and in active state : DefaultWSO2EventOutputAdaptor
-TID: [0] [STRATOS] [2015-04-22 20:45:19,009]  INFO {org.wso2.carbon.core.deployment.DeploymentInterceptor} -  Deploying Axis2 service: echo {super-tenant}
-TID: [0] [STRATOS] [2015-04-22 20:45:19,079]  INFO {org.apache.axis2.deployment.DeploymentEngine} -  Deploying Web service: Echo.aar - file:/opt/wso2/apache-stratos/repository/deployment/server/axis2services/Echo.aar
-TID: [0] [STRATOS] [2015-04-22 20:45:19,080]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : FaultMessageEventFormatter.xml, waiting for dependency : JMSOutputAdaptor
-TID: [0] [STRATOS] [2015-04-22 20:45:19,080]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : GradientInFlightRequestsEventFormatter.xml, waiting for dependency : JMSOutputAdaptor
-TID: [0] [STRATOS] [2015-04-22 20:45:19,081]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : GradientLoadAverageEventFormatter.xml, waiting for dependency : JMSOutputAdaptor
-TID: [0] [STRATOS] [2015-04-22 20:45:19,082]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : GradientMemoryConsumptionEventFormatter.xml, waiting for dependency : JMSOutputAdaptor
-TID: [0] [STRATOS] [2015-04-22 20:45:19,083]  INFO {org.wso2.carbon.event.processor.core.internal.CarbonEventProcessorService} -  Execution plan deployment held back and in inactive state: GradientOfHealthRequest. Event receiver not found for stream ID : cartridge_agent_health_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,084]  INFO {org.wso2.carbon.event.processor.core.EventProcessorDeployer} -  Execution plan deployment held back and in inactive state : GradientOfHealthRequest ,waiting for dependency : cartridge_agent_health_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,084]  INFO {org.wso2.carbon.event.processor.core.internal.CarbonEventProcessorService} -  Execution plan deployment held back and in inactive state: GradientOfRequestsInFlightFinder. Event receiver not found for stream ID : in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,085]  INFO {org.wso2.carbon.event.processor.core.EventProcessorDeployer} -  Execution plan deployment held back and in inactive state : GradientOfRequestsInFlightFinder ,waiting for dependency : in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,106]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: cartridge_agent_health_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,109]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:cartridge_agent_health_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,110]  INFO {org.wso2.carbon.event.processor.core.EventProcessorDeployer} -  Execution Plan was undeployed successfully : AverageHeathRequest.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:19,305]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:cartridge_agent_health_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,305]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:average_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,305]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:member_average_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,305]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:member_average_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,305]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:average_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,306]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:fault_message:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,306]  INFO {org.wso2.carbon.event.processor.core.EventProcessorDeployer} -  Execution plan is deployed successfully and in active state  : AverageHeathRequest
-TID: [0] [STRATOS] [2015-04-22 20:45:19,306]  INFO {org.wso2.carbon.event.processor.core.EventProcessorDeployer} -  Execution Plan was undeployed successfully : GradientOfHealthRequest.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:19,398]  INFO {org.apache.stratos.common.threading.StratosThreadPool} -  Thread pool created: [type] Executor Service [id] cep.extension.thread.pool [size] 10
-TID: [0] [STRATOS] [2015-04-22 20:45:19,406]  INFO {org.apache.stratos.cep.extension.CEPTopologyEventReceiver} -  CEP topology event receiver thread started
-TID: [0] [STRATOS] [2015-04-22 20:45:19,406]  INFO {org.apache.stratos.messaging.message.receiver.topology.TopologyEventMessageDelegator} -  Topology event message delegator started
-TID: [0] [STRATOS] [2015-04-22 20:45:19,410]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:cartridge_agent_health_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,410]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:gradient_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,410]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:gradient_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,410]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:member_gradient_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,410]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:member_gradient_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,410]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:fault_message:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,410]  INFO {org.wso2.carbon.event.processor.core.EventProcessorDeployer} -  Execution plan is deployed successfully and in active state  : GradientOfHealthRequest
-TID: [0] [STRATOS] [2015-04-22 20:45:19,411]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : HealthStatisticsEventBuilder
-TID: [0] [STRATOS] [2015-04-22 20:45:19,419]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event builder deployment held back and in inactive state :InstanceStatusStatisticsBuilder, Stream validation exception : Input stream definition is not available 
-TID: [0] [STRATOS] [2015-04-22 20:45:19,420]  INFO {org.wso2.carbon.event.output.adaptor.manager.core.OutputEventAdaptorDeployer} -  Output Event Adaptor successfully deployed and in active state : JMSOutputAdaptor
-TID: [0] [STRATOS] [2015-04-22 20:45:19,421]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : AverageInFlightRequestsEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:19,433]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : AverageInFlightRequestsEventFormatter.xml, waiting for dependency : average_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,433]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : AverageLoadAverageEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:19,442]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:average_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,442]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : AverageLoadAverageEventFormatter
-TID: [0] [STRATOS] [2015-04-22 20:45:19,442]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : AverageMemoryConsumptionEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:19,450]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:average_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,450]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : AverageMemoryConsumptionEventFormatter
-TID: [0] [STRATOS] [2015-04-22 20:45:19,450]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : AverageServedRequestsEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:19,458]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : AverageServedRequestsEventFormatter.xml, waiting for dependency : average_served_request_count:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,458]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : FaultMessageEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:19,466]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:fault_message:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,466]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : FaultMessageEventFormatter
-TID: [0] [STRATOS] [2015-04-22 20:45:19,466]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : GradientInFlightRequestsEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:19,474]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : GradientInFlightRequestsEventFormatter.xml, waiting for dependency : gradient_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,474]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : GradientLoadAverageEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:19,481]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:gradient_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,482]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : GradientLoadAverageEventFormatter
-TID: [0] [STRATOS] [2015-04-22 20:45:19,482]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : GradientMemoryConsumptionEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:19,490]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:gradient_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,490]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : GradientMemoryConsumptionEventFormatter
-TID: [0] [STRATOS] [2015-04-22 20:45:19,498]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,500]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,500]  INFO {org.wso2.carbon.event.processor.core.EventProcessorDeployer} -  Execution Plan was undeployed successfully : AverageInFlightRequestsFinder.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:19,512]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : AverageInFlightRequestsEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:19,516]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:average_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,516]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : AverageRequestsInflightEventFormatter
-TID: [0] [STRATOS] [2015-04-22 20:45:19,517]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : AverageServedRequestsEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:19,521]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:average_served_request_count:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,521]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : AverageServedRequestsEventFormatter
-TID: [0] [STRATOS] [2015-04-22 20:45:19,521]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,521]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:average_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,521]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:average_served_request_count:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,521]  INFO {org.wso2.carbon.event.processor.core.EventProcessorDeployer} -  Execution plan is deployed successfully and in active state  : AverageInFlightRequestsFinder
-TID: [0] [STRATOS] [2015-04-22 20:45:19,521]  INFO {org.wso2.carbon.event.processor.core.EventProcessorDeployer} -  Execution Plan was undeployed successfully : GradientOfRequestsInFlightFinder.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:19,527]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : GradientInFlightRequestsEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:19,531]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:gradient_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,531]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : GradientInFlightRequestsEventFormatter
-TID: [0] [STRATOS] [2015-04-22 20:45:19,531]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,531]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:gradient_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,531]  INFO {org.wso2.carbon.event.processor.core.EventProcessorDeployer} -  Execution plan is deployed successfully and in active state  : GradientOfRequestsInFlightFinder
-TID: [0] [STRATOS] [2015-04-22 20:45:19,531]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : LoadBalancerStatisticsEventBuilder
-TID: [0] [STRATOS] [2015-04-22 20:45:19,539]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:member_average_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,539]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : MemberAverageLoadAverageEventFormatter
-TID: [0] [STRATOS] [2015-04-22 20:45:19,547]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:member_average_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,547]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : MemberAverageMemoryConsumptionEventFormatter
-TID: [0] [STRATOS] [2015-04-22 20:45:19,554]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:member_gradient_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,555]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : MemberGradientLoadAverageEventFormatter
-TID: [0] [STRATOS] [2015-04-22 20:45:19,562]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:member_gradient_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,562]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : MemberGradientMemoryConsumptionEventFormatter
-TID: [0] [STRATOS] [2015-04-22 20:45:19,570]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : MemberSecondDerivativeLoadAverageEventFormatter.xml, waiting for dependency : member_second_derivative_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,578]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : MemberSecondDerivativeMemoryConsumptionEventFormatter.xml, waiting for dependency : member_second_derivative_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,603]  INFO {org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer} -  Deployed webapp: StandardEngine[Catalina].StandardHost[localhost].StandardContext[/STRATOS_ROOT].File[/opt/wso2/apache-stratos/repository/deployment/server/webapps/STRATOS_ROOT]
-TID: [0] [STRATOS] [2015-04-22 20:45:19,614]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : SecondDerivativeInFlightRequestsEventFormatter.xml, waiting for dependency : second_derivative_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,621]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : SecondDerivativeLoadAverageEventFormatter.xml, waiting for dependency : second_derivative_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,628]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : SecondDerivativeMemoryConsumptionEventFormatter.xml, waiting for dependency : second_derivative_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,647]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : SecondDerivativeMemoryConsumptionEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:19,651]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:second_derivative_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,652]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : SecondDerivativeMemoryConsumptionEventFormatter
-TID: [0] [STRATOS] [2015-04-22 20:45:19,652]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : SecondDerivativeLoadAverageEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:19,655]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:second_derivative_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,655]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : SecondDerivativeLoadAverageEventFormatter
-TID: [0] [STRATOS] [2015-04-22 20:45:19,656]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : MemberSecondDerivativeMemoryConsumptionEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:19,660]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:member_second_derivative_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,660]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : MemberSecondDerivativeMemoryConsumptionEventFormatter
-TID: [0] [STRATOS] [2015-04-22 20:45:19,660]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : MemberSecondDerivativeLoadAverageEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:19,664]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:member_second_derivative_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,664]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : MemberSecondDerivativeLoadAverageEventFormatter
-TID: [0] [STRATOS] [2015-04-22 20:45:19,664]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:cartridge_agent_health_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,664]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:second_derivative_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,664]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:second_derivative_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,664]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:member_second_derivative_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,664]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:member_second_derivative_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,664]  INFO {org.wso2.carbon.event.processor.core.EventProcessorDeployer} -  Execution plan is deployed successfully and in active state  : SecondDerivativeOfHealthRequest
-TID: [0] [STRATOS] [2015-04-22 20:45:19,669]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : SecondDerivativeInFlightRequestsEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:19,673]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:second_derivative_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,673]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : SecondDerivativeEventFormatter
-TID: [0] [STRATOS] [2015-04-22 20:45:19,673]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,673]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:second_derivative_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:19,674]  INFO {org.wso2.carbon.event.processor.core.EventProcessorDeployer} -  Execution plan is deployed successfully and in active state  : SecondDerivativeOfRequestsInFlightFinder
-TID: [0] [STRATOS] [2015-04-22 20:45:19,750]  INFO {org.wso2.carbon.core.deployment.DeploymentInterceptor} -  Deploying Axis2 service: Version {super-tenant}
-TID: [0] [STRATOS] [2015-04-22 20:45:19,773]  INFO {org.apache.axis2.deployment.DeploymentEngine} -  Deploying Web service: Version.aar - file:/opt/wso2/apache-stratos/repository/deployment/server/axis2services/Version.aar
-TID: [0] [STRATOS] [2015-04-22 20:45:20,582]  INFO {org.springframework.web.context.support.XmlWebApplicationContext} -  Refreshing Root WebApplicationContext: startup date [Wed Apr 22 20:45:20 UTC 2015]; root of context hierarchy
-TID: [0] [STRATOS] [2015-04-22 20:45:20,627]  INFO {org.springframework.beans.factory.xml.XmlBeanDefinitionReader} -  Loading XML bean definitions from class path resource [META-INF/cxf/cxf.xml]
-TID: [0] [STRATOS] [2015-04-22 20:45:20,699]  INFO {org.springframework.beans.factory.xml.XmlBeanDefinitionReader} -  Loading XML bean definitions from URL [jndi:/localhost/api/WEB-INF/cxf-servlet.xml]
-TID: [0] [STRATOS] [2015-04-22 20:45:20,841]  INFO {org.springframework.beans.factory.support.DefaultListableBeanFactory} -  Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@68204c69: defining beans [cxf,org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,stratosApi,stratosApiV40,stratosApiV41,stratosApiBeanV40,stratosApiBeanV41,basicAuthenticationFilter,sessionAuthenticationFilter,authorizationFilterV40,authorizationFilterV41,exceptionHandler,badRequestExceptionHandler,genericExceptionHandler,throwableExceptionHandler,componentSynchronizerHandler,OAuthFilter,jsonProvider,schemaHolder,theSchemas]; root of factory hierarchy
-TID: [0] [STRATOS] [2015-04-22 20:45:21,353]  INFO {org.apache.cxf.endpoint.ServerImpl} -  Setting the server's publish address to be /
-TID: [0] [STRATOS] [2015-04-22 20:45:21,471]  INFO {org.apache.cxf.endpoint.ServerImpl} -  Setting the server's publish address to be /v4.0
-TID: [0] [STRATOS] [2015-04-22 20:45:21,495]  INFO {org.apache.cxf.endpoint.ServerImpl} -  Setting the server's publish address to be /v4.1
-TID: [0] [STRATOS] [2015-04-22 20:45:21,528]  WARN {org.apache.cxf.jaxrs.utils.ResourceUtils} -  No resource classpath:META-INF/jax-rs-catalog.xml is available
-TID: [0] [STRATOS] [2015-04-22 20:45:21,552]  INFO {org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer} -  Deployed webapp: StandardEngine[Catalina].StandardHost[localhost].StandardContext[/api].File[/opt/wso2/apache-stratos/repository/deployment/server/webapps/api.war]
-TID: [0] [STRATOS] [2015-04-22 20:45:21,601]  INFO {org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer} -  Deployed webapp: StandardEngine[Catalina].StandardHost[localhost].StandardContext[/authenticationendpoint].File[/opt/wso2/apache-stratos/repository/deployment/server/webapps/authenticationendpoint.war]
-TID: [0] [STRATOS] [2015-04-22 20:45:21,606]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: average_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:21,607]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:average_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:21,607]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : average_in_flight_requests_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 20:45:21,611]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: average_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:21,612]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:average_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:21,612]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : average_load_average_stats_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 20:45:21,616]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: average_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:21,617]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:average_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:21,617]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : average_memory_consumption_stats_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 20:45:21,621]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: average_served_request_count:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:21,622]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:average_served_request_count:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:21,623]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : average_served_request_count_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 20:45:21,627]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : cartridge_agent_health_stats_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 20:45:21,636]  WARN {org.wso2.securevault.secret.handler.SecretManagerSecretCallbackHandler} -  SecretManager has not been initialized.Cannot collect secrets.
-TID: [0] [STRATOS] [2015-04-22 20:45:21,636]  WARN {org.apache.stratos.cloud.controller.config.parser.IaasProviderConfigParser} -  Unable to find a value for identity element from Secure Vault.Hence we will try to assign the plain text value (if specified).
-TID: [0] [STRATOS] [2015-04-22 20:45:21,637]  WARN {org.wso2.securevault.secret.handler.SecretManagerSecretCallbackHandler} -  SecretManager has not been initialized.Cannot collect secrets.
-TID: [0] [STRATOS] [2015-04-22 20:45:21,637]  WARN {org.apache.stratos.cloud.controller.config.parser.IaasProviderConfigParser} -  Unable to find a value for credential element from Secure Vault.Hence we will try to assign the plain text value (if specified).
-TID: [0] [STRATOS] [2015-04-22 20:45:21,637]  INFO {org.apache.stratos.cloud.controller.deployers.CloudControllerDeployer} -  Successfully deployed the cloud-controller XML file located at /opt/wso2/apache-stratos/repository/deployment/server/../../conf/cloud-controller.xml
-TID: [0] [STRATOS] [2015-04-22 20:45:22,397]  INFO {org.jaggeryjs.jaggery.app.mgt.TomcatJaggeryWebappsDeployer} -  Deployed webapp: StandardEngine[Catalina].StandardHost[localhost].StandardContext[/console].File[/opt/wso2/apache-stratos/repository/deployment/server/jaggeryapps/console]
-TID: [0] [STRATOS] [2015-04-22 20:45:22,402]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: fault_message:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:22,403]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:fault_message:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:22,403]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : fault_message_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 20:45:22,407]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: gradient_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:22,408]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:gradient_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:22,408]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : gradient_in_flight_requests_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 20:45:22,412]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: gradient_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:22,413]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:gradient_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:22,414]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : gradient_load_average_stats_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 20:45:22,417]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: gradient_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:22,419]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:gradient_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:22,419]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : gradient_memory_consumption_stats_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 20:45:22,422]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : in_flight_requests_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 20:45:22,426]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: member_average_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:22,428]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:member_average_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:22,428]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : member_average_load_average_stats_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 20:45:22,431]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: member_average_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:22,433]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:member_average_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:22,433]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : member_average_memory_consumption_stats_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 20:45:22,437]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: member_gradient_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:22,438]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:member_gradient_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:22,438]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : member_gradient_load_average_stats_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 20:45:22,442]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: member_gradient_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:22,444]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:member_gradient_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:22,444]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : member_gradient_memory_consumption_stats_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 20:45:22,447]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: member_second_derivative_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:22,449]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:member_second_derivative_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:22,449]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : member_second_derivative_load_average_stats_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 20:45:22,453]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: member_second_derivative_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:22,455]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:member_second_derivative_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:22,455]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : member_second_derivative_memory_consumption_stats_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 20:45:23,187]  INFO {org.springframework.web.context.support.XmlWebApplicationContext} -  Refreshing Root WebApplicationContext: startup date [Wed Apr 22 20:45:23 UTC 2015]; root of context hierarchy
-TID: [0] [STRATOS] [2015-04-22 20:45:23,229]  INFO {org.springframework.beans.factory.xml.XmlBeanDefinitionReader} -  Loading XML bean definitions from class path resource [META-INF/cxf/cxf.xml]
-TID: [0] [STRATOS] [2015-04-22 20:45:23,264]  INFO {org.springframework.beans.factory.xml.XmlBeanDefinitionReader} -  Loading XML bean definitions from URL [jndi:/localhost/metadata/WEB-INF/cxf-servlet.xml]
-TID: [0] [STRATOS] [2015-04-22 20:45:23,364]  INFO {org.springframework.beans.factory.support.DefaultListableBeanFactory} -  Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@1b01b46a: defining beans [cxf,org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,stratosMetaDataAdmin,stratosRestEndpointBean,exceptionHandler,genericExceptionHandler,throwableExceptionHandler,OAuthFilter,jsonProvider]; root of factory hierarchy
-TID: [0] [STRATOS] [2015-04-22 20:45:23,855]  INFO {org.apache.cxf.endpoint.ServerImpl} -  Setting the server's publish address to be /api
-TID: [0] [STRATOS] [2015-04-22 20:45:23,906]  INFO {org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer} -  Deployed webapp: StandardEngine[Catalina].StandardHost[localhost].StandardContext[/metadata].File[/opt/wso2/apache-stratos/repository/deployment/server/webapps/metadata.war]
-TID: [0] [STRATOS] [2015-04-22 20:45:24,621]  INFO {org.springframework.web.context.support.XmlWebApplicationContext} -  Refreshing Root WebApplicationContext: startup date [Wed Apr 22 20:45:24 UTC 2015]; root of context hierarchy
-TID: [0] [STRATOS] [2015-04-22 20:45:24,664]  INFO {org.springframework.beans.factory.xml.XmlBeanDefinitionReader} -  Loading XML bean definitions from class path resource [META-INF/cxf/cxf.xml]
-TID: [0] [STRATOS] [2015-04-22 20:45:24,696]  INFO {org.springframework.beans.factory.xml.XmlBeanDefinitionReader} -  Loading XML bean definitions from URL [jndi:/localhost/mock-iaas/WEB-INF/cxf-servlet.xml]
-TID: [0] [STRATOS] [2015-04-22 20:45:24,784]  INFO {org.springframework.beans.factory.support.DefaultListableBeanFactory} -  Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@3b141caf: defining beans [cxf,org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,mockIaasApi,mockIaasApiBean,exceptionHandler,badRequestExceptionHandler,genericExceptionHandler,throwableExceptionHandler,jsonProvider]; root of factory hierarchy
-TID: [0] [STRATOS] [2015-04-22 20:45:25,146]  INFO {org.apache.cxf.endpoint.ServerImpl} -  Setting the server's publish address to be /api
-TID: [0] [STRATOS] [2015-04-22 20:45:25,197]  INFO {org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer} -  Deployed webapp: StandardEngine[Catalina].StandardHost[localhost].StandardContext[/mock-iaas].File[/opt/wso2/apache-stratos/repository/deployment/server/webapps/mock-iaas.war]
-TID: [0] [STRATOS] [2015-04-22 20:45:25,997]  INFO {org.springframework.web.context.support.XmlWebApplicationContext} -  Refreshing Root WebApplicationContext: startup date [Wed Apr 22 20:45:25 UTC 2015]; root of context hierarchy
-TID: [0] [STRATOS] [2015-04-22 20:45:26,039]  INFO {org.springframework.beans.factory.xml.XmlBeanDefinitionReader} -  Loading XML bean definitions from class path resource [META-INF/cxf/cxf.xml]
-TID: [0] [STRATOS] [2015-04-22 20:45:26,071]  INFO {org.springframework.beans.factory.xml.XmlBeanDefinitionReader} -  Loading XML bean definitions from URL [jndi:/localhost/oauth2/WEB-INF/cxf-servlet.xml]
-TID: [0] [STRATOS] [2015-04-22 20:45:26,151]  INFO {org.springframework.beans.factory.support.DefaultListableBeanFactory} -  Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@6a9f420c: defining beans [cxf,org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,tokEP,authzEndpointBean,tokenEndpointBean,revokeEndpointBean,userinfoEndpointBean]; root of factory hierarchy
-TID: [0] [STRATOS] [2015-04-22 20:45:26,496]  INFO {org.apache.cxf.endpoint.ServerImpl} -  Setting the server's publish address to be /
-TID: [0] [STRATOS] [2015-04-22 20:45:26,558]  INFO {org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer} -  Deployed webapp: StandardEngine[Catalina].StandardHost[localhost].StandardContext[/oauth2].File[/opt/wso2/apache-stratos/repository/deployment/server/webapps/oauth2.war]
-TID: [0] [STRATOS] [2015-04-22 20:45:26,569]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: second_derivative_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:26,570]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:second_derivative_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:26,570]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : second_derivative_in_flight_requests_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 20:45:26,573]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: second_derivative_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:26,575]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:second_derivative_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:26,575]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : second_derivative_load_average_stats_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 20:45:26,579]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: second_derivative_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:26,580]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:second_derivative_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:26,581]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : second_derivative_memory_consumption_stats_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 20:45:26,806]  INFO {org.jaggeryjs.jaggery.app.mgt.TomcatJaggeryWebappsDeployer} -  Deployed webapp: StandardEngine[Catalina].StandardHost[localhost].StandardContext[/sso].File[/opt/wso2/apache-stratos/repository/deployment/server/jaggeryapps/sso]
-TID: [0] [STRATOS] [2015-04-22 20:45:26,873]  INFO {org.apache.axis2.deployment.ModuleDeployer} -  Deploying module: addressing-1.6.1-wso2v10 - file:/opt/wso2/apache-stratos/repository/deployment/client/modules/addressing-1.6.1-wso2v10.mar
-TID: [0] [STRATOS] [2015-04-22 20:45:26,877]  INFO {org.apache.axis2.deployment.ModuleDeployer} -  Deploying module: rampart-1.6.1-wso2v8 - file:/opt/wso2/apache-stratos/repository/deployment/client/modules/rampart-1.6.1-wso2v8.mar
-TID: [0] [STRATOS] [2015-04-22 20:45:26,879]  INFO {org.apache.axis2.transport.tcp.TCPTransportSender} -  TCP Sender started
-TID: [0] [STRATOS] [2015-04-22 20:45:27,123]  INFO {org.wso2.carbon.core.deployment.DeploymentInterceptor} -  Deploying Axis2 service: AutoscalerService {super-tenant}
-TID: [0] [STRATOS] [2015-04-22 20:45:27,369]  INFO {org.apache.axis2.deployment.DeploymentEngine} -  Deploying Web service: org.apache.stratos.autoscaler - 
-TID: [0] [STRATOS] [2015-04-22 20:45:27,477]  INFO {org.wso2.carbon.core.deployment.DeploymentInterceptor} -  Deploying Axis2 service: CloudControllerService {super-tenant}
-TID: [0] [STRATOS] [2015-04-22 20:45:27,653]  INFO {org.apache.axis2.deployment.DeploymentEngine} -  Deploying Web service: org.apache.stratos.cloud.controller - 
-TID: [0] [STRATOS] [2015-04-22 20:45:27,679]  INFO {org.wso2.carbon.core.deployment.DeploymentInterceptor} -  Deploying Axis2 service: StratosManagerService {super-tenant}
-TID: [0] [STRATOS] [2015-04-22 20:45:27,749]  INFO {org.apache.axis2.deployment.DeploymentEngine} -  Deploying Web service: org.apache.stratos.manager - 
-TID: [0] [STRATOS] [2015-04-22 20:45:28,223]  WARN {org.apache.axis2.description.java2wsdl.DefaultSchemaGenerator} -  We don't support method overloading. Ignoring [validateAudienceRestriction]
-TID: [0] [STRATOS] [2015-04-22 20:45:28,524]  INFO {org.apache.axis2.deployment.DeploymentEngine} -  Deploying Web service: org.wso2.carbon.idp.mgt - 
-TID: [0] [STRATOS] [2015-04-22 20:45:28,892]  INFO {org.wso2.carbon.core.deployment.DeploymentInterceptor} -  Deploying Axis2 service: wso2carbon-sts {super-tenant}
-TID: [0] [STRATOS] [2015-04-22 20:45:28,940]  INFO {org.apache.axis2.deployment.DeploymentEngine} -  Deploying Web service: org.wso2.carbon.sts - 
-TID: [0] [STRATOS] [2015-04-22 20:45:29,182]  INFO {org.wso2.carbon.core.init.CarbonServerManager} -  Repository       : /opt/wso2/apache-stratos/repository/deployment/server/
-TID: [0] [STRATOS] [2015-04-22 20:45:29,234]  INFO {org.apache.stratos.common.internal.ComponentStartUpSynchronizerImpl} -  Component activation check interval: 1 seconds
-TID: [0] [STRATOS] [2015-04-22 20:45:29,235]  INFO {org.apache.stratos.common.internal.ComponentStartUpSynchronizerImpl} -  Component activation timeout: 600 seconds
-TID: [0] [STRATOS] [2015-04-22 20:45:29,241]  INFO {org.apache.stratos.common.internal.CommonServiceComponent} -  Stratos common service component is activated
-TID: [0] [STRATOS] [2015-04-22 20:45:29,320]  INFO {org.wso2.carbon.core.internal.permission.update.PermissionUpdater} -  Permission cache updated for tenant -1234
-TID: [0] [STRATOS] [2015-04-22 20:45:29,566]  INFO {org.wso2.carbon.databridge.receiver.thrift.internal.ThriftDataReceiver} -  Thrift Server started at 0.0.0.0
-TID: [0] [STRATOS] [2015-04-22 20:45:29,574]  INFO {org.wso2.carbon.databridge.receiver.thrift.internal.ThriftDataReceiver} -  Thrift SSL port : 7711
-TID: [0] [STRATOS] [2015-04-22 20:45:29,578]  INFO {org.wso2.carbon.databridge.receiver.thrift.internal.ThriftDataReceiver} -  Thrift port : 7611
-TID: [0] [STRATOS] [2015-04-22 20:45:29,643]  INFO {org.wso2.carbon.event.input.adaptor.wsevent.local.internal.ds.WSEventLocalEventAdaptorServiceDS} -  Successfully deployed the input WSEventLocal adaptor service
-TID: [0] [STRATOS] [2015-04-22 20:45:29,649]  INFO {org.wso2.carbon.event.output.adaptor.wsevent.local.internal.ds.WSEventLocalEventAdaptorServiceDS} -  Successfully deployed the output WSEventLocal adaptor service
-TID: [0] [STRATOS] [2015-04-22 20:45:29,656]  INFO {org.wso2.carbon.event.input.adaptor.email.internal.ds.EmailEventAdaptorServiceDS} -  Successfully deployed the input email event service
-TID: [0] [STRATOS] [2015-04-22 20:45:29,662]  INFO {org.wso2.carbon.event.input.adaptor.wsevent.internal.ds.WSEventAdaptorServiceDS} -  Successfully deployed the input WSEvent adaptor service
-TID: [0] [STRATOS] [2015-04-22 20:45:29,667]  INFO {org.wso2.carbon.event.output.adaptor.email.internal.ds.EmailEventAdaptorServiceDS} -  Successfully deployed the output Email event adaptor service
-TID: [0] [STRATOS] [2015-04-22 20:45:29,671]  INFO {org.wso2.carbon.event.output.adaptor.sms.internal.ds.SMSEventAdaptorServiceDS} -  Successfully deployed the output SMS event adaptor service
-TID: [0] [STRATOS] [2015-04-22 20:45:29,676]  INFO {org.wso2.carbon.event.output.adaptor.wsevent.internal.ds.WSEventAdaptorServiceDS} -  Successfully deployed the output WSEvent adaptor service
-TID: [0] [STRATOS] [2015-04-22 20:45:29,680]  INFO {org.wso2.carbon.identity.application.mgt.ui.internal.ApplicationMgtUIServiceComponent} -  Application Management UI bundle acticated!
-TID: [0] [STRATOS] [2015-04-22 20:45:29,715]  INFO {org.wso2.carbon.idp.mgt.internal.IdPManagementServiceComponent} -  Identity Application Management Database initialization not attempted since 'setup' variable was not provided during startup
-TID: [0] [STRATOS] [2015-04-22 20:45:29,770]  INFO {org.wso2.carbon.identity.core.internal.IdentityCoreServiceComponent} -  Identity Database schema initialization check was skipped since 'setup' variable was not given during startup
-TID: [0] [STRATOS] [2015-04-22 20:45:29,838]  INFO {org.wso2.carbon.core.transports.http.HttpsTransportListener} -  HTTPS port       : 9443
-TID: [0] [STRATOS] [2015-04-22 20:45:29,838]  INFO {org.wso2.carbon.core.transports.http.HttpTransportListener} -  HTTP port        : 9763
-TID: [0] [STRATOS] [2015-04-22 20:45:29,924]  INFO {org.wso2.carbon.ntask.core.service.impl.TaskServiceImpl} -  Task service starting in STANDALONE mode...
-TID: [0] [STRATOS] [2015-04-22 20:45:29,956]  INFO {org.apache.stratos.common.threading.StratosThreadPool} -  Thread pool created: [type] Executor Service [id] autoscaler.thread.pool [size] 50
-TID: [0] [STRATOS] [2015-04-22 20:45:29,956]  INFO {org.apache.stratos.common.threading.StratosThreadPool} -  Thread pool created: [type] Scheduled Executor Service [id] autoscaler.scheduler.thread.pool [size] 5
-TID: [0] [STRATOS] [2015-04-22 20:45:29,958]  INFO {org.apache.stratos.common.internal.ComponentStartUpSynchronizerImpl} -  Autoscaler component is waiting for CloudController component to become active...
-TID: [0] [STRATOS] [2015-04-22 20:45:29,961]  INFO {org.apache.stratos.common.threading.StratosThreadPool} -  Thread pool created: [type] Executor Service [id] cloud.controller.thread.pool [size] 10
-TID: [0] [STRATOS] [2015-04-22 20:45:29,961]  INFO {org.apache.stratos.common.threading.StratosThreadPool} -  Thread pool created: [type] Scheduled Executor Service [id] cloud.controller.scheduler.thread.pool [size] 5
-TID: [0] [STRATOS] [2015-04-22 20:45:29,964]  INFO {org.apache.stratos.common.threading.StratosThreadPool} -  Thread pool created: [type] Executor Service [id] stratos.manager.thread.pool [size] 20
-TID: [0] [STRATOS] [2015-04-22 20:45:29,964]  INFO {org.apache.stratos.common.threading.StratosThreadPool} -  Thread pool created: [type] Scheduled Executor Service [id] stratos.manager.scheduler.thread.pool [size] 5
-TID: [0] [STRATOS] [2015-04-22 20:45:29,964]  INFO {org.apache.stratos.common.threading.StratosThreadPool} -  Thread pool created: [type] Executor Service [id] cloud.controller.context.thread.pool [size] 10
-TID: [0] [STRATOS] [2015-04-22 20:45:29,966]  INFO {org.apache.stratos.common.internal.ComponentStartUpSynchronizerImpl} -  StratosManager component is waiting for CloudController component to become active...
-TID: [0] [STRATOS] [2015-04-22 20:45:29,970]  INFO {org.apache.stratos.common.threading.StratosThreadPool} -  Thread pool created: [type] Executor Service [id] cloud.controller.instance.manager.thread.pool [size] 50
-TID: [0] [STRATOS] [2015-04-22 20:45:29,984]  INFO {org.apache.stratos.cloud.controller.messaging.receiver.application.ApplicationEventReceiver} -  Cloud controller application event receiver thread started
-TID: [0] [STRATOS] [2015-04-22 20:45:29,990]  INFO {org.apache.stratos.cloud.controller.internal.CloudControllerServiceComponent} -  Application event receiver thread started
-TID: [0] [STRATOS] [2015-04-22 20:45:29,990]  INFO {org.apache.stratos.messaging.message.receiver.application.ApplicationsEventMessageDelegator} -  Application status event message delegator started
-TID: [0] [STRATOS] [2015-04-22 20:45:30,008]  INFO {org.apache.stratos.cloud.controller.messaging.receiver.cluster.status.ClusterStatusTopicReceiver} -  Cloud controller Cluster status thread started
-TID: [0] [STRATOS] [2015-04-22 20:45:30,011]  INFO {org.apache.stratos.messaging.message.receiver.cluster.status.ClusterStatusEventMessageDelegator} -  Cluster Status event message delegator started
-TID: [0] [STRATOS] [2015-04-22 20:45:30,011]  INFO {org.apache.stratos.cloud.controller.internal.CloudControllerServiceComponent} -  Cluster status event receiver thread started
-TID: [0] [STRATOS] [2015-04-22 20:45:30,021]  INFO {org.wso2.carbon.core.init.JMXServerManager} -  JMX Service URL  : service:jmx:rmi://localhost:11111/jndi/rmi://localhost:9999/jmxrmi
-TID: [0] [STRATOS] [2015-04-22 20:45:30,021]  INFO {org.apache.stratos.cloud.controller.messaging.receiver.instance.status.InstanceStatusTopicReceiver} -  Cloud controller application status thread started
-TID: [0] [STRATOS] [2015-04-22 20:45:30,022]  INFO {org.wso2.carbon.core.internal.StartupFinalizerServiceComponent} -  Server           :  Apache Stratos-4.1.0
-TID: [0] [STRATOS] [2015-04-22 20:45:30,022]  INFO {org.apache.stratos.cloud.controller.messaging.receiver.instance.status.InstanceStatusTopicReceiver} -  Cloud controller application status thread terminated
-TID: [0] [STRATOS] [2015-04-22 20:45:30,026]  INFO {org.apache.stratos.cloud.controller.internal.CloudControllerServiceComponent} -  Instance status event receiver thread started
-TID: [0] [STRATOS] [2015-04-22 20:45:30,026]  INFO {org.apache.stratos.cloud.controller.internal.CloudControllerServiceComponent} -  Scheduling topology synchronizer task
-TID: [0] [STRATOS] [2015-04-22 20:45:30,021]  INFO {org.apache.stratos.messaging.message.receiver.instance.status.InstanceStatusEventMessageDelegator} -  Instance notifier event message delegator started
-TID: [0] [STRATOS] [2015-04-22 20:45:30,026]  INFO {org.wso2.carbon.core.internal.StartupFinalizerServiceComponent} -  WSO2 Carbon started in 27 sec
-TID: [0] [STRATOS] [2015-04-22 20:45:30,027]  INFO {org.apache.stratos.common.internal.ComponentStartUpSynchronizerImpl} -  CloudController component became active
-TID: [0] [STRATOS] [2015-04-22 20:45:30,027]  INFO {org.apache.stratos.cloud.controller.internal.CloudControllerServiceComponent} -  Cloud controller service component activated
-TID: [0] [STRATOS] [2015-04-22 20:45:30,487]  INFO {org.wso2.carbon.ui.internal.CarbonUIServiceComponent} -  Mgt Console URL  : https://172.16.2.207:9443/carbon/
-TID: [0] [STRATOS] [2015-04-22 20:45:30,966]  INFO {org.apache.stratos.common.internal.ComponentStartUpSynchronizerImpl} -  StratosManager component is waiting for Autoscaler component to become active...
-TID: [0] [STRATOS] [2015-04-22 20:45:30,987]  INFO {org.apache.stratos.autoscaler.event.receiver.topology.AutoscalerTopologyEventReceiver} -  Autoscaler topology receiver thread started
-TID: [0] [STRATOS] [2015-04-22 20:45:30,988]  INFO {org.apache.stratos.messaging.message.receiver.topology.TopologyEventMessageDelegator} -  Topology event message delegator started
-TID: [0] [STRATOS] [2015-04-22 20:45:46,012]  INFO {org.apache.stratos.autoscaler.event.receiver.health.AutoscalerHealthStatEventReceiver} -  Autoscaler health stat event receiver thread started
-TID: [0] [STRATOS] [2015-04-22 20:45:46,015]  INFO {org.apache.stratos.messaging.message.receiver.health.stat.HealthStatEventMessageDelegator} -  Health stat event message delegator started
-TID: [0] [STRATOS] [2015-04-22 20:45:46,029]  INFO {org.apache.stratos.autoscaler.internal.AutoscalerServiceComponent} -  Scheduling tasks to publish applications
-TID: [0] [STRATOS] [2015-04-22 20:45:46,029]  INFO {org.apache.stratos.common.internal.ComponentStartUpSynchronizerImpl} -  Autoscaler component became active
-TID: [0] [STRATOS] [2015-04-22 20:45:46,029]  INFO {org.apache.stratos.autoscaler.internal.AutoscalerServiceComponent} -  Autoscaler service component activated
-TID: [0] [STRATOS] [2015-04-22 20:45:46,970]  INFO {org.apache.stratos.manager.utils.CartridgeConfigFileReader} -  Setting config properties into System properties
-TID: [0] [STRATOS] [2015-04-22 20:45:46,989]  INFO {org.apache.stratos.manager.internal.StratosManagerServiceComponent} -  Tenant event publisher initialized
-TID: [0] [STRATOS] [2015-04-22 20:45:46,993]  INFO {org.apache.stratos.manager.messaging.receiver.StratosManagerInstanceStatusEventReceiver} -  Stratos manager instance status event receiver thread started
-TID: [0] [STRATOS] [2015-04-22 20:45:46,995]  INFO {org.apache.stratos.messaging.message.receiver.instance.status.InstanceStatusEventMessageDelegator} -  Instance notifier event message delegator started
-TID: [0] [STRATOS] [2015-04-22 20:45:47,057]  INFO {org.apache.stratos.manager.messaging.receiver.StratosManagerTopologyEventReceiver} -  Stratos manager topology event receiver thread started
-TID: [0] [STRATOS] [2015-04-22 20:45:47,058]  INFO {org.apache.stratos.messaging.message.receiver.topology.TopologyEventMessageDelegator} -  Topology event message delegator started
-TID: [0] [STRATOS] [2015-04-22 20:45:47,060]  INFO {org.apache.stratos.manager.messaging.receiver.StratosManagerApplicationEventReceiver} -  Stratos manager application event receiver thread started
-TID: [0] [STRATOS] [2015-04-22 20:45:47,060]  INFO {org.apache.stratos.messaging.message.receiver.application.ApplicationsEventMessageDelegator} -  Application status event message delegator started
-TID: [0] [STRATOS] [2015-04-22 20:45:47,104]  INFO {org.apache.stratos.common.internal.ComponentStartUpSynchronizerImpl} -  StratosManager component became active
-TID: [0] [STRATOS] [2015-04-22 20:45:47,106]  INFO {org.apache.stratos.manager.internal.StratosManagerServiceComponent} -  Stratos manager component is activated
-TID: [0] [STRATOS] [2015-04-22 20:45:47,249]  INFO {org.apache.stratos.messaging.message.processor.topology.CompleteTopologyMessageProcessor} -  Topology initialized
-TID: [0] [STRATOS] [2015-04-22 20:45:47,249]  INFO {org.apache.stratos.messaging.message.processor.topology.CompleteTopologyMessageProcessor} -  Topology initialized
-TID: [0] [STRATOS] [2015-04-22 20:45:47,250]  INFO {org.apache.stratos.messaging.message.processor.topology.CompleteTopologyMessageProcessor} -  Topology initialized
-TID: [0] [STRATOS] [2015-04-22 20:45:47,250]  INFO {org.apache.stratos.autoscaler.event.receiver.topology.AutoscalerTopologyEventReceiver} -  [CompleteTopologyEvent] Received: class org.apache.stratos.messaging.event.topology.CompleteTopologyEvent
-TID: [0] [STRATOS] [2015-04-22 20:45:59,750]  INFO {org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceImpl} -  Adding network partition: [network-partition-id] RegionOne-AZ-1
-TID: [0] [STRATOS] [2015-04-22 20:45:59,751]  INFO {org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceImpl} -  Validating partition: [network-partition-id] RegionOne-AZ-1 [partition-id] RegionOne-AZ-1
-TID: [0] [STRATOS] [2015-04-22 20:46:01,196] ERROR {org.apache.stratos.cloud.controller.iaases.openstack.OpenstackIaas} -  Invalid zone: AZ-1 in the region: RegionOne and of the iaas: Core
-TID: [0] [STRATOS] [2015-04-22 20:46:01,197] ERROR {org.apache.stratos.cloud.controller.iaases.openstack.OpenstackPartitionValidator} -  Invalid partition detected: [partition-id] RegionOne-AZ-1Invalid zone: AZ-1 in the region: RegionOne and of the iaas: Core
-org.apache.stratos.cloud.controller.exception.InvalidZoneException: Invalid zone: AZ-1 in the region: RegionOne and of the iaas: Core
-	at org.apache.stratos.cloud.controller.iaases.openstack.OpenstackIaas.isValidZone(OpenstackIaas.java:289)
-	at org.apache.stratos.cloud.controller.iaases.openstack.OpenstackPartitionValidator.validate(OpenstackPartitionValidator.java:69)
-	at org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceUtil.validatePartitionAndGetIaasProvider(CloudControllerServiceUtil.java:97)
-	at org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceUtil.validatePartition(CloudControllerServiceUtil.java:108)
-	at org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceImpl.validatePartition(CloudControllerServiceImpl.java:1015)
-	at org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceImpl.addNetworkPartition(CloudControllerServiceImpl.java:1432)
-	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
-	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
-	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
-	at java.lang.reflect.Method.invoke(Method.java:606)
-	at org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:212)
-	at org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver.invokeBusinessLogic(RPCInOnlyMessageReceiver.java:66)
-	at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:110)
-	at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
-	at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172)
-	at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:146)
-	at org.wso2.carbon.core.transports.CarbonServlet.doPost(CarbonServlet.java:231)
-	at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)
-	at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
-	at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
-	at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)
-	at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:68)
-	at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
-	at org.wso2.carbon.tomcat.ext.servlet.DelegationServlet.service(DelegationServlet.java:68)
-	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
-	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
-	at org.wso2.carbon.tomcat.ext.filter.CharacterSetFilter.doFilter(CharacterSetFilter.java:61)
-	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
-	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
-	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
-	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
-	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
-	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
-	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
-	at org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:178)
-	at org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47)
-	at org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:56)
-	at org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47)
-	at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:141)
-	at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:156)
-	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
-	at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:52)
-	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
-	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
-	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
-	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
-	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1653)
-	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
-	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
-	at java.lang.Thread.run(Thread.java:745)
-TID: [0] [ST

<TRUNCATED>

[17/21] stratos git commit: Uplifting automation engine to v4.4.3, dynamically pick ports for integration tests

Posted by ra...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/application-bursting-test/network-partitions/mock/network-partition-application-bursting-test-1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/application-bursting-test/network-partitions/mock/network-partition-application-bursting-test-1.json b/products/stratos/modules/integration/src/test/resources/application-bursting-test/network-partitions/mock/network-partition-application-bursting-test-1.json
deleted file mode 100644
index 78f7d01..0000000
--- a/products/stratos/modules/integration/src/test/resources/application-bursting-test/network-partitions/mock/network-partition-application-bursting-test-1.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
-    "id": "network-partition-application-bursting-test-1",
-    "provider": "mock",
-    "partitions": [
-        {
-            "id": "partition-1",
-            "property": [
-                {
-                    "name": "region",
-                    "value": "default"
-                }
-            ]
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/application-bursting-test/network-partitions/mock/network-partition-application-bursting-test-2.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/application-bursting-test/network-partitions/mock/network-partition-application-bursting-test-2.json b/products/stratos/modules/integration/src/test/resources/application-bursting-test/network-partitions/mock/network-partition-application-bursting-test-2.json
deleted file mode 100644
index 588bfff..0000000
--- a/products/stratos/modules/integration/src/test/resources/application-bursting-test/network-partitions/mock/network-partition-application-bursting-test-2.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
-    "id": "network-partition-application-bursting-test-2",
-    "provider": "mock",
-    "partitions": [
-        {
-            "id": "network-partition-10-partition-1",
-            "property": [
-                {
-                    "name": "region",
-                    "value": "default"
-                }
-            ]
-        },
-        {
-            "id": "network-partition-10-partition-2",
-            "property": [
-                {
-                    "name": "region",
-                    "value": "default"
-                }
-            ]
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/application-policy-test/application-policies/application-policy-application-policy-test-1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/application-policy-test/application-policies/application-policy-application-policy-test-1.json b/products/stratos/modules/integration/src/test/resources/application-policy-test/application-policies/application-policy-application-policy-test-1.json
deleted file mode 100644
index da3e8ef..0000000
--- a/products/stratos/modules/integration/src/test/resources/application-policy-test/application-policies/application-policy-application-policy-test-1.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
-    "id": "application-policy-application-policy-test-1",
-    "algorithm": "one-after-another",
-    "networkPartitions": [
-        "network-partition-application-policy-test-1",
-        "network-partition-application-policy-test-2"
-    ],
-    "properties": [
-        {
-            "name": "networkPartitionGroups",
-            "value": "network-partition-application-policy-test-1,network-partition-application-policy-test-2"
-        },
-        {
-            "name": "key-2",
-            "value": "value-2"
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/application-policy-test/application-policies/application-policy-application-policy-test-2.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/application-policy-test/application-policies/application-policy-application-policy-test-2.json b/products/stratos/modules/integration/src/test/resources/application-policy-test/application-policies/application-policy-application-policy-test-2.json
deleted file mode 100644
index ec3715c..0000000
--- a/products/stratos/modules/integration/src/test/resources/application-policy-test/application-policies/application-policy-application-policy-test-2.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
-    "id": "application-policy-application-policy-test-2",
-    "algorithm": "one-after-another",
-    "networkPartitions": [
-        "network-partition-application-policy-test-1",
-        "network-partition-application-policy-test-2"
-    ],
-    "properties": [
-        {
-            "name": "networkPartitionGroups",
-            "value": "network-partition-application-policy-test-1,network-partition-application-policy-test-2"
-        },
-        {
-            "name": "key-2",
-            "value": "value-2"
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/application-policy-test/application-policies/application-policy-application-policy-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/application-policy-test/application-policies/application-policy-application-policy-test.json b/products/stratos/modules/integration/src/test/resources/application-policy-test/application-policies/application-policy-application-policy-test.json
deleted file mode 100644
index cf1aace..0000000
--- a/products/stratos/modules/integration/src/test/resources/application-policy-test/application-policies/application-policy-application-policy-test.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
-    "id": "application-policy-application-policy-test",
-    "algorithm": "one-after-another",
-    "networkPartitions": [
-        "network-partition-application-policy-test-1",
-        "network-partition-application-policy-test-2"
-    ],
-    "properties": [
-        {
-            "name": "networkPartitionGroups",
-            "value": "network-partition-application-policy-test-1,network-partition-application-policy-test-2"
-        },
-        {
-            "name": "key-2",
-            "value": "value-2"
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/application-policy-test/network-partitions/mock/network-partition-application-policy-test-1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/application-policy-test/network-partitions/mock/network-partition-application-policy-test-1.json b/products/stratos/modules/integration/src/test/resources/application-policy-test/network-partitions/mock/network-partition-application-policy-test-1.json
deleted file mode 100644
index 79a9024..0000000
--- a/products/stratos/modules/integration/src/test/resources/application-policy-test/network-partitions/mock/network-partition-application-policy-test-1.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
-    "id": "network-partition-application-policy-test-1",
-    "provider": "mock",
-    "partitions": [
-        {
-            "id": "network-partition-8-partition-1",
-            "property": [
-                {
-                    "name": "region",
-                    "value": "default"
-                }
-            ]
-        },
-        {
-            "id": "network-partition-8-partition-2",
-            "property": [
-                {
-                    "name": "region",
-                    "value": "default"
-                }
-            ]
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/application-policy-test/network-partitions/mock/network-partition-application-policy-test-2.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/application-policy-test/network-partitions/mock/network-partition-application-policy-test-2.json b/products/stratos/modules/integration/src/test/resources/application-policy-test/network-partitions/mock/network-partition-application-policy-test-2.json
deleted file mode 100644
index a802378..0000000
--- a/products/stratos/modules/integration/src/test/resources/application-policy-test/network-partitions/mock/network-partition-application-policy-test-2.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
-    "id": "network-partition-application-policy-test-2",
-    "provider": "mock",
-    "partitions": [
-        {
-            "id": "partition-1",
-            "property": [
-                {
-                    "name": "region",
-                    "value": "default"
-                }
-            ]
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/application-update-test/application-policies/application-policy-application-update-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/application-update-test/application-policies/application-policy-application-update-test.json b/products/stratos/modules/integration/src/test/resources/application-update-test/application-policies/application-policy-application-update-test.json
deleted file mode 100644
index 1b29165..0000000
--- a/products/stratos/modules/integration/src/test/resources/application-update-test/application-policies/application-policy-application-update-test.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
-    "id": "application-policy-application-update-test",
-    "algorithm": "one-after-another",
-    "networkPartitions": [
-        "network-partition-application-update-test-1",
-        "network-partition-application-update-test-2"
-    ],
-    "properties": [
-        {
-            "name": "networkPartitionGroups",
-            "value": "network-partition-application-update-test-1,network-partition-application-update-test-2"
-        },
-        {
-            "name": "key-2",
-            "value": "value-2"
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/application-update-test/applications/g-sc-G123-1-application-update-test-v1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/application-update-test/applications/g-sc-G123-1-application-update-test-v1.json b/products/stratos/modules/integration/src/test/resources/application-update-test/applications/g-sc-G123-1-application-update-test-v1.json
deleted file mode 100644
index 2509ab1..0000000
--- a/products/stratos/modules/integration/src/test/resources/application-update-test/applications/g-sc-G123-1-application-update-test-v1.json
+++ /dev/null
@@ -1,86 +0,0 @@
-{
-    "alias": "g-sc-G123-1-application-update-test",
-    "applicationId": "g-sc-G123-1-application-update-test",
-    "components": {
-        "cartridges": [],
-        "groups": [
-            {
-                "name": "G1-application-update-test",
-                "groupMaxInstances": 1,
-                "groupMinInstances": 1,
-                "alias": "group1-application-update-test",
-                "cartridges": [
-                    {
-                        "cartridgeMin": 2,
-                        "cartridgeMax": 3,
-                        "type": "c1-application-update-test",
-                        "subscribableInfo": {
-                            "alias": "c1-1x0-application-update-test",
-                            "deploymentPolicy": "deployment-policy-application-update-test",
-                            "artifactRepository": {
-                                "repoUsername": "user",
-                                "repoUrl": "http://stratos.apache.org:10080/git/default.git",
-                                "privateRepo": true,
-                                "repoPassword": "c-policy"
-                            },
-                            "autoscalingPolicy": "autoscaling-policy-application-update-test"
-                        }
-                    }
-                ],
-                "groups": [
-                    {
-                        "name": "G2-application-update-test",
-                        "groupMaxInstances": 1,
-                        "groupMinInstances": 1,
-                        "alias": "group2-application-update-test",
-                        "cartridges": [
-                            {
-                                "cartridgeMin": 2,
-                                "cartridgeMax": 4,
-                                "type": "c2-application-update-test",
-                                "subscribableInfo": {
-                                    "alias": "c2-1x0-application-update-test",
-                                    "deploymentPolicy": "deployment-policy-application-update-test",
-                                    "artifactRepository": {
-                                        "repoUsername": "user",
-                                        "repoUrl": "http://stratos.apache.org:10080/git/default.git",
-                                        "privateRepo": true,
-                                        "repoPassword": "c-policy"
-                                    },
-                                    "autoscalingPolicy": "autoscaling-policy-application-update-test"
-                                }
-                            }
-                        ],
-                        "groups": [
-                            {
-                                "name": "G3-application-update-test",
-                                "groupMaxInstances": 3,
-                                "groupMinInstances": 2,
-                                "deploymentPolicy": "deployment-policy-application-update-test",
-                                "alias": "group3-application-update-test",
-                                "cartridges": [
-                                    {
-                                        "cartridgeMin": 2,
-                                        "cartridgeMax": 3,
-                                        "type": "c3-application-update-test",
-                                        "subscribableInfo": {
-                                            "alias": "c3-1x0-application-update-test",
-                                            "artifactRepository": {
-                                                "repoUsername": "user",
-                                                "repoUrl": "http://stratos.apache.org:10080/git/default.git",
-                                                "privateRepo": true,
-                                                "repoPassword": "c-policy"
-                                            },
-                                            "autoscalingPolicy": "autoscaling-policy-application-update-test"
-                                        }
-                                    }
-                                ],
-                                "groups": []
-                            }
-                        ]
-                    }
-                ]
-            }
-        ]
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/application-update-test/applications/g-sc-G123-1-application-update-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/application-update-test/applications/g-sc-G123-1-application-update-test.json b/products/stratos/modules/integration/src/test/resources/application-update-test/applications/g-sc-G123-1-application-update-test.json
deleted file mode 100644
index 548e66c..0000000
--- a/products/stratos/modules/integration/src/test/resources/application-update-test/applications/g-sc-G123-1-application-update-test.json
+++ /dev/null
@@ -1,86 +0,0 @@
-{
-    "alias": "g-sc-G123-1-application-update-test",
-    "applicationId": "g-sc-G123-1-application-update-test",
-    "components": {
-        "cartridges": [],
-        "groups": [
-            {
-                "name": "G1-application-update-test",
-                "groupMaxInstances": 1,
-                "groupMinInstances": 1,
-                "alias": "group1-application-update-test",
-                "cartridges": [
-                    {
-                        "cartridgeMin": 1,
-                        "cartridgeMax": 2,
-                        "type": "c1-application-update-test",
-                        "subscribableInfo": {
-                            "alias": "c1-1x0-application-update-test",
-                            "deploymentPolicy": "deployment-policy-application-update-test",
-                            "artifactRepository": {
-                                "repoUsername": "user",
-                                "repoUrl": "http://stratos.apache.org:10080/git/default.git",
-                                "privateRepo": true,
-                                "repoPassword": "c-policy"
-                            },
-                            "autoscalingPolicy": "autoscaling-policy-application-update-test"
-                        }
-                    }
-                ],
-                "groups": [
-                    {
-                        "name": "G2-application-update-test",
-                        "groupMaxInstances": 1,
-                        "groupMinInstances": 1,
-                        "alias": "group2-application-update-test",
-                        "cartridges": [
-                            {
-                                "cartridgeMin": 1,
-                                "cartridgeMax": 2,
-                                "type": "c2-application-update-test",
-                                "subscribableInfo": {
-                                    "alias": "c2-1x0-application-update-test",
-                                    "deploymentPolicy": "deployment-policy-application-update-test",
-                                    "artifactRepository": {
-                                        "repoUsername": "user",
-                                        "repoUrl": "http://stratos.apache.org:10080/git/default.git",
-                                        "privateRepo": true,
-                                        "repoPassword": "c-policy"
-                                    },
-                                    "autoscalingPolicy": "autoscaling-policy-application-update-test"
-                                }
-                            }
-                        ],
-                        "groups": [
-                            {
-                                "name": "G3-application-update-test",
-                                "groupMaxInstances": 2,
-                                "groupMinInstances": 1,
-                                "deploymentPolicy": "deployment-policy-application-update-test",
-                                "alias": "group3-application-update-test",
-                                "cartridges": [
-                                    {
-                                        "cartridgeMin": 1,
-                                        "cartridgeMax": 2,
-                                        "type": "c3-application-update-test",
-                                        "subscribableInfo": {
-                                            "alias": "c3-1x0-application-update-test",
-                                            "artifactRepository": {
-                                                "repoUsername": "user",
-                                                "repoUrl": "http://stratos.apache.org:10080/git/default.git",
-                                                "privateRepo": true,
-                                                "repoPassword": "c-policy"
-                                            },
-                                            "autoscalingPolicy": "autoscaling-policy-application-update-test"
-                                        }
-                                    }
-                                ],
-                                "groups": []
-                            }
-                        ]
-                    }
-                ]
-            }
-        ]
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/application-update-test/autoscaling-policies/autoscaling-policy-application-update-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/application-update-test/autoscaling-policies/autoscaling-policy-application-update-test.json b/products/stratos/modules/integration/src/test/resources/application-update-test/autoscaling-policies/autoscaling-policy-application-update-test.json
deleted file mode 100644
index 8d9b766..0000000
--- a/products/stratos/modules/integration/src/test/resources/application-update-test/autoscaling-policies/autoscaling-policy-application-update-test.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
-    "id": "autoscaling-policy-application-update-test",
-    "loadThresholds": {
-        "requestsInFlight": {
-            "threshold": 35
-        },
-        "memoryConsumption": {
-            "threshold": 45
-        },
-        "loadAverage": {
-            "threshold": 25
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/application-update-test/cartridges-groups/cartrdige-nested-application-update-test-v1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/application-update-test/cartridges-groups/cartrdige-nested-application-update-test-v1.json b/products/stratos/modules/integration/src/test/resources/application-update-test/cartridges-groups/cartrdige-nested-application-update-test-v1.json
deleted file mode 100644
index 884ea0c..0000000
--- a/products/stratos/modules/integration/src/test/resources/application-update-test/cartridges-groups/cartrdige-nested-application-update-test-v1.json
+++ /dev/null
@@ -1,50 +0,0 @@
-{
-    "name": "G1-application-update-test",
-    "dependencies": {
-        "terminationBehaviour": "terminate-none",
-        "startupOrders": [
-            {
-                "aliases": [
-                    "group.group2-application-update-test",
-                    "cartridge.c1-1x0-application-update-test"
-                ]
-            }
-        ]
-    },
-    "cartridges": [
-        "c1-application-update-test"
-    ],
-    "groups": [
-        {
-            "name": "G2-application-update-test",
-            "dependencies": {
-                "terminationBehaviour": "terminate-dependents",
-                "startupOrders": [
-                    {
-                        "aliases": [
-                            "group.group3-application-update-test",
-                            "cartridge.c2-1x0-application-update-test"
-                        ]
-                    }
-                ]
-            },
-            "cartridges": [
-                "c2-application-update-test"
-            ],
-            "groups": [
-                {
-                    "name": "G3-application-update-test",
-                    "dependencies": {
-                        "terminationBehaviour": "terminate-all",
-                        "startupOrders": []
-                    },
-                    "cartridges": [
-                        "c3-application-update-test"
-                    ],
-                    "groups": []
-                }
-            ]
-        }
-    ]
-}
-

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/application-update-test/cartridges-groups/cartrdige-nested-application-update-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/application-update-test/cartridges-groups/cartrdige-nested-application-update-test.json b/products/stratos/modules/integration/src/test/resources/application-update-test/cartridges-groups/cartrdige-nested-application-update-test.json
deleted file mode 100644
index 884ea0c..0000000
--- a/products/stratos/modules/integration/src/test/resources/application-update-test/cartridges-groups/cartrdige-nested-application-update-test.json
+++ /dev/null
@@ -1,50 +0,0 @@
-{
-    "name": "G1-application-update-test",
-    "dependencies": {
-        "terminationBehaviour": "terminate-none",
-        "startupOrders": [
-            {
-                "aliases": [
-                    "group.group2-application-update-test",
-                    "cartridge.c1-1x0-application-update-test"
-                ]
-            }
-        ]
-    },
-    "cartridges": [
-        "c1-application-update-test"
-    ],
-    "groups": [
-        {
-            "name": "G2-application-update-test",
-            "dependencies": {
-                "terminationBehaviour": "terminate-dependents",
-                "startupOrders": [
-                    {
-                        "aliases": [
-                            "group.group3-application-update-test",
-                            "cartridge.c2-1x0-application-update-test"
-                        ]
-                    }
-                ]
-            },
-            "cartridges": [
-                "c2-application-update-test"
-            ],
-            "groups": [
-                {
-                    "name": "G3-application-update-test",
-                    "dependencies": {
-                        "terminationBehaviour": "terminate-all",
-                        "startupOrders": []
-                    },
-                    "cartridges": [
-                        "c3-application-update-test"
-                    ],
-                    "groups": []
-                }
-            ]
-        }
-    ]
-}
-

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/application-update-test/cartridges/mock/c1-application-update-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/application-update-test/cartridges/mock/c1-application-update-test.json b/products/stratos/modules/integration/src/test/resources/application-update-test/cartridges/mock/c1-application-update-test.json
deleted file mode 100755
index fcfa6f2..0000000
--- a/products/stratos/modules/integration/src/test/resources/application-update-test/cartridges/mock/c1-application-update-test.json
+++ /dev/null
@@ -1,45 +0,0 @@
-{
-    "type": "c1-application-update-test",
-    "provider": "apache",
-    "host": "stratos.apache.org",
-    "category": "data",
-    "displayName": "c1-application-update-test",
-    "description": "c1-application-update-test Cartridge",
-    "version": "7",
-    "multiTenant": "false",
-    "portMapping": [
-        {
-            "name": "http-22",
-            "protocol": "http",
-            "port": "22",
-            "proxyPort": "8280"
-        }
-    ],
-    "deployment": {
-    },
-    "iaasProvider": [
-        {
-            "type": "mock",
-            "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
-            "networkInterfaces": [
-                {
-                    "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e"
-                }
-            ],
-            "property": [
-                {
-                    "name": "instanceType",
-                    "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594"
-                },
-                {
-                    "name": "keyPair",
-                    "value": "vishanth-key"
-                },
-                {
-                    "name": "securityGroups",
-                    "value": "default"
-                }
-            ]
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/application-update-test/cartridges/mock/c2-application-update-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/application-update-test/cartridges/mock/c2-application-update-test.json b/products/stratos/modules/integration/src/test/resources/application-update-test/cartridges/mock/c2-application-update-test.json
deleted file mode 100755
index a1c1a97..0000000
--- a/products/stratos/modules/integration/src/test/resources/application-update-test/cartridges/mock/c2-application-update-test.json
+++ /dev/null
@@ -1,45 +0,0 @@
-{
-    "type": "c2-application-update-test",
-    "provider": "apache",
-    "host": "stratos.apache.org",
-    "category": "data",
-    "displayName": "c2-application-update-test",
-    "description": "c2-application-update-test Cartridge",
-    "version": "7",
-    "multiTenant": "false",
-    "portMapping": [
-        {
-            "name": "http-22",
-            "protocol": "http",
-            "port": "22",
-            "proxyPort": "8280"
-        }
-    ],
-    "deployment": {
-    },
-    "iaasProvider": [
-        {
-            "type": "mock",
-            "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
-            "networkInterfaces": [
-                {
-                    "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e"
-                }
-            ],
-            "property": [
-                {
-                    "name": "instanceType",
-                    "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594"
-                },
-                {
-                    "name": "keyPair",
-                    "value": "vishanth-key"
-                },
-                {
-                    "name": "securityGroups",
-                    "value": "default"
-                }
-            ]
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/application-update-test/cartridges/mock/c3-application-update-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/application-update-test/cartridges/mock/c3-application-update-test.json b/products/stratos/modules/integration/src/test/resources/application-update-test/cartridges/mock/c3-application-update-test.json
deleted file mode 100755
index e3932fc..0000000
--- a/products/stratos/modules/integration/src/test/resources/application-update-test/cartridges/mock/c3-application-update-test.json
+++ /dev/null
@@ -1,45 +0,0 @@
-{
-    "type": "c3-application-update-test",
-    "provider": "apache",
-    "host": "stratos.apache.org",
-    "category": "data",
-    "displayName": "c3-application-update-test",
-    "description": "c3-application-update-test Cartridge",
-    "version": "7",
-    "multiTenant": "false",
-    "portMapping": [
-        {
-            "name": "http-22",
-            "protocol": "http",
-            "port": "22",
-            "proxyPort": "8280"
-        }
-    ],
-    "deployment": {
-    },
-    "iaasProvider": [
-        {
-            "type": "mock",
-            "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
-            "networkInterfaces": [
-                {
-                    "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e"
-                }
-            ],
-            "property": [
-                {
-                    "name": "instanceType",
-                    "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594"
-                },
-                {
-                    "name": "keyPair",
-                    "value": "vishanth-key"
-                },
-                {
-                    "name": "securityGroups",
-                    "value": "default"
-                }
-            ]
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/application-update-test/deployment-policies/deployment-policy-application-update-test-v1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/application-update-test/deployment-policies/deployment-policy-application-update-test-v1.json b/products/stratos/modules/integration/src/test/resources/application-update-test/deployment-policies/deployment-policy-application-update-test-v1.json
deleted file mode 100644
index 5dc2081..0000000
--- a/products/stratos/modules/integration/src/test/resources/application-update-test/deployment-policies/deployment-policy-application-update-test-v1.json
+++ /dev/null
@@ -1,36 +0,0 @@
-{
-    "id": "deployment-policy-application-update-test",
-    "networkPartitions": [
-        {
-            "id": "network-partition-application-update-test-1",
-            "partitionAlgo": "one-after-another",
-            "partitions": [
-                {
-                    "id": "partition-1",
-                    "partitionMax": 25
-                },
-                {
-                    "id": "partition-2",
-                    "partitionMax": 20
-                }
-            ]
-        },
-        {
-            "id": "network-partition-application-update-test-2",
-            "partitionAlgo": "round-robin",
-            "partitions": [
-                {
-                    "id": "network-partition-2-partition-1",
-                    "partitionMax": 15
-                },
-                {
-                    "id": "network-partition-2-partition-2",
-                    "partitionMax": 5
-                }
-            ]
-        }
-    ]
-}
-
-
-

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/application-update-test/deployment-policies/deployment-policy-application-update-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/application-update-test/deployment-policies/deployment-policy-application-update-test.json b/products/stratos/modules/integration/src/test/resources/application-update-test/deployment-policies/deployment-policy-application-update-test.json
deleted file mode 100644
index 647322b..0000000
--- a/products/stratos/modules/integration/src/test/resources/application-update-test/deployment-policies/deployment-policy-application-update-test.json
+++ /dev/null
@@ -1,32 +0,0 @@
-{
-    "id": "deployment-policy-application-update-test",
-    "networkPartitions": [
-        {
-            "id": "network-partition-application-update-test-1",
-            "partitionAlgo": "one-after-another",
-            "partitions": [
-                {
-                    "id": "partition-1",
-                    "partitionMax": 20
-                }
-            ]
-        },
-        {
-            "id": "network-partition-application-update-test-2",
-            "partitionAlgo": "round-robin",
-            "partitions": [
-                {
-                    "id": "network-partition-2-partition-1",
-                    "partitionMax": 10
-                },
-                {
-                    "id": "network-partition-2-partition-2",
-                    "partitionMax": 9
-                }
-            ]
-        }
-    ]
-}
-
-
-

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/application-update-test/network-partitions/mock/network-partition-application-update-test-1-v1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/application-update-test/network-partitions/mock/network-partition-application-update-test-1-v1.json b/products/stratos/modules/integration/src/test/resources/application-update-test/network-partitions/mock/network-partition-application-update-test-1-v1.json
deleted file mode 100644
index aaa3f04..0000000
--- a/products/stratos/modules/integration/src/test/resources/application-update-test/network-partitions/mock/network-partition-application-update-test-1-v1.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
-    "id": "network-partition-application-update-test-1",
-    "provider": "mock",
-    "partitions": [
-        {
-            "id": "partition-1",
-            "property": [
-                {
-                    "name": "region",
-                    "value": "default"
-                }
-            ]
-        },
-        {
-            "id": "partition-2",
-            "property": [
-                {
-                    "name": "region",
-                    "value": "default1"
-                },
-                {
-                    "name": "zone",
-                    "value": "z1"
-                }
-            ]
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/application-update-test/network-partitions/mock/network-partition-application-update-test-1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/application-update-test/network-partitions/mock/network-partition-application-update-test-1.json b/products/stratos/modules/integration/src/test/resources/application-update-test/network-partitions/mock/network-partition-application-update-test-1.json
deleted file mode 100644
index f1822af..0000000
--- a/products/stratos/modules/integration/src/test/resources/application-update-test/network-partitions/mock/network-partition-application-update-test-1.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
-    "id": "network-partition-application-update-test-1",
-    "provider": "mock",
-    "partitions": [
-        {
-            "id": "partition-1",
-            "property": [
-                {
-                    "name": "region",
-                    "value": "default"
-                }
-            ]
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/application-update-test/network-partitions/mock/network-partition-application-update-test-2.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/application-update-test/network-partitions/mock/network-partition-application-update-test-2.json b/products/stratos/modules/integration/src/test/resources/application-update-test/network-partitions/mock/network-partition-application-update-test-2.json
deleted file mode 100644
index 19ddd83..0000000
--- a/products/stratos/modules/integration/src/test/resources/application-update-test/network-partitions/mock/network-partition-application-update-test-2.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
-    "id": "network-partition-application-update-test-2",
-    "provider": "mock",
-    "partitions": [
-        {
-            "id": "network-partition-2-partition-1",
-            "property": [
-                {
-                    "name": "region",
-                    "value": "default"
-                }
-            ]
-        },
-        {
-            "id": "network-partition-2-partition-2",
-            "property": [
-                {
-                    "name": "region",
-                    "value": "default"
-                }
-            ]
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/autoscaling-policy-test/autoscaling-policies/autoscaling-policy-autoscaling-policy-test-1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/autoscaling-policy-test/autoscaling-policies/autoscaling-policy-autoscaling-policy-test-1.json b/products/stratos/modules/integration/src/test/resources/autoscaling-policy-test/autoscaling-policies/autoscaling-policy-autoscaling-policy-test-1.json
deleted file mode 100644
index d7765b9..0000000
--- a/products/stratos/modules/integration/src/test/resources/autoscaling-policy-test/autoscaling-policies/autoscaling-policy-autoscaling-policy-test-1.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
-    "id": "autoscaling-policy-autoscaling-policy-test-1",
-    "loadThresholds": {
-        "requestsInFlight": {
-            "threshold": 35
-        },
-        "memoryConsumption": {
-            "threshold": 45
-        },
-        "loadAverage": {
-            "threshold": 25
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/autoscaling-policy-test/autoscaling-policies/autoscaling-policy-autoscaling-policy-test-2.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/autoscaling-policy-test/autoscaling-policies/autoscaling-policy-autoscaling-policy-test-2.json b/products/stratos/modules/integration/src/test/resources/autoscaling-policy-test/autoscaling-policies/autoscaling-policy-autoscaling-policy-test-2.json
deleted file mode 100644
index 03f3a01..0000000
--- a/products/stratos/modules/integration/src/test/resources/autoscaling-policy-test/autoscaling-policies/autoscaling-policy-autoscaling-policy-test-2.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
-    "id": "autoscaling-policy-autoscaling-policy-test-2",
-    "loadThresholds": {
-        "requestsInFlight": {
-            "threshold": 35
-        },
-        "memoryConsumption": {
-            "threshold": 45
-        },
-        "loadAverage": {
-            "threshold": 25
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/autoscaling-policy-test/autoscaling-policies/autoscaling-policy-autoscaling-policy-test-v1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/autoscaling-policy-test/autoscaling-policies/autoscaling-policy-autoscaling-policy-test-v1.json b/products/stratos/modules/integration/src/test/resources/autoscaling-policy-test/autoscaling-policies/autoscaling-policy-autoscaling-policy-test-v1.json
deleted file mode 100644
index d29a8e3..0000000
--- a/products/stratos/modules/integration/src/test/resources/autoscaling-policy-test/autoscaling-policies/autoscaling-policy-autoscaling-policy-test-v1.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
-    "id": "autoscaling-policy-autoscaling-policy-test",
-    "loadThresholds": {
-        "requestsInFlight": {
-            "threshold": 30
-        },
-        "memoryConsumption": {
-            "threshold": 40
-        },
-        "loadAverage": {
-            "threshold": 20
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/autoscaling-policy-test/autoscaling-policies/autoscaling-policy-autoscaling-policy-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/autoscaling-policy-test/autoscaling-policies/autoscaling-policy-autoscaling-policy-test.json b/products/stratos/modules/integration/src/test/resources/autoscaling-policy-test/autoscaling-policies/autoscaling-policy-autoscaling-policy-test.json
deleted file mode 100644
index dce4c7a..0000000
--- a/products/stratos/modules/integration/src/test/resources/autoscaling-policy-test/autoscaling-policies/autoscaling-policy-autoscaling-policy-test.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
-    "id": "autoscaling-policy-autoscaling-policy-test",
-    "loadThresholds": {
-        "requestsInFlight": {
-            "threshold": 35
-        },
-        "memoryConsumption": {
-            "threshold": 45
-        },
-        "loadAverage": {
-            "threshold": 25
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/cartridge-group-test/cartridges-groups/g4-g5-g6-cartridge-group-test-v1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/cartridge-group-test/cartridges-groups/g4-g5-g6-cartridge-group-test-v1.json b/products/stratos/modules/integration/src/test/resources/cartridge-group-test/cartridges-groups/g4-g5-g6-cartridge-group-test-v1.json
deleted file mode 100644
index 38a976a..0000000
--- a/products/stratos/modules/integration/src/test/resources/cartridge-group-test/cartridges-groups/g4-g5-g6-cartridge-group-test-v1.json
+++ /dev/null
@@ -1,50 +0,0 @@
-{
-    "name": "G4-cartridge-group-test",
-    "dependencies": {
-        "terminationBehaviour": "terminate-none",
-        "startupOrders": [
-            {
-                "aliases": [
-                    "group.group2-cartridge-group-test",
-                    "cartridge.c1-1x0-cartridge-group-test"
-                ]
-            }
-        ]
-    },
-    "cartridges": [
-        "c4-cartridge-group-test"
-    ],
-    "groups": [
-        {
-            "name": "G5-cartridge-group-test",
-            "dependencies": {
-                "terminationBehaviour": "terminate-dependents",
-                "startupOrders": [
-                    {
-                        "aliases": [
-                            "group.group6-cartridge-group-test",
-                            "cartridge.c5-1x0-cartridge-group-test"
-                        ]
-                    }
-                ]
-            },
-            "cartridges": [
-                "c5-cartridge-group-test"
-            ],
-            "groups": [
-                {
-                    "name": "G6-cartridge-group-test",
-                    "dependencies": {
-                        "terminationBehaviour": "terminate-all",
-                        "startupOrders": []
-                    },
-                    "cartridges": [
-                        "c6-cartridge-group-test"
-                    ],
-                    "groups": []
-                }
-            ]
-        }
-    ]
-}
-

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/cartridge-group-test/cartridges-groups/g4-g5-g6-cartridge-group-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/cartridge-group-test/cartridges-groups/g4-g5-g6-cartridge-group-test.json b/products/stratos/modules/integration/src/test/resources/cartridge-group-test/cartridges-groups/g4-g5-g6-cartridge-group-test.json
deleted file mode 100644
index 741efe0..0000000
--- a/products/stratos/modules/integration/src/test/resources/cartridge-group-test/cartridges-groups/g4-g5-g6-cartridge-group-test.json
+++ /dev/null
@@ -1,50 +0,0 @@
-{
-    "name": "G4-cartridge-group-test",
-    "dependencies": {
-        "terminationBehaviour": "terminate-none",
-        "startupOrders": [
-            {
-                "aliases": [
-                    "group.group5-cartridge-group-test",
-                    "cartridge.c4-1x0-cartridge-group-test"
-                ]
-            }
-        ]
-    },
-    "cartridges": [
-        "c4-cartridge-group-test"
-    ],
-    "groups": [
-        {
-            "name": "G5-cartridge-group-test",
-            "dependencies": {
-                "terminationBehaviour": "terminate-dependents",
-                "startupOrders": [
-                    {
-                        "aliases": [
-                            "group.group6-cartridge-group-test",
-                            "cartridge.c5-1x0-cartridge-group-test"
-                        ]
-                    }
-                ]
-            },
-            "cartridges": [
-                "c5-cartridge-group-test"
-            ],
-            "groups": [
-                {
-                    "name": "G6-cartridge-group-test",
-                    "dependencies": {
-                        "terminationBehaviour": "terminate-all",
-                        "startupOrders": []
-                    },
-                    "cartridges": [
-                        "c6-cartridge-group-test"
-                    ],
-                    "groups": []
-                }
-            ]
-        }
-    ]
-}
-

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/cartridge-group-test/cartridges-groups/group-1-cartridge-group-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/cartridge-group-test/cartridges-groups/group-1-cartridge-group-test.json b/products/stratos/modules/integration/src/test/resources/cartridge-group-test/cartridges-groups/group-1-cartridge-group-test.json
deleted file mode 100644
index a3050f4..0000000
--- a/products/stratos/modules/integration/src/test/resources/cartridge-group-test/cartridges-groups/group-1-cartridge-group-test.json
+++ /dev/null
@@ -1,50 +0,0 @@
-{
-    "name": "group-1-cartridge-group-test",
-    "dependencies": {
-        "terminationBehaviour": "terminate-none",
-        "startupOrders": [
-            {
-                "aliases": [
-                    "group.group5-cartridge-group-test",
-                    "cartridge.c4-1x0-cartridge-group-test"
-                ]
-            }
-        ]
-    },
-    "cartridges": [
-        "c4-cartridge-group-test"
-    ],
-    "groups": [
-        {
-            "name": "G5-cartridge-group-test",
-            "dependencies": {
-                "terminationBehaviour": "terminate-dependents",
-                "startupOrders": [
-                    {
-                        "aliases": [
-                            "group.group6-cartridge-group-test",
-                            "cartridge.c5-1x0-cartridge-group-test"
-                        ]
-                    }
-                ]
-            },
-            "cartridges": [
-                "c5-cartridge-group-test"
-            ],
-            "groups": [
-                {
-                    "name": "G6-cartridge-group-test",
-                    "dependencies": {
-                        "terminationBehaviour": "terminate-all",
-                        "startupOrders": []
-                    },
-                    "cartridges": [
-                        "c6-cartridge-group-test"
-                    ],
-                    "groups": []
-                }
-            ]
-        }
-    ]
-}
-

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/cartridge-group-test/cartridges-groups/group-2-cartridge-group-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/cartridge-group-test/cartridges-groups/group-2-cartridge-group-test.json b/products/stratos/modules/integration/src/test/resources/cartridge-group-test/cartridges-groups/group-2-cartridge-group-test.json
deleted file mode 100644
index bbe7ae7..0000000
--- a/products/stratos/modules/integration/src/test/resources/cartridge-group-test/cartridges-groups/group-2-cartridge-group-test.json
+++ /dev/null
@@ -1,50 +0,0 @@
-{
-    "name": "group-2-cartridge-group-test",
-    "dependencies": {
-        "terminationBehaviour": "terminate-none",
-        "startupOrders": [
-            {
-                "aliases": [
-                    "group.group5-cartridge-group-test",
-                    "cartridge.c4-1x0-cartridge-group-test"
-                ]
-            }
-        ]
-    },
-    "cartridges": [
-        "c4-cartridge-group-test"
-    ],
-    "groups": [
-        {
-            "name": "G5-cartridge-group-test",
-            "dependencies": {
-                "terminationBehaviour": "terminate-dependents",
-                "startupOrders": [
-                    {
-                        "aliases": [
-                            "group.group6-cartridge-group-test",
-                            "cartridge.c5-1x0-cartridge-group-test"
-                        ]
-                    }
-                ]
-            },
-            "cartridges": [
-                "c5-cartridge-group-test"
-            ],
-            "groups": [
-                {
-                    "name": "G6-cartridge-group-test",
-                    "dependencies": {
-                        "terminationBehaviour": "terminate-all",
-                        "startupOrders": []
-                    },
-                    "cartridges": [
-                        "c6-cartridge-group-test"
-                    ],
-                    "groups": []
-                }
-            ]
-        }
-    ]
-}
-

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/cartridge-group-test/cartridges/mock/c4-cartridge-group-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/cartridge-group-test/cartridges/mock/c4-cartridge-group-test.json b/products/stratos/modules/integration/src/test/resources/cartridge-group-test/cartridges/mock/c4-cartridge-group-test.json
deleted file mode 100755
index f34c1c4..0000000
--- a/products/stratos/modules/integration/src/test/resources/cartridge-group-test/cartridges/mock/c4-cartridge-group-test.json
+++ /dev/null
@@ -1,45 +0,0 @@
-{
-    "type": "c4-cartridge-group-test",
-    "provider": "apache",
-    "host": "stratos.apache.org",
-    "category": "data",
-    "displayName": "c4-cartridge-group-test",
-    "description": "c4-cartridge-group-test Cartridge",
-    "version": "7",
-    "multiTenant": "false",
-    "portMapping": [
-        {
-            "name": "http-22",
-            "protocol": "http",
-            "port": "22",
-            "proxyPort": "8280"
-        }
-    ],
-    "deployment": {
-    },
-    "iaasProvider": [
-        {
-            "type": "mock",
-            "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
-            "networkInterfaces": [
-                {
-                    "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e"
-                }
-            ],
-            "property": [
-                {
-                    "name": "instanceType",
-                    "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594"
-                },
-                {
-                    "name": "keyPair",
-                    "value": "vishanth-key"
-                },
-                {
-                    "name": "securityGroups",
-                    "value": "default"
-                }
-            ]
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/cartridge-group-test/cartridges/mock/c5-cartridge-group-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/cartridge-group-test/cartridges/mock/c5-cartridge-group-test.json b/products/stratos/modules/integration/src/test/resources/cartridge-group-test/cartridges/mock/c5-cartridge-group-test.json
deleted file mode 100755
index 9c236a0..0000000
--- a/products/stratos/modules/integration/src/test/resources/cartridge-group-test/cartridges/mock/c5-cartridge-group-test.json
+++ /dev/null
@@ -1,124 +0,0 @@
-{
-    "category": "Application",
-    "description": "c5-cartridge-group-test Cartridge",
-    "displayName": "c5-cartridge-group-test",
-    "host": "qmog.cisco.com",
-    "iaasProvider": [
-        {
-            "imageId": "RegionOne/16e7e35b-0c88-4605-90ce-cbef9e9dde0f",
-            "maxInstanceLimit": "4",
-            "networkInterfaces": [
-                {
-                    "floatingNetworks": [
-                        {
-                            "name": "public",
-                            "networkUuid": "26b4aa2b-06bc-4e4f-a6eb-c19fbc211af6"
-                        }
-                    ],
-                    "name": "core",
-                    "networkUuid": "5e107fbd-4820-47ad-84ea-6f135496f889"
-                }
-            ],
-            "property": [
-                {
-                    "name": "instanceType",
-                    "value": "RegionOne/2cdbd576-8c9b-4c2d-8b1a-0f79dc4fb809"
-                },
-                {
-                    "name": "keyPair",
-                    "value": "phoenix"
-                },
-                {
-                    "name": "autoAssignIp",
-                    "value": "false"
-                },
-                {
-                    "name": "securityGroups",
-                    "value": "default"
-                }
-            ],
-            "type": "mock"
-        }
-    ],
-    "multiTenant": "false",
-    "portMapping": [
-        {
-            "port": "22",
-            "protocol": "http",
-            "proxyPort": "8280"
-        }
-    ],
-    "property": [
-        {
-            "name": "payload_parameter.MB_IP",
-            "value": "octl.qmog.cisco.com"
-        },
-        {
-            "name": "payload_parameter.MB_PORT",
-            "value": "61616"
-        },
-        {
-            "name": "payload_parameter.CEP_IP",
-            "value": "octl.qmog.cisco.com"
-        },
-        {
-            "name": "payload_parameter.CEP_PORT",
-            "value": "7611"
-        },
-        {
-            "name": "payload_parameter.CEP_ADMIN_USERNAME",
-            "value": "admin"
-        },
-        {
-            "name": "payload_parameter.CEP_ADMIN_PASSWORD",
-            "value": "admin"
-        },
-        {
-            "name": "payload_parameter.CERT_TRUSTSTORE",
-            "value": "/opt/apache-stratos-cartridge-agent/security/client-truststore.jks"
-        },
-        {
-            "name": "payload_parameter.TRUSTSTORE_PASSWORD",
-            "value": "wso2carbon"
-        },
-        {
-            "name": "payload_parameter.ENABLE_DATA_PUBLISHER",
-            "value": "false"
-        },
-        {
-            "name": "payload_parameter.MONITORING_SERVER_IP",
-            "value": "octl.qmog.cisco.com"
-        },
-        {
-            "name": "payload_parameter.MONITORING_SERVER_PORT",
-            "value": "7611"
-        },
-        {
-            "name": "payload_parameter.MONITORING_SERVER_SECURE_PORT",
-            "value": "7711"
-        },
-        {
-            "name": "payload_parameter.MONITORING_SERVER_ADMIN_USERNAME",
-            "value": "admin"
-        },
-        {
-            "name": "payload_parameter.MONITORING_SERVER_ADMIN_PASSWORD",
-            "value": "admin"
-        },
-        {
-            "name": "payload_parameter.QTCM_DNS_SEGMENT",
-            "value": "test"
-        },
-        {
-            "name": "payload_parameter.QTCM_NETWORK_COUNT",
-            "value": "1"
-        },
-        {
-            "name": "payload_parameter.SIMPLE_PROPERTY",
-            "value": "value"
-        }
-    ],
-    "provider": "cisco",
-    "type": "c5-cartridge-group-test",
-    "version": "1.0"
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/cartridge-group-test/cartridges/mock/c6-cartridge-group-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/cartridge-group-test/cartridges/mock/c6-cartridge-group-test.json b/products/stratos/modules/integration/src/test/resources/cartridge-group-test/cartridges/mock/c6-cartridge-group-test.json
deleted file mode 100755
index 4bfcca6..0000000
--- a/products/stratos/modules/integration/src/test/resources/cartridge-group-test/cartridges/mock/c6-cartridge-group-test.json
+++ /dev/null
@@ -1,45 +0,0 @@
-{
-    "type": "c6-cartridge-group-test",
-    "provider": "apache",
-    "host": "stratos.apache.org",
-    "category": "data",
-    "displayName": "c6-cartridge-group-test",
-    "description": "c6-cartridge-group-test Cartridge",
-    "version": "7",
-    "multiTenant": "false",
-    "portMapping": [
-        {
-            "name": "http-22",
-            "protocol": "http",
-            "port": "22",
-            "proxyPort": "8280"
-        }
-    ],
-    "deployment": {
-    },
-    "iaasProvider": [
-        {
-            "type": "mock",
-            "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
-            "networkInterfaces": [
-                {
-                    "networkUuid": "b55f009a-1cc6-cartridge-group-test-4b17-924f-4ae0ee18db5e"
-                }
-            ],
-            "property": [
-                {
-                    "name": "instanceType",
-                    "value": "RegionOne/aa5f45a2-c6-cartridge-group-testd6-419d-917a-9dd2e3888594"
-                },
-                {
-                    "name": "keyPair",
-                    "value": "vishanth-key"
-                },
-                {
-                    "name": "securityGroups",
-                    "value": "default"
-                }
-            ]
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/cartridge-test/cartridges/mock/c0-cartridge-test-v1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/cartridge-test/cartridges/mock/c0-cartridge-test-v1.json b/products/stratos/modules/integration/src/test/resources/cartridge-test/cartridges/mock/c0-cartridge-test-v1.json
deleted file mode 100755
index eb2cb3e..0000000
--- a/products/stratos/modules/integration/src/test/resources/cartridge-test/cartridges/mock/c0-cartridge-test-v1.json
+++ /dev/null
@@ -1,124 +0,0 @@
-{
-    "category": "Data",
-    "description": "c0-cartridge-test Cartridge",
-    "displayName": "c0-cartridge-test",
-    "host": "qmog.cisco.com12",
-    "iaasProvider": [
-        {
-            "imageId": "RegionOne/16e7e35b-0c88-4605-90ce-cbef9e9d123",
-            "maxInstanceLimit": "4",
-            "networkInterfaces": [
-                {
-                    "floatingNetworks": [
-                        {
-                            "name": "private",
-                            "networkUuid": "26b4aa2b-06bc-4e4f-a6eb-c19fbc2112121"
-                        }
-                    ],
-                    "name": "core1",
-                    "networkUuid": "5e107fbd-4820-47ad-84ea-6f1354961212"
-                }
-            ],
-            "property": [
-                {
-                    "name": "instanceType",
-                    "value": "RegionOne/2cdbd576-8c9b-4c2d-8b1a-0f79dc4fb812"
-                },
-                {
-                    "name": "keyPair",
-                    "value": "phoenix12"
-                },
-                {
-                    "name": "autoAssignIp",
-                    "value": "true"
-                },
-                {
-                    "name": "securityGroups",
-                    "value": "default123"
-                }
-            ],
-            "type": "mock"
-        }
-    ],
-    "multiTenant": "false",
-    "portMapping": [
-        {
-            "port": "22",
-            "protocol": "http",
-            "proxyPort": "8280"
-        }
-    ],
-    "property": [
-        {
-            "name": "payload_parameter.MB_IP",
-            "value": "octl.qmog.cisco.com123"
-        },
-        {
-            "name": "payload_parameter.MB_PORT",
-            "value": "61617"
-        },
-        {
-            "name": "payload_parameter.CEP_IP",
-            "value": "octl.qmog.cisco.com123"
-        },
-        {
-            "name": "payload_parameter.CEP_PORT",
-            "value": "7612"
-        },
-        {
-            "name": "payload_parameter.CEP_ADMIN_USERNAME",
-            "value": "admin"
-        },
-        {
-            "name": "payload_parameter.CEP_ADMIN_PASSWORD",
-            "value": "admin123"
-        },
-        {
-            "name": "payload_parameter.CERT_TRUSTSTORE",
-            "value": "/opt/apache-stratos-cartridge-agent/security/client-truststore.jks"
-        },
-        {
-            "name": "payload_parameter.TRUSTSTORE_PASSWORD",
-            "value": "wso2carbon"
-        },
-        {
-            "name": "payload_parameter.ENABLE_DATA_PUBLISHER",
-            "value": "false"
-        },
-        {
-            "name": "payload_parameter.MONITORING_SERVER_IP",
-            "value": "octl.qmog.cisco.com123"
-        },
-        {
-            "name": "payload_parameter.MONITORING_SERVER_PORT",
-            "value": "7612"
-        },
-        {
-            "name": "payload_parameter.MONITORING_SERVER_SECURE_PORT",
-            "value": "7712"
-        },
-        {
-            "name": "payload_parameter.MONITORING_SERVER_ADMIN_USERNAME",
-            "value": "admin"
-        },
-        {
-            "name": "payload_parameter.MONITORING_SERVER_ADMIN_PASSWORD",
-            "value": "admin123"
-        },
-        {
-            "name": "payload_parameter.QTCM_DNS_SEGMENT",
-            "value": "test123"
-        },
-        {
-            "name": "payload_parameter.QTCM_NETWORK_COUNT",
-            "value": "3"
-        },
-        {
-            "name": "payload_parameter.SIMPLE_PROPERTY",
-            "value": "value"
-        }
-    ],
-    "provider": "apache",
-    "type": "c0-cartridge-test",
-    "version": "1.0"
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/cartridge-test/cartridges/mock/c0-cartridge-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/cartridge-test/cartridges/mock/c0-cartridge-test.json b/products/stratos/modules/integration/src/test/resources/cartridge-test/cartridges/mock/c0-cartridge-test.json
deleted file mode 100755
index 056d510..0000000
--- a/products/stratos/modules/integration/src/test/resources/cartridge-test/cartridges/mock/c0-cartridge-test.json
+++ /dev/null
@@ -1,124 +0,0 @@
-{
-    "category": "Application",
-    "description": "c0-cartridge-test Cartridge",
-    "displayName": "c0-cartridge-test",
-    "host": "qmog.cisco.com",
-    "iaasProvider": [
-        {
-            "imageId": "RegionOne/16e7e35b-0c88-4605-90ce-cbef9e9dde0f",
-            "maxInstanceLimit": "4",
-            "networkInterfaces": [
-                {
-                    "floatingNetworks": [
-                        {
-                            "name": "public",
-                            "networkUuid": "26b4aa2b-06bc-4e4f-a6eb-c19fbc211af6"
-                        }
-                    ],
-                    "name": "core",
-                    "networkUuid": "5e107fbd-4820-47ad-84ea-6f135496f889"
-                }
-            ],
-            "property": [
-                {
-                    "name": "instanceType",
-                    "value": "RegionOne/2cdbd576-8c9b-4c2d-8b1a-0f79dc4fb809"
-                },
-                {
-                    "name": "keyPair",
-                    "value": "phoenix"
-                },
-                {
-                    "name": "autoAssignIp",
-                    "value": "false"
-                },
-                {
-                    "name": "securityGroups",
-                    "value": "default"
-                }
-            ],
-            "type": "mock"
-        }
-    ],
-    "multiTenant": "false",
-    "portMapping": [
-        {
-            "port": "22",
-            "protocol": "http",
-            "proxyPort": "8280"
-        }
-    ],
-    "property": [
-        {
-            "name": "payload_parameter.MB_IP",
-            "value": "octl.qmog.cisco.com"
-        },
-        {
-            "name": "payload_parameter.MB_PORT",
-            "value": "61616"
-        },
-        {
-            "name": "payload_parameter.CEP_IP",
-            "value": "octl.qmog.cisco.com"
-        },
-        {
-            "name": "payload_parameter.CEP_PORT",
-            "value": "7611"
-        },
-        {
-            "name": "payload_parameter.CEP_ADMIN_USERNAME",
-            "value": "admin"
-        },
-        {
-            "name": "payload_parameter.CEP_ADMIN_PASSWORD",
-            "value": "admin"
-        },
-        {
-            "name": "payload_parameter.CERT_TRUSTSTORE",
-            "value": "/opt/apache-stratos-cartridge-agent/security/client-truststore.jks"
-        },
-        {
-            "name": "payload_parameter.TRUSTSTORE_PASSWORD",
-            "value": "wso2carbon"
-        },
-        {
-            "name": "payload_parameter.ENABLE_DATA_PUBLISHER",
-            "value": "false"
-        },
-        {
-            "name": "payload_parameter.MONITORING_SERVER_IP",
-            "value": "octl.qmog.cisco.com"
-        },
-        {
-            "name": "payload_parameter.MONITORING_SERVER_PORT",
-            "value": "7611"
-        },
-        {
-            "name": "payload_parameter.MONITORING_SERVER_SECURE_PORT",
-            "value": "7711"
-        },
-        {
-            "name": "payload_parameter.MONITORING_SERVER_ADMIN_USERNAME",
-            "value": "admin"
-        },
-        {
-            "name": "payload_parameter.MONITORING_SERVER_ADMIN_PASSWORD",
-            "value": "admin"
-        },
-        {
-            "name": "payload_parameter.QTCM_DNS_SEGMENT",
-            "value": "test"
-        },
-        {
-            "name": "payload_parameter.QTCM_NETWORK_COUNT",
-            "value": "1"
-        },
-        {
-            "name": "payload_parameter.SIMPLE_PROPERTY",
-            "value": "value"
-        }
-    ],
-    "provider": "cisco",
-    "type": "c0-cartridge-test",
-    "version": "1.0"
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/cartridge-test/cartridges/mock/c1-cartridge-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/cartridge-test/cartridges/mock/c1-cartridge-test.json b/products/stratos/modules/integration/src/test/resources/cartridge-test/cartridges/mock/c1-cartridge-test.json
deleted file mode 100755
index 2251af1..0000000
--- a/products/stratos/modules/integration/src/test/resources/cartridge-test/cartridges/mock/c1-cartridge-test.json
+++ /dev/null
@@ -1,124 +0,0 @@
-{
-    "category": "Application",
-    "description": "c1-cartridge-test Cartridge",
-    "displayName": "c1-cartridge-test",
-    "host": "qmog.cisco.com",
-    "iaasProvider": [
-        {
-            "imageId": "RegionOne/16e7e35b-0c88-4605-90ce-cbef9e9dde0f",
-            "maxInstanceLimit": "4",
-            "networkInterfaces": [
-                {
-                    "floatingNetworks": [
-                        {
-                            "name": "public",
-                            "networkUuid": "26b4aa2b-06bc-4e4f-a6eb-c19fbc211af6"
-                        }
-                    ],
-                    "name": "core",
-                    "networkUuid": "5e107fbd-4820-47ad-84ea-6f135496f889"
-                }
-            ],
-            "property": [
-                {
-                    "name": "instanceType",
-                    "value": "RegionOne/2cdbd576-8c9b-4c2d-8b1a-0f79dc4fb809"
-                },
-                {
-                    "name": "keyPair",
-                    "value": "phoenix"
-                },
-                {
-                    "name": "autoAssignIp",
-                    "value": "false"
-                },
-                {
-                    "name": "securityGroups",
-                    "value": "default"
-                }
-            ],
-            "type": "mock"
-        }
-    ],
-    "multiTenant": "false",
-    "portMapping": [
-        {
-            "port": "22",
-            "protocol": "http",
-            "proxyPort": "8280"
-        }
-    ],
-    "property": [
-        {
-            "name": "payload_parameter.MB_IP",
-            "value": "octl.qmog.cisco.com"
-        },
-        {
-            "name": "payload_parameter.MB_PORT",
-            "value": "61616"
-        },
-        {
-            "name": "payload_parameter.CEP_IP",
-            "value": "octl.qmog.cisco.com"
-        },
-        {
-            "name": "payload_parameter.CEP_PORT",
-            "value": "7611"
-        },
-        {
-            "name": "payload_parameter.CEP_ADMIN_USERNAME",
-            "value": "admin"
-        },
-        {
-            "name": "payload_parameter.CEP_ADMIN_PASSWORD",
-            "value": "admin"
-        },
-        {
-            "name": "payload_parameter.CERT_TRUSTSTORE",
-            "value": "/opt/apache-stratos-cartridge-agent/security/client-truststore.jks"
-        },
-        {
-            "name": "payload_parameter.TRUSTSTORE_PASSWORD",
-            "value": "wso2carbon"
-        },
-        {
-            "name": "payload_parameter.ENABLE_DATA_PUBLISHER",
-            "value": "false"
-        },
-        {
-            "name": "payload_parameter.MONITORING_SERVER_IP",
-            "value": "octl.qmog.cisco.com"
-        },
-        {
-            "name": "payload_parameter.MONITORING_SERVER_PORT",
-            "value": "7611"
-        },
-        {
-            "name": "payload_parameter.MONITORING_SERVER_SECURE_PORT",
-            "value": "7711"
-        },
-        {
-            "name": "payload_parameter.MONITORING_SERVER_ADMIN_USERNAME",
-            "value": "admin"
-        },
-        {
-            "name": "payload_parameter.MONITORING_SERVER_ADMIN_PASSWORD",
-            "value": "admin"
-        },
-        {
-            "name": "payload_parameter.QTCM_DNS_SEGMENT",
-            "value": "test"
-        },
-        {
-            "name": "payload_parameter.QTCM_NETWORK_COUNT",
-            "value": "1"
-        },
-        {
-            "name": "payload_parameter.SIMPLE_PROPERTY",
-            "value": "value"
-        }
-    ],
-    "provider": "cisco",
-    "type": "c1-cartridge-test",
-    "version": "1.0"
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/cartridge-test/cartridges/mock/c2-cartridge-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/cartridge-test/cartridges/mock/c2-cartridge-test.json b/products/stratos/modules/integration/src/test/resources/cartridge-test/cartridges/mock/c2-cartridge-test.json
deleted file mode 100755
index ce821f1..0000000
--- a/products/stratos/modules/integration/src/test/resources/cartridge-test/cartridges/mock/c2-cartridge-test.json
+++ /dev/null
@@ -1,124 +0,0 @@
-{
-    "category": "Application",
-    "description": "c2-cartridge-test Cartridge",
-    "displayName": "c2-cartridge-test",
-    "host": "qmog.cisco.com",
-    "iaasProvider": [
-        {
-            "imageId": "RegionOne/16e7e35b-0c88-4605-90ce-cbef9e9dde0f",
-            "maxInstanceLimit": "4",
-            "networkInterfaces": [
-                {
-                    "floatingNetworks": [
-                        {
-                            "name": "public",
-                            "networkUuid": "26b4aa2b-06bc-4e4f-a6eb-c19fbc211af6"
-                        }
-                    ],
-                    "name": "core",
-                    "networkUuid": "5e107fbd-4820-47ad-84ea-6f135496f889"
-                }
-            ],
-            "property": [
-                {
-                    "name": "instanceType",
-                    "value": "RegionOne/2cdbd576-8c9b-4c2d-8b1a-0f79dc4fb809"
-                },
-                {
-                    "name": "keyPair",
-                    "value": "phoenix"
-                },
-                {
-                    "name": "autoAssignIp",
-                    "value": "false"
-                },
-                {
-                    "name": "securityGroups",
-                    "value": "default"
-                }
-            ],
-            "type": "mock"
-        }
-    ],
-    "multiTenant": "false",
-    "portMapping": [
-        {
-            "port": "22",
-            "protocol": "http",
-            "proxyPort": "8280"
-        }
-    ],
-    "property": [
-        {
-            "name": "payload_parameter.MB_IP",
-            "value": "octl.qmog.cisco.com"
-        },
-        {
-            "name": "payload_parameter.MB_PORT",
-            "value": "61616"
-        },
-        {
-            "name": "payload_parameter.CEP_IP",
-            "value": "octl.qmog.cisco.com"
-        },
-        {
-            "name": "payload_parameter.CEP_PORT",
-            "value": "7611"
-        },
-        {
-            "name": "payload_parameter.CEP_ADMIN_USERNAME",
-            "value": "admin"
-        },
-        {
-            "name": "payload_parameter.CEP_ADMIN_PASSWORD",
-            "value": "admin"
-        },
-        {
-            "name": "payload_parameter.CERT_TRUSTSTORE",
-            "value": "/opt/apache-stratos-cartridge-agent/security/client-truststore.jks"
-        },
-        {
-            "name": "payload_parameter.TRUSTSTORE_PASSWORD",
-            "value": "wso2carbon"
-        },
-        {
-            "name": "payload_parameter.ENABLE_DATA_PUBLISHER",
-            "value": "false"
-        },
-        {
-            "name": "payload_parameter.MONITORING_SERVER_IP",
-            "value": "octl.qmog.cisco.com"
-        },
-        {
-            "name": "payload_parameter.MONITORING_SERVER_PORT",
-            "value": "7611"
-        },
-        {
-            "name": "payload_parameter.MONITORING_SERVER_SECURE_PORT",
-            "value": "7711"
-        },
-        {
-            "name": "payload_parameter.MONITORING_SERVER_ADMIN_USERNAME",
-            "value": "admin"
-        },
-        {
-            "name": "payload_parameter.MONITORING_SERVER_ADMIN_PASSWORD",
-            "value": "admin"
-        },
-        {
-            "name": "payload_parameter.QTCM_DNS_SEGMENT",
-            "value": "test"
-        },
-        {
-            "name": "payload_parameter.QTCM_NETWORK_COUNT",
-            "value": "1"
-        },
-        {
-            "name": "payload_parameter.SIMPLE_PROPERTY",
-            "value": "value"
-        }
-    ],
-    "provider": "cisco",
-    "type": "c2-cartridge-test",
-    "version": "1.0"
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/common/JMSOutputAdaptor.xml
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/common/JMSOutputAdaptor.xml b/products/stratos/modules/integration/src/test/resources/common/JMSOutputAdaptor.xml
deleted file mode 100755
index a6a2cff..0000000
--- a/products/stratos/modules/integration/src/test/resources/common/JMSOutputAdaptor.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-
-<outputEventAdaptor name="JMSOutputAdaptor" statistics="disable"
-  trace="enable" type="jms" xmlns="http://wso2.org/carbon/eventadaptormanager">
-  <!--property name="java.naming.provider.url">CEP_HOME/repository/conf/jndi.properties</property-->
-  <property name="java.naming.provider.url">tcp://localhost:61617</property>
-  <property name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</property>
-  <property name="transport.jms.ConnectionFactoryJNDIName">TopicConnectionFactory</property>
-  <property name="transport.jms.DestinationType">topic</property>
-</outputEventAdaptor>

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/common/jndi.properties
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/common/jndi.properties b/products/stratos/modules/integration/src/test/resources/common/jndi.properties
deleted file mode 100644
index beefe3c..0000000
--- a/products/stratos/modules/integration/src/test/resources/common/jndi.properties
+++ /dev/null
@@ -1,22 +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.
-#
-
-connectionfactoryName=TopicConnectionFactory
-java.naming.provider.url=tcp://localhost:61617
-java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory


[05/21] stratos git commit: Uplifting automation engine to v4.4.3, dynamically pick ports for integration tests

Posted by ra...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/policies/AutoscalingPolicyTest.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/policies/AutoscalingPolicyTest.java b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/policies/AutoscalingPolicyTest.java
new file mode 100644
index 0000000..de9e2d7
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/policies/AutoscalingPolicyTest.java
@@ -0,0 +1,144 @@
+/*
+ * 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.integration.tests.policies;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.stratos.common.beans.policy.autoscale.AutoscalePolicyBean;
+import org.apache.stratos.integration.common.RestConstants;
+import org.apache.stratos.integration.tests.StratosIntegrationTest;
+import org.testng.annotations.Test;
+
+import static org.testng.AssertJUnit.*;
+
+/**
+ * Test to handle autoscaling policy CRUD operations
+ */
+public class AutoscalingPolicyTest extends StratosIntegrationTest {
+    private static final Log log = LogFactory.getLog(AutoscalingPolicyTest.class);
+    private static final String RESOURCES_PATH = "/autoscaling-policy-test";
+
+    @Test(timeOut = GLOBAL_TEST_TIMEOUT)
+    public void testAutoscalingPolicy() {
+        log.info("-------------------------Started autoscaling policy test case-------------------------");
+        String policyId = "autoscaling-policy-autoscaling-policy-test";
+        try {
+            boolean added = restClientTenant1
+                    .addEntity(RESOURCES_PATH + RestConstants.AUTOSCALING_POLICIES_PATH + "/" + policyId + ".json",
+                            RestConstants.AUTOSCALING_POLICIES, RestConstants.AUTOSCALING_POLICIES_NAME);
+
+            assertEquals(String.format("Autoscaling policy did not added: [autoscaling-policy-id] %s", policyId), added,
+                    true);
+            AutoscalePolicyBean bean = (AutoscalePolicyBean) restClientTenant1.
+                    getEntity(RestConstants.AUTOSCALING_POLICIES, policyId,
+                            AutoscalePolicyBean.class, RestConstants.AUTOSCALING_POLICIES_NAME);
+
+            assertEquals(String.format("[autoscaling-policy-id] %s is not correct", bean.getId()),
+                    bean.getId(), policyId);
+            assertEquals(String.format("[autoscaling-policy-id] %s RIF is not correct", policyId),
+                    bean.getLoadThresholds().getRequestsInFlight().getThreshold(), 35.0, 0.0);
+            assertEquals(String.format("[autoscaling-policy-id] %s Memory is not correct", policyId),
+                    bean.getLoadThresholds().getMemoryConsumption().getThreshold(), 45.0, 0.0);
+            assertEquals(String.format("[autoscaling-policy-id] %s Load is not correct", policyId),
+                    bean.getLoadThresholds().getLoadAverage().getThreshold(), 25.0, 0.0);
+
+            bean = (AutoscalePolicyBean) restClientTenant2.
+                    getEntity(RestConstants.AUTOSCALING_POLICIES, policyId,
+                            AutoscalePolicyBean.class, RestConstants.AUTOSCALING_POLICIES_NAME);
+            assertNull("Auto scale policy exists for other tenant", bean);
+
+            boolean addedTenant2 = restClientTenant2
+                    .addEntity(RESOURCES_PATH + RestConstants.AUTOSCALING_POLICIES_PATH + "/" + policyId + ".json",
+                            RestConstants.AUTOSCALING_POLICIES, RestConstants.AUTOSCALING_POLICIES_NAME);
+
+            assertEquals(String.format("Autoscaling policy did not added: [autoscaling-policy-id] %s", policyId),
+                    addedTenant2, true);
+            bean = (AutoscalePolicyBean) restClientTenant2.
+                    getEntity(RestConstants.AUTOSCALING_POLICIES, policyId,
+                            AutoscalePolicyBean.class, RestConstants.AUTOSCALING_POLICIES_NAME);
+
+            assertEquals(String.format("[autoscaling-policy-id] %s is not correct", bean.getId()),
+                    bean.getId(), policyId);
+            assertEquals(String.format("[autoscaling-policy-id] %s RIF is not correct", policyId),
+                    bean.getLoadThresholds().getRequestsInFlight().getThreshold(), 35.0, 0.0);
+            assertEquals(String.format("[autoscaling-policy-id] %s Memory is not correct", policyId),
+                    bean.getLoadThresholds().getMemoryConsumption().getThreshold(), 45.0, 0.0);
+            assertEquals(String.format("[autoscaling-policy-id] %s Load is not correct", policyId),
+                    bean.getLoadThresholds().getLoadAverage().getThreshold(), 25.0, 0.0);
+
+            boolean updated = restClientTenant1.updateEntity(
+                    RESOURCES_PATH + RestConstants.AUTOSCALING_POLICIES_PATH + "/" + policyId + "-v1.json",
+                    RestConstants.AUTOSCALING_POLICIES, RestConstants.AUTOSCALING_POLICIES_NAME);
+
+            assertEquals(String.format("[autoscaling-policy-id] %s update failed", policyId), updated, true);
+            AutoscalePolicyBean updatedBean = (AutoscalePolicyBean) restClientTenant1.getEntity(
+                    RestConstants.AUTOSCALING_POLICIES, policyId,
+                    AutoscalePolicyBean.class, RestConstants.AUTOSCALING_POLICIES_NAME);
+            assertEquals(String.format("[autoscaling-policy-id] %s RIF is not correct", policyId),
+                    updatedBean.getLoadThresholds().getRequestsInFlight().getThreshold(), 30.0, 0.0);
+            assertEquals(String.format("[autoscaling-policy-id] %s Load is not correct", policyId),
+                    updatedBean.getLoadThresholds().getMemoryConsumption().getThreshold(), 40.0, 0.0);
+            assertEquals(String.format("[autoscaling-policy-id] %s Memory is not correct", policyId),
+                    updatedBean.getLoadThresholds().getLoadAverage().getThreshold(), 20.0, 0.0);
+
+            boolean updatedTenant2 = restClientTenant2.updateEntity(
+                    RESOURCES_PATH + RestConstants.AUTOSCALING_POLICIES_PATH + "/" + policyId + "-v1.json",
+                    RestConstants.AUTOSCALING_POLICIES, RestConstants.AUTOSCALING_POLICIES_NAME);
+
+            assertEquals(String.format("[autoscaling-policy-id] %s update failed", policyId), updatedTenant2, true);
+            AutoscalePolicyBean updatedTenant2Bean = (AutoscalePolicyBean) restClientTenant2.getEntity(
+                    RestConstants.AUTOSCALING_POLICIES, policyId,
+                    AutoscalePolicyBean.class, RestConstants.AUTOSCALING_POLICIES_NAME);
+            assertEquals(String.format("[autoscaling-policy-id] %s RIF is not correct", policyId),
+                    updatedTenant2Bean.getLoadThresholds().getRequestsInFlight().getThreshold(), 30.0, 0.0);
+            assertEquals(String.format("[autoscaling-policy-id] %s Load is not correct", policyId),
+                    updatedTenant2Bean.getLoadThresholds().getMemoryConsumption().getThreshold(), 40.0, 0.0);
+            assertEquals(String.format("[autoscaling-policy-id] %s Memory is not correct", policyId),
+                    updatedTenant2Bean.getLoadThresholds().getLoadAverage().getThreshold(), 20.0, 0.0);
+
+
+            boolean removed = restClientTenant1.removeEntity(RestConstants.AUTOSCALING_POLICIES,
+                    policyId, RestConstants.AUTOSCALING_POLICIES_NAME);
+            assertEquals(String.format("[autoscaling-policy-id] %s couldn't be removed", policyId),
+                    removed, true);
+
+            AutoscalePolicyBean beanRemoved = (AutoscalePolicyBean) restClientTenant1.getEntity(
+                    RestConstants.AUTOSCALING_POLICIES, policyId,
+                    AutoscalePolicyBean.class, RestConstants.AUTOSCALING_POLICIES_NAME);
+            assertEquals(String.format("[autoscaling-policy-id] %s didn't get removed successfully",
+                    policyId), beanRemoved, null);
+
+            beanRemoved = (AutoscalePolicyBean) restClientTenant2.getEntity(
+                    RestConstants.AUTOSCALING_POLICIES, policyId,
+                    AutoscalePolicyBean.class, RestConstants.AUTOSCALING_POLICIES_NAME);
+            assertNotNull("Auto scale policy not exist in other tenant", beanRemoved);
+
+            removed = restClientTenant2.removeEntity(RestConstants.AUTOSCALING_POLICIES,
+                    policyId, RestConstants.AUTOSCALING_POLICIES_NAME);
+            assertEquals(String.format("[autoscaling-policy-id] %s couldn't be removed", policyId),
+                    removed, true);
+
+            log.info("-------------------------Ended autoscaling policy test case---------------------------");
+        }
+        catch (Exception e) {
+            log.error("An error occurred while handling [autoscaling policy] " + policyId, e);
+            assertTrue("An error occurred while handling [autoscaling policy] " + policyId, false);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/policies/DeploymentPolicyTest.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/policies/DeploymentPolicyTest.java b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/policies/DeploymentPolicyTest.java
new file mode 100644
index 0000000..89ee78a
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/policies/DeploymentPolicyTest.java
@@ -0,0 +1,234 @@
+/*
+ * 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.integration.tests.policies;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.stratos.common.beans.partition.NetworkPartitionBean;
+import org.apache.stratos.common.beans.partition.NetworkPartitionReferenceBean;
+import org.apache.stratos.common.beans.partition.PartitionReferenceBean;
+import org.apache.stratos.common.beans.policy.deployment.DeploymentPolicyBean;
+import org.apache.stratos.integration.common.RestConstants;
+import org.apache.stratos.integration.tests.StratosIntegrationTest;
+import org.testng.annotations.Test;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.AssertJUnit.*;
+
+/**
+ * Test to handle Deployment policy CRUD operations
+ */
+public class DeploymentPolicyTest extends StratosIntegrationTest {
+    private static final Log log = LogFactory.getLog(DeploymentPolicyTest.class);
+    private static final String RESOURCES_PATH = "/deployment-policy-test";
+
+    @Test(timeOut = GLOBAL_TEST_TIMEOUT)
+    public void testDeploymentPolicy() {
+        try {
+            String deploymentPolicyId = "deployment-policy-deployment-policy-test";
+            log.info("-------------------------Started deployment policy test case-------------------------");
+
+            boolean addedN1 = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
+                            "network-partition-deployment-policy-test-1" + ".json",
+                    RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
+            assertEquals(addedN1, true);
+
+            boolean addedN2 = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
+                            "network-partition-deployment-policy-test-2" + ".json",
+                    RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
+            assertEquals(addedN2, true);
+
+            boolean addedDep =
+                    restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.DEPLOYMENT_POLICIES_PATH + "/" +
+                                    deploymentPolicyId + ".json",
+                            RestConstants.DEPLOYMENT_POLICIES, RestConstants.DEPLOYMENT_POLICIES_NAME);
+            assertEquals(addedDep, true);
+
+            DeploymentPolicyBean bean = (DeploymentPolicyBean) restClientTenant1.
+                    getEntity(RestConstants.DEPLOYMENT_POLICIES, deploymentPolicyId,
+                            DeploymentPolicyBean.class, RestConstants.DEPLOYMENT_POLICIES_NAME);
+
+            NetworkPartitionReferenceBean nw1 = bean.getNetworkPartitions().get(0);
+            NetworkPartitionReferenceBean nw2 = bean.getNetworkPartitions().get(1);
+            PartitionReferenceBean nw1P1 = nw1.getPartitions().get(0);
+            PartitionReferenceBean nw2P1 = nw2.getPartitions().get(0);
+            PartitionReferenceBean nw2P2 = nw2.getPartitions().get(1);
+
+            assertEquals(bean.getId(), "deployment-policy-deployment-policy-test");
+            assertEquals(bean.getNetworkPartitions().size(), 2);
+            assertEquals(nw1.getId(), "network-partition-deployment-policy-test-1");
+            assertEquals(nw1.getPartitionAlgo(), "one-after-another");
+            assertEquals(nw1.getPartitions().size(), 1);
+            assertEquals(nw1P1.getId(), "partition-1");
+            assertEquals(nw1P1.getPartitionMax(), 20);
+
+            assertEquals(nw2.getId(), "network-partition-deployment-policy-test-2");
+            assertEquals(nw2.getPartitionAlgo(), "round-robin");
+            assertEquals(nw2.getPartitions().size(), 2);
+            assertEquals(nw2P1.getId(),
+                    "network-partition-6-partition-1");
+            assertEquals(nw2P1.getPartitionMax(), 10);
+            assertEquals(nw2P2.getId(),
+                    "network-partition-6-partition-2");
+            assertEquals(nw2P2.getPartitionMax(), 9);
+
+            //update network partition
+            boolean updated =
+                    restClientTenant1.updateEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
+                                    "network-partition-deployment-policy-test-1-v1.json",
+                            RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
+            assertEquals(updated, true);
+
+            //update deployment policy with new partition and max values
+            boolean updatedDep =
+                    restClientTenant1.updateEntity(RESOURCES_PATH + RestConstants.DEPLOYMENT_POLICIES_PATH +
+                                    "/" + deploymentPolicyId + "-v1.json", RestConstants.DEPLOYMENT_POLICIES,
+                            RestConstants.DEPLOYMENT_POLICIES_NAME);
+            assertEquals(updatedDep, true);
+
+            DeploymentPolicyBean updatedBean = (DeploymentPolicyBean) restClientTenant1.
+                    getEntity(RestConstants.DEPLOYMENT_POLICIES, deploymentPolicyId,
+                            DeploymentPolicyBean.class, RestConstants.DEPLOYMENT_POLICIES_NAME);
+
+            nw1 = updatedBean.getNetworkPartitions().get(0);
+            nw2 = updatedBean.getNetworkPartitions().get(1);
+            nw1P1 = nw1.getPartitions().get(0);
+            PartitionReferenceBean nw1P2 = nw1.getPartitions().get(1);
+            nw2P1 = nw2.getPartitions().get(0);
+            nw2P2 = nw2.getPartitions().get(1);
+
+            assertEquals(updatedBean.getId(), "deployment-policy-deployment-policy-test");
+            assertEquals(updatedBean.getNetworkPartitions().size(), 2);
+            assertEquals(nw1.getId(), "network-partition-deployment-policy-test-1");
+            assertEquals(nw1.getPartitionAlgo(), "one-after-another");
+            assertEquals(nw1.getPartitions().size(), 2);
+            assertEquals(nw1P1.getId(), "partition-1");
+            assertEquals(nw1P1.getPartitionMax(), 25);
+            assertEquals(nw1P2.getId(), "partition-2");
+            assertEquals(nw1P2.getPartitionMax(), 20);
+
+            assertEquals(nw2.getId(), "network-partition-deployment-policy-test-2");
+            assertEquals(nw2.getPartitionAlgo(), "round-robin");
+            assertEquals(nw2.getPartitions().size(), 2);
+            assertEquals(nw2P1.getId(),
+                    "network-partition-6-partition-1");
+            assertEquals(nw2P1.getPartitionMax(), 15);
+            assertEquals(nw2P2.getId(),
+                    "network-partition-6-partition-2");
+            assertEquals(nw2P2.getPartitionMax(), 5);
+
+            updatedBean = (DeploymentPolicyBean) restClientTenant2.
+                    getEntity(RestConstants.DEPLOYMENT_POLICIES, deploymentPolicyId,
+                            DeploymentPolicyBean.class, RestConstants.DEPLOYMENT_POLICIES_NAME);
+            assertNull("Deployment policy found in tenant 2", updatedBean);
+
+            addedN1 = restClientTenant2.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
+                            "network-partition-deployment-policy-test-1" + ".json",
+                    RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
+            assertEquals(addedN1, true);
+
+            addedN2 = restClientTenant2.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
+                            "network-partition-deployment-policy-test-2" + ".json",
+                    RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
+            assertEquals(addedN2, true);
+
+            addedDep = restClientTenant2.addEntity(RESOURCES_PATH + RestConstants.DEPLOYMENT_POLICIES_PATH + "/" +
+                            deploymentPolicyId + ".json",
+                    RestConstants.DEPLOYMENT_POLICIES, RestConstants.DEPLOYMENT_POLICIES_NAME);
+            assertEquals(addedDep, true);
+
+            bean = (DeploymentPolicyBean) restClientTenant2.
+                    getEntity(RestConstants.DEPLOYMENT_POLICIES, deploymentPolicyId,
+                            DeploymentPolicyBean.class, RestConstants.DEPLOYMENT_POLICIES_NAME);
+            assertNotNull("Deployment policy not exist in other tenant", bean);
+
+            boolean removedNet = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
+                    "network-partition-deployment-policy-test-1", RestConstants.NETWORK_PARTITIONS_NAME);
+            //Trying to remove the used network partition
+            assertEquals(removedNet, false);
+
+            boolean removedDep = restClientTenant1.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
+                    deploymentPolicyId, RestConstants.DEPLOYMENT_POLICIES_NAME);
+            assertEquals(removedDep, true);
+
+            DeploymentPolicyBean beanRemovedDep = (DeploymentPolicyBean) restClientTenant1.
+                    getEntity(RestConstants.DEPLOYMENT_POLICIES, deploymentPolicyId,
+                            DeploymentPolicyBean.class, RestConstants.DEPLOYMENT_POLICIES_NAME);
+            assertEquals(beanRemovedDep, null);
+
+            boolean removedN1 = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
+                    "network-partition-deployment-policy-test-1", RestConstants.NETWORK_PARTITIONS_NAME);
+            assertEquals(removedN1, true);
+
+            NetworkPartitionBean beanRemovedN1 = (NetworkPartitionBean) restClientTenant1.
+                    getEntity(RestConstants.NETWORK_PARTITIONS, "network-partition-deployment-policy-test-1",
+                            NetworkPartitionBean.class, RestConstants.NETWORK_PARTITIONS_NAME);
+            assertEquals(beanRemovedN1, null);
+
+            boolean removedN2 = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
+                    "network-partition-deployment-policy-test-2", RestConstants.NETWORK_PARTITIONS_NAME);
+            assertEquals(removedN2, true);
+
+            NetworkPartitionBean beanRemovedN2 = (NetworkPartitionBean) restClientTenant1.
+                    getEntity(RestConstants.NETWORK_PARTITIONS, "network-partition-deployment-policy-test-2",
+                            NetworkPartitionBean.class, RestConstants.NETWORK_PARTITIONS_NAME);
+            assertEquals(beanRemovedN2, null);
+
+            bean = (DeploymentPolicyBean) restClientTenant2.
+                    getEntity(RestConstants.DEPLOYMENT_POLICIES, deploymentPolicyId,
+                            DeploymentPolicyBean.class, RestConstants.DEPLOYMENT_POLICIES_NAME);
+            assertNotNull("Deployment policy not exist in other tenant", bean);
+
+            removedDep = restClientTenant2.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
+                    deploymentPolicyId, RestConstants.DEPLOYMENT_POLICIES_NAME);
+            assertEquals(removedDep, true);
+
+            beanRemovedDep = (DeploymentPolicyBean) restClientTenant2.
+                    getEntity(RestConstants.DEPLOYMENT_POLICIES, deploymentPolicyId,
+                            DeploymentPolicyBean.class, RestConstants.DEPLOYMENT_POLICIES_NAME);
+            assertEquals(beanRemovedDep, null);
+
+            removedN1 = restClientTenant2.removeEntity(RestConstants.NETWORK_PARTITIONS,
+                    "network-partition-deployment-policy-test-1", RestConstants.NETWORK_PARTITIONS_NAME);
+            assertEquals(removedN1, true);
+
+            beanRemovedN1 = (NetworkPartitionBean) restClientTenant2.
+                    getEntity(RestConstants.NETWORK_PARTITIONS, "network-partition-deployment-policy-test-1",
+                            NetworkPartitionBean.class, RestConstants.NETWORK_PARTITIONS_NAME);
+            assertEquals(beanRemovedN1, null);
+
+            removedN2 = restClientTenant2.removeEntity(RestConstants.NETWORK_PARTITIONS,
+                    "network-partition-deployment-policy-test-2", RestConstants.NETWORK_PARTITIONS_NAME);
+            assertEquals(removedN2, true);
+
+            beanRemovedN2 = (NetworkPartitionBean) restClientTenant2.
+                    getEntity(RestConstants.NETWORK_PARTITIONS, "network-partition-deployment-policy-test-2",
+                            NetworkPartitionBean.class, RestConstants.NETWORK_PARTITIONS_NAME);
+            assertEquals(beanRemovedN2, null);
+
+            log.info("-------------------------Ended deployment policy test case-------------------------");
+
+        }
+        catch (Exception e) {
+            log.error("An error occurred while handling deployment policy", e);
+            assertTrue("An error occurred while handling deployment policy", false);
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/policies/NetworkPartitionTest.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/policies/NetworkPartitionTest.java b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/policies/NetworkPartitionTest.java
new file mode 100644
index 0000000..c50c61d
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/policies/NetworkPartitionTest.java
@@ -0,0 +1,126 @@
+/*
+ * 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.integration.tests.policies;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.stratos.common.beans.partition.NetworkPartitionBean;
+import org.apache.stratos.common.beans.partition.PartitionBean;
+import org.apache.stratos.integration.common.RestConstants;
+import org.apache.stratos.integration.tests.StratosIntegrationTest;
+import org.testng.annotations.Test;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.AssertJUnit.*;
+
+/**
+ * Test to handle Network partition CRUD operations
+ */
+public class NetworkPartitionTest extends StratosIntegrationTest {
+    private static final Log log = LogFactory.getLog(NetworkPartitionTest.class);
+    private static final String RESOURCES_PATH = "/network-partition-test";
+
+    @Test(timeOut = GLOBAL_TEST_TIMEOUT)
+    public void testNetworkPartition() {
+        try {
+            String networkPartitionId = "network-partition-network-partition-test";
+            log.info("-------------------------Started network partition test case-------------------------");
+
+            boolean added = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
+                            networkPartitionId + ".json",
+                    RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
+
+            assertEquals(added, true);
+            NetworkPartitionBean bean = (NetworkPartitionBean) restClientTenant1.
+                    getEntity(RestConstants.NETWORK_PARTITIONS, networkPartitionId,
+                            NetworkPartitionBean.class, RestConstants.NETWORK_PARTITIONS_NAME);
+
+            PartitionBean p1 = bean.getPartitions().get(0);
+            assertEquals(bean.getId(), "network-partition-network-partition-test");
+            assertEquals(bean.getPartitions().size(), 1);
+            assertEquals(p1.getId(), "partition-1");
+            assertEquals(p1.getProperty().get(0).getName(), "region");
+            assertEquals(p1.getProperty().get(0).getValue(), "default");
+
+            boolean updated =
+                    restClientTenant1.updateEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
+                                    networkPartitionId + "-v1.json",
+                            RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
+
+            assertEquals(updated, true);
+            NetworkPartitionBean updatedBean = (NetworkPartitionBean) restClientTenant1.
+                    getEntity(RestConstants.NETWORK_PARTITIONS, networkPartitionId,
+                            NetworkPartitionBean.class, RestConstants.NETWORK_PARTITIONS_NAME);
+
+            PartitionBean p2 = updatedBean.getPartitions().get(1);
+            assertEquals(updatedBean.getId(), "network-partition-network-partition-test");
+            assertEquals(updatedBean.getPartitions().size(), 2);
+            assertEquals(p2.getId(), "partition-2");
+            assertEquals(p2.getProperty().get(0).getName(), "region");
+            assertEquals(p2.getProperty().get(0).getValue(), "default1");
+            assertEquals(p2.getProperty().get(1).getName(), "zone");
+            assertEquals(p2.getProperty().get(1).getValue(), "z1");
+
+            updatedBean = (NetworkPartitionBean) restClientTenant2.
+                    getEntity(RestConstants.NETWORK_PARTITIONS, networkPartitionId,
+                            NetworkPartitionBean.class, RestConstants.NETWORK_PARTITIONS_NAME);
+            assertNull("Network partition found in tenant 2", updatedBean);
+
+            added = restClientTenant2.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
+                            networkPartitionId + ".json",
+                    RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
+
+            assertEquals(added, true);
+            bean = (NetworkPartitionBean) restClientTenant2.
+                    getEntity(RestConstants.NETWORK_PARTITIONS, networkPartitionId,
+                            NetworkPartitionBean.class, RestConstants.NETWORK_PARTITIONS_NAME);
+            assertNotNull("Network partition not exist in other tenant", bean);
+
+            boolean removed = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
+                    networkPartitionId, RestConstants.NETWORK_PARTITIONS_NAME);
+            assertEquals(removed, true);
+
+            NetworkPartitionBean beanRemoved = (NetworkPartitionBean) restClientTenant1.
+                    getEntity(RestConstants.NETWORK_PARTITIONS, networkPartitionId,
+                            NetworkPartitionBean.class, RestConstants.NETWORK_PARTITIONS_NAME);
+            assertEquals(beanRemoved, null);
+
+            bean = (NetworkPartitionBean) restClientTenant2.
+                    getEntity(RestConstants.NETWORK_PARTITIONS, networkPartitionId,
+                            NetworkPartitionBean.class, RestConstants.NETWORK_PARTITIONS_NAME);
+            assertNotNull("Network partition not exist in other tenant", bean);
+
+            removed = restClientTenant2.removeEntity(RestConstants.NETWORK_PARTITIONS,
+                    networkPartitionId, RestConstants.NETWORK_PARTITIONS_NAME);
+            assertEquals(removed, true);
+
+            beanRemoved = (NetworkPartitionBean) restClientTenant2.
+                    getEntity(RestConstants.NETWORK_PARTITIONS, networkPartitionId,
+                            NetworkPartitionBean.class, RestConstants.NETWORK_PARTITIONS_NAME);
+            assertEquals(beanRemoved, null);
+
+            log.info("-------------------------Ended network partition test case-------------------------");
+        }
+        catch (Exception e) {
+            log.error("An error occurred while handling network partitions", e);
+            assertTrue("An error occurred while handling network partitions", false);
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/users/TenantTest.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/users/TenantTest.java b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/users/TenantTest.java
new file mode 100644
index 0000000..494e3fc
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/users/TenantTest.java
@@ -0,0 +1,42 @@
+/*
+ * 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.integration.tests.users;
+
+import org.apache.stratos.integration.common.RestConstants;
+import org.apache.stratos.integration.tests.StratosIntegrationTest;
+import org.testng.annotations.Test;
+
+import static junit.framework.Assert.assertTrue;
+
+/**
+ * Handling users
+ */
+public class TenantTest extends StratosIntegrationTest {
+    private static final String RESOURCES_PATH = "/user-test";
+
+    @Test(timeOut = GLOBAL_TEST_TIMEOUT)
+    public void addUser() {
+        String tenantId = "tenant-1";
+        boolean addedUser1 = restClientAdmin.addEntity(RESOURCES_PATH + "/" +
+                        tenantId + ".json",
+                RestConstants.USERS, RestConstants.USERS_NAME);
+        assertTrue(addedUser1);
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/users/UserTest.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/users/UserTest.java b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/users/UserTest.java
new file mode 100644
index 0000000..d073699
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/users/UserTest.java
@@ -0,0 +1,114 @@
+/*
+ * 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.integration.tests.users;
+
+import com.google.gson.reflect.TypeToken;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.stratos.common.beans.UserInfoBean;
+import org.apache.stratos.integration.common.RestConstants;
+import org.apache.stratos.integration.tests.StratosIntegrationTest;
+import org.testng.annotations.Test;
+
+import java.lang.reflect.Type;
+import java.util.ArrayList;
+import java.util.List;
+
+import static org.testng.Assert.assertNull;
+import static org.testng.AssertJUnit.assertNotNull;
+import static org.testng.AssertJUnit.assertTrue;
+
+/**
+ * Handling users
+ */
+public class UserTest extends StratosIntegrationTest {
+    private static final Log log = LogFactory.getLog(UserTest.class);
+    private static final String RESOURCES_PATH = "/user-test";
+
+    @Test(timeOut = GLOBAL_TEST_TIMEOUT)
+    public void addUser() {
+        try {
+            log.info("-------------------------------Started users test case-------------------------------");
+            String userId = "user-1";
+            boolean addedUser1 = restClientAdmin.addEntity(RESOURCES_PATH + "/" +
+                            userId + ".json",
+                    RestConstants.USERS, RestConstants.USERS_NAME);
+            assertTrue(addedUser1);
+
+            Type listType = new TypeToken<ArrayList<UserInfoBean>>() {
+            }.getType();
+
+            List<UserInfoBean> userInfoBeanList = (List<UserInfoBean>) restClientAdmin.listEntity(RestConstants.USERS,
+                    listType, RestConstants.USERS_NAME);
+
+            UserInfoBean bean1 = null;
+            for (UserInfoBean userInfoBean : userInfoBeanList) {
+                if (userInfoBean.getUserName().equals(userId)) {
+                    bean1 = userInfoBean;
+                }
+            }
+            assertNotNull(bean1);
+            /*assertEquals(bean1.getEmail(), "foo@bar.com");
+            assertEquals(bean1.getFirstName(), "Frank");
+            assertEquals(bean1.getRole(), "admin");
+            assertEquals(bean1.getLastName(), "Myers");
+            assertEquals(bean1.getCredential(), "kim12345");*/
+
+            boolean updatedUser1 = restClientAdmin.updateEntity(RESOURCES_PATH + "/" +
+                            userId + "-v1.json",
+                    RestConstants.USERS, RestConstants.USERS_NAME);
+            assertTrue(updatedUser1);
+
+            userInfoBeanList = (List<UserInfoBean>) restClientAdmin.listEntity(RestConstants.USERS,
+                    listType, RestConstants.USERS_NAME);
+
+            for (UserInfoBean userInfoBean : userInfoBeanList) {
+                if (userInfoBean.getUserName().equals(userId)) {
+                    bean1 = userInfoBean;
+                }
+            }
+            assertNotNull(bean1);
+            /*assertEquals(bean1.getEmail(), "user-1@bar.com");
+            assertEquals(bean1.getFirstName(), "Frankn");
+            assertEquals(bean1.getRole(), "admin");
+            assertEquals(bean1.getLastName(), "Myersn");
+            assertEquals(bean1.getCredential(), "kim123456");*/
+
+            boolean removedUser1 = restClientAdmin.removeEntity(RestConstants.USERS,
+                    userId, RestConstants.USERS_NAME);
+            assertTrue(removedUser1);
+
+            userInfoBeanList = (List<UserInfoBean>) restClientAdmin.listEntity(RestConstants.USERS,
+                    listType, RestConstants.USERS_NAME);
+
+            bean1 = null;
+            for (UserInfoBean userInfoBean : userInfoBeanList) {
+                if (userInfoBean.getUserName().equals(userId)) {
+                    bean1 = userInfoBean;
+                }
+            }
+            assertNull(bean1);
+            log.info("-------------------------Ended users test case-------------------------");
+        }
+        catch (Exception e) {
+            log.error("An error occurred while handling  application bursting", e);
+            assertTrue("An error occurred while handling  application bursting", false);
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/application-bursting-test/application-policies/application-policy-application-bursting-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/application-bursting-test/application-policies/application-policy-application-bursting-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/application-bursting-test/application-policies/application-policy-application-bursting-test.json
new file mode 100644
index 0000000..4d1d35f
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/application-bursting-test/application-policies/application-policy-application-bursting-test.json
@@ -0,0 +1,18 @@
+{
+    "id": "application-policy-application-bursting-test",
+    "algorithm": "one-after-another",
+    "networkPartitions": [
+        "network-partition-application-bursting-test-1",
+        "network-partition-application-bursting-test-2"
+    ],
+    "properties": [
+        {
+            "name": "networkPartitionGroups",
+            "value": "network-partition-application-bursting-test-1|network-partition-application-bursting-test-2"
+        },
+        {
+            "name": "key-2",
+            "value": "value-2"
+        }
+    ]
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/application-bursting-test/applications/app-bursting-single-cartriddge-group.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/application-bursting-test/applications/app-bursting-single-cartriddge-group.json b/products/stratos/modules/integration/test-integration/src/test/resources/application-bursting-test/applications/app-bursting-single-cartriddge-group.json
new file mode 100644
index 0000000..c091ec5
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/application-bursting-test/applications/app-bursting-single-cartriddge-group.json
@@ -0,0 +1,70 @@
+{
+    "applicationId": "application-bursting-test",
+    "alias": "my-cartridge-group-app",
+    "components": {
+        "groups": [
+            {
+                "name": "esb-php-group-application-bursting-test",
+                "alias": "my-esb-php-group-application-bursting-test",
+                "deploymentPolicy": "deployment-policy-application-bursting-test",
+                "groupMinInstances": 1,
+                "groupMaxInstances": 2,
+                "cartridges": [
+                    {
+                        "type": "esb-application-bursting-test",
+                        "cartridgeMin": 1,
+                        "cartridgeMax": 2,
+                        "subscribableInfo": {
+                            "alias": "my-esb-application-bursting-test",
+                            "autoscalingPolicy": "autoscaling-policy-application-bursting-test",
+                            "artifactRepository": {
+                                "privateRepo": false,
+                                "repoUrl": "https://github.com/imesh/stratos-esb-applications.git",
+                                "repoUsername": "",
+                                "repoPassword": ""
+                            }
+                        }
+                    },
+                    {
+                        "type": "php-application-bursting-test",
+                        "cartridgeMin": 2,
+                        "cartridgeMax": 4,
+                        "lvsVirtualIP": "192.168.56.50|255.255.255.0",
+                        "subscribableInfo": {
+                            "alias": "my-php-application-bursting-test",
+                            "autoscalingPolicy": "autoscaling-policy-application-bursting-test",
+                            "artifactRepository": {
+                                "privateRepo": false,
+                                "repoUrl": "https://github.com/imesh/stratos-php-applications.git",
+                                "repoUsername": "",
+                                "repoPassword": ""
+                            }
+                        }
+                    }
+                ]
+            }
+        ],
+        "cartridges": [
+            {
+                "type": "tomcat-application-bursting-test",
+                "cartridgeMin": 2,
+                "cartridgeMax": 4,
+                "subscribableInfo": {
+                    "alias": "my-tomcat-application-bursting-test",
+                    "autoscalingPolicy": "autoscaling-policy-application-bursting-test",
+                    "deploymentPolicy": "deployment-policy-application-bursting-test",
+                    "artifactRepository": {
+                        "privateRepo": false,
+                        "repoUrl": "https://github.com/imesh/stratos-tomcat-applications.git",
+                        "repoUsername": "",
+                        "repoPassword": ""
+                    }
+                }
+            }
+        ],
+        "dependencies": {
+            "terminationBehaviour": "terminate-none"
+        }
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/application-bursting-test/autoscaling-policies/autoscaling-policy-application-bursting-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/application-bursting-test/autoscaling-policies/autoscaling-policy-application-bursting-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/application-bursting-test/autoscaling-policies/autoscaling-policy-application-bursting-test.json
new file mode 100644
index 0000000..697cb70
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/application-bursting-test/autoscaling-policies/autoscaling-policy-application-bursting-test.json
@@ -0,0 +1,14 @@
+{
+    "id": "autoscaling-policy-application-bursting-test",
+    "loadThresholds": {
+        "requestsInFlight": {
+            "threshold": 35
+        },
+        "memoryConsumption": {
+            "threshold": 45
+        },
+        "loadAverage": {
+            "threshold": 25
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/application-bursting-test/cartridges-groups/esb-php-group-application-bursting-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/application-bursting-test/cartridges-groups/esb-php-group-application-bursting-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/application-bursting-test/cartridges-groups/esb-php-group-application-bursting-test.json
new file mode 100644
index 0000000..8fbab89
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/application-bursting-test/cartridges-groups/esb-php-group-application-bursting-test.json
@@ -0,0 +1,19 @@
+{
+    "name": "esb-php-group-application-bursting-test",
+    "cartridges": [
+        "esb-application-bursting-test",
+        "php-application-bursting-test"
+    ],
+    "dependencies": {
+        "startupOrders": [
+            {
+                "aliases": [
+                    "cartridge.my-esb-application-bursting-test",
+                    "cartridge.my-php-application-bursting-test"
+                ]
+            }
+        ],
+        "terminationBehaviour": "terminate-none"
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/application-bursting-test/cartridges/mock/esb-application-bursting-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/application-bursting-test/cartridges/mock/esb-application-bursting-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/application-bursting-test/cartridges/mock/esb-application-bursting-test.json
new file mode 100755
index 0000000..d97f9ff
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/application-bursting-test/cartridges/mock/esb-application-bursting-test.json
@@ -0,0 +1,50 @@
+{
+    "type": "esb-application-bursting-test",
+    "provider": "apache",
+    "host": "stratos.apache.org",
+    "category": "framework",
+    "displayName": "esb-application-bursting-test",
+    "description": "esb-application-bursting-test Cartridge",
+    "version": "7",
+    "multiTenant": "false",
+    "portMapping": [
+        {
+            "name": "http-22",
+            "protocol": "http",
+            "port": "22",
+            "proxyPort": "8280"
+        }
+    ],
+    "deployment": {
+    },
+    "iaasProvider": [
+        {
+            "type": "mock",
+            "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
+            "networkInterfaces": [
+                {
+                    "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e"
+                }
+            ],
+            "property": [
+                {
+                    "name": "instanceType",
+                    "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594"
+                },
+                {
+                    "name": "keyPair",
+                    "value": "vishanth-key"
+                },
+                {
+                    "name": "securityGroups",
+                    "value": "default"
+                }
+            ]
+        }
+    ],
+    "metadataKeys": [
+        "server_ip",
+        "username",
+        "password"
+    ]
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/application-bursting-test/cartridges/mock/php-application-bursting-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/application-bursting-test/cartridges/mock/php-application-bursting-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/application-bursting-test/cartridges/mock/php-application-bursting-test.json
new file mode 100755
index 0000000..02d0d9d
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/application-bursting-test/cartridges/mock/php-application-bursting-test.json
@@ -0,0 +1,51 @@
+{
+    "type": "php-application-bursting-test",
+    "provider": "apache",
+    "category": "framework",
+    "host": "php.stratos.org",
+    "displayName": "php-application-bursting-test",
+    "description": "php-application-bursting-test Cartridge",
+    "version": "7",
+    "multiTenant": "false",
+    "portMapping": [
+        {
+            "name": "http-80",
+            "protocol": "http",
+            "port": "8080",
+            "proxyPort": "8280"
+        },
+        {
+            "name": "http-22",
+            "protocol": "tcp",
+            "port": "22",
+            "proxyPort": "8222"
+        }
+    ],
+    "deployment": {
+    },
+    "iaasProvider": [
+        {
+            "type": "mock",
+            "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
+            "networkInterfaces": [
+                {
+                    "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e"
+                }
+            ],
+            "property": [
+                {
+                    "name": "instanceType",
+                    "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594"
+                },
+                {
+                    "name": "keyPair",
+                    "value": "reka"
+                },
+                {
+                    "name": "securityGroups",
+                    "value": "default"
+                }
+            ]
+        }
+    ]
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/application-bursting-test/cartridges/mock/tomcat-application-bursting-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/application-bursting-test/cartridges/mock/tomcat-application-bursting-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/application-bursting-test/cartridges/mock/tomcat-application-bursting-test.json
new file mode 100755
index 0000000..b63d568
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/application-bursting-test/cartridges/mock/tomcat-application-bursting-test.json
@@ -0,0 +1,53 @@
+{
+    "type": "tomcat-application-bursting-test",
+    "provider": "apache",
+    "host": "tomcat.stratos.org",
+    "category": "framework",
+    "displayName": "tomcat-application-bursting-test",
+    "description": "tomcat-application-bursting-test Cartridge",
+    "version": "7",
+    "multiTenant": "false",
+    "portMapping": [
+        {
+            "name": "http-22",
+            "protocol": "http",
+            "port": "22",
+            "proxyPort": "8280"
+        },
+        {
+            "protocol": "http",
+            "port": "8080",
+            "proxyPort": "80"
+        }
+    ],
+    "deployment": {
+    },
+    "iaasProvider": [
+        {
+            "type": "mock",
+            "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
+            "networkInterfaces": [
+                {
+                    "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e"
+                }
+            ],
+            "property": [
+                {
+                    "name": "instanceType",
+                    "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594"
+                },
+                {
+                    "name": "keyPair",
+                    "value": "vishanth-key"
+                },
+                {
+                    "name": "securityGroups",
+                    "value": "default"
+                }
+            ]
+        }
+    ],
+    "metadataKeys": [
+        "url"
+    ]
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/application-bursting-test/deployment-policies/deployment-policy-application-bursting-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/application-bursting-test/deployment-policies/deployment-policy-application-bursting-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/application-bursting-test/deployment-policies/deployment-policy-application-bursting-test.json
new file mode 100644
index 0000000..4adc0f2
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/application-bursting-test/deployment-policies/deployment-policy-application-bursting-test.json
@@ -0,0 +1,32 @@
+{
+    "id": "deployment-policy-application-bursting-test",
+    "networkPartitions": [
+        {
+            "id": "network-partition-application-bursting-test-1",
+            "partitionAlgo": "one-after-another",
+            "partitions": [
+                {
+                    "id": "partition-1",
+                    "partitionMax": 4
+                }
+            ]
+        },
+        {
+            "id": "network-partition-application-bursting-test-2",
+            "partitionAlgo": "round-robin",
+            "partitions": [
+                {
+                    "id": "network-partition-10-partition-1",
+                    "partitionMax": 4
+                },
+                {
+                    "id": "network-partition-10-partition-2",
+                    "partitionMax": 4
+                }
+            ]
+        }
+    ]
+}
+
+
+

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/application-bursting-test/network-partitions/mock/network-partition-application-bursting-test-1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/application-bursting-test/network-partitions/mock/network-partition-application-bursting-test-1.json b/products/stratos/modules/integration/test-integration/src/test/resources/application-bursting-test/network-partitions/mock/network-partition-application-bursting-test-1.json
new file mode 100644
index 0000000..78f7d01
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/application-bursting-test/network-partitions/mock/network-partition-application-bursting-test-1.json
@@ -0,0 +1,15 @@
+{
+    "id": "network-partition-application-bursting-test-1",
+    "provider": "mock",
+    "partitions": [
+        {
+            "id": "partition-1",
+            "property": [
+                {
+                    "name": "region",
+                    "value": "default"
+                }
+            ]
+        }
+    ]
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/application-bursting-test/network-partitions/mock/network-partition-application-bursting-test-2.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/application-bursting-test/network-partitions/mock/network-partition-application-bursting-test-2.json b/products/stratos/modules/integration/test-integration/src/test/resources/application-bursting-test/network-partitions/mock/network-partition-application-bursting-test-2.json
new file mode 100644
index 0000000..588bfff
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/application-bursting-test/network-partitions/mock/network-partition-application-bursting-test-2.json
@@ -0,0 +1,24 @@
+{
+    "id": "network-partition-application-bursting-test-2",
+    "provider": "mock",
+    "partitions": [
+        {
+            "id": "network-partition-10-partition-1",
+            "property": [
+                {
+                    "name": "region",
+                    "value": "default"
+                }
+            ]
+        },
+        {
+            "id": "network-partition-10-partition-2",
+            "property": [
+                {
+                    "name": "region",
+                    "value": "default"
+                }
+            ]
+        }
+    ]
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/application-policy-test/application-policies/application-policy-application-policy-test-1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/application-policy-test/application-policies/application-policy-application-policy-test-1.json b/products/stratos/modules/integration/test-integration/src/test/resources/application-policy-test/application-policies/application-policy-application-policy-test-1.json
new file mode 100644
index 0000000..da3e8ef
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/application-policy-test/application-policies/application-policy-application-policy-test-1.json
@@ -0,0 +1,18 @@
+{
+    "id": "application-policy-application-policy-test-1",
+    "algorithm": "one-after-another",
+    "networkPartitions": [
+        "network-partition-application-policy-test-1",
+        "network-partition-application-policy-test-2"
+    ],
+    "properties": [
+        {
+            "name": "networkPartitionGroups",
+            "value": "network-partition-application-policy-test-1,network-partition-application-policy-test-2"
+        },
+        {
+            "name": "key-2",
+            "value": "value-2"
+        }
+    ]
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/application-policy-test/application-policies/application-policy-application-policy-test-2.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/application-policy-test/application-policies/application-policy-application-policy-test-2.json b/products/stratos/modules/integration/test-integration/src/test/resources/application-policy-test/application-policies/application-policy-application-policy-test-2.json
new file mode 100644
index 0000000..ec3715c
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/application-policy-test/application-policies/application-policy-application-policy-test-2.json
@@ -0,0 +1,18 @@
+{
+    "id": "application-policy-application-policy-test-2",
+    "algorithm": "one-after-another",
+    "networkPartitions": [
+        "network-partition-application-policy-test-1",
+        "network-partition-application-policy-test-2"
+    ],
+    "properties": [
+        {
+            "name": "networkPartitionGroups",
+            "value": "network-partition-application-policy-test-1,network-partition-application-policy-test-2"
+        },
+        {
+            "name": "key-2",
+            "value": "value-2"
+        }
+    ]
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/application-policy-test/application-policies/application-policy-application-policy-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/application-policy-test/application-policies/application-policy-application-policy-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/application-policy-test/application-policies/application-policy-application-policy-test.json
new file mode 100644
index 0000000..cf1aace
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/application-policy-test/application-policies/application-policy-application-policy-test.json
@@ -0,0 +1,18 @@
+{
+    "id": "application-policy-application-policy-test",
+    "algorithm": "one-after-another",
+    "networkPartitions": [
+        "network-partition-application-policy-test-1",
+        "network-partition-application-policy-test-2"
+    ],
+    "properties": [
+        {
+            "name": "networkPartitionGroups",
+            "value": "network-partition-application-policy-test-1,network-partition-application-policy-test-2"
+        },
+        {
+            "name": "key-2",
+            "value": "value-2"
+        }
+    ]
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/application-policy-test/network-partitions/mock/network-partition-application-policy-test-1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/application-policy-test/network-partitions/mock/network-partition-application-policy-test-1.json b/products/stratos/modules/integration/test-integration/src/test/resources/application-policy-test/network-partitions/mock/network-partition-application-policy-test-1.json
new file mode 100644
index 0000000..79a9024
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/application-policy-test/network-partitions/mock/network-partition-application-policy-test-1.json
@@ -0,0 +1,24 @@
+{
+    "id": "network-partition-application-policy-test-1",
+    "provider": "mock",
+    "partitions": [
+        {
+            "id": "network-partition-8-partition-1",
+            "property": [
+                {
+                    "name": "region",
+                    "value": "default"
+                }
+            ]
+        },
+        {
+            "id": "network-partition-8-partition-2",
+            "property": [
+                {
+                    "name": "region",
+                    "value": "default"
+                }
+            ]
+        }
+    ]
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/application-policy-test/network-partitions/mock/network-partition-application-policy-test-2.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/application-policy-test/network-partitions/mock/network-partition-application-policy-test-2.json b/products/stratos/modules/integration/test-integration/src/test/resources/application-policy-test/network-partitions/mock/network-partition-application-policy-test-2.json
new file mode 100644
index 0000000..a802378
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/application-policy-test/network-partitions/mock/network-partition-application-policy-test-2.json
@@ -0,0 +1,15 @@
+{
+    "id": "network-partition-application-policy-test-2",
+    "provider": "mock",
+    "partitions": [
+        {
+            "id": "partition-1",
+            "property": [
+                {
+                    "name": "region",
+                    "value": "default"
+                }
+            ]
+        }
+    ]
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/application-update-test/application-policies/application-policy-application-update-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/application-update-test/application-policies/application-policy-application-update-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/application-update-test/application-policies/application-policy-application-update-test.json
new file mode 100644
index 0000000..1b29165
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/application-update-test/application-policies/application-policy-application-update-test.json
@@ -0,0 +1,18 @@
+{
+    "id": "application-policy-application-update-test",
+    "algorithm": "one-after-another",
+    "networkPartitions": [
+        "network-partition-application-update-test-1",
+        "network-partition-application-update-test-2"
+    ],
+    "properties": [
+        {
+            "name": "networkPartitionGroups",
+            "value": "network-partition-application-update-test-1,network-partition-application-update-test-2"
+        },
+        {
+            "name": "key-2",
+            "value": "value-2"
+        }
+    ]
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/application-update-test/applications/g-sc-G123-1-application-update-test-v1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/application-update-test/applications/g-sc-G123-1-application-update-test-v1.json b/products/stratos/modules/integration/test-integration/src/test/resources/application-update-test/applications/g-sc-G123-1-application-update-test-v1.json
new file mode 100644
index 0000000..2509ab1
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/application-update-test/applications/g-sc-G123-1-application-update-test-v1.json
@@ -0,0 +1,86 @@
+{
+    "alias": "g-sc-G123-1-application-update-test",
+    "applicationId": "g-sc-G123-1-application-update-test",
+    "components": {
+        "cartridges": [],
+        "groups": [
+            {
+                "name": "G1-application-update-test",
+                "groupMaxInstances": 1,
+                "groupMinInstances": 1,
+                "alias": "group1-application-update-test",
+                "cartridges": [
+                    {
+                        "cartridgeMin": 2,
+                        "cartridgeMax": 3,
+                        "type": "c1-application-update-test",
+                        "subscribableInfo": {
+                            "alias": "c1-1x0-application-update-test",
+                            "deploymentPolicy": "deployment-policy-application-update-test",
+                            "artifactRepository": {
+                                "repoUsername": "user",
+                                "repoUrl": "http://stratos.apache.org:10080/git/default.git",
+                                "privateRepo": true,
+                                "repoPassword": "c-policy"
+                            },
+                            "autoscalingPolicy": "autoscaling-policy-application-update-test"
+                        }
+                    }
+                ],
+                "groups": [
+                    {
+                        "name": "G2-application-update-test",
+                        "groupMaxInstances": 1,
+                        "groupMinInstances": 1,
+                        "alias": "group2-application-update-test",
+                        "cartridges": [
+                            {
+                                "cartridgeMin": 2,
+                                "cartridgeMax": 4,
+                                "type": "c2-application-update-test",
+                                "subscribableInfo": {
+                                    "alias": "c2-1x0-application-update-test",
+                                    "deploymentPolicy": "deployment-policy-application-update-test",
+                                    "artifactRepository": {
+                                        "repoUsername": "user",
+                                        "repoUrl": "http://stratos.apache.org:10080/git/default.git",
+                                        "privateRepo": true,
+                                        "repoPassword": "c-policy"
+                                    },
+                                    "autoscalingPolicy": "autoscaling-policy-application-update-test"
+                                }
+                            }
+                        ],
+                        "groups": [
+                            {
+                                "name": "G3-application-update-test",
+                                "groupMaxInstances": 3,
+                                "groupMinInstances": 2,
+                                "deploymentPolicy": "deployment-policy-application-update-test",
+                                "alias": "group3-application-update-test",
+                                "cartridges": [
+                                    {
+                                        "cartridgeMin": 2,
+                                        "cartridgeMax": 3,
+                                        "type": "c3-application-update-test",
+                                        "subscribableInfo": {
+                                            "alias": "c3-1x0-application-update-test",
+                                            "artifactRepository": {
+                                                "repoUsername": "user",
+                                                "repoUrl": "http://stratos.apache.org:10080/git/default.git",
+                                                "privateRepo": true,
+                                                "repoPassword": "c-policy"
+                                            },
+                                            "autoscalingPolicy": "autoscaling-policy-application-update-test"
+                                        }
+                                    }
+                                ],
+                                "groups": []
+                            }
+                        ]
+                    }
+                ]
+            }
+        ]
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/application-update-test/applications/g-sc-G123-1-application-update-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/application-update-test/applications/g-sc-G123-1-application-update-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/application-update-test/applications/g-sc-G123-1-application-update-test.json
new file mode 100644
index 0000000..548e66c
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/application-update-test/applications/g-sc-G123-1-application-update-test.json
@@ -0,0 +1,86 @@
+{
+    "alias": "g-sc-G123-1-application-update-test",
+    "applicationId": "g-sc-G123-1-application-update-test",
+    "components": {
+        "cartridges": [],
+        "groups": [
+            {
+                "name": "G1-application-update-test",
+                "groupMaxInstances": 1,
+                "groupMinInstances": 1,
+                "alias": "group1-application-update-test",
+                "cartridges": [
+                    {
+                        "cartridgeMin": 1,
+                        "cartridgeMax": 2,
+                        "type": "c1-application-update-test",
+                        "subscribableInfo": {
+                            "alias": "c1-1x0-application-update-test",
+                            "deploymentPolicy": "deployment-policy-application-update-test",
+                            "artifactRepository": {
+                                "repoUsername": "user",
+                                "repoUrl": "http://stratos.apache.org:10080/git/default.git",
+                                "privateRepo": true,
+                                "repoPassword": "c-policy"
+                            },
+                            "autoscalingPolicy": "autoscaling-policy-application-update-test"
+                        }
+                    }
+                ],
+                "groups": [
+                    {
+                        "name": "G2-application-update-test",
+                        "groupMaxInstances": 1,
+                        "groupMinInstances": 1,
+                        "alias": "group2-application-update-test",
+                        "cartridges": [
+                            {
+                                "cartridgeMin": 1,
+                                "cartridgeMax": 2,
+                                "type": "c2-application-update-test",
+                                "subscribableInfo": {
+                                    "alias": "c2-1x0-application-update-test",
+                                    "deploymentPolicy": "deployment-policy-application-update-test",
+                                    "artifactRepository": {
+                                        "repoUsername": "user",
+                                        "repoUrl": "http://stratos.apache.org:10080/git/default.git",
+                                        "privateRepo": true,
+                                        "repoPassword": "c-policy"
+                                    },
+                                    "autoscalingPolicy": "autoscaling-policy-application-update-test"
+                                }
+                            }
+                        ],
+                        "groups": [
+                            {
+                                "name": "G3-application-update-test",
+                                "groupMaxInstances": 2,
+                                "groupMinInstances": 1,
+                                "deploymentPolicy": "deployment-policy-application-update-test",
+                                "alias": "group3-application-update-test",
+                                "cartridges": [
+                                    {
+                                        "cartridgeMin": 1,
+                                        "cartridgeMax": 2,
+                                        "type": "c3-application-update-test",
+                                        "subscribableInfo": {
+                                            "alias": "c3-1x0-application-update-test",
+                                            "artifactRepository": {
+                                                "repoUsername": "user",
+                                                "repoUrl": "http://stratos.apache.org:10080/git/default.git",
+                                                "privateRepo": true,
+                                                "repoPassword": "c-policy"
+                                            },
+                                            "autoscalingPolicy": "autoscaling-policy-application-update-test"
+                                        }
+                                    }
+                                ],
+                                "groups": []
+                            }
+                        ]
+                    }
+                ]
+            }
+        ]
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/application-update-test/autoscaling-policies/autoscaling-policy-application-update-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/application-update-test/autoscaling-policies/autoscaling-policy-application-update-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/application-update-test/autoscaling-policies/autoscaling-policy-application-update-test.json
new file mode 100644
index 0000000..8d9b766
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/application-update-test/autoscaling-policies/autoscaling-policy-application-update-test.json
@@ -0,0 +1,14 @@
+{
+    "id": "autoscaling-policy-application-update-test",
+    "loadThresholds": {
+        "requestsInFlight": {
+            "threshold": 35
+        },
+        "memoryConsumption": {
+            "threshold": 45
+        },
+        "loadAverage": {
+            "threshold": 25
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/application-update-test/cartridges-groups/cartrdige-nested-application-update-test-v1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/application-update-test/cartridges-groups/cartrdige-nested-application-update-test-v1.json b/products/stratos/modules/integration/test-integration/src/test/resources/application-update-test/cartridges-groups/cartrdige-nested-application-update-test-v1.json
new file mode 100644
index 0000000..884ea0c
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/application-update-test/cartridges-groups/cartrdige-nested-application-update-test-v1.json
@@ -0,0 +1,50 @@
+{
+    "name": "G1-application-update-test",
+    "dependencies": {
+        "terminationBehaviour": "terminate-none",
+        "startupOrders": [
+            {
+                "aliases": [
+                    "group.group2-application-update-test",
+                    "cartridge.c1-1x0-application-update-test"
+                ]
+            }
+        ]
+    },
+    "cartridges": [
+        "c1-application-update-test"
+    ],
+    "groups": [
+        {
+            "name": "G2-application-update-test",
+            "dependencies": {
+                "terminationBehaviour": "terminate-dependents",
+                "startupOrders": [
+                    {
+                        "aliases": [
+                            "group.group3-application-update-test",
+                            "cartridge.c2-1x0-application-update-test"
+                        ]
+                    }
+                ]
+            },
+            "cartridges": [
+                "c2-application-update-test"
+            ],
+            "groups": [
+                {
+                    "name": "G3-application-update-test",
+                    "dependencies": {
+                        "terminationBehaviour": "terminate-all",
+                        "startupOrders": []
+                    },
+                    "cartridges": [
+                        "c3-application-update-test"
+                    ],
+                    "groups": []
+                }
+            ]
+        }
+    ]
+}
+

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/application-update-test/cartridges-groups/cartrdige-nested-application-update-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/application-update-test/cartridges-groups/cartrdige-nested-application-update-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/application-update-test/cartridges-groups/cartrdige-nested-application-update-test.json
new file mode 100644
index 0000000..884ea0c
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/application-update-test/cartridges-groups/cartrdige-nested-application-update-test.json
@@ -0,0 +1,50 @@
+{
+    "name": "G1-application-update-test",
+    "dependencies": {
+        "terminationBehaviour": "terminate-none",
+        "startupOrders": [
+            {
+                "aliases": [
+                    "group.group2-application-update-test",
+                    "cartridge.c1-1x0-application-update-test"
+                ]
+            }
+        ]
+    },
+    "cartridges": [
+        "c1-application-update-test"
+    ],
+    "groups": [
+        {
+            "name": "G2-application-update-test",
+            "dependencies": {
+                "terminationBehaviour": "terminate-dependents",
+                "startupOrders": [
+                    {
+                        "aliases": [
+                            "group.group3-application-update-test",
+                            "cartridge.c2-1x0-application-update-test"
+                        ]
+                    }
+                ]
+            },
+            "cartridges": [
+                "c2-application-update-test"
+            ],
+            "groups": [
+                {
+                    "name": "G3-application-update-test",
+                    "dependencies": {
+                        "terminationBehaviour": "terminate-all",
+                        "startupOrders": []
+                    },
+                    "cartridges": [
+                        "c3-application-update-test"
+                    ],
+                    "groups": []
+                }
+            ]
+        }
+    ]
+}
+

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/application-update-test/cartridges/mock/c1-application-update-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/application-update-test/cartridges/mock/c1-application-update-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/application-update-test/cartridges/mock/c1-application-update-test.json
new file mode 100755
index 0000000..fcfa6f2
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/application-update-test/cartridges/mock/c1-application-update-test.json
@@ -0,0 +1,45 @@
+{
+    "type": "c1-application-update-test",
+    "provider": "apache",
+    "host": "stratos.apache.org",
+    "category": "data",
+    "displayName": "c1-application-update-test",
+    "description": "c1-application-update-test Cartridge",
+    "version": "7",
+    "multiTenant": "false",
+    "portMapping": [
+        {
+            "name": "http-22",
+            "protocol": "http",
+            "port": "22",
+            "proxyPort": "8280"
+        }
+    ],
+    "deployment": {
+    },
+    "iaasProvider": [
+        {
+            "type": "mock",
+            "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
+            "networkInterfaces": [
+                {
+                    "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e"
+                }
+            ],
+            "property": [
+                {
+                    "name": "instanceType",
+                    "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594"
+                },
+                {
+                    "name": "keyPair",
+                    "value": "vishanth-key"
+                },
+                {
+                    "name": "securityGroups",
+                    "value": "default"
+                }
+            ]
+        }
+    ]
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/application-update-test/cartridges/mock/c2-application-update-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/application-update-test/cartridges/mock/c2-application-update-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/application-update-test/cartridges/mock/c2-application-update-test.json
new file mode 100755
index 0000000..a1c1a97
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/application-update-test/cartridges/mock/c2-application-update-test.json
@@ -0,0 +1,45 @@
+{
+    "type": "c2-application-update-test",
+    "provider": "apache",
+    "host": "stratos.apache.org",
+    "category": "data",
+    "displayName": "c2-application-update-test",
+    "description": "c2-application-update-test Cartridge",
+    "version": "7",
+    "multiTenant": "false",
+    "portMapping": [
+        {
+            "name": "http-22",
+            "protocol": "http",
+            "port": "22",
+            "proxyPort": "8280"
+        }
+    ],
+    "deployment": {
+    },
+    "iaasProvider": [
+        {
+            "type": "mock",
+            "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
+            "networkInterfaces": [
+                {
+                    "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e"
+                }
+            ],
+            "property": [
+                {
+                    "name": "instanceType",
+                    "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594"
+                },
+                {
+                    "name": "keyPair",
+                    "value": "vishanth-key"
+                },
+                {
+                    "name": "securityGroups",
+                    "value": "default"
+                }
+            ]
+        }
+    ]
+}


[15/21] stratos git commit: Uplifting automation engine to v4.4.3, dynamically pick ports for integration tests

Posted by ra...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/group-startup-order-test/cartridges/mock/tomcat1-group-startup-order-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/cartridges/mock/tomcat1-group-startup-order-test.json b/products/stratos/modules/integration/src/test/resources/group-startup-order-test/cartridges/mock/tomcat1-group-startup-order-test.json
deleted file mode 100755
index 02a1cfd..0000000
--- a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/cartridges/mock/tomcat1-group-startup-order-test.json
+++ /dev/null
@@ -1,45 +0,0 @@
-{
-    "type": "tomcat1-group-startup-order-test",
-    "provider": "apache",
-    "category": "framework",
-    "host": "tomcat1-group-startup-order-test.stratos.org",
-    "displayName": "tomcat1-group-startup-order-test",
-    "description": "tomcat1-group-startup-order-test Cartridge",
-    "version": "7",
-    "multiTenant": "false",
-    "portMapping": [
-        {
-            "name": "http-22",
-            "protocol": "http",
-            "port": "22",
-            "proxyPort": "8280"
-        }
-    ],
-    "deployment": {
-    },
-    "iaasProvider": [
-        {
-            "type": "mock",
-            "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
-            "networkInterfaces": [
-                {
-                    "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e"
-                }
-            ],
-            "property": [
-                {
-                    "name": "instanceType",
-                    "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594"
-                },
-                {
-                    "name": "keyPair",
-                    "value": "reka"
-                },
-                {
-                    "name": "securityGroups",
-                    "value": "default"
-                }
-            ]
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/group-startup-order-test/cartridges/mock/tomcat2-group-startup-order-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/cartridges/mock/tomcat2-group-startup-order-test.json b/products/stratos/modules/integration/src/test/resources/group-startup-order-test/cartridges/mock/tomcat2-group-startup-order-test.json
deleted file mode 100755
index 0d2055f..0000000
--- a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/cartridges/mock/tomcat2-group-startup-order-test.json
+++ /dev/null
@@ -1,49 +0,0 @@
-{
-    "type": "tomcat2-group-startup-order-test",
-    "provider": "apache",
-    "category": "framework",
-    "host": "tomcat2-group-startup-order-test.stratos.org",
-    "displayName": "tomcat2-group-startup-order-test",
-    "description": "tomcat2-group-startup-order-test Cartridge",
-    "version": "7",
-    "multiTenant": "false",
-    "portMapping": [
-        {
-            "name": "http-22",
-            "protocol": "http",
-            "port": "22",
-            "proxyPort": "8280"
-        }
-    ],
-    "deployment": {
-    },
-    "iaasProvider": [
-        {
-            "type": "mock",
-            "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
-            "networkInterfaces": [
-                {
-                    "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e"
-                }
-            ],
-            "property": [
-                {
-                    "name": "instanceType",
-                    "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594"
-                },
-                {
-                    "name": "keyPair",
-                    "value": "reka"
-                },
-                {
-                    "name": "securityGroups",
-                    "value": "default"
-                }
-            ]
-        }
-    ],
-    "metadataKeys": [
-        "writeparam5",
-        "writeparam6"
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/group-startup-order-test/cartridges/mock/tomcat3-group-startup-order-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/cartridges/mock/tomcat3-group-startup-order-test.json b/products/stratos/modules/integration/src/test/resources/group-startup-order-test/cartridges/mock/tomcat3-group-startup-order-test.json
deleted file mode 100755
index b4397cb..0000000
--- a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/cartridges/mock/tomcat3-group-startup-order-test.json
+++ /dev/null
@@ -1,31 +0,0 @@
-{
-    "type": "tomcat3-group-startup-order-test",
-    "provider": "apache",
-    "host": "tomcat.stratos.org",
-    "category": "framework",
-    "displayName": "Tomcat 7",
-    "description": "Tomcat 7 Cartridge",
-    "version": "7",
-    "multiTenant": "false",
-    "portMapping": [
-        {
-            "name": "http-8080",
-            "protocol": "http",
-            "port": "8080",
-            "proxyPort": "8280"
-        }
-    ],
-    "deployment": {
-        "baseDir": "/opt/tomcat/webapps"
-    },
-    "iaasProvider": [
-        {
-            "type": "mock",
-            "imageId": "not-needed",
-            "networkInterfaces": [
-            ],
-            "property": [
-            ]
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/group-startup-order-test/deployment-policies/deployment-policy-application-bursting-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/deployment-policies/deployment-policy-application-bursting-test.json b/products/stratos/modules/integration/src/test/resources/group-startup-order-test/deployment-policies/deployment-policy-application-bursting-test.json
deleted file mode 100644
index 3813435..0000000
--- a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/deployment-policies/deployment-policy-application-bursting-test.json
+++ /dev/null
@@ -1,32 +0,0 @@
-{
-    "id": "deployment-policy-group-startup-order-test",
-    "networkPartitions": [
-        {
-            "id": "network-partition-group-startup-order-test-1",
-            "partitionAlgo": "one-after-another",
-            "partitions": [
-                {
-                    "id": "partition-1",
-                    "partitionMax": 4
-                }
-            ]
-        },
-        {
-            "id": "network-partition-group-startup-order-test-2",
-            "partitionAlgo": "round-robin",
-            "partitions": [
-                {
-                    "id": "network-partition-10-partition-1",
-                    "partitionMax": 4
-                },
-                {
-                    "id": "network-partition-10-partition-2",
-                    "partitionMax": 4
-                }
-            ]
-        }
-    ]
-}
-
-
-

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/group-startup-order-test/deployment-policies/deployment-policy-group-startup-order-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/deployment-policies/deployment-policy-group-startup-order-test.json b/products/stratos/modules/integration/src/test/resources/group-startup-order-test/deployment-policies/deployment-policy-group-startup-order-test.json
deleted file mode 100644
index 72f24fc..0000000
--- a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/deployment-policies/deployment-policy-group-startup-order-test.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
-    "id": "deployment-policy-group-startup-order-test",
-    "networkPartitions": [
-        {
-            "id": "network-partition-group-startup-order-test-1",
-            "partitionAlgo": "one-after-another",
-            "partitions": [
-                {
-                    "id": "partition-1",
-                    "partitionMax": 4
-                }
-            ]
-        }
-    ]
-}
-
-
-

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/group-startup-order-test/network-partitions/mock/network-partition-application-bursting-test-1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/network-partitions/mock/network-partition-application-bursting-test-1.json b/products/stratos/modules/integration/src/test/resources/group-startup-order-test/network-partitions/mock/network-partition-application-bursting-test-1.json
deleted file mode 100644
index 238f640..0000000
--- a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/network-partitions/mock/network-partition-application-bursting-test-1.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
-    "id": "network-partition-group-startup-order-test-1",
-    "provider": "mock",
-    "partitions": [
-        {
-            "id": "partition-1",
-            "property": [
-                {
-                    "name": "region",
-                    "value": "default"
-                }
-            ]
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/group-startup-order-test/network-partitions/mock/network-partition-application-bursting-test-2.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/network-partitions/mock/network-partition-application-bursting-test-2.json b/products/stratos/modules/integration/src/test/resources/group-startup-order-test/network-partitions/mock/network-partition-application-bursting-test-2.json
deleted file mode 100644
index 7372b78..0000000
--- a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/network-partitions/mock/network-partition-application-bursting-test-2.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
-    "id": "network-partition-group-startup-order-test-2",
-    "provider": "mock",
-    "partitions": [
-        {
-            "id": "network-partition-10-partition-1",
-            "property": [
-                {
-                    "name": "region",
-                    "value": "default"
-                }
-            ]
-        },
-        {
-            "id": "network-partition-10-partition-2",
-            "property": [
-                {
-                    "name": "region",
-                    "value": "default"
-                }
-            ]
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/group-startup-order-test/network-partitions/mock/network-partition-group-startup-order-test-1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/network-partitions/mock/network-partition-group-startup-order-test-1.json b/products/stratos/modules/integration/src/test/resources/group-startup-order-test/network-partitions/mock/network-partition-group-startup-order-test-1.json
deleted file mode 100644
index 238f640..0000000
--- a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/network-partitions/mock/network-partition-group-startup-order-test-1.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
-    "id": "network-partition-group-startup-order-test-1",
-    "provider": "mock",
-    "partitions": [
-        {
-            "id": "partition-1",
-            "property": [
-                {
-                    "name": "region",
-                    "value": "default"
-                }
-            ]
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/group-startup-order-test/network-partitions/mock/network-partition-group-startup-order-test-2.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/network-partitions/mock/network-partition-group-startup-order-test-2.json b/products/stratos/modules/integration/src/test/resources/group-startup-order-test/network-partitions/mock/network-partition-group-startup-order-test-2.json
deleted file mode 100644
index 7372b78..0000000
--- a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/network-partitions/mock/network-partition-group-startup-order-test-2.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
-    "id": "network-partition-group-startup-order-test-2",
-    "provider": "mock",
-    "partitions": [
-        {
-            "id": "network-partition-10-partition-1",
-            "property": [
-                {
-                    "name": "region",
-                    "value": "default"
-                }
-            ]
-        },
-        {
-            "id": "network-partition-10-partition-2",
-            "property": [
-                {
-                    "name": "region",
-                    "value": "default"
-                }
-            ]
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/RegionOne.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/RegionOne.json b/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/RegionOne.json
deleted file mode 100755
index 47832db..0000000
--- a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/RegionOne.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{
-    "id": "RegionOne",
-    "provider": "mock",
-    "partitions":
-    [
-        {
-            "id": "whole-region",
-            "property":
-            [
-                {
-                    "name": "region",
-                    "value": "RegionOne"
-                }
-            ]
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/application-martin.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/application-martin.json b/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/application-martin.json
deleted file mode 100644
index 30cd6d0..0000000
--- a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/application-martin.json
+++ /dev/null
@@ -1,100 +0,0 @@
-{
-  "alias": "sub-G1-G2-G3-1-G4",
-  "applicationId": "sub-G1-G2-G3-1-G4",
-  "components": {
-    "cartridges": [],
-    "groups": [
-      {
-        "name": "sub-G1-G2-G3-1",
-        "groupMaxInstances": 1,
-        "groupMinInstances": 1,
-        "alias": "sub-G1-G2-G3-1",
-        "cartridges": [],
-        "groups": [
-          {
-            "name": "multiple-groups-no-startup-G1-1",
-            "groupMaxInstances": 1,
-            "groupMinInstances": 1,
-            "alias": "multiple-groups-no-startup-G1-1-0x0",
-            "cartridges": [
-              {
-                "cartridgeMin": 1,
-                "cartridgeMax": 1,
-                "type": "c1",
-                "subscribableInfo": {
-                  "alias": "c1-1x0",
-                  "deploymentPolicy": "static-1",
-                  "artifactRepository": {
-                    "repoUsername": "user",
-                    "repoUrl": "http://octl.qmog.cisco.com:10080/git/default.git",
-                    "privateRepo": true,
-                    "repoPassword": "c-policy"
-                  },
-                  "autoscalingPolicy": "economyPolicy"
-                }
-              },
-              {
-                "cartridgeMin": 1,
-                "cartridgeMax": 1,
-                "type": "c2",
-                "subscribableInfo": {
-                  "alias": "c2-1x0",
-                  "deploymentPolicy": "static-1",
-                  "artifactRepository": {
-                    "repoUsername": "user",
-                    "repoUrl": "http://octl.qmog.cisco.com:10080/git/default.git",
-                    "privateRepo": true,
-                    "repoPassword": "c-policy"
-                  },
-                  "autoscalingPolicy": "economyPolicy"
-                }
-              }
-            ],
-            "groups": []
-          },
-          {
-            "name": "multiple-groups-no-startup-G2-1",
-            "groupMaxInstances": 1,
-            "groupMinInstances": 1,
-            "alias": "multiple-groups-no-startup-G2-1-0x0",
-            "cartridges": [
-              {
-                "cartridgeMin": 1,
-                "cartridgeMax": 1,
-                "type": "c3",
-                "subscribableInfo": {
-                  "alias": "c3-1x1",
-                  "deploymentPolicy": "static-1",
-                  "artifactRepository": {
-                    "repoUsername": "user",
-                    "repoUrl": "http://octl.qmog.cisco.com:10080/git/default.git",
-                    "privateRepo": true,
-                    "repoPassword": "c-policy"
-                  },
-                  "autoscalingPolicy": "economyPolicy"
-                }
-              },
-              {
-                "cartridgeMin": 1,
-                "cartridgeMax": 1,
-                "type": "c4",
-                "subscribableInfo": {
-                  "alias": "c4-1x1",
-                  "deploymentPolicy": "static-1",
-                  "artifactRepository": {
-                    "repoUsername": "user",
-                    "repoUrl": "http://octl.qmog.cisco.com:10080/git/default.git",
-                    "privateRepo": true,
-                    "repoPassword": "c-policy"
-                  },
-                  "autoscalingPolicy": "economyPolicy"
-                }
-              }
-            ],
-            "groups": []
-          }
-        ]
-      }
-    ]
-  }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/application-policy-1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/application-policy-1.json b/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/application-policy-1.json
deleted file mode 100644
index 8fe4193..0000000
--- a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/application-policy-1.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{
-    "id": "application-policy-1",
-    "algorithm": "one-after-another",
-    "networkPartitions": [
-        "RegionOne"
-    ],
-    "properties": [
-        {
-            "name": "key-1",
-            "value": "value-1"
-        },
-        {
-            "name": "key-2",
-            "value": "value-2"
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/application-s-g-c1-c2-c3-s.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/application-s-g-c1-c2-c3-s.json b/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/application-s-g-c1-c2-c3-s.json
deleted file mode 100644
index 600d291..0000000
--- a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/application-s-g-c1-c2-c3-s.json
+++ /dev/null
@@ -1,130 +0,0 @@
-{
-  "alias": "s-g-c1-c2-c3-s",
-  "applicationId": "s-g-c1-c2-c3-s",
-  "components": {
-    "cartridges": [],
-    "groups": [
-      {
-        "name": "g-sc-G4",
-        "groupMaxInstances": 1,
-        "groupMinInstances": 1,
-        "alias": "g-sc-G4-x0x",
-        "cartridges": [
-          {
-            "cartridgeMin": 1,
-            "cartridgeMax": 1,
-            "type": "c1",
-            "subscribableInfo": {
-              "alias": "c1-1x0",
-              "deploymentPolicy": "static-1",
-              "artifactRepository": {
-                "repoUsername": "user",
-                "repoUrl": "http://octl.qmog.cisco.com:10080/git/default.git",
-                "privateRepo": true,
-                "repoPassword": "c-policy"
-              },
-              "autoscalingPolicy": "economyPolicy"
-            }
-          }
-        ],
-        "groups": [
-          {
-            "name": "g-G3",
-            "groupMaxInstances": 1,
-            "groupMinInstances": 1,
-            "alias": "g-G3-1x0",
-            "cartridges": [
-              {
-                "cartridgeMin": 1,
-                "cartridgeMax": 1,
-                "type": "c2",
-                "subscribableInfo": {
-                  "alias": "c2-1x0",
-                  "artifactRepository": {
-                    "repoUsername": "user",
-                    "repoUrl": "http://octl.qmog.cisco.com:10080/git/default.git",
-                    "privateRepo": true,
-                    "repoPassword": "c-policy"
-                  },
-                    "deploymentPolicy": "static-1",
-
-                    "autoscalingPolicy": "economyPolicy"
-                }
-              }
-            ],
-            "groups": [
-                {
-                    "name": "g-G2",
-                    "groupMaxInstances": 1,
-                    "groupMinInstances": 1,
-                    "alias": "g-G2-1x0",
-                    "cartridges": [
-                        {
-                            "cartridgeMin": 1,
-                            "cartridgeMax": 1,
-                            "type": "c3",
-                            "subscribableInfo": {
-                                "alias": "c3-1x0",
-                                "artifactRepository": {
-                                    "repoUsername": "user",
-                                    "repoUrl": "http://octl.qmog.cisco.com:10080/git/default.git",
-                                    "privateRepo": true,
-                                    "repoPassword": "c-policy"
-                                },
-                                "deploymentPolicy": "static-1",
-                                "autoscalingPolicy": "economyPolicy"
-                            }
-                        }
-                    ],
-                    "groups": [
-                        {
-                            "deploymentPolicy": "static-1",
-                            "name": "g-G1",
-                            "groupMaxInstances": 1,
-                            "groupMinInstances": 1,
-                            "alias": "g-G1-1x0",
-                            "cartridges": [
-                                {
-                                    "cartridgeMin": 1,
-                                    "cartridgeMax": 1,
-                                    "type": "c4",
-                                    "subscribableInfo": {
-                                        "alias": "c4-1x0",
-                                        "artifactRepository": {
-                                            "repoUsername": "user",
-                                            "repoUrl": "http://octl.qmog.cisco.com:10080/git/default.git",
-                                            "privateRepo": true,
-                                            "repoPassword": "c-policy"
-                                        },
-                                        "autoscalingPolicy": "economyPolicy"
-                                    }
-                                },
-                                {
-                                    "cartridgeMin": 1,
-                                    "cartridgeMax": 1,
-                                    "type": "c5",
-                                    "subscribableInfo": {
-                                        "alias": "c5-1x0",
-                                        "artifactRepository": {
-                                            "repoUsername": "user",
-                                            "repoUrl": "http://octl.qmog.cisco.com:10080/git/default.git",
-                                            "privateRepo": true,
-                                            "repoPassword": "c-policy"
-                                        },
-                                        "autoscalingPolicy": "economyPolicy"
-                                    }
-                                }
-                            ],
-                            "groups": [
-                            ]
-                        }
-                    ]
-                }
-            ]
-          }
-
-        ]
-      }
-    ]
-  }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/application.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/application.json b/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/application.json
deleted file mode 100644
index e05129a..0000000
--- a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/application.json
+++ /dev/null
@@ -1,108 +0,0 @@
-{
-  "alias": "s-n-gr-s-G12-t-a-2-Id",
-  "applicationId": "s-n-gr-s-G12-t-a-2-Id",
-  "components": {
-    "cartridges": [],
-    "groups": [
-      {
-        "name": "s-n-gr-s-G12-t-a-2",
-        "groupMaxInstances": 1,
-        "groupMinInstances": 1,
-        "alias": "s-n-gr-s-G12-t-a-2",
-        "cartridges": [
-          {
-            "cartridgeMin": 1,
-            "cartridgeMax": 1,
-            "type": "c1",
-            "subscribableInfo": {
-              "alias": "c1-0x0",
-              "deploymentPolicy": "static-1",
-              "artifactRepository": {
-                "repoUsername": "user",
-                "repoUrl": "http://octl.qmog.cisco.com:10080/git/default.git",
-                "privateRepo": true,
-                "repoPassword": "c-policy"
-              },
-              "autoscalingPolicy": "autoscaling-policy-1"
-            }
-          },
-          {
-            "cartridgeMin": 1,
-            "cartridgeMax": 1,
-            "type": "c2",
-            "subscribableInfo": {
-              "alias": "c2-0x0",
-              "deploymentPolicy": "static-1",
-              "artifactRepository": {
-                "repoUsername": "user",
-                "repoUrl": "http://octl.qmog.cisco.com:10080/git/default.git",
-                "privateRepo": true,
-                "repoPassword": "c-policy"
-              },
-              "autoscalingPolicy": "autoscaling-policy-1"
-            }
-          },
-          {
-            "cartridgeMin": 1,
-            "cartridgeMax": 1,
-            "type": "c3",
-            "subscribableInfo": {
-              "alias": "c3-0x0",
-              "deploymentPolicy": "static-1",
-              "artifactRepository": {
-                "repoUsername": "user",
-                "repoUrl": "http://octl.qmog.cisco.com:10080/git/default.git",
-                "privateRepo": true,
-                "repoPassword": "c-policy"
-              },
-              "autoscalingPolicy": "autoscaling-policy-1"
-            }
-          }
-        ],
-        "groups": [
-          {
-            "name": "n-st-G2-t-a-2",
-            "groupMaxInstances": 1,
-            "groupMinInstances": 1,
-            "alias": "n-st-G2-t-a-2-0x0",
-            "cartridges": [
-              {
-                "cartridgeMin": 1,
-                "cartridgeMax": 1,
-                "type": "c4",
-                "subscribableInfo": {
-                  "alias": "c4-1x0",
-                  "deploymentPolicy": "static-1",
-                  "artifactRepository": {
-                    "repoUsername": "user",
-                    "repoUrl": "http://octl.qmog.cisco.com:10080/git/default.git",
-                    "privateRepo": true,
-                    "repoPassword": "c-policy"
-                  },
-                  "autoscalingPolicy": "autoscaling-policy-1"
-                }
-              },
-              {
-                "cartridgeMin": 1,
-                "cartridgeMax": 1,
-                "type": "c5",
-                "subscribableInfo": {
-                  "alias": "c5-1x0",
-                  "deploymentPolicy": "static-1",
-                  "artifactRepository": {
-                    "repoUsername": "user",
-                    "repoUrl": "http://octl.qmog.cisco.com:10080/git/default.git",
-                    "privateRepo": true,
-                    "repoPassword": "c-policy"
-                  },
-                  "autoscalingPolicy": "autoscaling-policy-1"
-                }
-              }
-            ],
-            "groups": []
-          }
-        ]
-      }
-    ]
-  }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/c1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/c1.json b/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/c1.json
deleted file mode 100755
index 19ac4c0..0000000
--- a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/c1.json
+++ /dev/null
@@ -1,45 +0,0 @@
-{
-    "type": "c1",
-    "provider": "apache",
-    "host": "stratos.apache.org",
-    "category": "data",
-    "displayName": "c1",
-    "description": "c1 Cartridge",
-    "version": "7",
-    "multiTenant": "false",
-    "portMapping": [
-        {
-            "protocol": "http",
-            "port": "22",
-            "proxyPort": "8280"
-        }
-    ],
-    "deployment": {
-    },
-    "iaasProvider": [
-        {
-            "type": "mock",
-            "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
-            "networkInterfaces": [
-                {
-                    "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e"
-                }
-            ],
-
-            "property": [
-                {
-                    "name": "instanceType",
-                    "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594"
-                },
-                {
-                    "name": "keyPair",
-                    "value": "vishanth-key"
-                },
-                {
-                    "name": "securityGroups",
-                    "value": "default"
-                }
-            ]
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/c2.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/c2.json b/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/c2.json
deleted file mode 100755
index 8caa83a..0000000
--- a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/c2.json
+++ /dev/null
@@ -1,45 +0,0 @@
-{
-    "type": "c2",
-    "provider": "apache",
-    "host": "stratos.apache.org",
-    "category": "data",
-    "displayName": "c2",
-    "description": "c2 Cartridge",
-    "version": "7",
-    "multiTenant": "false",
-    "portMapping": [
-        {
-            "protocol": "http",
-            "port": "22",
-            "proxyPort": "8280"
-        }
-    ],
-    "deployment": {
-    },
-    "iaasProvider": [
-        {
-            "type": "mock",
-            "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
-            "networkInterfaces": [
-                {
-                    "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e"
-                }
-            ],
-
-            "property": [
-                {
-                    "name": "instanceType",
-                    "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594"
-                },
-                {
-                    "name": "keyPair",
-                    "value": "vishanth-key"
-                },
-                {
-                    "name": "securityGroups",
-                    "value": "default"
-                }
-            ]
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/c3.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/c3.json b/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/c3.json
deleted file mode 100755
index dedb0f6..0000000
--- a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/c3.json
+++ /dev/null
@@ -1,45 +0,0 @@
-{
-    "type": "c3",
-    "provider": "apache",
-    "host": "stratos.apache.org",
-    "category": "data",
-    "displayName": "c3",
-    "description": "c3 Cartridge",
-    "version": "7",
-    "multiTenant": "false",
-    "portMapping": [
-        {
-            "protocol": "http",
-            "port": "22",
-            "proxyPort": "8280"
-        }
-    ],
-    "deployment": {
-    },
-    "iaasProvider": [
-        {
-            "type": "mock",
-            "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
-            "networkInterfaces": [
-                {
-                    "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e"
-                }
-            ],
-
-            "property": [
-                {
-                    "name": "instanceType",
-                    "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594"
-                },
-                {
-                    "name": "keyPair",
-                    "value": "vishanth-key"
-                },
-                {
-                    "name": "securityGroups",
-                    "value": "default"
-                }
-            ]
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/c4.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/c4.json b/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/c4.json
deleted file mode 100755
index efc660a..0000000
--- a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/c4.json
+++ /dev/null
@@ -1,45 +0,0 @@
-{
-    "type": "c4",
-    "provider": "apache",
-    "host": "stratos.apache.org",
-    "category": "data",
-    "displayName": "c4",
-    "description": "c4 Cartridge",
-    "version": "7",
-    "multiTenant": "false",
-    "portMapping": [
-        {
-            "protocol": "http",
-            "port": "22",
-            "proxyPort": "8280"
-        }
-    ],
-    "deployment": {
-    },
-    "iaasProvider": [
-        {
-            "type": "mock",
-            "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
-            "networkInterfaces": [
-                {
-                    "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e"
-                }
-            ],
-
-            "property": [
-                {
-                    "name": "instanceType",
-                    "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594"
-                },
-                {
-                    "name": "keyPair",
-                    "value": "vishanth-key"
-                },
-                {
-                    "name": "securityGroups",
-                    "value": "default"
-                }
-            ]
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/c5.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/c5.json b/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/c5.json
deleted file mode 100755
index 59e225f..0000000
--- a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/c5.json
+++ /dev/null
@@ -1,132 +0,0 @@
-{
-    "category": "Application", 
-    "deployment": {
-        "baseDir": "/var/www", 
-        "dir": [
-            "www=copy#app#files#here", 
-            "simplesamlphp=copy#saml#libraries#here", 
-            "sql=copy#saml#libraries#here"
-        ]
-    }, 
-    "description": "c4 Cartridge", 
-    "displayName": "c4", 
-    "host": "qmog.cisco.com", 
-    "iaasProvider": [
-        {
-            "imageId": "RegionOne/16e7e35b-0c88-4605-90ce-cbef9e9dde0f", 
-            "maxInstanceLimit": "4", 
-            "networkInterfaces": [
-                {
-                    "floatingNetworks": [
-                        {
-                            "name": "public", 
-                            "networkUuid": "26b4aa2b-06bc-4e4f-a6eb-c19fbc211af6"
-                        }
-                    ], 
-                    "name": "core", 
-                    "networkUuid": "5e107fbd-4820-47ad-84ea-6f135496f889"
-                }
-            ], 
-            "property": [
-                {
-                    "name": "instanceType", 
-                    "value": "RegionOne/2cdbd576-8c9b-4c2d-8b1a-0f79dc4fb809"
-                }, 
-                {
-                    "name": "keyPair", 
-                    "value": "phoenix"
-                }, 
-                {
-                    "name": "autoAssignIp", 
-                    "value": "false"
-                }, 
-                {
-                    "name": "securityGroups", 
-                    "value": "default"
-                }
-            ], 
-            "type": "mock"
-        }
-    ], 
-    "multiTenant": "false", 
-    "portMapping": [
-        {
-            "port": "22", 
-            "protocol": "http", 
-            "proxyPort": "8280"
-        }
-    ], 
-    "property": [
-        {
-            "name": "payload_parameter.MB_IP", 
-            "value": "octl.qmog.cisco.com"
-        }, 
-        {
-            "name": "payload_parameter.MB_PORT", 
-            "value": "61616"
-        }, 
-        {
-            "name": "payload_parameter.CEP_IP", 
-            "value": "octl.qmog.cisco.com"
-        }, 
-        {
-            "name": "payload_parameter.CEP_PORT", 
-            "value": "7611"
-        }, 
-        {
-            "name": "payload_parameter.CEP_ADMIN_USERNAME", 
-            "value": "admin"
-        }, 
-        {
-            "name": "payload_parameter.CEP_ADMIN_PASSWORD", 
-            "value": "admin"
-        }, 
-        {
-            "name": "payload_parameter.CERT_TRUSTSTORE", 
-            "value": "/opt/apache-stratos-cartridge-agent/security/client-truststore.jks"
-        }, 
-        {
-            "name": "payload_parameter.TRUSTSTORE_PASSWORD", 
-            "value": "wso2carbon"
-        }, 
-        {
-            "name": "payload_parameter.ENABLE_DATA_PUBLISHER", 
-            "value": "false"
-        }, 
-        {
-            "name": "payload_parameter.MONITORING_SERVER_IP", 
-            "value": "octl.qmog.cisco.com"
-        }, 
-        {
-            "name": "payload_parameter.MONITORING_SERVER_PORT", 
-            "value": "7611"
-        }, 
-        {
-            "name": "payload_parameter.MONITORING_SERVER_SECURE_PORT", 
-            "value": "7711"
-        }, 
-        {
-            "name": "payload_parameter.MONITORING_SERVER_ADMIN_USERNAME", 
-            "value": "admin"
-        }, 
-        {
-            "name": "payload_parameter.MONITORING_SERVER_ADMIN_PASSWORD", 
-            "value": "admin"
-        }, 
-        {
-            "name": "payload_parameter.QTCM_DNS_SEGMENT", 
-            "value": ""
-        }, 
-        {
-            "name": "payload_parameter.QTCM_NETWORK_COUNT", 
-            "value": "1"
-        }, 
-        {
-            "name": "payload_parameter.SIMPLE_PROPERTY", 
-            "value": "value"
-        }
-    ], 
-    "provider": "cisco", 
-    "type": "c5", 
-    "version": "1.0"
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/cartridge-groups-s-g-c1-c2-c3-s.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/cartridge-groups-s-g-c1-c2-c3-s.json b/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/cartridge-groups-s-g-c1-c2-c3-s.json
deleted file mode 100755
index 00d4dc5..0000000
--- a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/cartridge-groups-s-g-c1-c2-c3-s.json
+++ /dev/null
@@ -1,26 +0,0 @@
-{
-  "name": "s-g-c1-c2-c3-s",
-  "dependencies": {
-    "terminationBehaviour": "terminate-none",
-    "startupOrders": [
-      {
-        "aliases": [
-          "cartridge.c3-0x0",
-          "cartridge.c2-0x0"
-        ]
-      },
-      {
-        "aliases": [
-          "cartridge.c2-0x0",
-          "cartridge.c1-0x0"
-        ]
-      }
-    ]
-  },
-  "cartridges": [
-    "c1",
-    "c2",
-    "c3"
-  ],
-  "groups": []
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/cartridge-groups-working.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/cartridge-groups-working.json b/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/cartridge-groups-working.json
deleted file mode 100755
index 749b191..0000000
--- a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/cartridge-groups-working.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
-  "name": "subscription-G1-G2-G3",
-  "dependencies": {
-    "terminationBehaviour": "terminate-none",
-    "startupOrders": []
-  },
-  "cartridges": [],
-  "groups": [
-    {
-      "name": "multiple-groups-no-startup-G1",
-      "dependencies": {
-        "terminationBehaviour": "terminate-none",
-        "startupOrders": []
-      },
-      "cartridges": [
-        "c1",
-        "c2"
-      ],
-      "groups": []
-    },
-    {
-      "name": "multiple-groups-no-startup-G2",
-      "dependencies": {
-        "terminationBehaviour": "terminate-none",
-        "startupOrders": []
-      },
-      "cartridges": [
-        "c1",
-        "c2"
-      ],
-      "groups": []
-    }
-  ]
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/cartridge-groups.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/cartridge-groups.json b/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/cartridge-groups.json
deleted file mode 100644
index 8c4cf1e..0000000
--- a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/cartridge-groups.json
+++ /dev/null
@@ -1,77 +0,0 @@
-{
-  "name": "g-sc-G4",
-  "dependencies": {
-    "terminationBehaviour": "terminate-none",
-    "startupOrders": [
-      {
-        "aliases": [
-          "group.g-G3-1x0",
-          "cartridge.c1-1x0"
-        ]
-      }
-    ]
-  },
-  "cartridges": [
-    "c1"
-  ],
-  "groups": [
-    {
-      "name": "g-G3",
-      "dependencies": {
-        "terminationBehaviour": "terminate-dependents",
-        "startupOrders": [
-          {
-            "aliases": [
-              "group.g-G2-1x0",
-              "cartridge.c2-1x0"
-            ]
-          }
-        ]
-      },
-      "cartridges": [
-        "c2"
-      ],
-      "groups": [
-          {
-              "name": "g-G2",
-              "dependencies": {
-                  "terminationBehaviour": "terminate-dependents",
-                  "startupOrders": [
-                      {
-                          "aliases": [
-                              "group.g-G1-1x0",
-                              "cartridge.c3-1x0"
-                          ]
-                      }
-                  ]
-              },
-              "cartridges": [
-                  "c3"
-              ],
-              "groups": [
-                  {
-                      "name": "g-G1",
-                      "dependencies": {
-                          "terminationBehaviour": "terminate-all",
-                          "startupOrders": [
-                              {
-                                  "aliases": [
-                                      "cartridge.c4-1x0",
-                                      "cartridge.c5-1x0"
-                                  ]
-                              }
-                          ]
-                      },
-                      "cartridges": [
-                          "c4",
-                          "c5"
-                      ],
-                      "groups": [
-                      ]
-                  }
-              ]
-          }
-      ]
-    }
-  ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/cartridge-groups.json.back
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/cartridge-groups.json.back b/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/cartridge-groups.json.back
deleted file mode 100644
index 3fff281..0000000
--- a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/cartridge-groups.json.back
+++ /dev/null
@@ -1,53 +0,0 @@
-{
-    "name": "s-n-gr-s-G12-t-a-2",
-    "dependencies": {
-        "terminationBehaviour": "terminate-dependents",
-        "startupOrders": [
-            {
-                "aliases": [
-                    "group.n-st-G2-t-a-2-0x0",
-                    "cartridge.c3-0x0"
-                ]
-            },
-            {
-                "aliases": [
-                    "cartridge.c3-0x0",
-                    "cartridge.c2-0x0"
-                ]
-            },
-            {
-                "aliases": [
-                    "cartridge.c2-0x0",
-                    "cartridge.c1-0x0"
-                ]
-            }
-        ]
-    },
-    "cartridges": [
-        "c1",
-        "c2",
-        "c3"
-    ],
-    "groups": [
-        {
-            "name": "n-st-G2-t-a-2",
-            "dependencies": {
-                "terminationBehaviour": "terminate-all",
-                "startupOrders": [
-                    {
-                        "aliases": [
-                            "cartridge.c5-1x0",
-                            "cartridge.c4-1x0"
-                        ]
-                    }
-                ]
-            },
-            "cartridges": [
-                "c4",
-                "c5"
-            ],
-            "groups": []
-        }
-    ]
-}
-

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/deploy.sh
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/deploy.sh b/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/deploy.sh
deleted file mode 100755
index ea81357..0000000
--- a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/deploy.sh
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/bin/sh
-
-echo ${autoscaling_policies_path}/autoscaling-policy-1.json
-echo "Adding autoscale policy..."
-curl -X POST -H "Content-Type: application/json" -d "@economy-policy.json" -k -v -u admin:admin https://127.0.0.1:9443/api/autoscalingPolicies
-
-echo "Adding network partitions..."
-curl -X POST -H "Content-Type: application/json" -d "@RegionOne.json" -k -v -u admin:admin https://127.0.0.1:9443/api/networkPartitions
-
-echo "Adding deployment policies..."
-curl -X POST -H "Content-Type: application/json" -d "@static-1.json" -k -v -u admin:admin https://127.0.0.1:9443/api/deploymentPolicies
-
-echo "Adding tomcat cartridge..."
-curl -X POST -H "Content-Type: application/json" -d "@c1.json" -k -v -u admin:admin https://127.0.0.1:9443/api/cartridges
-
-echo "Adding tomcat1 cartridge..."
-curl -X POST -H "Content-Type: application/json" -d "@c2.json" -k -v -u admin:admin https://127.0.0.1:9443/api/cartridges
-
-echo "Adding tomcat2 cartridge..."
-curl -X POST -H "Content-Type: application/json" -d "@c3.json" -k -v -u admin:admin https://127.0.0.1:9443/api/cartridges
-
-echo "Adding tomcat2 cartridge..."
-curl -X POST -H "Content-Type: application/json" -d "@c4.json" -k -v -u admin:admin https://127.0.0.1:9443/api/cartridges
-curl -X POST -H "Content-Type: application/json" -d "@c5.json" -k -v -u admin:admin https://127.0.0.1:9443/api/cartridges
-
-
-echo "Adding group6c group..."
-curl -X POST -H "Content-Type: application/json" -d "@cartridge-groups.json" -k -v -u admin:admin https://127.0.0.1:9443/api/cartridgeGroups
-
-sleep 1
-
-echo "Adding application policy..."
-curl -X POST -H "Content-Type: application/json" -d "@application-policy-1.json" -k -v -u admin:admin https://127.0.0.1:9443/api/applicationPolicies
-
-sleep 1
-
-echo "Creating application..."
-curl -X POST -H "Content-Type: application/json" -d "@application-s-g-c1-c2-c3-s.json" -k -v -u admin:admin https://127.0.0.1:9443/api/applications
-
-sleep 1
-
-echo "Deploying application..."
-curl -X POST -H "Content-Type: application/json" -k -v -u admin:admin https://127.0.0.1:9443/api/applications/s-g-c1-c2-c3-s/deploy/application-policy-1

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/economy-policy.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/economy-policy.json b/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/economy-policy.json
deleted file mode 100755
index b838769..0000000
--- a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/economy-policy.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
-  "id": "economyPolicy",
-  "loadThresholds": {
-    "requestsInFlight": {
-      "threshold": 50
-    },
-    "memoryConsumption": {
-      "threshold": 40
-    },
-    "loadAverage": {
-      "threshold": 40
-    }
-  }
-}
-

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/static-1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/static-1.json b/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/static-1.json
deleted file mode 100755
index 7ba62c0..0000000
--- a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/static-1.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{
-    "id": "static-1",
-    "networkPartitions":
-    [
-        {
-            "id": "RegionOne",
-            "partitionAlgo": "one-after-another",
-            "partitions":
-            [
-                {
-                    "id": "whole-region",
-                    "partitionMax": "2",
-                }
-            ]
-        }
-    ]
-}


[16/21] stratos git commit: Uplifting automation engine to v4.4.3, dynamically pick ports for integration tests

Posted by ra...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/common/log4j.properties
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/common/log4j.properties b/products/stratos/modules/integration/src/test/resources/common/log4j.properties
deleted file mode 100644
index 72ad1c4..0000000
--- a/products/stratos/modules/integration/src/test/resources/common/log4j.properties
+++ /dev/null
@@ -1,206 +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.
-#
-
-#
-# This is the log4j configuration file used by Stratos
-#
-
-log4j.rootLogger=INFO, CARBON_CONSOLE, CARBON_LOGFILE, CARBON_MEMORY, CARBON_SYS_LOG
-
-log4j.logger.AUDIT_LOG=INFO, AUDIT_LOGFILE
-log4j.logger.org.apache.axis2.wsdl.codegen.writer.PrettyPrinter=ERROR, CARBON_LOGFILE, CARBON_MEMORY
-log4j.logger.org.apache.axis2.clustering=INFO
-log4j.logger.org.apache=INFO
-log4j.logger.org.apache.catalina=WARN
-log4j.logger.org.apache.tomcat=WARN
-log4j.logger.org.wso2.carbon.apacheds=WARN
-log4j.logger.org.apache.directory.server.ldap=WARN
-log4j.logger.org.apache.directory.server.core.event=WARN
-log4j.logger.com.atomikos=INFO,ATOMIKOS
-log4j.logger.org.quartz=WARN
-log4j.logger.org.apache.jackrabbit.webdav=WARN
-log4j.logger.org.apache.juddi=ERROR
-log4j.logger.org.apache.commons.digester.Digester=WARN
-log4j.logger.org.apache.jasper.compiler.TldLocationsCache=WARN
-log4j.logger.org.apache.qpid=WARN
-log4j.logger.org.apache.qpid.server.Main=INFO
-log4j.logger.qpid.message=WARN
-log4j.logger.qpid.message.broker.listening=INFO
-log4j.logger.org.apache.tiles=WARN
-log4j.logger.org.apache.commons.httpclient=ERROR
-log4j.logger.org.apache.coyote=WARN
-log4j.logger.org.apache.solr=ERROR
-log4j.logger.org.infinispan=WARN
-log4j.logger.org.jgroups=ERROR
-log4j.logger.me.prettyprint.cassandra.hector.TimingLogger=ERROR
-log4j.logger.org.wso2=INFO
-
-# Apache Stratos logging configuration
-log4j.logger.org.apache.stratos.manager=INFO
-log4j.logger.org.apache.stratos.autoscaler=INFO
-log4j.logger.org.apache.stratos.messaging=INFO
-log4j.logger.org.apache.stratos.cloud.controller=INFO
-log4j.logger.org.wso2.andes.client=ERROR
-# Autoscaler rule logs
-log4j.logger.org.apache.stratos.autoscaler.rule.RuleLog=INFO
-
-# Apache jclouds
-#log4j.logger.jclouds.wire=DEBUG
-#log4j.logger.jclouds.headers=DEBUG
-#log4j.logger.org.jclouds=DEBUG
-
-# CEP Window processors
-#log4j.logger.org.apache.stratos.cep.extension.FaultHandlingWindowProcessor=DEBUG
-
-log4j.logger.org.apache.axis2.enterprise=FATAL, CARBON_LOGFILE, CARBON_MEMORY
-log4j.logger.org.opensaml.xml=WARN, CARBON_LOGFILE, CARBON_MEMORY
-log4j.logger.org.apache.directory.shared.ldap=WARN, CARBON_LOGFILE, CARBON_MEMORY
-log4j.logger.org.apache.directory.server.ldap.handlers=WARN, CARBON_LOGFILE, CARBON_MEMORY 
-
-# Following are to remove false error messages from startup (IS)
-log4j.logger.org.apache.directory.shared.ldap.entry.DefaultServerAttribute=FATAL, CARBON_LOGFILE, CARBON_MEMORY
-log4j.logger.org.apache.directory.server.core.DefaultDirectoryService=ERROR, CARBON_LOGFILE, CARBON_MEMORY
-log4j.logger.org.apache.directory.shared.ldap.ldif.LdifReader=ERROR, CARBON_LOGFILE, CARBON_MEMORY
-log4j.logger.org.apache.directory.server.ldap.LdapProtocolHandler=ERROR, CARBON_LOGFILE, CARBON_MEMORY
-log4j.logger.org.apache.directory.server.core=ERROR, CARBON_LOGFILE, CARBON_MEMORY
-
-# Hive logging configuration
-log4j.logger.DataNucleus=ERROR
-log4j.logger.Datastore=ERROR
-log4j.logger.Datastore.Schema=ERROR
-log4j.logger.JPOX.Datastore=ERROR
-log4j.logger.JPOX.Plugin=ERROR
-log4j.logger.JPOX.MetaData=ERROR
-log4j.logger.JPOX.Query=ERROR
-log4j.logger.JPOX.General=ERROR
-log4j.logger.JPOX.Enhancer=ERROR
-log4j.logger.org.apache.hadoop.hive=WARN
-log4j.logger.hive=WARN
-log4j.logger.ExecMapper=WARN
-log4j.logger.ExecReducer=WARN
-log4j.logger.net.sf.ehcache.config.ConfigurationFactory=ERROR
-log4j.logger.org.apache.axis2.clustering.tribes.Axis2GroupChannel=FATAL
-
-log4j.logger.trace.messages=TRACE,CARBON_TRACE_LOGFILE
-
-log4j.additivity.org.apache.axis2.clustering=false
-log4j.additivity.com.atomikos=false
-
-# CARBON_CONSOLE is set to be a ConsoleAppender using a PatternLayout.
-log4j.appender.CARBON_CONSOLE=org.apache.log4j.ConsoleAppender
-log4j.appender.CARBON_CONSOLE.layout=org.wso2.carbon.utils.logging.TenantAwarePatternLayout
-# ConversionPattern will be overridden by the configuration setting in the DB
-log4j.appender.CARBON_CONSOLE.layout.ConversionPattern=[%d] %P%5p {%c} - %x %m%n
-log4j.appender.CARBON_CONSOLE.layout.TenantPattern=%U%@%D[%T]
-log4j.appender.CARBON_CONSOLE.threshold=DEBUG
-
-# CARBON_MEMORY is set to be a MemoryAppender using a PatternLayout.
-log4j.appender.CARBON_MEMORY=org.wso2.carbon.logging.appenders.MemoryAppender
-log4j.appender.CARBON_MEMORY.layout=org.apache.log4j.PatternLayout
-log4j.appender.CARBON_MEMORY.bufferSize=200
-# ConversionPattern will be overridden by the configuration setting in the DB
-#log4j.appender.CARBON_MEMORY.layout.ConversionPattern=[%d] %5p - %x %m {%c}%n
-log4j.appender.CARBON_MEMORY.layout.ConversionPattern=[%d] %5p {%c} - %x %m%n
-log4j.appender.CARBON_MEMORY.threshold=DEBUG
-
-
-# CARBON_LOGFILE is set to be a DailyRollingFileAppender using a PatternLayout.
-log4j.appender.CARBON_LOGFILE=org.apache.log4j.RollingFileAppender
-log4j.appender.CARBON_LOGFILE.MaxFileSize=10000KB
-log4j.appender.CARBON_LOGFILE.MaxBackupIndex=10
-# Log file will be overridden by the configuration setting in the DB
-# This path should be relative to WSO2 Carbon Home
-log4j.appender.CARBON_LOGFILE.File=${carbon.home}/repository/logs/${instance.log}/wso2carbon${instance.log}.log
-log4j.appender.CARBON_LOGFILE.Append=true
-log4j.appender.CARBON_LOGFILE.layout=org.wso2.carbon.utils.logging.TenantAwarePatternLayout
-# ConversionPattern will be overridden by the configuration setting in the DB
-log4j.appender.CARBON_LOGFILE.layout.ConversionPattern=TID: [%T] [%S] [%d] %P%5p {%c} - %x %m%n
-log4j.appender.CARBON_LOGFILE.layout.TenantPattern=%U%@%D [%T] [%S]
-log4j.appender.CARBON_LOGFILE.threshold=DEBUG
-
-log4j.appender.CARBON_SYS_LOG = org.apache.log4j.net.SyslogAppender
-log4j.appender.CARBON_SYS_LOG.layout=org.apache.log4j.PatternLayout
-log4j.appender.CARBON_SYS_LOG.layout.ConversionPattern=[%d] %5p {%c} - %x %m%n
-log4j.appender.CARBON_SYS_LOG.SyslogHost=localhost
-log4j.appender.CARBON_SYS_LOG.Facility=USER
-log4j.appender.CARBON_SYS_LOG.threshold=DEBUG
-
-# LOGEVENT is set to be a LogEventAppender using a PatternLayout to send logs to LOGEVENT 
-log4j.appender.LOGEVENT=org.wso2.carbon.logging.appender.LogEventAppender
-log4j.appender.LOGEVENT.url=tcp://10.100.3.103:7611
-log4j.appender.LOGEVENT.layout=org.wso2.carbon.utils.logging.TenantAwarePatternLayout
-log4j.appender.LOGEVENT.columnList=%T,%S,%A,%d,%c,%p,%m,%H,%I,%Stacktrace
-log4j.appender.LOGEVENT.userName=admin
-log4j.appender.LOGEVENT.password=admin
-
-# Appender config to CARBON_TRACE_LOGFILE
-log4j.appender.CARBON_TRACE_LOGFILE=org.apache.log4j.DailyRollingFileAppender
-log4j.appender.CARBON_TRACE_LOGFILE.File=${carbon.home}/repository/logs/${instance.log}/wso2carbon-trace-messages${instance.log}.log
-log4j.appender.CARBON_TRACE_LOGFILE.Append=true
-log4j.appender.CARBON_TRACE_LOGFILE.layout=org.wso2.carbon.utils.logging.TenantAwarePatternLayout
-log4j.appender.CARBON_TRACE_LOGFILE.layout.ConversionPattern=[%d] %P%5p {%c} - %x %m%n
-log4j.appender.CARBON_TRACE_LOGFILE.layout.TenantPattern=%U%@%D [%T] [%S]
-log4j.appender.CARBON_TRACE_LOGFILE.threshold=TRACE
-log4j.additivity.trace.messages=false
-
-# Appender config to AUDIT_LOGFILE
-log4j.appender.AUDIT_LOGFILE=org.apache.log4j.DailyRollingFileAppender
-log4j.appender.AUDIT_LOGFILE.File=${carbon.home}/repository/logs/audit.log
-log4j.appender.AUDIT_LOGFILE.Append=true
-log4j.appender.AUDIT_LOGFILE.layout=org.wso2.carbon.utils.logging.TenantAwarePatternLayout
-log4j.appender.AUDIT_LOGFILE.layout.ConversionPattern=[%d] %P%5p - %x %m %n
-log4j.appender.AUDIT_LOGFILE.layout.TenantPattern=%U%@%D [%T] [%S]
-log4j.appender.AUDIT_LOGFILE.threshold=INFO
-log4j.additivity.AUDIT_LOG=false
-
-# The event trace logger dumps enough information @INFO level.
-# Writes events received by DataBridge
-log4j.category.LOG_AGGREGATOR_LOGGER=INFO, LOG_AGGREGATOR_FILE_APPENDER
-log4j.additivity.LOG_AGGREGATOR_LOGGER=false
-log4j.appender.LOG_AGGREGATOR_FILE_APPENDER=org.apache.log4j.DailyRollingFileAppender
-log4j.appender.LOG_AGGREGATOR_FILE_APPENDER.File=${carbon.home}/repository/logs/${instance.log}/aggregate${instance.log}.log
-log4j.appender.LOG_AGGREGATOR_FILE_APPENDER.Append=true
-log4j.appender.LOG_AGGREGATOR_FILE_APPENDER.layout=org.apache.log4j.PatternLayout
-log4j.appender.LOG_AGGREGATOR_FILE_APPENDER.layout.ConversionPattern=%m%n
-
-# The event trace logger dumps enough information @INFO level, but maybe pushed upto TRACE.
-# Writes only run-time/event processing time tracing/debug messages for event passing through trace
-# enabled transport adapters event formatters, builders and processors. Enabling event tracing on these has a performance impact
-log4j.category.EVENT_TRACE_LOGGER=INFO, EVENT_TRACE_APPENDER
-log4j.additivity.EVENT_TRACE_LOGGER=false
-log4j.appender.EVENT_TRACE_APPENDER=org.apache.log4j.DailyRollingFileAppender
-log4j.appender.EVENT_TRACE_APPENDER.File=${carbon.home}/repository/logs/${instance.log}/wso2-cep-trace${instance.log}.log
-log4j.appender.EVENT_TRACE_APPENDER.Append=true
-log4j.appender.EVENT_TRACE_APPENDER.layout=org.apache.log4j.PatternLayout
-log4j.appender.EVENT_TRACE_APPENDER.layout.ConversionPattern=%d{HH:mm:ss,SSS} [%X{ip}-%X{host}] [%t] %5p %c{1} %m%n
-
-# Appender config to send Atomikos transaction logs to new log file tm.out.
-log4j.appender.ATOMIKOS = org.apache.log4j.RollingFileAppender
-log4j.appender.ATOMIKOS.File = repository/logs/tm.out
-log4j.appender.ATOMIKOS.Append = true
-log4j.appender.ATOMIKOS.layout = org.apache.log4j.PatternLayout
-log4j.appender.ATOMIKOS.layout.ConversionPattern=%p %t %c - %m%n
-
-# This file is used to override the default logger settings, and is used to remove unwanted logs from Shindig appearing on the console.
-
-# Specification of Handler used by Console Logger
-handlers=java.util.logging.ConsoleHandler
-
-# Replacing default INFO level with SEVERE
-java.util.logging.ConsoleHandler.level=SEVERE

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/common/mock-iaas.xml
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/common/mock-iaas.xml b/products/stratos/modules/integration/src/test/resources/common/mock-iaas.xml
deleted file mode 100644
index 0f6b206..0000000
--- a/products/stratos/modules/integration/src/test/resources/common/mock-iaas.xml
+++ /dev/null
@@ -1,123 +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.
-  -->
-
-<mock-iaas enabled="true">
-    <health-statistics>
-        <cartridge type="tomcat">
-            <!-- factor:memory-consumption|load-average|requests-in-flight-->
-            <!-- mode:loop|continue|stop -->
-            <!-- Mode defines the action needs to be taken after the last sample value:
-                 loop: start from beginning
-                 continue: continue the last sample value
-                 stop: stop publishing statistics -->
-            <pattern factor="memory-consumption" mode="continue">
-                <!-- Sample values -->
-                <sampleValues>20,30,40,50,60,70,50,40,30,20</sampleValues>
-                <!-- Duration of each sample value in seconds -->
-                <sampleDuration>60</sampleDuration>
-            </pattern>
-            <pattern factor="load-average" mode="continue">
-                <!-- Sample values -->
-                <sampleValues>20</sampleValues>
-                <!-- Duration of each sample value in seconds -->
-                <sampleDuration>60</sampleDuration>
-            </pattern>
-        </cartridge>
-        <cartridge type="c7-single-cluster-scaling-test">
-            <!-- factor:memory-consumption|load-average|requests-in-flight-->
-            <!-- mode:loop|continue|stop -->
-            <!-- Mode defines the action needs to be taken after the last sample value:
-                 loop: start from beginning
-                 continue: continue the last sample value
-                 stop: stop publishing statistics -->
-            <pattern factor="memory-consumption" mode="continue">
-                <!-- Sample values -->
-                <sampleValues>60,70,80,90,90,90,40,60,50,60</sampleValues>
-                <!-- Duration of each sample value in seconds -->
-                <sampleDuration>60</sampleDuration>
-            </pattern>
-            <pattern factor="load-average" mode="continue">
-                <!-- Sample values -->
-                <sampleValues>70,70,70</sampleValues>
-                <!-- Duration of each sample value in seconds -->
-                <sampleDuration>60</sampleDuration>
-            </pattern>
-        </cartridge>
-        <cartridge type="c7-partition-round-robin-test">
-            <!-- factor:memory-consumption|load-average|requests-in-flight-->
-            <!-- mode:loop|continue|stop -->
-            <!-- Mode defines the action needs to be taken after the last sample value:
-                 loop: start from beginning
-                 continue: continue the last sample value
-                 stop: stop publishing statistics -->
-            <pattern factor="memory-consumption" mode="stop">
-                <!-- Sample values -->
-                <sampleValues>20,20,20,20</sampleValues>
-                <!-- Duration of each sample value in seconds -->
-                <sampleDuration>30</sampleDuration>
-            </pattern>
-            <pattern factor="load-average" mode="stop">
-                <!-- Sample values -->
-                <sampleValues>20,20,20,20</sampleValues>
-                <!-- Duration of each sample value in seconds -->
-                <sampleDuration>30</sampleDuration>
-            </pattern>
-        </cartridge>
-        <cartridge type="c3-group-termination-behavior-test">
-            <!-- factor:memory-consumption|load-average|requests-in-flight-->
-            <!-- mode:loop|continue|stop -->
-            <!-- Mode defines the action needs to be taken after the last sample value:
-                 loop: start from beginning
-                 continue: continue the last sample value
-                 stop: stop publishing statistics -->
-            <pattern factor="memory-consumption" mode="stop">
-                <!-- Sample values -->
-                <sampleValues>20,20,20</sampleValues>
-                <!-- Duration of each sample value in seconds -->
-                <sampleDuration>60</sampleDuration>
-            </pattern>
-            <pattern factor="load-average" mode="stop">
-                <!-- Sample values -->
-                <sampleValues>20,20,20</sampleValues>
-                <!-- Duration of each sample value in seconds -->
-                <sampleDuration>60</sampleDuration>
-            </pattern>
-        </cartridge>
-        <cartridge type="php">
-            <!-- factor:memory-consumption|load-average|requests-in-flight-->
-            <!-- mode:loop|continue|stop -->
-            <!-- Mode defines the action needs to be taken after the last sample value:
-                 loop: start from beginning
-                 continue: continue the last sample value
-                 stop: stop publishing statistics -->
-            <pattern factor="memory-consumption" mode="continue">
-                <!-- Sample values -->
-                <sampleValues>20,30,40,50,60,70,50,40,30,20</sampleValues>
-                <!-- Duration of each sample value in seconds -->
-                <sampleDuration>60</sampleDuration>
-            </pattern>
-            <pattern factor="load-average" mode="continue">
-                <!-- Sample values -->
-                <sampleValues>20</sampleValues>
-                <!-- Duration of each sample value in seconds -->
-                <sampleDuration>60</sampleDuration>
-            </pattern>
-        </cartridge>
-    </health-statistics>
-</mock-iaas>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/common/scaling.drl
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/common/scaling.drl b/products/stratos/modules/integration/src/test/resources/common/scaling.drl
deleted file mode 100644
index 69d9111..0000000
--- a/products/stratos/modules/integration/src/test/resources/common/scaling.drl
+++ /dev/null
@@ -1,311 +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
-
-import org.apache.stratos.messaging.domain.topology.Service;
-import org.apache.stratos.messaging.domain.topology.Cluster;
-import org.apache.stratos.autoscaler.context.AutoscalerContext;
-import org.apache.stratos.autoscaler.context.member.MemberStatsContext;
-import org.apache.stratos.autoscaler.util.AutoscalerConstants;
-import org.apache.stratos.autoscaler.context.partition.network.NetworkPartitionContext;
-import org.apache.stratos.autoscaler.pojo.policy.PolicyManager;
-import org.apache.stratos.autoscaler.pojo.policy.autoscale.AutoscalePolicy;
-import org.apache.stratos.autoscaler.pojo.policy.autoscale.RequestsInFlight;
-import org.apache.stratos.autoscaler.pojo.policy.autoscale.LoadThresholds;
-import org.apache.stratos.autoscaler.pojo.policy.autoscale.MemoryConsumption;
-import org.apache.stratos.autoscaler.pojo.policy.autoscale.LoadAverage;
-import org.apache.stratos.autoscaler.algorithms.PartitionAlgorithm;
-import org.apache.stratos.autoscaler.algorithms.partition.OneAfterAnother;
-import org.apache.stratos.autoscaler.algorithms.partition.RoundRobin;
-import org.apache.stratos.autoscaler.context.partition.ClusterLevelPartitionContext;
-import org.apache.stratos.autoscaler.rule.AutoscalerRuleEvaluator;
-import org.apache.stratos.cloud.controller.stub.domain.Partition;
-import org.apache.stratos.cloud.controller.stub.domain.MemberContext;
-import org.apache.stratos.autoscaler.context.cluster.ClusterInstanceContext;
-
-import org.apache.stratos.autoscaler.pojo.policy.autoscale.LoadAverage
-import org.apache.stratos.autoscaler.pojo.policy.autoscale.MemoryConsumption
-
-global org.apache.stratos.autoscaler.rule.RuleLog log;
-global org.apache.stratos.autoscaler.rule.RuleTasksDelegator delegator;
-global org.apache.stratos.autoscaler.pojo.policy.autoscale.AutoscalePolicy autoscalePolicy;
-global java.lang.String applicationId;
-global java.lang.String clusterId;
-global java.lang.Boolean rifReset;
-global java.lang.Boolean mcReset;
-global java.lang.Boolean laReset;
-global java.lang.Boolean arspiReset;
-global java.lang.String algorithmName;
-
-rule "Scaling Rule"
-dialect "mvel"
-	when
-       clusterInstanceContext : ClusterInstanceContext ()
-
-        loadThresholds : LoadThresholds() from  autoscalePolicy.getLoadThresholds()
-        partitionAlgorithm : PartitionAlgorithm() from  delegator.getPartitionAlgorithm(algorithmName)
-
-        eval(log.debug("Running scale up rule: [network-partition] " + clusterInstanceContext.getNetworkPartitionId() +
-            " [cluster] " + clusterId))
-        eval(log.debug("[scaling] [network-partition] " + clusterInstanceContext.getNetworkPartitionId() + " [cluster] "
-            + clusterId + " Algorithm name: " + algorithmName))
-
-	
-        rifThreshold : Float() from  loadThresholds.getRequestsInFlightThreshold()
-
-        rifAverage : Float() from  clusterInstanceContext.getAverageRequestsInFlight()
-        rifGradient : Float() from  clusterInstanceContext.getRequestsInFlightGradient()
-        rifSecondDerivative : Float() from  clusterInstanceContext.getRequestsInFlightSecondDerivative()
-	    rifPredictedValue : Double() from delegator.getPredictedValueForNextMinute(rifAverage, rifGradient, rifSecondDerivative, 1)
-
-        mcThreshold : Float() from  loadThresholds.getMemoryConsumptionThreshold()
-
-        mcPredictedValue : Double() from delegator.getMemoryConsumptionPredictedValue(clusterInstanceContext)
-
-        laThreshold : Float() from  loadThresholds.getLoadAverageThreshold()
-
-        laPredictedValue : Double() from delegator.getLoadAveragePredictedValue(clusterInstanceContext)
-
-        activeInstancesCount : Integer() from clusterInstanceContext.getActiveMemberCount()
-        maxInstancesCount : Integer() from clusterInstanceContext.getMaxInstanceCount()
-        minInstancesCount : Integer() from clusterInstanceContext.getMinInstanceCount()
-        requestsServedPerInstance : Float() from  clusterInstanceContext.getRequestsServedPerInstance()
-        averageRequestsServedPerInstance : Float() from  clusterInstanceContext.getAverageRequestsServedPerInstance()
-
-        numberOfInstancesReuquiredBasedOnRif : Integer() from delegator.getNumberOfInstancesRequiredBasedOnRif(
-            rifPredictedValue, rifThreshold)
-        numberOfInstancesReuquiredBasedOnMemoryConsumption : Integer() from
-            delegator.getNumberOfInstancesRequiredBasedOnMemoryConsumption(mcThreshold, mcPredictedValue, minInstancesCount,
-            maxInstancesCount)
-        numberOfInstancesReuquiredBasedOnLoadAverage : Integer() from
-            delegator.getNumberOfInstancesRequiredBasedOnLoadAverage(laThreshold, laPredictedValue, minInstancesCount)
-
-        numberOfRequiredInstances : Integer() from delegator.getMaxNumberOfInstancesRequired(
-            numberOfInstancesReuquiredBasedOnRif, numberOfInstancesReuquiredBasedOnMemoryConsumption, mcReset,
-            numberOfInstancesReuquiredBasedOnLoadAverage, laReset)
-
-
-
-        scaleUp : Boolean() from (activeInstancesCount < numberOfRequiredInstances)
-        scaleDown : Boolean() from (activeInstancesCount > numberOfRequiredInstances || (numberOfRequiredInstances == 1 && activeInstancesCount == 1))
-
-
-        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 threshold: " + rifThreshold))
-
-        eval(log.debug("[scaling] " + "[cluster] " + clusterId + " MC predicted value: " + mcPredictedValue))
-        eval(log.debug("[scaling] " + "[cluster] " + clusterId + " MC threshold: " + mcThreshold))
-
-        eval(log.debug("[scaling] " + "[cluster] " + clusterId + " LA predicted value: " + laPredictedValue))
-        eval(log.debug("[scaling] " + "[cluster] " + clusterId + " LA threshold: " + laThreshold))
-
-        eval(log.debug("[scaling] " + "[cluster] " + clusterId + " Scale-up action: " + scaleUp))
-        eval(log.debug("[scaling] " + "[cluster] " + clusterId + " Scale-down action: " + scaleDown))
-
-	then
-
-	    log.debug("[scaling] Number of required instances based on stats: " + numberOfRequiredInstances + " " +
-	        "[active instances count] " + activeInstancesCount + " [network-partition] " +
-	        clusterInstanceContext.getNetworkPartitionId() + " [cluster] " + clusterId);
-
-        int nonTerminatedMembers = clusterInstanceContext.getNonTerminatedMemberCount();
-        if(scaleUp){
-
-            int clusterMaxMembers = clusterInstanceContext.getMaxInstanceCount();
-            if (nonTerminatedMembers < clusterMaxMembers) {
-
-                int additionalInstances = 0;
-                if(clusterMaxMembers < numberOfRequiredInstances){
-
-                    additionalInstances = clusterMaxMembers - nonTerminatedMembers;
-                    log.info("[scale-up] Required member count based on stat based scaling is higher than max, hence"
-                            + " notifying to parent for possible group scaling or app bursting. [cluster] " + clusterId
-                            + " [instance id]" + clusterInstanceContext.getId() + " [max] " + clusterMaxMembers
-                            + " [number of required instances] " + numberOfRequiredInstances
-                            + " [additional instances to be created] " + additionalInstances);
-                    delegator.delegateScalingOverMaxNotification(clusterId, clusterInstanceContext.getNetworkPartitionId(),
-                        clusterInstanceContext.getId());
-                } else {
-
-                    additionalInstances = numberOfRequiredInstances - nonTerminatedMembers;
-                }
-
-                clusterInstanceContext.resetScaleDownRequestsCount();
-
-                log.debug("[scale-up] " + " [has scaling dependents] " + clusterInstanceContext.hasScalingDependants() +
-                    " [cluster] " + clusterId );
-                if(clusterInstanceContext.hasScalingDependants()) {
-
-                    log.debug("[scale-up] Notifying dependencies [cluster] " + clusterId);
-                    delegator.delegateScalingDependencyNotification(clusterId, clusterInstanceContext.getNetworkPartitionId(),
-                        clusterInstanceContext.getId(), numberOfRequiredInstances, clusterInstanceContext.getMinInstanceCount());
-                } else {
-
-                    boolean partitionsAvailable = true;
-                    int count = 0;
-
-                    while(count != additionalInstances && partitionsAvailable){
-
-                        ClusterLevelPartitionContext partitionContext = (ClusterLevelPartitionContext) partitionAlgorithm.getNextScaleUpPartitionContext(clusterInstanceContext.getPartitionCtxtsAsAnArray());
-                        if(partitionContext != null){
-
-                            log.info("[scale-up] Partition available, hence trying to spawn an instance to scale up! " +
-                                " [application id] " + applicationId +
-                                " [cluster] " + clusterId + " [instance id] " + clusterInstanceContext.getId() +
-                                " [network-partition] " + clusterInstanceContext.getNetworkPartitionId() +
-                                " [partition] " + partitionContext.getPartitionId() +
-                                " scaleup due to RIF: " + (rifReset && (rifPredictedValue > rifThreshold)) +
-                                " [rifPredictedValue] " + rifPredictedValue + " [rifThreshold] " + rifThreshold +
-                                " scaleup due to MC: " + (mcReset && (mcPredictedValue > mcThreshold)) +
-                                " [mcPredictedValue] " + mcPredictedValue + " [mcThreshold] " + mcThreshold +
-                                " scaleup due to LA: " + (laReset && (laPredictedValue > laThreshold)) +
-                                " [laPredictedValue] " + laPredictedValue + " [laThreshold] " + laThreshold);
-
-                            log.debug("[scale-up] " + " [partition] " + partitionContext.getPartitionId() + " [cluster] " + clusterId );
-                            delegator.delegateSpawn(partitionContext, clusterId, clusterInstanceContext.getId());
-                            count++;
-                        } else {
-
-                            log.warn("[scale-up] No more partition available even though " +
-                             "cartridge-max is not reached!, [cluster] " + clusterId +
-                            " Please update deployment-policy with new partitions or with higher " +
-                             "partition-max");
-                            partitionsAvailable = false;
-                        }
-                    }
-                }
-            } else {
-                log.info("[scale-up] Trying to scale up over max, hence not scaling up cluster itself and
-                        notifying to parent for possible group scaling or app bursting.
-                        [cluster] " + clusterId + " [instance id]" + clusterInstanceContext.getId() +
-                        " [max] " + clusterMaxMembers);
-                delegator.delegateScalingOverMaxNotification(clusterId, clusterInstanceContext.getNetworkPartitionId(),
-                    clusterInstanceContext.getId());
-            }
-        } else if(scaleDown){
-
-            if(nonTerminatedMembers > clusterInstanceContext.getMinInstanceCount){
-
-                log.debug("[scale-down] Decided to Scale down [cluster] " + clusterId);
-                if(clusterInstanceContext.getScaleDownRequestsCount() >= 0 ){
-
-                    log.debug("[scale-down] Reached scale down requests threshold [cluster] " + clusterId + " Count " +
-                        clusterInstanceContext.getScaleDownRequestsCount());
-
-                    if(clusterInstanceContext.hasScalingDependants()) {
-
-                        log.debug("[scale-up] Notifying dependencies [cluster] " + clusterId);
-                        delegator.delegateScalingDependencyNotification(clusterId, clusterInstanceContext.getNetworkPartitionId(),
-                            clusterInstanceContext.getId(), numberOfRequiredInstances, clusterInstanceContext.getMinInstanceCount());
-                    } else{
-
-                        MemberStatsContext selectedMemberStatsContext = null;
-                        double lowestOverallLoad = 0.0;
-                        boolean foundAValue = false;
-                        ClusterLevelPartitionContext partitionContext = (ClusterLevelPartitionContext) partitionAlgorithm.getNextScaleDownPartitionContext(clusterInstanceContext.getPartitionCtxtsAsAnArray());
-                        if(partitionContext != null) {
-                            log.info("[scale-down] Partition available to scale down " +
-                                " [application id] " + applicationId +
-                                " [cluster] " + clusterId + " [instance id] " + clusterInstanceContext.getId() +
-                                " [network-partition] " + clusterInstanceContext.getNetworkPartitionId() +
-                                " [partition] " + partitionContext.getPartitionId() +
-                                " scaledown due to RIF: " + (rifReset && (rifPredictedValue < rifThreshold)) +
-                                " [rifPredictedValue] " + rifPredictedValue + " [rifThreshold] " + rifThreshold +
-                                " scaledown due to MC: " + (mcReset && (mcPredictedValue < mcThreshold)) +
-                                " [mcPredictedValue] " + mcPredictedValue + " [mcThreshold] " + mcThreshold +
-                                " scaledown due to LA: " + (laReset && (laPredictedValue < laThreshold)) +
-                                " [laPredictedValue] " + laPredictedValue + " [laThreshold] " + laThreshold
-                            );
-
-
-                            for(MemberStatsContext memberStatsContext: partitionContext.getMemberStatsContexts().values()){
-
-                                LoadAverage loadAverage = memberStatsContext.getLoadAverage();
-                                log.debug("[scale-down] " + " [cluster] "
-                                    + clusterId + " [member] " + memberStatsContext.getMemberId() + " Load average: " + loadAverage);
-
-                                MemoryConsumption memoryConsumption = memberStatsContext.getMemoryConsumption();
-                                log.debug("[scale-down] " + " [partition] " + partitionContext.getPartitionId() + " [cluster] "
-                                    + clusterId + " [member] " + memberStatsContext.getMemberId() + " Memory consumption: " +
-                                    memoryConsumption);
-
-                                double predictedCpu = delegator.getPredictedValueForNextMinute(loadAverage.getAverage(),
-                                    loadAverage.getGradient(),loadAverage.getSecondDerivative(), 1);
-                                log.debug("[scale-down] " + " [partition] " + partitionContext.getPartitionId() + " [cluster] "
-                                    + clusterId + " [member] " + memberStatsContext.getMemberId() + " Predicted CPU: " + predictedCpu);
-
-                                double predictedMemoryConsumption = delegator.getPredictedValueForNextMinute(
-                                    memoryConsumption.getAverage(),memoryConsumption.getGradient(),memoryConsumption.getSecondDerivative(), 1);
-                                log.debug("[scale-down] " + " [partition] " + partitionContext.getPartitionId() + " [cluster] "
-                                    + clusterId + " [member] " + memberStatsContext.getMemberId() + " Predicted memory consumption: " +
-                                        predictedMemoryConsumption);
-
-                                double overallLoad = (predictedCpu + predictedMemoryConsumption) / 2;
-                                log.debug("[scale-down] " + " [partition] " + partitionContext.getPartitionId() + " [cluster] "
-                                    + clusterId + " [member] " + memberStatsContext.getMemberId() + " Overall load: " + overallLoad);
-
-                                if(!foundAValue){
-                                    foundAValue = true;
-                                    selectedMemberStatsContext = memberStatsContext;
-                                    lowestOverallLoad = overallLoad;
-                                } else if(overallLoad < lowestOverallLoad){
-                                    selectedMemberStatsContext = memberStatsContext;
-                                    lowestOverallLoad = overallLoad;
-                                }
-
-                            }
-                            if(selectedMemberStatsContext != null) {
-                                log.info("[scale-down] Trying to terminating an instace to scale down!" );
-                                log.debug("[scale-down] " + " [partition] " + partitionContext.getPartitionId() + " [cluster] "
-                                    + clusterId + " Member with lowest overall load: " + selectedMemberStatsContext.getMemberId());
-
-                                delegator.delegateTerminate(partitionContext, selectedMemberStatsContext.getMemberId());
-                            }
-                        } else {
-                            log.warn("Partition is not available to scale-down..!!!!");
-                        }
-                    }
-                } else{
-                     log.debug("[scale-down] Not reached scale down requests threshold. " + clusterId + " Count " +
-                        clusterInstanceContext.getScaleDownRequestsCount());
-                     clusterInstanceContext.increaseScaleDownRequestsCount();
-
-                }
-            } else {
-                log.debug("[scale-down] Min is reached, hence not scaling down [cluster] " + clusterId + " [instance id]"
-                    + clusterInstanceContext.getId());
-                //if(clusterInstanceContext.isInGroupScalingEnabledSubtree()){
-
-                    delegator.delegateScalingDownBeyondMinNotification(clusterId, clusterInstanceContext.getNetworkPartitionId(),
-                        clusterInstanceContext.getId());
-                //}
-            }
-        }  else{
-            log.debug("[scaling] No decision made to either scale up or scale down ... [cluster] " + clusterId + " [instance id]"
-             + clusterInstanceContext.getId());
-
-        }
-
-end
-
-
-
-

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/deployment-policy-test/deployment-policies/deployment-policy-deployment-policy-test-1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/deployment-policy-test/deployment-policies/deployment-policy-deployment-policy-test-1.json b/products/stratos/modules/integration/src/test/resources/deployment-policy-test/deployment-policies/deployment-policy-deployment-policy-test-1.json
deleted file mode 100644
index edab5bd..0000000
--- a/products/stratos/modules/integration/src/test/resources/deployment-policy-test/deployment-policies/deployment-policy-deployment-policy-test-1.json
+++ /dev/null
@@ -1,32 +0,0 @@
-{
-    "id": "deployment-policy-deployment-policy-test-1",
-    "networkPartitions": [
-        {
-            "id": "network-partition-deployment-policy-test-1",
-            "partitionAlgo": "one-after-another",
-            "partitions": [
-                {
-                    "id": "partition-1",
-                    "partitionMax": 20
-                }
-            ]
-        },
-        {
-            "id": "network-partition-deployment-policy-test-2",
-            "partitionAlgo": "round-robin",
-            "partitions": [
-                {
-                    "id": "network-partition-6-partition-1",
-                    "partitionMax": 10
-                },
-                {
-                    "id": "network-partition-6-partition-2",
-                    "partitionMax": 9
-                }
-            ]
-        }
-    ]
-}
-
-
-

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/deployment-policy-test/deployment-policies/deployment-policy-deployment-policy-test-2.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/deployment-policy-test/deployment-policies/deployment-policy-deployment-policy-test-2.json b/products/stratos/modules/integration/src/test/resources/deployment-policy-test/deployment-policies/deployment-policy-deployment-policy-test-2.json
deleted file mode 100644
index 18cb31c..0000000
--- a/products/stratos/modules/integration/src/test/resources/deployment-policy-test/deployment-policies/deployment-policy-deployment-policy-test-2.json
+++ /dev/null
@@ -1,32 +0,0 @@
-{
-    "id": "deployment-policy-deployment-policy-test-2",
-    "networkPartitions": [
-        {
-            "id": "network-partition-deployment-policy-test-1",
-            "partitionAlgo": "one-after-another",
-            "partitions": [
-                {
-                    "id": "partition-1",
-                    "partitionMax": 20
-                }
-            ]
-        },
-        {
-            "id": "network-partition-deployment-policy-test-2",
-            "partitionAlgo": "round-robin",
-            "partitions": [
-                {
-                    "id": "network-partition-6-partition-1",
-                    "partitionMax": 10
-                },
-                {
-                    "id": "network-partition-6-partition-2",
-                    "partitionMax": 9
-                }
-            ]
-        }
-    ]
-}
-
-
-

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/deployment-policy-test/deployment-policies/deployment-policy-deployment-policy-test-v1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/deployment-policy-test/deployment-policies/deployment-policy-deployment-policy-test-v1.json b/products/stratos/modules/integration/src/test/resources/deployment-policy-test/deployment-policies/deployment-policy-deployment-policy-test-v1.json
deleted file mode 100644
index 6c73878..0000000
--- a/products/stratos/modules/integration/src/test/resources/deployment-policy-test/deployment-policies/deployment-policy-deployment-policy-test-v1.json
+++ /dev/null
@@ -1,36 +0,0 @@
-{
-    "id": "deployment-policy-deployment-policy-test",
-    "networkPartitions": [
-        {
-            "id": "network-partition-deployment-policy-test-1",
-            "partitionAlgo": "one-after-another",
-            "partitions": [
-                {
-                    "id": "partition-1",
-                    "partitionMax": 25
-                },
-                {
-                    "id": "partition-2",
-                    "partitionMax": 20
-                }
-            ]
-        },
-        {
-            "id": "network-partition-deployment-policy-test-2",
-            "partitionAlgo": "round-robin",
-            "partitions": [
-                {
-                    "id": "network-partition-6-partition-1",
-                    "partitionMax": 15
-                },
-                {
-                    "id": "network-partition-6-partition-2",
-                    "partitionMax": 5
-                }
-            ]
-        }
-    ]
-}
-
-
-

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/deployment-policy-test/deployment-policies/deployment-policy-deployment-policy-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/deployment-policy-test/deployment-policies/deployment-policy-deployment-policy-test.json b/products/stratos/modules/integration/src/test/resources/deployment-policy-test/deployment-policies/deployment-policy-deployment-policy-test.json
deleted file mode 100644
index 49b3e0d..0000000
--- a/products/stratos/modules/integration/src/test/resources/deployment-policy-test/deployment-policies/deployment-policy-deployment-policy-test.json
+++ /dev/null
@@ -1,32 +0,0 @@
-{
-    "id": "deployment-policy-deployment-policy-test",
-    "networkPartitions": [
-        {
-            "id": "network-partition-deployment-policy-test-1",
-            "partitionAlgo": "one-after-another",
-            "partitions": [
-                {
-                    "id": "partition-1",
-                    "partitionMax": 20
-                }
-            ]
-        },
-        {
-            "id": "network-partition-deployment-policy-test-2",
-            "partitionAlgo": "round-robin",
-            "partitions": [
-                {
-                    "id": "network-partition-6-partition-1",
-                    "partitionMax": 10
-                },
-                {
-                    "id": "network-partition-6-partition-2",
-                    "partitionMax": 9
-                }
-            ]
-        }
-    ]
-}
-
-
-

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/deployment-policy-test/network-partitions/mock/network-partition-deployment-policy-test-1-v1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/deployment-policy-test/network-partitions/mock/network-partition-deployment-policy-test-1-v1.json b/products/stratos/modules/integration/src/test/resources/deployment-policy-test/network-partitions/mock/network-partition-deployment-policy-test-1-v1.json
deleted file mode 100644
index 9670e48..0000000
--- a/products/stratos/modules/integration/src/test/resources/deployment-policy-test/network-partitions/mock/network-partition-deployment-policy-test-1-v1.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
-    "id": "network-partition-deployment-policy-test-1",
-    "provider": "mock",
-    "partitions": [
-        {
-            "id": "partition-1",
-            "property": [
-                {
-                    "name": "region",
-                    "value": "default"
-                }
-            ]
-        },
-        {
-            "id": "partition-2",
-            "property": [
-                {
-                    "name": "region",
-                    "value": "default1"
-                },
-                {
-                    "name": "zone",
-                    "value": "z1"
-                }
-            ]
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/deployment-policy-test/network-partitions/mock/network-partition-deployment-policy-test-1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/deployment-policy-test/network-partitions/mock/network-partition-deployment-policy-test-1.json b/products/stratos/modules/integration/src/test/resources/deployment-policy-test/network-partitions/mock/network-partition-deployment-policy-test-1.json
deleted file mode 100644
index 3b420fe..0000000
--- a/products/stratos/modules/integration/src/test/resources/deployment-policy-test/network-partitions/mock/network-partition-deployment-policy-test-1.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
-    "id": "network-partition-deployment-policy-test-1",
-    "provider": "mock",
-    "partitions": [
-        {
-            "id": "partition-1",
-            "property": [
-                {
-                    "name": "region",
-                    "value": "default"
-                }
-            ]
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/deployment-policy-test/network-partitions/mock/network-partition-deployment-policy-test-2.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/deployment-policy-test/network-partitions/mock/network-partition-deployment-policy-test-2.json b/products/stratos/modules/integration/src/test/resources/deployment-policy-test/network-partitions/mock/network-partition-deployment-policy-test-2.json
deleted file mode 100644
index 890ee6c..0000000
--- a/products/stratos/modules/integration/src/test/resources/deployment-policy-test/network-partitions/mock/network-partition-deployment-policy-test-2.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
-    "id": "network-partition-deployment-policy-test-2",
-    "provider": "mock",
-    "partitions": [
-        {
-            "id": "network-partition-6-partition-1",
-            "property": [
-                {
-                    "name": "region",
-                    "value": "default"
-                }
-            ]
-        },
-        {
-            "id": "network-partition-6-partition-2",
-            "property": [
-                {
-                    "name": "region",
-                    "value": "default"
-                }
-            ]
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/group-startup-order-test/application-policies/application-policy-application-bursting-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/application-policies/application-policy-application-bursting-test.json b/products/stratos/modules/integration/src/test/resources/group-startup-order-test/application-policies/application-policy-application-bursting-test.json
deleted file mode 100644
index 7bc9c2d..0000000
--- a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/application-policies/application-policy-application-bursting-test.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
-    "id": "application-policy-group-startup-order-test",
-    "algorithm": "one-after-another",
-    "networkPartitions": [
-        "network-partition-group-startup-order-test-1",
-        "network-partition-group-startup-order-test-2"
-    ],
-    "properties": [
-        {
-            "name": "networkPartitionGroups",
-            "value": "network-partition-group-startup-order-test-1|network-partition-group-startup-order-test-2"
-        },
-        {
-            "name": "key-2",
-            "value": "value-2"
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/group-startup-order-test/application-policies/application-policy-group-startup-order-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/application-policies/application-policy-group-startup-order-test.json b/products/stratos/modules/integration/src/test/resources/group-startup-order-test/application-policies/application-policy-group-startup-order-test.json
deleted file mode 100644
index e7d80a5..0000000
--- a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/application-policies/application-policy-group-startup-order-test.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
-    "id": "application-policy-group-startup-order-test",
-    "algorithm": "one-after-another",
-    "networkPartitions": [
-        "network-partition-group-startup-order-test-1"
-    ],
-    "properties": [
-        {
-            "name": "key-2",
-            "value": "value-2"
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/group-startup-order-test/applications/app-bursting-single-cartriddge-group.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/applications/app-bursting-single-cartriddge-group.json b/products/stratos/modules/integration/src/test/resources/group-startup-order-test/applications/app-bursting-single-cartriddge-group.json
deleted file mode 100644
index db04c61..0000000
--- a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/applications/app-bursting-single-cartriddge-group.json
+++ /dev/null
@@ -1,70 +0,0 @@
-{
-    "applicationId": "group-startup-order-test",
-    "alias": "my-cartridge-group-app",
-    "components": {
-        "groups": [
-            {
-                "name": "esb-php-group-group-startup-order-test",
-                "alias": "my-esb-php-group-group-startup-order-test",
-                "deploymentPolicy": "deployment-policy-group-startup-order-test",
-                "groupMinInstances": 1,
-                "groupMaxInstances": 2,
-                "cartridges": [
-                    {
-                        "type": "esb-group-startup-order-test",
-                        "cartridgeMin": 1,
-                        "cartridgeMax": 2,
-                        "subscribableInfo": {
-                            "alias": "my-esb-group-startup-order-test",
-                            "autoscalingPolicy": "autoscaling-policy-group-startup-order-test",
-                            "artifactRepository": {
-                                "privateRepo": false,
-                                "repoUrl": "https://github.com/imesh/stratos-esb-applications.git",
-                                "repoUsername": "",
-                                "repoPassword": ""
-                            }
-                        }
-                    },
-                    {
-                        "type": "php-group-startup-order-test",
-                        "cartridgeMin": 2,
-                        "cartridgeMax": 4,
-                        "lvsVirtualIP": "192.168.56.50|255.255.255.0",
-                        "subscribableInfo": {
-                            "alias": "my-php-group-startup-order-test",
-                            "autoscalingPolicy": "autoscaling-policy-group-startup-order-test",
-                            "artifactRepository": {
-                                "privateRepo": false,
-                                "repoUrl": "https://github.com/imesh/stratos-php-applications.git",
-                                "repoUsername": "",
-                                "repoPassword": ""
-                            }
-                        }
-                    }
-                ]
-            }
-        ],
-        "cartridges": [
-            {
-                "type": "tomcat-group-startup-order-test",
-                "cartridgeMin": 2,
-                "cartridgeMax": 4,
-                "subscribableInfo": {
-                    "alias": "my-tomcat-group-startup-order-test",
-                    "autoscalingPolicy": "autoscaling-policy-group-startup-order-test",
-                    "deploymentPolicy": "deployment-policy-group-startup-order-test",
-                    "artifactRepository": {
-                        "privateRepo": false,
-                        "repoUrl": "https://github.com/imesh/stratos-tomcat-applications.git",
-                        "repoUsername": "",
-                        "repoPassword": ""
-                    }
-                }
-            }
-        ],
-        "dependencies": {
-            "terminationBehaviour": "terminate-none"
-        }
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/group-startup-order-test/applications/group-startup-order-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/applications/group-startup-order-test.json b/products/stratos/modules/integration/src/test/resources/group-startup-order-test/applications/group-startup-order-test.json
deleted file mode 100644
index 60ed310..0000000
--- a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/applications/group-startup-order-test.json
+++ /dev/null
@@ -1,206 +0,0 @@
-{
-    "applicationId": "group-startup-order-test",
-    "alias": "group-startup-order-test",
-    "components": {
-        "groups": [
-            {
-                "name": "group6-group-startup-order-test",
-                "alias": "my-group6-group-startup-order-test",
-                "groupMinInstances": 1,
-                "groupMaxInstances": 1,
-                "groups": [
-                    {
-                        "name": "group7-group-startup-order-test",
-                        "alias": "my-group7-group-startup-order-test",
-                        "deploymentPolicy": "deployment-policy-group-startup-order-test",
-                        "groupMinInstances": 1,
-                        "groupMaxInstances": 1,
-                        "cartridges": [
-                            {
-                                "type": "tomcat-group-startup-order-test",
-                                "cartridgeMin": 1,
-                                "cartridgeMax": 2,
-                                "subscribableInfo": {
-                                    "alias": "my-group7-tomcat-group-startup-order-test",
-                                    "autoscalingPolicy": "autoscaling-policy-group-startup-order-test",
-                                    "artifactRepository": {
-                                        "privateRepo": false,
-                                        "repoUrl": "https://github.com/imesh/stratos-tomcat1-applications.git",
-                                        "repoUsername": "",
-                                        "repoPassword": ""
-                                    }
-                                }
-                            },
-                            {
-                                "type": "tomcat1-group-startup-order-test",
-                                "cartridgeMin": 1,
-                                "cartridgeMax": 2,
-                                "subscribableInfo": {
-                                    "alias": "my-group7-tomcat1-group-startup-order-test",
-                                    "autoscalingPolicy": "autoscaling-policy-group-startup-order-test",
-                                    "artifactRepository": {
-                                        "privateRepo": false,
-                                        "repoUrl": "https://github.com/imesh/stratos-tomcat1-applications.git",
-                                        "repoUsername": "",
-                                        "repoPassword": ""
-                                    }
-                                }
-                            }
-                        ]
-                    },
-                    {
-                        "name": "group-tom2-group-startup-order-test",
-                        "alias": "my-group6-group-tom2-group-startup-order-test",
-                        "deploymentPolicy": "deployment-policy-group-startup-order-test",
-                        "groupMinInstances": 1,
-                        "groupMaxInstances": 1,
-                        "cartridges": [
-                            {
-                                "type": "tomcat2-group-startup-order-test",
-                                "cartridgeMin": 1,
-                                "cartridgeMax": 2,
-                                "subscribableInfo": {
-                                    "alias": "my-group-tom2-tomcat2-group-startup-order-test",
-                                    "autoscalingPolicy": "autoscaling-policy-group-startup-order-test",
-                                    "artifactRepository": {
-                                        "privateRepo": false,
-                                        "repoUrl": "https://github.com/imesh/stratos-tomcat2-applications.git",
-                                        "repoUsername": "",
-                                        "repoPassword": ""
-                                    }
-                                }
-                            },
-                            {
-                                "type": "tomcat3-group-startup-order-test",
-                                "cartridgeMin": 1,
-                                "cartridgeMax": 2,
-                                "subscribableInfo": {
-                                    "alias": "my-group-tom2-tomcat3-group-startup-order-test",
-                                    "autoscalingPolicy": "autoscaling-policy-group-startup-order-test",
-                                    "artifactRepository": {
-                                        "privateRepo": false,
-                                        "repoUrl": "https://github.com/imesh/stratos-tomcat2-applications.git",
-                                        "repoUsername": "",
-                                        "repoPassword": ""
-                                    }
-                                }
-                            }
-                        ]
-                    }
-                ]
-            },
-            {
-                "name": "group8-group-startup-order-test",
-                "alias": "my-group8-group-startup-order-test",
-                "groupMinInstances": 1,
-                "groupMaxInstances": 1,
-                "deploymentPolicy": "deployment-policy-group-startup-order-test",
-                "groups": [
-                    {
-                        "name": "group9-group-startup-order-test",
-                        "alias": "my-group9-group-startup-order-test",
-                        "groupMinInstances": 1,
-                        "groupMaxInstances": 1,
-                        "cartridges": [
-                            {
-                                "type": "tomcat1-group-startup-order-test",
-                                "cartridgeMin": 1,
-                                "cartridgeMax": 2,
-                                "subscribableInfo": {
-                                    "alias": "my-tomcat1-group9-group-startup-order-test",
-                                    "autoscalingPolicy": "autoscaling-policy-group-startup-order-test",
-                                    "artifactRepository": {
-                                        "privateRepo": false,
-                                        "repoUrl": "https://github.com/imesh/stratos-tomcat1-applications.git",
-                                        "repoUsername": "",
-                                        "repoPassword": ""
-                                    }
-                                }
-                            }
-                        ]
-                    }
-                ],
-                "cartridges": [
-                    {
-                        "type": "tomcat2-group-startup-order-test",
-                        "cartridgeMin": 1,
-                        "cartridgeMax": 2,
-                        "subscribableInfo": {
-                            "alias": "my-tomcat2-group8-group-startup-order-test",
-                            "autoscalingPolicy": "autoscaling-policy-group-startup-order-test",
-                            "artifactRepository": {
-                                "privateRepo": false,
-                                "repoUrl": "https://github.com/imesh/stratos-tomcat2-applications.git",
-                                "repoUsername": "",
-                                "repoPassword": ""
-                            }
-                        }
-                    },
-                    {
-                        "type": "tomcat-group-startup-order-test",
-                        "cartridgeMin": 1,
-                        "cartridgeMax": 2,
-                        "subscribableInfo": {
-                            "alias": "my-tomcat-group8-group-startup-order-test",
-                            "autoscalingPolicy": "autoscaling-policy-group-startup-order-test",
-                            "artifactRepository": {
-                                "privateRepo": false,
-                                "repoUrl": "https://github.com/imesh/stratos-tomcat2-applications.git",
-                                "repoUsername": "",
-                                "repoPassword": ""
-                            }
-                        }
-                    }
-                ]
-            }
-        ],
-        "cartridges": [
-            {
-                "type": "stratos-lb-group-startup-order-test",
-                "cartridgeMin": 1,
-                "cartridgeMax": 2,
-                "subscribableInfo": {
-                    "alias": "my-stratos-lb-group-startup-order-test",
-                    "autoscalingPolicy": "autoscaling-policy-group-startup-order-test",
-                    "deploymentPolicy": "deployment-policy-group-startup-order-test"
-                }
-            },
-            {
-                "type": "tomcat-group-startup-order-test",
-                "cartridgeMin": 1,
-                "cartridgeMax": 2,
-                "subscribableInfo": {
-                    "alias": "my-tomcat-group-startup-order-test",
-                    "autoscalingPolicy": "autoscaling-policy-group-startup-order-test",
-                    "deploymentPolicy": "deployment-policy-group-startup-order-test",
-                    "artifactRepository": {
-                        "privateRepo": false,
-                        "repoUrl": "https://github.com/imesh/stratos-tomcat-applications.git",
-                        "repoUsername": "",
-                        "repoPassword": ""
-                    }
-                }
-            }
-        ],
-        "dependencies": {
-            "startupOrders": [
-                {
-                    "aliases": [
-                        "cartridge.my-stratos-lb-group-startup-order-test",
-                        "cartridge.my-tomcat-group-startup-order-test",
-                        "group.my-group8-group-startup-order-test"
-                    ]
-                },
-                {
-                    "aliases": [
-                        "cartridge.my-stratos-lb-group-startup-order-test",
-                        "cartridge.my-tomcat-group-startup-order-test",
-                        "group.my-group6-group-startup-order-test"
-                    ]
-                }
-            ],
-            "terminationBehaviour": "terminate-all"
-        }
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/group-startup-order-test/autoscaling-policies/autoscaling-policy-application-bursting-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/autoscaling-policies/autoscaling-policy-application-bursting-test.json b/products/stratos/modules/integration/src/test/resources/group-startup-order-test/autoscaling-policies/autoscaling-policy-application-bursting-test.json
deleted file mode 100644
index 0c6ec97..0000000
--- a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/autoscaling-policies/autoscaling-policy-application-bursting-test.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
-    "id": "autoscaling-policy-group-startup-order-test",
-    "loadThresholds": {
-        "requestsInFlight": {
-            "threshold": 35
-        },
-        "memoryConsumption": {
-            "threshold": 45
-        },
-        "loadAverage": {
-            "threshold": 25
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/group-startup-order-test/autoscaling-policies/autoscaling-policy-group-startup-order-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/autoscaling-policies/autoscaling-policy-group-startup-order-test.json b/products/stratos/modules/integration/src/test/resources/group-startup-order-test/autoscaling-policies/autoscaling-policy-group-startup-order-test.json
deleted file mode 100644
index 0c6ec97..0000000
--- a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/autoscaling-policies/autoscaling-policy-group-startup-order-test.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
-    "id": "autoscaling-policy-group-startup-order-test",
-    "loadThresholds": {
-        "requestsInFlight": {
-            "threshold": 35
-        },
-        "memoryConsumption": {
-            "threshold": 45
-        },
-        "loadAverage": {
-            "threshold": 25
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/group-startup-order-test/cartridges-groups/esb-php-group-application-bursting-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/cartridges-groups/esb-php-group-application-bursting-test.json b/products/stratos/modules/integration/src/test/resources/group-startup-order-test/cartridges-groups/esb-php-group-application-bursting-test.json
deleted file mode 100644
index 9c7d997..0000000
--- a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/cartridges-groups/esb-php-group-application-bursting-test.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
-    "name": "esb-php-group-group-startup-order-test",
-    "cartridges": [
-        "esb-group-startup-order-test",
-        "php-group-startup-order-test"
-    ],
-    "dependencies": {
-        "startupOrders": [
-            {
-                "aliases": [
-                    "cartridge.my-esb-group-startup-order-test",
-                    "cartridge.my-php-group-startup-order-test"
-                ]
-            }
-        ],
-        "terminationBehaviour": "terminate-none"
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/group-startup-order-test/cartridges-groups/group6-group-startup-order-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/cartridges-groups/group6-group-startup-order-test.json b/products/stratos/modules/integration/src/test/resources/group-startup-order-test/cartridges-groups/group6-group-startup-order-test.json
deleted file mode 100644
index 75d71fb..0000000
--- a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/cartridges-groups/group6-group-startup-order-test.json
+++ /dev/null
@@ -1,44 +0,0 @@
-{
-    "name": "group6-group-startup-order-test",
-    "groups": [
-        {
-            "name": "group7-group-startup-order-test",
-            "cartridges": [
-                "tomcat-group-startup-order-test",
-                "tomcat1-group-startup-order-test"
-            ],
-            "dependencies": {
-                "terminationBehaviour": "terminate-none",
-                "startupOrders": [
-                    {
-                        "aliases": [
-                            "cartridge.my-group7-tomcat-group-startup-order-test",
-                            "cartridge.my-group7-tomcat1-group-startup-order-test"
-                        ]
-                    }
-                ]
-            }
-        },
-        {
-            "name": "group-tom2-group-startup-order-test",
-            "dependencies": {
-                "terminationBehaviour": "terminate-none",
-                "startupOrders": [
-                    {
-                        "aliases": [
-                            "cartridge.my-group-tom2-tomcat2-group-startup-order-test",
-                            "cartridge.my-group-tom2-tomcat3-group-startup-order-test"
-                        ]
-                    }
-                ]
-            },
-            "cartridges": [
-                "tomcat2-group-startup-order-test",
-                "tomcat3-group-startup-order-test"
-            ]
-        }
-    ]
-}
-
-
-

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/group-startup-order-test/cartridges-groups/group8-group-startup-order-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/cartridges-groups/group8-group-startup-order-test.json b/products/stratos/modules/integration/src/test/resources/group-startup-order-test/cartridges-groups/group8-group-startup-order-test.json
deleted file mode 100644
index c83b1ce..0000000
--- a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/cartridges-groups/group8-group-startup-order-test.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
-    "name": "group8-group-startup-order-test",
-    "groups": [
-        {
-            "name": "group9-group-startup-order-test",
-            "cartridges": [
-                "tomcat1-group-startup-order-test"
-            ]
-        }
-    ],
-    "cartridges": [
-        "tomcat2-group-startup-order-test","tomcat-group-startup-order-test"
-    ],
-    "dependencies": {
-        "terminationBehaviour": "terminate-all"
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/group-startup-order-test/cartridges/mock/esb-application-bursting-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/cartridges/mock/esb-application-bursting-test.json b/products/stratos/modules/integration/src/test/resources/group-startup-order-test/cartridges/mock/esb-application-bursting-test.json
deleted file mode 100755
index b6f428e..0000000
--- a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/cartridges/mock/esb-application-bursting-test.json
+++ /dev/null
@@ -1,50 +0,0 @@
-{
-    "type": "esb-group-startup-order-test",
-    "provider": "apache",
-    "host": "stratos.apache.org",
-    "category": "framework",
-    "displayName": "esb-group-startup-order-test",
-    "description": "esb-group-startup-order-test Cartridge",
-    "version": "7",
-    "multiTenant": "false",
-    "portMapping": [
-        {
-            "name": "http-22",
-            "protocol": "http",
-            "port": "22",
-            "proxyPort": "8280"
-        }
-    ],
-    "deployment": {
-    },
-    "iaasProvider": [
-        {
-            "type": "mock",
-            "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
-            "networkInterfaces": [
-                {
-                    "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e"
-                }
-            ],
-            "property": [
-                {
-                    "name": "instanceType",
-                    "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594"
-                },
-                {
-                    "name": "keyPair",
-                    "value": "vishanth-key"
-                },
-                {
-                    "name": "securityGroups",
-                    "value": "default"
-                }
-            ]
-        }
-    ],
-    "metadataKeys": [
-        "server_ip",
-        "username",
-        "password"
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/group-startup-order-test/cartridges/mock/esb-group-startup-order-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/cartridges/mock/esb-group-startup-order-test.json b/products/stratos/modules/integration/src/test/resources/group-startup-order-test/cartridges/mock/esb-group-startup-order-test.json
deleted file mode 100755
index b6f428e..0000000
--- a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/cartridges/mock/esb-group-startup-order-test.json
+++ /dev/null
@@ -1,50 +0,0 @@
-{
-    "type": "esb-group-startup-order-test",
-    "provider": "apache",
-    "host": "stratos.apache.org",
-    "category": "framework",
-    "displayName": "esb-group-startup-order-test",
-    "description": "esb-group-startup-order-test Cartridge",
-    "version": "7",
-    "multiTenant": "false",
-    "portMapping": [
-        {
-            "name": "http-22",
-            "protocol": "http",
-            "port": "22",
-            "proxyPort": "8280"
-        }
-    ],
-    "deployment": {
-    },
-    "iaasProvider": [
-        {
-            "type": "mock",
-            "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
-            "networkInterfaces": [
-                {
-                    "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e"
-                }
-            ],
-            "property": [
-                {
-                    "name": "instanceType",
-                    "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594"
-                },
-                {
-                    "name": "keyPair",
-                    "value": "vishanth-key"
-                },
-                {
-                    "name": "securityGroups",
-                    "value": "default"
-                }
-            ]
-        }
-    ],
-    "metadataKeys": [
-        "server_ip",
-        "username",
-        "password"
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/group-startup-order-test/cartridges/mock/php-application-bursting-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/cartridges/mock/php-application-bursting-test.json b/products/stratos/modules/integration/src/test/resources/group-startup-order-test/cartridges/mock/php-application-bursting-test.json
deleted file mode 100755
index 95f78a5..0000000
--- a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/cartridges/mock/php-application-bursting-test.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{
-    "type": "php-group-startup-order-test",
-    "provider": "apache",
-    "category": "framework",
-    "host": "php.stratos.org",
-    "displayName": "php-group-startup-order-test",
-    "description": "php-group-startup-order-test Cartridge",
-    "version": "7",
-    "multiTenant": "false",
-    "portMapping": [
-        {
-            "name": "http-80",
-            "protocol": "http",
-            "port": "8080",
-            "proxyPort": "8280"
-        },
-        {
-            "name": "http-22",
-            "protocol": "tcp",
-            "port": "22",
-            "proxyPort": "8222"
-        }
-    ],
-    "deployment": {
-    },
-    "iaasProvider": [
-        {
-            "type": "mock",
-            "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
-            "networkInterfaces": [
-                {
-                    "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e"
-                }
-            ],
-            "property": [
-                {
-                    "name": "instanceType",
-                    "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594"
-                },
-                {
-                    "name": "keyPair",
-                    "value": "reka"
-                },
-                {
-                    "name": "securityGroups",
-                    "value": "default"
-                }
-            ]
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/group-startup-order-test/cartridges/mock/php-group-startup-order-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/cartridges/mock/php-group-startup-order-test.json b/products/stratos/modules/integration/src/test/resources/group-startup-order-test/cartridges/mock/php-group-startup-order-test.json
deleted file mode 100755
index 95f78a5..0000000
--- a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/cartridges/mock/php-group-startup-order-test.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{
-    "type": "php-group-startup-order-test",
-    "provider": "apache",
-    "category": "framework",
-    "host": "php.stratos.org",
-    "displayName": "php-group-startup-order-test",
-    "description": "php-group-startup-order-test Cartridge",
-    "version": "7",
-    "multiTenant": "false",
-    "portMapping": [
-        {
-            "name": "http-80",
-            "protocol": "http",
-            "port": "8080",
-            "proxyPort": "8280"
-        },
-        {
-            "name": "http-22",
-            "protocol": "tcp",
-            "port": "22",
-            "proxyPort": "8222"
-        }
-    ],
-    "deployment": {
-    },
-    "iaasProvider": [
-        {
-            "type": "mock",
-            "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
-            "networkInterfaces": [
-                {
-                    "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e"
-                }
-            ],
-            "property": [
-                {
-                    "name": "instanceType",
-                    "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594"
-                },
-                {
-                    "name": "keyPair",
-                    "value": "reka"
-                },
-                {
-                    "name": "securityGroups",
-                    "value": "default"
-                }
-            ]
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/group-startup-order-test/cartridges/mock/stratos-lb-group-startup-order-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/cartridges/mock/stratos-lb-group-startup-order-test.json b/products/stratos/modules/integration/src/test/resources/group-startup-order-test/cartridges/mock/stratos-lb-group-startup-order-test.json
deleted file mode 100755
index 1c665b7..0000000
--- a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/cartridges/mock/stratos-lb-group-startup-order-test.json
+++ /dev/null
@@ -1,44 +0,0 @@
-{
-    "type": "stratos-lb-group-startup-order-test",
-    "provider": "stratos",
-    "category": "load-balancer",
-    "host": "complex-app-with-lb",
-    "displayName": "Stratos Load Balancer",
-    "description": "Stratos Load Balancer Cartridge",
-    "version": "7",
-    "multiTenant": "false",
-    "portMapping": [
-        {
-            "name": "http-22",
-            "protocol": "http",
-            "port": "22",
-            "proxyPort": "8280"
-        }
-    ],
-    "deployment": {
-    },
-    "iaasProvider": [
-        {
-            "type": "mock",
-            "imageId": "image1",
-            "property": [
-                {
-                    "name": "instanceType",
-                    "value": "instanceType1"
-                },
-                {
-                    "name": "keyPair",
-                    "value": "default"
-                },
-                {
-                    "name": "securityGroups",
-                    "value": "default"
-                }
-            ]
-        }
-    ],
-    "metadataKeys": [
-        "writeparam3",
-        "writeparam4"
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/group-startup-order-test/cartridges/mock/tomcat-application-bursting-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/cartridges/mock/tomcat-application-bursting-test.json b/products/stratos/modules/integration/src/test/resources/group-startup-order-test/cartridges/mock/tomcat-application-bursting-test.json
deleted file mode 100755
index 7cf895a..0000000
--- a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/cartridges/mock/tomcat-application-bursting-test.json
+++ /dev/null
@@ -1,53 +0,0 @@
-{
-    "type": "tomcat-group-startup-order-test",
-    "provider": "apache",
-    "host": "tomcat.stratos.org",
-    "category": "framework",
-    "displayName": "tomcat-group-startup-order-test",
-    "description": "tomcat-group-startup-order-test Cartridge",
-    "version": "7",
-    "multiTenant": "false",
-    "portMapping": [
-        {
-            "name": "http-22",
-            "protocol": "http",
-            "port": "22",
-            "proxyPort": "8280"
-        },
-        {
-            "protocol": "http",
-            "port": "8080",
-            "proxyPort": "80"
-        }
-    ],
-    "deployment": {
-    },
-    "iaasProvider": [
-        {
-            "type": "mock",
-            "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
-            "networkInterfaces": [
-                {
-                    "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e"
-                }
-            ],
-            "property": [
-                {
-                    "name": "instanceType",
-                    "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594"
-                },
-                {
-                    "name": "keyPair",
-                    "value": "vishanth-key"
-                },
-                {
-                    "name": "securityGroups",
-                    "value": "default"
-                }
-            ]
-        }
-    ],
-    "metadataKeys": [
-        "url"
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/group-startup-order-test/cartridges/mock/tomcat-group-startup-order-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/cartridges/mock/tomcat-group-startup-order-test.json b/products/stratos/modules/integration/src/test/resources/group-startup-order-test/cartridges/mock/tomcat-group-startup-order-test.json
deleted file mode 100755
index 7cf895a..0000000
--- a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/cartridges/mock/tomcat-group-startup-order-test.json
+++ /dev/null
@@ -1,53 +0,0 @@
-{
-    "type": "tomcat-group-startup-order-test",
-    "provider": "apache",
-    "host": "tomcat.stratos.org",
-    "category": "framework",
-    "displayName": "tomcat-group-startup-order-test",
-    "description": "tomcat-group-startup-order-test Cartridge",
-    "version": "7",
-    "multiTenant": "false",
-    "portMapping": [
-        {
-            "name": "http-22",
-            "protocol": "http",
-            "port": "22",
-            "proxyPort": "8280"
-        },
-        {
-            "protocol": "http",
-            "port": "8080",
-            "proxyPort": "80"
-        }
-    ],
-    "deployment": {
-    },
-    "iaasProvider": [
-        {
-            "type": "mock",
-            "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
-            "networkInterfaces": [
-                {
-                    "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e"
-                }
-            ],
-            "property": [
-                {
-                    "name": "instanceType",
-                    "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594"
-                },
-                {
-                    "name": "keyPair",
-                    "value": "vishanth-key"
-                },
-                {
-                    "name": "securityGroups",
-                    "value": "default"
-                }
-            ]
-        }
-    ],
-    "metadataKeys": [
-        "url"
-    ]
-}


[08/21] stratos git commit: Uplifting automation engine to v4.4.3, dynamically pick ports for integration tests

Posted by ra...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-common/src/main/java/org/apache/stratos/integration/common/extensions/StratosServerExtension.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-common/src/main/java/org/apache/stratos/integration/common/extensions/StratosServerExtension.java b/products/stratos/modules/integration/test-common/src/main/java/org/apache/stratos/integration/common/extensions/StratosServerExtension.java
new file mode 100644
index 0000000..3de05c3
--- /dev/null
+++ b/products/stratos/modules/integration/test-common/src/main/java/org/apache/stratos/integration/common/extensions/StratosServerExtension.java
@@ -0,0 +1,196 @@
+/*
+ * Copyright 2005-2015 WSO2, Inc. (http://wso2.com)
+ *
+ * Licensed 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.integration.common.extensions;
+
+import org.apache.activemq.broker.BrokerService;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.log4j.Level;
+import org.apache.log4j.Logger;
+import org.apache.stratos.common.test.TestLogAppender;
+import org.apache.stratos.integration.common.StratosTestServerManager;
+import org.apache.stratos.integration.common.Util;
+import org.wso2.carbon.automation.engine.context.AutomationContext;
+import org.wso2.carbon.automation.engine.context.TestUserMode;
+import org.wso2.carbon.automation.engine.exceptions.AutomationFrameworkException;
+import org.wso2.carbon.automation.engine.extensions.ExecutionListenerExtension;
+import org.wso2.carbon.automation.extensions.ExtensionConstants;
+
+import java.io.File;
+import java.net.URI;
+
+import static org.testng.Assert.assertNotNull;
+
+public class StratosServerExtension extends ExecutionListenerExtension {
+    private static final Log log = LogFactory.getLog(StratosServerExtension.class);
+    private TestLogAppender testLogAppender;
+    private static StratosTestServerManager stratosTestServerManager;
+    private static BrokerService broker;
+
+    @Override
+    public void initiate() throws AutomationFrameworkException {
+        broker = new BrokerService();
+        testLogAppender = new TestLogAppender();
+    }
+
+    @Override
+    public void onExecutionStart() throws AutomationFrameworkException {
+        Logger.getRootLogger().addAppender(testLogAppender);
+        Logger.getRootLogger().setLevel(Level.INFO);
+        int activeMQDynamicPort = startActiveMQServer();
+        startStratosServer(activeMQDynamicPort);
+    }
+
+    private void startStratosServer(int activeMQDynamicPort) throws AutomationFrameworkException {
+        try {
+            log.info("Setting up Stratos server...");
+            AutomationContext stratosAutomationCtx =
+                    new AutomationContext("STRATOS", "stratos-001", TestUserMode.SUPER_TENANT_ADMIN);
+            String stratosInitPortOffsetStr =
+                    getParameters().get(ExtensionConstants.SERVER_STARTUP_PORT_OFFSET_COMMAND);
+            if (stratosInitPortOffsetStr == null) {
+                throw new AutomationFrameworkException("Port offset not found in automation.xml");
+            }
+            int stratosInitPortOffset = Integer.parseInt(stratosInitPortOffsetStr);
+            int stratosInitSecurePort = Util.STRATOS_DEFAULT_SECURE_PORT + stratosInitPortOffset;
+            int stratosInitPort = Util.STRATOS_DEFAULT_PORT + stratosInitPortOffset;
+            int thriftInitPort = Util.THRIFT_DEFAULT_PORT + stratosInitPortOffset;
+            int thriftInitSecurePort = Util.THRIFT_DEFAULT_SECURE_PORT + stratosInitPortOffset;
+            int rmiRegistryPort = Util.STRATOS_DEFAULT_RMI_REGISTRY_PORT + stratosInitPortOffset;
+            int rmiServerPort = Util.STRATOS_DEFAULT_RMI_SERVER_PORT + stratosInitPortOffset;
+
+            while (!Util.isPortAvailable(stratosInitPort) || !Util.isPortAvailable(stratosInitSecurePort) ||
+                    !Util.isPortAvailable(thriftInitPort) || !Util.isPortAvailable(thriftInitSecurePort) ||
+                    !Util.isPortAvailable(rmiRegistryPort) || !Util.isPortAvailable(rmiServerPort)) {
+                stratosInitPortOffset++;
+                stratosInitSecurePort++;
+                stratosInitPort++;
+                thriftInitPort++;
+                thriftInitSecurePort++;
+                rmiRegistryPort++;
+                rmiServerPort++;
+            }
+            getParameters()
+                    .put(ExtensionConstants.SERVER_STARTUP_PORT_OFFSET_COMMAND, String.valueOf(stratosInitPortOffset));
+            stratosTestServerManager =
+                    new StratosTestServerManager(stratosAutomationCtx, System.getProperty(Util.CARBON_ZIP_KEY),
+                            getParameters());
+            stratosTestServerManager.setStratosDynamicPort(stratosInitPort);
+            stratosTestServerManager.setStratosSecureDynamicPort(stratosInitSecurePort);
+            stratosTestServerManager.setThriftDynamicPort(thriftInitPort);
+            stratosTestServerManager.setThriftSecureDynamicPort(thriftInitSecurePort);
+            stratosTestServerManager.setActiveMQDynamicPort(activeMQDynamicPort);
+            stratosTestServerManager.setWebAppURL("http://localhost:" + stratosInitPort);
+            stratosTestServerManager.setWebAppURLHttps("https://localhost:" + stratosInitSecurePort);
+
+            log.info("Stratos server dynamic port offset: " + stratosTestServerManager.getPortOffset());
+            log.info("Stratos dynamic backend URL: " + stratosTestServerManager.getWebAppURL());
+            log.info("Stratos secure dynamic backend URL: " + stratosTestServerManager.getWebAppURLHttps());
+            long time3 = System.currentTimeMillis();
+            String carbonHome = stratosTestServerManager.startServer();
+            assertNotNull(carbonHome, "CARBON_HOME is null");
+            while (!serverStarted()) {
+                log.info("Waiting for topology to be initialized...");
+                Thread.sleep(5000);
+            }
+            while (!mockServiceStarted()) {
+                log.info("Waiting for mock service to be initialized...");
+                Thread.sleep(1000);
+            }
+            long time4 = System.currentTimeMillis();
+            log.info(String.format("Stratos server started in %d sec", (time4 - time3) / 1000));
+        }
+        catch (Exception e) {
+            throw new AutomationFrameworkException("Could not start Stratos server", e);
+        }
+    }
+
+    @Override
+    public void onExecutionFinish() throws AutomationFrameworkException {
+        try {
+            stratosTestServerManager.stopServer();
+            log.info("Stopped Stratos server");
+        }
+        catch (Exception e) {
+            log.error("Could not stop Stratos server", e);
+        }
+
+        try {
+            broker.stop();
+            log.info("Stopped ActiveMQ server");
+        }
+        catch (Exception e) {
+            log.error("Could not stop ActiveMQ server", e);
+        }
+    }
+
+    private int startActiveMQServer() throws AutomationFrameworkException {
+        try {
+            String activemqBindAddress = getParameters().get(Util.ACTIVEMQ_BIND_ADDRESS);
+            if (activemqBindAddress == null) {
+                throw new AutomationFrameworkException("ActiveMQ bind address not found in automation.xml");
+            }
+            URI givenURI = new URI(activemqBindAddress);
+            int initAMQPort = givenURI.getPort();
+            // dynamically pick an open port starting from initial port given in automation.xml
+            while (!Util.isPortAvailable(initAMQPort)) {
+                initAMQPort++;
+            }
+            URI dynamicURL = new URI(givenURI.getScheme(), givenURI.getUserInfo(), givenURI.getHost(), initAMQPort,
+                    givenURI.getPath(), givenURI.getQuery(), givenURI.getFragment());
+            long time1 = System.currentTimeMillis();
+            log.info("Starting ActiveMQ with dynamic bind address: " + dynamicURL.toString());
+            broker.setDataDirectory(StratosServerExtension.class.getResource(File.separator).getPath() +
+                    File.separator + ".." + File.separator + "activemq-data");
+            broker.setBrokerName("testBroker");
+            broker.addConnector(dynamicURL.toString());
+            broker.start();
+            long time2 = System.currentTimeMillis();
+            log.info(String.format("ActiveMQ started in %d sec", (time2 - time1) / 1000));
+            return initAMQPort;
+        }
+        catch (Exception e) {
+            throw new AutomationFrameworkException("Could not start ActiveMQ", e);
+        }
+    }
+
+    private boolean serverStarted() {
+        for (String message : testLogAppender.getMessages()) {
+            if (message.contains("Topology initialized")) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    private boolean mockServiceStarted() {
+        for (String message : testLogAppender.getMessages()) {
+            if (message.contains("Mock IaaS service component activated")) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    public static StratosTestServerManager getStratosTestServerManager() {
+        return stratosTestServerManager;
+    }
+
+    public static BrokerService getBroker() {
+        return broker;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-common/src/main/java/org/apache/stratos/integration/common/rest/ErrorResponse.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-common/src/main/java/org/apache/stratos/integration/common/rest/ErrorResponse.java b/products/stratos/modules/integration/test-common/src/main/java/org/apache/stratos/integration/common/rest/ErrorResponse.java
new file mode 100644
index 0000000..7aefe1b
--- /dev/null
+++ b/products/stratos/modules/integration/test-common/src/main/java/org/apache/stratos/integration/common/rest/ErrorResponse.java
@@ -0,0 +1,56 @@
+/*
+ * 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.integration.common.rest;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import java.io.Serializable;
+
+/**
+ * Error response.
+ */
+@XmlRootElement(name = "errorResponse")
+public class ErrorResponse implements Serializable {
+
+    private int errorCode;
+    private String errorMessage;
+
+    public ErrorResponse() {
+    }
+
+    public ErrorResponse(int errorCode, String errorMessage) {
+        this.setErrorCode(errorCode);
+        this.setErrorMessage(errorMessage);
+    }
+
+    public int getErrorCode() {
+        return errorCode;
+    }
+
+    public void setErrorCode(int errorCode) {
+        this.errorCode = errorCode;
+    }
+
+    public String getErrorMessage() {
+        return errorMessage;
+    }
+
+    public void setErrorMessage(String errorMessage) {
+        this.errorMessage = errorMessage;
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-common/src/main/java/org/apache/stratos/integration/common/rest/HttpResponse.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-common/src/main/java/org/apache/stratos/integration/common/rest/HttpResponse.java b/products/stratos/modules/integration/test-common/src/main/java/org/apache/stratos/integration/common/rest/HttpResponse.java
new file mode 100644
index 0000000..fb35191
--- /dev/null
+++ b/products/stratos/modules/integration/test-common/src/main/java/org/apache/stratos/integration/common/rest/HttpResponse.java
@@ -0,0 +1,59 @@
+/*
+ * 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.integration.common.rest;
+
+/**
+ * Created by reka on 7/28/15.
+ */
+public class HttpResponse {
+
+    private int statusCode;
+    private String content;
+    private String reason;
+
+    public int getStatusCode() {
+        return statusCode;
+    }
+
+    public void setStatusCode(int statusCode) {
+        this.statusCode = statusCode;
+    }
+
+    public String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+
+    public String getReason() {
+        return reason;
+    }
+
+    public void setReason(String reason) {
+        this.reason = reason;
+    }
+
+    @Override
+    public String toString() {
+        return "HttpResponse [statusCode=" + statusCode + ", content=" + content
+                + ", reason=" + reason + "]";
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-common/src/main/java/org/apache/stratos/integration/common/rest/HttpResponseHandler.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-common/src/main/java/org/apache/stratos/integration/common/rest/HttpResponseHandler.java b/products/stratos/modules/integration/test-common/src/main/java/org/apache/stratos/integration/common/rest/HttpResponseHandler.java
new file mode 100644
index 0000000..e636ecd
--- /dev/null
+++ b/products/stratos/modules/integration/test-common/src/main/java/org/apache/stratos/integration/common/rest/HttpResponseHandler.java
@@ -0,0 +1,68 @@
+/*
+ * 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.integration.common.rest;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.http.HttpEntity;
+import org.apache.http.StatusLine;
+import org.apache.http.client.ClientProtocolException;
+import org.apache.http.client.ResponseHandler;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+
+/**
+ * Rest http response handler
+ */
+public class HttpResponseHandler implements ResponseHandler<HttpResponse> {
+    private static final Log log = LogFactory.getLog(HttpResponseHandler.class);
+
+    @Override
+    public HttpResponse handleResponse(org.apache.http.HttpResponse response) throws ClientProtocolException,
+            IOException {
+        StatusLine statusLine = response.getStatusLine();
+        HttpEntity entity = response.getEntity();
+        if (entity == null) {
+            throw new ClientProtocolException("Response contains no content");
+        }
+
+        BufferedReader reader = new BufferedReader(new InputStreamReader(
+                (response.getEntity().getContent())));
+
+        String output;
+        String result = "";
+
+        while ((output = reader.readLine()) != null) {
+            result += output;
+        }
+
+        HttpResponse httpResponse = new HttpResponse();
+        httpResponse.setStatusCode(statusLine.getStatusCode());
+        httpResponse.setContent(result);
+        httpResponse.setReason(statusLine.getReasonPhrase());
+
+        if (log.isDebugEnabled()) {
+            log.debug("Extracted Http Response: " + httpResponse.toString());
+        }
+
+        return httpResponse;
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-common/src/main/java/org/apache/stratos/integration/common/rest/IntegrationMockClient.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-common/src/main/java/org/apache/stratos/integration/common/rest/IntegrationMockClient.java b/products/stratos/modules/integration/test-common/src/main/java/org/apache/stratos/integration/common/rest/IntegrationMockClient.java
new file mode 100644
index 0000000..5582db7
--- /dev/null
+++ b/products/stratos/modules/integration/test-common/src/main/java/org/apache/stratos/integration/common/rest/IntegrationMockClient.java
@@ -0,0 +1,102 @@
+/*
+ * 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.integration.common.rest;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.http.client.methods.HttpDelete;
+import org.apache.http.client.methods.HttpRequestBase;
+import org.apache.http.client.utils.URIBuilder;
+import org.apache.http.impl.client.DefaultHttpClient;
+import org.apache.http.impl.conn.PoolingClientConnectionManager;
+import org.apache.stratos.mock.iaas.client.MockIaasApiClient;
+import org.apache.stratos.mock.iaas.client.rest.HttpResponse;
+import org.apache.stratos.mock.iaas.client.rest.HttpResponseHandler;
+
+import java.net.URI;
+
+/**
+ * Mock client
+ */
+public class IntegrationMockClient extends MockIaasApiClient {
+    private static final Log log = LogFactory.getLog(IntegrationMockClient.class);
+    private static final String INSTANCES_CONTEXT = "/instances/";
+    private DefaultHttpClient httpClient;
+    private String endpoint;
+
+    public IntegrationMockClient(String endpoint) {
+        super(endpoint);
+        this.endpoint = endpoint;
+        PoolingClientConnectionManager cm = new PoolingClientConnectionManager();
+        // Increase max total connection to 200
+        cm.setMaxTotal(200);
+        // Increase default max connection per route to 50
+        cm.setDefaultMaxPerRoute(50);
+
+        httpClient = new DefaultHttpClient(cm);
+        httpClient = (DefaultHttpClient) WebClientWrapper.wrapClient(httpClient);
+    }
+
+    public boolean terminateInstance(String instanceId) {
+        try {
+            if (log.isDebugEnabled()) {
+                log.debug(String.format("Terminate instance: [instance-id] %s", instanceId));
+            }
+            URI uri = new URIBuilder(endpoint + INSTANCES_CONTEXT + instanceId).build();
+            org.apache.stratos.mock.iaas.client.rest.HttpResponse response = doDelete(uri);
+            if (response != null) {
+                if ((response.getStatusCode() >= 200) && (response.getStatusCode() < 300)) {
+                    return true;
+                } else {
+                    GsonBuilder gsonBuilder = new GsonBuilder();
+                    Gson gson = gsonBuilder.create();
+                    ErrorResponse errorResponse = gson.fromJson(response.getContent(), ErrorResponse.class);
+                    if (errorResponse != null) {
+                        throw new RuntimeException(errorResponse.getErrorMessage());
+                    }
+                }
+            }
+            throw new RuntimeException("An unknown error occurred");
+        } catch (Exception e) {
+            String message = "Could not start mock instance";
+            throw new RuntimeException(message, e);
+        }
+    }
+
+    public HttpResponse doDelete(URI resourcePath) throws Exception {
+        HttpDelete httpDelete = null;
+        try {
+            httpDelete = new HttpDelete(resourcePath);
+            httpDelete.addHeader("Content-Type", "application/json");
+
+            return httpClient.execute(httpDelete, new HttpResponseHandler());
+        } finally {
+            releaseConnection(httpDelete);
+        }
+    }
+
+    private void releaseConnection(HttpRequestBase request) {
+        if (request != null) {
+            request.releaseConnection();
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-common/src/main/java/org/apache/stratos/integration/common/rest/RestClient.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-common/src/main/java/org/apache/stratos/integration/common/rest/RestClient.java b/products/stratos/modules/integration/test-common/src/main/java/org/apache/stratos/integration/common/rest/RestClient.java
new file mode 100644
index 0000000..9b29e68
--- /dev/null
+++ b/products/stratos/modules/integration/test-common/src/main/java/org/apache/stratos/integration/common/rest/RestClient.java
@@ -0,0 +1,403 @@
+/*
+ * 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.integration.common.rest;
+
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import com.google.gson.JsonParser;
+import org.apache.commons.lang.StringUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.http.client.methods.*;
+import org.apache.http.client.utils.URIBuilder;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.DefaultHttpClient;
+import org.apache.http.impl.conn.PoolingClientConnectionManager;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.lang.reflect.Type;
+import java.net.URI;
+
+/**
+ * Rest client to handle rest requests
+ */
+public class RestClient {
+    private static final Log log = LogFactory.getLog(RestClient.class);
+    private DefaultHttpClient httpClient;
+    private String endPoint;
+    private String userName;
+    private String password;
+
+    public RestClient() {
+        PoolingClientConnectionManager cm = new PoolingClientConnectionManager();
+        // Increase max total connection to 200
+        cm.setMaxTotal(200);
+        // Increase default max connection per route to 50
+        cm.setDefaultMaxPerRoute(50);
+
+        httpClient = new DefaultHttpClient(cm);
+        httpClient = (DefaultHttpClient) WebClientWrapper.wrapClient(httpClient);
+    }
+
+    public RestClient(String endPoint, String userName, String password) {
+        this();
+        this.endPoint = endPoint;
+        this.setUserName(userName);
+        this.setPassword(password);
+    }
+
+    /**
+     * Handle http post request. Return String
+     *
+     * @param resourcePath    This should be REST endpoint
+     * @param jsonParamString The json string which should be executed from the post request
+     * @return The HttpResponse
+     * @throws Exception if any errors occur when executing the request
+     */
+    public HttpResponse doPost(URI resourcePath, String jsonParamString) throws Exception {
+        HttpPost postRequest = null;
+        try {
+            postRequest = new HttpPost(resourcePath);
+            StringEntity input = new StringEntity(jsonParamString);
+            input.setContentType("application/json");
+            postRequest.setEntity(input);
+
+            String userPass = getUsernamePassword();
+            String basicAuth = "Basic " + javax.xml.bind.DatatypeConverter.printBase64Binary(userPass.getBytes("UTF-8"));
+            postRequest.addHeader("Authorization", basicAuth);
+
+            return httpClient.execute(postRequest, new HttpResponseHandler());
+        } finally {
+            releaseConnection(postRequest);
+        }
+    }
+
+    /**
+     * Handle http get request. Return String
+     *
+     * @param resourcePath This should be REST endpoint
+     * @return The HttpResponse
+     * @throws org.apache.http.client.ClientProtocolException and IOException
+     *                                                        if any errors occur when executing the request
+     */
+    public HttpResponse doGet(URI resourcePath) throws Exception {
+        HttpGet getRequest = null;
+        try {
+            getRequest = new HttpGet(resourcePath);
+            getRequest.addHeader("Content-Type", "application/json");
+            String userPass = getUsernamePassword();
+            String basicAuth = "Basic " + javax.xml.bind.DatatypeConverter.printBase64Binary(userPass.getBytes("UTF-8"));
+            getRequest.addHeader("Authorization", basicAuth);
+
+            return httpClient.execute(getRequest, new HttpResponseHandler());
+        } finally {
+            releaseConnection(getRequest);
+        }
+    }
+
+    public HttpResponse doDelete(URI resourcePath) throws Exception {
+        HttpDelete httpDelete = null;
+        try {
+            httpDelete = new HttpDelete(resourcePath);
+            httpDelete.addHeader("Content-Type", "application/json");
+            String userPass = getUsernamePassword();
+            String basicAuth = "Basic " + javax.xml.bind.DatatypeConverter.printBase64Binary(userPass.getBytes("UTF-8"));
+            httpDelete.addHeader("Authorization", basicAuth);
+            return httpClient.execute(httpDelete, new HttpResponseHandler());
+        } finally {
+            releaseConnection(httpDelete);
+        }
+    }
+
+    public HttpResponse doPut(URI resourcePath, String jsonParamString) throws Exception {
+
+        HttpPut putRequest = null;
+        try {
+            putRequest = new HttpPut(resourcePath);
+
+            StringEntity input = new StringEntity(jsonParamString);
+            input.setContentType("application/json");
+            putRequest.setEntity(input);
+            String userPass = getUsernamePassword();
+            String basicAuth = "Basic " + javax.xml.bind.DatatypeConverter.printBase64Binary(userPass.getBytes("UTF-8"));
+            putRequest.addHeader("Authorization", basicAuth);
+            return httpClient.execute(putRequest, new HttpResponseHandler());
+        } finally {
+            releaseConnection(putRequest);
+        }
+    }
+
+    private void releaseConnection(HttpRequestBase request) {
+        if (request != null) {
+            request.releaseConnection();
+        }
+    }
+
+    public boolean addEntity(String filePath, String resourcePath, String entityName) {
+        try {
+            String content = getJsonStringFromFile(filePath);
+            URI uri = new URIBuilder(this.endPoint + resourcePath).build();
+
+            HttpResponse response = doPost(uri, content);
+            if (response != null) {
+                if ((response.getStatusCode() >= 200) && (response.getStatusCode() < 300)) {
+                    return true;
+                } else {
+                    GsonBuilder gsonBuilder = new GsonBuilder();
+                    Gson gson = gsonBuilder.create();
+                    ErrorResponse errorResponse = gson.fromJson(response.getContent(), ErrorResponse.class);
+                    if (errorResponse != null) {
+                        throw new RuntimeException(errorResponse.getErrorMessage());
+                    }
+                }
+            }
+            String msg = "An unknown error occurred while trying to add ";
+            log.error(msg + entityName);
+            throw new RuntimeException(msg + entityName);
+        } catch (Exception e) {
+            String message = "Could not add " + entityName;
+            log.error(message, e);
+            throw new RuntimeException(message, e);
+        }
+    }
+
+    public boolean deployEntity(String resourcePath, String entityName) {
+        try {
+            URI uri = new URIBuilder(this.endPoint + resourcePath).build();
+
+            HttpResponse response = doPost(uri, "");
+            if (response != null) {
+                if ((response.getStatusCode() >= 200) && (response.getStatusCode() < 300)) {
+                    return true;
+                } else {
+                    GsonBuilder gsonBuilder = new GsonBuilder();
+                    Gson gson = gsonBuilder.create();
+                    ErrorResponse errorResponse = gson.fromJson(response.getContent(), ErrorResponse.class);
+                    if (errorResponse != null) {
+                        throw new RuntimeException(errorResponse.getErrorMessage());
+                    }
+                }
+            }
+            String msg = "An unknown error occurred while trying to deploy ";
+            log.error(msg + entityName);
+            throw new RuntimeException(msg + entityName);
+        } catch (Exception e) {
+            String message = "Could not deploy  " + entityName;
+            log.error(message, e);
+            throw new RuntimeException(message, e);
+        }
+    }
+
+    public boolean undeployEntity(String resourcePath, String entityName) {
+        try {
+            URI uri = new URIBuilder(this.endPoint + resourcePath).build();
+
+            HttpResponse response = doPost(uri, "");
+            if (response != null) {
+                if ((response.getStatusCode() >= 200) && (response.getStatusCode() < 300)) {
+                    return true;
+                } else {
+                    GsonBuilder gsonBuilder = new GsonBuilder();
+                    Gson gson = gsonBuilder.create();
+                    ErrorResponse errorResponse = gson.fromJson(response.getContent(), ErrorResponse.class);
+                    if (errorResponse != null) {
+                        throw new RuntimeException(errorResponse.getErrorMessage());
+                    }
+                }
+            }
+            String msg = "An unknown error occurred while trying to undeploy ";
+            log.error(msg + entityName);
+            throw new RuntimeException(msg + entityName);
+        } catch (Exception e) {
+            String message = "Could not deploy  " + entityName;
+            log.error(message, e);
+            throw new RuntimeException(message, e);
+        }
+    }
+
+    public Object getEntity(String resourcePath, String identifier, Class responseJsonClass,
+                            String entityName) {
+        try {
+            URI uri = new URIBuilder(this.endPoint + resourcePath + "/" + identifier).build();
+            HttpResponse response = doGet(uri);
+            GsonBuilder gsonBuilder = new GsonBuilder();
+            Gson gson = gsonBuilder.create();
+            if (response != null) {
+                if ((response.getStatusCode() >= 200) && (response.getStatusCode() < 300)) {
+                    return gson.fromJson(response.getContent(), responseJsonClass);
+                } else if (response.getStatusCode() == 404) {
+                    return null;
+                } else {
+                    ErrorResponse errorResponse = gson.fromJson(response.getContent(),
+                            ErrorResponse.class);
+                    if (errorResponse != null) {
+                        throw new RuntimeException(errorResponse.getErrorMessage());
+                    }
+                }
+            }
+            String msg = "An unknown error occurred while getting the " + entityName;
+            log.error(msg);
+            throw new RuntimeException(msg);
+        } catch (Exception e) {
+            String message = "Could not get " + entityName;
+            log.error(message, e);
+            throw new RuntimeException(message, e);
+        }
+    }
+
+    public Object listEntity(String resourcePath, Type type, String entityName) {
+        try {
+            URI uri = new URIBuilder(this.endPoint + resourcePath).build();
+            HttpResponse response = doGet(uri);
+            GsonBuilder gsonBuilder = new GsonBuilder();
+            Gson gson = gsonBuilder.create();
+            if (response != null) {
+                if ((response.getStatusCode() >= 200) && (response.getStatusCode() < 300)) {
+                    return gson.fromJson(response.getContent(), type);
+                } else if (response.getStatusCode() == 404) {
+                    return null;
+                } else {
+                    ErrorResponse errorResponse = gson.fromJson(response.getContent(),
+                            ErrorResponse.class);
+                    if (errorResponse != null) {
+                        throw new RuntimeException(errorResponse.getErrorMessage());
+                    }
+                }
+            }
+            String msg = "An unknown error occurred while getting the " + entityName;
+            log.error(msg);
+            throw new RuntimeException(msg);
+        } catch (Exception e) {
+            String message = "Could not get " + entityName;
+            log.error(message, e);
+            throw new RuntimeException(message, e);
+        }
+    }
+
+    public boolean removeEntity(String resourcePath, String identifier, String entityName) {
+        try {
+            URI uri = new URIBuilder(this.endPoint + "/" + resourcePath + "/" + identifier).build();
+            HttpResponse response = doDelete(uri);
+            if (response != null) {
+                if ((response.getStatusCode() >= 200) && (response.getStatusCode() < 300)) {
+                    return true;
+                } else if (response.getContent().contains("it is used") || response.getContent().contains("in use")) {
+                    return false;
+                } else {
+                    GsonBuilder gsonBuilder = new GsonBuilder();
+                    Gson gson = gsonBuilder.create();
+                    ErrorResponse errorResponse = gson.fromJson(response.getContent(),
+                            ErrorResponse.class);
+                    if (errorResponse != null) {
+                        throw new RuntimeException(errorResponse.getErrorMessage());
+                    }
+                }
+            }
+            String msg = "An unknown error occurred while removing the " + entityName;
+            log.error(msg);
+            throw new RuntimeException(msg);
+        } catch (Exception e) {
+            String message = "Could not remove  " + entityName;
+            log.error(message, e);
+            throw new RuntimeException(message, e);
+        }
+    }
+
+    public boolean updateEntity(String filePath, String resourcePath, String entityName) {
+        try {
+            String content = getJsonStringFromFile(filePath);
+            URI uri = new URIBuilder(this.endPoint + resourcePath).build();
+
+            HttpResponse response = doPut(uri, content);
+            if (response != null) {
+                if ((response.getStatusCode() >= 200) && (response.getStatusCode() < 300)) {
+                    return true;
+                } else {
+                    GsonBuilder gsonBuilder = new GsonBuilder();
+                    Gson gson = gsonBuilder.create();
+                    ErrorResponse errorResponse = gson.fromJson(response.getContent(),
+                            ErrorResponse.class);
+                    if (errorResponse != null) {
+                        throw new RuntimeException(errorResponse.getErrorMessage());
+                    }
+                }
+            }
+            String msg = "An unknown error occurred while trying to update ";
+            log.error(msg + entityName);
+            throw new RuntimeException(msg + entityName);
+        } catch (Exception e) {
+            String message = "Could not update " + entityName;
+            log.error(message, e);
+            throw new RuntimeException(message, e);
+        }
+    }
+
+    /**
+     * Get the json string from the artifacts directory
+     *
+     * @param filePath path of the artifacts
+     * @return json string of the relevant artifact
+     * @throws FileNotFoundException
+     */
+    public String getJsonStringFromFile(String filePath) throws FileNotFoundException {
+        JsonParser parser = new JsonParser();
+        Object object = parser.parse(new FileReader(getResourcesFolderPath() + filePath));
+        GsonBuilder gsonBuilder = new GsonBuilder();
+        Gson gson = gsonBuilder.create();
+        return gson.toJson(object);
+    }
+
+    /**
+     * Get resources folder path
+     *
+     * @return the resource path
+     */
+    private String getResourcesFolderPath() {
+        String path = getClass().getResource("/").getPath();
+        return StringUtils.removeEnd(path, File.separator);
+    }
+
+    /**
+     * Get the username and password
+     *
+     * @return username:password
+     */
+    private String getUsernamePassword() {
+        return this.getUserName() + ":" + this.getPassword();
+    }
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
+    public String getPassword() {
+        return password;
+    }
+
+    public void setPassword(String password) {
+        this.password = password;
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-common/src/main/java/org/apache/stratos/integration/common/rest/WebClientWrapper.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-common/src/main/java/org/apache/stratos/integration/common/rest/WebClientWrapper.java b/products/stratos/modules/integration/test-common/src/main/java/org/apache/stratos/integration/common/rest/WebClientWrapper.java
new file mode 100644
index 0000000..3a2efd1
--- /dev/null
+++ b/products/stratos/modules/integration/test-common/src/main/java/org/apache/stratos/integration/common/rest/WebClientWrapper.java
@@ -0,0 +1,62 @@
+/*
+ * 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.integration.common.rest;
+
+import org.apache.http.client.HttpClient;
+import org.apache.http.conn.ClientConnectionManager;
+import org.apache.http.conn.scheme.Scheme;
+import org.apache.http.conn.scheme.SchemeRegistry;
+import org.apache.http.conn.ssl.SSLSocketFactory;
+import org.apache.http.impl.client.DefaultHttpClient;
+
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.TrustManager;
+import javax.net.ssl.X509TrustManager;
+import java.security.cert.CertificateException;
+import java.security.cert.X509Certificate;
+
+public class WebClientWrapper {
+    public static HttpClient wrapClient(HttpClient base) {
+        try {
+            SSLContext ctx = SSLContext.getInstance("TLS");
+            X509TrustManager tm = new X509TrustManager() {
+                public void checkClientTrusted(X509Certificate[] xcs,
+                                               String string) throws CertificateException {
+                }
+
+                public void checkServerTrusted(X509Certificate[] xcs,
+                                               String string) throws CertificateException {
+                }
+
+                public X509Certificate[] getAcceptedIssuers() {
+                    return null;
+                }
+            };
+            ctx.init(null, new TrustManager[]{tm}, null);
+            SSLSocketFactory ssf = new SSLSocketFactory(ctx);
+            ssf.setHostnameVerifier(SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER);
+            ClientConnectionManager ccm = base.getConnectionManager();
+            SchemeRegistry sr = ccm.getSchemeRegistry();
+            sr.register(new Scheme("https", ssf, 443));
+            return new DefaultHttpClient(ccm, base.getParams());
+        } catch (Exception ex) {
+            return null;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/pom.xml
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/pom.xml b/products/stratos/modules/integration/test-integration/pom.xml
new file mode 100755
index 0000000..15af42c
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/pom.xml
@@ -0,0 +1,226 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.stratos</groupId>
+        <artifactId>stratos-integration</artifactId>
+        <version>4.2.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>stratos-test-integration</artifactId>
+    <name>Apache Stratos - Integration Tests</name>
+    <packaging>jar</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-exec</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.stratos</groupId>
+            <artifactId>org.apache.stratos.common</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.wso2.carbon.automation</groupId>
+            <artifactId>org.wso2.carbon.automation.test.utils</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.wso2.carbon.automationutils</groupId>
+            <artifactId>org.wso2.carbon.integration.common.admin.client</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.wso2.carbon.automation</groupId>
+            <artifactId>org.wso2.carbon.automation.extensions</artifactId>
+            <scope>compile</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.apache.tomcat.embed</groupId>
+                    <artifactId>tomcat-embed-core</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.tomcat.embed</groupId>
+                    <artifactId>tomcat-embed-logging-juli</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.slf4j</groupId>
+                    <artifactId>slf4j-api</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.wso2.carbon.automationutils</groupId>
+            <artifactId>org.wso2.carbon.integration.common.utils</artifactId>
+            <scope>compile</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.slf4j</groupId>
+                    <artifactId>log4j-over-slf4j</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.slf4j</groupId>
+                    <artifactId>jul-to-slf4j</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.slf4j</groupId>
+                    <artifactId>slf4j-jdk14</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.wso2.carbon.automation</groupId>
+            <artifactId>org.wso2.carbon.automation.engine</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.axis2.wso2</groupId>
+            <artifactId>axis2-client</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.wso2.carbon</groupId>
+            <artifactId>SecVerifier</artifactId>
+            <type>aar</type>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.activemq</groupId>
+            <artifactId>activemq-all</artifactId>
+            <version>5.10.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.httpcomponents.wso2</groupId>
+            <artifactId>httpcore</artifactId>
+            <version>${httpcore.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.httpcomponents.wso2</groupId>
+            <artifactId>httpclient</artifactId>
+            <version>${httpclient.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.stratos</groupId>
+            <artifactId>org.apache.stratos.messaging</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.stratos</groupId>
+            <artifactId>org.apache.stratos.mock.iaas.client</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.jacoco</groupId>
+            <artifactId>org.jacoco.agent</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.wso2.carbon.automationutils</groupId>
+            <artifactId>org.wso2.carbon.integration.common.extensions</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.stratos</groupId>
+            <artifactId>org.apache.stratos.integration.common</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <inherited>false</inherited>
+                <configuration>
+                    <argLine>-Xmx512m -XX:PermSize=256m -XX:MaxPermSize=512m</argLine>
+                    <systemProperties>
+                        <maven.test.haltafterfailure>false</maven.test.haltafterfailure>
+                        <property>
+                            <name>carbon.zip</name>
+                            <value>
+                                ${basedir}/../../distribution/target/${stratos.distribution.name}-${project.version}.zip
+                            </value>
+                        </property>
+                        <property>
+                            <name>framework.resource.location</name>
+                            <value>${basedir}/src/test/resources/</value>
+                        </property>
+                        <property>
+                            <name>server.list</name>
+                            <value>STRATOS</value>
+                        </property>
+                        <property>
+                            <name>usedefaultlisteners</name>
+                            <value>false</value>
+                        </property>
+                        <sec.verifier.dir>${basedir}/target/security-verifier/</sec.verifier.dir>
+                        <instr.file>${basedir}/src/test/resources/instrumentation.txt</instr.file>
+                        <filters.file>${basedir}/src/test/resources/filters.txt</filters.file>
+                    </systemProperties>
+                    <suiteXmlFiles>
+                        <suiteXmlFile>${basedir}/src/test/resources/stratos-testng.xml</suiteXmlFile>
+                    </suiteXmlFiles>
+                    <workingDirectory>${basedir}/target</workingDirectory>
+                </configuration>
+            </plugin>
+            <plugin>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>copy-jacoco­dependencies</id>
+                        <phase>compile</phase>
+                        <goals>
+                            <goal>copy-dependencies</goal>
+                        </goals>
+                        <configuration>
+                            <outputDirectory>${project.build.directory}/jacoco</outputDirectory>
+                            <includeTypes>jar</includeTypes>
+                            <includeArtifactIds>org.jacoco.agent</includeArtifactIds>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>copy-secVerifier</id>
+                        <phase>compile</phase>
+                        <goals>
+                            <goal>copy-dependencies</goal>
+                        </goals>
+                        <configuration>
+                            <outputDirectory>${basedir}/target/security-verifier</outputDirectory>
+                            <includeTypes>aar</includeTypes>
+                            <includeArtifactIds>SecVerifier</includeArtifactIds>
+                            <stripVersion>true</stripVersion>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>test-jar</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/StratosIntegrationTest.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/StratosIntegrationTest.java b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/StratosIntegrationTest.java
new file mode 100644
index 0000000..9aa5fcd
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/StratosIntegrationTest.java
@@ -0,0 +1,108 @@
+/*
+ * Copyright 2005-2015 WSO2, Inc. (http://wso2.com)
+ *
+ * Licensed 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.integration.tests;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.stratos.integration.common.RestConstants;
+import org.apache.stratos.integration.common.extensions.StratosServerExtension;
+import org.apache.stratos.integration.common.rest.IntegrationMockClient;
+import org.apache.stratos.integration.common.rest.RestClient;
+import org.apache.stratos.messaging.domain.tenant.Tenant;
+import org.wso2.carbon.automation.engine.context.AutomationContext;
+import org.wso2.carbon.automation.engine.context.TestUserMode;
+
+import static org.testng.Assert.assertEquals;
+
+public class StratosIntegrationTest {
+    private static final Log log = LogFactory.getLog(StratosIntegrationTest.class);
+    protected AutomationContext stratosAutomationCtx;
+    protected String adminUsername;
+    protected String adminPassword;
+    protected String tenant1UserName;
+    protected String tenant1Password;
+    protected String tenant2UserName;
+    protected String tenant2Password;
+    protected String stratosBackendURL;
+    protected RestClient restClientAdmin;
+    protected RestClient restClientTenant1;
+    protected RestClient restClientTenant2;
+    protected int tenant1Id;
+    protected int tenant2Id;
+    protected IntegrationMockClient mockIaasApiClient;
+    public static final int GLOBAL_TEST_TIMEOUT = 5 * 60 * 1000; // 5 mins
+    public static final int APPLICATION_TEST_TIMEOUT = 20 * 60 * 1000; // 20 mins
+    private static volatile Boolean tenantsInitialized = false;
+
+    public StratosIntegrationTest() {
+        init();
+        if (!tenantsInitialized) {
+            synchronized (StratosIntegrationTest.class) {
+                if (!tenantsInitialized) {
+                    populateTenants();
+                    tenantsInitialized = true;
+                }
+            }
+        }
+
+        Tenant tenant1 = (Tenant) restClientAdmin
+                .getEntity(RestConstants.TENANT_API, RestConstants.TENANT1_GET_RESOURCE, Tenant.class,
+                        RestConstants.TENANTS_NAME);
+        tenant1Id = tenant1.getTenantId();
+        Tenant tenant2 = (Tenant) restClientAdmin
+                .getEntity(RestConstants.TENANT_API, RestConstants.TENANT2_GET_RESOURCE, Tenant.class,
+                        RestConstants.TENANTS_NAME);
+        tenant2Id = tenant2.getTenantId();
+    }
+
+    private void init() {
+        try {
+            log.info("Initializing StratosIntegrationTest...");
+            stratosAutomationCtx = new AutomationContext("STRATOS", "stratos-001", TestUserMode.SUPER_TENANT_ADMIN);
+            adminUsername = stratosAutomationCtx.getConfigurationValue
+                    ("/automation/userManagement/superTenant/tenant/admin/user/userName");
+            adminPassword = stratosAutomationCtx.getConfigurationValue
+                    ("/automation/userManagement/superTenant/tenant/admin/user/password");
+
+            // Do not rely on automation context for context URLs since ports are dynamically picked
+            stratosBackendURL = StratosServerExtension.getStratosTestServerManager().getWebAppURL();
+            restClientAdmin = new RestClient(stratosBackendURL, adminUsername, adminPassword);
+            mockIaasApiClient = new IntegrationMockClient(stratosBackendURL + "/mock-iaas/api");
+
+            tenant1UserName = "admin@test1.com";
+            tenant1Password = "admin123";
+            tenant2UserName = "admin@test2.com";
+            tenant2Password = "admin123";
+
+            restClientTenant1 = new RestClient(stratosBackendURL, tenant1UserName, tenant1Password);
+            restClientTenant2 = new RestClient(stratosBackendURL, tenant2UserName, tenant2Password);
+        }
+        catch (Exception e) {
+            throw new RuntimeException("Could not initialize StratosIntegrationTest", e);
+        }
+    }
+
+    private void populateTenants() {
+        log.info("Creating tenants in Stratos server...");
+        boolean addedTenant1 = restClientAdmin
+                .addEntity(RestConstants.TENANT1_RESOURCE, RestConstants.TENANT_API, RestConstants.TENANTS_NAME);
+        assertEquals(addedTenant1, true);
+        boolean addedTenant2 = restClientAdmin
+                .addEntity(RestConstants.TENANT2_RESOURCE, RestConstants.TENANT_API, RestConstants.TENANTS_NAME);
+        assertEquals(addedTenant2, true);
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/ApplicationBurstingTest.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/ApplicationBurstingTest.java b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/ApplicationBurstingTest.java
new file mode 100644
index 0000000..659682b
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/ApplicationBurstingTest.java
@@ -0,0 +1,241 @@
+/*
+ * 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.integration.tests.application;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.stratos.common.beans.application.ApplicationBean;
+import org.apache.stratos.common.beans.cartridge.CartridgeGroupBean;
+import org.apache.stratos.common.beans.policy.deployment.ApplicationPolicyBean;
+import org.apache.stratos.integration.common.RestConstants;
+import org.apache.stratos.integration.common.TopologyHandler;
+import org.apache.stratos.integration.tests.StratosIntegrationTest;
+import org.apache.stratos.messaging.domain.application.ApplicationStatus;
+import org.testng.annotations.Test;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertTrue;
+
+/**
+ * This will handle the application bursting test cases
+ */
+public class ApplicationBurstingTest extends StratosIntegrationTest {
+    private static final Log log = LogFactory.getLog(SampleApplicationsTest.class);
+    private static final String RESOURCES_PATH = "/application-bursting-test";
+
+    @Test(timeOut = APPLICATION_TEST_TIMEOUT)
+    public void testApplicationBusting() {
+        try {
+            log.info("----------------------------Started application Bursting test case----------------------------");
+
+            String autoscalingPolicyId = "autoscaling-policy-application-bursting-test";
+
+            boolean addedScalingPolicy =
+                    restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.AUTOSCALING_POLICIES_PATH
+                                    + "/" + autoscalingPolicyId + ".json",
+                            RestConstants.AUTOSCALING_POLICIES, RestConstants.AUTOSCALING_POLICIES_NAME);
+            assertEquals(addedScalingPolicy, true);
+
+            boolean addedC1 = restClientTenant1.addEntity(
+                    RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "esb-application-bursting-test.json",
+                    RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+            assertEquals(addedC1, true);
+
+            boolean addedC2 = restClientTenant1.addEntity(
+                    RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "php-application-bursting-test.json",
+                    RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+            assertEquals(addedC2, true);
+
+            boolean addedC3 = restClientTenant1.addEntity(
+                    RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "tomcat-application-bursting-test.json",
+                    RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+            assertEquals(addedC3, true);
+
+            boolean addedG1 = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGE_GROUPS_PATH +
+                            "/" + "esb-php-group-application-bursting-test.json", RestConstants.CARTRIDGE_GROUPS,
+                    RestConstants.CARTRIDGE_GROUPS_NAME);
+            assertEquals(addedG1, true);
+
+            CartridgeGroupBean beanG1 = (CartridgeGroupBean) restClientTenant1.
+                    getEntity(RestConstants.CARTRIDGE_GROUPS, "esb-php-group-application-bursting-test",
+                            CartridgeGroupBean.class, RestConstants.CARTRIDGE_GROUPS_NAME);
+            assertEquals(beanG1.getName(), "esb-php-group-application-bursting-test");
+
+            boolean addedN1 = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
+                            "network-partition-application-bursting-test-1.json",
+                    RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
+            assertEquals(addedN1, true);
+
+            boolean addedN2 = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
+                            "network-partition-application-bursting-test-2.json",
+                    RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
+            assertEquals(addedN2, true);
+
+            boolean addedDep =
+                    restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.DEPLOYMENT_POLICIES_PATH + "/" +
+                                    "deployment-policy-application-bursting-test.json",
+                            RestConstants.DEPLOYMENT_POLICIES, RestConstants.DEPLOYMENT_POLICIES_NAME);
+            assertEquals(addedDep, true);
+
+            boolean added = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.APPLICATIONS_PATH + "/" +
+                            "app-bursting-single-cartriddge-group.json", RestConstants.APPLICATIONS,
+                    RestConstants.APPLICATIONS_NAME);
+            assertEquals(added, true);
+
+            ApplicationBean bean = (ApplicationBean) restClientTenant1.getEntity(RestConstants.APPLICATIONS,
+                    "application-bursting-test", ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
+            assertEquals(bean.getApplicationId(), "application-bursting-test");
+
+            boolean addAppPolicy =
+                    restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.APPLICATION_POLICIES_PATH + "/" +
+                                    "application-policy-application-bursting-test.json",
+                            RestConstants.APPLICATION_POLICIES,
+                            RestConstants.APPLICATION_POLICIES_NAME);
+            assertEquals(addAppPolicy, true);
+
+            ApplicationPolicyBean policyBean = (ApplicationPolicyBean) restClientTenant1.getEntity(
+                    RestConstants.APPLICATION_POLICIES,
+                    "application-policy-application-bursting-test", ApplicationPolicyBean.class,
+                    RestConstants.APPLICATION_POLICIES_NAME);
+
+            //deploy the application
+            String resourcePath = RestConstants.APPLICATIONS + "/" + "application-bursting-test" +
+                    RestConstants.APPLICATIONS_DEPLOY + "/" + "application-policy-application-bursting-test";
+            boolean deployed = restClientTenant1.deployEntity(resourcePath,
+                    RestConstants.APPLICATIONS_NAME);
+            assertEquals(deployed, true);
+
+            //Application active handling
+            TopologyHandler.getInstance().assertApplicationStatus(bean.getApplicationId(),
+                    ApplicationStatus.Active, tenant1Id);
+
+            //Group active handling
+            TopologyHandler.getInstance().assertGroupActivation(bean.getApplicationId(), tenant1Id);
+
+            //Cluster active handling
+            TopologyHandler.getInstance().assertClusterActivation(bean.getApplicationId(), tenant1Id);
+
+            boolean removedGroup = restClientTenant1
+                    .removeEntity(RestConstants.CARTRIDGE_GROUPS, "esb-php-group-application-bursting-test",
+                            RestConstants.CARTRIDGE_GROUPS_NAME);
+            assertEquals(removedGroup, false);
+
+            boolean removedAuto = restClientTenant1.removeEntity(RestConstants.AUTOSCALING_POLICIES,
+                    autoscalingPolicyId, RestConstants.AUTOSCALING_POLICIES_NAME);
+            assertEquals(removedAuto, false);
+
+            boolean removedNet = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
+                    "network-partition-application-bursting-test-1",
+                    RestConstants.NETWORK_PARTITIONS_NAME);
+            //Trying to remove the used network partition
+            assertEquals(removedNet, false);
+
+            boolean removedDep = restClientTenant1.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
+                    "deployment-policy-application-bursting-test", RestConstants.DEPLOYMENT_POLICIES_NAME);
+            assertEquals(removedDep, false);
+
+            //Un-deploying the application
+            String resourcePathUndeploy = RestConstants.APPLICATIONS + "/" + "application-bursting-test" +
+                    RestConstants.APPLICATIONS_UNDEPLOY;
+
+            boolean unDeployed = restClientTenant1.undeployEntity(resourcePathUndeploy,
+                    RestConstants.APPLICATIONS_NAME);
+            assertEquals(unDeployed, true);
+
+            boolean undeploy = TopologyHandler.getInstance().assertApplicationUndeploy("application-bursting-test",
+                    tenant1Id);
+            if (!undeploy) {
+                //Need to forcefully undeploy the application
+                log.info("Force undeployment is going to start for the [application] " + "application-bursting-test");
+
+                restClientTenant1.undeployEntity(RestConstants.APPLICATIONS + "/" + "application-bursting-test" +
+                        RestConstants.APPLICATIONS_UNDEPLOY + "?force=true", RestConstants.APPLICATIONS);
+
+                boolean forceUndeployed = TopologyHandler.getInstance().assertApplicationUndeploy(
+                        "application-bursting-test", tenant1Id);
+                assertEquals(forceUndeployed, true, String.format("Forceful undeployment failed for the application %s",
+                        "application-bursting-test"));
+
+            }
+
+            boolean removed = restClientTenant1.removeEntity(RestConstants.APPLICATIONS, "application-bursting-test",
+                    RestConstants.APPLICATIONS_NAME);
+            assertEquals(removed, true);
+
+            ApplicationBean beanRemoved = (ApplicationBean) restClientTenant1.getEntity(RestConstants.APPLICATIONS,
+                    "application-bursting-test", ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
+            assertEquals(beanRemoved, null);
+
+            removedGroup = restClientTenant1
+                    .removeEntity(RestConstants.CARTRIDGE_GROUPS, "esb-php-group-application-bursting-test",
+                            RestConstants.CARTRIDGE_GROUPS_NAME);
+            assertEquals(removedGroup, true);
+
+            boolean removedC1 =
+                    restClientTenant1.removeEntity(RestConstants.CARTRIDGES, "esb-application-bursting-test",
+                            RestConstants.CARTRIDGES_NAME);
+            assertEquals(removedC1, true);
+
+            boolean removedC2 =
+                    restClientTenant1.removeEntity(RestConstants.CARTRIDGES, "php-application-bursting-test",
+                            RestConstants.CARTRIDGES_NAME);
+            assertEquals(removedC2, true);
+
+            boolean removedC3 =
+                    restClientTenant1.removeEntity(RestConstants.CARTRIDGES, "tomcat-application-bursting-test",
+                            RestConstants.CARTRIDGES_NAME);
+            assertEquals(removedC3, true);
+
+            removedAuto = restClientTenant1.removeEntity(RestConstants.AUTOSCALING_POLICIES,
+                    autoscalingPolicyId, RestConstants.AUTOSCALING_POLICIES_NAME);
+            assertEquals(removedAuto, true);
+
+            removedDep = restClientTenant1.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
+                    "deployment-policy-application-bursting-test", RestConstants.DEPLOYMENT_POLICIES_NAME);
+            assertEquals(removedDep, true);
+
+            removedNet = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
+                    "network-partition-application-bursting-test-1", RestConstants.NETWORK_PARTITIONS_NAME);
+            assertEquals(removedNet, false);
+
+            boolean removedN2 = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
+                    "network-partition-application-bursting-test-2", RestConstants.NETWORK_PARTITIONS_NAME);
+            assertEquals(removedN2, false);
+
+            boolean removeAppPolicy = restClientTenant1.removeEntity(RestConstants.APPLICATION_POLICIES,
+                    "application-policy-application-bursting-test", RestConstants.APPLICATION_POLICIES_NAME);
+            assertEquals(removeAppPolicy, true);
+
+            removedNet = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
+                    "network-partition-application-bursting-test-1", RestConstants.NETWORK_PARTITIONS_NAME);
+            assertEquals(removedNet, true);
+
+            removedN2 = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
+                    "network-partition-application-bursting-test-2", RestConstants.NETWORK_PARTITIONS_NAME);
+            assertEquals(removedN2, true);
+
+            log.info("----------------------------Ended application bursting test case----------------------------");
+
+        }
+        catch (Exception e) {
+            log.error("An error occurred while handling  application bursting", e);
+            assertTrue(false, "An error occurred while handling  application bursting");
+        }
+    }
+}
\ No newline at end of file


[06/21] stratos git commit: Uplifting automation engine to v4.4.3, dynamically pick ports for integration tests

Posted by ra...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/PartitionRoundRobinClusterTest.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/PartitionRoundRobinClusterTest.java b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/PartitionRoundRobinClusterTest.java
new file mode 100644
index 0000000..5b07fc7
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/PartitionRoundRobinClusterTest.java
@@ -0,0 +1,312 @@
+/*
+ * 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.integration.tests.application;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.stratos.common.beans.application.ApplicationBean;
+import org.apache.stratos.integration.common.RestConstants;
+import org.apache.stratos.integration.common.TopologyHandler;
+import org.apache.stratos.integration.tests.StratosIntegrationTest;
+import org.apache.stratos.messaging.domain.application.Application;
+import org.apache.stratos.messaging.domain.application.ApplicationStatus;
+import org.apache.stratos.messaging.domain.application.ClusterDataHolder;
+import org.apache.stratos.messaging.domain.instance.ClusterInstance;
+import org.apache.stratos.messaging.domain.topology.Cluster;
+import org.apache.stratos.messaging.domain.topology.Member;
+import org.apache.stratos.messaging.domain.topology.Service;
+import org.apache.stratos.messaging.message.receiver.application.ApplicationManager;
+import org.apache.stratos.messaging.message.receiver.topology.TopologyManager;
+import org.testng.annotations.Test;
+
+import java.util.*;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.AssertJUnit.assertNotNull;
+import static org.testng.AssertJUnit.assertTrue;
+
+/**
+ * This will handle the scale-up and scale-down of a particular cluster bursting test cases
+ */
+public class PartitionRoundRobinClusterTest extends StratosIntegrationTest {
+    private static final Log log = LogFactory.getLog(SampleApplicationsTest.class);
+    private static final String RESOURCES_PATH = "/partition-round-robin-cluster-test";
+
+    @Test(timeOut = APPLICATION_TEST_TIMEOUT)
+    public void testDeployApplication() {
+        try {
+            log.info("----------------------Started application Bursting test case-------------------------");
+
+            String autoscalingPolicyId = "autoscaling-policy-partition-round-robin-test";
+
+            boolean addedScalingPolicy =
+                    restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.AUTOSCALING_POLICIES_PATH
+                                    + "/" + autoscalingPolicyId + ".json",
+                            RestConstants.AUTOSCALING_POLICIES, RestConstants.AUTOSCALING_POLICIES_NAME);
+            assertEquals(addedScalingPolicy, true);
+
+            boolean addedC1 = restClientTenant1.addEntity(
+                    RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "c7-partition-round-robin-test.json",
+                    RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+            assertEquals(addedC1, true);
+
+            boolean addedN1 = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
+                            "network-partition-partition-round-robin-test.json",
+                    RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
+            assertEquals(addedN1, true);
+
+            boolean addedDep =
+                    restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.DEPLOYMENT_POLICIES_PATH + "/" +
+                                    "deployment-policy-partition-round-robin-test.json",
+                            RestConstants.DEPLOYMENT_POLICIES, RestConstants.DEPLOYMENT_POLICIES_NAME);
+            assertEquals(addedDep, true);
+
+            boolean added = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.APPLICATIONS_PATH + "/" +
+                            "partition-round-robin-test.json", RestConstants.APPLICATIONS,
+                    RestConstants.APPLICATIONS_NAME);
+            assertEquals(added, true);
+
+            ApplicationBean bean = (ApplicationBean) restClientTenant1.getEntity(RestConstants.APPLICATIONS,
+                    "partition-round-robin-test", ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
+            assertEquals(bean.getApplicationId(), "partition-round-robin-test");
+
+            boolean addAppPolicy =
+                    restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.APPLICATION_POLICIES_PATH + "/" +
+                                    "application-policy-partition-round-robin-test.json",
+                            RestConstants.APPLICATION_POLICIES,
+                            RestConstants.APPLICATION_POLICIES_NAME);
+            assertEquals(addAppPolicy, true);
+
+            //deploy the application
+            String resourcePath = RestConstants.APPLICATIONS + "/" + "partition-round-robin-test" +
+                    RestConstants.APPLICATIONS_DEPLOY + "/" + "application-policy-partition-round-robin-test";
+            boolean deployed = restClientTenant1.deployEntity(resourcePath,
+                    RestConstants.APPLICATIONS_NAME);
+            assertEquals(deployed, true);
+
+
+            //Application active handling
+            TopologyHandler.getInstance().assertApplicationStatus(bean.getApplicationId(),
+                    ApplicationStatus.Active, tenant1Id);
+
+            //Cluster active handling
+            TopologyHandler.getInstance().assertClusterActivation(bean.getApplicationId(), tenant1Id);
+
+            //Verifying whether members got created using round robin algorithm
+           /* assertClusterWithRoundRobinAlgorithm(bean.getApplicationId());
+
+            //Application in-active handling
+            log.info("Waiting for the faulty member detection from " +
+                    "CEP as the statistics are stopped...");
+            TopologyHandler.getInstance().assertApplicationStatus(bean.getApplicationId(),
+                    ApplicationStatus.Inactive,tenant1Id);       */
+
+            //Application active handling after application becomes active again
+            TopologyHandler.getInstance().assertApplicationStatus(bean.getApplicationId(),
+                    ApplicationStatus.Active, tenant1Id);
+
+            //Cluster active handling
+            TopologyHandler.getInstance().assertClusterActivation(bean.getApplicationId(), tenant1Id);
+
+            boolean removedAuto = restClientTenant1.removeEntity(RestConstants.AUTOSCALING_POLICIES,
+                    autoscalingPolicyId, RestConstants.AUTOSCALING_POLICIES_NAME);
+            assertEquals(removedAuto, false);
+
+            boolean removedNet = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
+                    "network-partition-partition-round-robin-test",
+                    RestConstants.NETWORK_PARTITIONS_NAME);
+            //Trying to remove the used network partition
+            assertEquals(removedNet, false);
+
+            boolean removedDep = restClientTenant1.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
+                    "deployment-policy-partition-round-robin-test", RestConstants.DEPLOYMENT_POLICIES_NAME);
+            assertEquals(removedDep, false);
+
+            //Un-deploying the application
+            String resourcePathUndeploy = RestConstants.APPLICATIONS + "/" + "partition-round-robin-test" +
+                    RestConstants.APPLICATIONS_UNDEPLOY;
+
+            boolean unDeployed = restClientTenant1.undeployEntity(resourcePathUndeploy,
+                    RestConstants.APPLICATIONS_NAME);
+            assertEquals(unDeployed, true);
+
+            boolean undeploy =
+                    TopologyHandler.getInstance().assertApplicationUndeploy("partition-round-robin-test", tenant1Id);
+            if (!undeploy) {
+                //Need to forcefully undeploy the application
+                log.info("Force undeployment is going to start for the [application] " + "partition-round-robin-test");
+
+                restClientTenant1.undeployEntity(RestConstants.APPLICATIONS + "/" + "partition-round-robin-test" +
+                        RestConstants.APPLICATIONS_UNDEPLOY + "?force=true", RestConstants.APPLICATIONS);
+
+                boolean forceUndeployed = TopologyHandler.getInstance()
+                        .assertApplicationUndeploy("partition-round-robin-test", tenant1Id);
+                assertEquals(forceUndeployed, true, String.format("Forceful undeployment failed for the application %s",
+                        "partition-round-robin-test"));
+
+            }
+
+            boolean removed = restClientTenant1.removeEntity(RestConstants.APPLICATIONS, "partition-round-robin-test",
+                    RestConstants.APPLICATIONS_NAME);
+            assertEquals(removed, true);
+
+            ApplicationBean beanRemoved = (ApplicationBean) restClientTenant1.getEntity(RestConstants.APPLICATIONS,
+                    "partition-round-robin-test", ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
+            assertEquals(beanRemoved, null);
+
+            boolean removedC1 =
+                    restClientTenant1.removeEntity(RestConstants.CARTRIDGES, "c7-partition-round-robin-test",
+                            RestConstants.CARTRIDGES_NAME);
+            assertEquals(removedC1, true);
+
+
+            removedAuto = restClientTenant1.removeEntity(RestConstants.AUTOSCALING_POLICIES,
+                    autoscalingPolicyId, RestConstants.AUTOSCALING_POLICIES_NAME);
+            assertEquals(removedAuto, true);
+
+            removedDep = restClientTenant1.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
+                    "deployment-policy-partition-round-robin-test", RestConstants.DEPLOYMENT_POLICIES_NAME);
+            assertEquals(removedDep, true);
+
+            removedNet = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
+                    "network-partition-partition-round-robin-test", RestConstants.NETWORK_PARTITIONS_NAME);
+            assertEquals(removedNet, false);
+
+
+            boolean removeAppPolicy = restClientTenant1.removeEntity(RestConstants.APPLICATION_POLICIES,
+                    "application-policy-partition-round-robin-test", RestConstants.APPLICATION_POLICIES_NAME);
+            assertEquals(removeAppPolicy, true);
+
+            removedNet = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
+                    "network-partition-partition-round-robin-test", RestConstants.NETWORK_PARTITIONS_NAME);
+            assertEquals(removedNet, true);
+
+            log.info("--------------------Ended application bursting test case---------------------------");
+
+        }
+        catch (Exception e) {
+            log.error("An error occurred while handling  application bursting", e);
+            assertTrue("An error occurred while handling  application bursting", false);
+        }
+    }
+
+    /**
+     * Assert application activation
+     *
+     * @param applicationName
+     */
+    private void assertClusterWithRoundRobinAlgorithm(String applicationName) {
+        Application application =
+                ApplicationManager.getApplications().getApplicationByTenant(applicationName, tenant1Id);
+        assertNotNull(String.format("Application is not found: [application-id] %s",
+                applicationName), application);
+
+        Set<ClusterDataHolder> clusterDataHolderSet = application.getClusterDataRecursively();
+        for (ClusterDataHolder clusterDataHolder : clusterDataHolderSet) {
+            String serviceUUid = clusterDataHolder.getServiceUuid();
+            String clusterId = clusterDataHolder.getClusterId();
+            Service service = TopologyManager.getTopology().getService(serviceUUid);
+            assertNotNull(String.format("Service is not found: [application-id] %s [service] %s",
+                    applicationName, serviceUUid), service);
+
+            Cluster cluster = service.getCluster(clusterId);
+            assertNotNull(String.format("Cluster is not found: [application-id] %s [service] %s [cluster-id] %s",
+                    applicationName, serviceUUid, clusterId), cluster);
+
+            for (ClusterInstance instance : cluster.getInstanceIdToInstanceContextMap().values()) {
+                List<String> partitionsUsedInMembers = new ArrayList<String>();
+                Map<String, List<Long>> partitionIdToMembersMap = new HashMap<String, List<Long>>();
+                String p1 = "network-partition-11-partition-1";
+                String p2 = "network-partition-11-partition-2";
+                for (Member member : cluster.getMembers()) {
+                    String partitionId = member.getPartitionId();
+                    if (p1.equals("network-partition-11-partition-1")) {
+                        p1 = partitionId;
+                    } else if (!p1.equals(partitionId) && p2.equals("network-partition-11-partition-2")) {
+                        p2 = partitionId;
+                    }
+                    if (!partitionIdToMembersMap.containsKey(partitionId)) {
+                        List<Long> members = new ArrayList<Long>();
+                        members.add(member.getInitTime());
+                        partitionIdToMembersMap.put(partitionId, members);
+                    } else {
+                        partitionIdToMembersMap.get(partitionId).add(member.getInitTime());
+                    }
+                    if (!partitionsUsedInMembers.contains(partitionId)) {
+                        partitionsUsedInMembers.add(partitionId);
+                    }
+                }
+
+                List<Long> p1InitTime = partitionIdToMembersMap.get(p1);
+                Collections.sort(p1InitTime);
+
+                List<Long> p2InitTime = partitionIdToMembersMap.get(p2);
+                Collections.sort(p2InitTime);
+
+                List<Long> allInitTime = new ArrayList<Long>();
+                allInitTime.addAll(p1InitTime);
+                allInitTime.addAll(p2InitTime);
+                Collections.sort(allInitTime);
+
+                int p1Index = -1;
+                int p2Index = -1;
+                String previousPartition = null;
+                for (int i = 0; i < allInitTime.size(); i++) {
+                    if (previousPartition == null) {
+                        if (p1InitTime.get(0) == allInitTime.get(i)) {
+                            previousPartition = p1;
+                            p1Index++;
+                        } else if (p2InitTime.get(0) == allInitTime.get(i)) {
+                            previousPartition = p2;
+                            p2Index++;
+
+                        }
+                    } else if (previousPartition.equals(p1)) {
+                        p2Index++;
+                        previousPartition = p2;
+                        assertEquals(allInitTime.get(allInitTime.size() - 1), p2InitTime.get(p2Index),
+                                "Partition-2 doesn't not contain correct values in current iteration");
+                        if (p1Index >= 0) {
+                            assertEquals(allInitTime.get(i - 1), p1InitTime.get(p1Index),
+                                    "Partition-1 doesn't not contain correct values in the previous iteration");
+                            if (p1Index + 1 <= (p1InitTime.size() - 1) && i + 1 <= (allInitTime.size() - 1)) {
+                                assertEquals(allInitTime.get(i + 1), p1InitTime.get(p1Index + 1),
+                                        "Partition-1 doesn't not contain correct values in the next iteration");
+
+                            }
+                        }
+                    } else {
+                        p1Index++;
+                        previousPartition = p1;
+                        assertEquals(allInitTime.get(i), p1InitTime.get(p1Index),
+                                "Partition-1 doesn't not contain correct values in current iteration");
+                        if (p2Index >= 0) {
+                            assertEquals(allInitTime.get(i - 1), p2InitTime.get(p2Index),
+                                    "Partition-2 doesn't not contain correct values in the previous iteration");
+                            if ((p2Index + 1) <= (p2InitTime.size() - 1) && (i + 1) <= (allInitTime.size() - 1)) {
+                                assertEquals(allInitTime.get(i + 1), p2InitTime.get(p2Index + 1),
+                                        "Partition-2 doesn't not contain correct values in the next iteration");
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/SampleApplicationsTest.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/SampleApplicationsTest.java b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/SampleApplicationsTest.java
new file mode 100644
index 0000000..064da7f
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/SampleApplicationsTest.java
@@ -0,0 +1,261 @@
+/*
+ * 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.integration.tests.application;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.stratos.common.beans.application.ApplicationBean;
+import org.apache.stratos.common.beans.cartridge.CartridgeGroupBean;
+import org.apache.stratos.common.beans.cartridge.CartridgeGroupReferenceBean;
+import org.apache.stratos.common.beans.cartridge.CartridgeReferenceBean;
+import org.apache.stratos.integration.common.RestConstants;
+import org.apache.stratos.integration.tests.StratosIntegrationTest;
+import org.testng.annotations.Test;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.AssertJUnit.*;
+
+/**
+ * Sample application tests with application add, .
+ */
+public class SampleApplicationsTest extends StratosIntegrationTest {
+    private static final Log log = LogFactory.getLog(SampleApplicationsTest.class);
+    private static final String RESOURCES_PATH = "/sample-applications-test";
+
+    @Test(timeOut = APPLICATION_TEST_TIMEOUT)
+    public void testApplication() {
+        log.info("-------------------------------Started application test case-------------------------------");
+        try {
+            String autoscalingPolicyId = "autoscaling-policy-sample-applications-test";
+
+            boolean addedScalingPolicy =
+                    restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.AUTOSCALING_POLICIES_PATH
+                                    + "/" + autoscalingPolicyId + ".json",
+                            RestConstants.AUTOSCALING_POLICIES, RestConstants.AUTOSCALING_POLICIES_NAME);
+            assertEquals(addedScalingPolicy, true);
+
+            boolean addedC1 = restClientTenant1.addEntity(
+                    RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "c1-sample-applications-test.json",
+                    RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+            assertEquals(addedC1, true);
+
+            boolean addedC2 = restClientTenant1.addEntity(
+                    RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "c2-sample-applications-test.json",
+                    RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+            assertEquals(addedC2, true);
+
+            boolean addedC3 = restClientTenant1.addEntity(
+                    RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "c3-sample-applications-test.json",
+                    RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+            assertEquals(addedC3, true);
+
+            boolean addedG1 = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGE_GROUPS_PATH +
+                            "/" + "cartrdige-nested-sample-applications-test.json", RestConstants.CARTRIDGE_GROUPS,
+                    RestConstants.CARTRIDGE_GROUPS_NAME);
+            assertEquals(addedG1, true);
+
+            CartridgeGroupBean beanG1 = (CartridgeGroupBean) restClientTenant1.
+                    getEntity(RestConstants.CARTRIDGE_GROUPS, "G1-sample-applications-test",
+                            CartridgeGroupBean.class, RestConstants.CARTRIDGE_GROUPS_NAME);
+            assertEquals(beanG1.getName(), "G1-sample-applications-test");
+
+            boolean addedN1 = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
+                            "network-partition-sample-applications-test-1.json",
+                    RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
+            assertEquals(addedN1, true);
+
+            boolean addedN2 = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
+                            "network-partition-sample-applications-test-2.json",
+                    RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
+            assertEquals(addedN2, true);
+
+            boolean addedDep =
+                    restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.DEPLOYMENT_POLICIES_PATH + "/" +
+                                    "deployment-policy-sample-applications-test.json",
+                            RestConstants.DEPLOYMENT_POLICIES, RestConstants.DEPLOYMENT_POLICIES_NAME);
+            assertEquals(addedDep, true);
+
+            boolean added = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.APPLICATIONS_PATH + "/" +
+                            "g-sc-G123-1-sample-applications-test.json", RestConstants.APPLICATIONS,
+                    RestConstants.APPLICATIONS_NAME);
+            assertEquals(added, true);
+
+            ApplicationBean bean = (ApplicationBean) restClientTenant1.getEntity(RestConstants.APPLICATIONS,
+                    "g-sc-G123-1-sample-applications-test", ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
+            assertEquals(bean.getApplicationId(), "g-sc-G123-1-sample-applications-test");
+
+            CartridgeGroupReferenceBean group1 = bean.getComponents().getGroups().get(0);
+            CartridgeGroupReferenceBean group2 = group1.getGroups().get(0);
+            CartridgeGroupReferenceBean group3 = group2.getGroups().get(0);
+            CartridgeReferenceBean c1 = group1.getCartridges().get(0);
+            CartridgeReferenceBean c2 = group2.getCartridges().get(0);
+            CartridgeReferenceBean c3 = group3.getCartridges().get(0);
+
+            assertEquals(group1.getName(), "G1-sample-applications-test");
+            assertEquals(group1.getAlias(), "group1-sample-applications-test");
+            assertEquals(group1.getGroupMaxInstances(), 1);
+            assertEquals(group1.getGroupMinInstances(), 1);
+
+            assertEquals(c1.getType(), "c1-sample-applications-test");
+            assertEquals(c1.getCartridgeMin(), 1);
+            assertEquals(c1.getCartridgeMax(), 2);
+
+            assertEquals(group2.getAlias(), "group2-sample-applications-test");
+            assertEquals(group2.getName(), "G2-sample-applications-test");
+            assertEquals(group2.getGroupMaxInstances(), 1);
+            assertEquals(group2.getGroupMinInstances(), 1);
+
+            assertEquals(c2.getType(), "c2-sample-applications-test");
+            assertEquals(c2.getCartridgeMin(), 1);
+            assertEquals(c2.getCartridgeMax(), 2);
+
+            assertEquals(group3.getAlias(), "group3-sample-applications-test");
+            assertEquals(group3.getName(), "G3-sample-applications-test");
+            assertEquals(group3.getGroupMaxInstances(), 2);
+            assertEquals(group3.getGroupMinInstances(), 1);
+
+            assertEquals(c3.getType(), "c3-sample-applications-test");
+            assertEquals(c3.getCartridgeMin(), 1);
+            assertEquals(c3.getCartridgeMax(), 2);
+
+            bean = (ApplicationBean) restClientTenant2.getEntity(RestConstants.APPLICATIONS,
+                    "g-sc-G123-1-sample-applications-test", ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
+
+            assertNull("Application found in tenant 2", bean);
+
+            boolean updated = restClientTenant1.updateEntity(RESOURCES_PATH + RestConstants.APPLICATIONS_PATH +
+                            "/g-sc-G123-1-sample-applications-test-v1.json",
+                    RestConstants.APPLICATIONS, RestConstants.APPLICATIONS_NAME);
+            assertEquals(updated, true);
+
+            ApplicationBean updatedBean = (ApplicationBean) restClientTenant1.getEntity(RestConstants.APPLICATIONS,
+                    "g-sc-G123-1-sample-applications-test", ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
+
+            assertEquals(updatedBean.getApplicationId(), "g-sc-G123-1-sample-applications-test");
+
+            group1 = updatedBean.getComponents().getGroups().get(0);
+            group2 = group1.getGroups().get(0);
+            group3 = group2.getGroups().get(0);
+            c1 = group1.getCartridges().get(0);
+            c2 = group2.getCartridges().get(0);
+            c3 = group3.getCartridges().get(0);
+
+            assertEquals(group1.getName(), "G1-sample-applications-test");
+            assertEquals(group1.getAlias(), "group1-sample-applications-test");
+            assertEquals(group1.getGroupMaxInstances(), 1);
+            assertEquals(group1.getGroupMinInstances(), 1);
+
+            assertEquals(c1.getType(), "c1-sample-applications-test");
+            assertEquals(c1.getCartridgeMin(), 2);
+            assertEquals(c1.getCartridgeMax(), 3);
+
+            assertEquals(group2.getAlias(), "group2-sample-applications-test");
+            assertEquals(group2.getName(), "G2-sample-applications-test");
+            assertEquals(group2.getGroupMaxInstances(), 1);
+            assertEquals(group2.getGroupMinInstances(), 1);
+
+            assertEquals(c2.getType(), "c2-sample-applications-test");
+            assertEquals(c2.getCartridgeMin(), 2);
+            assertEquals(c2.getCartridgeMax(), 4);
+
+            assertEquals(group3.getAlias(), "group3-sample-applications-test");
+            assertEquals(group3.getName(), "G3-sample-applications-test");
+            assertEquals(group3.getGroupMaxInstances(), 3);
+            assertEquals(group3.getGroupMinInstances(), 2);
+
+            assertEquals(c3.getType(), "c3-sample-applications-test");
+            assertEquals(c3.getCartridgeMin(), 2);
+            assertEquals(c3.getCartridgeMax(), 3);
+
+            updatedBean = (ApplicationBean) restClientTenant2.getEntity(RestConstants.APPLICATIONS,
+                    "g-sc-G123-1-sample-applications-test", ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
+
+            assertNull("Application found in tenant 2", updatedBean);
+
+            boolean removedGroup =
+                    restClientTenant1.removeEntity(RestConstants.CARTRIDGE_GROUPS, "G1-sample-applications-test",
+                            RestConstants.CARTRIDGE_GROUPS_NAME);
+            assertFalse(removedGroup);
+
+            boolean removedAuto = restClientTenant1.removeEntity(RestConstants.AUTOSCALING_POLICIES,
+                    autoscalingPolicyId, RestConstants.AUTOSCALING_POLICIES_NAME);
+            assertFalse(removedAuto);
+
+            boolean removedNet = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
+                    "network-partition-sample-applications-test-1",
+                    RestConstants.NETWORK_PARTITIONS_NAME);
+            //Trying to remove the used network partition
+            assertFalse(removedNet);
+
+            boolean removedDep = restClientTenant1.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
+                    "deployment-policy-sample-applications-test", RestConstants.DEPLOYMENT_POLICIES_NAME);
+            assertFalse(removedDep);
+
+            boolean removed =
+                    restClientTenant1.removeEntity(RestConstants.APPLICATIONS, "g-sc-G123-1-sample-applications-test",
+                            RestConstants.APPLICATIONS_NAME);
+            assertTrue(removed);
+
+            ApplicationBean beanRemoved = (ApplicationBean) restClientTenant1.getEntity(RestConstants.APPLICATIONS,
+                    "g-sc-G123-1-sample-applications-test", ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
+            assertEquals(beanRemoved, null);
+
+            removedGroup = restClientTenant1.removeEntity(RestConstants.CARTRIDGE_GROUPS, "G1-sample-applications-test",
+                    RestConstants.CARTRIDGE_GROUPS_NAME);
+            assertEquals(removedGroup, true);
+
+            boolean removedC1 = restClientTenant1.removeEntity(RestConstants.CARTRIDGES, "c1-sample-applications-test",
+                    RestConstants.CARTRIDGES_NAME);
+            assertEquals(removedC1, true);
+
+            boolean removedC2 = restClientTenant1.removeEntity(RestConstants.CARTRIDGES, "c2-sample-applications-test",
+                    RestConstants.CARTRIDGES_NAME);
+            assertEquals(removedC2, true);
+
+            boolean removedC3 = restClientTenant1.removeEntity(RestConstants.CARTRIDGES, "c3-sample-applications-test",
+                    RestConstants.CARTRIDGES_NAME);
+            assertEquals(removedC3, true);
+
+            removedAuto = restClientTenant1.removeEntity(RestConstants.AUTOSCALING_POLICIES,
+                    autoscalingPolicyId, RestConstants.AUTOSCALING_POLICIES_NAME);
+            assertEquals(removedAuto, true);
+
+            removedDep = restClientTenant1.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
+                    "deployment-policy-sample-applications-test", RestConstants.DEPLOYMENT_POLICIES_NAME);
+            assertEquals(removedDep, true);
+
+            removedNet = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
+                    "network-partition-sample-applications-test-1", RestConstants.NETWORK_PARTITIONS_NAME);
+            assertEquals(removedNet, true);
+
+            boolean removedN2 = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
+                    "network-partition-sample-applications-test-2", RestConstants.NETWORK_PARTITIONS_NAME);
+            assertEquals(removedN2, true, String.format(
+                    "[Network partition] network-partition-sample-applications-test-2 could not be removed for " +
+                            "[application] g-sc-G123-1-sample-applications-test"));
+
+            log.info("-------------------------------Ended application test case-------------------------------");
+        }
+        catch (Exception e) {
+            log.error("An error occurred while handling application test case", e);
+            assertTrue("An error occurred while handling application test case", false);
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/SingleClusterScalingTest.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/SingleClusterScalingTest.java b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/SingleClusterScalingTest.java
new file mode 100644
index 0000000..0cbacc6
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/SingleClusterScalingTest.java
@@ -0,0 +1,373 @@
+/*
+ * 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.integration.tests.application;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.stratos.common.beans.application.ApplicationBean;
+import org.apache.stratos.common.beans.policy.deployment.ApplicationPolicyBean;
+import org.apache.stratos.integration.common.RestConstants;
+import org.apache.stratos.integration.common.TopologyHandler;
+import org.apache.stratos.integration.tests.StratosIntegrationTest;
+import org.apache.stratos.messaging.domain.application.Application;
+import org.apache.stratos.messaging.domain.application.ApplicationStatus;
+import org.apache.stratos.messaging.domain.application.ClusterDataHolder;
+import org.apache.stratos.messaging.domain.instance.ClusterInstance;
+import org.apache.stratos.messaging.domain.topology.Cluster;
+import org.apache.stratos.messaging.domain.topology.Member;
+import org.apache.stratos.messaging.domain.topology.MemberStatus;
+import org.apache.stratos.messaging.domain.topology.Service;
+import org.apache.stratos.messaging.message.receiver.application.ApplicationManager;
+import org.apache.stratos.messaging.message.receiver.topology.TopologyManager;
+import org.testng.annotations.Test;
+
+import java.util.Set;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.AssertJUnit.assertNotNull;
+import static org.testng.AssertJUnit.assertTrue;
+
+/**
+ * This will handle the scale-up and scale-down of a particular cluster bursting test cases
+ */
+public class SingleClusterScalingTest extends StratosIntegrationTest {
+    private static final Log log = LogFactory.getLog(SampleApplicationsTest.class);
+    private static final String RESOURCES_PATH = "/single-cluster-scaling-test";
+    private static final int CLUSTER_SCALE_UP_TIMEOUT = 180000;
+    private static final int CLUSTER_SCALE_DOWN_TIMEOUT = 360000;
+    private int activeInstancesAfterScaleup = 0;
+
+    @Test(timeOut = APPLICATION_TEST_TIMEOUT)
+    public void testDeployApplication() {
+        try {
+            log.info("----------------------Started application Bursting test case---------------------------");
+
+            String autoscalingPolicyId = "autoscaling-policy-single-cluster-scaling-test";
+
+            boolean addedScalingPolicy =
+                    restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.AUTOSCALING_POLICIES_PATH
+                                    + "/" + autoscalingPolicyId + ".json",
+                            RestConstants.AUTOSCALING_POLICIES, RestConstants.AUTOSCALING_POLICIES_NAME);
+            assertEquals(addedScalingPolicy, true);
+
+            boolean addedC1 = restClientTenant1.addEntity(
+                    RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "c7-single-cluster-scaling-test.json",
+                    RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+            assertEquals(addedC1, true);
+
+            boolean addedN1 = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
+                            "network-partition-single-cluster-scaling-test.json",
+                    RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
+            assertEquals(addedN1, true);
+
+            boolean addedDep =
+                    restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.DEPLOYMENT_POLICIES_PATH + "/" +
+                                    "deployment-policy-single-cluster-scaling-test.json",
+                            RestConstants.DEPLOYMENT_POLICIES, RestConstants.DEPLOYMENT_POLICIES_NAME);
+            assertEquals(addedDep, true);
+
+            boolean added = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.APPLICATIONS_PATH + "/" +
+                            "single-cluster-scaling-test.json", RestConstants.APPLICATIONS,
+                    RestConstants.APPLICATIONS_NAME);
+            assertEquals(added, true);
+
+            ApplicationBean bean = (ApplicationBean) restClientTenant1.getEntity(RestConstants.APPLICATIONS,
+                    "single-cluster-scaling-test", ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
+            assertEquals(bean.getApplicationId(), "single-cluster-scaling-test");
+
+            boolean addAppPolicy =
+                    restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.APPLICATION_POLICIES_PATH + "/" +
+                                    "application-policy-single-cluster-scaling-test.json",
+                            RestConstants.APPLICATION_POLICIES,
+                            RestConstants.APPLICATION_POLICIES_NAME);
+            assertEquals(addAppPolicy, true);
+
+            ApplicationPolicyBean policyBean = (ApplicationPolicyBean) restClientTenant1.getEntity(
+                    RestConstants.APPLICATION_POLICIES,
+                    "application-policy-single-cluster-scaling-test", ApplicationPolicyBean.class,
+                    RestConstants.APPLICATION_POLICIES_NAME);
+
+            //deploy the application
+            String resourcePath = RestConstants.APPLICATIONS + "/" + "single-cluster-scaling-test" +
+                    RestConstants.APPLICATIONS_DEPLOY + "/" + "application-policy-single-cluster-scaling-test";
+            boolean deployed = restClientTenant1.deployEntity(resourcePath,
+                    RestConstants.APPLICATIONS_NAME);
+            assertEquals(deployed, true);
+
+            //Application active handling
+            TopologyHandler.getInstance().assertApplicationStatus(bean.getApplicationId()
+                    , ApplicationStatus.Active, tenant1Id);
+
+            //Cluster active handling
+            TopologyHandler.getInstance().assertClusterActivation(bean.getApplicationId(), tenant1Id);
+
+            //Verifying whether members got created using round robin algorithm
+            assertClusterWithScalingup(bean.getApplicationId(), tenant1Id);
+
+            boolean removedAuto = restClientTenant1.removeEntity(RestConstants.AUTOSCALING_POLICIES,
+                    autoscalingPolicyId, RestConstants.AUTOSCALING_POLICIES_NAME);
+            assertEquals(removedAuto, false);
+
+            boolean removedNet = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
+                    "network-partition-single-cluster-scaling-test",
+                    RestConstants.NETWORK_PARTITIONS_NAME);
+            //Trying to remove the used network partition
+            assertEquals(removedNet, false);
+
+            boolean removedDep = restClientTenant1.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
+                    "deployment-policy-single-cluster-scaling-test", RestConstants.DEPLOYMENT_POLICIES_NAME);
+            assertEquals(removedDep, false);
+
+            //Un-deploying the application
+            String resourcePathUndeploy = RestConstants.APPLICATIONS + "/" + "single-cluster-scaling-test" +
+                    RestConstants.APPLICATIONS_UNDEPLOY;
+
+            boolean unDeployed = restClientTenant1.undeployEntity(resourcePathUndeploy,
+                    RestConstants.APPLICATIONS_NAME);
+            assertEquals(unDeployed, true);
+
+            boolean undeploy =
+                    TopologyHandler.getInstance().assertApplicationUndeploy("single-cluster-scaling-test", tenant1Id);
+            if (!undeploy) {
+                //Need to forcefully undeploy the application
+                log.info("Force undeployment is going to start for the [application] " + "single-cluster-scaling-test");
+
+                restClientTenant1.undeployEntity(RestConstants.APPLICATIONS + "/" + "single-cluster-scaling-test" +
+                        RestConstants.APPLICATIONS_UNDEPLOY + "?force=true", RestConstants.APPLICATIONS);
+
+                boolean forceUndeployed = TopologyHandler.getInstance()
+                        .assertApplicationUndeploy("single-cluster-scaling-test", tenant1Id);
+                assertEquals(forceUndeployed, true, String.format("Forceful undeployment failed for the application %s",
+                        "single-cluster-scaling-test"));
+
+            }
+
+            boolean removed = restClientTenant1.removeEntity(RestConstants.APPLICATIONS, "single-cluster-scaling-test",
+                    RestConstants.APPLICATIONS_NAME);
+            assertEquals(removed, true);
+
+            ApplicationBean beanRemoved = (ApplicationBean) restClientTenant1.getEntity(RestConstants.APPLICATIONS,
+                    "single-cluster-scaling-test", ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
+            assertEquals(beanRemoved, null);
+
+            boolean removedC1 =
+                    restClientTenant1.removeEntity(RestConstants.CARTRIDGES, "c7-single-cluster-scaling-test",
+                            RestConstants.CARTRIDGES_NAME);
+            assertEquals(removedC1, true);
+
+
+            removedAuto = restClientTenant1.removeEntity(RestConstants.AUTOSCALING_POLICIES,
+                    autoscalingPolicyId, RestConstants.AUTOSCALING_POLICIES_NAME);
+            assertEquals(removedAuto, true);
+
+            removedDep = restClientTenant1.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
+                    "deployment-policy-single-cluster-scaling-test", RestConstants.DEPLOYMENT_POLICIES_NAME);
+            assertEquals(removedDep, true);
+
+            removedNet = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
+                    "network-partition-single-cluster-scaling-test", RestConstants.NETWORK_PARTITIONS_NAME);
+            assertEquals(removedNet, false);
+
+
+            boolean removeAppPolicy = restClientTenant1.removeEntity(RestConstants.APPLICATION_POLICIES,
+                    "application-policy-single-cluster-scaling-test", RestConstants.APPLICATION_POLICIES_NAME);
+            assertEquals(removeAppPolicy, true);
+
+            removedNet = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
+                    "network-partition-single-cluster-scaling-test", RestConstants.NETWORK_PARTITIONS_NAME);
+            assertEquals(removedNet, true);
+
+            log.info("-------------------------Ended application bursting test case-------------------------");
+
+        }
+        catch (Exception e) {
+            log.error("An error occurred while handling  application bursting", e);
+            assertTrue("An error occurred while handling  application bursting", false);
+        }
+    }
+
+    /**
+     * Assert application activation
+     *
+     * @param applicationName
+     * @param tenantId
+     */
+    private void assertClusterWithScalingup(String applicationName, int tenantId) {
+        Application application =
+                ApplicationManager.getApplications().getApplicationByTenant(applicationName, tenantId);
+        assertNotNull(String.format("Application is not found: [application-id] %s",
+                applicationName), application);
+        boolean clusterScaleup = false;
+        String clusterId = null;
+        long startTime = System.currentTimeMillis();
+        while (!clusterScaleup) {
+            try {
+                Thread.sleep(1000);
+            }
+            catch (InterruptedException ignore) {
+            }
+            Set<ClusterDataHolder> clusterDataHolderSet = application.getClusterDataRecursively();
+            for (ClusterDataHolder clusterDataHolder : clusterDataHolderSet) {
+                String serviceUuid = clusterDataHolder.getServiceUuid();
+                clusterId = clusterDataHolder.getClusterId();
+                Service service = TopologyManager.getTopology().getService(serviceUuid);
+                assertNotNull(String.format("Service is not found: [application-id] %s [service] %s",
+                        applicationName, serviceUuid), service);
+
+                Cluster cluster = service.getCluster(clusterId);
+                assertNotNull(String.format("Cluster is not found: [application-id] %s [service] %s [cluster-id] %s",
+                        applicationName, serviceUuid, clusterId), cluster);
+                for (ClusterInstance instance : cluster.getInstanceIdToInstanceContextMap().values()) {
+                    int activeInstances = 0;
+                    for (Member member : cluster.getMembers()) {
+                        if (member.getClusterInstanceId().equals(instance.getInstanceId())) {
+                            if (member.getStatus().equals(MemberStatus.Active)) {
+                                activeInstances++;
+                            }
+                        }
+                    }
+                    clusterScaleup = activeInstances >= clusterDataHolder.getMinInstances();
+                    if (clusterScaleup) {
+                        activeInstancesAfterScaleup = activeInstances;
+                        break;
+                    }
+                }
+                application = ApplicationManager.getApplications().getApplicationByTenant(applicationName, tenantId);
+                if ((System.currentTimeMillis() - startTime) > CLUSTER_SCALE_UP_TIMEOUT) {
+                    break;
+                }
+            }
+        }
+        assertEquals(true, clusterScaleup, String.format("Cluster did not get scaled up: [cluster-id] %s", clusterId));
+    }
+
+    /**
+     * Assert application activation
+     *
+     * @param applicationName
+     */
+    private void assertClusterWithScaleDown(String applicationName, int tenantId) {
+        Application application =
+                ApplicationManager.getApplications().getApplicationByTenant(applicationName, tenantId);
+        assertNotNull(String.format("Application is not found: [application-id] %s",
+                applicationName), application);
+        boolean clusterScaleDown = false;
+        String clusterId = null;
+        long startTime = System.currentTimeMillis();
+        while (!clusterScaleDown) {
+            try {
+                Thread.sleep(1000);
+            }
+            catch (InterruptedException ignore) {
+            }
+            Set<ClusterDataHolder> clusterDataHolderSet = application.getClusterDataRecursively();
+            for (ClusterDataHolder clusterDataHolder : clusterDataHolderSet) {
+                String serviceName = clusterDataHolder.getServiceUuid();
+                clusterId = clusterDataHolder.getClusterId();
+                Service service = TopologyManager.getTopology().getService(serviceName);
+                assertNotNull(String.format("Service is not found: [application-id] %s [service] %s",
+                        applicationName, serviceName), service);
+
+                Cluster cluster = service.getCluster(clusterId);
+                assertNotNull(String.format("Cluster is not found: [application-id] %s [service] %s [cluster-id] %s",
+                        applicationName, serviceName, clusterId), cluster);
+                for (ClusterInstance instance : cluster.getInstanceIdToInstanceContextMap().values()) {
+                    int activeInstances = 0;
+                    for (Member member : cluster.getMembers()) {
+                        if (member.getClusterInstanceId().equals(instance.getInstanceId())) {
+                            if (member.getStatus().equals(MemberStatus.Active)) {
+                                activeInstances++;
+                            }
+                        }
+                    }
+
+                    if (activeInstances > activeInstancesAfterScaleup) {
+                        activeInstancesAfterScaleup = activeInstances;
+                    }
+
+                    clusterScaleDown = activeInstancesAfterScaleup - 1 == activeInstances;
+                    if (clusterScaleDown) {
+                        break;
+                    }
+
+                }
+
+                application = ApplicationManager.getApplications().getApplicationByTenant(applicationName, tenantId);
+                if ((System.currentTimeMillis() - startTime) > CLUSTER_SCALE_DOWN_TIMEOUT) {
+                    break;
+                }
+            }
+        }
+        assertEquals(clusterScaleDown, true,
+                String.format("Cluster did not get scaled up: [cluster-id] %s", clusterId));
+    }
+
+    /**
+     * Assert application activation
+     *
+     * @param applicationName
+     */
+    private void assertClusterScaleDownToMinimumCount(String applicationName) {
+        Application application = ApplicationManager.getApplications().getApplication(applicationName);
+        assertNotNull(String.format("Application is not found: [application-id] %s",
+                applicationName), application);
+        boolean clusterScaleDown = false;
+        String clusterId = null;
+        long startTime = System.currentTimeMillis();
+        while (!clusterScaleDown) {
+            try {
+                Thread.sleep(1000);
+            }
+            catch (InterruptedException ignore) {
+            }
+            Set<ClusterDataHolder> clusterDataHolderSet = application.getClusterDataRecursively();
+            for (ClusterDataHolder clusterDataHolder : clusterDataHolderSet) {
+                String serviceName = clusterDataHolder.getServiceType();
+                clusterId = clusterDataHolder.getClusterId();
+                Service service = TopologyManager.getTopology().getService(serviceName);
+                assertNotNull(String.format("Service is not found: [application-id] %s [service] %s",
+                        applicationName, serviceName), service);
+
+                Cluster cluster = service.getCluster(clusterId);
+                assertNotNull(String.format("Cluster is not found: [application-id] %s [service] %s [cluster-id] %s",
+                        applicationName, serviceName, clusterId), cluster);
+                for (ClusterInstance instance : cluster.getInstanceIdToInstanceContextMap().values()) {
+                    int activeInstances = 0;
+                    for (Member member : cluster.getMembers()) {
+                        if (member.getClusterInstanceId().equals(instance.getInstanceId())) {
+                            if (member.getStatus().equals(MemberStatus.Active)) {
+                                activeInstances++;
+                            }
+                        }
+                    }
+                    clusterScaleDown = activeInstances == clusterDataHolder.getMinInstances();
+                    if (clusterScaleDown) {
+                        break;
+                    }
+                }
+                application = ApplicationManager.getApplications().getApplication(applicationName);
+                if ((System.currentTimeMillis() - startTime) > CLUSTER_SCALE_DOWN_TIMEOUT) {
+                    break;
+                }
+            }
+        }
+        assertEquals(clusterScaleDown, true,
+                String.format("Cluster did not get scaled up: [cluster-id] %s", clusterId));
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/group/CartridgeGroupTest.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/group/CartridgeGroupTest.java b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/group/CartridgeGroupTest.java
new file mode 100644
index 0000000..6c1af4f
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/group/CartridgeGroupTest.java
@@ -0,0 +1,149 @@
+/*
+ * 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.integration.tests.group;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.stratos.common.beans.cartridge.CartridgeGroupBean;
+import org.apache.stratos.integration.common.RestConstants;
+import org.apache.stratos.integration.tests.StratosIntegrationTest;
+import org.testng.annotations.Test;
+
+import static org.testng.AssertJUnit.*;
+
+/**
+ * Test to handle Cartridge group CRUD operations
+ */
+public class CartridgeGroupTest extends StratosIntegrationTest {
+    private static final Log log = LogFactory.getLog(CartridgeGroupTest.class);
+    private static final String RESOURCES_PATH = "/cartridge-group-test";
+
+    @Test(timeOut = GLOBAL_TEST_TIMEOUT)
+    public void testCartridgeGroup() {
+        try {
+            log.info("-------------------------Started Cartridge group test case-------------------------");
+
+            boolean addedC1 = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH +
+                            "/" + "c4-cartridge-group-test.json",
+                    RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+            assertEquals(String.format("Cartridge did not added: [cartridge-name] %s",
+                    "c4-cartridge-group-test"), addedC1, true);
+
+            boolean addedC2 = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH +
+                            "/" + "c5-cartridge-group-test.json",
+                    RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+            assertEquals(String.format("Cartridge did not added: [cartridge-name] %s",
+                    "c5-cartridge-group-test"), addedC2, true);
+
+            boolean addedC3 = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH +
+                            "/" + "c6-cartridge-group-test.json",
+                    RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+            assertEquals(String.format("Cartridge did not added: [cartridge-name] %s",
+                    "c6-cartridge-group-test"), addedC3, true);
+
+            boolean added = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGE_GROUPS_PATH +
+                            "/" + "g4-g5-g6-cartridge-group-test.json", RestConstants.CARTRIDGE_GROUPS,
+                    RestConstants.CARTRIDGE_GROUPS_NAME);
+            assertEquals(String.format("Cartridge Group did not added: [cartridge-group-name] %s",
+                    "g4-g5-g6-cartridge-group-test"), added, true);
+
+            CartridgeGroupBean bean = (CartridgeGroupBean) restClientTenant1.
+                    getEntity(RestConstants.CARTRIDGE_GROUPS, "G4-cartridge-group-test",
+                            CartridgeGroupBean.class, RestConstants.CARTRIDGE_GROUPS_NAME);
+            assertEquals(String.format("Cartridge Group name did not match: [cartridge-group-name] %s",
+                    "g4-g5-g6-cartridge-group-test.json"), bean.getName(), "G4-cartridge-group-test");
+
+            CartridgeGroupBean tenant2Bean = (CartridgeGroupBean) restClientTenant2.
+                    getEntity(RestConstants.CARTRIDGE_GROUPS, "G4-cartridge-group-test",
+                            CartridgeGroupBean.class, RestConstants.CARTRIDGE_GROUPS_NAME);
+            assertNull(String.format("Cartridge Group name fouund in tenant 2: [cartridge-group-name] %s",
+                    bean.getName()), tenant2Bean);
+
+            boolean updated = restClientTenant1.updateEntity(RESOURCES_PATH + RestConstants.CARTRIDGE_GROUPS_PATH +
+                            "/" + "g4-g5-g6-cartridge-group-test-v1.json",
+                    RestConstants.CARTRIDGE_GROUPS, RestConstants.CARTRIDGE_GROUPS_NAME);
+            assertEquals(String.format("Cartridge Group did not updated: [cartridge-group-name] %s",
+                    "g4-g5-g6-cartridge-group-test"), updated, true);
+
+            CartridgeGroupBean updatedBean = (CartridgeGroupBean) restClientTenant1.
+                    getEntity(RestConstants.CARTRIDGE_GROUPS, "G4-cartridge-group-test",
+                            CartridgeGroupBean.class, RestConstants.CARTRIDGE_GROUPS_NAME);
+            assertEquals(String.format("Updated Cartridge Group didn't match: [cartridge-group-name] %s",
+                    "g4-g5-g6-cartridge-group-test"), updatedBean.getName(), "G4-cartridge-group-test");
+
+            updatedBean = (CartridgeGroupBean) restClientTenant2.
+                    getEntity(RestConstants.CARTRIDGE_GROUPS, "G4-cartridge-group-test",
+                            CartridgeGroupBean.class, RestConstants.CARTRIDGE_GROUPS_NAME);
+            assertNull(String.format("Updated Cartridge Group found in other tenant: [cartridge-group-name] %s",
+                    "g4-g5-g6-cartridge-group-test"), updatedBean);
+
+            boolean removedC1 = restClientTenant1.removeEntity(RestConstants.CARTRIDGES, "c4-cartridge-group-test",
+                    RestConstants.CARTRIDGE_GROUPS_NAME);
+            assertEquals(String.format("Cartridge can be removed while it is used in " +
+                    "cartridge group: [cartridge-name] %s", "c4-cartridge-group-test"), removedC1, false);
+
+            boolean removedC2 = restClientTenant1.removeEntity(RestConstants.CARTRIDGES, "c5-cartridge-group-test",
+                    RestConstants.CARTRIDGE_GROUPS_NAME);
+            assertEquals(String.format("Cartridge can be removed while it is used in " +
+                            "cartridge group: [cartridge-name] %s",
+                    "c5-cartridge-group-test"), removedC2, false);
+
+            boolean removedC3 = restClientTenant1.removeEntity(RestConstants.CARTRIDGES, "c6-cartridge-group-test",
+                    RestConstants.CARTRIDGE_GROUPS_NAME);
+            assertEquals(String.format("Cartridge can be removed while it is used in " +
+                            "cartridge group: [cartridge-name] %s",
+                    "c6-cartridge-group-test"), removedC3, false);
+
+            boolean removed = restClientTenant1.removeEntity(RestConstants.CARTRIDGE_GROUPS, "G4-cartridge-group-test",
+                    RestConstants.CARTRIDGE_GROUPS_NAME);
+            assertEquals(String.format("Cartridge Group did not removed: [cartridge-group-name] %s",
+                    "g4-g5-g6-cartridge-group-test"), removed, true);
+
+            CartridgeGroupBean beanRemoved = (CartridgeGroupBean) restClientTenant1.
+                    getEntity(RestConstants.CARTRIDGE_GROUPS, "G4-cartridge-group-test",
+                            CartridgeGroupBean.class, RestConstants.CARTRIDGE_GROUPS_NAME);
+            assertEquals(String.format("Cartridge Group did not removed completely: " +
+                            "[cartridge-group-name] %s",
+                    "g4-g5-g6-cartridge-group-test"), beanRemoved, null);
+
+            removedC1 = restClientTenant1.removeEntity(RestConstants.CARTRIDGES, "c4-cartridge-group-test",
+                    RestConstants.CARTRIDGE_GROUPS_NAME);
+            assertEquals(String.format("Cartridge can not be removed : [cartridge-name] %s",
+                    "c4-cartridge-group-test"), removedC1, true);
+
+            removedC2 = restClientTenant1.removeEntity(RestConstants.CARTRIDGES, "c5-cartridge-group-test",
+                    RestConstants.CARTRIDGE_GROUPS_NAME);
+            assertEquals(String.format("Cartridge can not be removed : [cartridge-name] %s",
+                    "c5-cartridge-group-test"), removedC2, true);
+
+            removedC3 = restClientTenant1.removeEntity(RestConstants.CARTRIDGES, "c6-cartridge-group-test",
+                    RestConstants.CARTRIDGE_GROUPS_NAME);
+            assertEquals(String.format("Cartridge can not be removed : [cartridge-name] %s",
+                    "c6-cartridge-group-test"), removedC3, true);
+
+            log.info("-------------------------Ended Cartridge group test case-------------------------");
+
+        }
+        catch (Exception e) {
+            log.error("An error occurred while handling Cartridge group test case", e);
+            assertTrue("An error occurred while handling Cartridge group test case", false);
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/group/CartridgeTest.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/group/CartridgeTest.java b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/group/CartridgeTest.java
new file mode 100644
index 0000000..84a2ae7
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/group/CartridgeTest.java
@@ -0,0 +1,191 @@
+/*
+ * 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.integration.tests.group;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.stratos.common.beans.PropertyBean;
+import org.apache.stratos.common.beans.cartridge.CartridgeBean;
+import org.apache.stratos.integration.common.RestConstants;
+import org.apache.stratos.integration.tests.StratosIntegrationTest;
+import org.testng.annotations.Test;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.AssertJUnit.*;
+
+/**
+ * Test to handle Cartridge CRUD operations
+ */
+public class CartridgeTest extends StratosIntegrationTest {
+    private static final Log log = LogFactory.getLog(CartridgeTest.class);
+    private static final String RESOURCES_PATH = "/cartridge-test";
+
+    @Test(timeOut = GLOBAL_TEST_TIMEOUT)
+    public void testCartridge() {
+        log.info("--------------------Started Cartridge test case-----------------------------");
+
+        try {
+            String cartridgeType = "c0-cartridge-test";
+            boolean added = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" +
+                            cartridgeType + ".json",
+                    RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+            assertEquals(added, true);
+            CartridgeBean bean = (CartridgeBean) restClientTenant1.
+                    getEntity(RestConstants.CARTRIDGES, cartridgeType,
+                            CartridgeBean.class, RestConstants.CARTRIDGES_NAME);
+            assertEquals(bean.getCategory(), "Application");
+
+            for (PropertyBean property : bean.getProperty()) {
+                if (property.getName().equals("payload_parameter.CEP_IP")) {
+                    assertEquals(property.getValue(), "octl.qmog.cisco.com");
+                } else if (property.getName().equals("payload_parameter.CEP_ADMIN_PASSWORD")) {
+                    assertEquals(property.getValue(), "admin");
+                } else if (property.getName().equals("payload_parameter.MONITORING_SERVER_IP")) {
+                    assertEquals(property.getValue(), "octl.qmog.cisco.com");
+                } else if (property.getName().equals("payload_parameter.QTCM_NETWORK_COUNT")) {
+                    assertEquals(property.getValue(), "1");
+                } else if (property.getName().equals("payload_parameter.MONITORING_SERVER_ADMIN_PASSWORD")) {
+                    assertEquals(property.getValue(), "admin");
+                } else if (property.getName().equals("payload_parameter.QTCM_DNS_SEGMENT")) {
+                    assertEquals(property.getValue(), "test");
+                } else if (property.getName().equals("payload_parameter.MONITORING_SERVER_SECURE_PORT")) {
+                    assertEquals(property.getValue(), "7711");
+                } else if (property.getName().equals("payload_parameter.MONITORING_SERVER_PORT")) {
+                    assertEquals(property.getValue(), "7611");
+                } else if (property.getName().equals("payload_parameter.CEP_PORT")) {
+                    assertEquals(property.getValue(), "7611");
+                } else if (property.getName().equals("payload_parameter.MB_PORT")) {
+                    assertEquals(property.getValue(), "61616");
+                }
+            }
+            bean = (CartridgeBean) restClientTenant2.
+                    getEntity(RestConstants.CARTRIDGES, cartridgeType,
+                            CartridgeBean.class, RestConstants.CARTRIDGES_NAME);
+            assertNull("Cartridge exists in other tenant", bean);
+            boolean updated = restClientTenant1.updateEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" +
+                            cartridgeType + "-v1.json",
+                    RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+            assertEquals(updated, true);
+            CartridgeBean updatedBean = (CartridgeBean) restClientTenant1.
+                    getEntity(RestConstants.CARTRIDGES, cartridgeType,
+                            CartridgeBean.class, RestConstants.CARTRIDGES_NAME);
+            assertEquals(updatedBean.getType(), "c0-cartridge-test");
+            assertEquals(updatedBean.getCategory(), "Data");
+            assertEquals(updatedBean.getHost(), "qmog.cisco.com12");
+            for (PropertyBean property : updatedBean.getProperty()) {
+                if (property.getName().equals("payload_parameter.CEP_IP")) {
+                    assertEquals(property.getValue(), "octl.qmog.cisco.com123");
+                } else if (property.getName().equals("payload_parameter.CEP_ADMIN_PASSWORD")) {
+                    assertEquals(property.getValue(), "admin123");
+                } else if (property.getName().equals("payload_parameter.MONITORING_SERVER_IP")) {
+                    assertEquals(property.getValue(), "octl.qmog.cisco.com123");
+                } else if (property.getName().equals("payload_parameter.QTCM_NETWORK_COUNT")) {
+                    assertEquals(property.getValue(), "3");
+                } else if (property.getName().equals("payload_parameter.MONITORING_SERVER_ADMIN_PASSWORD")) {
+                    assertEquals(property.getValue(), "admin123");
+                } else if (property.getName().equals("payload_parameter.QTCM_DNS_SEGMENT")) {
+                    assertEquals(property.getValue(), "test123");
+                } else if (property.getName().equals("payload_parameter.MONITORING_SERVER_SECURE_PORT")) {
+                    assertEquals(property.getValue(), "7712");
+                } else if (property.getName().equals("payload_parameter.MONITORING_SERVER_PORT")) {
+                    assertEquals(property.getValue(), "7612");
+                } else if (property.getName().equals("payload_parameter.CEP_PORT")) {
+                    assertEquals(property.getValue(), "7612");
+                } else if (property.getName().equals("payload_parameter.MB_PORT")) {
+                    assertEquals(property.getValue(), "61617");
+                }
+            }
+
+            bean = (CartridgeBean) restClientTenant2.
+                    getEntity(RestConstants.CARTRIDGES, cartridgeType,
+                            CartridgeBean.class, RestConstants.CARTRIDGES_NAME);
+            assertNull("Cartridge exists in other tenant", bean);
+
+            added = restClientTenant2.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" +
+                            cartridgeType + ".json",
+                    RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+            assertEquals(added, true);
+
+            updated = restClientTenant2.updateEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" +
+                            cartridgeType + "-v1.json",
+                    RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+            assertEquals(updated, true);
+
+            updatedBean = (CartridgeBean) restClientTenant2.
+                    getEntity(RestConstants.CARTRIDGES, cartridgeType,
+                            CartridgeBean.class, RestConstants.CARTRIDGES_NAME);
+            assertEquals(updatedBean.getType(), "c0-cartridge-test");
+            assertEquals(updatedBean.getCategory(), "Data");
+            assertEquals(updatedBean.getHost(), "qmog.cisco.com12");
+            for (PropertyBean property : updatedBean.getProperty()) {
+                if (property.getName().equals("payload_parameter.CEP_IP")) {
+                    assertEquals(property.getValue(), "octl.qmog.cisco.com123");
+                } else if (property.getName().equals("payload_parameter.CEP_ADMIN_PASSWORD")) {
+                    assertEquals(property.getValue(), "admin123");
+                } else if (property.getName().equals("payload_parameter.MONITORING_SERVER_IP")) {
+                    assertEquals(property.getValue(), "octl.qmog.cisco.com123");
+                } else if (property.getName().equals("payload_parameter.QTCM_NETWORK_COUNT")) {
+                    assertEquals(property.getValue(), "3");
+                } else if (property.getName().equals("payload_parameter.MONITORING_SERVER_ADMIN_PASSWORD")) {
+                    assertEquals(property.getValue(), "admin123");
+                } else if (property.getName().equals("payload_parameter.QTCM_DNS_SEGMENT")) {
+                    assertEquals(property.getValue(), "test123");
+                } else if (property.getName().equals("payload_parameter.MONITORING_SERVER_SECURE_PORT")) {
+                    assertEquals(property.getValue(), "7712");
+                } else if (property.getName().equals("payload_parameter.MONITORING_SERVER_PORT")) {
+                    assertEquals(property.getValue(), "7612");
+                } else if (property.getName().equals("payload_parameter.CEP_PORT")) {
+                    assertEquals(property.getValue(), "7612");
+                } else if (property.getName().equals("payload_parameter.MB_PORT")) {
+                    assertEquals(property.getValue(), "61617");
+                }
+            }
+            boolean removed = restClientTenant1.removeEntity(RestConstants.CARTRIDGES, cartridgeType,
+                    RestConstants.CARTRIDGES_NAME);
+            assertEquals(removed, true);
+
+            bean = (CartridgeBean) restClientTenant2.
+                    getEntity(RestConstants.CARTRIDGES, cartridgeType,
+                            CartridgeBean.class, RestConstants.CARTRIDGES_NAME);
+            assertNotNull("Cartridge not exists in other tenant", bean);
+
+            CartridgeBean beanRemoved = (CartridgeBean) restClientTenant1.
+                    getEntity(RestConstants.CARTRIDGES, cartridgeType,
+                            CartridgeBean.class, RestConstants.CARTRIDGES_NAME);
+            assertEquals(beanRemoved, null);
+
+            removed = restClientTenant2.removeEntity(RestConstants.CARTRIDGES, cartridgeType,
+                    RestConstants.CARTRIDGES_NAME);
+            assertEquals(removed, true);
+
+            beanRemoved = (CartridgeBean) restClientTenant2.
+                    getEntity(RestConstants.CARTRIDGES, cartridgeType,
+                            CartridgeBean.class, RestConstants.CARTRIDGES_NAME);
+            assertEquals(beanRemoved, null);
+
+
+            log.info("---------------------------Ended Cartridge test case-------------------------");
+        }
+        catch (Exception e) {
+            log.error("An error occurred while handling RESTConstants.CARTRIDGES_PATH", e);
+            assertTrue("An error occurred while handling RESTConstants.CARTRIDGES_PATH", false);
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/policies/ApplicationPolicyTest.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/policies/ApplicationPolicyTest.java b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/policies/ApplicationPolicyTest.java
new file mode 100644
index 0000000..b7daa65
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/policies/ApplicationPolicyTest.java
@@ -0,0 +1,195 @@
+/*
+ * 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.integration.tests.policies;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.stratos.common.beans.PropertyBean;
+import org.apache.stratos.common.beans.partition.NetworkPartitionBean;
+import org.apache.stratos.common.beans.policy.deployment.ApplicationPolicyBean;
+import org.apache.stratos.integration.common.RestConstants;
+import org.apache.stratos.integration.tests.StratosIntegrationTest;
+import org.testng.annotations.Test;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.AssertJUnit.*;
+
+/**
+ * Test to handle Network partition CRUD operations
+ */
+public class ApplicationPolicyTest extends StratosIntegrationTest {
+    private static final Log log = LogFactory.getLog(ApplicationPolicyTest.class);
+    private static final String RESOURCES_PATH = "/application-policy-test";
+
+    @Test(timeOut = GLOBAL_TEST_TIMEOUT)
+    public void testApplicationPolicy() {
+        try {
+            String applicationPolicyId = "application-policy-application-policy-test";
+            log.info("-------------------------Started Application policy test case-------------------------");
+
+            boolean addedN1 = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
+                            "network-partition-application-policy-test-1" + ".json",
+                    RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
+            assertEquals(addedN1, true);
+
+            boolean addedN2 = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
+                            "network-partition-application-policy-test-2" + ".json",
+                    RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
+            assertEquals(addedN2, true);
+
+            boolean addedDep =
+                    restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.APPLICATION_POLICIES_PATH + "/" +
+                                    applicationPolicyId + ".json",
+                            RestConstants.APPLICATION_POLICIES, RestConstants.APPLICATION_POLICIES_NAME);
+            assertEquals(addedDep, true);
+
+            ApplicationPolicyBean bean = (ApplicationPolicyBean) restClientTenant1.
+                    getEntity(RestConstants.APPLICATION_POLICIES, applicationPolicyId,
+                            ApplicationPolicyBean.class, RestConstants.APPLICATION_POLICIES_NAME);
+            assertEquals(bean.getId(), applicationPolicyId);
+            assertEquals(bean.getAlgorithm(), "one-after-another",
+                    String.format("The expected algorithm %s is not found in %s", "one-after-another",
+                            applicationPolicyId));
+            assertEquals(bean.getId(), applicationPolicyId,
+                    String.format("The expected id %s is not found", applicationPolicyId));
+            assertEquals(bean.getNetworkPartitions().length, 2,
+                    String.format("The expected networkpartitions size %s is not found in %s", 2, applicationPolicyId));
+            assertEquals(bean.getNetworkPartitions()[0], "network-partition-application-policy-test-1",
+                    String.format("The first network partition is not %s in %s",
+                            "network-partition-application-policy-test-1", applicationPolicyId));
+            assertEquals(bean.getNetworkPartitions()[1], "network-partition-application-policy-test-2",
+                    String.format("The Second network partition is not %s in %s",
+                            "network-partition-application-policy-test-2", applicationPolicyId));
+            boolean algoFound = false;
+            for (PropertyBean propertyBean : bean.getProperties()) {
+                if (propertyBean.getName().equals("networkPartitionGroups")) {
+                    assertEquals(propertyBean.getValue(),
+                            "network-partition-application-policy-test-1,network-partition-application-policy-test-2",
+                            String.format("The networkPartitionGroups algorithm %s is not found in %s",
+                                    "network-partition-application-policy-test-1,network-partition-application-policy-test-2",
+                                    applicationPolicyId));
+                    algoFound = true;
+
+                }
+            }
+            if (!algoFound) {
+                assertTrue(String.format("The networkPartitionGroups property is not found in %s",
+                        applicationPolicyId), false);
+            }
+
+            bean = (ApplicationPolicyBean) restClientTenant2.
+                    getEntity(RestConstants.APPLICATION_POLICIES, applicationPolicyId,
+                            ApplicationPolicyBean.class, RestConstants.APPLICATION_POLICIES_NAME);
+            assertNull("Application policy bean found in tenant 2", bean);
+
+            addedN1 = restClientTenant2.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
+                            "network-partition-application-policy-test-1" + ".json",
+                    RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
+            assertEquals(addedN1, true);
+
+            addedN2 = restClientTenant2.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
+                            "network-partition-application-policy-test-2" + ".json",
+                    RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
+            assertEquals(addedN2, true);
+
+            boolean addedTenant2Dep =
+                    restClientTenant2.addEntity(RESOURCES_PATH + RestConstants.APPLICATION_POLICIES_PATH + "/" +
+                                    applicationPolicyId + ".json",
+                            RestConstants.APPLICATION_POLICIES, RestConstants.APPLICATION_POLICIES_NAME);
+            assertEquals(addedTenant2Dep, true);
+
+            ApplicationPolicyBean tenant2bean = (ApplicationPolicyBean) restClientTenant2.
+                    getEntity(RestConstants.APPLICATION_POLICIES, applicationPolicyId,
+                            ApplicationPolicyBean.class, RestConstants.APPLICATION_POLICIES_NAME);
+            assertNotNull("Application is not exist in tenant 2", tenant2bean);
+
+
+            boolean removedNet = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
+                    "network-partition-application-policy-test-1", RestConstants.NETWORK_PARTITIONS_NAME);
+            //Trying to remove the used network partition
+            assertEquals(removedNet, false);
+
+            boolean removedDep = restClientTenant1.removeEntity(RestConstants.APPLICATION_POLICIES,
+                    applicationPolicyId, RestConstants.APPLICATION_POLICIES_NAME);
+            assertEquals(removedDep, true);
+
+            ApplicationPolicyBean beanRemovedDep = (ApplicationPolicyBean) restClientTenant1.
+                    getEntity(RestConstants.APPLICATION_POLICIES, applicationPolicyId,
+                            ApplicationPolicyBean.class, RestConstants.APPLICATION_POLICIES_NAME);
+            assertEquals(beanRemovedDep, null);
+
+            boolean removedN1 = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
+                    "network-partition-application-policy-test-1", RestConstants.NETWORK_PARTITIONS_NAME);
+            assertEquals(removedN1, true);
+
+            NetworkPartitionBean beanRemovedN1 = (NetworkPartitionBean) restClientTenant1.
+                    getEntity(RestConstants.NETWORK_PARTITIONS, "network-partition-application-policy-test-1",
+                            NetworkPartitionBean.class, RestConstants.NETWORK_PARTITIONS_NAME);
+            assertEquals(beanRemovedN1, null);
+
+            boolean removedN2 = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
+                    "network-partition-application-policy-test-2", RestConstants.NETWORK_PARTITIONS_NAME);
+            assertEquals(removedN2, true);
+
+            NetworkPartitionBean beanRemovedN2 = (NetworkPartitionBean) restClientTenant1.
+                    getEntity(RestConstants.NETWORK_PARTITIONS, "network-partition-application-policy-test-2",
+                            NetworkPartitionBean.class, RestConstants.NETWORK_PARTITIONS_NAME);
+            assertEquals(beanRemovedN2, null);
+
+            tenant2bean = (ApplicationPolicyBean) restClientTenant2.
+                    getEntity(RestConstants.APPLICATION_POLICIES, applicationPolicyId,
+                            ApplicationPolicyBean.class, RestConstants.APPLICATION_POLICIES_NAME);
+            assertNotNull("Application is not exist in tenant 2", tenant2bean);
+
+            removedDep = restClientTenant2.removeEntity(RestConstants.APPLICATION_POLICIES,
+                    applicationPolicyId, RestConstants.APPLICATION_POLICIES_NAME);
+            assertEquals(removedDep, true);
+
+            beanRemovedDep = (ApplicationPolicyBean) restClientTenant2.
+                    getEntity(RestConstants.APPLICATION_POLICIES, applicationPolicyId,
+                            ApplicationPolicyBean.class, RestConstants.APPLICATION_POLICIES_NAME);
+            assertEquals(beanRemovedDep, null);
+
+            removedN1 = restClientTenant2.removeEntity(RestConstants.NETWORK_PARTITIONS,
+                    "network-partition-application-policy-test-1", RestConstants.NETWORK_PARTITIONS_NAME);
+            assertEquals(removedN1, true);
+
+            beanRemovedN1 = (NetworkPartitionBean) restClientTenant2.
+                    getEntity(RestConstants.NETWORK_PARTITIONS, "network-partition-application-policy-test-1",
+                            NetworkPartitionBean.class, RestConstants.NETWORK_PARTITIONS_NAME);
+            assertEquals(beanRemovedN1, null);
+
+            removedN2 = restClientTenant2.removeEntity(RestConstants.NETWORK_PARTITIONS,
+                    "network-partition-application-policy-test-2", RestConstants.NETWORK_PARTITIONS_NAME);
+            assertEquals(removedN2, true);
+
+            beanRemovedN2 = (NetworkPartitionBean) restClientTenant2.
+                    getEntity(RestConstants.NETWORK_PARTITIONS, "network-partition-application-policy-test-2",
+                            NetworkPartitionBean.class, RestConstants.NETWORK_PARTITIONS_NAME);
+            assertEquals(beanRemovedN2, null);
+
+            log.info("-------------------------Ended deployment policy test case-------------------------");
+        }
+        catch (Exception e) {
+            log.error("An error occurred while handling deployment policy", e);
+            assertTrue("An error occurred while handling deployment policy", false);
+        }
+    }
+}
\ No newline at end of file


[18/21] stratos git commit: Uplifting automation engine to v4.4.3, dynamically pick ports for integration tests

Posted by ra...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/policies/AutoscalingPolicyTest.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/policies/AutoscalingPolicyTest.java b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/policies/AutoscalingPolicyTest.java
deleted file mode 100644
index 895e5f6..0000000
--- a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/policies/AutoscalingPolicyTest.java
+++ /dev/null
@@ -1,138 +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.integration.tests.policies;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.common.beans.policy.autoscale.AutoscalePolicyBean;
-import org.apache.stratos.integration.tests.RestConstants;
-import org.apache.stratos.integration.tests.StratosTestServerManager;
-import org.testng.annotations.Test;
-
-import static junit.framework.Assert.*;
-
-/**
- * Test to handle autoscaling policy CRUD operations
- */
-public class AutoscalingPolicyTest extends StratosTestServerManager {
-    private static final Log log = LogFactory.getLog(AutoscalingPolicyTest.class);
-    private static final String RESOURCES_PATH = "/autoscaling-policy-test";
-
-
-    @Test
-    public void testAutoscalingPolicy() {
-        log.info("-------------------------Started autoscaling policy test case-------------------------");
-        String policyId = "autoscaling-policy-autoscaling-policy-test";
-        try {
-            boolean added = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.AUTOSCALING_POLICIES_PATH + "/" + policyId + ".json",
-                    RestConstants.AUTOSCALING_POLICIES, RestConstants.AUTOSCALING_POLICIES_NAME);
-
-            assertEquals(String.format("Autoscaling policy did not added: [autoscaling-policy-id] %s", policyId), added, true);
-            AutoscalePolicyBean bean = (AutoscalePolicyBean) restClientTenant1.
-                    getEntity(RestConstants.AUTOSCALING_POLICIES, policyId,
-                            AutoscalePolicyBean.class, RestConstants.AUTOSCALING_POLICIES_NAME);
-
-            assertEquals(String.format("[autoscaling-policy-id] %s is not correct", bean.getId()),
-                    bean.getId(), policyId);
-            assertEquals(String.format("[autoscaling-policy-id] %s RIF is not correct", policyId),
-                    bean.getLoadThresholds().getRequestsInFlight().getThreshold(), 35.0, 0.0);
-            assertEquals(String.format("[autoscaling-policy-id] %s Memory is not correct", policyId),
-                    bean.getLoadThresholds().getMemoryConsumption().getThreshold(), 45.0, 0.0);
-            assertEquals(String.format("[autoscaling-policy-id] %s Load is not correct", policyId),
-                    bean.getLoadThresholds().getLoadAverage().getThreshold(), 25.0, 0.0);
-
-            bean = (AutoscalePolicyBean) restClientTenant2.
-                    getEntity(RestConstants.AUTOSCALING_POLICIES, policyId,
-                            AutoscalePolicyBean.class, RestConstants.AUTOSCALING_POLICIES_NAME);
-            assertNull("Auto scale policy exists for other tenant",bean);
-
-            boolean addedTenant2 = restClientTenant2.addEntity(RESOURCES_PATH + RestConstants.AUTOSCALING_POLICIES_PATH + "/" + policyId + ".json",
-                    RestConstants.AUTOSCALING_POLICIES, RestConstants.AUTOSCALING_POLICIES_NAME);
-
-            assertEquals(String.format("Autoscaling policy did not added: [autoscaling-policy-id] %s", policyId), addedTenant2, true);
-            bean = (AutoscalePolicyBean) restClientTenant2.
-                    getEntity(RestConstants.AUTOSCALING_POLICIES, policyId,
-                            AutoscalePolicyBean.class, RestConstants.AUTOSCALING_POLICIES_NAME);
-
-            assertEquals(String.format("[autoscaling-policy-id] %s is not correct", bean.getId()),
-                    bean.getId(), policyId);
-            assertEquals(String.format("[autoscaling-policy-id] %s RIF is not correct", policyId),
-                    bean.getLoadThresholds().getRequestsInFlight().getThreshold(), 35.0, 0.0);
-            assertEquals(String.format("[autoscaling-policy-id] %s Memory is not correct", policyId),
-                    bean.getLoadThresholds().getMemoryConsumption().getThreshold(), 45.0, 0.0);
-            assertEquals(String.format("[autoscaling-policy-id] %s Load is not correct", policyId),
-                    bean.getLoadThresholds().getLoadAverage().getThreshold(), 25.0, 0.0);
-
-            boolean updated = restClientTenant1.updateEntity(RESOURCES_PATH + RestConstants.AUTOSCALING_POLICIES_PATH + "/" + policyId + "-v1.json",
-                    RestConstants.AUTOSCALING_POLICIES, RestConstants.AUTOSCALING_POLICIES_NAME);
-
-            assertEquals(String.format("[autoscaling-policy-id] %s update failed", policyId), updated, true);
-            AutoscalePolicyBean updatedBean = (AutoscalePolicyBean) restClientTenant1.getEntity(
-                    RestConstants.AUTOSCALING_POLICIES, policyId,
-                    AutoscalePolicyBean.class, RestConstants.AUTOSCALING_POLICIES_NAME);
-            assertEquals(String.format("[autoscaling-policy-id] %s RIF is not correct", policyId),
-                    updatedBean.getLoadThresholds().getRequestsInFlight().getThreshold(), 30.0, 0.0);
-            assertEquals(String.format("[autoscaling-policy-id] %s Load is not correct", policyId),
-                    updatedBean.getLoadThresholds().getMemoryConsumption().getThreshold(), 40.0, 0.0);
-            assertEquals(String.format("[autoscaling-policy-id] %s Memory is not correct", policyId),
-                    updatedBean.getLoadThresholds().getLoadAverage().getThreshold(), 20.0, 0.0);
-
-            boolean updatedTenant2 = restClientTenant2.updateEntity(RESOURCES_PATH + RestConstants.AUTOSCALING_POLICIES_PATH + "/" + policyId + "-v1.json",
-                    RestConstants.AUTOSCALING_POLICIES, RestConstants.AUTOSCALING_POLICIES_NAME);
-
-            assertEquals(String.format("[autoscaling-policy-id] %s update failed", policyId), updatedTenant2, true);
-            AutoscalePolicyBean updatedTenant2Bean = (AutoscalePolicyBean) restClientTenant2.getEntity(
-                    RestConstants.AUTOSCALING_POLICIES, policyId,
-                    AutoscalePolicyBean.class, RestConstants.AUTOSCALING_POLICIES_NAME);
-            assertEquals(String.format("[autoscaling-policy-id] %s RIF is not correct", policyId),
-                    updatedTenant2Bean.getLoadThresholds().getRequestsInFlight().getThreshold(), 30.0, 0.0);
-            assertEquals(String.format("[autoscaling-policy-id] %s Load is not correct", policyId),
-                    updatedTenant2Bean.getLoadThresholds().getMemoryConsumption().getThreshold(), 40.0, 0.0);
-            assertEquals(String.format("[autoscaling-policy-id] %s Memory is not correct", policyId),
-                    updatedTenant2Bean.getLoadThresholds().getLoadAverage().getThreshold(), 20.0, 0.0);
-
-
-            boolean removed = restClientTenant1.removeEntity(RestConstants.AUTOSCALING_POLICIES,
-                    policyId, RestConstants.AUTOSCALING_POLICIES_NAME);
-            assertEquals(String.format("[autoscaling-policy-id] %s couldn't be removed", policyId),
-                    removed, true);
-
-            AutoscalePolicyBean beanRemoved = (AutoscalePolicyBean) restClientTenant1.getEntity(
-                    RestConstants.AUTOSCALING_POLICIES, policyId,
-                    AutoscalePolicyBean.class, RestConstants.AUTOSCALING_POLICIES_NAME);
-            assertEquals(String.format("[autoscaling-policy-id] %s didn't get removed successfully",
-                    policyId), beanRemoved, null);
-
-            beanRemoved = (AutoscalePolicyBean) restClientTenant2.getEntity(
-                    RestConstants.AUTOSCALING_POLICIES, policyId,
-                    AutoscalePolicyBean.class, RestConstants.AUTOSCALING_POLICIES_NAME);
-            assertNotNull("Auto scale policy not exist in other tenant",beanRemoved);
-
-            removed = restClientTenant2.removeEntity(RestConstants.AUTOSCALING_POLICIES,
-                    policyId, RestConstants.AUTOSCALING_POLICIES_NAME);
-            assertEquals(String.format("[autoscaling-policy-id] %s couldn't be removed", policyId),
-                    removed, true);
-
-            log.info("-------------------------Ended autoscaling policy test case---------------------------");
-        } catch (Exception e) {
-            log.error("An error occurred while handling [autoscaling policy] " + policyId, e);
-            assertTrue("An error occurred while handling [autoscaling policy] " + policyId, false);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/policies/DeploymentPolicyTest.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/policies/DeploymentPolicyTest.java b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/policies/DeploymentPolicyTest.java
deleted file mode 100644
index b784baf..0000000
--- a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/policies/DeploymentPolicyTest.java
+++ /dev/null
@@ -1,230 +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.integration.tests.policies;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.common.beans.partition.NetworkPartitionBean;
-import org.apache.stratos.common.beans.partition.NetworkPartitionReferenceBean;
-import org.apache.stratos.common.beans.partition.PartitionReferenceBean;
-import org.apache.stratos.common.beans.policy.deployment.DeploymentPolicyBean;
-import org.apache.stratos.integration.tests.RestConstants;
-import org.apache.stratos.integration.tests.StratosTestServerManager;
-import org.testng.annotations.Test;
-
-import static junit.framework.Assert.*;
-
-/**
- * Test to handle Deployment policy CRUD operations
- */
-public class DeploymentPolicyTest extends StratosTestServerManager {
-    private static final Log log = LogFactory.getLog(DeploymentPolicyTest.class);
-    private static final String RESOURCES_PATH = "/deployment-policy-test";
-
-
-    @Test
-    public void testDeploymentPolicy() {
-        try {
-            String deploymentPolicyId = "deployment-policy-deployment-policy-test";
-            log.info("-------------------------Started deployment policy test case-------------------------");
-
-            boolean addedN1 = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
-                            "network-partition-deployment-policy-test-1" + ".json",
-                    RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
-            assertEquals(addedN1, true);
-
-            boolean addedN2 = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
-                            "network-partition-deployment-policy-test-2" + ".json",
-                    RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
-            assertEquals(addedN2, true);
-
-            boolean addedDep = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.DEPLOYMENT_POLICIES_PATH + "/" +
-                            deploymentPolicyId + ".json",
-                    RestConstants.DEPLOYMENT_POLICIES, RestConstants.DEPLOYMENT_POLICIES_NAME);
-            assertEquals(addedDep, true);
-
-            DeploymentPolicyBean bean = (DeploymentPolicyBean) restClientTenant1.
-                    getEntity(RestConstants.DEPLOYMENT_POLICIES, deploymentPolicyId,
-                            DeploymentPolicyBean.class, RestConstants.DEPLOYMENT_POLICIES_NAME);
-
-            NetworkPartitionReferenceBean nw1 = bean.getNetworkPartitions().get(0);
-            NetworkPartitionReferenceBean nw2 = bean.getNetworkPartitions().get(1);
-            PartitionReferenceBean nw1P1 = nw1.getPartitions().get(0);
-            PartitionReferenceBean nw2P1 = nw2.getPartitions().get(0);
-            PartitionReferenceBean nw2P2 = nw2.getPartitions().get(1);
-
-            assertEquals(bean.getId(), "deployment-policy-deployment-policy-test");
-            assertEquals(bean.getNetworkPartitions().size(), 2);
-            assertEquals(nw1.getId(), "network-partition-deployment-policy-test-1");
-            assertEquals(nw1.getPartitionAlgo(), "one-after-another");
-            assertEquals(nw1.getPartitions().size(), 1);
-            assertEquals(nw1P1.getId(), "partition-1");
-            assertEquals(nw1P1.getPartitionMax(), 20);
-
-            assertEquals(nw2.getId(), "network-partition-deployment-policy-test-2");
-            assertEquals(nw2.getPartitionAlgo(), "round-robin");
-            assertEquals(nw2.getPartitions().size(), 2);
-            assertEquals(nw2P1.getId(),
-                    "network-partition-6-partition-1");
-            assertEquals(nw2P1.getPartitionMax(), 10);
-            assertEquals(nw2P2.getId(),
-                    "network-partition-6-partition-2");
-            assertEquals(nw2P2.getPartitionMax(), 9);
-
-            //update network partition
-            boolean updated = restClientTenant1.updateEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
-                            "network-partition-deployment-policy-test-1-v1.json",
-                    RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
-            assertEquals(updated, true);
-
-            //update deployment policy with new partition and max values
-            boolean updatedDep = restClientTenant1.updateEntity(RESOURCES_PATH + RestConstants.DEPLOYMENT_POLICIES_PATH +
-                            "/" + deploymentPolicyId + "-v1.json", RestConstants.DEPLOYMENT_POLICIES,
-                    RestConstants.DEPLOYMENT_POLICIES_NAME);
-            assertEquals(updatedDep, true);
-
-            DeploymentPolicyBean updatedBean = (DeploymentPolicyBean) restClientTenant1.
-                    getEntity(RestConstants.DEPLOYMENT_POLICIES, deploymentPolicyId,
-                            DeploymentPolicyBean.class, RestConstants.DEPLOYMENT_POLICIES_NAME);
-
-            nw1 = updatedBean.getNetworkPartitions().get(0);
-            nw2 = updatedBean.getNetworkPartitions().get(1);
-            nw1P1 = nw1.getPartitions().get(0);
-            PartitionReferenceBean nw1P2 = nw1.getPartitions().get(1);
-            nw2P1 = nw2.getPartitions().get(0);
-            nw2P2 = nw2.getPartitions().get(1);
-
-            assertEquals(updatedBean.getId(), "deployment-policy-deployment-policy-test");
-            assertEquals(updatedBean.getNetworkPartitions().size(), 2);
-            assertEquals(nw1.getId(), "network-partition-deployment-policy-test-1");
-            assertEquals(nw1.getPartitionAlgo(), "one-after-another");
-            assertEquals(nw1.getPartitions().size(), 2);
-            assertEquals(nw1P1.getId(), "partition-1");
-            assertEquals(nw1P1.getPartitionMax(), 25);
-            assertEquals(nw1P2.getId(), "partition-2");
-            assertEquals(nw1P2.getPartitionMax(), 20);
-
-            assertEquals(nw2.getId(), "network-partition-deployment-policy-test-2");
-            assertEquals(nw2.getPartitionAlgo(), "round-robin");
-            assertEquals(nw2.getPartitions().size(), 2);
-            assertEquals(nw2P1.getId(),
-                    "network-partition-6-partition-1");
-            assertEquals(nw2P1.getPartitionMax(), 15);
-            assertEquals(nw2P2.getId(),
-                    "network-partition-6-partition-2");
-            assertEquals(nw2P2.getPartitionMax(), 5);
-
-            updatedBean = (DeploymentPolicyBean) restClientTenant2.
-                    getEntity(RestConstants.DEPLOYMENT_POLICIES, deploymentPolicyId,
-                            DeploymentPolicyBean.class, RestConstants.DEPLOYMENT_POLICIES_NAME);
-            assertNull("Deployment policy found in tenant 2",updatedBean);
-
-            addedN1 = restClientTenant2.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
-                            "network-partition-deployment-policy-test-1" + ".json",
-                    RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
-            assertEquals(addedN1, true);
-
-            addedN2 = restClientTenant2.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
-                            "network-partition-deployment-policy-test-2" + ".json",
-                    RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
-            assertEquals(addedN2, true);
-
-            addedDep = restClientTenant2.addEntity(RESOURCES_PATH + RestConstants.DEPLOYMENT_POLICIES_PATH + "/" +
-                            deploymentPolicyId + ".json",
-                    RestConstants.DEPLOYMENT_POLICIES, RestConstants.DEPLOYMENT_POLICIES_NAME);
-            assertEquals(addedDep, true);
-
-            bean = (DeploymentPolicyBean) restClientTenant2.
-                    getEntity(RestConstants.DEPLOYMENT_POLICIES, deploymentPolicyId,
-                            DeploymentPolicyBean.class, RestConstants.DEPLOYMENT_POLICIES_NAME);
-            assertNotNull("Deployment policy not exist in other tenant",bean);
-
-            boolean removedNet = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
-                    "network-partition-deployment-policy-test-1", RestConstants.NETWORK_PARTITIONS_NAME);
-            //Trying to remove the used network partition
-            assertEquals(removedNet, false);
-
-            boolean removedDep = restClientTenant1.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
-                    deploymentPolicyId, RestConstants.DEPLOYMENT_POLICIES_NAME);
-            assertEquals(removedDep, true);
-
-            DeploymentPolicyBean beanRemovedDep = (DeploymentPolicyBean) restClientTenant1.
-                    getEntity(RestConstants.DEPLOYMENT_POLICIES, deploymentPolicyId,
-                            DeploymentPolicyBean.class, RestConstants.DEPLOYMENT_POLICIES_NAME);
-            assertEquals(beanRemovedDep, null);
-
-            boolean removedN1 = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
-                    "network-partition-deployment-policy-test-1", RestConstants.NETWORK_PARTITIONS_NAME);
-            assertEquals(removedN1, true);
-
-            NetworkPartitionBean beanRemovedN1 = (NetworkPartitionBean) restClientTenant1.
-                    getEntity(RestConstants.NETWORK_PARTITIONS, "network-partition-deployment-policy-test-1",
-                            NetworkPartitionBean.class, RestConstants.NETWORK_PARTITIONS_NAME);
-            assertEquals(beanRemovedN1, null);
-
-            boolean removedN2 = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
-                    "network-partition-deployment-policy-test-2", RestConstants.NETWORK_PARTITIONS_NAME);
-            assertEquals(removedN2, true);
-
-            NetworkPartitionBean beanRemovedN2 = (NetworkPartitionBean) restClientTenant1.
-                    getEntity(RestConstants.NETWORK_PARTITIONS, "network-partition-deployment-policy-test-2",
-                            NetworkPartitionBean.class, RestConstants.NETWORK_PARTITIONS_NAME);
-            assertEquals(beanRemovedN2, null);
-
-            bean = (DeploymentPolicyBean) restClientTenant2.
-                    getEntity(RestConstants.DEPLOYMENT_POLICIES, deploymentPolicyId,
-                            DeploymentPolicyBean.class, RestConstants.DEPLOYMENT_POLICIES_NAME);
-            assertNotNull("Deployment policy not exist in other tenant",bean);
-
-            removedDep = restClientTenant2.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
-                    deploymentPolicyId, RestConstants.DEPLOYMENT_POLICIES_NAME);
-            assertEquals(removedDep, true);
-
-            beanRemovedDep = (DeploymentPolicyBean) restClientTenant2.
-                    getEntity(RestConstants.DEPLOYMENT_POLICIES, deploymentPolicyId,
-                            DeploymentPolicyBean.class, RestConstants.DEPLOYMENT_POLICIES_NAME);
-            assertEquals(beanRemovedDep, null);
-
-            removedN1 = restClientTenant2.removeEntity(RestConstants.NETWORK_PARTITIONS,
-                    "network-partition-deployment-policy-test-1", RestConstants.NETWORK_PARTITIONS_NAME);
-            assertEquals(removedN1, true);
-
-            beanRemovedN1 = (NetworkPartitionBean) restClientTenant2.
-                    getEntity(RestConstants.NETWORK_PARTITIONS, "network-partition-deployment-policy-test-1",
-                            NetworkPartitionBean.class, RestConstants.NETWORK_PARTITIONS_NAME);
-            assertEquals(beanRemovedN1, null);
-
-            removedN2 = restClientTenant2.removeEntity(RestConstants.NETWORK_PARTITIONS,
-                    "network-partition-deployment-policy-test-2", RestConstants.NETWORK_PARTITIONS_NAME);
-            assertEquals(removedN2, true);
-
-            beanRemovedN2 = (NetworkPartitionBean) restClientTenant2.
-                    getEntity(RestConstants.NETWORK_PARTITIONS, "network-partition-deployment-policy-test-2",
-                            NetworkPartitionBean.class, RestConstants.NETWORK_PARTITIONS_NAME);
-            assertEquals(beanRemovedN2, null);
-
-            log.info("-------------------------Ended deployment policy test case-------------------------");
-
-        } catch (Exception e) {
-            log.error("An error occurred while handling deployment policy", e);
-            assertTrue("An error occurred while handling deployment policy", false);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/policies/NetworkPartitionTest.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/policies/NetworkPartitionTest.java b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/policies/NetworkPartitionTest.java
deleted file mode 100644
index de5c4fd..0000000
--- a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/policies/NetworkPartitionTest.java
+++ /dev/null
@@ -1,124 +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.integration.tests.policies;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.common.beans.partition.NetworkPartitionBean;
-import org.apache.stratos.common.beans.partition.PartitionBean;
-import org.apache.stratos.integration.tests.RestConstants;
-import org.apache.stratos.integration.tests.StratosTestServerManager;
-import org.testng.annotations.Test;
-
-import static junit.framework.Assert.*;
-
-/**
- * Test to handle Network partition CRUD operations
- */
-public class NetworkPartitionTest extends StratosTestServerManager {
-    private static final Log log = LogFactory.getLog(NetworkPartitionTest.class);
-    private static final String RESOURCES_PATH = "/network-partition-test";
-
-
-    @Test
-    public void testNetworkPartition() {
-        try {
-            String networkPartitionId = "network-partition-network-partition-test";
-            log.info("-------------------------Started network partition test case-------------------------");
-
-            boolean added = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
-                            networkPartitionId + ".json",
-                    RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
-
-            assertEquals(added, true);
-            NetworkPartitionBean bean = (NetworkPartitionBean) restClientTenant1.
-                    getEntity(RestConstants.NETWORK_PARTITIONS, networkPartitionId,
-                            NetworkPartitionBean.class, RestConstants.NETWORK_PARTITIONS_NAME);
-
-            PartitionBean p1 = bean.getPartitions().get(0);
-            assertEquals(bean.getId(), "network-partition-network-partition-test");
-            assertEquals(bean.getPartitions().size(), 1);
-            assertEquals(p1.getId(), "partition-1");
-            assertEquals(p1.getProperty().get(0).getName(), "region");
-            assertEquals(p1.getProperty().get(0).getValue(), "default");
-
-            boolean updated = restClientTenant1.updateEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
-                            networkPartitionId + "-v1.json",
-                    RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
-
-            assertEquals(updated, true);
-            NetworkPartitionBean updatedBean = (NetworkPartitionBean) restClientTenant1.
-                    getEntity(RestConstants.NETWORK_PARTITIONS, networkPartitionId,
-                            NetworkPartitionBean.class, RestConstants.NETWORK_PARTITIONS_NAME);
-
-            PartitionBean p2 = updatedBean.getPartitions().get(1);
-            assertEquals(updatedBean.getId(), "network-partition-network-partition-test");
-            assertEquals(updatedBean.getPartitions().size(), 2);
-            assertEquals(p2.getId(), "partition-2");
-            assertEquals(p2.getProperty().get(0).getName(), "region");
-            assertEquals(p2.getProperty().get(0).getValue(), "default1");
-            assertEquals(p2.getProperty().get(1).getName(), "zone");
-            assertEquals(p2.getProperty().get(1).getValue(), "z1");
-
-            updatedBean = (NetworkPartitionBean) restClientTenant2.
-                    getEntity(RestConstants.NETWORK_PARTITIONS, networkPartitionId,
-                            NetworkPartitionBean.class, RestConstants.NETWORK_PARTITIONS_NAME);
-            assertNull("Network partition found in tenant 2",updatedBean);
-
-            added = restClientTenant2.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
-                            networkPartitionId + ".json",
-                    RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
-
-            assertEquals(added, true);
-            bean = (NetworkPartitionBean) restClientTenant2.
-                    getEntity(RestConstants.NETWORK_PARTITIONS, networkPartitionId,
-                            NetworkPartitionBean.class, RestConstants.NETWORK_PARTITIONS_NAME);
-            assertNotNull("Network partition not exist in other tenant",bean);
-
-            boolean removed = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
-                    networkPartitionId, RestConstants.NETWORK_PARTITIONS_NAME);
-            assertEquals(removed, true);
-
-            NetworkPartitionBean beanRemoved = (NetworkPartitionBean) restClientTenant1.
-                    getEntity(RestConstants.NETWORK_PARTITIONS, networkPartitionId,
-                            NetworkPartitionBean.class, RestConstants.NETWORK_PARTITIONS_NAME);
-            assertEquals(beanRemoved, null);
-
-            bean = (NetworkPartitionBean) restClientTenant2.
-                    getEntity(RestConstants.NETWORK_PARTITIONS, networkPartitionId,
-                            NetworkPartitionBean.class, RestConstants.NETWORK_PARTITIONS_NAME);
-            assertNotNull("Network partition not exist in other tenant",bean);
-
-            removed = restClientTenant2.removeEntity(RestConstants.NETWORK_PARTITIONS,
-                    networkPartitionId, RestConstants.NETWORK_PARTITIONS_NAME);
-            assertEquals(removed, true);
-
-            beanRemoved = (NetworkPartitionBean) restClientTenant2.
-                    getEntity(RestConstants.NETWORK_PARTITIONS, networkPartitionId,
-                            NetworkPartitionBean.class, RestConstants.NETWORK_PARTITIONS_NAME);
-            assertEquals(beanRemoved, null);
-
-            log.info("-------------------------Ended network partition test case-------------------------");
-        } catch (Exception e) {
-            log.error("An error occurred while handling network partitions", e);
-            assertTrue("An error occurred while handling network partitions", false);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/rest/ErrorResponse.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/rest/ErrorResponse.java b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/rest/ErrorResponse.java
deleted file mode 100644
index 168713e..0000000
--- a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/rest/ErrorResponse.java
+++ /dev/null
@@ -1,56 +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.integration.tests.rest;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import java.io.Serializable;
-
-/**
- * Error response.
- */
-@XmlRootElement(name = "errorResponse")
-public class ErrorResponse implements Serializable {
-
-    private int errorCode;
-    private String errorMessage;
-
-    public ErrorResponse() {
-    }
-
-    public ErrorResponse(int errorCode, String errorMessage) {
-        this.setErrorCode(errorCode);
-        this.setErrorMessage(errorMessage);
-    }
-
-    public int getErrorCode() {
-        return errorCode;
-    }
-
-    public void setErrorCode(int errorCode) {
-        this.errorCode = errorCode;
-    }
-
-    public String getErrorMessage() {
-        return errorMessage;
-    }
-
-    public void setErrorMessage(String errorMessage) {
-        this.errorMessage = errorMessage;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/rest/HttpResponse.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/rest/HttpResponse.java b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/rest/HttpResponse.java
deleted file mode 100644
index 8ac5619..0000000
--- a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/rest/HttpResponse.java
+++ /dev/null
@@ -1,59 +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.integration.tests.rest;
-
-/**
- * Created by reka on 7/28/15.
- */
-public class HttpResponse {
-
-    private int statusCode;
-    private String content;
-    private String reason;
-
-    public int getStatusCode() {
-        return statusCode;
-    }
-
-    public void setStatusCode(int statusCode) {
-        this.statusCode = statusCode;
-    }
-
-    public String getContent() {
-        return content;
-    }
-
-    public void setContent(String content) {
-        this.content = content;
-    }
-
-    public String getReason() {
-        return reason;
-    }
-
-    public void setReason(String reason) {
-        this.reason = reason;
-    }
-
-    @Override
-    public String toString() {
-        return "HttpResponse [statusCode=" + statusCode + ", content=" + content
-                + ", reason=" + reason + "]";
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/rest/HttpResponseHandler.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/rest/HttpResponseHandler.java b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/rest/HttpResponseHandler.java
deleted file mode 100644
index 532fc5e..0000000
--- a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/rest/HttpResponseHandler.java
+++ /dev/null
@@ -1,68 +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.integration.tests.rest;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.http.HttpEntity;
-import org.apache.http.StatusLine;
-import org.apache.http.client.ClientProtocolException;
-import org.apache.http.client.ResponseHandler;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-
-/**
- * Rest http response handler
- */
-public class HttpResponseHandler implements ResponseHandler<HttpResponse> {
-    private static final Log log = LogFactory.getLog(HttpResponseHandler.class);
-
-    @Override
-    public HttpResponse handleResponse(org.apache.http.HttpResponse response) throws ClientProtocolException,
-            IOException {
-        StatusLine statusLine = response.getStatusLine();
-        HttpEntity entity = response.getEntity();
-        if (entity == null) {
-            throw new ClientProtocolException("Response contains no content");
-        }
-
-        BufferedReader reader = new BufferedReader(new InputStreamReader(
-                (response.getEntity().getContent())));
-
-        String output;
-        String result = "";
-
-        while ((output = reader.readLine()) != null) {
-            result += output;
-        }
-
-        HttpResponse httpResponse = new HttpResponse();
-        httpResponse.setStatusCode(statusLine.getStatusCode());
-        httpResponse.setContent(result);
-        httpResponse.setReason(statusLine.getReasonPhrase());
-
-        if (log.isDebugEnabled()) {
-            log.debug("Extracted Http Response: " + httpResponse.toString());
-        }
-
-        return httpResponse;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/rest/IntegrationMockClient.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/rest/IntegrationMockClient.java b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/rest/IntegrationMockClient.java
deleted file mode 100644
index f53ca90..0000000
--- a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/rest/IntegrationMockClient.java
+++ /dev/null
@@ -1,102 +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.integration.tests.rest;
-
-import com.google.gson.Gson;
-import com.google.gson.GsonBuilder;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.http.client.methods.HttpDelete;
-import org.apache.http.client.methods.HttpRequestBase;
-import org.apache.http.client.utils.URIBuilder;
-import org.apache.http.impl.client.DefaultHttpClient;
-import org.apache.http.impl.conn.PoolingClientConnectionManager;
-import org.apache.stratos.mock.iaas.client.MockIaasApiClient;
-import org.apache.stratos.mock.iaas.client.rest.HttpResponse;
-import org.apache.stratos.mock.iaas.client.rest.HttpResponseHandler;
-
-import java.net.URI;
-
-/**
- * Mock client
- */
-public class IntegrationMockClient extends MockIaasApiClient {
-    private static final Log log = LogFactory.getLog(IntegrationMockClient.class);
-    private static final String INSTANCES_CONTEXT = "/instances/";
-    private DefaultHttpClient httpClient;
-    private String endpoint;
-
-    public IntegrationMockClient(String endpoint) {
-        super(endpoint);
-        this.endpoint = endpoint;
-        PoolingClientConnectionManager cm = new PoolingClientConnectionManager();
-        // Increase max total connection to 200
-        cm.setMaxTotal(200);
-        // Increase default max connection per route to 50
-        cm.setDefaultMaxPerRoute(50);
-
-        httpClient = new DefaultHttpClient(cm);
-        httpClient = (DefaultHttpClient) WebClientWrapper.wrapClient(httpClient);
-    }
-
-    public boolean terminateInstance(String instanceId) {
-        try {
-            if (log.isDebugEnabled()) {
-                log.debug(String.format("Terminate instance: [instance-id] %s", instanceId));
-            }
-            URI uri = new URIBuilder(endpoint + INSTANCES_CONTEXT + instanceId).build();
-            org.apache.stratos.mock.iaas.client.rest.HttpResponse response = doDelete(uri);
-            if (response != null) {
-                if ((response.getStatusCode() >= 200) && (response.getStatusCode() < 300)) {
-                    return true;
-                } else {
-                    GsonBuilder gsonBuilder = new GsonBuilder();
-                    Gson gson = gsonBuilder.create();
-                    ErrorResponse errorResponse = gson.fromJson(response.getContent(), ErrorResponse.class);
-                    if (errorResponse != null) {
-                        throw new RuntimeException(errorResponse.getErrorMessage());
-                    }
-                }
-            }
-            throw new RuntimeException("An unknown error occurred");
-        } catch (Exception e) {
-            String message = "Could not start mock instance";
-            throw new RuntimeException(message, e);
-        }
-    }
-
-    public HttpResponse doDelete(URI resourcePath) throws Exception {
-        HttpDelete httpDelete = null;
-        try {
-            httpDelete = new HttpDelete(resourcePath);
-            httpDelete.addHeader("Content-Type", "application/json");
-
-            return httpClient.execute(httpDelete, new HttpResponseHandler());
-        } finally {
-            releaseConnection(httpDelete);
-        }
-    }
-
-    private void releaseConnection(HttpRequestBase request) {
-        if (request != null) {
-            request.releaseConnection();
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/rest/RestClient.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/rest/RestClient.java b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/rest/RestClient.java
deleted file mode 100644
index 66c6a73..0000000
--- a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/rest/RestClient.java
+++ /dev/null
@@ -1,403 +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.integration.tests.rest;
-
-
-import com.google.gson.Gson;
-import com.google.gson.GsonBuilder;
-import com.google.gson.JsonParser;
-import org.apache.commons.lang.StringUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.http.client.methods.*;
-import org.apache.http.client.utils.URIBuilder;
-import org.apache.http.entity.StringEntity;
-import org.apache.http.impl.client.DefaultHttpClient;
-import org.apache.http.impl.conn.PoolingClientConnectionManager;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.lang.reflect.Type;
-import java.net.URI;
-
-/**
- * Rest client to handle rest requests
- */
-public class RestClient {
-    private static final Log log = LogFactory.getLog(RestClient.class);
-    private DefaultHttpClient httpClient;
-    private String endPoint;
-    private String userName;
-    private String password;
-
-    public RestClient() {
-        PoolingClientConnectionManager cm = new PoolingClientConnectionManager();
-        // Increase max total connection to 200
-        cm.setMaxTotal(200);
-        // Increase default max connection per route to 50
-        cm.setDefaultMaxPerRoute(50);
-
-        httpClient = new DefaultHttpClient(cm);
-        httpClient = (DefaultHttpClient) WebClientWrapper.wrapClient(httpClient);
-    }
-
-    public RestClient(String endPoint, String userName, String password) {
-        this();
-        this.endPoint = endPoint;
-        this.setUserName(userName);
-        this.setPassword(password);
-    }
-
-    /**
-     * Handle http post request. Return String
-     *
-     * @param resourcePath    This should be REST endpoint
-     * @param jsonParamString The json string which should be executed from the post request
-     * @return The HttpResponse
-     * @throws Exception if any errors occur when executing the request
-     */
-    public HttpResponse doPost(URI resourcePath, String jsonParamString) throws Exception {
-        HttpPost postRequest = null;
-        try {
-            postRequest = new HttpPost(resourcePath);
-            StringEntity input = new StringEntity(jsonParamString);
-            input.setContentType("application/json");
-            postRequest.setEntity(input);
-
-            String userPass = getUsernamePassword();
-            String basicAuth = "Basic " + javax.xml.bind.DatatypeConverter.printBase64Binary(userPass.getBytes("UTF-8"));
-            postRequest.addHeader("Authorization", basicAuth);
-
-            return httpClient.execute(postRequest, new HttpResponseHandler());
-        } finally {
-            releaseConnection(postRequest);
-        }
-    }
-
-    /**
-     * Handle http get request. Return String
-     *
-     * @param resourcePath This should be REST endpoint
-     * @return The HttpResponse
-     * @throws org.apache.http.client.ClientProtocolException and IOException
-     *                                                        if any errors occur when executing the request
-     */
-    public HttpResponse doGet(URI resourcePath) throws Exception {
-        HttpGet getRequest = null;
-        try {
-            getRequest = new HttpGet(resourcePath);
-            getRequest.addHeader("Content-Type", "application/json");
-            String userPass = getUsernamePassword();
-            String basicAuth = "Basic " + javax.xml.bind.DatatypeConverter.printBase64Binary(userPass.getBytes("UTF-8"));
-            getRequest.addHeader("Authorization", basicAuth);
-
-            return httpClient.execute(getRequest, new HttpResponseHandler());
-        } finally {
-            releaseConnection(getRequest);
-        }
-    }
-
-    public HttpResponse doDelete(URI resourcePath) throws Exception {
-        HttpDelete httpDelete = null;
-        try {
-            httpDelete = new HttpDelete(resourcePath);
-            httpDelete.addHeader("Content-Type", "application/json");
-            String userPass = getUsernamePassword();
-            String basicAuth = "Basic " + javax.xml.bind.DatatypeConverter.printBase64Binary(userPass.getBytes("UTF-8"));
-            httpDelete.addHeader("Authorization", basicAuth);
-            return httpClient.execute(httpDelete, new HttpResponseHandler());
-        } finally {
-            releaseConnection(httpDelete);
-        }
-    }
-
-    public HttpResponse doPut(URI resourcePath, String jsonParamString) throws Exception {
-
-        HttpPut putRequest = null;
-        try {
-            putRequest = new HttpPut(resourcePath);
-
-            StringEntity input = new StringEntity(jsonParamString);
-            input.setContentType("application/json");
-            putRequest.setEntity(input);
-            String userPass = getUsernamePassword();
-            String basicAuth = "Basic " + javax.xml.bind.DatatypeConverter.printBase64Binary(userPass.getBytes("UTF-8"));
-            putRequest.addHeader("Authorization", basicAuth);
-            return httpClient.execute(putRequest, new HttpResponseHandler());
-        } finally {
-            releaseConnection(putRequest);
-        }
-    }
-
-    private void releaseConnection(HttpRequestBase request) {
-        if (request != null) {
-            request.releaseConnection();
-        }
-    }
-
-    public boolean addEntity(String filePath, String resourcePath, String entityName) {
-        try {
-            String content = getJsonStringFromFile(filePath);
-            URI uri = new URIBuilder(this.endPoint + resourcePath).build();
-
-            HttpResponse response = doPost(uri, content);
-            if (response != null) {
-                if ((response.getStatusCode() >= 200) && (response.getStatusCode() < 300)) {
-                    return true;
-                } else {
-                    GsonBuilder gsonBuilder = new GsonBuilder();
-                    Gson gson = gsonBuilder.create();
-                    ErrorResponse errorResponse = gson.fromJson(response.getContent(), ErrorResponse.class);
-                    if (errorResponse != null) {
-                        throw new RuntimeException(errorResponse.getErrorMessage());
-                    }
-                }
-            }
-            String msg = "An unknown error occurred while trying to add ";
-            log.error(msg + entityName);
-            throw new RuntimeException(msg + entityName);
-        } catch (Exception e) {
-            String message = "Could not add " + entityName;
-            log.error(message, e);
-            throw new RuntimeException(message, e);
-        }
-    }
-
-    public boolean deployEntity(String resourcePath, String entityName) {
-        try {
-            URI uri = new URIBuilder(this.endPoint + resourcePath).build();
-
-            HttpResponse response = doPost(uri, "");
-            if (response != null) {
-                if ((response.getStatusCode() >= 200) && (response.getStatusCode() < 300)) {
-                    return true;
-                } else {
-                    GsonBuilder gsonBuilder = new GsonBuilder();
-                    Gson gson = gsonBuilder.create();
-                    ErrorResponse errorResponse = gson.fromJson(response.getContent(), ErrorResponse.class);
-                    if (errorResponse != null) {
-                        throw new RuntimeException(errorResponse.getErrorMessage());
-                    }
-                }
-            }
-            String msg = "An unknown error occurred while trying to deploy ";
-            log.error(msg + entityName);
-            throw new RuntimeException(msg + entityName);
-        } catch (Exception e) {
-            String message = "Could not deploy  " + entityName;
-            log.error(message, e);
-            throw new RuntimeException(message, e);
-        }
-    }
-
-    public boolean undeployEntity(String resourcePath, String entityName) {
-        try {
-            URI uri = new URIBuilder(this.endPoint + resourcePath).build();
-
-            HttpResponse response = doPost(uri, "");
-            if (response != null) {
-                if ((response.getStatusCode() >= 200) && (response.getStatusCode() < 300)) {
-                    return true;
-                } else {
-                    GsonBuilder gsonBuilder = new GsonBuilder();
-                    Gson gson = gsonBuilder.create();
-                    ErrorResponse errorResponse = gson.fromJson(response.getContent(), ErrorResponse.class);
-                    if (errorResponse != null) {
-                        throw new RuntimeException(errorResponse.getErrorMessage());
-                    }
-                }
-            }
-            String msg = "An unknown error occurred while trying to undeploy ";
-            log.error(msg + entityName);
-            throw new RuntimeException(msg + entityName);
-        } catch (Exception e) {
-            String message = "Could not deploy  " + entityName;
-            log.error(message, e);
-            throw new RuntimeException(message, e);
-        }
-    }
-
-    public Object getEntity(String resourcePath, String identifier, Class responseJsonClass,
-                            String entityName) {
-        try {
-            URI uri = new URIBuilder(this.endPoint + resourcePath + "/" + identifier).build();
-            HttpResponse response = doGet(uri);
-            GsonBuilder gsonBuilder = new GsonBuilder();
-            Gson gson = gsonBuilder.create();
-            if (response != null) {
-                if ((response.getStatusCode() >= 200) && (response.getStatusCode() < 300)) {
-                    return gson.fromJson(response.getContent(), responseJsonClass);
-                } else if (response.getStatusCode() == 404) {
-                    return null;
-                } else {
-                    ErrorResponse errorResponse = gson.fromJson(response.getContent(),
-                            ErrorResponse.class);
-                    if (errorResponse != null) {
-                        throw new RuntimeException(errorResponse.getErrorMessage());
-                    }
-                }
-            }
-            String msg = "An unknown error occurred while getting the " + entityName;
-            log.error(msg);
-            throw new RuntimeException(msg);
-        } catch (Exception e) {
-            String message = "Could not get " + entityName;
-            log.error(message, e);
-            throw new RuntimeException(message, e);
-        }
-    }
-
-    public Object listEntity(String resourcePath, Type type, String entityName) {
-        try {
-            URI uri = new URIBuilder(this.endPoint + resourcePath).build();
-            HttpResponse response = doGet(uri);
-            GsonBuilder gsonBuilder = new GsonBuilder();
-            Gson gson = gsonBuilder.create();
-            if (response != null) {
-                if ((response.getStatusCode() >= 200) && (response.getStatusCode() < 300)) {
-                    return gson.fromJson(response.getContent(), type);
-                } else if (response.getStatusCode() == 404) {
-                    return null;
-                } else {
-                    ErrorResponse errorResponse = gson.fromJson(response.getContent(),
-                            ErrorResponse.class);
-                    if (errorResponse != null) {
-                        throw new RuntimeException(errorResponse.getErrorMessage());
-                    }
-                }
-            }
-            String msg = "An unknown error occurred while getting the " + entityName;
-            log.error(msg);
-            throw new RuntimeException(msg);
-        } catch (Exception e) {
-            String message = "Could not get " + entityName;
-            log.error(message, e);
-            throw new RuntimeException(message, e);
-        }
-    }
-
-    public boolean removeEntity(String resourcePath, String identifier, String entityName) {
-        try {
-            URI uri = new URIBuilder(this.endPoint + "/" + resourcePath + "/" + identifier).build();
-            HttpResponse response = doDelete(uri);
-            if (response != null) {
-                if ((response.getStatusCode() >= 200) && (response.getStatusCode() < 300)) {
-                    return true;
-                } else if (response.getContent().contains("it is used") || response.getContent().contains("in use")) {
-                    return false;
-                } else {
-                    GsonBuilder gsonBuilder = new GsonBuilder();
-                    Gson gson = gsonBuilder.create();
-                    ErrorResponse errorResponse = gson.fromJson(response.getContent(),
-                            ErrorResponse.class);
-                    if (errorResponse != null) {
-                        throw new RuntimeException(errorResponse.getErrorMessage());
-                    }
-                }
-            }
-            String msg = "An unknown error occurred while removing the " + entityName;
-            log.error(msg);
-            throw new RuntimeException(msg);
-        } catch (Exception e) {
-            String message = "Could not remove  " + entityName;
-            log.error(message, e);
-            throw new RuntimeException(message, e);
-        }
-    }
-
-    public boolean updateEntity(String filePath, String resourcePath, String entityName) {
-        try {
-            String content = getJsonStringFromFile(filePath);
-            URI uri = new URIBuilder(this.endPoint + resourcePath).build();
-
-            HttpResponse response = doPut(uri, content);
-            if (response != null) {
-                if ((response.getStatusCode() >= 200) && (response.getStatusCode() < 300)) {
-                    return true;
-                } else {
-                    GsonBuilder gsonBuilder = new GsonBuilder();
-                    Gson gson = gsonBuilder.create();
-                    ErrorResponse errorResponse = gson.fromJson(response.getContent(),
-                            ErrorResponse.class);
-                    if (errorResponse != null) {
-                        throw new RuntimeException(errorResponse.getErrorMessage());
-                    }
-                }
-            }
-            String msg = "An unknown error occurred while trying to update ";
-            log.error(msg + entityName);
-            throw new RuntimeException(msg + entityName);
-        } catch (Exception e) {
-            String message = "Could not update " + entityName;
-            log.error(message, e);
-            throw new RuntimeException(message, e);
-        }
-    }
-
-    /**
-     * Get the json string from the artifacts directory
-     *
-     * @param filePath path of the artifacts
-     * @return json string of the relevant artifact
-     * @throws FileNotFoundException
-     */
-    public String getJsonStringFromFile(String filePath) throws FileNotFoundException {
-        JsonParser parser = new JsonParser();
-        Object object = parser.parse(new FileReader(getResourcesFolderPath() + filePath));
-        GsonBuilder gsonBuilder = new GsonBuilder();
-        Gson gson = gsonBuilder.create();
-        return gson.toJson(object);
-    }
-
-    /**
-     * Get resources folder path
-     *
-     * @return the resource path
-     */
-    private String getResourcesFolderPath() {
-        String path = getClass().getResource("/").getPath();
-        return StringUtils.removeEnd(path, File.separator);
-    }
-
-    /**
-     * Get the username and password
-     *
-     * @return username:password
-     */
-    private String getUsernamePassword() {
-        return this.getUserName() + ":" + this.getPassword();
-    }
-
-    public String getUserName() {
-        return userName;
-    }
-
-    public void setUserName(String userName) {
-        this.userName = userName;
-    }
-
-    public String getPassword() {
-        return password;
-    }
-
-    public void setPassword(String password) {
-        this.password = password;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/rest/WebClientWrapper.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/rest/WebClientWrapper.java b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/rest/WebClientWrapper.java
deleted file mode 100644
index 848f4f2..0000000
--- a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/rest/WebClientWrapper.java
+++ /dev/null
@@ -1,62 +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.integration.tests.rest;
-
-import org.apache.http.client.HttpClient;
-import org.apache.http.conn.ClientConnectionManager;
-import org.apache.http.conn.scheme.Scheme;
-import org.apache.http.conn.scheme.SchemeRegistry;
-import org.apache.http.conn.ssl.SSLSocketFactory;
-import org.apache.http.impl.client.DefaultHttpClient;
-
-import javax.net.ssl.SSLContext;
-import javax.net.ssl.TrustManager;
-import javax.net.ssl.X509TrustManager;
-import java.security.cert.CertificateException;
-import java.security.cert.X509Certificate;
-
-public class WebClientWrapper {
-    public static HttpClient wrapClient(HttpClient base) {
-        try {
-            SSLContext ctx = SSLContext.getInstance("TLS");
-            X509TrustManager tm = new X509TrustManager() {
-                public void checkClientTrusted(X509Certificate[] xcs,
-                                               String string) throws CertificateException {
-                }
-
-                public void checkServerTrusted(X509Certificate[] xcs,
-                                               String string) throws CertificateException {
-                }
-
-                public X509Certificate[] getAcceptedIssuers() {
-                    return null;
-                }
-            };
-            ctx.init(null, new TrustManager[]{tm}, null);
-            SSLSocketFactory ssf = new SSLSocketFactory(ctx);
-            ssf.setHostnameVerifier(SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER);
-            ClientConnectionManager ccm = base.getConnectionManager();
-            SchemeRegistry sr = ccm.getSchemeRegistry();
-            sr.register(new Scheme("https", ssf, 443));
-            return new DefaultHttpClient(ccm, base.getParams());
-        } catch (Exception ex) {
-            return null;
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/users/TenantTest.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/users/TenantTest.java b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/users/TenantTest.java
deleted file mode 100644
index a1998e1..0000000
--- a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/users/TenantTest.java
+++ /dev/null
@@ -1,44 +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.integration.tests.users;
-
-import org.apache.stratos.integration.tests.RestConstants;
-import org.apache.stratos.integration.tests.StratosTestServerManager;
-import org.testng.annotations.Test;
-
-import static junit.framework.Assert.assertTrue;
-
-/**
- * Handling users
- */
-public class TenantTest extends StratosTestServerManager {
-    private static final String RESOURCES_PATH = "/user-test";
-
-
-    @Test
-    public void addUser() {
-        String tenantId = "tenant-1";
-        boolean addedUser1 = restClientAdmin.addEntity(RESOURCES_PATH + "/" +
-                        tenantId + ".json",
-                RestConstants.USERS, RestConstants.USERS_NAME);
-        assertTrue(addedUser1);
-
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/users/UserTest.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/users/UserTest.java b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/users/UserTest.java
deleted file mode 100644
index 1b083df..0000000
--- a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/users/UserTest.java
+++ /dev/null
@@ -1,115 +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.integration.tests.users;
-
-import com.google.gson.reflect.TypeToken;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.common.beans.UserInfoBean;
-import org.apache.stratos.common.beans.cartridge.CartridgeBean;
-import org.apache.stratos.integration.tests.RestConstants;
-import org.apache.stratos.integration.tests.StratosTestServerManager;
-import org.testng.annotations.Test;
-
-import java.lang.reflect.Type;
-import java.util.ArrayList;
-import java.util.List;
-
-import static junit.framework.Assert.*;
-
-/**
- * Handling users
- */
-public class UserTest extends StratosTestServerManager {
-    private static final Log log = LogFactory.getLog(UserTest.class);
-    private static final String RESOURCES_PATH = "/user-test";
-
-    @Test
-    public void addUser() {
-        try {
-            log.info("-------------------------------Started users test case-------------------------------");
-            String userId = "user-1";
-            boolean addedUser1 = restClientAdmin.addEntity(RESOURCES_PATH + "/" +
-                            userId + ".json",
-                    RestConstants.USERS, RestConstants.USERS_NAME);
-            assertTrue(addedUser1);
-
-            Type listType = new TypeToken<ArrayList<UserInfoBean>>() {
-            }.getType();
-
-            List<UserInfoBean> userInfoBeanList = (List<UserInfoBean>) restClientAdmin.listEntity(RestConstants.USERS,
-                    listType, RestConstants.USERS_NAME);
-
-            UserInfoBean bean1 = null;
-            for (UserInfoBean userInfoBean : userInfoBeanList) {
-                if (userInfoBean.getUserName().equals(userId)) {
-                    bean1 = userInfoBean;
-                }
-            }
-            assertNotNull(bean1);
-            /*assertEquals(bean1.getEmail(), "foo@bar.com");
-            assertEquals(bean1.getFirstName(), "Frank");
-            assertEquals(bean1.getRole(), "admin");
-            assertEquals(bean1.getLastName(), "Myers");
-            assertEquals(bean1.getCredential(), "kim12345");*/
-
-            boolean updatedUser1 = restClientAdmin.updateEntity(RESOURCES_PATH + "/" +
-                            userId + "-v1.json",
-                    RestConstants.USERS, RestConstants.USERS_NAME);
-            assertTrue(updatedUser1);
-
-            userInfoBeanList = (List<UserInfoBean>) restClientAdmin.listEntity(RestConstants.USERS,
-                    listType, RestConstants.USERS_NAME);
-
-            for (UserInfoBean userInfoBean : userInfoBeanList) {
-                if (userInfoBean.getUserName().equals(userId)) {
-                    bean1 = userInfoBean;
-                }
-            }
-            assertNotNull(bean1);
-            /*assertEquals(bean1.getEmail(), "user-1@bar.com");
-            assertEquals(bean1.getFirstName(), "Frankn");
-            assertEquals(bean1.getRole(), "admin");
-            assertEquals(bean1.getLastName(), "Myersn");
-            assertEquals(bean1.getCredential(), "kim123456");*/
-
-            boolean removedUser1 = restClientAdmin.removeEntity(RestConstants.USERS,
-                            userId, RestConstants.USERS_NAME);
-            assertTrue(removedUser1);
-
-            userInfoBeanList = (List<UserInfoBean>) restClientAdmin.listEntity(RestConstants.USERS,
-                    listType, RestConstants.USERS_NAME);
-
-            bean1 = null;
-            for (UserInfoBean userInfoBean : userInfoBeanList) {
-                if (userInfoBean.getUserName().equals(userId)) {
-                    bean1 = userInfoBean;
-                }
-            }
-            assertNull(bean1);
-
-            log.info("-------------------------Ended users test case-------------------------");
-
-        } catch (Exception e) {
-            log.error("An error occurred while handling  application bursting", e);
-            assertTrue("An error occurred while handling  application bursting", false);
-        }
-
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/application-bursting-test/application-policies/application-policy-application-bursting-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/application-bursting-test/application-policies/application-policy-application-bursting-test.json b/products/stratos/modules/integration/src/test/resources/application-bursting-test/application-policies/application-policy-application-bursting-test.json
deleted file mode 100644
index 4d1d35f..0000000
--- a/products/stratos/modules/integration/src/test/resources/application-bursting-test/application-policies/application-policy-application-bursting-test.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
-    "id": "application-policy-application-bursting-test",
-    "algorithm": "one-after-another",
-    "networkPartitions": [
-        "network-partition-application-bursting-test-1",
-        "network-partition-application-bursting-test-2"
-    ],
-    "properties": [
-        {
-            "name": "networkPartitionGroups",
-            "value": "network-partition-application-bursting-test-1|network-partition-application-bursting-test-2"
-        },
-        {
-            "name": "key-2",
-            "value": "value-2"
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/application-bursting-test/applications/app-bursting-single-cartriddge-group.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/application-bursting-test/applications/app-bursting-single-cartriddge-group.json b/products/stratos/modules/integration/src/test/resources/application-bursting-test/applications/app-bursting-single-cartriddge-group.json
deleted file mode 100644
index c091ec5..0000000
--- a/products/stratos/modules/integration/src/test/resources/application-bursting-test/applications/app-bursting-single-cartriddge-group.json
+++ /dev/null
@@ -1,70 +0,0 @@
-{
-    "applicationId": "application-bursting-test",
-    "alias": "my-cartridge-group-app",
-    "components": {
-        "groups": [
-            {
-                "name": "esb-php-group-application-bursting-test",
-                "alias": "my-esb-php-group-application-bursting-test",
-                "deploymentPolicy": "deployment-policy-application-bursting-test",
-                "groupMinInstances": 1,
-                "groupMaxInstances": 2,
-                "cartridges": [
-                    {
-                        "type": "esb-application-bursting-test",
-                        "cartridgeMin": 1,
-                        "cartridgeMax": 2,
-                        "subscribableInfo": {
-                            "alias": "my-esb-application-bursting-test",
-                            "autoscalingPolicy": "autoscaling-policy-application-bursting-test",
-                            "artifactRepository": {
-                                "privateRepo": false,
-                                "repoUrl": "https://github.com/imesh/stratos-esb-applications.git",
-                                "repoUsername": "",
-                                "repoPassword": ""
-                            }
-                        }
-                    },
-                    {
-                        "type": "php-application-bursting-test",
-                        "cartridgeMin": 2,
-                        "cartridgeMax": 4,
-                        "lvsVirtualIP": "192.168.56.50|255.255.255.0",
-                        "subscribableInfo": {
-                            "alias": "my-php-application-bursting-test",
-                            "autoscalingPolicy": "autoscaling-policy-application-bursting-test",
-                            "artifactRepository": {
-                                "privateRepo": false,
-                                "repoUrl": "https://github.com/imesh/stratos-php-applications.git",
-                                "repoUsername": "",
-                                "repoPassword": ""
-                            }
-                        }
-                    }
-                ]
-            }
-        ],
-        "cartridges": [
-            {
-                "type": "tomcat-application-bursting-test",
-                "cartridgeMin": 2,
-                "cartridgeMax": 4,
-                "subscribableInfo": {
-                    "alias": "my-tomcat-application-bursting-test",
-                    "autoscalingPolicy": "autoscaling-policy-application-bursting-test",
-                    "deploymentPolicy": "deployment-policy-application-bursting-test",
-                    "artifactRepository": {
-                        "privateRepo": false,
-                        "repoUrl": "https://github.com/imesh/stratos-tomcat-applications.git",
-                        "repoUsername": "",
-                        "repoPassword": ""
-                    }
-                }
-            }
-        ],
-        "dependencies": {
-            "terminationBehaviour": "terminate-none"
-        }
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/application-bursting-test/autoscaling-policies/autoscaling-policy-application-bursting-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/application-bursting-test/autoscaling-policies/autoscaling-policy-application-bursting-test.json b/products/stratos/modules/integration/src/test/resources/application-bursting-test/autoscaling-policies/autoscaling-policy-application-bursting-test.json
deleted file mode 100644
index 697cb70..0000000
--- a/products/stratos/modules/integration/src/test/resources/application-bursting-test/autoscaling-policies/autoscaling-policy-application-bursting-test.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
-    "id": "autoscaling-policy-application-bursting-test",
-    "loadThresholds": {
-        "requestsInFlight": {
-            "threshold": 35
-        },
-        "memoryConsumption": {
-            "threshold": 45
-        },
-        "loadAverage": {
-            "threshold": 25
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/application-bursting-test/cartridges-groups/esb-php-group-application-bursting-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/application-bursting-test/cartridges-groups/esb-php-group-application-bursting-test.json b/products/stratos/modules/integration/src/test/resources/application-bursting-test/cartridges-groups/esb-php-group-application-bursting-test.json
deleted file mode 100644
index 8fbab89..0000000
--- a/products/stratos/modules/integration/src/test/resources/application-bursting-test/cartridges-groups/esb-php-group-application-bursting-test.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
-    "name": "esb-php-group-application-bursting-test",
-    "cartridges": [
-        "esb-application-bursting-test",
-        "php-application-bursting-test"
-    ],
-    "dependencies": {
-        "startupOrders": [
-            {
-                "aliases": [
-                    "cartridge.my-esb-application-bursting-test",
-                    "cartridge.my-php-application-bursting-test"
-                ]
-            }
-        ],
-        "terminationBehaviour": "terminate-none"
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/application-bursting-test/cartridges/mock/esb-application-bursting-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/application-bursting-test/cartridges/mock/esb-application-bursting-test.json b/products/stratos/modules/integration/src/test/resources/application-bursting-test/cartridges/mock/esb-application-bursting-test.json
deleted file mode 100755
index d97f9ff..0000000
--- a/products/stratos/modules/integration/src/test/resources/application-bursting-test/cartridges/mock/esb-application-bursting-test.json
+++ /dev/null
@@ -1,50 +0,0 @@
-{
-    "type": "esb-application-bursting-test",
-    "provider": "apache",
-    "host": "stratos.apache.org",
-    "category": "framework",
-    "displayName": "esb-application-bursting-test",
-    "description": "esb-application-bursting-test Cartridge",
-    "version": "7",
-    "multiTenant": "false",
-    "portMapping": [
-        {
-            "name": "http-22",
-            "protocol": "http",
-            "port": "22",
-            "proxyPort": "8280"
-        }
-    ],
-    "deployment": {
-    },
-    "iaasProvider": [
-        {
-            "type": "mock",
-            "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
-            "networkInterfaces": [
-                {
-                    "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e"
-                }
-            ],
-            "property": [
-                {
-                    "name": "instanceType",
-                    "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594"
-                },
-                {
-                    "name": "keyPair",
-                    "value": "vishanth-key"
-                },
-                {
-                    "name": "securityGroups",
-                    "value": "default"
-                }
-            ]
-        }
-    ],
-    "metadataKeys": [
-        "server_ip",
-        "username",
-        "password"
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/application-bursting-test/cartridges/mock/php-application-bursting-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/application-bursting-test/cartridges/mock/php-application-bursting-test.json b/products/stratos/modules/integration/src/test/resources/application-bursting-test/cartridges/mock/php-application-bursting-test.json
deleted file mode 100755
index 02d0d9d..0000000
--- a/products/stratos/modules/integration/src/test/resources/application-bursting-test/cartridges/mock/php-application-bursting-test.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{
-    "type": "php-application-bursting-test",
-    "provider": "apache",
-    "category": "framework",
-    "host": "php.stratos.org",
-    "displayName": "php-application-bursting-test",
-    "description": "php-application-bursting-test Cartridge",
-    "version": "7",
-    "multiTenant": "false",
-    "portMapping": [
-        {
-            "name": "http-80",
-            "protocol": "http",
-            "port": "8080",
-            "proxyPort": "8280"
-        },
-        {
-            "name": "http-22",
-            "protocol": "tcp",
-            "port": "22",
-            "proxyPort": "8222"
-        }
-    ],
-    "deployment": {
-    },
-    "iaasProvider": [
-        {
-            "type": "mock",
-            "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
-            "networkInterfaces": [
-                {
-                    "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e"
-                }
-            ],
-            "property": [
-                {
-                    "name": "instanceType",
-                    "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594"
-                },
-                {
-                    "name": "keyPair",
-                    "value": "reka"
-                },
-                {
-                    "name": "securityGroups",
-                    "value": "default"
-                }
-            ]
-        }
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/application-bursting-test/cartridges/mock/tomcat-application-bursting-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/application-bursting-test/cartridges/mock/tomcat-application-bursting-test.json b/products/stratos/modules/integration/src/test/resources/application-bursting-test/cartridges/mock/tomcat-application-bursting-test.json
deleted file mode 100755
index b63d568..0000000
--- a/products/stratos/modules/integration/src/test/resources/application-bursting-test/cartridges/mock/tomcat-application-bursting-test.json
+++ /dev/null
@@ -1,53 +0,0 @@
-{
-    "type": "tomcat-application-bursting-test",
-    "provider": "apache",
-    "host": "tomcat.stratos.org",
-    "category": "framework",
-    "displayName": "tomcat-application-bursting-test",
-    "description": "tomcat-application-bursting-test Cartridge",
-    "version": "7",
-    "multiTenant": "false",
-    "portMapping": [
-        {
-            "name": "http-22",
-            "protocol": "http",
-            "port": "22",
-            "proxyPort": "8280"
-        },
-        {
-            "protocol": "http",
-            "port": "8080",
-            "proxyPort": "80"
-        }
-    ],
-    "deployment": {
-    },
-    "iaasProvider": [
-        {
-            "type": "mock",
-            "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
-            "networkInterfaces": [
-                {
-                    "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e"
-                }
-            ],
-            "property": [
-                {
-                    "name": "instanceType",
-                    "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594"
-                },
-                {
-                    "name": "keyPair",
-                    "value": "vishanth-key"
-                },
-                {
-                    "name": "securityGroups",
-                    "value": "default"
-                }
-            ]
-        }
-    ],
-    "metadataKeys": [
-        "url"
-    ]
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/application-bursting-test/deployment-policies/deployment-policy-application-bursting-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/application-bursting-test/deployment-policies/deployment-policy-application-bursting-test.json b/products/stratos/modules/integration/src/test/resources/application-bursting-test/deployment-policies/deployment-policy-application-bursting-test.json
deleted file mode 100644
index 4adc0f2..0000000
--- a/products/stratos/modules/integration/src/test/resources/application-bursting-test/deployment-policies/deployment-policy-application-bursting-test.json
+++ /dev/null
@@ -1,32 +0,0 @@
-{
-    "id": "deployment-policy-application-bursting-test",
-    "networkPartitions": [
-        {
-            "id": "network-partition-application-bursting-test-1",
-            "partitionAlgo": "one-after-another",
-            "partitions": [
-                {
-                    "id": "partition-1",
-                    "partitionMax": 4
-                }
-            ]
-        },
-        {
-            "id": "network-partition-application-bursting-test-2",
-            "partitionAlgo": "round-robin",
-            "partitions": [
-                {
-                    "id": "network-partition-10-partition-1",
-                    "partitionMax": 4
-                },
-                {
-                    "id": "network-partition-10-partition-2",
-                    "partitionMax": 4
-                }
-            ]
-        }
-    ]
-}
-
-
-


[21/21] stratos git commit: Uplifting automation engine to v4.4.3, dynamically pick ports for integration tests

Posted by ra...@apache.org.
Uplifting automation engine to v4.4.3, dynamically pick ports for integration tests


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

Branch: refs/heads/master
Commit: c066427087dd884e618d76c41935f308a6708555
Parents: 83e94cf
Author: Akila Perera <ra...@gmail.com>
Authored: Fri Sep 11 03:19:40 2015 +0530
Committer: Akila Perera <ra...@gmail.com>
Committed: Fri Sep 11 03:19:40 2015 +0530

----------------------------------------------------------------------
 pom.xml                                         |   64 ++
 products/stratos/modules/integration/pom.xml    |  170 +--
 .../integration/tests/RestConstants.java        |   63 --
 .../tests/StratosTestServerManager.java         |  282 -----
 .../integration/tests/TopologyHandler.java      |  666 -----------
 .../application/ApplicationBurstingTest.java    |  242 ----
 .../application/ApplicationUpdateTest.java      |  261 -----
 .../application/GroupStartupOrderTest.java      |  260 -----
 .../GroupTerminationBehaviorTest.java           |  402 -------
 .../PartitionOneAfterAnotherClusterTest.java    |  298 -----
 .../PartitionRoundRobinClusterTest.java         |  311 ------
 .../application/SampleApplicationsTest.java     |  252 -----
 .../application/SingleClusterScalingTest.java   |  359 ------
 .../tests/group/CartridgeGroupTest.java         |  150 ---
 .../integration/tests/group/CartridgeTest.java  |  191 ----
 .../tests/policies/ApplicationPolicyTest.java   |  190 ----
 .../tests/policies/AutoscalingPolicyTest.java   |  138 ---
 .../tests/policies/DeploymentPolicyTest.java    |  230 ----
 .../tests/policies/NetworkPartitionTest.java    |  124 ---
 .../integration/tests/rest/ErrorResponse.java   |   56 -
 .../integration/tests/rest/HttpResponse.java    |   59 -
 .../tests/rest/HttpResponseHandler.java         |   68 --
 .../tests/rest/IntegrationMockClient.java       |  102 --
 .../integration/tests/rest/RestClient.java      |  403 -------
 .../tests/rest/WebClientWrapper.java            |   62 --
 .../integration/tests/users/TenantTest.java     |   44 -
 .../integration/tests/users/UserTest.java       |  115 --
 ...cation-policy-application-bursting-test.json |   18 -
 .../app-bursting-single-cartriddge-group.json   |   70 --
 ...caling-policy-application-bursting-test.json |   14 -
 ...esb-php-group-application-bursting-test.json |   19 -
 .../mock/esb-application-bursting-test.json     |   50 -
 .../mock/php-application-bursting-test.json     |   51 -
 .../mock/tomcat-application-bursting-test.json  |   53 -
 ...oyment-policy-application-bursting-test.json |   32 -
 ...k-partition-application-bursting-test-1.json |   15 -
 ...k-partition-application-bursting-test-2.json |   24 -
 ...cation-policy-application-policy-test-1.json |   18 -
 ...cation-policy-application-policy-test-2.json |   18 -
 ...lication-policy-application-policy-test.json |   18 -
 ...ork-partition-application-policy-test-1.json |   24 -
 ...ork-partition-application-policy-test-2.json |   15 -
 ...lication-policy-application-update-test.json |   18 -
 .../g-sc-G123-1-application-update-test-v1.json |   86 --
 .../g-sc-G123-1-application-update-test.json    |   86 --
 ...oscaling-policy-application-update-test.json |   14 -
 ...rdige-nested-application-update-test-v1.json |   50 -
 ...artrdige-nested-application-update-test.json |   50 -
 .../mock/c1-application-update-test.json        |   45 -
 .../mock/c2-application-update-test.json        |   45 -
 .../mock/c3-application-update-test.json        |   45 -
 ...yment-policy-application-update-test-v1.json |   36 -
 ...ployment-policy-application-update-test.json |   32 -
 ...-partition-application-update-test-1-v1.json |   28 -
 ...ork-partition-application-update-test-1.json |   15 -
 ...ork-partition-application-update-test-2.json |   24 -
 ...caling-policy-autoscaling-policy-test-1.json |   14 -
 ...caling-policy-autoscaling-policy-test-2.json |   14 -
 ...aling-policy-autoscaling-policy-test-v1.json |   14 -
 ...oscaling-policy-autoscaling-policy-test.json |   14 -
 .../g4-g5-g6-cartridge-group-test-v1.json       |   50 -
 .../g4-g5-g6-cartridge-group-test.json          |   50 -
 .../group-1-cartridge-group-test.json           |   50 -
 .../group-2-cartridge-group-test.json           |   50 -
 .../mock/c4-cartridge-group-test.json           |   45 -
 .../mock/c5-cartridge-group-test.json           |  124 ---
 .../mock/c6-cartridge-group-test.json           |   45 -
 .../cartridges/mock/c0-cartridge-test-v1.json   |  124 ---
 .../cartridges/mock/c0-cartridge-test.json      |  124 ---
 .../cartridges/mock/c1-cartridge-test.json      |  124 ---
 .../cartridges/mock/c2-cartridge-test.json      |  124 ---
 .../test/resources/common/JMSOutputAdaptor.xml  |   30 -
 .../src/test/resources/common/jndi.properties   |   22 -
 .../src/test/resources/common/log4j.properties  |  206 ----
 .../src/test/resources/common/mock-iaas.xml     |  123 --
 .../src/test/resources/common/scaling.drl       |  311 ------
 ...loyment-policy-deployment-policy-test-1.json |   32 -
 ...loyment-policy-deployment-policy-test-2.json |   32 -
 ...oyment-policy-deployment-policy-test-v1.json |   36 -
 ...eployment-policy-deployment-policy-test.json |   32 -
 ...k-partition-deployment-policy-test-1-v1.json |   28 -
 ...work-partition-deployment-policy-test-1.json |   15 -
 ...work-partition-deployment-policy-test-2.json |   24 -
 ...cation-policy-application-bursting-test.json |   18 -
 ...ication-policy-group-startup-order-test.json |   13 -
 .../app-bursting-single-cartriddge-group.json   |   70 --
 .../applications/group-startup-order-test.json  |  206 ----
 ...caling-policy-application-bursting-test.json |   14 -
 ...scaling-policy-group-startup-order-test.json |   14 -
 ...esb-php-group-application-bursting-test.json |   19 -
 .../group6-group-startup-order-test.json        |   44 -
 .../group8-group-startup-order-test.json        |   18 -
 .../mock/esb-application-bursting-test.json     |   50 -
 .../mock/esb-group-startup-order-test.json      |   50 -
 .../mock/php-application-bursting-test.json     |   51 -
 .../mock/php-group-startup-order-test.json      |   51 -
 .../stratos-lb-group-startup-order-test.json    |   44 -
 .../mock/tomcat-application-bursting-test.json  |   53 -
 .../mock/tomcat-group-startup-order-test.json   |   53 -
 .../mock/tomcat1-group-startup-order-test.json  |   45 -
 .../mock/tomcat2-group-startup-order-test.json  |   49 -
 .../mock/tomcat3-group-startup-order-test.json  |   31 -
 ...oyment-policy-application-bursting-test.json |   32 -
 ...loyment-policy-group-startup-order-test.json |   18 -
 ...k-partition-application-bursting-test-1.json |   15 -
 ...k-partition-application-bursting-test-2.json |   24 -
 ...rk-partition-group-startup-order-test-1.json |   15 -
 ...rk-partition-group-startup-order-test-2.json |   24 -
 .../RegionOne.json                              |   17 -
 .../application-martin.json                     |  100 --
 .../application-policy-1.json                   |   17 -
 .../application-s-g-c1-c2-c3-s.json             |  130 ---
 .../application.json                            |  108 --
 .../startup-order-termination-behavior/c1.json  |   45 -
 .../startup-order-termination-behavior/c2.json  |   45 -
 .../startup-order-termination-behavior/c3.json  |   45 -
 .../startup-order-termination-behavior/c4.json  |   45 -
 .../startup-order-termination-behavior/c5.json  |  132 ---
 .../cartridge-groups-s-g-c1-c2-c3-s.json        |   26 -
 .../cartridge-groups-working.json               |   34 -
 .../cartridge-groups.json                       |   77 --
 .../cartridge-groups.json.back                  |   53 -
 .../deploy.sh                                   |   43 -
 .../economy-policy.json                         |   15 -
 .../static-1.json                               |   17 -
 .../wso2carbon 2.log                            |  992 -----------------
 .../wso2carbon-working 2.log                    | 1053 ------------------
 .../wso2carbon-working.log                      | 1053 ------------------
 .../wso2carbon.log                              |  992 -----------------
 ...-policy-group-termination-behavior-test.json |   17 -
 .../group-termination-behavior-test.json        |  101 --
 ...-policy-group-termination-behavior-test.json |   14 -
 ...-groups-group-termination-behavior-test.json |   58 -
 .../c1-group-termination-behavior-test.json     |   45 -
 .../c2-group-termination-behavior-test.json     |   45 -
 .../c3-group-termination-behavior-test.json     |   45 -
 .../c4-group-termination-behavior-test.json     |   45 -
 ...-policy-group-termination-behavior-test.json |   18 -
 ...ition-group-termination-behavior-test-1.json |   15 -
 .../src/test/resources/instrumentation.txt      |    1 -
 .../src/test/resources/keys/wso2carbon.jks      |  Bin 33260 -> 0 bytes
 ...work-partition-network-partition-test-1.json |   15 -
 ...work-partition-network-partition-test-2.json |   15 -
 ...ork-partition-network-partition-test-v1.json |   28 -
 ...etwork-partition-network-partition-test.json |   15 -
 ...ation-policy-partition-round-robin-test.json |   13 -
 .../partition-round-robin-test.json             |   28 -
 ...aling-policy-partition-round-robin-test.json |   14 -
 .../mock/c7-partition-round-robin-test.json     |   45 -
 ...yment-policy-partition-round-robin-test.json |   22 -
 ...rk-partition-partition-round-robin-test.json |   24 -
 ...ication-policy-sample-applications-test.json |   18 -
 ...g-sc-G123-1-sample-applications-test-v1.json |   86 --
 .../g-sc-G123-1-sample-applications-test.json   |   86 --
 .../sample-applications-test-1.json             |   86 --
 .../sample-applications-test-2.json             |   86 --
 ...scaling-policy-sample-applications-test.json |   14 -
 ...dige-nested-sample-applications-test-v1.json |   50 -
 ...rtrdige-nested-sample-applications-test.json |   50 -
 .../mock/c1-sample-applications-test.json       |   45 -
 .../mock/c2-sample-applications-test.json       |   45 -
 .../mock/c3-sample-applications-test.json       |   45 -
 ...ment-policy-sample-applications-test-v1.json |   36 -
 ...loyment-policy-sample-applications-test.json |   32 -
 ...partition-sample-applications-test-1-v1.json |   28 -
 ...rk-partition-sample-applications-test-1.json |   15 -
 ...rk-partition-sample-applications-test-2.json |   24 -
 ...tion-policy-single-cluster-scaling-test.json |   13 -
 .../single-cluster-scaling-test.json            |   28 -
 ...ling-policy-single-cluster-scaling-test.json |   14 -
 .../mock/c7-single-cluster-scaling-test.json    |   45 -
 ...ment-policy-single-cluster-scaling-test.json |   22 -
 ...k-partition-single-cluster-scaling-test.json |   24 -
 .../src/test/resources/stratos-testing.xml      |   82 --
 .../src/test/resources/tenant/tenant1.json      |    9 -
 .../src/test/resources/tenant/tenant2.json      |    9 -
 .../test-conf/integration-test.properties       |   30 -
 .../src/test/resources/user-test/tenant-1.json  |    9 -
 .../src/test/resources/user-test/user-1-v1.json |    8 -
 .../src/test/resources/user-test/user-1.json    |    8 -
 .../modules/integration/test-common/pom.xml     |  126 +++
 .../integration/common/RestConstants.java       |   63 ++
 .../common/StratosTestServerManager.java        |  619 ++++++++++
 .../integration/common/TopologyHandler.java     |  689 ++++++++++++
 .../apache/stratos/integration/common/Util.java |   84 ++
 .../extensions/StratosServerExtension.java      |  196 ++++
 .../integration/common/rest/ErrorResponse.java  |   56 +
 .../integration/common/rest/HttpResponse.java   |   59 +
 .../common/rest/HttpResponseHandler.java        |   68 ++
 .../common/rest/IntegrationMockClient.java      |  102 ++
 .../integration/common/rest/RestClient.java     |  403 +++++++
 .../common/rest/WebClientWrapper.java           |   62 ++
 .../integration/test-integration/pom.xml        |  226 ++++
 .../tests/StratosIntegrationTest.java           |  108 ++
 .../application/ApplicationBurstingTest.java    |  241 ++++
 .../application/ApplicationUpdateTest.java      |  275 +++++
 .../application/GroupStartupOrderTest.java      |  387 +++++++
 .../GroupTerminationBehaviorTest.java           |  430 +++++++
 .../PartitionOneAfterAnotherClusterTest.java    |  300 +++++
 .../PartitionRoundRobinClusterTest.java         |  312 ++++++
 .../application/SampleApplicationsTest.java     |  261 +++++
 .../application/SingleClusterScalingTest.java   |  373 +++++++
 .../tests/group/CartridgeGroupTest.java         |  149 +++
 .../integration/tests/group/CartridgeTest.java  |  191 ++++
 .../tests/policies/ApplicationPolicyTest.java   |  195 ++++
 .../tests/policies/AutoscalingPolicyTest.java   |  144 +++
 .../tests/policies/DeploymentPolicyTest.java    |  234 ++++
 .../tests/policies/NetworkPartitionTest.java    |  126 +++
 .../integration/tests/users/TenantTest.java     |   42 +
 .../integration/tests/users/UserTest.java       |  114 ++
 ...cation-policy-application-bursting-test.json |   18 +
 .../app-bursting-single-cartriddge-group.json   |   70 ++
 ...caling-policy-application-bursting-test.json |   14 +
 ...esb-php-group-application-bursting-test.json |   19 +
 .../mock/esb-application-bursting-test.json     |   50 +
 .../mock/php-application-bursting-test.json     |   51 +
 .../mock/tomcat-application-bursting-test.json  |   53 +
 ...oyment-policy-application-bursting-test.json |   32 +
 ...k-partition-application-bursting-test-1.json |   15 +
 ...k-partition-application-bursting-test-2.json |   24 +
 ...cation-policy-application-policy-test-1.json |   18 +
 ...cation-policy-application-policy-test-2.json |   18 +
 ...lication-policy-application-policy-test.json |   18 +
 ...ork-partition-application-policy-test-1.json |   24 +
 ...ork-partition-application-policy-test-2.json |   15 +
 ...lication-policy-application-update-test.json |   18 +
 .../g-sc-G123-1-application-update-test-v1.json |   86 ++
 .../g-sc-G123-1-application-update-test.json    |   86 ++
 ...oscaling-policy-application-update-test.json |   14 +
 ...rdige-nested-application-update-test-v1.json |   50 +
 ...artrdige-nested-application-update-test.json |   50 +
 .../mock/c1-application-update-test.json        |   45 +
 .../mock/c2-application-update-test.json        |   45 +
 .../mock/c3-application-update-test.json        |   45 +
 ...yment-policy-application-update-test-v1.json |   36 +
 ...ployment-policy-application-update-test.json |   32 +
 ...-partition-application-update-test-1-v1.json |   28 +
 ...ork-partition-application-update-test-1.json |   15 +
 ...ork-partition-application-update-test-2.json |   24 +
 .../src/test/resources/automation.xml           |  235 ++++
 .../src/test/resources/automationSchema.xsd     |  573 ++++++++++
 ...caling-policy-autoscaling-policy-test-1.json |   14 +
 ...caling-policy-autoscaling-policy-test-2.json |   14 +
 ...aling-policy-autoscaling-policy-test-v1.json |   14 +
 ...oscaling-policy-autoscaling-policy-test.json |   14 +
 .../g4-g5-g6-cartridge-group-test-v1.json       |   50 +
 .../g4-g5-g6-cartridge-group-test.json          |   50 +
 .../group-1-cartridge-group-test.json           |   50 +
 .../group-2-cartridge-group-test.json           |   50 +
 .../mock/c4-cartridge-group-test.json           |   45 +
 .../mock/c5-cartridge-group-test.json           |  124 +++
 .../mock/c6-cartridge-group-test.json           |   45 +
 .../cartridges/mock/c0-cartridge-test-v1.json   |  124 +++
 .../cartridges/mock/c0-cartridge-test.json      |  124 +++
 .../cartridges/mock/c1-cartridge-test.json      |  124 +++
 .../cartridges/mock/c2-cartridge-test.json      |  124 +++
 .../test/resources/common/JMSOutputAdaptor.xml  |   30 +
 .../src/test/resources/common/autoscaler.xml    |   57 +
 .../common/cartridge-config.properties          |   27 +
 .../test/resources/common/cloud-controller.xml  |   81 ++
 .../src/test/resources/common/identity.xml      |  260 +++++
 .../src/test/resources/common/jndi.properties   |   22 +
 .../src/test/resources/common/log4j.properties  |  206 ++++
 .../src/test/resources/common/mock-iaas.xml     |  123 ++
 .../src/test/resources/common/scaling.drl       |  324 ++++++
 .../resources/common/thrift-client-config.xml   |   27 +
 ...loyment-policy-deployment-policy-test-1.json |   32 +
 ...loyment-policy-deployment-policy-test-2.json |   32 +
 ...oyment-policy-deployment-policy-test-v1.json |   36 +
 ...eployment-policy-deployment-policy-test.json |   32 +
 ...k-partition-deployment-policy-test-1-v1.json |   28 +
 ...work-partition-deployment-policy-test-1.json |   15 +
 ...work-partition-deployment-policy-test-2.json |   24 +
 .../src/test/resources/filters.txt              |   16 +
 ...ication-policy-group-startup-order-test.json |   13 +
 .../applications/group-startup-order-test.json  |  206 ++++
 ...scaling-policy-group-startup-order-test.json |   14 +
 .../group6-group-startup-order-test.json        |   44 +
 .../group8-group-startup-order-test.json        |   18 +
 .../mock/esb-group-startup-order-test.json      |   50 +
 .../mock/php-group-startup-order-test.json      |   51 +
 .../stratos-lb-group-startup-order-test.json    |   44 +
 .../mock/tomcat-group-startup-order-test.json   |   53 +
 .../mock/tomcat1-group-startup-order-test.json  |   45 +
 .../mock/tomcat2-group-startup-order-test.json  |   49 +
 .../mock/tomcat3-group-startup-order-test.json  |   31 +
 ...loyment-policy-group-startup-order-test.json |   18 +
 ...rk-partition-group-startup-order-test-1.json |   15 +
 ...rk-partition-group-startup-order-test-2.json |   24 +
 ...-policy-group-termination-behavior-test.json |   17 +
 .../group-termination-behavior-test.json        |  101 ++
 ...-policy-group-termination-behavior-test.json |   14 +
 ...-groups-group-termination-behavior-test.json |   58 +
 .../c1-group-termination-behavior-test.json     |   45 +
 .../c2-group-termination-behavior-test.json     |   45 +
 .../c3-group-termination-behavior-test.json     |   45 +
 .../c4-group-termination-behavior-test.json     |   45 +
 ...-policy-group-termination-behavior-test.json |   18 +
 ...ition-group-termination-behavior-test-1.json |   15 +
 .../src/test/resources/instrumentation.txt      |    1 +
 .../keystores/products/client-truststore.jks    |  Bin 0 -> 37935 bytes
 .../resources/keystores/products/userRP.jks     |  Bin 0 -> 33278 bytes
 .../resources/keystores/products/wso2carbon.jks |  Bin 0 -> 33260 bytes
 ...work-partition-network-partition-test-1.json |   15 +
 ...work-partition-network-partition-test-2.json |   15 +
 ...ork-partition-network-partition-test-v1.json |   28 +
 ...etwork-partition-network-partition-test.json |   15 +
 ...ation-policy-partition-round-robin-test.json |   13 +
 .../partition-round-robin-test.json             |   28 +
 ...aling-policy-partition-round-robin-test.json |   14 +
 .../mock/c7-partition-round-robin-test.json     |   45 +
 ...yment-policy-partition-round-robin-test.json |   22 +
 ...rk-partition-partition-round-robin-test.json |   24 +
 ...ication-policy-sample-applications-test.json |   18 +
 ...g-sc-G123-1-sample-applications-test-v1.json |   86 ++
 .../g-sc-G123-1-sample-applications-test.json   |   86 ++
 .../sample-applications-test-1.json             |   86 ++
 .../sample-applications-test-2.json             |   86 ++
 ...scaling-policy-sample-applications-test.json |   14 +
 ...dige-nested-sample-applications-test-v1.json |   50 +
 ...rtrdige-nested-sample-applications-test.json |   50 +
 .../mock/c1-sample-applications-test.json       |   45 +
 .../mock/c2-sample-applications-test.json       |   45 +
 .../mock/c3-sample-applications-test.json       |   45 +
 ...ment-policy-sample-applications-test-v1.json |   36 +
 ...loyment-policy-sample-applications-test.json |   32 +
 ...partition-sample-applications-test-1-v1.json |   28 +
 ...rk-partition-sample-applications-test-1.json |   15 +
 ...rk-partition-sample-applications-test-2.json |   24 +
 ...tion-policy-single-cluster-scaling-test.json |   13 +
 .../single-cluster-scaling-test.json            |   28 +
 ...ling-policy-single-cluster-scaling-test.json |   14 +
 .../mock/c7-single-cluster-scaling-test.json    |   45 +
 ...ment-policy-single-cluster-scaling-test.json |   22 +
 ...k-partition-single-cluster-scaling-test.json |   24 +
 .../src/test/resources/stratos-testng.xml       |  101 ++
 .../src/test/resources/tenant/tenant1.json      |    9 +
 .../src/test/resources/tenant/tenant2.json      |    9 +
 .../src/test/resources/user-test/tenant-1.json  |    9 +
 .../src/test/resources/user-test/user-1-v1.json |    8 +
 .../src/test/resources/user-test/user-1.json    |    8 +
 341 files changed, 13201 insertions(+), 16089 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index e52aa6f..3c1171f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -395,6 +395,12 @@
     <dependencyManagement>
         <dependencies>
             <dependency>
+                <groupId>org.wso2.carbon</groupId>
+                <artifactId>SecVerifier</artifactId>
+                <type>aar</type>
+                <version>${carbon.kernel.version}</version>
+            </dependency>
+            <dependency>
                 <groupId>junit</groupId>
                 <artifactId>junit</artifactId>
                 <version>${junit.version}</version>
@@ -464,6 +470,57 @@
                 <artifactId>org.wso2.carbon.databridge.core</artifactId>
                 <version>${carbon.analytics.common.version}</version>
             </dependency>
+            <dependency>
+                <groupId>org.apache.commons</groupId>
+                <artifactId>commons-exec</artifactId>
+                <version>${commons.exec.version}</version>
+            </dependency>
+
+            <!-- Automation framework dependencies -->
+            <dependency>
+                <groupId>org.wso2.carbon.automation</groupId>
+                <artifactId>org.wso2.carbon.automation.test.utils</artifactId>
+                <version>${carbon.automation.version}</version>
+                <scope>test</scope>
+            </dependency>
+            <dependency>
+                <groupId>org.wso2.carbon.automation</groupId>
+                <artifactId>org.wso2.carbon.automation.engine</artifactId>
+                <version>${carbon.automation.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.wso2.carbon.automation</groupId>
+                <artifactId>org.wso2.carbon.automation.extensions</artifactId>
+                <version>${carbon.automation.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.wso2.carbon.automationutils</groupId>
+                <artifactId>org.wso2.carbon.integration.common.utils</artifactId>
+                <version>${carbon.automationutils.version}</version>
+                <scope>test</scope>
+            </dependency>
+            <dependency>
+                <groupId>org.wso2.carbon.automationutils</groupId>
+                <artifactId>org.wso2.carbon.integration.common.admin.client</artifactId>
+                <version>${carbon.automationutils.version}</version>
+                <scope>test</scope>
+            </dependency>
+            <dependency>
+                <groupId>org.wso2.carbon.automationutils</groupId>
+                <artifactId>org.wso2.carbon.integration.common.extensions</artifactId>
+                <version>${carbon.automationutils.version}</version>
+                <scope>test</scope>
+            </dependency>
+            <dependency>
+                <groupId>org.testng</groupId>
+                <artifactId>testng</artifactId>
+                <version>${testng.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.jacoco</groupId>
+                <artifactId>org.jacoco.agent</artifactId>
+                <version>${jacoco.agent.version}</version>
+            </dependency>
         </dependencies>
     </dependencyManagement>
 
@@ -683,6 +740,8 @@
         <!-- Carbon related versions -->
         <carbon.kernel.version>4.2.0</carbon.kernel.version>
         <carbon.deployment.version>4.2.3</carbon.deployment.version>
+        <carbon.automation.version>4.4.2</carbon.automation.version>
+        <carbon.automationutils.version>4.4.2</carbon.automationutils.version>
         <carbon.ui.stratos.version>4.2.0-stratosv2</carbon.ui.stratos.version>
         <carbon.p2.plugin.version>1.5.3</carbon.p2.plugin.version>
         <carbon.platform.patch.version.4.2.1>4.2.1</carbon.platform.patch.version.4.2.1>
@@ -739,6 +798,11 @@
         <siddhi.version>2.0.0-wso2v5</siddhi.version>
         <siddhi.event.processor.version>1.0.0</siddhi.event.processor.version>
         <scr.annotations.version>1.9.12</scr.annotations.version>
+        <testng.version>6.1.1</testng.version>
+        <jacoco.agent.version>0.7.4.201502262128</jacoco.agent.version>
+        <commons.exec.version>1.0.1</commons.exec.version>
+        <httpcore.version>4.3.0.wso2v1</httpcore.version>
+        <httpclient.version>4.2.5.wso2v1</httpclient.version>
 
         <!-- OSGi import ranges -->
         <axiom.osgi.version.range>[1.2.11.wso2v4, 1.3.0)</axiom.osgi.version.range>

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/pom.xml
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/pom.xml b/products/stratos/modules/integration/pom.xml
index d04ac0e..1bda132 100755
--- a/products/stratos/modules/integration/pom.xml
+++ b/products/stratos/modules/integration/pom.xml
@@ -1,4 +1,3 @@
-<?xml version="1.0" encoding="UTF-8"?>
 <!--
   ~ Licensed to the Apache Software Foundation (ASF) under one
   ~ or more contributor license agreements.  See the NOTICE file
@@ -17,9 +16,8 @@
   ~ specific language governing permissions and limitations
   ~ under the License.
   -->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.apache.stratos</groupId>
@@ -29,162 +27,12 @@
     </parent>
 
     <artifactId>stratos-integration</artifactId>
-    <name>Apache Stratos - Integration Tests</name>
-    <packaging>jar</packaging>
+    <packaging>pom</packaging>
+    <name>Apache Stratos - Integration Aggregation Module</name>
+    <description>Apache Stratos - Integration Aggregation Module</description>
 
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.commons</groupId>
-            <artifactId>commons-exec</artifactId>
-            <version>1.0.1</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.stratos</groupId>
-            <artifactId>org.apache.stratos.common</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.wso2.carbon</groupId>
-            <artifactId>org.wso2.carbon.integration.framework</artifactId>
-            <version>${carbon.kernel.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.testng</groupId>
-            <artifactId>testng</artifactId>
-            <version>6.1.1</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.axis2.wso2</groupId>
-            <artifactId>axis2-client</artifactId>
-            <version>${axis2.wso2.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.wso2.carbon</groupId>
-            <artifactId>org.wso2.carbon.addressing</artifactId>
-            <version>${carbon.kernel.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.wso2.carbon</groupId>
-            <artifactId>org.wso2.carbon.integration.core</artifactId>
-            <version>${carbon.kernel.version}</version>
-            <classifier>tests</classifier>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.wso2.carbon</groupId>
-            <artifactId>SecVerifier</artifactId>
-            <version>${carbon.kernel.version}</version>
-            <type>aar</type>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.activemq</groupId>
-            <artifactId>activemq-all</artifactId>
-            <version>5.10.0</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.httpcomponents.wso2</groupId>
-            <artifactId>httpcore</artifactId>
-            <version>4.3.0.wso2v1</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.httpcomponents.wso2</groupId>
-            <artifactId>httpclient</artifactId>
-            <version>4.2.5.wso2v1</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.stratos</groupId>
-            <artifactId>org.apache.stratos.messaging</artifactId>
-            <version>${project.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.stratos</groupId>
-            <artifactId>org.apache.stratos.mock.iaas.client</artifactId>
-            <version>${project.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.wso2.andes.wso2</groupId>
-            <artifactId>andes-client</artifactId>
-            <version>0.13.wso2v8</version>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <testResources>
-            <testResource>
-                <directory>src/test/resources/test-conf</directory>
-                <filtering>true</filtering>
-            </testResource>
-            <testResource>
-                <directory>src/test/resources/common</directory>
-                <includes>
-                    <include>**/jndi.properties</include>
-                </includes>
-            </testResource>
-            <testResource>
-                <directory>src/test/resources</directory>
-            </testResource>
-        </testResources>
-        <plugins>
-            <plugin>
-                <artifactId>maven-surefire-plugin</artifactId>
-                <inherited>false</inherited>
-                <configuration>
-                    <systemProperties>
-                        <maven.test.haltafterfailure>false</maven.test.haltafterfailure>
-                        <sec.verifier.dir>${basedir}/target/security-verifier/</sec.verifier.dir>
-                        <extracted.dir>stratos-parent-${project.version}</extracted.dir>
-                        <emma.home>${basedir}/target/emma</emma.home>
-                    </systemProperties>
-                    <suiteXmlFiles>
-                        <suiteXmlFile>src/test/resources/stratos-testing.xml</suiteXmlFile>
-                    </suiteXmlFiles>
-                    <workingDirectory>${basedir}/target</workingDirectory>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <goals>
-                            <goal>test-jar</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-dependency-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>copy-emma-dependencies</id>
-                        <phase>compile</phase>
-                        <goals>
-                            <goal>copy-dependencies</goal>
-                        </goals>
-                        <configuration>
-                            <outputDirectory>${project.build.directory}/emma</outputDirectory>
-                            <includeTypes>jar</includeTypes>
-                            <includeArtifactIds>emma,org.wso2.carbon.integration.framework</includeArtifactIds>
-                        </configuration>
-                    </execution>
-                    <execution>
-                        <id>copy-secVerifier</id>
-                        <phase>compile</phase>
-                        <goals>
-                            <goal>copy-dependencies</goal>
-                        </goals>
-                        <configuration>
-                            <outputDirectory>${basedir}/target/security-verifier</outputDirectory>
-                            <includeTypes>aar</includeTypes>
-                            <includeArtifactIds>SecVerifier</includeArtifactIds>
-                            <stripVersion>true</stripVersion>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
+    <modules>
+        <module>test-common</module>
+        <module>test-integration</module>
+    </modules>
 </project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/RestConstants.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/RestConstants.java b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/RestConstants.java
deleted file mode 100644
index 2f52da6..0000000
--- a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/RestConstants.java
+++ /dev/null
@@ -1,63 +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.integration.tests;
-
-/**
- * Constant class to keep track of rest endpoint context
- */
-public class RestConstants {
-    public static final String API = "api";
-    public static final String AUTOSCALING_POLICIES = "/" + API + "/autoscalingPolicies";
-    public static final String USERS = "/" + API + "/users";
-    public static final String TENANTS = "/" + API + "/tenants";
-    public static final String DEPLOYMENT_POLICIES = "/" + API + "/deploymentPolicies";
-    public static final String NETWORK_PARTITIONS = "/" + API + "/networkPartitions";
-    public static final String CARTRIDGES = "/" + API + "/cartridges";
-    public static final String CARTRIDGE_GROUPS = "/" + API + "/cartridgeGroups";
-    public static final String APPLICATION_POLICIES = "/" + API + "/applicationPolicies";
-    public static final String APPLICATIONS = "/" + API + "/applications";
-    public static final String APPLICATIONS_RUNTIME = "/runtime";
-    public static final String APPLICATIONS_DEPLOY = "/deploy";
-    public static final String APPLICATIONS_UNDEPLOY = "/undeploy";
-
-    public static final String AUTOSCALING_POLICIES_PATH = "/autoscaling-policies/";
-    public static final String AUTOSCALING_POLICIES_NAME = "autoscalingPolicy";
-    public static final String CARTRIDGE_GROUPS_PATH = "/cartridges-groups/";
-    public static final String CARTRIDGE_GROUPS_NAME = "cartridgeGroup";
-    public static final String CARTRIDGES_PATH = "/cartridges/mock/";
-    public static final String CARTRIDGES_NAME = "cartridge";
-    public static final String NETWORK_PARTITIONS_PATH = "/network-partitions/mock/";
-    public static final String NETWORK_PARTITIONS_NAME = "networkPartition";
-    public static final String USERS_NAME = "users";
-    public static final String DEPLOYMENT_POLICIES_PATH = "/deployment-policies/";
-    public static final String DEPLOYMENT_POLICIES_NAME = "deploymentPolicy";
-    public static final String APPLICATIONS_PATH = "/applications/";
-    public static final String APPLICATIONS_NAME = "application";
-    public static final String APPLICATION_POLICIES_PATH = "/application-policies/";
-    public static final String APPLICATION_POLICIES_NAME = "applicationPolicy";
-
-    public static final String TENANT1_RESOURCE ="/tenant/tenant1.json";
-    public static final String TENANT2_RESOURCE ="/tenant/tenant2.json";
-    public static final String TENANT1_GET_RESOURCE ="test1.com";
-    public static final String TENANT2_GET_RESOURCE ="test2.com";
-    public static final String TENANT_API = "/" + API + "/tenants";
-    public static final String TENANTS_NAME = "tenants";
-
-
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/StratosTestServerManager.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/StratosTestServerManager.java b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/StratosTestServerManager.java
deleted file mode 100755
index 52293ba..0000000
--- a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/StratosTestServerManager.java
+++ /dev/null
@@ -1,282 +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.integration.tests;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.commons.io.FileUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.log4j.Level;
-import org.apache.log4j.Logger;
-import org.apache.stratos.common.test.TestLogAppender;
-import org.apache.stratos.integration.tests.rest.IntegrationMockClient;
-import org.apache.stratos.integration.tests.rest.RestClient;
-import org.apache.stratos.messaging.domain.tenant.Tenant;
-import org.testng.annotations.AfterSuite;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.BeforeSuite;
-import org.wso2.carbon.integration.framework.TestServerManager;
-import org.wso2.carbon.integration.framework.utils.FrameworkSettings;
-import org.wso2.carbon.integration.framework.utils.ServerUtils;
-import org.wso2.carbon.integration.framework.utils.TestUtil;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Properties;
-
-import static org.junit.Assert.assertTrue;
-import static org.testng.Assert.assertEquals;
-
-/**
- * Prepare activemq, Stratos server for tests, enables mock iaas, starts servers and stop them after the tests.
- */
-public class StratosTestServerManager extends TestServerManager {
-    private static final Log log = LogFactory.getLog(StratosTestServerManager.class);
-    public static final String PATH_SEP = File.separator;
-    public static final String BASE_PATH = StratosTestServerManager.class.getResource(PATH_SEP).getPath();
-    public static final String CARBON_CONF_PATH = "repository" + PATH_SEP + "conf";
-    public static final String STRATOS_DISTRIBUTION_NAME = "distribution.path";
-    public final static String PORT_OFFSET = "carbon.port.offset";
-    public static final String ACTIVEMQ_BIND_ADDRESS = "activemq.bind.address";
-    public static final String STRATOS_ENDPOINT = "stratos.endpoint";
-    public static final String ADMIN_USERNAME = "stratos.admin.username";
-    public static final String ADMIN_PASSWORD = "stratos.admin.password";
-    private static final String TENANT1_USER_NAME = "stratos.tenant1.username";
-    private static final String TENANT1_PASSWD = "stratos.tenant1.password";
-    private static final String TENANT2_USER_NAME = "stratos.tenant2.username";
-    private static final String TENANT2_PASSWD = "stratos.tenant2.password";
-    public static final String MOCK_IAAS_XML_FILENAME = "mock-iaas.xml";
-    public static final String SCALING_DROOL_FILENAME = "scaling.drl";
-    public static final String JNDI_PROPERTIES_FILENAME = "jndi.properties";
-    public static final String JMS_OUTPUT_ADAPTER_FILENAME = "JMSOutputAdaptor.xml";
-    private static final String LOG4J_PROPERTIES_FILENAME = "log4j.properties";
-
-    private static Properties integrationProperties;
-    protected String distributionName;
-    protected int portOffset;
-    protected String adminUsername;
-    protected String adminPassword;
-    protected String tenant1UserName;
-    protected String tenant1Password;
-    protected String tenant2UserName;
-    protected String tenant2Password;
-    protected String stratosEndpoint;
-    protected String activemqBindAddress;
-    protected RestClient restClientAdmin;
-    private BrokerService broker = new BrokerService();
-    private TestLogAppender testLogAppender = new TestLogAppender();
-    private ServerUtils serverUtils;
-    protected IntegrationMockClient mockIaasApiClient;
-    protected RestClient restClientTenant1;
-    protected RestClient restClientTenant2;
-    protected int tenant1Id;
-    protected int tenant2Id;
-
-    public StratosTestServerManager() {
-        super(BASE_PATH + getIntegrationTestProperty(STRATOS_DISTRIBUTION_NAME),
-                Integer.parseInt(getIntegrationTestProperty(PORT_OFFSET)));
-
-        distributionName = integrationProperties.getProperty(STRATOS_DISTRIBUTION_NAME);
-        portOffset = Integer.parseInt(integrationProperties.getProperty(PORT_OFFSET));
-        adminUsername = integrationProperties.getProperty(ADMIN_USERNAME);
-        adminPassword = integrationProperties.getProperty(ADMIN_PASSWORD);
-        tenant1UserName = integrationProperties.getProperty(TENANT1_USER_NAME);
-        tenant1Password = integrationProperties.getProperty(TENANT1_PASSWD);
-        tenant2UserName = integrationProperties.getProperty(TENANT2_USER_NAME);
-        tenant2Password = integrationProperties.getProperty(TENANT2_PASSWD);
-        stratosEndpoint = integrationProperties.getProperty(STRATOS_ENDPOINT);
-        activemqBindAddress = integrationProperties.getProperty(ACTIVEMQ_BIND_ADDRESS);
-        serverUtils = new ServerUtils();
-        mockIaasApiClient = new IntegrationMockClient(stratosEndpoint + "/mock-iaas/api");
-        restClientAdmin = new RestClient(stratosEndpoint, adminUsername, adminPassword);
-        restClientTenant1 = new RestClient(stratosEndpoint, tenant1UserName, tenant1Password);
-        restClientTenant2 = new RestClient(stratosEndpoint, tenant2UserName, tenant2Password);
-    }
-
-    private static String getIntegrationTestProperty(String key) {
-        if (integrationProperties == null) {
-            integrationProperties = new Properties();
-            try {
-                integrationProperties
-                        .load(StratosTestServerManager.class.getResourceAsStream("/integration-test.properties"));
-                log.info("Stratos integration properties: " + integrationProperties.toString());
-            }
-            catch (IOException e) {
-                log.error("Error loading integration-test.properties file from classpath. Please make sure that file " +
-                        "exists in classpath.", e);
-            }
-        }
-        return integrationProperties.getProperty(key);
-    }
-
-    @Override
-    @BeforeSuite(timeOut = 600000)
-    public String startServer() throws IOException {
-        Logger.getRootLogger().addAppender(testLogAppender);
-        Logger.getRootLogger().setLevel(Level.INFO);
-
-        try {
-            // Start ActiveMQ
-            long time1 = System.currentTimeMillis();
-            log.info("Starting ActiveMQ...");
-            broker.setDataDirectory(StratosTestServerManager.class.getResource("/").getPath() +
-                    File.separator + ".." + File.separator + "activemq-data");
-            broker.setBrokerName("testBroker");
-            broker.addConnector(activemqBindAddress);
-            broker.start();
-            long time2 = System.currentTimeMillis();
-            log.info(String.format("ActiveMQ started in %d sec", (time2 - time1) / 1000));
-        }
-        catch (Exception e) {
-            throw new RuntimeException("Could not start ActiveMQ", e);
-        }
-
-        try {
-            log.info("Setting up Stratos server...");
-            long time3 = System.currentTimeMillis();
-            String carbonZip = getCarbonZip();
-            if (carbonZip == null) {
-                carbonZip = System.getProperty("carbon.zip");
-            }
-
-            if (carbonZip == null) {
-                throw new IllegalArgumentException("carbon zip file is null");
-            } else {
-                String carbonHome = this.serverUtils.setUpCarbonHome(carbonZip);
-                TestUtil.copySecurityVerificationService(carbonHome);
-                this.copyArtifacts(carbonHome);
-                log.info("Stratos server setup completed");
-
-                log.info("Starting Stratos server...");
-                this.serverUtils.startServerUsingCarbonHome(carbonHome, carbonHome, "stratos", portOffset, null);
-                FrameworkSettings.init();
-
-                while (!serverStarted()) {
-                    log.info("Waiting for topology to be initialized...");
-                    Thread.sleep(5000);
-                }
-
-                while (!mockServiceStarted()) {
-                    log.info("Waiting for mock service to be initialized...");
-                    Thread.sleep(1000);
-                }
-
-                long time4 = System.currentTimeMillis();
-                log.info(String.format("Stratos server started in %d sec", (time4 - time3) / 1000));
-                createTenants();
-                return carbonHome;
-            }
-        }
-        catch (Exception e) {
-            throw new RuntimeException("Could not start Stratos server", e);
-        }
-    }
-
-    private void createTenants() {
-        log.info("Added tenants to the testing suit");
-        boolean addedTenant1 = restClientAdmin
-                .addEntity(RestConstants.TENANT1_RESOURCE, RestConstants.TENANT_API, RestConstants.TENANTS_NAME);
-        assertEquals(addedTenant1, true);
-        boolean addedTenant2 = restClientAdmin
-                .addEntity(RestConstants.TENANT2_RESOURCE, RestConstants.TENANT_API, RestConstants.TENANTS_NAME);
-        assertEquals(addedTenant2, true);
-    }
-
-
-    @BeforeClass
-    public void getTenantDetails() {
-        Tenant tenant1 = (Tenant) restClientAdmin
-                .getEntity(RestConstants.TENANT_API, RestConstants.TENANT1_GET_RESOURCE, Tenant.class,
-                        RestConstants.TENANTS_NAME);
-        tenant1Id = tenant1.getTenantId();
-        Tenant tenant2 = (Tenant) restClientAdmin
-                .getEntity(RestConstants.TENANT_API, RestConstants.TENANT2_GET_RESOURCE, Tenant.class,
-                        RestConstants.TENANTS_NAME);
-        tenant2Id = tenant2.getTenantId();
-    }
-
-    private boolean mockServiceStarted() {
-        for (String message : testLogAppender.getMessages()) {
-            if (message.contains("Mock IaaS service component activated")) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    @Override
-    @AfterSuite(timeOut = 600000)
-    public void stopServer() throws Exception {
-        super.stopServer();
-       /*
-       while (!serverStopped()) {
-            log.info("Waiting for server to be shutdown...");
-            Thread.sleep(1000);
-        }
-        log.info("Stopped Apache Stratos server.");
-        */
-        broker.stop();
-        log.info("Stopped ActiveMQ server.");
-    }
-
-    protected void copyArtifacts(String carbonHome) throws IOException {
-        String commonResourcesPath = BASE_PATH + PATH_SEP + ".." + PATH_SEP + ".." + PATH_SEP + "src" + PATH_SEP +
-                "test" + PATH_SEP + "resources" + PATH_SEP + "common";
-        copyConfigFile(carbonHome, commonResourcesPath, MOCK_IAAS_XML_FILENAME, CARBON_CONF_PATH);
-        copyConfigFile(carbonHome, commonResourcesPath, JNDI_PROPERTIES_FILENAME, CARBON_CONF_PATH);
-        copyConfigFile(carbonHome, commonResourcesPath, LOG4J_PROPERTIES_FILENAME, CARBON_CONF_PATH);
-        //copyConfigFile(carbonHome, commonResourcesPath, SCALING_DROOL_FILENAME, CARBON_CONF_PATH + PATH_SEP +
-        //      "drools");
-        copyConfigFile(carbonHome, commonResourcesPath, JMS_OUTPUT_ADAPTER_FILENAME,
-                "repository" + PATH_SEP + "deployment" + PATH_SEP + "server" + PATH_SEP + "outputeventadaptors");
-    }
-
-    private void copyConfigFile(String carbonHome, String filePath, String fileName, String destinationFolder)
-            throws
-            IOException {
-
-        String fileAbsPath = filePath + PATH_SEP + fileName;
-        log.info("Copying file: " + fileAbsPath);
-        File srcFile = new File(fileAbsPath);
-        assertTrue(srcFile.exists());
-        File destFile = new File(carbonHome + PATH_SEP + destinationFolder + PATH_SEP + fileName);
-        FileUtils.copyFile(srcFile, destFile);
-        log.info("Copying file [source] " + srcFile.getAbsolutePath() + " to [dest] " + destFile.getAbsolutePath());
-    }
-
-    private boolean serverStopped() {
-        for (String message : testLogAppender.getMessages()) {
-            if (message.contains("Halting JVM")) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-
-    private boolean serverStarted() {
-        for (String message : testLogAppender.getMessages()) {
-            if (message.contains("Topology initialized")) {
-                return true;
-            }
-        }
-        return false;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/TopologyHandler.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/TopologyHandler.java b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/TopologyHandler.java
deleted file mode 100644
index a8e516f..0000000
--- a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/TopologyHandler.java
+++ /dev/null
@@ -1,666 +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.integration.tests;
-
-import org.apache.commons.lang.StringUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.autoscaler.stub.pojo.ApplicationContext;
-import org.apache.stratos.common.client.AutoscalerServiceClient;
-import org.apache.stratos.common.threading.StratosThreadPool;
-import org.apache.stratos.integration.tests.rest.IntegrationMockClient;
-import org.apache.stratos.messaging.domain.application.*;
-import org.apache.stratos.messaging.domain.instance.ClusterInstance;
-import org.apache.stratos.messaging.domain.instance.GroupInstance;
-import org.apache.stratos.messaging.domain.topology.Cluster;
-import org.apache.stratos.messaging.domain.topology.Member;
-import org.apache.stratos.messaging.domain.topology.MemberStatus;
-import org.apache.stratos.messaging.domain.topology.Service;
-import org.apache.stratos.messaging.event.Event;
-import org.apache.stratos.messaging.event.application.*;
-import org.apache.stratos.messaging.event.topology.*;
-import org.apache.stratos.messaging.listener.application.*;
-import org.apache.stratos.messaging.listener.topology.*;
-import org.apache.stratos.messaging.message.receiver.application.ApplicationManager;
-import org.apache.stratos.messaging.message.receiver.application.ApplicationsEventReceiver;
-import org.apache.stratos.messaging.message.receiver.topology.TopologyEventReceiver;
-import org.apache.stratos.messaging.message.receiver.topology.TopologyManager;
-
-import java.io.File;
-import java.rmi.RemoteException;
-import java.util.Collection;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ExecutorService;
-
-import static junit.framework.Assert.*;
-
-/**
- * To start the Topology receivers
- */
-public class TopologyHandler {
-    private static final Log log = LogFactory.getLog(TopologyHandler.class);
-
-
-    public static final int APPLICATION_ACTIVATION_TIMEOUT = 400000;
-    public static final int APPLICATION_UNDEPLOYMENT_TIMEOUT = 60000;
-    public static final int APPLICATION_TOPOLOGY_TIMEOUT = 60000;
-
-    public static final String APPLICATION_STATUS_CREATED = "Created";
-    public static final String APPLICATION_STATUS_UNDEPLOYING = "Undeploying";
-    private ApplicationsEventReceiver applicationsEventReceiver;
-    private TopologyEventReceiver topologyEventReceiver;
-    public static TopologyHandler topologyHandler;
-    private Map<String, Long> terminatedMembers = new ConcurrentHashMap<String, Long>();
-    private Map<String, Long> terminatingMembers = new ConcurrentHashMap<String, Long>();
-    private Map<String, Long> createdMembers = new ConcurrentHashMap<String, Long>();
-    private Map<String, Long> inActiveMembers = new ConcurrentHashMap<String, Long>();
-    private Map<String, Long> activateddMembers = new ConcurrentHashMap<String, Long>();
-
-    private TopologyHandler() {
-        // Set jndi.properties.dir system property for initializing event receivers
-        System.setProperty("jndi.properties.dir", getResourcesFolderPath());
-        System.setProperty("autoscaler.service.url", "https://localhost:9443/services/AutoscalerService");
-        initializeApplicationEventReceiver();
-        initializeTopologyEventReceiver();
-        assertApplicationTopologyInitialized();
-        assertTopologyInitialized();
-        addTopologyEventListeners();
-        addApplicationEventListeners();
-    }
-
-    public static TopologyHandler getInstance() {
-        if (topologyHandler == null) {
-            synchronized (TopologyHandler.class) {
-                if (topologyHandler == null) {
-                    topologyHandler = new TopologyHandler();
-                }
-            }
-        }
-        return topologyHandler;
-    }
-
-
-    /**
-     * Initialize application event receiver
-     */
-    private void initializeApplicationEventReceiver() {
-        if (applicationsEventReceiver == null) {
-            applicationsEventReceiver = new ApplicationsEventReceiver();
-            ExecutorService executorService = StratosThreadPool.getExecutorService("STRATOS_TEST_SERVER", 1);
-            applicationsEventReceiver.setExecutorService(executorService);
-            applicationsEventReceiver.execute();
-        }
-    }
-
-    /**
-     * Initialize Topology event receiver
-     */
-    private void initializeTopologyEventReceiver() {
-        if (topologyEventReceiver == null) {
-            topologyEventReceiver = new TopologyEventReceiver();
-            ExecutorService executorService = StratosThreadPool.getExecutorService("STRATOS_TEST_SERVER1", 1);
-            topologyEventReceiver.setExecutorService(executorService);
-            topologyEventReceiver.execute();
-        }
-    }
-
-    /**
-     * Assert application Topology initialization
-     */
-    private void assertApplicationTopologyInitialized() {
-        long startTime = System.currentTimeMillis();
-        boolean applicationTopologyInitialized = ApplicationManager.getApplications().isInitialized();
-        while (!applicationTopologyInitialized) {
-            try {
-                Thread.sleep(1000);
-            } catch (InterruptedException ignore) {
-            }
-            applicationTopologyInitialized = ApplicationManager.getApplications().isInitialized();
-            if ((System.currentTimeMillis() - startTime) > APPLICATION_TOPOLOGY_TIMEOUT) {
-                break;
-            }
-        }
-        assertEquals(String.format("Application Topology didn't get initialized "), applicationTopologyInitialized, true);
-    }
-
-    /**
-     * Assert Topology initialization
-     */
-    private void assertTopologyInitialized() {
-        long startTime = System.currentTimeMillis();
-        boolean topologyInitialized = TopologyManager.getTopology().isInitialized();
-        while (!topologyInitialized) {
-            try {
-                Thread.sleep(1000);
-            } catch (InterruptedException ignore) {
-            }
-            topologyInitialized = TopologyManager.getTopology().isInitialized();
-            if ((System.currentTimeMillis() - startTime) > APPLICATION_TOPOLOGY_TIMEOUT) {
-                break;
-            }
-        }
-        assertEquals(String.format("Topology didn't get initialized "), topologyInitialized, true);
-    }
-
-    /**
-     * Assert application activation
-     *
-     * @param tenantId
-     * @param applicationName
-     */
-    public void assertApplicationStatus(String applicationName, ApplicationStatus status, int tenantId) {
-        long startTime = System.currentTimeMillis();
-        Application application = ApplicationManager.getApplications().getApplicationByTenant(applicationName, tenantId);
-        while (!((application != null) && (application.getStatus() == status))) {
-            try {
-                Thread.sleep(1000);
-            } catch (InterruptedException ignore) {
-            }
-            application = ApplicationManager.getApplications().getApplicationByTenant(applicationName,tenantId);
-            if ((System.currentTimeMillis() - startTime) > APPLICATION_ACTIVATION_TIMEOUT) {
-                break;
-            }
-        }
-        assertNotNull(String.format("Application is not found: [application-id] %s", applicationName), application);
-        assertEquals(String.format("Application status did not change to %s: [application-id] %s",
-                        status.toString(), applicationName),
-                status, application.getStatus());
-    }
-
-    public Application getApplication(String applicationName, int tenantId) {
-        return ApplicationManager.getApplications().getApplicationByTenant(applicationName, tenantId);
-    }
-
-    public void assertApplicationForNonAvailability(String applicationName,  int tenantId) {
-
-        Application application = ApplicationManager.getApplications().getApplicationByTenant(applicationName, tenantId);
-        assertNull(String.format("Application is found for other tenant : [application-id] %s", applicationName),application);
-    }
-
-    /**
-     * Assert application activation
-     *
-     * @param applicationName
-     * @param tenantId
-     */
-    public void assertGroupActivation(String applicationName, int tenantId) {
-        Application application = ApplicationManager.getApplications().getApplicationByTenant(applicationName, tenantId);
-        assertNotNull(String.format("Application is not found: [application-id] %s",
-                applicationName), application);
-
-        Collection<Group> groups = application.getAllGroupsRecursively();
-        for (Group group : groups) {
-            assertEquals(group.getInstanceContextCount() >= group.getGroupMinInstances(), true);
-        }
-    }
-
-    /**
-     * Assert application activation
-     *
-     * @param applicationName
-     * @param tenantId
-     */
-    public void assertClusterActivation(String applicationName, int tenantId) {
-        Application application = ApplicationManager.getApplications().getApplicationByTenant(applicationName, tenantId);
-        assertNotNull(String.format("Application is not found: [application-id] %s",
-                applicationName), application);
-
-        Set<ClusterDataHolder> clusterDataHolderSet = application.getClusterDataRecursively();
-        for (ClusterDataHolder clusterDataHolder : clusterDataHolderSet) {
-            String serviceUuid = clusterDataHolder.getServiceUuid();
-            String clusterId = clusterDataHolder.getClusterId();
-            Service service = TopologyManager.getTopology().getService(serviceUuid);
-            assertNotNull(String.format("Service is not found: [application-id] %s [service] %s",
-                    applicationName, serviceUuid), service);
-
-            Cluster cluster = service.getCluster(clusterId);
-            assertNotNull(String.format("Cluster is not found: [application-id] %s [service] %s [cluster-id] %s",
-                    applicationName, serviceUuid, clusterId), cluster);
-            boolean clusterActive = false;
-
-            for (ClusterInstance instance : cluster.getInstanceIdToInstanceContextMap().values()) {
-                int activeInstances = 0;
-                for (Member member : cluster.getMembers()) {
-                    if (member.getClusterInstanceId().equals(instance.getInstanceId())) {
-                        if (member.getStatus().equals(MemberStatus.Active)) {
-                            activeInstances++;
-                        }
-                    }
-                }
-                clusterActive = activeInstances >= clusterDataHolder.getMinInstances();
-
-                if (!clusterActive) {
-                    break;
-                }
-            }
-            assertEquals(String.format("Cluster status did not change to active: [cluster-id] %s", clusterId),
-                    clusterActive, true);
-        }
-
-    }
-
-    /**
-     * Assert application activation
-     *
-     * @param tenantId
-     * @param applicationName
-     */
-
-    public void terminateMemberFromCluster(String cartridgeName, String applicationName, IntegrationMockClient mockIaasApiClient, int tenantId) {
-        Application application = ApplicationManager.getApplications().getApplicationByTenant(applicationName, tenantId);
-        assertNotNull(String.format("Application is not found: [application-id] %s",
-                applicationName), application);
-
-        Set<ClusterDataHolder> clusterDataHolderSet = application.getClusterDataRecursively();
-        for (ClusterDataHolder clusterDataHolder : clusterDataHolderSet) {
-            String serviceUuid = clusterDataHolder.getServiceUuid();
-            if(cartridgeName.equals(serviceUuid)) {
-                String clusterId = clusterDataHolder.getClusterId();
-                Service service = TopologyManager.getTopology().getService(serviceUuid);
-                assertNotNull(String.format("Service is not found: [application-id] %s [service uuid] %s",
-                        applicationName, serviceUuid), service);
-
-                Cluster cluster = service.getCluster(clusterId);
-                assertNotNull(String.format("Cluster is not found: [application-id] %s [service] %s [cluster-id] %s",
-                        applicationName, serviceUuid, clusterId), cluster);
-                boolean memberTerminated = false;
-
-                for (ClusterInstance instance : cluster.getInstanceIdToInstanceContextMap().values()) {
-                    for (Member member : cluster.getMembers()) {
-                        if (member.getClusterInstanceId().equals(instance.getInstanceId())) {
-                            if (member.getStatus().equals(MemberStatus.Active)) {
-                                mockIaasApiClient.terminateInstance(member.getMemberId());
-                                memberTerminated = true;
-                                break;
-                            }
-                        }
-                    }
-
-                    if(memberTerminated) {
-                        break;
-                    }
-
-                }
-                assertTrue("Any member couldn't be terminated from the mock IaaS client", memberTerminated);
-            }
-
-        }
-
-    }
-
-    public void assertClusterMinMemberCount(String applicationName, int minMembers, int tenantId) {
-        long startTime = System.currentTimeMillis();
-
-        Application application = ApplicationManager.getApplications().getApplicationByTenant(applicationName, tenantId);
-        assertNotNull(String.format("Application is not found: [application-id] %s",
-                applicationName), application);
-
-        Set<ClusterDataHolder> clusterDataHolderSet = application.getClusterDataRecursively();
-        for (ClusterDataHolder clusterDataHolder : clusterDataHolderSet) {
-            String serviceName = clusterDataHolder.getServiceUuid();
-            String clusterId = clusterDataHolder.getClusterId();
-            Service service = TopologyManager.getTopology().getService(serviceName);
-            assertNotNull(String.format("Service is not found: [application-id] %s [service] %s",
-                    applicationName, serviceName), service);
-
-            Cluster cluster = service.getCluster(clusterId);
-            assertNotNull(String.format("Cluster is not found: [application-id] %s [service] %s [cluster-id] %s",
-                    applicationName, serviceName, clusterId), cluster);
-            boolean clusterActive = false;
-
-            for (ClusterInstance instance : cluster.getInstanceIdToInstanceContextMap().values()) {
-                int activeInstances = 0;
-                for (Member member : cluster.getMembers()) {
-                    if (member.getClusterInstanceId().equals(instance.getInstanceId())) {
-                        if (member.getStatus().equals(MemberStatus.Active)) {
-                            activeInstances++;
-                        }
-                    }
-                }
-                clusterActive = activeInstances >= minMembers;
-
-                while (!clusterActive) {
-                    try {
-                        Thread.sleep(1000);
-                    } catch (InterruptedException ignore) {
-                    }
-                    service = TopologyManager.getTopology().getService(serviceName);
-                    assertNotNull(String.format("Service is not found: [application-id] %s [service] %s",
-                            applicationName, serviceName), service);
-
-                    cluster = service.getCluster(clusterId);
-                    activeInstances = 0;
-                    for (Member member : cluster.getMembers()) {
-                        if (member.getClusterInstanceId().equals(instance.getInstanceId())) {
-                            if (member.getStatus().equals(MemberStatus.Active)) {
-                                activeInstances++;
-                            }
-                        }
-                    }
-                    clusterActive = activeInstances >= minMembers;
-                    assertNotNull(String.format("Cluster is not found: [application-id] %s [service] %s [cluster-id] %s",
-                            applicationName, serviceName, clusterId), cluster);
-
-                    if ((System.currentTimeMillis() - startTime) > APPLICATION_ACTIVATION_TIMEOUT) {
-                        break;
-                    }
-                }
-            }
-            assertEquals(String.format("Cluster status did not change to active: [cluster-id] %s", clusterId),
-                    clusterActive, true);
-        }
-
-    }
-
-
-    /**
-     * Assert application activation
-     *
-     * @param applicationName
-     * @param tenantId
-     */
-    public boolean assertApplicationUndeploy(String applicationName, int tenantId) {
-        long startTime = System.currentTimeMillis();
-        Application application = ApplicationManager.getApplications().getApplicationByTenant(applicationName, tenantId);
-        ApplicationContext applicationContext = null;
-        try {
-            applicationContext = AutoscalerServiceClient.getInstance().getApplicationByTenant(applicationName,tenantId);
-        } catch (RemoteException e) {
-            log.error("Error while getting the application context for [application] " + applicationName);
-        }
-        while (((application != null) && application.getInstanceContextCount() > 0) ||
-                (applicationContext == null || applicationContext.getStatus().equals(APPLICATION_STATUS_UNDEPLOYING))) {
-            try {
-                Thread.sleep(1000);
-            } catch (InterruptedException ignore) {
-            }
-            application = ApplicationManager.getApplications().getApplicationByTenant(applicationName,tenantId);
-            try {
-                applicationContext = AutoscalerServiceClient.getInstance().getApplicationByTenant(applicationName,tenantId);
-            } catch (RemoteException e) {
-                log.error("Error while getting the application context for [application] " + applicationName);
-            }
-            if ((System.currentTimeMillis() - startTime) > APPLICATION_UNDEPLOYMENT_TIMEOUT) {
-                break;
-            }
-        }
-
-        assertNotNull(String.format("Application is not found: [application-id] %s",
-                applicationName), application);
-        assertNotNull(String.format("Application Context is not found: [application-id] %s",
-                applicationName), applicationContext);
-
-        //Force undeployment after the graceful deployment
-        if (application.getInstanceContextCount() > 0 ||
-                applicationContext.getStatus().equals(APPLICATION_STATUS_UNDEPLOYING)) {
-            return false;
-        }
-        assertEquals(String.format("Application status did not change to Created: [application-id] %s", applicationName),
-                APPLICATION_STATUS_CREATED, applicationContext.getStatus());
-        return true;
-    }
-
-    /**
-     * Assert application activation
-     *
-     * @param tenantId
-     * @param applicationName
-     */
-    public void assertGroupInstanceCount(String applicationName, String groupAlias, int count, int tenantId) {
-        long startTime = System.currentTimeMillis();
-        Application application = ApplicationManager.getApplications().getApplicationByTenant(applicationName, tenantId);
-        if (application != null) {
-            Group group = application.getGroupRecursively(groupAlias);
-            while (group.getInstanceContextCount() != count) {
-                try {
-                    Thread.sleep(1000);
-                } catch (InterruptedException ignore) {
-                }
-                if ((System.currentTimeMillis() - startTime) > APPLICATION_ACTIVATION_TIMEOUT) {
-                    break;
-                }
-            }
-            for (GroupInstance instance : group.getInstanceIdToInstanceContextMap().values()) {
-                while (!instance.getStatus().equals(GroupStatus.Active)) {
-                    try {
-                        Thread.sleep(1000);
-                    } catch (InterruptedException ignore) {
-                    }
-                    if ((System.currentTimeMillis() - startTime) > APPLICATION_ACTIVATION_TIMEOUT) {
-                        break;
-                    }
-                }
-            }
-            assertEquals(String.format("Application status did not change to active: [application-id] %s", applicationName),
-                    group.getInstanceContextCount(), count);
-        }
-        assertNotNull(String.format("Application is not found: [application-id] %s", applicationName), application);
-
-    }
-
-    public void assertApplicationNotExists(String applicationName) {
-        Application application = ApplicationManager.getApplications().getApplication(applicationName);
-        assertNull(String.format("Application is found in the topology : [application-id] %s", applicationName), application);
-    }
-
-    /**
-     * Get resources folder path
-     *
-     * @return
-     */
-    private String getResourcesFolderPath() {
-        String path = getClass().getResource("/").getPath();
-        return StringUtils.removeEnd(path, File.separator);
-    }
-
-    private void addTopologyEventListeners() {
-        topologyEventReceiver.addEventListener(new MemberTerminatedEventListener() {
-            @Override
-            protected void onEvent(Event event) {
-                MemberTerminatedEvent memberTerminatedEvent = (MemberTerminatedEvent) event;
-                getTerminatedMembers().put(memberTerminatedEvent.getMemberId(), System.currentTimeMillis());
-
-            }
-        });
-
-
-        topologyEventReceiver.addEventListener(new ClusterInstanceCreatedEventListener() {
-            @Override
-            protected void onEvent(Event event) {
-                ClusterInstanceCreatedEvent event1 = (ClusterInstanceCreatedEvent) event;
-                String clusterId = event1.getClusterId();
-                getCreatedMembers().put(clusterId, System.currentTimeMillis());
-            }
-        });
-
-        topologyEventReceiver.addEventListener(new ClusterInstanceActivatedEventListener() {
-            @Override
-            protected void onEvent(Event event) {
-                ClusterInstanceActivatedEvent event1 = (ClusterInstanceActivatedEvent) event;
-                String clusterId = event1.getClusterId();
-                getActivateddMembers().put(clusterId, System.currentTimeMillis());
-
-            }
-        });
-
-        topologyEventReceiver.addEventListener(new ClusterInstanceInactivateEventListener() {
-            @Override
-            protected void onEvent(Event event) {
-                ClusterInstanceInactivateEvent event1 = (ClusterInstanceInactivateEvent) event;
-                String clusterId = event1.getClusterId();
-                getInActiveMembers().put(clusterId, System.currentTimeMillis());
-            }
-        });
-
-        topologyEventReceiver.addEventListener(new ClusterInstanceTerminatedEventListener() {
-            @Override
-            protected void onEvent(Event event) {
-                ClusterInstanceTerminatedEvent event1 = (ClusterInstanceTerminatedEvent) event;
-                String clusterId = event1.getClusterId();
-                getTerminatedMembers().put(clusterId, System.currentTimeMillis());
-            }
-        });
-
-        topologyEventReceiver.addEventListener(new ClusterInstanceTerminatingEventListener() {
-            @Override
-            protected void onEvent(Event event) {
-                ClusterInstanceTerminatingEvent event1 = (ClusterInstanceTerminatingEvent) event;
-                String clusterId = event1.getClusterId();
-                getTerminatingMembers().put(clusterId, System.currentTimeMillis());
-            }
-        });
-
-
-    }
-
-    private void addApplicationEventListeners() {
-
-        applicationsEventReceiver.addEventListener(new GroupInstanceCreatedEventListener() {
-            @Override
-            protected void onEvent(Event event) {
-                GroupInstanceCreatedEvent event1 = (GroupInstanceCreatedEvent) event;
-                String appId = event1.getAppId();
-                String groupId = event1.getGroupId();
-                String instanceId = event1.getGroupInstance().getInstanceId();
-                String id = generateId(appId, groupId, instanceId);
-                getCreatedMembers().put(id, System.currentTimeMillis());
-
-            }
-        });
-
-        applicationsEventReceiver.addEventListener(new GroupInstanceActivatedEventListener() {
-            @Override
-            protected void onEvent(Event event) {
-                GroupInstanceActivatedEvent event1 = (GroupInstanceActivatedEvent) event;
-                String appId = event1.getAppId();
-                String groupId = event1.getGroupId();
-                String instanceId = event1.getInstanceId();
-                String id = generateId(appId, groupId, instanceId);
-                getActivateddMembers().put(id, System.currentTimeMillis());
-            }
-        });
-
-        applicationsEventReceiver.addEventListener(new GroupInstanceInactivateEventListener() {
-            @Override
-            protected void onEvent(Event event) {
-                GroupInstanceInactivatedEvent event1 = (GroupInstanceInactivatedEvent) event;
-                String appId = event1.getAppId();
-                String groupId = event1.getGroupId();
-                String instanceId = event1.getInstanceId();
-                String id = generateId(appId, groupId, instanceId);
-                getInActiveMembers().put(id, System.currentTimeMillis());
-            }
-        });
-
-        applicationsEventReceiver.addEventListener(new GroupInstanceTerminatedEventListener() {
-            @Override
-            protected void onEvent(Event event) {
-                GroupInstanceTerminatedEvent event1 = (GroupInstanceTerminatedEvent) event;
-                String appId = event1.getAppId();
-                String groupId = event1.getGroupId();
-                String instanceId = event1.getInstanceId();
-                String id = generateId(appId, groupId, instanceId);
-                getTerminatedMembers().put(id, System.currentTimeMillis());
-            }
-        });
-
-        applicationsEventReceiver.addEventListener(new GroupInstanceTerminatingEventListener() {
-            @Override
-            protected void onEvent(Event event) {
-                GroupInstanceTerminatingEvent event1 = (GroupInstanceTerminatingEvent) event;
-                String appId = event1.getAppId();
-                String groupId = event1.getGroupId();
-                String instanceId = event1.getInstanceId();
-                String id = generateId(appId, groupId, instanceId);
-                getTerminatingMembers().put(id, System.currentTimeMillis());
-            }
-        });
-    }
-
-    public String generateId(String appId, String groupId, String instanceId) {
-        return appId + "-" + groupId + "-" + instanceId;
-    }
-
-    public String getClusterIdFromAlias(String applicationId, String alias,int tenantId) {
-        Application application = ApplicationManager.getApplications().getApplicationByTenant(applicationId,tenantId);
-        assertNotNull(application);
-
-        ClusterDataHolder dataHolder = application.getClusterDataHolderRecursivelyByAlias(alias);
-        assertNotNull(dataHolder);
-
-        return dataHolder.getClusterId();
-    }
-
-
-    public void removeMembersFromMaps(String applicationId) {
-        for(Map.Entry<String, Long> entry: getActivateddMembers().entrySet()) {
-            if(entry.getKey().contains(applicationId)) {
-                getActivateddMembers().remove(entry.getKey());
-            }
-        }
-
-        for(Map.Entry<String, Long> entry: getTerminatedMembers().entrySet()) {
-            if(entry.getKey().contains(applicationId)) {
-                getTerminatedMembers().remove(entry.getKey());
-            }
-        }
-    }
-
-    public Map<String, Long> getTerminatedMembers() {
-        return terminatedMembers;
-    }
-
-    public void setTerminatedMembers(Map<String, Long> terminatedMembers) {
-        this.terminatedMembers = terminatedMembers;
-    }
-
-    public Map<String, Long> getTerminatingMembers() {
-        return terminatingMembers;
-    }
-
-    public void setTerminatingMembers(Map<String, Long> terminatingMembers) {
-        this.terminatingMembers = terminatingMembers;
-    }
-
-    public Map<String, Long> getCreatedMembers() {
-        return createdMembers;
-    }
-
-    public void setCreatedMembers(Map<String, Long> createdMembers) {
-        this.createdMembers = createdMembers;
-    }
-
-    public Map<String, Long> getInActiveMembers() {
-        return inActiveMembers;
-    }
-
-    public void setInActiveMembers(Map<String, Long> inActiveMembers) {
-        this.inActiveMembers = inActiveMembers;
-    }
-
-    public Map<String, Long> getActivateddMembers() {
-        return activateddMembers;
-    }
-
-    public void setActivateddMembers(Map<String, Long> activateddMembers) {
-        this.activateddMembers = activateddMembers;
-    }
-}


[12/21] stratos git commit: Uplifting automation engine to v4.4.3, dynamically pick ports for integration tests

Posted by ra...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/wso2carbon-working.log
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/wso2carbon-working.log b/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/wso2carbon-working.log
deleted file mode 100755
index 2dfb31f..0000000
--- a/products/stratos/modules/integration/src/test/resources/group-startup-order-test/startup-order-termination-behavior/wso2carbon-working.log
+++ /dev/null
@@ -1,1053 +0,0 @@
-TID: [2015-04-22 21:13:10,694]  INFO {org.wso2.carbon.server.extensions.PatchInstaller} -  Patch changes detected  {org.wso2.carbon.server.extensions.PatchInstaller}
-TID: [2015-04-22 21:13:11,008]  INFO {org.wso2.carbon.server.util.PatchUtils.console} -  Backed up plugins to patch0000 {org.wso2.carbon.server.util.PatchUtils.console}
-TID: [2015-04-22 21:13:11,857]  INFO {org.wso2.carbon.server.util.PatchUtils.console} -  Patch verification started {org.wso2.carbon.server.util.PatchUtils.console}
-TID: [2015-04-22 21:13:12,133]  INFO {org.wso2.carbon.server.util.PatchUtils.console} -  Patch verification successfully completed without encountering any issues. {org.wso2.carbon.server.util.PatchUtils.console}
-TID: [0] [STRATOS] [2015-04-22 21:13:16,841]  INFO {org.wso2.carbon.cassandra.dataaccess.DataAccessComponentManager} -  There is no /repository/conf/etc/cassandra-component.xml. Using the default configuration
-TID: [0] [STRATOS] [2015-04-22 21:13:16,877]  INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} -  Starting WSO2 Carbon...
-TID: [0] [STRATOS] [2015-04-22 21:13:16,879]  INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} -  Operating System : Linux 3.13.0-46-generic, amd64
-TID: [0] [STRATOS] [2015-04-22 21:13:16,879]  INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} -  Java Home        : /opt/jdk1.7.0_67/jre
-TID: [0] [STRATOS] [2015-04-22 21:13:16,879]  INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} -  Java Version     : 1.7.0_67
-TID: [0] [STRATOS] [2015-04-22 21:13:16,879]  INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} -  Java VM          : Java HotSpot(TM) 64-Bit Server VM 24.65-b04,Oracle Corporation
-TID: [0] [STRATOS] [2015-04-22 21:13:16,879]  INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} -  Carbon Home      : /opt/wso2/apache-stratos
-TID: [0] [STRATOS] [2015-04-22 21:13:16,880]  INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} -  Java Temp Dir    : /opt/wso2/apache-stratos/tmp
-TID: [0] [STRATOS] [2015-04-22 21:13:16,880]  INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} -  User             : root, en-US, Etc/UTC
-TID: [0] [STRATOS] [2015-04-22 21:13:16,955]  WARN {org.wso2.carbon.core.bootup.validator.SystemValidator} -  Could not validate the system for configuration parameter : CPU
-TID: [0] [STRATOS] [2015-04-22 21:13:16,956]  WARN {org.wso2.carbon.core.bootup.validator.util.ValidationResultPrinter} -  The default keystore (wso2carbon.jks) is currently being used. To maximize security when deploying to a production environment, configure a new keystore with a unique password in the production server profile.
-TID: [0] [STRATOS] [2015-04-22 21:13:16,956]  WARN {org.wso2.carbon.core.bootup.validator.util.ValidationResultPrinter} -  Swap Memory size (MB): 0 of the system is below the recommended minimum size :2048
-TID: [0] [STRATOS] [2015-04-22 21:13:17,021]  INFO {org.wso2.carbon.databridge.agent.thrift.AgentHolder} -  Agent created !
-TID: [0] [STRATOS] [2015-04-22 21:13:17,039]  INFO {org.wso2.carbon.databridge.agent.thrift.internal.AgentDS} -  Successfully deployed Agent Client
-TID: [0] [STRATOS] [2015-04-22 21:13:17,063]  INFO {org.wso2.carbon.event.input.adaptor.core.internal.ds.InputEventAdaptorServiceTrackerDS} -  Successfully deployed the input event adaptor tracker service
-TID: [0] [STRATOS] [2015-04-22 21:13:17,069]  INFO {org.wso2.carbon.event.input.adaptor.jms.internal.ds.JMSEventAdaptorServiceDS} -  Successfully deployed the input jms event adaptor
-TID: [0] [STRATOS] [2015-04-22 21:13:17,074]  INFO {org.wso2.carbon.event.input.adaptor.manager.core.internal.ds.InputEventAdaptorTypeServiceTrackerDS} -  Successfully deployed the input event adaptor type tracker service
-TID: [0] [STRATOS] [2015-04-22 21:13:17,085]  INFO {org.wso2.carbon.event.output.adaptor.cassandra.internal.ds.CassandraEventAdaptorServiceDS} -  Successfully deployed the output cassandra event adaptor service
-TID: [0] [STRATOS] [2015-04-22 21:13:17,089]  INFO {org.wso2.carbon.event.output.adaptor.core.internal.ds.OutputEventAdaptorServiceTrackerDS} -  Successfully deployed the output event adaptor tracker service
-TID: [0] [STRATOS] [2015-04-22 21:13:17,095]  INFO {org.wso2.carbon.event.output.adaptor.http.internal.ds.HTTPEventAdaptorServiceDS} -  Successfully deployed the output HTTP event adaptor service
-TID: [0] [STRATOS] [2015-04-22 21:13:17,101]  INFO {org.wso2.carbon.event.output.adaptor.jms.internal.ds.JMSEventAdaptorServiceDS} -  Successfully deployed the output jms event adaptor service 
-TID: [0] [STRATOS] [2015-04-22 21:13:17,107]  INFO {org.wso2.carbon.event.output.adaptor.manager.core.internal.ds.OutputEventAdaptorTypeServiceTrackerDS} -  Successfully deployed the event adaptor type tracker service
-TID: [0] [STRATOS] [2015-04-22 21:13:17,120]  INFO {org.wso2.carbon.event.output.adaptor.wso2event.internal.ds.WSO2EventAdaptorServiceDS} -  Successfully deployed the output WSO2Event adaptor service
-TID: [0] [STRATOS] [2015-04-22 21:13:17,139]  INFO {org.wso2.carbon.event.input.adaptor.manager.core.internal.ds.InputEventAdaptorManagerDS} -  Successfully deployed the input event adaptor manager service
-TID: [0] [STRATOS] [2015-04-22 21:13:17,139]  INFO {org.wso2.carbon.event.input.adaptor.core.internal.ds.InputEventAdaptorServiceDS} -  Successfully deployed the input event adaptor service
-TID: [0] [STRATOS] [2015-04-22 21:13:17,150]  INFO {org.wso2.carbon.event.output.adaptor.manager.core.internal.ds.OutputEventAdaptorManagerDS} -  Successfully deployed the output event adaptor manager service
-TID: [0] [STRATOS] [2015-04-22 21:13:17,150]  INFO {org.wso2.carbon.event.output.adaptor.core.internal.ds.OutputEventAdaptorServiceDS} -  Successfully deployed the output event adaptor service
-TID: [0] [STRATOS] [2015-04-22 21:13:17,162]  INFO {org.wso2.carbon.event.statistics.internal.ds.EventStatisticsDS} -  Successfully deployed the event statistics monitoring service
-TID: [0] [STRATOS] [2015-04-22 21:13:17,620]  INFO {org.wso2.carbon.social.internal.SocialComponent} -  Social Activity bundle is activated
-TID: [0] [STRATOS] [2015-04-22 21:13:18,407]  INFO {org.wso2.carbon.cassandra.server.internal.CassandraServerDSComponent} -  There is no /repository/conf/etc/cassandra.yaml. Using the default configuration
-TID: [0] [STRATOS] [2015-04-22 21:13:18,451]  INFO {org.wso2.carbon.event.input.adaptor.wso2event.internal.ds.WSO2EventAdaptorServiceDS} -  Successfully deployed the input WSO2Event adaptor service
-TID: [0] [STRATOS] [2015-04-22 21:13:18,453]  INFO {org.wso2.carbon.loggeraggregator.internal.LogAggregator} -  Successfully started Log Aggregator
-TID: [0] [STRATOS] [2015-04-22 21:13:18,453]  INFO {org.wso2.carbon.databridge.core.internal.DataBridgeDS} -  Successfully deployed Agent Server 
-TID: [0] [STRATOS] [2015-04-22 21:13:18,683]  INFO {org.wso2.carbon.registry.core.jdbc.EmbeddedRegistryService} -  Configured Registry in 167ms
-TID: [0] [STRATOS] [2015-04-22 21:13:19,032]  INFO {org.wso2.carbon.registry.core.internal.RegistryCoreServiceComponent} -  Registry Mode    : READ-WRITE
-TID: [0] [STRATOS] [2015-04-22 21:13:19,109]  INFO {org.wso2.carbon.event.output.adaptor.mysql.internal.ds.MysqlEventAdaptorServiceDS} -  Successfully deployed the output mysql event adaptor service
-TID: [0] [STRATOS] [2015-04-22 21:13:19,110]  INFO {org.wso2.carbon.event.processor.siddhi.extension.internal.SiddhiExtensionDS} -  Successfully activated Property Window
-TID: [0] [STRATOS] [2015-04-22 21:13:19,200]  INFO {org.wso2.carbon.event.builder.core.internal.ds.EventBuilderServiceDS} -  Successfully deployed EventBuilderService.
-TID: [0] [STRATOS] [2015-04-22 21:13:19,220]  INFO {org.wso2.carbon.event.formatter.core.internal.ds.EventFormatterServiceDS} -  Successfully deployed EventFormatterService
-TID: [0] [STRATOS] [2015-04-22 21:13:19,221]  INFO {org.wso2.carbon.event.processor.core.internal.ds.EventProcessorServiceDS} -  Successfully deployed EventProcessorService
-TID: [0] [STRATOS] [2015-04-22 21:13:19,221]  INFO {org.wso2.carbon.event.builder.core.internal.ds.EventBuilderServiceDS} -  Successfully deployed EventBuilder EventReceiver.
-TID: [0] [STRATOS] [2015-04-22 21:13:19,281]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:19,340]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :in_flight_requests_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:19,359]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : gradient_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:19,364]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :gradient_in_flight_requests_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:19,381]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : average_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:19,385]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :average_in_flight_requests_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:19,403]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : average_served_request_count:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:19,408]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :average_served_request_count_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:19,425]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : second_derivative_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:19,429]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :second_derivative_in_flight_requests_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:19,445]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : cartridge_agent_health_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:19,450]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :cartridge_agent_health_stats_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:19,466]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : average_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:19,470]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :average_load_average_stats_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:19,487]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : average_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:19,492]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :average_memory_consumption_stats_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:19,509]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : gradient_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:19,514]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :gradient_load_average_stats_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:19,530]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : gradient_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:19,535]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :gradient_memory_consumption_stats_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:19,551]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : second_derivative_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:19,555]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :second_derivative_memory_consumption_stats_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:19,571]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : second_derivative_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:19,576]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :second_derivative_load_average_stats_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:19,592]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : fault_message:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:19,597]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :fault_message_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:19,614]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : member_average_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:19,618]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :member_average_load_average_stats_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:19,635]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : member_average_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:19,640]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :member_average_memory_consumption_stats_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:19,656]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : member_gradient_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:19,661]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :member_gradient_load_average_stats_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:19,679]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : member_gradient_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:19,684]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :member_gradient_memory_consumption_stats_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:19,702]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : member_second_derivative_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:19,707]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :member_second_derivative_memory_consumption_stats_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:19,725]  INFO {org.wso2.carbon.event.stream.manager.core.internal.CarbonEventStreamService} -  Stream definition added to registry successfully : member_second_derivative_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:19,730]  INFO {org.wso2.carbon.event.builder.core.internal.util.helper.EventBuilderConfigurationFileSystemInvoker} -  Event builder configuration saved to the filesystem :member_second_derivative_load_average_stats_1.0.0_builder.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:19,730]  INFO {org.wso2.carbon.event.builder.core.internal.ds.EventBuilderServiceDS} -  Successfully deployed EventBuilder PassthroughReceiverConfigurator.
-TID: [0] [STRATOS] [2015-04-22 21:13:19,732]  INFO {org.wso2.carbon.event.stream.manager.core.internal.ds.EventStreamServiceDS} -  Successfully deployed EventStreamService
-TID: [0] [STRATOS] [2015-04-22 21:13:19,748]  INFO {org.wso2.carbon.identity.application.mgt.internal.ApplicationManagementServiceComponent} -  Identity ApplicationManagementComponent bundle is activated
-TID: [0] [STRATOS] [2015-04-22 21:13:20,286]  INFO {org.wso2.carbon.user.core.internal.UserStoreMgtDSComponent} -  Carbon UserStoreMgtDSComponent activated successfully.
-TID: [0] [STRATOS] [2015-04-22 21:13:25,504]  INFO {org.apache.axis2.deployment.ClusterBuilder} -  Clustering has been disabled
-TID: [0] [STRATOS] [2015-04-22 21:13:25,858]  INFO {org.wso2.carbon.identity.user.store.configuration.deployer.UserStoreConfigurationDeployer} -  User Store Configuration Deployer initiated.
-TID: [0] [STRATOS] [2015-04-22 21:13:25,898]  INFO {org.wso2.carbon.stratos.landing.page.deployer.LandingPageWebappDeployer} -  Deployed product landing page webapp: StandardEngine[Catalina].StandardHost[localhost].StandardContext[/home]
-TID: [0] [STRATOS] [2015-04-22 21:13:25,930]  INFO {org.apache.axis2.transport.tcp.TCPTransportSender} -  TCP Sender started
-TID: [0] [STRATOS] [2015-04-22 21:13:25,951]  INFO {org.wso2.carbon.event.processor.core.internal.CarbonEventProcessorService} -  Execution plan deployment held back and in inactive state: AverageHeathRequest. Event receiver not found for stream ID : cartridge_agent_health_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:25,951]  INFO {org.wso2.carbon.event.processor.core.EventProcessorDeployer} -  Execution plan deployment held back and in inactive state : AverageHeathRequest ,waiting for dependency : cartridge_agent_health_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:25,955]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : AverageInFlightRequestsEventFormatter.xml, waiting for dependency : JMSOutputAdaptor
-TID: [0] [STRATOS] [2015-04-22 21:13:25,956]  INFO {org.wso2.carbon.event.processor.core.internal.CarbonEventProcessorService} -  Execution plan deployment held back and in inactive state: AverageInFlightRequestsFinder. Event receiver not found for stream ID : in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:25,956]  INFO {org.wso2.carbon.event.processor.core.EventProcessorDeployer} -  Execution plan deployment held back and in inactive state : AverageInFlightRequestsFinder ,waiting for dependency : in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:25,957]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : AverageLoadAverageEventFormatter.xml, waiting for dependency : JMSOutputAdaptor
-TID: [0] [STRATOS] [2015-04-22 21:13:25,958]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : AverageMemoryConsumptionEventFormatter.xml, waiting for dependency : JMSOutputAdaptor
-TID: [0] [STRATOS] [2015-04-22 21:13:25,958]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : AverageServedRequestsEventFormatter.xml, waiting for dependency : JMSOutputAdaptor
-TID: [0] [STRATOS] [2015-04-22 21:13:25,962]  INFO {org.wso2.carbon.event.input.adaptor.manager.core.InputEventAdaptorDeployer} -  Input Event Adaptor deployed successfully and in active state : DefaultWSO2EventInputAdaptor
-TID: [0] [STRATOS] [2015-04-22 21:13:25,965]  INFO {org.wso2.carbon.event.output.adaptor.manager.core.OutputEventAdaptorDeployer} -  Output Event Adaptor successfully deployed and in active state : DefaultWSO2EventOutputAdaptor
-TID: [0] [STRATOS] [2015-04-22 21:13:26,018]  INFO {org.wso2.carbon.core.deployment.DeploymentInterceptor} -  Deploying Axis2 service: echo {super-tenant}
-TID: [0] [STRATOS] [2015-04-22 21:13:26,081]  INFO {org.apache.axis2.deployment.DeploymentEngine} -  Deploying Web service: Echo.aar - file:/opt/wso2/apache-stratos/repository/deployment/server/axis2services/Echo.aar
-TID: [0] [STRATOS] [2015-04-22 21:13:26,082]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : FaultMessageEventFormatter.xml, waiting for dependency : JMSOutputAdaptor
-TID: [0] [STRATOS] [2015-04-22 21:13:26,083]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : GradientInFlightRequestsEventFormatter.xml, waiting for dependency : JMSOutputAdaptor
-TID: [0] [STRATOS] [2015-04-22 21:13:26,084]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : GradientLoadAverageEventFormatter.xml, waiting for dependency : JMSOutputAdaptor
-TID: [0] [STRATOS] [2015-04-22 21:13:26,085]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : GradientMemoryConsumptionEventFormatter.xml, waiting for dependency : JMSOutputAdaptor
-TID: [0] [STRATOS] [2015-04-22 21:13:26,086]  INFO {org.wso2.carbon.event.processor.core.internal.CarbonEventProcessorService} -  Execution plan deployment held back and in inactive state: GradientOfHealthRequest. Event receiver not found for stream ID : cartridge_agent_health_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,086]  INFO {org.wso2.carbon.event.processor.core.EventProcessorDeployer} -  Execution plan deployment held back and in inactive state : GradientOfHealthRequest ,waiting for dependency : cartridge_agent_health_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,087]  INFO {org.wso2.carbon.event.processor.core.internal.CarbonEventProcessorService} -  Execution plan deployment held back and in inactive state: GradientOfRequestsInFlightFinder. Event receiver not found for stream ID : in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,087]  INFO {org.wso2.carbon.event.processor.core.EventProcessorDeployer} -  Execution plan deployment held back and in inactive state : GradientOfRequestsInFlightFinder ,waiting for dependency : in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,110]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: cartridge_agent_health_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,113]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:cartridge_agent_health_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,114]  INFO {org.wso2.carbon.event.processor.core.EventProcessorDeployer} -  Execution Plan was undeployed successfully : AverageHeathRequest.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:26,308]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:cartridge_agent_health_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,308]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:average_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,308]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:member_average_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,308]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:member_average_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,309]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:average_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,309]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:fault_message:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,309]  INFO {org.wso2.carbon.event.processor.core.EventProcessorDeployer} -  Execution plan is deployed successfully and in active state  : AverageHeathRequest
-TID: [0] [STRATOS] [2015-04-22 21:13:26,309]  INFO {org.wso2.carbon.event.processor.core.EventProcessorDeployer} -  Execution Plan was undeployed successfully : GradientOfHealthRequest.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:26,401]  INFO {org.apache.stratos.common.threading.StratosThreadPool} -  Thread pool created: [type] Executor Service [id] cep.extension.thread.pool [size] 10
-TID: [0] [STRATOS] [2015-04-22 21:13:26,406]  INFO {org.apache.stratos.cep.extension.CEPTopologyEventReceiver} -  CEP topology event receiver thread started
-TID: [0] [STRATOS] [2015-04-22 21:13:26,406]  INFO {org.apache.stratos.messaging.message.receiver.topology.TopologyEventMessageDelegator} -  Topology event message delegator started
-TID: [0] [STRATOS] [2015-04-22 21:13:26,409]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:cartridge_agent_health_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,410]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:gradient_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,410]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:gradient_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,410]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:member_gradient_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,410]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:member_gradient_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,410]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:fault_message:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,410]  INFO {org.wso2.carbon.event.processor.core.EventProcessorDeployer} -  Execution plan is deployed successfully and in active state  : GradientOfHealthRequest
-TID: [0] [STRATOS] [2015-04-22 21:13:26,413]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : HealthStatisticsEventBuilder
-TID: [0] [STRATOS] [2015-04-22 21:13:26,425]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event builder deployment held back and in inactive state :InstanceStatusStatisticsBuilder, Stream validation exception : Input stream definition is not available 
-TID: [0] [STRATOS] [2015-04-22 21:13:26,426]  INFO {org.wso2.carbon.event.output.adaptor.manager.core.OutputEventAdaptorDeployer} -  Output Event Adaptor successfully deployed and in active state : JMSOutputAdaptor
-TID: [0] [STRATOS] [2015-04-22 21:13:26,427]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : AverageInFlightRequestsEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:26,440]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : AverageInFlightRequestsEventFormatter.xml, waiting for dependency : average_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,440]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : AverageLoadAverageEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:26,452]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:average_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,452]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : AverageLoadAverageEventFormatter
-TID: [0] [STRATOS] [2015-04-22 21:13:26,452]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : AverageMemoryConsumptionEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:26,460]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:average_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,461]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : AverageMemoryConsumptionEventFormatter
-TID: [0] [STRATOS] [2015-04-22 21:13:26,461]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : AverageServedRequestsEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:26,469]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : AverageServedRequestsEventFormatter.xml, waiting for dependency : average_served_request_count:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,469]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : FaultMessageEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:26,476]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:fault_message:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,477]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : FaultMessageEventFormatter
-TID: [0] [STRATOS] [2015-04-22 21:13:26,477]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : GradientInFlightRequestsEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:26,484]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : GradientInFlightRequestsEventFormatter.xml, waiting for dependency : gradient_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,484]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : GradientLoadAverageEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:26,492]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:gradient_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,492]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : GradientLoadAverageEventFormatter
-TID: [0] [STRATOS] [2015-04-22 21:13:26,492]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : GradientMemoryConsumptionEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:26,500]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:gradient_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,500]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : GradientMemoryConsumptionEventFormatter
-TID: [0] [STRATOS] [2015-04-22 21:13:26,508]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,509]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,509]  INFO {org.wso2.carbon.event.processor.core.EventProcessorDeployer} -  Execution Plan was undeployed successfully : AverageInFlightRequestsFinder.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:26,522]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : AverageInFlightRequestsEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:26,526]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:average_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,526]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : AverageRequestsInflightEventFormatter
-TID: [0] [STRATOS] [2015-04-22 21:13:26,527]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : AverageServedRequestsEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:26,530]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:average_served_request_count:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,531]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : AverageServedRequestsEventFormatter
-TID: [0] [STRATOS] [2015-04-22 21:13:26,531]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,531]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:average_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,531]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:average_served_request_count:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,531]  INFO {org.wso2.carbon.event.processor.core.EventProcessorDeployer} -  Execution plan is deployed successfully and in active state  : AverageInFlightRequestsFinder
-TID: [0] [STRATOS] [2015-04-22 21:13:26,531]  INFO {org.wso2.carbon.event.processor.core.EventProcessorDeployer} -  Execution Plan was undeployed successfully : GradientOfRequestsInFlightFinder.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:26,537]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : GradientInFlightRequestsEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:26,541]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:gradient_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,541]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : GradientInFlightRequestsEventFormatter
-TID: [0] [STRATOS] [2015-04-22 21:13:26,541]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,541]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:gradient_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,541]  INFO {org.wso2.carbon.event.processor.core.EventProcessorDeployer} -  Execution plan is deployed successfully and in active state  : GradientOfRequestsInFlightFinder
-TID: [0] [STRATOS] [2015-04-22 21:13:26,541]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : LoadBalancerStatisticsEventBuilder
-TID: [0] [STRATOS] [2015-04-22 21:13:26,549]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:member_average_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,549]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : MemberAverageLoadAverageEventFormatter
-TID: [0] [STRATOS] [2015-04-22 21:13:26,557]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:member_average_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,557]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : MemberAverageMemoryConsumptionEventFormatter
-TID: [0] [STRATOS] [2015-04-22 21:13:26,565]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:member_gradient_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,565]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : MemberGradientLoadAverageEventFormatter
-TID: [0] [STRATOS] [2015-04-22 21:13:26,573]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:member_gradient_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,573]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : MemberGradientMemoryConsumptionEventFormatter
-TID: [0] [STRATOS] [2015-04-22 21:13:26,581]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : MemberSecondDerivativeLoadAverageEventFormatter.xml, waiting for dependency : member_second_derivative_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,588]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : MemberSecondDerivativeMemoryConsumptionEventFormatter.xml, waiting for dependency : member_second_derivative_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,613]  INFO {org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer} -  Deployed webapp: StandardEngine[Catalina].StandardHost[localhost].StandardContext[/STRATOS_ROOT].File[/opt/wso2/apache-stratos/repository/deployment/server/webapps/STRATOS_ROOT]
-TID: [0] [STRATOS] [2015-04-22 21:13:26,625]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : SecondDerivativeInFlightRequestsEventFormatter.xml, waiting for dependency : second_derivative_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,632]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : SecondDerivativeLoadAverageEventFormatter.xml, waiting for dependency : second_derivative_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,641]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter deployment held back and in inactive state : SecondDerivativeMemoryConsumptionEventFormatter.xml, waiting for dependency : second_derivative_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,659]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : SecondDerivativeMemoryConsumptionEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:26,663]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:second_derivative_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,663]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : SecondDerivativeMemoryConsumptionEventFormatter
-TID: [0] [STRATOS] [2015-04-22 21:13:26,664]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : SecondDerivativeLoadAverageEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:26,668]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:second_derivative_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,668]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : SecondDerivativeLoadAverageEventFormatter
-TID: [0] [STRATOS] [2015-04-22 21:13:26,668]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : MemberSecondDerivativeMemoryConsumptionEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:26,672]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:member_second_derivative_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,672]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : MemberSecondDerivativeMemoryConsumptionEventFormatter
-TID: [0] [STRATOS] [2015-04-22 21:13:26,672]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : MemberSecondDerivativeLoadAverageEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:26,676]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:member_second_derivative_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,676]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : MemberSecondDerivativeLoadAverageEventFormatter
-TID: [0] [STRATOS] [2015-04-22 21:13:26,676]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:cartridge_agent_health_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,676]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:second_derivative_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,676]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:second_derivative_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,676]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:member_second_derivative_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,676]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:member_second_derivative_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,676]  INFO {org.wso2.carbon.event.processor.core.EventProcessorDeployer} -  Execution plan is deployed successfully and in active state  : SecondDerivativeOfHealthRequest
-TID: [0] [STRATOS] [2015-04-22 21:13:26,681]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter undeployed successfully : SecondDerivativeInFlightRequestsEventFormatter.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:26,685]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:second_derivative_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,685]  INFO {org.wso2.carbon.event.formatter.core.EventFormatterDeployer} -  Event Formatter configuration successfully deployed and in active state : SecondDerivativeEventFormatter
-TID: [0] [STRATOS] [2015-04-22 21:13:26,685]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Consumer added to the junction. Stream:in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,685]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:second_derivative_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:26,685]  INFO {org.wso2.carbon.event.processor.core.EventProcessorDeployer} -  Execution plan is deployed successfully and in active state  : SecondDerivativeOfRequestsInFlightFinder
-TID: [0] [STRATOS] [2015-04-22 21:13:26,758]  INFO {org.wso2.carbon.core.deployment.DeploymentInterceptor} -  Deploying Axis2 service: Version {super-tenant}
-TID: [0] [STRATOS] [2015-04-22 21:13:26,781]  INFO {org.apache.axis2.deployment.DeploymentEngine} -  Deploying Web service: Version.aar - file:/opt/wso2/apache-stratos/repository/deployment/server/axis2services/Version.aar
-TID: [0] [STRATOS] [2015-04-22 21:13:27,542]  INFO {org.springframework.web.context.support.XmlWebApplicationContext} -  Refreshing Root WebApplicationContext: startup date [Wed Apr 22 21:13:27 UTC 2015]; root of context hierarchy
-TID: [0] [STRATOS] [2015-04-22 21:13:27,626]  INFO {org.springframework.beans.factory.xml.XmlBeanDefinitionReader} -  Loading XML bean definitions from class path resource [META-INF/cxf/cxf.xml]
-TID: [0] [STRATOS] [2015-04-22 21:13:27,696]  INFO {org.springframework.beans.factory.xml.XmlBeanDefinitionReader} -  Loading XML bean definitions from URL [jndi:/localhost/api/WEB-INF/cxf-servlet.xml]
-TID: [0] [STRATOS] [2015-04-22 21:13:27,819]  INFO {org.springframework.beans.factory.support.DefaultListableBeanFactory} -  Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@5f0c5ef9: defining beans [cxf,org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,stratosApi,stratosApiV40,stratosApiV41,stratosApiBeanV40,stratosApiBeanV41,basicAuthenticationFilter,sessionAuthenticationFilter,authorizationFilterV40,authorizationFilterV41,exceptionHandler,badRequestExceptionHandler,genericExceptionHandler,throwableExceptionHandler,componentSynchronizerHandler,OAuthFilter,jsonProvider,schemaHolder,theSchemas]; root of factory hierarchy
-TID: [0] [STRATOS] [2015-04-22 21:13:28,319]  INFO {org.apache.cxf.endpoint.ServerImpl} -  Setting the server's publish address to be /
-TID: [0] [STRATOS] [2015-04-22 21:13:28,432]  INFO {org.apache.cxf.endpoint.ServerImpl} -  Setting the server's publish address to be /v4.0
-TID: [0] [STRATOS] [2015-04-22 21:13:28,455]  INFO {org.apache.cxf.endpoint.ServerImpl} -  Setting the server's publish address to be /v4.1
-TID: [0] [STRATOS] [2015-04-22 21:13:28,487]  WARN {org.apache.cxf.jaxrs.utils.ResourceUtils} -  No resource classpath:META-INF/jax-rs-catalog.xml is available
-TID: [0] [STRATOS] [2015-04-22 21:13:28,511]  INFO {org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer} -  Deployed webapp: StandardEngine[Catalina].StandardHost[localhost].StandardContext[/api].File[/opt/wso2/apache-stratos/repository/deployment/server/webapps/api.war]
-TID: [0] [STRATOS] [2015-04-22 21:13:28,556]  INFO {org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer} -  Deployed webapp: StandardEngine[Catalina].StandardHost[localhost].StandardContext[/authenticationendpoint].File[/opt/wso2/apache-stratos/repository/deployment/server/webapps/authenticationendpoint.war]
-TID: [0] [STRATOS] [2015-04-22 21:13:28,561]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: average_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:28,562]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:average_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:28,562]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : average_in_flight_requests_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 21:13:28,566]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: average_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:28,567]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:average_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:28,568]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : average_load_average_stats_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 21:13:28,571]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: average_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:28,573]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:average_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:28,573]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : average_memory_consumption_stats_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 21:13:28,576]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: average_served_request_count:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:28,578]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:average_served_request_count:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:28,578]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : average_served_request_count_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 21:13:28,581]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : cartridge_agent_health_stats_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 21:13:28,588]  WARN {org.wso2.securevault.secret.handler.SecretManagerSecretCallbackHandler} -  SecretManager has not been initialized.Cannot collect secrets.
-TID: [0] [STRATOS] [2015-04-22 21:13:28,588]  WARN {org.apache.stratos.cloud.controller.config.parser.IaasProviderConfigParser} -  Unable to find a value for identity element from Secure Vault.Hence we will try to assign the plain text value (if specified).
-TID: [0] [STRATOS] [2015-04-22 21:13:28,589]  WARN {org.wso2.securevault.secret.handler.SecretManagerSecretCallbackHandler} -  SecretManager has not been initialized.Cannot collect secrets.
-TID: [0] [STRATOS] [2015-04-22 21:13:28,589]  WARN {org.apache.stratos.cloud.controller.config.parser.IaasProviderConfigParser} -  Unable to find a value for credential element from Secure Vault.Hence we will try to assign the plain text value (if specified).
-TID: [0] [STRATOS] [2015-04-22 21:13:28,589]  INFO {org.apache.stratos.cloud.controller.deployers.CloudControllerDeployer} -  Successfully deployed the cloud-controller XML file located at /opt/wso2/apache-stratos/repository/deployment/server/../../conf/cloud-controller.xml
-TID: [0] [STRATOS] [2015-04-22 21:13:29,344]  INFO {org.jaggeryjs.jaggery.app.mgt.TomcatJaggeryWebappsDeployer} -  Deployed webapp: StandardEngine[Catalina].StandardHost[localhost].StandardContext[/console].File[/opt/wso2/apache-stratos/repository/deployment/server/jaggeryapps/console]
-TID: [0] [STRATOS] [2015-04-22 21:13:29,350]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: fault_message:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:29,351]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:fault_message:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:29,351]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : fault_message_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 21:13:29,356]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: gradient_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:29,357]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:gradient_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:29,358]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : gradient_in_flight_requests_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 21:13:29,362]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: gradient_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:29,364]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:gradient_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:29,364]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : gradient_load_average_stats_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 21:13:29,368]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: gradient_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:29,369]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:gradient_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:29,369]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : gradient_memory_consumption_stats_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 21:13:29,373]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : in_flight_requests_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 21:13:29,377]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: member_average_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:29,379]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:member_average_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:29,379]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : member_average_load_average_stats_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 21:13:29,383]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: member_average_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:29,385]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:member_average_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:29,385]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : member_average_memory_consumption_stats_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 21:13:29,389]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: member_gradient_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:29,390]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:member_gradient_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:29,390]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : member_gradient_load_average_stats_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 21:13:29,394]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: member_gradient_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:29,396]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:member_gradient_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:29,396]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : member_gradient_memory_consumption_stats_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 21:13:29,400]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: member_second_derivative_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:29,402]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:member_second_derivative_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:29,402]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : member_second_derivative_load_average_stats_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 21:13:29,406]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: member_second_derivative_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:29,408]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:member_second_derivative_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:29,408]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : member_second_derivative_memory_consumption_stats_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 21:13:30,125]  INFO {org.springframework.web.context.support.XmlWebApplicationContext} -  Refreshing Root WebApplicationContext: startup date [Wed Apr 22 21:13:30 UTC 2015]; root of context hierarchy
-TID: [0] [STRATOS] [2015-04-22 21:13:30,168]  INFO {org.springframework.beans.factory.xml.XmlBeanDefinitionReader} -  Loading XML bean definitions from class path resource [META-INF/cxf/cxf.xml]
-TID: [0] [STRATOS] [2015-04-22 21:13:30,204]  INFO {org.springframework.beans.factory.xml.XmlBeanDefinitionReader} -  Loading XML bean definitions from URL [jndi:/localhost/metadata/WEB-INF/cxf-servlet.xml]
-TID: [0] [STRATOS] [2015-04-22 21:13:30,299]  INFO {org.springframework.beans.factory.support.DefaultListableBeanFactory} -  Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@47cdc4af: defining beans [cxf,org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,stratosMetaDataAdmin,stratosRestEndpointBean,exceptionHandler,genericExceptionHandler,throwableExceptionHandler,OAuthFilter,jsonProvider]; root of factory hierarchy
-TID: [0] [STRATOS] [2015-04-22 21:13:30,774]  INFO {org.apache.cxf.endpoint.ServerImpl} -  Setting the server's publish address to be /api
-TID: [0] [STRATOS] [2015-04-22 21:13:30,827]  INFO {org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer} -  Deployed webapp: StandardEngine[Catalina].StandardHost[localhost].StandardContext[/metadata].File[/opt/wso2/apache-stratos/repository/deployment/server/webapps/metadata.war]
-TID: [0] [STRATOS] [2015-04-22 21:13:31,529]  INFO {org.springframework.web.context.support.XmlWebApplicationContext} -  Refreshing Root WebApplicationContext: startup date [Wed Apr 22 21:13:31 UTC 2015]; root of context hierarchy
-TID: [0] [STRATOS] [2015-04-22 21:13:31,570]  INFO {org.springframework.beans.factory.xml.XmlBeanDefinitionReader} -  Loading XML bean definitions from class path resource [META-INF/cxf/cxf.xml]
-TID: [0] [STRATOS] [2015-04-22 21:13:31,601]  INFO {org.springframework.beans.factory.xml.XmlBeanDefinitionReader} -  Loading XML bean definitions from URL [jndi:/localhost/mock-iaas/WEB-INF/cxf-servlet.xml]
-TID: [0] [STRATOS] [2015-04-22 21:13:31,685]  INFO {org.springframework.beans.factory.support.DefaultListableBeanFactory} -  Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@3d731d5a: defining beans [cxf,org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,mockIaasApi,mockIaasApiBean,exceptionHandler,badRequestExceptionHandler,genericExceptionHandler,throwableExceptionHandler,jsonProvider]; root of factory hierarchy
-TID: [0] [STRATOS] [2015-04-22 21:13:32,038]  INFO {org.apache.cxf.endpoint.ServerImpl} -  Setting the server's publish address to be /api
-TID: [0] [STRATOS] [2015-04-22 21:13:32,087]  INFO {org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer} -  Deployed webapp: StandardEngine[Catalina].StandardHost[localhost].StandardContext[/mock-iaas].File[/opt/wso2/apache-stratos/repository/deployment/server/webapps/mock-iaas.war]
-TID: [0] [STRATOS] [2015-04-22 21:13:32,861]  INFO {org.springframework.web.context.support.XmlWebApplicationContext} -  Refreshing Root WebApplicationContext: startup date [Wed Apr 22 21:13:32 UTC 2015]; root of context hierarchy
-TID: [0] [STRATOS] [2015-04-22 21:13:32,901]  INFO {org.springframework.beans.factory.xml.XmlBeanDefinitionReader} -  Loading XML bean definitions from class path resource [META-INF/cxf/cxf.xml]
-TID: [0] [STRATOS] [2015-04-22 21:13:32,932]  INFO {org.springframework.beans.factory.xml.XmlBeanDefinitionReader} -  Loading XML bean definitions from URL [jndi:/localhost/oauth2/WEB-INF/cxf-servlet.xml]
-TID: [0] [STRATOS] [2015-04-22 21:13:33,013]  INFO {org.springframework.beans.factory.support.DefaultListableBeanFactory} -  Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@6bbe35d2: defining beans [cxf,org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,tokEP,authzEndpointBean,tokenEndpointBean,revokeEndpointBean,userinfoEndpointBean]; root of factory hierarchy
-TID: [0] [STRATOS] [2015-04-22 21:13:33,348]  INFO {org.apache.cxf.endpoint.ServerImpl} -  Setting the server's publish address to be /
-TID: [0] [STRATOS] [2015-04-22 21:13:33,409]  INFO {org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer} -  Deployed webapp: StandardEngine[Catalina].StandardHost[localhost].StandardContext[/oauth2].File[/opt/wso2/apache-stratos/repository/deployment/server/webapps/oauth2.war]
-TID: [0] [STRATOS] [2015-04-22 21:13:33,416]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: second_derivative_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:33,417]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:second_derivative_in_flight_requests:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:33,417]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : second_derivative_in_flight_requests_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 21:13:33,421]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: second_derivative_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:33,423]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:second_derivative_load_average_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:33,423]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : second_derivative_load_average_stats_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 21:13:33,426]  INFO {org.wso2.carbon.event.processor.core.internal.listener.EventReceiverStreamNotificationListenerImpl} -  Trying to redeploy configuration files for stream: second_derivative_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:33,428]  INFO {org.wso2.carbon.event.processor.core.internal.stream.EventJunction} -  Producer added to the junction. Stream:second_derivative_memory_consumption_stats:1.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:33,428]  INFO {org.wso2.carbon.event.builder.core.EventBuilderDeployer} -  Event Builder deployed successfully and in active state : second_derivative_memory_consumption_stats_1.0.0_builder
-TID: [0] [STRATOS] [2015-04-22 21:13:33,660]  INFO {org.jaggeryjs.jaggery.app.mgt.TomcatJaggeryWebappsDeployer} -  Deployed webapp: StandardEngine[Catalina].StandardHost[localhost].StandardContext[/sso].File[/opt/wso2/apache-stratos/repository/deployment/server/jaggeryapps/sso]
-TID: [0] [STRATOS] [2015-04-22 21:13:33,726]  INFO {org.apache.axis2.deployment.ModuleDeployer} -  Deploying module: addressing-1.6.1-wso2v10 - file:/opt/wso2/apache-stratos/repository/deployment/client/modules/addressing-1.6.1-wso2v10.mar
-TID: [0] [STRATOS] [2015-04-22 21:13:33,730]  INFO {org.apache.axis2.deployment.ModuleDeployer} -  Deploying module: rampart-1.6.1-wso2v8 - file:/opt/wso2/apache-stratos/repository/deployment/client/modules/rampart-1.6.1-wso2v8.mar
-TID: [0] [STRATOS] [2015-04-22 21:13:33,732]  INFO {org.apache.axis2.transport.tcp.TCPTransportSender} -  TCP Sender started
-TID: [0] [STRATOS] [2015-04-22 21:13:33,972]  INFO {org.wso2.carbon.core.deployment.DeploymentInterceptor} -  Deploying Axis2 service: AutoscalerService {super-tenant}
-TID: [0] [STRATOS] [2015-04-22 21:13:34,290]  INFO {org.apache.axis2.deployment.DeploymentEngine} -  Deploying Web service: org.apache.stratos.autoscaler - 
-TID: [0] [STRATOS] [2015-04-22 21:13:34,401]  INFO {org.wso2.carbon.core.deployment.DeploymentInterceptor} -  Deploying Axis2 service: CloudControllerService {super-tenant}
-TID: [0] [STRATOS] [2015-04-22 21:13:34,550]  INFO {org.apache.axis2.deployment.DeploymentEngine} -  Deploying Web service: org.apache.stratos.cloud.controller - 
-TID: [0] [STRATOS] [2015-04-22 21:13:34,573]  INFO {org.wso2.carbon.core.deployment.DeploymentInterceptor} -  Deploying Axis2 service: StratosManagerService {super-tenant}
-TID: [0] [STRATOS] [2015-04-22 21:13:34,693]  INFO {org.apache.axis2.deployment.DeploymentEngine} -  Deploying Web service: org.apache.stratos.manager - 
-TID: [0] [STRATOS] [2015-04-22 21:13:35,228]  WARN {org.apache.axis2.description.java2wsdl.DefaultSchemaGenerator} -  We don't support method overloading. Ignoring [validateAudienceRestriction]
-TID: [0] [STRATOS] [2015-04-22 21:13:35,453]  INFO {org.apache.axis2.deployment.DeploymentEngine} -  Deploying Web service: org.wso2.carbon.idp.mgt - 
-TID: [0] [STRATOS] [2015-04-22 21:13:35,777]  INFO {org.wso2.carbon.core.deployment.DeploymentInterceptor} -  Deploying Axis2 service: wso2carbon-sts {super-tenant}
-TID: [0] [STRATOS] [2015-04-22 21:13:35,820]  INFO {org.apache.axis2.deployment.DeploymentEngine} -  Deploying Web service: org.wso2.carbon.sts - 
-TID: [0] [STRATOS] [2015-04-22 21:13:36,051]  INFO {org.wso2.carbon.core.init.CarbonServerManager} -  Repository       : /opt/wso2/apache-stratos/repository/deployment/server/
-TID: [0] [STRATOS] [2015-04-22 21:13:36,110]  INFO {org.apache.stratos.common.internal.ComponentStartUpSynchronizerImpl} -  Component activation check interval: 1 seconds
-TID: [0] [STRATOS] [2015-04-22 21:13:36,110]  INFO {org.apache.stratos.common.internal.ComponentStartUpSynchronizerImpl} -  Component activation timeout: 600 seconds
-TID: [0] [STRATOS] [2015-04-22 21:13:36,118]  INFO {org.apache.stratos.common.internal.CommonServiceComponent} -  Stratos common service component is activated
-TID: [0] [STRATOS] [2015-04-22 21:13:36,197]  INFO {org.wso2.carbon.core.internal.permission.update.PermissionUpdater} -  Permission cache updated for tenant -1234
-TID: [0] [STRATOS] [2015-04-22 21:13:36,470]  INFO {org.wso2.carbon.databridge.receiver.thrift.internal.ThriftDataReceiver} -  Thrift Server started at 0.0.0.0
-TID: [0] [STRATOS] [2015-04-22 21:13:36,479]  INFO {org.wso2.carbon.databridge.receiver.thrift.internal.ThriftDataReceiver} -  Thrift SSL port : 7711
-TID: [0] [STRATOS] [2015-04-22 21:13:36,483]  INFO {org.wso2.carbon.databridge.receiver.thrift.internal.ThriftDataReceiver} -  Thrift port : 7611
-TID: [0] [STRATOS] [2015-04-22 21:13:36,551]  INFO {org.wso2.carbon.event.input.adaptor.wsevent.local.internal.ds.WSEventLocalEventAdaptorServiceDS} -  Successfully deployed the input WSEventLocal adaptor service
-TID: [0] [STRATOS] [2015-04-22 21:13:36,558]  INFO {org.wso2.carbon.event.output.adaptor.wsevent.local.internal.ds.WSEventLocalEventAdaptorServiceDS} -  Successfully deployed the output WSEventLocal adaptor service
-TID: [0] [STRATOS] [2015-04-22 21:13:36,567]  INFO {org.wso2.carbon.event.input.adaptor.email.internal.ds.EmailEventAdaptorServiceDS} -  Successfully deployed the input email event service
-TID: [0] [STRATOS] [2015-04-22 21:13:36,573]  INFO {org.wso2.carbon.event.input.adaptor.wsevent.internal.ds.WSEventAdaptorServiceDS} -  Successfully deployed the input WSEvent adaptor service
-TID: [0] [STRATOS] [2015-04-22 21:13:36,580]  INFO {org.wso2.carbon.event.output.adaptor.email.internal.ds.EmailEventAdaptorServiceDS} -  Successfully deployed the output Email event adaptor service
-TID: [0] [STRATOS] [2015-04-22 21:13:36,587]  INFO {org.wso2.carbon.event.output.adaptor.sms.internal.ds.SMSEventAdaptorServiceDS} -  Successfully deployed the output SMS event adaptor service
-TID: [0] [STRATOS] [2015-04-22 21:13:36,595]  INFO {org.wso2.carbon.event.output.adaptor.wsevent.internal.ds.WSEventAdaptorServiceDS} -  Successfully deployed the output WSEvent adaptor service
-TID: [0] [STRATOS] [2015-04-22 21:13:36,600]  INFO {org.wso2.carbon.identity.application.mgt.ui.internal.ApplicationMgtUIServiceComponent} -  Application Management UI bundle acticated!
-TID: [0] [STRATOS] [2015-04-22 21:13:36,641]  INFO {org.wso2.carbon.idp.mgt.internal.IdPManagementServiceComponent} -  Identity Application Management Database initialization not attempted since 'setup' variable was not provided during startup
-TID: [0] [STRATOS] [2015-04-22 21:13:36,734]  INFO {org.wso2.carbon.identity.core.internal.IdentityCoreServiceComponent} -  Identity Database schema initialization check was skipped since 'setup' variable was not given during startup
-TID: [0] [STRATOS] [2015-04-22 21:13:36,868]  INFO {org.wso2.carbon.core.transports.http.HttpsTransportListener} -  HTTPS port       : 9443
-TID: [0] [STRATOS] [2015-04-22 21:13:36,868]  INFO {org.wso2.carbon.core.transports.http.HttpTransportListener} -  HTTP port        : 9763
-TID: [0] [STRATOS] [2015-04-22 21:13:36,968]  INFO {org.wso2.carbon.ntask.core.service.impl.TaskServiceImpl} -  Task service starting in STANDALONE mode...
-TID: [0] [STRATOS] [2015-04-22 21:13:37,007]  INFO {org.apache.stratos.common.threading.StratosThreadPool} -  Thread pool created: [type] Executor Service [id] autoscaler.thread.pool [size] 50
-TID: [0] [STRATOS] [2015-04-22 21:13:37,007]  INFO {org.apache.stratos.common.threading.StratosThreadPool} -  Thread pool created: [type] Scheduled Executor Service [id] autoscaler.scheduler.thread.pool [size] 5
-TID: [0] [STRATOS] [2015-04-22 21:13:37,009]  INFO {org.apache.stratos.common.internal.ComponentStartUpSynchronizerImpl} -  Autoscaler component is waiting for CloudController component to become active...
-TID: [0] [STRATOS] [2015-04-22 21:13:37,015]  INFO {org.apache.stratos.common.threading.StratosThreadPool} -  Thread pool created: [type] Executor Service [id] cloud.controller.thread.pool [size] 10
-TID: [0] [STRATOS] [2015-04-22 21:13:37,016]  INFO {org.apache.stratos.common.threading.StratosThreadPool} -  Thread pool created: [type] Scheduled Executor Service [id] cloud.controller.scheduler.thread.pool [size] 5
-TID: [0] [STRATOS] [2015-04-22 21:13:37,019]  INFO {org.apache.stratos.common.threading.StratosThreadPool} -  Thread pool created: [type] Executor Service [id] cloud.controller.context.thread.pool [size] 10
-TID: [0] [STRATOS] [2015-04-22 21:13:37,020]  INFO {org.apache.stratos.common.threading.StratosThreadPool} -  Thread pool created: [type] Executor Service [id] stratos.manager.thread.pool [size] 20
-TID: [0] [STRATOS] [2015-04-22 21:13:37,020]  INFO {org.apache.stratos.common.threading.StratosThreadPool} -  Thread pool created: [type] Scheduled Executor Service [id] stratos.manager.scheduler.thread.pool [size] 5
-TID: [0] [STRATOS] [2015-04-22 21:13:37,021]  INFO {org.apache.stratos.common.internal.ComponentStartUpSynchronizerImpl} -  StratosManager component is waiting for CloudController component to become active...
-TID: [0] [STRATOS] [2015-04-22 21:13:37,025]  INFO {org.apache.stratos.common.threading.StratosThreadPool} -  Thread pool created: [type] Executor Service [id] cloud.controller.instance.manager.thread.pool [size] 50
-TID: [0] [STRATOS] [2015-04-22 21:13:37,040]  INFO {org.apache.stratos.cloud.controller.messaging.receiver.application.ApplicationEventReceiver} -  Cloud controller application event receiver thread started
-TID: [0] [STRATOS] [2015-04-22 21:13:37,043]  INFO {org.apache.stratos.cloud.controller.internal.CloudControllerServiceComponent} -  Application event receiver thread started
-TID: [0] [STRATOS] [2015-04-22 21:13:37,047]  INFO {org.apache.stratos.messaging.message.receiver.application.ApplicationsEventMessageDelegator} -  Application status event message delegator started
-TID: [0] [STRATOS] [2015-04-22 21:13:37,060]  INFO {org.wso2.carbon.core.init.JMXServerManager} -  JMX Service URL  : service:jmx:rmi://localhost:11111/jndi/rmi://localhost:9999/jmxrmi
-TID: [0] [STRATOS] [2015-04-22 21:13:37,061]  INFO {org.wso2.carbon.core.internal.StartupFinalizerServiceComponent} -  Server           :  Apache Stratos-4.1.0
-TID: [0] [STRATOS] [2015-04-22 21:13:37,061]  INFO {org.wso2.carbon.core.internal.StartupFinalizerServiceComponent} -  WSO2 Carbon started in 26 sec
-TID: [0] [STRATOS] [2015-04-22 21:13:37,063]  INFO {org.apache.stratos.cloud.controller.messaging.receiver.cluster.status.ClusterStatusTopicReceiver} -  Cloud controller Cluster status thread started
-TID: [0] [STRATOS] [2015-04-22 21:13:37,063]  INFO {org.apache.stratos.cloud.controller.internal.CloudControllerServiceComponent} -  Cluster status event receiver thread started
-TID: [0] [STRATOS] [2015-04-22 21:13:37,063]  INFO {org.apache.stratos.messaging.message.receiver.cluster.status.ClusterStatusEventMessageDelegator} -  Cluster Status event message delegator started
-TID: [0] [STRATOS] [2015-04-22 21:13:37,087]  INFO {org.apache.stratos.cloud.controller.messaging.receiver.instance.status.InstanceStatusTopicReceiver} -  Cloud controller application status thread started
-TID: [0] [STRATOS] [2015-04-22 21:13:37,091]  INFO {org.apache.stratos.cloud.controller.messaging.receiver.instance.status.InstanceStatusTopicReceiver} -  Cloud controller application status thread terminated
-TID: [0] [STRATOS] [2015-04-22 21:13:37,091]  INFO {org.apache.stratos.cloud.controller.internal.CloudControllerServiceComponent} -  Instance status event receiver thread started
-TID: [0] [STRATOS] [2015-04-22 21:13:37,091]  INFO {org.apache.stratos.cloud.controller.internal.CloudControllerServiceComponent} -  Scheduling topology synchronizer task
-TID: [0] [STRATOS] [2015-04-22 21:13:37,091]  INFO {org.apache.stratos.messaging.message.receiver.instance.status.InstanceStatusEventMessageDelegator} -  Instance notifier event message delegator started
-TID: [0] [STRATOS] [2015-04-22 21:13:37,098]  INFO {org.apache.stratos.common.internal.ComponentStartUpSynchronizerImpl} -  CloudController component became active
-TID: [0] [STRATOS] [2015-04-22 21:13:37,098]  INFO {org.apache.stratos.cloud.controller.internal.CloudControllerServiceComponent} -  Cloud controller service component activated
-TID: [0] [STRATOS] [2015-04-22 21:13:37,577]  INFO {org.wso2.carbon.ui.internal.CarbonUIServiceComponent} -  Mgt Console URL  : https://172.16.2.207:9443/carbon/
-TID: [0] [STRATOS] [2015-04-22 21:13:38,022]  INFO {org.apache.stratos.common.internal.ComponentStartUpSynchronizerImpl} -  StratosManager component is waiting for Autoscaler component to become active...
-TID: [0] [STRATOS] [2015-04-22 21:13:38,037]  INFO {org.apache.stratos.autoscaler.event.receiver.topology.AutoscalerTopologyEventReceiver} -  Autoscaler topology receiver thread started
-TID: [0] [STRATOS] [2015-04-22 21:13:38,038]  INFO {org.apache.stratos.messaging.message.receiver.topology.TopologyEventMessageDelegator} -  Topology event message delegator started
-TID: [0] [STRATOS] [2015-04-22 21:13:53,061]  INFO {org.apache.stratos.autoscaler.event.receiver.health.AutoscalerHealthStatEventReceiver} -  Autoscaler health stat event receiver thread started
-TID: [0] [STRATOS] [2015-04-22 21:13:53,061]  INFO {org.apache.stratos.messaging.message.receiver.health.stat.HealthStatEventMessageDelegator} -  Health stat event message delegator started
-TID: [0] [STRATOS] [2015-04-22 21:13:53,080]  INFO {org.apache.stratos.autoscaler.internal.AutoscalerServiceComponent} -  Scheduling tasks to publish applications
-TID: [0] [STRATOS] [2015-04-22 21:13:53,080]  INFO {org.apache.stratos.common.internal.ComponentStartUpSynchronizerImpl} -  Autoscaler component became active
-TID: [0] [STRATOS] [2015-04-22 21:13:53,080]  INFO {org.apache.stratos.autoscaler.internal.AutoscalerServiceComponent} -  Autoscaler service component activated
-TID: [0] [STRATOS] [2015-04-22 21:13:54,025]  INFO {org.apache.stratos.manager.utils.CartridgeConfigFileReader} -  Setting config properties into System properties
-TID: [0] [STRATOS] [2015-04-22 21:13:54,045]  INFO {org.apache.stratos.manager.internal.StratosManagerServiceComponent} -  Tenant event publisher initialized
-TID: [0] [STRATOS] [2015-04-22 21:13:54,050]  INFO {org.apache.stratos.manager.messaging.receiver.StratosManagerInstanceStatusEventReceiver} -  Stratos manager instance status event receiver thread started
-TID: [0] [STRATOS] [2015-04-22 21:13:54,051]  INFO {org.apache.stratos.messaging.message.receiver.instance.status.InstanceStatusEventMessageDelegator} -  Instance notifier event message delegator started
-TID: [0] [STRATOS] [2015-04-22 21:13:54,116]  INFO {org.apache.stratos.manager.messaging.receiver.StratosManagerTopologyEventReceiver} -  Stratos manager topology event receiver thread started
-TID: [0] [STRATOS] [2015-04-22 21:13:54,116]  INFO {org.apache.stratos.messaging.message.receiver.topology.TopologyEventMessageDelegator} -  Topology event message delegator started
-TID: [0] [STRATOS] [2015-04-22 21:13:54,120]  INFO {org.apache.stratos.manager.messaging.receiver.StratosManagerApplicationEventReceiver} -  Stratos manager application event receiver thread started
-TID: [0] [STRATOS] [2015-04-22 21:13:54,120]  INFO {org.apache.stratos.messaging.message.receiver.application.ApplicationsEventMessageDelegator} -  Application status event message delegator started
-TID: [0] [STRATOS] [2015-04-22 21:13:54,161]  INFO {org.apache.stratos.common.internal.ComponentStartUpSynchronizerImpl} -  StratosManager component became active
-TID: [0] [STRATOS] [2015-04-22 21:13:54,162]  INFO {org.apache.stratos.manager.internal.StratosManagerServiceComponent} -  Stratos manager component is activated
-TID: [0] [STRATOS] [2015-04-22 21:13:54,292]  INFO {org.apache.stratos.messaging.message.processor.topology.CompleteTopologyMessageProcessor} -  Topology initialized
-TID: [0] [STRATOS] [2015-04-22 21:13:54,292]  INFO {org.apache.stratos.messaging.message.processor.topology.CompleteTopologyMessageProcessor} -  Topology initialized
-TID: [0] [STRATOS] [2015-04-22 21:13:54,292]  INFO {org.apache.stratos.messaging.message.processor.topology.CompleteTopologyMessageProcessor} -  Topology initialized
-TID: [0] [STRATOS] [2015-04-22 21:13:54,293]  INFO {org.apache.stratos.autoscaler.event.receiver.topology.AutoscalerTopologyEventReceiver} -  [CompleteTopologyEvent] Received: class org.apache.stratos.messaging.event.topology.CompleteTopologyEvent
-TID: [0] [STRATOS] [2015-04-22 21:14:07,092]  INFO {org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceImpl} -  Adding network partition: [network-partition-id] RegionOne-AZ-1
-TID: [0] [STRATOS] [2015-04-22 21:14:07,092]  INFO {org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceImpl} -  Validating partition: [network-partition-id] RegionOne-AZ-1 [partition-id] RegionOne-AZ-1
-TID: [0] [STRATOS] [2015-04-22 21:14:08,551] ERROR {org.apache.stratos.cloud.controller.iaases.openstack.OpenstackIaas} -  Invalid zone: AZ-1 in the region: RegionOne and of the iaas: Core
-TID: [0] [STRATOS] [2015-04-22 21:14:08,552] ERROR {org.apache.stratos.cloud.controller.iaases.openstack.OpenstackPartitionValidator} -  Invalid partition detected: [partition-id] RegionOne-AZ-1Invalid zone: AZ-1 in the region: RegionOne and of the iaas: Core
-org.apache.stratos.cloud.controller.exception.InvalidZoneException: Invalid zone: AZ-1 in the region: RegionOne and of the iaas: Core
-	at org.apache.stratos.cloud.controller.iaases.openstack.OpenstackIaas.isValidZone(OpenstackIaas.java:289)
-	at org.apache.stratos.cloud.controller.iaases.openstack.OpenstackPartitionValidator.validate(OpenstackPartitionValidator.java:69)
-	at org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceUtil.validatePartitionAndGetIaasProvider(CloudControllerServiceUtil.java:97)
-	at org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceUtil.validatePartition(CloudControllerServiceUtil.java:108)
-	at org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceImpl.validatePartition(CloudControllerServiceImpl.java:1015)
-	at org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceImpl.addNetworkPartition(CloudControllerServiceImpl.java:1432)
-	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
-	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
-	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
-	at java.lang.reflect.Method.invoke(Method.java:606)
-	at org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:212)
-	at org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver.invokeBusinessLogic(RPCInOnlyMessageReceiver.java:66)
-	at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:110)
-	at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
-	at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172)
-	at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:146)
-	at org.wso2.carbon.core.transports.CarbonServlet.doPost(CarbonServlet.java:231)
-	at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)
-	at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
-	at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
-	at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)
-	at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:68)
-	at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
-	at org.wso2.carbon.tomcat.ext.servlet.DelegationServlet.service(DelegationServlet.java:68)
-	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
-	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
-	at org.wso2.carbon.tomcat.ext.filter.CharacterSetFilter.doFilter(CharacterSetFilter.java:61)
-	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
-	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
-	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
-	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
-	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
-	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
-	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
-	at org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:178)
-	at org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47)
-	at org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:56)
-	at org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47)
-	at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:141)
-	at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:156)
-	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
-	at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:52)
-	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
-	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
-	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
-	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
-	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1653)
-	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
-	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
-	at java.lang.Thread.run(Thread

<TRUNCATED>

[04/21] stratos git commit: Uplifting automation engine to v4.4.3, dynamically pick ports for integration tests

Posted by ra...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/application-update-test/cartridges/mock/c3-application-update-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/application-update-test/cartridges/mock/c3-application-update-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/application-update-test/cartridges/mock/c3-application-update-test.json
new file mode 100755
index 0000000..e3932fc
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/application-update-test/cartridges/mock/c3-application-update-test.json
@@ -0,0 +1,45 @@
+{
+    "type": "c3-application-update-test",
+    "provider": "apache",
+    "host": "stratos.apache.org",
+    "category": "data",
+    "displayName": "c3-application-update-test",
+    "description": "c3-application-update-test Cartridge",
+    "version": "7",
+    "multiTenant": "false",
+    "portMapping": [
+        {
+            "name": "http-22",
+            "protocol": "http",
+            "port": "22",
+            "proxyPort": "8280"
+        }
+    ],
+    "deployment": {
+    },
+    "iaasProvider": [
+        {
+            "type": "mock",
+            "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
+            "networkInterfaces": [
+                {
+                    "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e"
+                }
+            ],
+            "property": [
+                {
+                    "name": "instanceType",
+                    "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594"
+                },
+                {
+                    "name": "keyPair",
+                    "value": "vishanth-key"
+                },
+                {
+                    "name": "securityGroups",
+                    "value": "default"
+                }
+            ]
+        }
+    ]
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/application-update-test/deployment-policies/deployment-policy-application-update-test-v1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/application-update-test/deployment-policies/deployment-policy-application-update-test-v1.json b/products/stratos/modules/integration/test-integration/src/test/resources/application-update-test/deployment-policies/deployment-policy-application-update-test-v1.json
new file mode 100644
index 0000000..5dc2081
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/application-update-test/deployment-policies/deployment-policy-application-update-test-v1.json
@@ -0,0 +1,36 @@
+{
+    "id": "deployment-policy-application-update-test",
+    "networkPartitions": [
+        {
+            "id": "network-partition-application-update-test-1",
+            "partitionAlgo": "one-after-another",
+            "partitions": [
+                {
+                    "id": "partition-1",
+                    "partitionMax": 25
+                },
+                {
+                    "id": "partition-2",
+                    "partitionMax": 20
+                }
+            ]
+        },
+        {
+            "id": "network-partition-application-update-test-2",
+            "partitionAlgo": "round-robin",
+            "partitions": [
+                {
+                    "id": "network-partition-2-partition-1",
+                    "partitionMax": 15
+                },
+                {
+                    "id": "network-partition-2-partition-2",
+                    "partitionMax": 5
+                }
+            ]
+        }
+    ]
+}
+
+
+

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/application-update-test/deployment-policies/deployment-policy-application-update-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/application-update-test/deployment-policies/deployment-policy-application-update-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/application-update-test/deployment-policies/deployment-policy-application-update-test.json
new file mode 100644
index 0000000..647322b
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/application-update-test/deployment-policies/deployment-policy-application-update-test.json
@@ -0,0 +1,32 @@
+{
+    "id": "deployment-policy-application-update-test",
+    "networkPartitions": [
+        {
+            "id": "network-partition-application-update-test-1",
+            "partitionAlgo": "one-after-another",
+            "partitions": [
+                {
+                    "id": "partition-1",
+                    "partitionMax": 20
+                }
+            ]
+        },
+        {
+            "id": "network-partition-application-update-test-2",
+            "partitionAlgo": "round-robin",
+            "partitions": [
+                {
+                    "id": "network-partition-2-partition-1",
+                    "partitionMax": 10
+                },
+                {
+                    "id": "network-partition-2-partition-2",
+                    "partitionMax": 9
+                }
+            ]
+        }
+    ]
+}
+
+
+

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/application-update-test/network-partitions/mock/network-partition-application-update-test-1-v1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/application-update-test/network-partitions/mock/network-partition-application-update-test-1-v1.json b/products/stratos/modules/integration/test-integration/src/test/resources/application-update-test/network-partitions/mock/network-partition-application-update-test-1-v1.json
new file mode 100644
index 0000000..aaa3f04
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/application-update-test/network-partitions/mock/network-partition-application-update-test-1-v1.json
@@ -0,0 +1,28 @@
+{
+    "id": "network-partition-application-update-test-1",
+    "provider": "mock",
+    "partitions": [
+        {
+            "id": "partition-1",
+            "property": [
+                {
+                    "name": "region",
+                    "value": "default"
+                }
+            ]
+        },
+        {
+            "id": "partition-2",
+            "property": [
+                {
+                    "name": "region",
+                    "value": "default1"
+                },
+                {
+                    "name": "zone",
+                    "value": "z1"
+                }
+            ]
+        }
+    ]
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/application-update-test/network-partitions/mock/network-partition-application-update-test-1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/application-update-test/network-partitions/mock/network-partition-application-update-test-1.json b/products/stratos/modules/integration/test-integration/src/test/resources/application-update-test/network-partitions/mock/network-partition-application-update-test-1.json
new file mode 100644
index 0000000..f1822af
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/application-update-test/network-partitions/mock/network-partition-application-update-test-1.json
@@ -0,0 +1,15 @@
+{
+    "id": "network-partition-application-update-test-1",
+    "provider": "mock",
+    "partitions": [
+        {
+            "id": "partition-1",
+            "property": [
+                {
+                    "name": "region",
+                    "value": "default"
+                }
+            ]
+        }
+    ]
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/application-update-test/network-partitions/mock/network-partition-application-update-test-2.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/application-update-test/network-partitions/mock/network-partition-application-update-test-2.json b/products/stratos/modules/integration/test-integration/src/test/resources/application-update-test/network-partitions/mock/network-partition-application-update-test-2.json
new file mode 100644
index 0000000..19ddd83
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/application-update-test/network-partitions/mock/network-partition-application-update-test-2.json
@@ -0,0 +1,24 @@
+{
+    "id": "network-partition-application-update-test-2",
+    "provider": "mock",
+    "partitions": [
+        {
+            "id": "network-partition-2-partition-1",
+            "property": [
+                {
+                    "name": "region",
+                    "value": "default"
+                }
+            ]
+        },
+        {
+            "id": "network-partition-2-partition-2",
+            "property": [
+                {
+                    "name": "region",
+                    "value": "default"
+                }
+            ]
+        }
+    ]
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/automation.xml
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/automation.xml b/products/stratos/modules/integration/test-integration/src/test/resources/automation.xml
new file mode 100644
index 0000000..2ff883b
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/automation.xml
@@ -0,0 +1,235 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+  ~  Copyright (c) 2005-2010, WSO2 Inc. (http://wso2.com) All Rights Reserved.
+  ~
+  ~  WSO2 Inc. 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.
+
+-->
+<automation xmlns="automation_mapping.xsd">
+    <!--  =================================================  -->
+    <!--                   Parameters                        -->
+    <!--  =================================================  -->
+    <configurations>
+        <!--
+         Change this to edit wait time for test artifact deployment
+        -->
+        <deploymentDelay>60000</deploymentDelay>
+        <!--
+         Change this to product|platform/cloud to execute test on specific environment
+        -->
+        <executionEnvironment>standalone</executionEnvironment>
+        <!--
+         Change this to true if you want to generate coverage statistics
+        -->
+        <coverage>true</coverage>
+        <!--
+         Change this to true if you want to enable framework dashboard
+        -->
+        <frameworkDashboard>false</frameworkDashboard>
+        <!--
+         Browser type with used by framework to execute UI test, supported types - chrome|firefox|opera|ie|htmlUnit
+        -->
+    </configurations>
+    <tools>
+        <selenium>
+            <!-- Change to enable remote webDriver -->
+            <!-- URL of remote webDriver server  -->
+            <remoteDriverUrl enable="true">http://10.100.2.51:4444/wd/hub/</remoteDriverUrl>
+
+            <!-- Type of the browser selenium tests are running" -->
+            <browser>
+                <browserType>firefox</browserType>
+                <!-- path to webDriver executable - required only for chrome-->
+                <webdriverPath enable="false">/home/test/name/webDriver</webdriverPath>
+            </browser>
+        </selenium>
+    </tools>
+    <!--
+    Database configuration to be used for data service testing. DB configuration in dbs files will be replaced with
+               below configuration at test run time
+    -->
+    <datasources>
+        <datasource name="dataService">
+            <url>jdbc:h2:testDB</url>
+            <username>wso2carbon</username>
+            <password>wso2carbon</password>
+            <driverClassName>org.h2.Driver</driverClassName>
+        </datasource>
+        <datasource name="dataService1">
+            <url>jdbc:h2:testDB</url>
+            <username>wso2carbon</username>
+            <password>wso2carbon</password>
+            <driverClassName>org.h2.Driver</driverClassName>
+        </datasource>
+    </datasources>
+    <security>
+        <!--
+                    KeyStore which will be used for encrypting/decrypting passwords
+                    and other sensitive information.
+        -->
+        <keystore name="wso2">
+            <!--  Keystore file location -->
+            <fileName>keystores/products/wso2carbon.jks</fileName>
+            <!--  Keystore type (JKS/PKCS12 etc.) -->
+            <type>JKS</type>
+            <!--  Keystore password -->
+            <password>wso2carbon</password>
+            <!--  Private Key alias -->
+            <keyAlias>wso2carbon</keyAlias>
+            <!--  Private Key password -->
+            <keyPassword>wso2carbon</keyPassword>
+        </keystore>
+        <!--
+                    System wide trust-store which is used to maintain the certificates of all
+                    the trusted parties.
+        -->
+        <truststore name="wso2">
+            <!--  trust-store file location  -->
+            <fileName>client-truststore.jks</fileName>
+            <!--  trust-store type (JKS/PKCS12 etc.)  -->
+            <type>JKS</type>
+            <!--  trust-store password  -->
+            <password>wso2carbon</password>
+        </truststore>
+    </security>
+    <featureManagement>
+        <p2Repositories>
+            <repository name="localDefault">
+                <repository repo-id="online-repository">https://wso2.org/repo</repository>
+                <repository repo-id="file-repository">file:///home/krishantha/test</repository>
+            </repository>
+        </p2Repositories>
+    </featureManagement>
+    <!--
+               System wide users who to be registered at the test initiation
+    -->
+    <userManagement>
+        <superTenant>
+            <tenant domain="carbon.super" key="superTenant">
+                <admin>
+                    <user key="superAdmin">
+                        <userName>admin</userName>
+                        <password>admin</password>
+                    </user>
+                </admin>
+                <users>
+                    <user key="user1">
+                        <userName>testuser11</userName>
+                        <password>testuser11</password>
+                    </user>
+                    <user key="user2">
+                        <userName>testuser21</userName>
+                        <password>testuser21</password>
+                    </user>
+                    <user key="Registry580UN">
+                        <userName>Registry580UN</userName>
+                        <password>Registry580UN</password>
+                    </user>
+                    <user key="deniedUser">
+                        <userName>deniedUser</userName>
+                        <password>deniedUser</password>
+                    </user>
+                </users>
+            </tenant>
+        </superTenant>
+        <tenants>
+            <!--tenant domain="test1.com" key="test1">
+                <admin>
+                    <user key="admin">
+                        <userName>admin</userName>
+                        <password>admin123</password>
+                    </user>
+                </admin>
+                <users>
+                </users>
+            </tenant>
+            <tenant domain="test2.com" key="test2">
+                <admin>
+                    <user key="admin">
+                        <userName>admin</userName>
+                        <password>admin123</password>
+                    </user>
+                </admin>
+                <users>
+                </users>
+            </tenant-->
+        </tenants>
+    </userManagement>
+    <!--
+   This section will initiate the initial deployment of the platform required by
+   the test suites.
+-->
+    <platform>
+        <!--
+        cluster instance details to be used to platform test execution
+        -->
+        <productGroup name="STRATOS" clusteringEnabled="false" default="true">
+
+            <instance name="stratos-001" type="standalone" nonBlockingTransportEnabled="false">
+                <hosts>
+                    <host type="default">localhost</host>
+                </hosts>
+                <ports>
+                    <port type="http">9863</port>
+                    <port type="https">9543</port>
+                </ports>
+                <properties>
+                </properties>
+            </instance>
+        </productGroup>
+    </platform>
+
+    <listenerExtensions>
+        <platformExecutionManager>
+            <extentionClasses>
+                <class>
+                    <name>org.apache.stratos.integration.common.extensions.StratosServerExtension</name>
+                    <parameter name="-DportOffset" value="100"/>
+                    <parameter name="activemq.bind.address" value="tcp://localhost:61716"/>
+                    <!--<parameter name="cmdArg" value="debug 5005" />-->
+                </class>
+                <!--class>
+                    <name>org.wso2.carbon.integration.common.extensions.usermgt.UserPopulateExtension</name>
+                </class-->
+            </extentionClasses>
+        </platformExecutionManager>
+
+
+        <PlatformSuiteManager>
+            <extentionClasses>
+                <!--<className>org.wso2.carbon.automation.extensions.servers.carbonserver.CarbonServerExtension</className>-->
+            </extentionClasses>
+        </PlatformSuiteManager>
+
+        <PlatformAnnotationTransferManager>
+            <extentionClasses>
+                <!--<className>org.wso2.carbon.automation.extensions.servers.carbonserver.CarbonServerExtension</className>-->
+            </extentionClasses>
+        </PlatformAnnotationTransferManager>
+
+        <PlatformTestManager>
+            <extentionClasses>
+
+            </extentionClasses>
+        </PlatformTestManager>
+
+        <PlatformReportManager>
+            <extentionClasses>
+            </extentionClasses>
+        </PlatformReportManager>
+
+    </listenerExtensions>
+</automation>

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/automationSchema.xsd
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/automationSchema.xsd b/products/stratos/modules/integration/test-integration/src/test/resources/automationSchema.xsd
new file mode 100644
index 0000000..c18b082
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/automationSchema.xsd
@@ -0,0 +1,573 @@
+<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="automation_mapping.xsd"
+           xmlns:xs="http://www.w3.org/2001/XMLSchema">
+    <xs:element name="automation">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element name="configurations">
+                    <xs:annotation>
+                        <xs:documentation>=================================================
+                            Parameters =================================================
+                            Browser type with used by framework to execute UI test, supported types
+                            - chrome|firefox|opera|ie|htmlUnit
+                        </xs:documentation>
+                    </xs:annotation>
+                    <xs:complexType>
+                        <xs:sequence>
+                            <xs:element type="xs:string" name="deploymentDelay">
+                                <xs:annotation>
+                                    <xs:documentation>Change this to edit wait time for test
+                                        artifact deployment
+                                    </xs:documentation>
+                                </xs:annotation>
+                            </xs:element>
+                            <xs:element type="xs:string" name="executionEnvironment">
+                                <xs:annotation>
+                                    <xs:documentation>Change this to product|platform/cloud to
+                                        execute test on specific environment
+                                    </xs:documentation>
+                                </xs:annotation>
+                            </xs:element>
+
+                            <xs:element type="xs:string" name="coverage">
+                                <xs:annotation>
+                                    <xs:documentation>Change this to true if you want to generate
+                                        coverage statistics
+                                    </xs:documentation>
+                                </xs:annotation>
+                            </xs:element>
+                            <xs:element type="xs:string" name="frameworkDashboard">
+                                <xs:annotation>
+                                    <xs:documentation>Change this to true if you want to enable
+                                        framework dashboard
+                                    </xs:documentation>
+                                </xs:annotation>
+                            </xs:element>
+                        </xs:sequence>
+                    </xs:complexType>
+                </xs:element>
+                <xs:element name="tools">
+                    <xs:complexType>
+                        <xs:sequence>
+                            <xs:element name="selenium">
+                                <xs:complexType>
+                                    <xs:sequence>
+                                        <xs:element name="remoteDriverUrl">
+                                            <xs:annotation>
+                                                <xs:documentation>Change to enable remote webDriver
+                                                    URL of remote webDriver server
+                                                </xs:documentation>
+                                            </xs:annotation>
+                                            <xs:complexType>
+                                                <xs:simpleContent>
+                                                    <xs:extension base="xs:anyURI">
+                                                        <xs:attribute type="xs:string"
+                                                                      name="enable"/>
+                                                    </xs:extension>
+                                                </xs:simpleContent>
+                                            </xs:complexType>
+                                        </xs:element>
+                                        <xs:element name="browser">
+                                            <xs:annotation>
+                                                <xs:documentation>Type of the browser selenium tests
+                                                    are running"
+                                                </xs:documentation>
+                                            </xs:annotation>
+                                            <xs:complexType>
+                                                <xs:sequence>
+                                                    <xs:element type="xs:string"
+                                                                name="browserType"/>
+                                                    <xs:element name="webdriverPath">
+                                                        <xs:annotation>
+                                                            <xs:documentation>path to webDriver
+                                                                executable - required only for
+                                                                chrome
+                                                            </xs:documentation>
+                                                        </xs:annotation>
+                                                        <xs:complexType>
+                                                            <xs:simpleContent>
+                                                                <xs:extension base="xs:string">
+                                                                    <xs:attribute type="xs:string"
+                                                                                  name="enable"/>
+                                                                </xs:extension>
+                                                            </xs:simpleContent>
+                                                        </xs:complexType>
+                                                    </xs:element>
+                                                </xs:sequence>
+                                            </xs:complexType>
+                                        </xs:element>
+                                    </xs:sequence>
+                                </xs:complexType>
+                            </xs:element>
+                        </xs:sequence>
+                    </xs:complexType>
+                </xs:element>
+                <xs:element name="datasources">
+                    <xs:complexType>
+                        <xs:sequence>
+                            <xs:element name="datasource" maxOccurs="unbounded">
+                                <xs:complexType>
+                                    <xs:sequence>
+                                        <xs:element type="xs:string" name="url"/>
+                                        <xs:element type="xs:string" name="username"/>
+                                        <xs:element type="xs:string" name="password"/>
+                                        <xs:element type="xs:string" name="driverClassName"/>
+                                    </xs:sequence>
+                                    <xs:attribute type="xs:string" name="name"/>
+                                </xs:complexType>
+                            </xs:element>
+                        </xs:sequence>
+                    </xs:complexType>
+                </xs:element>
+                <xs:element name="security">
+                    <xs:complexType>
+                        <xs:sequence>
+                            <xs:element name="keystore" maxOccurs="unbounded">
+                                <xs:annotation>
+                                    <xs:documentation>KeyStore which will be used for
+                                        encrypting/decrypting passwords
+                                        and other sensitive information.
+                                    </xs:documentation>
+                                </xs:annotation>
+                                <xs:complexType>
+                                    <xs:sequence>
+                                        <xs:element type="xs:string" name="fileName">
+                                            <xs:annotation>
+                                                <xs:documentation>Keystore file location
+                                                </xs:documentation>
+                                            </xs:annotation>
+                                        </xs:element>
+                                        <xs:element type="xs:string" name="type">
+                                            <xs:annotation>
+                                                <xs:documentation>Keystore type (JKS/PKCS12 etc.)
+                                                </xs:documentation>
+                                            </xs:annotation>
+                                        </xs:element>
+                                        <xs:element type="xs:string" name="password">
+                                            <xs:annotation>
+                                                <xs:documentation>Keystore password
+                                                </xs:documentation>
+                                            </xs:annotation>
+                                        </xs:element>
+                                        <xs:element type="xs:string" name="keyAlias">
+                                            <xs:annotation>
+                                                <xs:documentation>Private Key alias
+                                                </xs:documentation>
+                                            </xs:annotation>
+                                        </xs:element>
+                                        <xs:element type="xs:string" name="keyPassword">
+                                            <xs:annotation>
+                                                <xs:documentation>Private Key password
+                                                </xs:documentation>
+                                            </xs:annotation>
+                                        </xs:element>
+                                    </xs:sequence>
+                                    <xs:attribute type="xs:string" name="name"/>
+                                </xs:complexType>
+                            </xs:element>
+                            <xs:element name="truststore" maxOccurs="unbounded">
+                                <xs:annotation>
+                                    <xs:documentation>System wide trust-store which is used to
+                                        maintain the certificates of all
+                                        the trusted parties.
+                                    </xs:documentation>
+                                </xs:annotation>
+                                <xs:complexType>
+                                    <xs:sequence>
+                                        <xs:element type="xs:string" name="fileName">
+                                            <xs:annotation>
+                                                <xs:documentation>trust-store file location
+                                                </xs:documentation>
+                                            </xs:annotation>
+                                        </xs:element>
+                                        <xs:element type="xs:string" name="type">
+                                            <xs:annotation>
+                                                <xs:documentation>trust-store type (JKS/PKCS12
+                                                    etc.)
+                                                </xs:documentation>
+                                            </xs:annotation>
+                                        </xs:element>
+                                        <xs:element type="xs:string" name="password">
+                                            <xs:annotation>
+                                                <xs:documentation>trust-store password
+                                                </xs:documentation>
+                                            </xs:annotation>
+                                        </xs:element>
+                                    </xs:sequence>
+                                    <xs:attribute type="xs:string" name="name"/>
+                                </xs:complexType>
+                            </xs:element>
+                        </xs:sequence>
+                    </xs:complexType>
+                </xs:element>
+                <xs:element name="featureManagement">
+                    <xs:complexType>
+                        <xs:sequence>
+                            <xs:element name="p2Repositories">
+                                <xs:complexType>
+                                    <xs:sequence>
+                                        <xs:element name="repository">
+                                            <xs:complexType>
+                                                <xs:sequence>
+                                                    <xs:element name="repository"
+                                                                maxOccurs="unbounded" minOccurs="0">
+                                                        <xs:complexType>
+                                                            <xs:simpleContent>
+                                                                <xs:extension base="xs:string">
+                                                                    <xs:attribute type="xs:string"
+                                                                                  name="repo-id"
+                                                                                  use="optional"/>
+                                                                </xs:extension>
+                                                            </xs:simpleContent>
+                                                        </xs:complexType>
+                                                    </xs:element>
+                                                </xs:sequence>
+                                                <xs:attribute type="xs:string" name="name"/>
+                                            </xs:complexType>
+                                        </xs:element>
+                                    </xs:sequence>
+                                </xs:complexType>
+                            </xs:element>
+                        </xs:sequence>
+                    </xs:complexType>
+                </xs:element>
+                <xs:element name="userManagement">
+                    <xs:complexType>
+                        <xs:sequence>
+                            <xs:element name="superTenant">
+                                <xs:complexType>
+                                    <xs:sequence>
+                                        <xs:element name="tenant">
+                                            <xs:complexType>
+                                                <xs:sequence>
+                                                    <xs:element name="admin">
+                                                        <xs:complexType>
+                                                            <xs:sequence>
+                                                                <xs:element name="user">
+                                                                    <xs:complexType>
+                                                                        <xs:sequence>
+                                                                            <xs:element type="xs:string"
+                                                                                        name="userName"/>
+                                                                            <xs:element type="xs:string"
+                                                                                        name="password"/>
+                                                                        </xs:sequence>
+                                                                        <xs:attribute type="xs:string" name="key"/>
+                                                                    </xs:complexType>
+                                                                </xs:element>
+                                                            </xs:sequence>
+                                                        </xs:complexType>
+                                                    </xs:element>
+                                                    <xs:element name="users">
+                                                        <xs:complexType>
+                                                            <xs:sequence>
+                                                                <xs:element name="user" maxOccurs="unbounded"
+                                                                            minOccurs="0">
+                                                                    <xs:complexType>
+                                                                        <xs:sequence>
+                                                                            <xs:element type="xs:string"
+                                                                                        name="userName"/>
+                                                                            <xs:element type="xs:string"
+                                                                                        name="password"/>
+                                                                        </xs:sequence>
+                                                                        <xs:attribute type="xs:string" name="key"
+                                                                                      use="optional"/>
+                                                                    </xs:complexType>
+                                                                </xs:element>
+                                                            </xs:sequence>
+                                                        </xs:complexType>
+                                                    </xs:element>
+                                                </xs:sequence>
+                                                <xs:attribute type="xs:string" name="key" use="required"/>
+                                                <xs:attribute type="xs:string" name="domain" use="required"/>
+                                            </xs:complexType>
+                                        </xs:element>
+                                    </xs:sequence>
+                                </xs:complexType>
+                            </xs:element>
+                            <xs:element name="tenants">
+                                <xs:complexType>
+                                    <xs:sequence>
+                                        <xs:element name="tenant" maxOccurs="unbounded" minOccurs="0">
+                                            <xs:complexType>
+                                                <xs:sequence>
+                                                    <xs:element name="admin">
+                                                        <xs:complexType>
+                                                            <xs:sequence>
+                                                                <xs:element name="user">
+                                                                    <xs:complexType>
+                                                                        <xs:sequence>
+                                                                            <xs:element type="xs:string"
+                                                                                        name="userName"/>
+                                                                            <xs:element type="xs:string"
+                                                                                        name="password"/>
+                                                                        </xs:sequence>
+                                                                        <xs:attribute type="xs:string" name="key"
+                                                                                      use="optional"/>
+                                                                    </xs:complexType>
+                                                                </xs:element>
+                                                            </xs:sequence>
+                                                        </xs:complexType>
+                                                    </xs:element>
+                                                    <xs:element name="users">
+                                                        <xs:complexType>
+                                                            <xs:sequence>
+                                                                <xs:element name="user" maxOccurs="unbounded"
+                                                                            minOccurs="0">
+                                                                    <xs:complexType>
+                                                                        <xs:sequence>
+                                                                            <xs:element type="xs:string"
+                                                                                        name="userName"/>
+                                                                            <xs:element type="xs:string"
+                                                                                        name="password"/>
+                                                                        </xs:sequence>
+                                                                        <xs:attribute type="xs:string" name="key"
+                                                                                      use="optional"/>
+                                                                    </xs:complexType>
+                                                                </xs:element>
+                                                            </xs:sequence>
+                                                        </xs:complexType>
+                                                    </xs:element>
+                                                </xs:sequence>
+                                                <xs:attribute type="xs:string" name="key" use="required"/>
+                                                <xs:attribute type="xs:string" name="domain" use="required"/>
+                                            </xs:complexType>
+                                        </xs:element>
+                                    </xs:sequence>
+                                </xs:complexType>
+                            </xs:element>
+                        </xs:sequence>
+                    </xs:complexType>
+                </xs:element>
+                <xs:element name="platform">
+
+                    <xs:complexType>
+                        <xs:choice>
+                            <xs:element name="productGroup" maxOccurs="unbounded" minOccurs="1">
+                                <xs:complexType>
+                                    <xs:choice maxOccurs="unbounded" minOccurs="1">
+                                        <xs:element name="instance">
+                                            <xs:complexType>
+                                                <xs:sequence>
+                                                    <xs:element name="hosts">
+                                                        <xs:complexType>
+                                                            <xs:sequence>
+                                                                <xs:element name="host" maxOccurs="unbounded"
+                                                                            minOccurs="0">
+                                                                    <xs:complexType>
+                                                                        <xs:simpleContent>
+                                                                            <xs:extension base="xs:string">
+                                                                                <xs:attribute type="xs:string"
+                                                                                              name="type"
+                                                                                              use="required"/>
+                                                                            </xs:extension>
+                                                                        </xs:simpleContent>
+                                                                    </xs:complexType>
+                                                                </xs:element>
+                                                            </xs:sequence>
+                                                        </xs:complexType>
+                                                    </xs:element>
+                                                    <xs:element name="ports">
+                                                        <xs:complexType>
+                                                            <xs:sequence>
+                                                                <xs:element name="port" maxOccurs="unbounded"
+                                                                            minOccurs="0">
+                                                                    <xs:complexType>
+                                                                        <xs:simpleContent>
+                                                                            <xs:extension base="xs:string">
+                                                                                <xs:attribute type="xs:string"
+                                                                                              name="type"
+                                                                                              use="required"/>
+                                                                            </xs:extension>
+                                                                        </xs:simpleContent>
+                                                                    </xs:complexType>
+                                                                </xs:element>
+                                                            </xs:sequence>
+                                                        </xs:complexType>
+                                                    </xs:element>
+                                                    <xs:element name="properties">
+                                                        <xs:complexType>
+                                                            <xs:sequence>
+                                                                <xs:element name="property" maxOccurs="unbounded" minOccurs="0">
+                                                                    <xs:complexType>
+                                                                        <xs:simpleContent>
+                                                                            <xs:extension base="xs:string">
+                                                                                <xs:attribute type="xs:string"
+                                                                                              name="name"
+                                                                                              use="optional"/>
+                                                                            </xs:extension>
+                                                                        </xs:simpleContent>
+                                                                    </xs:complexType>
+                                                                </xs:element>
+                                                            </xs:sequence>
+
+                                                        </xs:complexType>
+                                                    </xs:element>
+                                                </xs:sequence>
+                                                <xs:attribute type="xs:string" name="name" use="required"/>
+                                                <xs:attribute type="xs:string" name="type" use="required"/>
+                                                <xs:attribute type="xs:boolean" name="nonBlockingTransportEnabled" use="required"/>
+                                            </xs:complexType>
+                                        </xs:element>
+                                    </xs:choice>
+                                    <xs:attribute type="xs:string" name="name"/>
+                                    <xs:attribute type="xs:string" name="clusteringEnabled"/>
+                                    <xs:attribute type="xs:boolean" name="default"/>
+                                </xs:complexType>
+                            </xs:element>
+                        </xs:choice>
+                    </xs:complexType>
+                </xs:element>
+                <xs:element name="listenerExtensions">
+                    <xs:complexType>
+                        <xs:sequence>
+                            <xs:element name="platformExecutionManager">
+                                <xs:complexType>
+                                    <xs:sequence>
+                                        <xs:element name="extentionClasses">
+                                            <xs:complexType>
+                                                <xs:sequence>
+                                                    <xs:element name="class" maxOccurs="unbounded" minOccurs="0">
+                                                        <xs:complexType>
+                                                            <xs:sequence>
+                                                                <xs:element type="xs:string" name="name"/>
+                                                                <xs:element name="parameter" maxOccurs="unbounded" minOccurs="0">
+                                                                    <xs:complexType>
+                                                                        <xs:simpleContent>
+                                                                            <xs:extension base="xs:string">
+                                                                                <xs:attribute type="xs:string" name="name" use="required"/>
+                                                                                <xs:attribute type="xs:string" name="value" use="required"/>
+                                                                            </xs:extension>
+                                                                        </xs:simpleContent>
+                                                                    </xs:complexType>
+                                                                </xs:element>
+                                                            </xs:sequence>
+                                                        </xs:complexType>
+                                                    </xs:element>
+                                                </xs:sequence>
+                                            </xs:complexType>
+                                        </xs:element>
+                                    </xs:sequence>
+                                </xs:complexType>
+                            </xs:element>
+                            <xs:element name="PlatformSuiteManager">
+                                <xs:complexType>
+                                    <xs:sequence>
+                                        <xs:element name="extentionClasses">
+                                            <xs:complexType>
+                                                <xs:sequence>
+                                                    <xs:element name="class" maxOccurs="unbounded" minOccurs="0">
+                                                        <xs:complexType>
+                                                            <xs:sequence>
+                                                                <xs:element type="xs:string" name="name"/>
+                                                                <xs:element name="parameter" maxOccurs="unbounded" minOccurs="0">
+                                                                    <xs:complexType>
+                                                                        <xs:simpleContent>
+                                                                            <xs:extension base="xs:string">
+                                                                                <xs:attribute type="xs:string" name="name" use="required"/>
+                                                                                <xs:attribute type="xs:string" name="value" use="required"/>
+                                                                            </xs:extension>
+                                                                        </xs:simpleContent>
+                                                                    </xs:complexType>
+                                                                </xs:element>
+                                                            </xs:sequence>
+                                                        </xs:complexType>
+                                                    </xs:element>
+                                                </xs:sequence>
+                                            </xs:complexType>
+                                        </xs:element>
+                                    </xs:sequence>
+                                </xs:complexType>
+                            </xs:element>
+                            <xs:element name="PlatformAnnotationTransferManager">
+                                <xs:complexType>
+                                    <xs:sequence>
+                                        <xs:element name="extentionClasses">
+                                            <xs:complexType>
+                                                <xs:sequence>
+                                                    <xs:element name="class" maxOccurs="unbounded" minOccurs="0">
+                                                        <xs:complexType>
+                                                            <xs:sequence>
+                                                                <xs:element type="xs:string" name="name"/>
+                                                                <xs:element name="parameter" maxOccurs="unbounded" minOccurs="0">
+                                                                    <xs:complexType>
+                                                                        <xs:simpleContent>
+                                                                            <xs:extension base="xs:string">
+                                                                                <xs:attribute type="xs:string" name="name" use="required"/>
+                                                                                <xs:attribute type="xs:string" name="value" use="required"/>
+                                                                            </xs:extension>
+                                                                        </xs:simpleContent>
+                                                                    </xs:complexType>
+                                                                </xs:element>
+                                                            </xs:sequence>
+                                                        </xs:complexType>
+                                                    </xs:element>
+                                                </xs:sequence>
+                                            </xs:complexType>
+                                        </xs:element>
+                                    </xs:sequence>
+                                </xs:complexType>
+                            </xs:element>
+                            <xs:element name="PlatformTestManager">
+                                <xs:complexType>
+                                    <xs:sequence>
+                                        <xs:element name="extentionClasses">
+                                            <xs:complexType>
+                                                <xs:sequence>
+                                                    <xs:element name="class" maxOccurs="unbounded" minOccurs="0">
+                                                        <xs:complexType>
+                                                            <xs:sequence>
+                                                                <xs:element type="xs:string" name="name"/>
+                                                                <xs:element name="parameter" maxOccurs="unbounded" minOccurs="0">
+                                                                    <xs:complexType>
+                                                                        <xs:simpleContent>
+                                                                            <xs:extension base="xs:string">
+                                                                                <xs:attribute type="xs:string" name="name" use="required"/>
+                                                                                <xs:attribute type="xs:string" name="value" use="required"/>
+                                                                            </xs:extension>
+                                                                        </xs:simpleContent>
+                                                                    </xs:complexType>
+                                                                </xs:element>
+                                                            </xs:sequence>
+                                                        </xs:complexType>
+                                                    </xs:element>
+                                                </xs:sequence>
+                                            </xs:complexType>
+                                        </xs:element>
+                                    </xs:sequence>
+                                </xs:complexType>
+                            </xs:element>
+                            <xs:element name="PlatformReportManager">
+                                <xs:complexType>
+                                    <xs:sequence>
+                                        <xs:element name="extentionClasses">
+                                            <xs:complexType>
+                                                <xs:sequence>
+                                                    <xs:element name="class" maxOccurs="unbounded" minOccurs="0">
+                                                        <xs:complexType>
+                                                            <xs:sequence>
+                                                                <xs:element type="xs:string" name="name"/>
+                                                                <xs:element name="parameter" maxOccurs="unbounded" minOccurs="0">
+                                                                    <xs:complexType>
+                                                                        <xs:simpleContent>
+                                                                            <xs:extension base="xs:string">
+                                                                                <xs:attribute type="xs:string" name="name" use="required"/>
+                                                                                <xs:attribute type="xs:string" name="value" use="required"/>
+                                                                            </xs:extension>
+                                                                        </xs:simpleContent>
+                                                                    </xs:complexType>
+                                                                </xs:element>
+                                                            </xs:sequence>
+                                                        </xs:complexType>
+                                                    </xs:element>
+                                                </xs:sequence>
+                                            </xs:complexType>
+                                        </xs:element>
+                                    </xs:sequence>
+                                </xs:complexType>
+                            </xs:element>
+                        </xs:sequence>
+                    </xs:complexType>
+                </xs:element>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+</xs:schema>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/autoscaling-policy-test/autoscaling-policies/autoscaling-policy-autoscaling-policy-test-1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/autoscaling-policy-test/autoscaling-policies/autoscaling-policy-autoscaling-policy-test-1.json b/products/stratos/modules/integration/test-integration/src/test/resources/autoscaling-policy-test/autoscaling-policies/autoscaling-policy-autoscaling-policy-test-1.json
new file mode 100644
index 0000000..d7765b9
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/autoscaling-policy-test/autoscaling-policies/autoscaling-policy-autoscaling-policy-test-1.json
@@ -0,0 +1,14 @@
+{
+    "id": "autoscaling-policy-autoscaling-policy-test-1",
+    "loadThresholds": {
+        "requestsInFlight": {
+            "threshold": 35
+        },
+        "memoryConsumption": {
+            "threshold": 45
+        },
+        "loadAverage": {
+            "threshold": 25
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/autoscaling-policy-test/autoscaling-policies/autoscaling-policy-autoscaling-policy-test-2.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/autoscaling-policy-test/autoscaling-policies/autoscaling-policy-autoscaling-policy-test-2.json b/products/stratos/modules/integration/test-integration/src/test/resources/autoscaling-policy-test/autoscaling-policies/autoscaling-policy-autoscaling-policy-test-2.json
new file mode 100644
index 0000000..03f3a01
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/autoscaling-policy-test/autoscaling-policies/autoscaling-policy-autoscaling-policy-test-2.json
@@ -0,0 +1,14 @@
+{
+    "id": "autoscaling-policy-autoscaling-policy-test-2",
+    "loadThresholds": {
+        "requestsInFlight": {
+            "threshold": 35
+        },
+        "memoryConsumption": {
+            "threshold": 45
+        },
+        "loadAverage": {
+            "threshold": 25
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/autoscaling-policy-test/autoscaling-policies/autoscaling-policy-autoscaling-policy-test-v1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/autoscaling-policy-test/autoscaling-policies/autoscaling-policy-autoscaling-policy-test-v1.json b/products/stratos/modules/integration/test-integration/src/test/resources/autoscaling-policy-test/autoscaling-policies/autoscaling-policy-autoscaling-policy-test-v1.json
new file mode 100644
index 0000000..d29a8e3
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/autoscaling-policy-test/autoscaling-policies/autoscaling-policy-autoscaling-policy-test-v1.json
@@ -0,0 +1,14 @@
+{
+    "id": "autoscaling-policy-autoscaling-policy-test",
+    "loadThresholds": {
+        "requestsInFlight": {
+            "threshold": 30
+        },
+        "memoryConsumption": {
+            "threshold": 40
+        },
+        "loadAverage": {
+            "threshold": 20
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/autoscaling-policy-test/autoscaling-policies/autoscaling-policy-autoscaling-policy-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/autoscaling-policy-test/autoscaling-policies/autoscaling-policy-autoscaling-policy-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/autoscaling-policy-test/autoscaling-policies/autoscaling-policy-autoscaling-policy-test.json
new file mode 100644
index 0000000..dce4c7a
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/autoscaling-policy-test/autoscaling-policies/autoscaling-policy-autoscaling-policy-test.json
@@ -0,0 +1,14 @@
+{
+    "id": "autoscaling-policy-autoscaling-policy-test",
+    "loadThresholds": {
+        "requestsInFlight": {
+            "threshold": 35
+        },
+        "memoryConsumption": {
+            "threshold": 45
+        },
+        "loadAverage": {
+            "threshold": 25
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/cartridge-group-test/cartridges-groups/g4-g5-g6-cartridge-group-test-v1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/cartridge-group-test/cartridges-groups/g4-g5-g6-cartridge-group-test-v1.json b/products/stratos/modules/integration/test-integration/src/test/resources/cartridge-group-test/cartridges-groups/g4-g5-g6-cartridge-group-test-v1.json
new file mode 100644
index 0000000..38a976a
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/cartridge-group-test/cartridges-groups/g4-g5-g6-cartridge-group-test-v1.json
@@ -0,0 +1,50 @@
+{
+    "name": "G4-cartridge-group-test",
+    "dependencies": {
+        "terminationBehaviour": "terminate-none",
+        "startupOrders": [
+            {
+                "aliases": [
+                    "group.group2-cartridge-group-test",
+                    "cartridge.c1-1x0-cartridge-group-test"
+                ]
+            }
+        ]
+    },
+    "cartridges": [
+        "c4-cartridge-group-test"
+    ],
+    "groups": [
+        {
+            "name": "G5-cartridge-group-test",
+            "dependencies": {
+                "terminationBehaviour": "terminate-dependents",
+                "startupOrders": [
+                    {
+                        "aliases": [
+                            "group.group6-cartridge-group-test",
+                            "cartridge.c5-1x0-cartridge-group-test"
+                        ]
+                    }
+                ]
+            },
+            "cartridges": [
+                "c5-cartridge-group-test"
+            ],
+            "groups": [
+                {
+                    "name": "G6-cartridge-group-test",
+                    "dependencies": {
+                        "terminationBehaviour": "terminate-all",
+                        "startupOrders": []
+                    },
+                    "cartridges": [
+                        "c6-cartridge-group-test"
+                    ],
+                    "groups": []
+                }
+            ]
+        }
+    ]
+}
+

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/cartridge-group-test/cartridges-groups/g4-g5-g6-cartridge-group-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/cartridge-group-test/cartridges-groups/g4-g5-g6-cartridge-group-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/cartridge-group-test/cartridges-groups/g4-g5-g6-cartridge-group-test.json
new file mode 100644
index 0000000..741efe0
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/cartridge-group-test/cartridges-groups/g4-g5-g6-cartridge-group-test.json
@@ -0,0 +1,50 @@
+{
+    "name": "G4-cartridge-group-test",
+    "dependencies": {
+        "terminationBehaviour": "terminate-none",
+        "startupOrders": [
+            {
+                "aliases": [
+                    "group.group5-cartridge-group-test",
+                    "cartridge.c4-1x0-cartridge-group-test"
+                ]
+            }
+        ]
+    },
+    "cartridges": [
+        "c4-cartridge-group-test"
+    ],
+    "groups": [
+        {
+            "name": "G5-cartridge-group-test",
+            "dependencies": {
+                "terminationBehaviour": "terminate-dependents",
+                "startupOrders": [
+                    {
+                        "aliases": [
+                            "group.group6-cartridge-group-test",
+                            "cartridge.c5-1x0-cartridge-group-test"
+                        ]
+                    }
+                ]
+            },
+            "cartridges": [
+                "c5-cartridge-group-test"
+            ],
+            "groups": [
+                {
+                    "name": "G6-cartridge-group-test",
+                    "dependencies": {
+                        "terminationBehaviour": "terminate-all",
+                        "startupOrders": []
+                    },
+                    "cartridges": [
+                        "c6-cartridge-group-test"
+                    ],
+                    "groups": []
+                }
+            ]
+        }
+    ]
+}
+

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/cartridge-group-test/cartridges-groups/group-1-cartridge-group-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/cartridge-group-test/cartridges-groups/group-1-cartridge-group-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/cartridge-group-test/cartridges-groups/group-1-cartridge-group-test.json
new file mode 100644
index 0000000..a3050f4
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/cartridge-group-test/cartridges-groups/group-1-cartridge-group-test.json
@@ -0,0 +1,50 @@
+{
+    "name": "group-1-cartridge-group-test",
+    "dependencies": {
+        "terminationBehaviour": "terminate-none",
+        "startupOrders": [
+            {
+                "aliases": [
+                    "group.group5-cartridge-group-test",
+                    "cartridge.c4-1x0-cartridge-group-test"
+                ]
+            }
+        ]
+    },
+    "cartridges": [
+        "c4-cartridge-group-test"
+    ],
+    "groups": [
+        {
+            "name": "G5-cartridge-group-test",
+            "dependencies": {
+                "terminationBehaviour": "terminate-dependents",
+                "startupOrders": [
+                    {
+                        "aliases": [
+                            "group.group6-cartridge-group-test",
+                            "cartridge.c5-1x0-cartridge-group-test"
+                        ]
+                    }
+                ]
+            },
+            "cartridges": [
+                "c5-cartridge-group-test"
+            ],
+            "groups": [
+                {
+                    "name": "G6-cartridge-group-test",
+                    "dependencies": {
+                        "terminationBehaviour": "terminate-all",
+                        "startupOrders": []
+                    },
+                    "cartridges": [
+                        "c6-cartridge-group-test"
+                    ],
+                    "groups": []
+                }
+            ]
+        }
+    ]
+}
+

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/cartridge-group-test/cartridges-groups/group-2-cartridge-group-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/cartridge-group-test/cartridges-groups/group-2-cartridge-group-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/cartridge-group-test/cartridges-groups/group-2-cartridge-group-test.json
new file mode 100644
index 0000000..bbe7ae7
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/cartridge-group-test/cartridges-groups/group-2-cartridge-group-test.json
@@ -0,0 +1,50 @@
+{
+    "name": "group-2-cartridge-group-test",
+    "dependencies": {
+        "terminationBehaviour": "terminate-none",
+        "startupOrders": [
+            {
+                "aliases": [
+                    "group.group5-cartridge-group-test",
+                    "cartridge.c4-1x0-cartridge-group-test"
+                ]
+            }
+        ]
+    },
+    "cartridges": [
+        "c4-cartridge-group-test"
+    ],
+    "groups": [
+        {
+            "name": "G5-cartridge-group-test",
+            "dependencies": {
+                "terminationBehaviour": "terminate-dependents",
+                "startupOrders": [
+                    {
+                        "aliases": [
+                            "group.group6-cartridge-group-test",
+                            "cartridge.c5-1x0-cartridge-group-test"
+                        ]
+                    }
+                ]
+            },
+            "cartridges": [
+                "c5-cartridge-group-test"
+            ],
+            "groups": [
+                {
+                    "name": "G6-cartridge-group-test",
+                    "dependencies": {
+                        "terminationBehaviour": "terminate-all",
+                        "startupOrders": []
+                    },
+                    "cartridges": [
+                        "c6-cartridge-group-test"
+                    ],
+                    "groups": []
+                }
+            ]
+        }
+    ]
+}
+

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/cartridge-group-test/cartridges/mock/c4-cartridge-group-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/cartridge-group-test/cartridges/mock/c4-cartridge-group-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/cartridge-group-test/cartridges/mock/c4-cartridge-group-test.json
new file mode 100755
index 0000000..f34c1c4
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/cartridge-group-test/cartridges/mock/c4-cartridge-group-test.json
@@ -0,0 +1,45 @@
+{
+    "type": "c4-cartridge-group-test",
+    "provider": "apache",
+    "host": "stratos.apache.org",
+    "category": "data",
+    "displayName": "c4-cartridge-group-test",
+    "description": "c4-cartridge-group-test Cartridge",
+    "version": "7",
+    "multiTenant": "false",
+    "portMapping": [
+        {
+            "name": "http-22",
+            "protocol": "http",
+            "port": "22",
+            "proxyPort": "8280"
+        }
+    ],
+    "deployment": {
+    },
+    "iaasProvider": [
+        {
+            "type": "mock",
+            "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
+            "networkInterfaces": [
+                {
+                    "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e"
+                }
+            ],
+            "property": [
+                {
+                    "name": "instanceType",
+                    "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594"
+                },
+                {
+                    "name": "keyPair",
+                    "value": "vishanth-key"
+                },
+                {
+                    "name": "securityGroups",
+                    "value": "default"
+                }
+            ]
+        }
+    ]
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/cartridge-group-test/cartridges/mock/c5-cartridge-group-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/cartridge-group-test/cartridges/mock/c5-cartridge-group-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/cartridge-group-test/cartridges/mock/c5-cartridge-group-test.json
new file mode 100755
index 0000000..9c236a0
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/cartridge-group-test/cartridges/mock/c5-cartridge-group-test.json
@@ -0,0 +1,124 @@
+{
+    "category": "Application",
+    "description": "c5-cartridge-group-test Cartridge",
+    "displayName": "c5-cartridge-group-test",
+    "host": "qmog.cisco.com",
+    "iaasProvider": [
+        {
+            "imageId": "RegionOne/16e7e35b-0c88-4605-90ce-cbef9e9dde0f",
+            "maxInstanceLimit": "4",
+            "networkInterfaces": [
+                {
+                    "floatingNetworks": [
+                        {
+                            "name": "public",
+                            "networkUuid": "26b4aa2b-06bc-4e4f-a6eb-c19fbc211af6"
+                        }
+                    ],
+                    "name": "core",
+                    "networkUuid": "5e107fbd-4820-47ad-84ea-6f135496f889"
+                }
+            ],
+            "property": [
+                {
+                    "name": "instanceType",
+                    "value": "RegionOne/2cdbd576-8c9b-4c2d-8b1a-0f79dc4fb809"
+                },
+                {
+                    "name": "keyPair",
+                    "value": "phoenix"
+                },
+                {
+                    "name": "autoAssignIp",
+                    "value": "false"
+                },
+                {
+                    "name": "securityGroups",
+                    "value": "default"
+                }
+            ],
+            "type": "mock"
+        }
+    ],
+    "multiTenant": "false",
+    "portMapping": [
+        {
+            "port": "22",
+            "protocol": "http",
+            "proxyPort": "8280"
+        }
+    ],
+    "property": [
+        {
+            "name": "payload_parameter.MB_IP",
+            "value": "octl.qmog.cisco.com"
+        },
+        {
+            "name": "payload_parameter.MB_PORT",
+            "value": "61616"
+        },
+        {
+            "name": "payload_parameter.CEP_IP",
+            "value": "octl.qmog.cisco.com"
+        },
+        {
+            "name": "payload_parameter.CEP_PORT",
+            "value": "7611"
+        },
+        {
+            "name": "payload_parameter.CEP_ADMIN_USERNAME",
+            "value": "admin"
+        },
+        {
+            "name": "payload_parameter.CEP_ADMIN_PASSWORD",
+            "value": "admin"
+        },
+        {
+            "name": "payload_parameter.CERT_TRUSTSTORE",
+            "value": "/opt/apache-stratos-cartridge-agent/security/client-truststore.jks"
+        },
+        {
+            "name": "payload_parameter.TRUSTSTORE_PASSWORD",
+            "value": "wso2carbon"
+        },
+        {
+            "name": "payload_parameter.ENABLE_DATA_PUBLISHER",
+            "value": "false"
+        },
+        {
+            "name": "payload_parameter.MONITORING_SERVER_IP",
+            "value": "octl.qmog.cisco.com"
+        },
+        {
+            "name": "payload_parameter.MONITORING_SERVER_PORT",
+            "value": "7611"
+        },
+        {
+            "name": "payload_parameter.MONITORING_SERVER_SECURE_PORT",
+            "value": "7711"
+        },
+        {
+            "name": "payload_parameter.MONITORING_SERVER_ADMIN_USERNAME",
+            "value": "admin"
+        },
+        {
+            "name": "payload_parameter.MONITORING_SERVER_ADMIN_PASSWORD",
+            "value": "admin"
+        },
+        {
+            "name": "payload_parameter.QTCM_DNS_SEGMENT",
+            "value": "test"
+        },
+        {
+            "name": "payload_parameter.QTCM_NETWORK_COUNT",
+            "value": "1"
+        },
+        {
+            "name": "payload_parameter.SIMPLE_PROPERTY",
+            "value": "value"
+        }
+    ],
+    "provider": "cisco",
+    "type": "c5-cartridge-group-test",
+    "version": "1.0"
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/cartridge-group-test/cartridges/mock/c6-cartridge-group-test.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/cartridge-group-test/cartridges/mock/c6-cartridge-group-test.json b/products/stratos/modules/integration/test-integration/src/test/resources/cartridge-group-test/cartridges/mock/c6-cartridge-group-test.json
new file mode 100755
index 0000000..4bfcca6
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/cartridge-group-test/cartridges/mock/c6-cartridge-group-test.json
@@ -0,0 +1,45 @@
+{
+    "type": "c6-cartridge-group-test",
+    "provider": "apache",
+    "host": "stratos.apache.org",
+    "category": "data",
+    "displayName": "c6-cartridge-group-test",
+    "description": "c6-cartridge-group-test Cartridge",
+    "version": "7",
+    "multiTenant": "false",
+    "portMapping": [
+        {
+            "name": "http-22",
+            "protocol": "http",
+            "port": "22",
+            "proxyPort": "8280"
+        }
+    ],
+    "deployment": {
+    },
+    "iaasProvider": [
+        {
+            "type": "mock",
+            "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
+            "networkInterfaces": [
+                {
+                    "networkUuid": "b55f009a-1cc6-cartridge-group-test-4b17-924f-4ae0ee18db5e"
+                }
+            ],
+            "property": [
+                {
+                    "name": "instanceType",
+                    "value": "RegionOne/aa5f45a2-c6-cartridge-group-testd6-419d-917a-9dd2e3888594"
+                },
+                {
+                    "name": "keyPair",
+                    "value": "vishanth-key"
+                },
+                {
+                    "name": "securityGroups",
+                    "value": "default"
+                }
+            ]
+        }
+    ]
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/resources/cartridge-test/cartridges/mock/c0-cartridge-test-v1.json
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/cartridge-test/cartridges/mock/c0-cartridge-test-v1.json b/products/stratos/modules/integration/test-integration/src/test/resources/cartridge-test/cartridges/mock/c0-cartridge-test-v1.json
new file mode 100755
index 0000000..eb2cb3e
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/cartridge-test/cartridges/mock/c0-cartridge-test-v1.json
@@ -0,0 +1,124 @@
+{
+    "category": "Data",
+    "description": "c0-cartridge-test Cartridge",
+    "displayName": "c0-cartridge-test",
+    "host": "qmog.cisco.com12",
+    "iaasProvider": [
+        {
+            "imageId": "RegionOne/16e7e35b-0c88-4605-90ce-cbef9e9d123",
+            "maxInstanceLimit": "4",
+            "networkInterfaces": [
+                {
+                    "floatingNetworks": [
+                        {
+                            "name": "private",
+                            "networkUuid": "26b4aa2b-06bc-4e4f-a6eb-c19fbc2112121"
+                        }
+                    ],
+                    "name": "core1",
+                    "networkUuid": "5e107fbd-4820-47ad-84ea-6f1354961212"
+                }
+            ],
+            "property": [
+                {
+                    "name": "instanceType",
+                    "value": "RegionOne/2cdbd576-8c9b-4c2d-8b1a-0f79dc4fb812"
+                },
+                {
+                    "name": "keyPair",
+                    "value": "phoenix12"
+                },
+                {
+                    "name": "autoAssignIp",
+                    "value": "true"
+                },
+                {
+                    "name": "securityGroups",
+                    "value": "default123"
+                }
+            ],
+            "type": "mock"
+        }
+    ],
+    "multiTenant": "false",
+    "portMapping": [
+        {
+            "port": "22",
+            "protocol": "http",
+            "proxyPort": "8280"
+        }
+    ],
+    "property": [
+        {
+            "name": "payload_parameter.MB_IP",
+            "value": "octl.qmog.cisco.com123"
+        },
+        {
+            "name": "payload_parameter.MB_PORT",
+            "value": "61617"
+        },
+        {
+            "name": "payload_parameter.CEP_IP",
+            "value": "octl.qmog.cisco.com123"
+        },
+        {
+            "name": "payload_parameter.CEP_PORT",
+            "value": "7612"
+        },
+        {
+            "name": "payload_parameter.CEP_ADMIN_USERNAME",
+            "value": "admin"
+        },
+        {
+            "name": "payload_parameter.CEP_ADMIN_PASSWORD",
+            "value": "admin123"
+        },
+        {
+            "name": "payload_parameter.CERT_TRUSTSTORE",
+            "value": "/opt/apache-stratos-cartridge-agent/security/client-truststore.jks"
+        },
+        {
+            "name": "payload_parameter.TRUSTSTORE_PASSWORD",
+            "value": "wso2carbon"
+        },
+        {
+            "name": "payload_parameter.ENABLE_DATA_PUBLISHER",
+            "value": "false"
+        },
+        {
+            "name": "payload_parameter.MONITORING_SERVER_IP",
+            "value": "octl.qmog.cisco.com123"
+        },
+        {
+            "name": "payload_parameter.MONITORING_SERVER_PORT",
+            "value": "7612"
+        },
+        {
+            "name": "payload_parameter.MONITORING_SERVER_SECURE_PORT",
+            "value": "7712"
+        },
+        {
+            "name": "payload_parameter.MONITORING_SERVER_ADMIN_USERNAME",
+            "value": "admin"
+        },
+        {
+            "name": "payload_parameter.MONITORING_SERVER_ADMIN_PASSWORD",
+            "value": "admin123"
+        },
+        {
+            "name": "payload_parameter.QTCM_DNS_SEGMENT",
+            "value": "test123"
+        },
+        {
+            "name": "payload_parameter.QTCM_NETWORK_COUNT",
+            "value": "3"
+        },
+        {
+            "name": "payload_parameter.SIMPLE_PROPERTY",
+            "value": "value"
+        }
+    ],
+    "provider": "apache",
+    "type": "c0-cartridge-test",
+    "version": "1.0"
+}


[07/21] stratos git commit: Uplifting automation engine to v4.4.3, dynamically pick ports for integration tests

Posted by ra...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/ApplicationUpdateTest.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/ApplicationUpdateTest.java b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/ApplicationUpdateTest.java
new file mode 100644
index 0000000..fd173b6
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/ApplicationUpdateTest.java
@@ -0,0 +1,275 @@
+/*
+ * 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.integration.tests.application;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.stratos.common.beans.application.ApplicationBean;
+import org.apache.stratos.common.beans.cartridge.CartridgeGroupBean;
+import org.apache.stratos.common.beans.policy.deployment.ApplicationPolicyBean;
+import org.apache.stratos.integration.common.RestConstants;
+import org.apache.stratos.integration.common.TopologyHandler;
+import org.apache.stratos.integration.common.rest.RestClient;
+import org.apache.stratos.integration.tests.StratosIntegrationTest;
+import org.apache.stratos.messaging.domain.application.ApplicationStatus;
+import org.testng.annotations.Test;
+
+import static junit.framework.Assert.assertEquals;
+import static junit.framework.Assert.assertTrue;
+
+/**
+ * Sample application tests with application add, .
+ */
+public class ApplicationUpdateTest extends StratosIntegrationTest {
+    private static final Log log = LogFactory.getLog(ApplicationUpdateTest.class);
+    private static final String RESOURCES_PATH = "/application-update-test";
+
+    @Test(timeOut = APPLICATION_TEST_TIMEOUT)
+    public void testDeployApplication() {
+        try {
+
+            String autoscalingPolicyId = "autoscaling-policy-application-update-test";
+            String applicationId = "g-sc-G123-1-application-update-test";
+
+            testApplicationRuntimeForTenant(restClientTenant1, tenant1Id, autoscalingPolicyId);
+
+            TopologyHandler.getInstance().assertApplicationForNonAvailability(applicationId, tenant2Id);
+
+            //Updating application
+            boolean updated = restClientTenant1.updateEntity(RESOURCES_PATH + RestConstants.APPLICATIONS_PATH + "/" +
+                            "g-sc-G123-1-application-update-test-v1.json", RestConstants.APPLICATIONS,
+                    RestConstants.APPLICATIONS_NAME);
+            assertEquals(updated, true);
+
+            TopologyHandler.getInstance()
+                    .assertGroupInstanceCount(applicationId, "group3-application-update-test", 1, tenant1Id);
+
+            TopologyHandler.getInstance().assertClusterMinMemberCount(applicationId, 1, tenant1Id);
+
+            ApplicationBean updatedBean = (ApplicationBean) restClientTenant1.getEntity(RestConstants.APPLICATIONS,
+                    "g-sc-G123-1-application-update-test", ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
+            assertEquals(updatedBean.getApplicationId(), "g-sc-G123-1-application-update-test");
+
+            TopologyHandler.getInstance().assertApplicationForNonAvailability(applicationId, tenant2Id);
+
+            boolean removedGroup =
+                    restClientTenant1.removeEntity(RestConstants.CARTRIDGE_GROUPS, "G1-application-update-test",
+                            RestConstants.CARTRIDGE_GROUPS_NAME);
+            assertEquals(removedGroup, false);
+
+            boolean removedAuto = restClientTenant1.removeEntity(RestConstants.AUTOSCALING_POLICIES,
+                    autoscalingPolicyId, RestConstants.AUTOSCALING_POLICIES_NAME);
+            assertEquals(removedAuto, false);
+
+            boolean removedNet = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
+                    "network-partition-application-update-test-1",
+                    RestConstants.NETWORK_PARTITIONS_NAME);
+            //Trying to remove the used network partition
+            assertEquals(removedNet, false);
+
+            boolean removedDep = restClientTenant1.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
+                    "deployment-policy-application-update-test", RestConstants.DEPLOYMENT_POLICIES_NAME);
+            assertEquals(removedDep, false);
+
+            testApplicationRuntimeForTenant(restClientTenant2, tenant2Id, autoscalingPolicyId);
+
+            //testApplicationUndeplymentForTenant(restClientTenant1, tenant1Id, autoscalingPolicyId);
+
+            //TopologyHandler.getInstance().assertApplicationForNonAvailability(applicationId, tenant1Id);
+
+            testApplicationUndeplymentForTenant(restClientTenant2, tenant2Id, autoscalingPolicyId);
+
+            log.info("-------------------------Ended application runtime update test case-------------------------");
+
+        }
+        catch (Exception e) {
+            log.error("An error occurred while handling application deployment/undeployment and update", e);
+            assertTrue("An error occurred while handling application deployment/undeployment and update", false);
+        }
+    }
+
+    private void testApplicationRuntimeForTenant(RestClient restClientTenant, int tenantId,
+                                                 String autoscalingPolicyId) {
+
+        boolean addedScalingPolicy = restClientTenant.addEntity(RESOURCES_PATH + RestConstants.AUTOSCALING_POLICIES_PATH
+                        + "/" + autoscalingPolicyId + ".json",
+                RestConstants.AUTOSCALING_POLICIES, RestConstants.AUTOSCALING_POLICIES_NAME);
+        assertEquals(addedScalingPolicy, true);
+
+        boolean addedC1 = restClientTenant
+                .addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "c1-application-update-test.json",
+                        RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+        assertEquals(addedC1, true);
+
+        boolean addedC2 = restClientTenant
+                .addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "c2-application-update-test.json",
+                        RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+        assertEquals(addedC2, true);
+
+        boolean addedC3 = restClientTenant
+                .addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "c3-application-update-test.json",
+                        RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+        assertEquals(addedC3, true);
+
+        boolean addedG1 = restClientTenant.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGE_GROUPS_PATH +
+                        "/" + "cartrdige-nested-application-update-test.json", RestConstants.CARTRIDGE_GROUPS,
+                RestConstants.CARTRIDGE_GROUPS_NAME);
+        assertEquals(addedG1, true);
+
+        CartridgeGroupBean beanG1 = (CartridgeGroupBean) restClientTenant.
+                getEntity(RestConstants.CARTRIDGE_GROUPS, "G1-application-update-test",
+                        CartridgeGroupBean.class, RestConstants.CARTRIDGE_GROUPS_NAME);
+        assertEquals(beanG1.getName(), "G1-application-update-test");
+
+        boolean addedN1 = restClientTenant.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
+                        "network-partition-application-update-test-1.json",
+                RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
+        assertEquals(addedN1, true);
+
+        boolean addedN2 = restClientTenant.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
+                        "network-partition-application-update-test-2.json",
+                RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
+        assertEquals(addedN2, true);
+
+        boolean addedDep = restClientTenant.addEntity(RESOURCES_PATH + RestConstants.DEPLOYMENT_POLICIES_PATH + "/" +
+                        "deployment-policy-application-update-test.json",
+                RestConstants.DEPLOYMENT_POLICIES, RestConstants.DEPLOYMENT_POLICIES_NAME);
+        assertEquals(addedDep, true);
+
+        boolean added = restClientTenant.addEntity(RESOURCES_PATH + RestConstants.APPLICATIONS_PATH + "/" +
+                        "g-sc-G123-1-application-update-test.json", RestConstants.APPLICATIONS,
+                RestConstants.APPLICATIONS_NAME);
+        assertEquals(added, true);
+
+        ApplicationBean bean = (ApplicationBean) restClientTenant.getEntity(RestConstants.APPLICATIONS,
+                "g-sc-G123-1-application-update-test", ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
+        assertEquals(bean.getApplicationId(), "g-sc-G123-1-application-update-test");
+
+        boolean addAppPolicy =
+                restClientTenant.addEntity(RESOURCES_PATH + RestConstants.APPLICATION_POLICIES_PATH + "/" +
+                                "application-policy-application-update-test.json", RestConstants.APPLICATION_POLICIES,
+                        RestConstants.APPLICATION_POLICIES_NAME);
+        assertEquals(addAppPolicy, true);
+
+        ApplicationPolicyBean policyBean = (ApplicationPolicyBean) restClientTenant.getEntity(
+                RestConstants.APPLICATION_POLICIES,
+                "application-policy-application-update-test", ApplicationPolicyBean.class,
+                RestConstants.APPLICATION_POLICIES_NAME);
+
+        //deploy the application
+        String resourcePath = RestConstants.APPLICATIONS + "/" + "g-sc-G123-1-application-update-test" +
+                RestConstants.APPLICATIONS_DEPLOY + "/" + "application-policy-application-update-test";
+        boolean deployed = restClientTenant.deployEntity(resourcePath,
+                RestConstants.APPLICATIONS_NAME);
+        assertEquals(deployed, true);
+
+        //Application active handling
+        TopologyHandler.getInstance().assertApplicationStatus(bean.getApplicationId(),
+                ApplicationStatus.Active, tenantId);
+
+        //Group active handling
+        TopologyHandler.getInstance().assertGroupActivation(bean.getApplicationId(), tenantId);
+
+        //Cluster active handling
+        TopologyHandler.getInstance().assertClusterActivation(bean.getApplicationId(), tenantId);
+    }
+
+    private void testApplicationUndeplymentForTenant(RestClient restClientTenant, int tenantId,
+                                                     String autoscalingPolicyId) {
+
+        String resourcePathUndeploy = RestConstants.APPLICATIONS + "/" + "g-sc-G123-1-application-update-test" +
+                RestConstants.APPLICATIONS_UNDEPLOY;
+
+        boolean unDeployed = restClientTenant.undeployEntity(resourcePathUndeploy,
+                RestConstants.APPLICATIONS_NAME);
+        assertEquals(unDeployed, true);
+
+        boolean undeploy = TopologyHandler.getInstance()
+                .assertApplicationUndeploy("g-sc-G123-1-application-update-test", tenantId);
+        if (!undeploy) {
+            //Need to forcefully undeploy the application
+            log.info("Force undeployment is going to start for the [application] " +
+                    "g-sc-G123-1-application-update-test");
+
+            restClientTenant.undeployEntity(RestConstants.APPLICATIONS + "/" + "g-sc-G123-1-application-update-test" +
+                    RestConstants.APPLICATIONS_UNDEPLOY + "?force=true", RestConstants.APPLICATIONS);
+
+            boolean forceUndeployed = TopologyHandler.getInstance()
+                    .assertApplicationUndeploy("g-sc-G123-1-application-update-test", tenantId);
+            assertEquals(String.format("Forceful undeployment failed for the application %s",
+                    "g-sc-G123-1-application-update-test"), forceUndeployed, true);
+
+        }
+
+        boolean removed =
+                restClientTenant.removeEntity(RestConstants.APPLICATIONS, "g-sc-G123-1-application-update-test",
+                        RestConstants.APPLICATIONS_NAME);
+        assertEquals(removed, true);
+
+        ApplicationBean beanRemoved = (ApplicationBean) restClientTenant.getEntity(RestConstants.APPLICATIONS,
+                "g-sc-G123-1-application-update-test", ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
+        assertEquals(beanRemoved, null);
+
+        boolean removedGroup =
+                restClientTenant.removeEntity(RestConstants.CARTRIDGE_GROUPS, "G1-application-update-test",
+                        RestConstants.CARTRIDGE_GROUPS_NAME);
+        assertEquals(removedGroup, true);
+
+        boolean removedC1 = restClientTenant.removeEntity(RestConstants.CARTRIDGES, "c1-application-update-test",
+                RestConstants.CARTRIDGES_NAME);
+        assertEquals(removedC1, true);
+
+        boolean removedC2 = restClientTenant.removeEntity(RestConstants.CARTRIDGES, "c2-application-update-test",
+                RestConstants.CARTRIDGES_NAME);
+        assertEquals(removedC2, true);
+
+        boolean removedC3 = restClientTenant.removeEntity(RestConstants.CARTRIDGES, "c3-application-update-test",
+                RestConstants.CARTRIDGES_NAME);
+        assertEquals(removedC3, true);
+
+        boolean removedAuto = restClientTenant.removeEntity(RestConstants.AUTOSCALING_POLICIES,
+                autoscalingPolicyId, RestConstants.AUTOSCALING_POLICIES_NAME);
+        assertEquals(removedAuto, true);
+
+        boolean removedDep = restClientTenant.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
+                "deployment-policy-application-update-test", RestConstants.DEPLOYMENT_POLICIES_NAME);
+        assertEquals(removedDep, true);
+
+        boolean removedNet = restClientTenant.removeEntity(RestConstants.NETWORK_PARTITIONS,
+                "network-partition-application-update-test-1", RestConstants.NETWORK_PARTITIONS_NAME);
+        assertEquals(removedNet, false);
+
+        boolean removedN2 = restClientTenant.removeEntity(RestConstants.NETWORK_PARTITIONS,
+                "network-partition-application-update-test-2", RestConstants.NETWORK_PARTITIONS_NAME);
+        assertEquals(removedN2, false);
+
+        boolean removeAppPolicy = restClientTenant.removeEntity(RestConstants.APPLICATION_POLICIES,
+                "application-policy-application-update-test", RestConstants.APPLICATION_POLICIES_NAME);
+        assertEquals(removeAppPolicy, true);
+
+        removedNet = restClientTenant.removeEntity(RestConstants.NETWORK_PARTITIONS,
+                "network-partition-application-update-test-1", RestConstants.NETWORK_PARTITIONS_NAME);
+        assertEquals(removedNet, true);
+
+        removedN2 = restClientTenant.removeEntity(RestConstants.NETWORK_PARTITIONS,
+                "network-partition-application-update-test-2", RestConstants.NETWORK_PARTITIONS_NAME);
+        assertEquals(removedN2, true);
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/GroupStartupOrderTest.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/GroupStartupOrderTest.java b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/GroupStartupOrderTest.java
new file mode 100644
index 0000000..68fcced
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/GroupStartupOrderTest.java
@@ -0,0 +1,387 @@
+/*
+ * 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.integration.tests.application;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.stratos.common.beans.application.ApplicationBean;
+import org.apache.stratos.integration.common.RestConstants;
+import org.apache.stratos.integration.common.TopologyHandler;
+import org.apache.stratos.integration.common.Util;
+import org.apache.stratos.integration.tests.StratosIntegrationTest;
+import org.apache.stratos.messaging.domain.application.ApplicationStatus;
+import org.testng.annotations.Test;
+
+import java.util.Map;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertNull;
+import static org.testng.AssertJUnit.assertFalse;
+import static org.testng.AssertJUnit.assertTrue;
+
+/**
+ * Handling the startup order of the group
+ */
+public class GroupStartupOrderTest extends StratosIntegrationTest {
+    private static final Log log = LogFactory.getLog(SampleApplicationsTest.class);
+    private static final String RESOURCES_PATH = "/group-startup-order-test";
+    private static final int GROUP_ACTIVE_TIMEOUT = 300000;
+    private static final int NODES_START_PARALLEL_TIMEOUT = 30000;
+
+
+    @Test(timeOut = APPLICATION_TEST_TIMEOUT)
+    public void testTerminationBehavior() {
+        try {
+            log.info("----------------------Started application startup order test case------------------------");
+
+            String autoscalingPolicyId = "autoscaling-policy-group-startup-order-test";
+            TopologyHandler topologyHandler = TopologyHandler.getInstance();
+
+            boolean addedScalingPolicy =
+                    restClientAdmin.addEntity(RESOURCES_PATH + RestConstants.AUTOSCALING_POLICIES_PATH
+                                    + "/" + autoscalingPolicyId + ".json",
+                            RestConstants.AUTOSCALING_POLICIES, RestConstants.AUTOSCALING_POLICIES_NAME);
+            assertTrue(addedScalingPolicy);
+
+            boolean addedC1 = restClientAdmin.addEntity(
+                    RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "esb-group-startup-order-test.json",
+                    RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+            assertTrue(addedC1);
+
+            boolean addedC2 = restClientAdmin.addEntity(
+                    RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "php-group-startup-order-test.json",
+                    RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+            assertTrue(addedC2);
+
+            boolean addedC3 = restClientAdmin.addEntity(
+                    RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "stratos-lb-group-startup-order-test.json",
+                    RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+            assertTrue(addedC3);
+
+            boolean addedC5 = restClientAdmin.addEntity(
+                    RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "tomcat1-group-startup-order-test.json",
+                    RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+            assertTrue(addedC5);
+
+            boolean addedC6 = restClientAdmin.addEntity(
+                    RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "tomcat2-group-startup-order-test.json",
+                    RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+            assertTrue(addedC6);
+
+            boolean addedC7 = restClientAdmin.addEntity(
+                    RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "tomcat3-group-startup-order-test.json",
+                    RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+            assertTrue(addedC7);
+
+            boolean addedC8 = restClientAdmin.addEntity(
+                    RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "tomcat-group-startup-order-test.json",
+                    RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+            assertTrue(addedC8);
+
+            boolean addedG2 = restClientAdmin.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGE_GROUPS_PATH +
+                            "/" + "group6-group-startup-order-test.json", RestConstants.CARTRIDGE_GROUPS,
+                    RestConstants.CARTRIDGE_GROUPS_NAME);
+            assertTrue(addedG2);
+
+            boolean addedG3 = restClientAdmin.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGE_GROUPS_PATH +
+                            "/" + "group8-group-startup-order-test.json", RestConstants.CARTRIDGE_GROUPS,
+                    RestConstants.CARTRIDGE_GROUPS_NAME);
+            assertTrue(addedG3);
+
+            boolean addedN1 = restClientAdmin.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
+                            "network-partition-group-startup-order-test-1.json",
+                    RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
+            assertTrue(addedN1);
+
+            boolean addedDep = restClientAdmin.addEntity(RESOURCES_PATH + RestConstants.DEPLOYMENT_POLICIES_PATH + "/" +
+                            "deployment-policy-group-startup-order-test.json",
+                    RestConstants.DEPLOYMENT_POLICIES, RestConstants.DEPLOYMENT_POLICIES_NAME);
+            assertTrue(addedDep);
+
+            boolean added = restClientAdmin.addEntity(RESOURCES_PATH + RestConstants.APPLICATIONS_PATH + "/" +
+                            "group-startup-order-test.json", RestConstants.APPLICATIONS,
+                    RestConstants.APPLICATIONS_NAME);
+            assertTrue(added);
+
+            ApplicationBean bean = (ApplicationBean) restClientAdmin.getEntity(RestConstants.APPLICATIONS,
+                    "group-startup-order-test", ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
+            assertEquals(bean.getApplicationId(), "group-startup-order-test");
+
+            boolean addAppPolicy =
+                    restClientAdmin.addEntity(RESOURCES_PATH + RestConstants.APPLICATION_POLICIES_PATH + "/" +
+                                    "application-policy-group-startup-order-test.json",
+                            RestConstants.APPLICATION_POLICIES,
+                            RestConstants.APPLICATION_POLICIES_NAME);
+            assertTrue(addAppPolicy);
+
+            //deploy the application
+            String resourcePath = RestConstants.APPLICATIONS + "/" + "group-startup-order-test" +
+                    RestConstants.APPLICATIONS_DEPLOY + "/" + "application-policy-group-startup-order-test";
+            boolean deployed = restClientAdmin.deployEntity(resourcePath,
+                    RestConstants.APPLICATIONS_NAME);
+            assertTrue(deployed);
+
+            String group6 = topologyHandler.generateId(bean.getApplicationId(),
+                    "my-group6-group-startup-order-test", bean.getApplicationId() + "-1");
+
+            String group8 = topologyHandler.generateId(bean.getApplicationId(),
+                    "my-group8-group-startup-order-test", bean.getApplicationId() + "-1");
+
+            String lb = topologyHandler.getClusterIdFromAlias(bean.getApplicationId(),
+                    "my-stratos-lb-group-startup-order-test", Util.SUPER_TENANT_ID);
+
+            String tomcat = topologyHandler.
+                    getClusterIdFromAlias(bean.getApplicationId(),
+                            "my-tomcat-group-startup-order-test", Util.SUPER_TENANT_ID);
+
+            assertCreationOfNodes(lb, tomcat);
+
+            assertCreationOfNodes(tomcat, group6);
+
+            assertCreationOfNodesInParallel(group6, group8);
+
+            assertCreationOfNodes(tomcat, group8);
+
+            String group7 = topologyHandler.generateId(bean.getApplicationId(),
+                    "my-group7-group-startup-order-test", bean.getApplicationId() + "-1");
+
+            String groupTom2 = topologyHandler.generateId(bean.getApplicationId(),
+                    "my-group6-group-tom2-group-startup-order-test", bean.getApplicationId() + "-1");
+
+            assertCreationOfNodesInParallel(group7, groupTom2);
+
+            String group7Tomcat = topologyHandler.
+                    getClusterIdFromAlias(bean.getApplicationId(),
+                            "my-group7-tomcat-group-startup-order-test", Util.SUPER_TENANT_ID);
+
+            String group7Tomcat1 = topologyHandler.
+                    getClusterIdFromAlias(bean.getApplicationId(),
+                            "my-group7-tomcat1-group-startup-order-test", Util.SUPER_TENANT_ID);
+
+            assertCreationOfNodes(group7Tomcat, group7Tomcat1);
+
+            String groupTom2Tomcat2 = topologyHandler.
+                    getClusterIdFromAlias(bean.getApplicationId(),
+                            "my-group-tom2-tomcat2-group-startup-order-test", Util.SUPER_TENANT_ID);
+
+            String groupTom2Tomcat3 = topologyHandler.
+                    getClusterIdFromAlias(bean.getApplicationId(),
+                            "my-group-tom2-tomcat3-group-startup-order-test", Util.SUPER_TENANT_ID);
+
+            assertCreationOfNodes(groupTom2Tomcat2, groupTom2Tomcat3);
+
+            String group8Tomcat2 = topologyHandler.
+                    getClusterIdFromAlias(bean.getApplicationId(),
+                            "my-tomcat2-group8-group-startup-order-test", Util.SUPER_TENANT_ID);
+
+            String group8Tomcat = topologyHandler.
+                    getClusterIdFromAlias(bean.getApplicationId(),
+                            "my-tomcat-group8-group-startup-order-test", Util.SUPER_TENANT_ID);
+
+            assertCreationOfNodesInParallel(group8Tomcat2, group8Tomcat);
+
+            //Application active handling
+            topologyHandler.assertApplicationStatus(bean.getApplicationId(),
+                    ApplicationStatus.Active, Util.SUPER_TENANT_ID);
+
+            //Group active handling
+            topologyHandler.assertGroupActivation(bean.getApplicationId(), Util.SUPER_TENANT_ID);
+
+            //Cluster active handling
+            topologyHandler.assertClusterActivation(bean.getApplicationId(), Util.SUPER_TENANT_ID);
+
+            boolean removedGroup = restClientAdmin.removeEntity(RestConstants.CARTRIDGE_GROUPS,
+                    "group6-group-startup-order-test",
+                    RestConstants.CARTRIDGE_GROUPS_NAME);
+            assertFalse(removedGroup);
+
+            removedGroup = restClientAdmin.removeEntity(RestConstants.CARTRIDGE_GROUPS,
+                    "group8-group-startup-order-test",
+                    RestConstants.CARTRIDGE_GROUPS_NAME);
+            assertFalse(removedGroup);
+
+            boolean removedAuto = restClientAdmin.removeEntity(RestConstants.AUTOSCALING_POLICIES,
+                    autoscalingPolicyId, RestConstants.AUTOSCALING_POLICIES_NAME);
+            assertFalse(removedAuto);
+
+            boolean removedNet = restClientAdmin.removeEntity(RestConstants.NETWORK_PARTITIONS,
+                    "network-partition-group-startup-order-test-1",
+                    RestConstants.NETWORK_PARTITIONS_NAME);
+            //Trying to remove the used network partition
+            assertFalse(removedNet);
+
+            boolean removedDep = restClientAdmin.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
+                    "deployment-policy-group-startup-order-test", RestConstants.DEPLOYMENT_POLICIES_NAME);
+            assertFalse(removedDep);
+
+            //Un-deploying the application
+            String resourcePathUndeploy = RestConstants.APPLICATIONS + "/" + "group-startup-order-test" +
+                    RestConstants.APPLICATIONS_UNDEPLOY;
+
+            boolean unDeployed = restClientAdmin.undeployEntity(resourcePathUndeploy,
+                    RestConstants.APPLICATIONS_NAME);
+            assertTrue(unDeployed);
+
+            boolean undeploy =
+                    topologyHandler.assertApplicationUndeploy("group-startup-order-test", Util.SUPER_TENANT_ID);
+            if (!undeploy) {
+                //Need to forcefully undeploy the application
+                log.info("Force undeployment is going to start for the [application] " + "group-startup-order-test");
+
+                restClientAdmin.undeployEntity(RestConstants.APPLICATIONS + "/" + "group-startup-order-test" +
+                        RestConstants.APPLICATIONS_UNDEPLOY + "?force=true", RestConstants.APPLICATIONS);
+
+                boolean forceUndeployed =
+                        topologyHandler.assertApplicationUndeploy("group-startup-order-test", Util.SUPER_TENANT_ID);
+                assertTrue(String.format("Forceful undeployment failed for the application %s",
+                        "group-startup-order-test"), forceUndeployed);
+
+            }
+
+            boolean removed = restClientAdmin.removeEntity(RestConstants.APPLICATIONS, "group-startup-order-test",
+                    RestConstants.APPLICATIONS_NAME);
+            assertTrue(removed);
+
+            ApplicationBean beanRemoved = (ApplicationBean) restClientAdmin.getEntity(RestConstants.APPLICATIONS,
+                    "group-startup-order-test", ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
+            assertNull(beanRemoved);
+
+            removedGroup = restClientAdmin.removeEntity(RestConstants.CARTRIDGE_GROUPS,
+                    "group6-group-startup-order-test",
+                    RestConstants.CARTRIDGE_GROUPS_NAME);
+            assertTrue(removedGroup);
+
+            removedGroup = restClientAdmin.removeEntity(RestConstants.CARTRIDGE_GROUPS,
+                    "group8-group-startup-order-test",
+                    RestConstants.CARTRIDGE_GROUPS_NAME);
+            assertTrue(removedGroup);
+
+            boolean removedC1 =
+                    restClientAdmin.removeEntity(RestConstants.CARTRIDGES, "stratos-lb-group-startup-order-test",
+                            RestConstants.CARTRIDGES_NAME);
+            assertTrue(removedC1);
+
+            boolean removedC2 =
+                    restClientAdmin.removeEntity(RestConstants.CARTRIDGES, "tomcat-group-startup-order-test",
+                            RestConstants.CARTRIDGES_NAME);
+            assertTrue(removedC2);
+
+            boolean removedC3 =
+                    restClientAdmin.removeEntity(RestConstants.CARTRIDGES, "tomcat1-group-startup-order-test",
+                            RestConstants.CARTRIDGES_NAME);
+            assertTrue(removedC3);
+
+            boolean removedC4 =
+                    restClientAdmin.removeEntity(RestConstants.CARTRIDGES, "tomcat2-group-startup-order-test",
+                            RestConstants.CARTRIDGES_NAME);
+            assertTrue(removedC4);
+
+            boolean removedC5 =
+                    restClientAdmin.removeEntity(RestConstants.CARTRIDGES, "tomcat3-group-startup-order-test",
+                            RestConstants.CARTRIDGES_NAME);
+            assertTrue(removedC5);
+
+            removedAuto = restClientAdmin.removeEntity(RestConstants.AUTOSCALING_POLICIES,
+                    autoscalingPolicyId, RestConstants.AUTOSCALING_POLICIES_NAME);
+            assertTrue(removedAuto);
+
+            removedDep = restClientAdmin.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
+                    "deployment-policy-group-startup-order-test", RestConstants.DEPLOYMENT_POLICIES_NAME);
+            assertTrue(removedDep);
+
+            removedNet = restClientAdmin.removeEntity(RestConstants.NETWORK_PARTITIONS,
+                    "network-partition-group-startup-order-test-1", RestConstants.NETWORK_PARTITIONS_NAME);
+            assertFalse(removedNet);
+
+            boolean removeAppPolicy = restClientAdmin.removeEntity(RestConstants.APPLICATION_POLICIES,
+                    "application-policy-group-startup-order-test", RestConstants.APPLICATION_POLICIES_NAME);
+            assertTrue(removeAppPolicy);
+
+            removedNet = restClientAdmin.removeEntity(RestConstants.NETWORK_PARTITIONS,
+                    "network-partition-group-startup-order-test-1", RestConstants.NETWORK_PARTITIONS_NAME);
+            assertTrue(removedNet);
+
+            log.info(
+                    "-------------------------------Ended application termination behavior test case-------------------------------");
+
+        }
+        catch (Exception e) {
+            log.error("An error occurred while handling  application termination behavior", e);
+            assertTrue("An error occurred while handling  application termination behavior", false);
+        }
+    }
+
+    private void assertCreationOfNodes(String firstNodeId, String secondNodeId) {
+        //group1 started first, then cluster started later
+        long startTime = System.currentTimeMillis();
+        Map<String, Long> activeMembers = TopologyHandler.getInstance().getActivateddMembers();
+        Map<String, Long> createdMembers = TopologyHandler.getInstance().getCreatedMembers();
+        //Active member should be available at the time cluster is started to create.
+        while (!activeMembers.containsKey(firstNodeId)) {
+            try {
+                Thread.sleep(1000);
+            }
+            catch (InterruptedException ignored) {
+            }
+            activeMembers = TopologyHandler.getInstance().getActivateddMembers();
+            if ((System.currentTimeMillis() - startTime) > GROUP_ACTIVE_TIMEOUT) {
+                break;
+            }
+        }
+        assertTrue(activeMembers.containsKey(firstNodeId));
+
+        while (!createdMembers.containsKey(secondNodeId)) {
+            try {
+                Thread.sleep(1000);
+            }
+            catch (InterruptedException ignore) {
+            }
+            createdMembers = TopologyHandler.getInstance().getCreatedMembers();
+            if ((System.currentTimeMillis() - startTime) > GROUP_ACTIVE_TIMEOUT) {
+                break;
+            }
+        }
+
+        assertTrue(createdMembers.containsKey(secondNodeId));
+
+        assertTrue(createdMembers.get(secondNodeId) > activeMembers.get(firstNodeId));
+    }
+
+    private void assertCreationOfNodesInParallel(String firstNodeId, String secondNodeId) {
+        //group1 started first, then cluster started later
+        long startTime = System.currentTimeMillis();
+        Map<String, Long> createdMembers = TopologyHandler.getInstance().getCreatedMembers();
+        //Active member should be available at the time cluster is started to create.
+
+        while (!(createdMembers.containsKey(firstNodeId) && createdMembers.containsKey(firstNodeId))) {
+            try {
+                Thread.sleep(1000);
+            }
+            catch (InterruptedException ignored) {
+            }
+            createdMembers = TopologyHandler.getInstance().getCreatedMembers();
+            if ((System.currentTimeMillis() - startTime) > NODES_START_PARALLEL_TIMEOUT) {
+                break;
+            }
+        }
+        assertTrue(createdMembers.containsKey(firstNodeId));
+        assertTrue(createdMembers.containsKey(firstNodeId));
+
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/GroupTerminationBehaviorTest.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/GroupTerminationBehaviorTest.java b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/GroupTerminationBehaviorTest.java
new file mode 100644
index 0000000..453e9c8
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/GroupTerminationBehaviorTest.java
@@ -0,0 +1,430 @@
+/*
+ * 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.integration.tests.application;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.stratos.common.beans.application.ApplicationBean;
+import org.apache.stratos.common.beans.cartridge.CartridgeGroupBean;
+import org.apache.stratos.common.beans.policy.deployment.ApplicationPolicyBean;
+import org.apache.stratos.integration.common.RestConstants;
+import org.apache.stratos.integration.common.TopologyHandler;
+import org.apache.stratos.integration.tests.StratosIntegrationTest;
+import org.apache.stratos.messaging.domain.application.Application;
+import org.apache.stratos.messaging.domain.application.ApplicationStatus;
+import org.testng.annotations.Test;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertNull;
+import static org.testng.AssertJUnit.assertFalse;
+import static org.testng.AssertJUnit.assertTrue;
+
+/**
+ * Handling the termination behavior of the group
+ */
+public class GroupTerminationBehaviorTest extends StratosIntegrationTest {
+    private static final Log log = LogFactory.getLog(GroupTerminationBehaviorTest.class);
+    private static final String RESOURCES_PATH = "/group-termination-behavior-test";
+    private static final int GROUP_INACTIVE_TIMEOUT = 300000;
+
+    @Test(timeOut = APPLICATION_TEST_TIMEOUT)
+    public void testTerminationBehavior() {
+        try {
+            log.info("--------------------Started application termination behavior test case------------------------");
+
+            String autoscalingPolicyId = "autoscaling-policy-group-termination-behavior-test";
+            TopologyHandler topologyHandler = TopologyHandler.getInstance();
+
+            boolean addedScalingPolicy =
+                    restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.AUTOSCALING_POLICIES_PATH
+                                    + "/" + autoscalingPolicyId + ".json",
+                            RestConstants.AUTOSCALING_POLICIES, RestConstants.AUTOSCALING_POLICIES_NAME);
+            assertTrue(addedScalingPolicy);
+
+            boolean addedC1 = restClientTenant1.addEntity(
+                    RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "c1-group-termination-behavior-test.json",
+                    RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+            assertTrue(addedC1);
+
+            boolean addedC2 = restClientTenant1.addEntity(
+                    RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "c2-group-termination-behavior-test.json",
+                    RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+            assertTrue(addedC2);
+
+            boolean addedC3 = restClientTenant1.addEntity(
+                    RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "c3-group-termination-behavior-test.json",
+                    RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+            assertTrue(addedC3);
+
+            boolean addedC4 = restClientTenant1.addEntity(
+                    RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "c4-group-termination-behavior-test.json",
+                    RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+            assertTrue(addedC4);
+
+            boolean addedG1 = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGE_GROUPS_PATH +
+                            "/" + "cartridge-groups-group-termination-behavior-test.json",
+                    RestConstants.CARTRIDGE_GROUPS,
+                    RestConstants.CARTRIDGE_GROUPS_NAME);
+            assertTrue(addedG1);
+
+            CartridgeGroupBean beanG1 = (CartridgeGroupBean) restClientTenant1.
+                    getEntity(RestConstants.CARTRIDGE_GROUPS, "g-sc-G4-group-termination-behavior-test",
+                            CartridgeGroupBean.class, RestConstants.CARTRIDGE_GROUPS_NAME);
+            assertEquals(beanG1.getName(), "g-sc-G4-group-termination-behavior-test");
+
+            boolean addedN1 = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
+                            "network-partition-group-termination-behavior-test-1.json",
+                    RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
+            assertTrue(addedN1);
+
+            boolean addedDep =
+                    restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.DEPLOYMENT_POLICIES_PATH + "/" +
+                                    "deployment-policy-group-termination-behavior-test.json",
+                            RestConstants.DEPLOYMENT_POLICIES, RestConstants.DEPLOYMENT_POLICIES_NAME);
+            assertTrue(addedDep);
+
+            boolean added = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.APPLICATIONS_PATH + "/" +
+                            "group-termination-behavior-test.json", RestConstants.APPLICATIONS,
+                    RestConstants.APPLICATIONS_NAME);
+            assertTrue(added);
+
+            ApplicationBean bean = (ApplicationBean) restClientTenant1.getEntity(RestConstants.APPLICATIONS,
+                    "group-termination-behavior-test", ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
+            assertEquals(bean.getApplicationId(), "group-termination-behavior-test");
+
+            boolean addAppPolicy =
+                    restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.APPLICATION_POLICIES_PATH + "/" +
+                                    "application-policy-group-termination-behavior-test.json",
+                            RestConstants.APPLICATION_POLICIES,
+                            RestConstants.APPLICATION_POLICIES_NAME);
+            assertTrue(addAppPolicy);
+
+            ApplicationPolicyBean policyBean = (ApplicationPolicyBean) restClientTenant1.getEntity(
+                    RestConstants.APPLICATION_POLICIES,
+                    "application-policy-group-termination-behavior-test", ApplicationPolicyBean.class,
+                    RestConstants.APPLICATION_POLICIES_NAME);
+
+            //deploy the application
+            String resourcePath = RestConstants.APPLICATIONS + "/" + "group-termination-behavior-test" +
+                    RestConstants.APPLICATIONS_DEPLOY + "/" + "application-policy-group-termination-behavior-test";
+            boolean deployed = restClientTenant1.deployEntity(resourcePath,
+                    RestConstants.APPLICATIONS_NAME);
+            assertTrue(deployed);
+
+            //Application active handling
+            topologyHandler.assertApplicationStatus(bean.getApplicationId(),
+                    ApplicationStatus.Active, tenant1Id);
+
+            Application depApplication = topologyHandler.getApplication(bean.getApplicationId(), tenant1Id);
+            String groupId = topologyHandler.generateId(depApplication.getUniqueIdentifier(),
+                    "g-G1-1x0-group-termination-behavior-test", depApplication.getUniqueIdentifier() + "-1");
+
+            String clusterIdC3 = topologyHandler.
+                    getClusterIdFromAlias(bean.getApplicationId(),
+                            "c3-1x0-group-termination-behavior-test", tenant1Id);
+
+            String clusterIdC4 = topologyHandler.
+                    getClusterIdFromAlias(bean.getApplicationId(),
+                            "c4-1x0-group-termination-behavior-test", tenant1Id);
+
+            String clusterIdC2 = topologyHandler.
+                    getClusterIdFromAlias(bean.getApplicationId(),
+                            "c2-1x0-group-termination-behavior-test", tenant1Id);
+
+            assertCreationOfNodes(groupId, clusterIdC2);
+            assertCreationOfNodes(clusterIdC3, clusterIdC4);
+
+
+            //Group active handling
+            topologyHandler.assertGroupActivation(bean.getApplicationId(), tenant1Id);
+
+            //Cluster active handling
+            topologyHandler.assertClusterActivation(bean.getApplicationId(), tenant1Id);
+
+            //Terminate one member in the cluster
+            TopologyHandler.getInstance().terminateMemberFromCluster(
+                    "c3-group-termination-behavior-test",
+                    bean.getApplicationId(),
+                    mockIaasApiClient, tenant1Id);
+
+            List<String> clusterIds = new ArrayList<String>();
+            clusterIds.add(clusterIdC3);
+            clusterIds.add(clusterIdC4);
+            clusterIds.add(clusterIdC2);
+
+
+            //Application active handling
+            topologyHandler.assertApplicationStatus(bean.getApplicationId(),
+                    ApplicationStatus.Active, tenant1Id);
+
+            assertCreationOfNodes(groupId, clusterIdC2);
+
+            assertCreationOfNodes(clusterIdC3, clusterIdC4);
+
+            //Group active handling
+            topologyHandler.assertGroupActivation(bean.getApplicationId(), tenant1Id);
+
+            //Cluster active handling
+            topologyHandler.assertClusterActivation(bean.getApplicationId(), tenant1Id);
+
+            boolean removedGroup = restClientTenant1.removeEntity(RestConstants.CARTRIDGE_GROUPS,
+                    "g-sc-G4-group-termination-behavior-test",
+                    RestConstants.CARTRIDGE_GROUPS_NAME);
+            assertFalse(removedGroup);
+
+            boolean removedAuto = restClientTenant1.removeEntity(RestConstants.AUTOSCALING_POLICIES,
+                    autoscalingPolicyId, RestConstants.AUTOSCALING_POLICIES_NAME);
+            assertFalse(removedAuto);
+
+            boolean removedNet = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
+                    "network-partition-group-termination-behavior-test-1",
+                    RestConstants.NETWORK_PARTITIONS_NAME);
+            //Trying to remove the used network partition
+            assertFalse(removedNet);
+
+            boolean removedDep = restClientTenant1.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
+                    "deployment-policy-group-termination-behavior-test", RestConstants.DEPLOYMENT_POLICIES_NAME);
+            assertFalse(removedDep);
+
+            //Un-deploying the application
+            String resourcePathUndeploy = RestConstants.APPLICATIONS + "/" + "group-termination-behavior-test" +
+                    RestConstants.APPLICATIONS_UNDEPLOY;
+
+            boolean unDeployed = restClientTenant1.undeployEntity(resourcePathUndeploy,
+                    RestConstants.APPLICATIONS_NAME);
+            assertTrue(unDeployed);
+
+            boolean undeploy = topologyHandler.assertApplicationUndeploy("group-termination-behavior-test", tenant1Id);
+            if (!undeploy) {
+                //Need to forcefully undeploy the application
+                log.info("Force undeployment is going to start for the [application] " +
+                        "group-termination-behavior-test");
+
+                restClientTenant1.undeployEntity(RestConstants.APPLICATIONS + "/" + "group-termination-behavior-test" +
+                        RestConstants.APPLICATIONS_UNDEPLOY + "?force=true", RestConstants.APPLICATIONS);
+
+                boolean forceUndeployed =
+                        topologyHandler.assertApplicationUndeploy("group-termination-behavior-test", tenant1Id);
+                assertTrue(String.format("Forceful undeployment failed for the application %s",
+                        "group-termination-behavior-test"), forceUndeployed);
+
+            }
+
+            boolean removed =
+                    restClientTenant1.removeEntity(RestConstants.APPLICATIONS, "group-termination-behavior-test",
+                            RestConstants.APPLICATIONS_NAME);
+            assertTrue(removed);
+
+            ApplicationBean beanRemoved = (ApplicationBean) restClientTenant1.getEntity(RestConstants.APPLICATIONS,
+                    "group-termination-behavior-test", ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
+            assertNull(beanRemoved);
+
+            removedGroup = restClientTenant1.removeEntity(RestConstants.CARTRIDGE_GROUPS,
+                    "g-sc-G4-group-termination-behavior-test",
+                    RestConstants.CARTRIDGE_GROUPS_NAME);
+            assertTrue(removedGroup);
+
+            boolean removedC1 =
+                    restClientTenant1.removeEntity(RestConstants.CARTRIDGES, "c1-group-termination-behavior-test",
+                            RestConstants.CARTRIDGES_NAME);
+            assertTrue(removedC1);
+
+            boolean removedC2 =
+                    restClientTenant1.removeEntity(RestConstants.CARTRIDGES, "c2-group-termination-behavior-test",
+                            RestConstants.CARTRIDGES_NAME);
+            assertTrue(removedC2);
+
+            boolean removedC3 =
+                    restClientTenant1.removeEntity(RestConstants.CARTRIDGES, "c3-group-termination-behavior-test",
+                            RestConstants.CARTRIDGES_NAME);
+            assertTrue(removedC3);
+
+            boolean removedC4 =
+                    restClientTenant1.removeEntity(RestConstants.CARTRIDGES, "c4-group-termination-behavior-test",
+                            RestConstants.CARTRIDGES_NAME);
+            assertTrue(removedC4);
+
+            removedAuto = restClientTenant1.removeEntity(RestConstants.AUTOSCALING_POLICIES,
+                    autoscalingPolicyId, RestConstants.AUTOSCALING_POLICIES_NAME);
+            assertTrue(removedAuto);
+
+            removedDep = restClientTenant1.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
+                    "deployment-policy-group-termination-behavior-test", RestConstants.DEPLOYMENT_POLICIES_NAME);
+            assertTrue(removedDep);
+
+            removedNet = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
+                    "network-partition-group-termination-behavior-test-1", RestConstants.NETWORK_PARTITIONS_NAME);
+            assertFalse(removedNet);
+
+            boolean removeAppPolicy = restClientTenant1.removeEntity(RestConstants.APPLICATION_POLICIES,
+                    "application-policy-group-termination-behavior-test", RestConstants.APPLICATION_POLICIES_NAME);
+            assertTrue(removeAppPolicy);
+
+            removedNet = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
+                    "network-partition-group-termination-behavior-test-1", RestConstants.NETWORK_PARTITIONS_NAME);
+            assertTrue(removedNet);
+
+            log.info("------------------Ended application termination behavior test case-------------------------");
+
+        }
+        catch (Exception e) {
+            log.error("An error occurred while handling  application termination behavior", e);
+            assertTrue("An error occurred while handling  application termination behavior", false);
+        }
+    }
+
+    private void assertGroupInactive(String groupId, String clusterId) {
+        long startTime = System.currentTimeMillis();
+        Map<String, Long> inActiveMap = TopologyHandler.getInstance().getInActiveMembers();
+
+        while (!inActiveMap.containsKey(clusterId)) {
+            try {
+                Thread.sleep(1000);
+            }
+            catch (InterruptedException ignore) {
+            }
+            inActiveMap = TopologyHandler.getInstance().getInActiveMembers();
+            if ((System.currentTimeMillis() - startTime) > GROUP_INACTIVE_TIMEOUT) {
+                break;
+            }
+        }
+        assertTrue(inActiveMap.containsKey(clusterId));
+
+        while (!inActiveMap.containsKey(groupId)) {
+            try {
+                Thread.sleep(1000);
+            }
+            catch (InterruptedException ignore) {
+            }
+            inActiveMap = TopologyHandler.getInstance().getInActiveMembers();
+            if ((System.currentTimeMillis() - startTime) > GROUP_INACTIVE_TIMEOUT) {
+                break;
+            }
+        }
+        assertTrue(inActiveMap.containsKey(groupId));
+
+    }
+
+    private void assertTerminatingOfNodes(String groupId, List<String> clusterIds) {
+        Map<String, Long> terminatingMembers = TopologyHandler.getInstance().getTerminatingMembers();
+        for (String clusterId : clusterIds) {
+            long startTime = System.currentTimeMillis();
+            while (!terminatingMembers.containsKey(clusterId)) {
+                try {
+                    Thread.sleep(1000);
+                }
+                catch (InterruptedException ignore) {
+                }
+                terminatingMembers = TopologyHandler.getInstance().getTerminatingMembers();
+                if ((System.currentTimeMillis() - startTime) > GROUP_INACTIVE_TIMEOUT) {
+                    break;
+                }
+            }
+            assertTrue(terminatingMembers.containsKey(groupId));
+        }
+        long startTime = System.currentTimeMillis();
+        while (!terminatingMembers.containsKey(groupId)) {
+            try {
+                Thread.sleep(1000);
+            }
+            catch (InterruptedException ignore) {
+            }
+            terminatingMembers = TopologyHandler.getInstance().getTerminatingMembers();
+            if ((System.currentTimeMillis() - startTime) > GROUP_INACTIVE_TIMEOUT) {
+                break;
+            }
+        }
+        assertTrue(terminatingMembers.containsKey(groupId));
+
+    }
+
+    private void assertTerminationOfNodes(String groupId, List<String> clusterIds) {
+        long startTime = System.currentTimeMillis();
+        Map<String, Long> terminatedMembers = TopologyHandler.getInstance().getTerminatedMembers();
+
+        for (String clusterId : clusterIds) {
+            while (!terminatedMembers.containsKey(clusterId)) {
+                try {
+                    Thread.sleep(1000);
+                }
+                catch (InterruptedException ignore) {
+                }
+                terminatedMembers = TopologyHandler.getInstance().getTerminatedMembers();
+                if ((System.currentTimeMillis() - startTime) > GROUP_INACTIVE_TIMEOUT) {
+                    break;
+                }
+            }
+            assertTrue(terminatedMembers.containsKey(clusterId));
+        }
+
+        while (!terminatedMembers.containsKey(groupId)) {
+            try {
+                Thread.sleep(1000);
+            }
+            catch (InterruptedException ignore) {
+            }
+            terminatedMembers = TopologyHandler.getInstance().getTerminatedMembers();
+            if ((System.currentTimeMillis() - startTime) > GROUP_INACTIVE_TIMEOUT) {
+                break;
+            }
+        }
+
+        assertTrue(terminatedMembers.containsKey(groupId));
+    }
+
+    private void assertCreationOfNodes(String firstNodeId, String secondNodeId) {
+        //group1 started first, then cluster started later
+        long startTime = System.currentTimeMillis();
+        Map<String, Long> activeMembers = TopologyHandler.getInstance().getActivateddMembers();
+        Map<String, Long> createdMembers = TopologyHandler.getInstance().getCreatedMembers();
+        //Active member should be available at the time cluster is started to create.
+        while (!activeMembers.containsKey(firstNodeId)) {
+            try {
+                Thread.sleep(1000);
+            }
+            catch (InterruptedException ignored) {
+            }
+            activeMembers = TopologyHandler.getInstance().getActivateddMembers();
+            if ((System.currentTimeMillis() - startTime) > GROUP_INACTIVE_TIMEOUT) {
+                break;
+            }
+        }
+        assertTrue(activeMembers.containsKey(firstNodeId));
+
+        while (!createdMembers.containsKey(secondNodeId)) {
+            try {
+                Thread.sleep(1000);
+            }
+            catch (InterruptedException ignored) {
+            }
+            createdMembers = TopologyHandler.getInstance().getCreatedMembers();
+            if ((System.currentTimeMillis() - startTime) > GROUP_INACTIVE_TIMEOUT) {
+                break;
+            }
+        }
+
+        assertTrue(createdMembers.containsKey(secondNodeId));
+
+        assertTrue(createdMembers.get(secondNodeId) > activeMembers.get(firstNodeId));
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/c0664270/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/PartitionOneAfterAnotherClusterTest.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/PartitionOneAfterAnotherClusterTest.java b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/PartitionOneAfterAnotherClusterTest.java
new file mode 100644
index 0000000..fe5ef73
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/PartitionOneAfterAnotherClusterTest.java
@@ -0,0 +1,300 @@
+/*
+ * 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.integration.tests.application;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.stratos.common.beans.application.ApplicationBean;
+import org.apache.stratos.common.beans.policy.deployment.ApplicationPolicyBean;
+import org.apache.stratos.integration.common.RestConstants;
+import org.apache.stratos.integration.common.TopologyHandler;
+import org.apache.stratos.integration.tests.StratosIntegrationTest;
+import org.apache.stratos.messaging.domain.application.Application;
+import org.apache.stratos.messaging.domain.application.ApplicationStatus;
+import org.apache.stratos.messaging.domain.application.ClusterDataHolder;
+import org.apache.stratos.messaging.domain.instance.ClusterInstance;
+import org.apache.stratos.messaging.domain.topology.Cluster;
+import org.apache.stratos.messaging.domain.topology.Member;
+import org.apache.stratos.messaging.domain.topology.Service;
+import org.apache.stratos.messaging.message.receiver.application.ApplicationManager;
+import org.apache.stratos.messaging.message.receiver.topology.TopologyManager;
+import org.testng.annotations.Test;
+
+import java.util.*;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.AssertJUnit.assertNotNull;
+import static org.testng.AssertJUnit.assertTrue;
+
+/**
+ * This will handle the scale-up and scale-down of a particular cluster bursting test cases
+ */
+public class PartitionOneAfterAnotherClusterTest extends StratosIntegrationTest {
+    private static final Log log = LogFactory.getLog(SampleApplicationsTest.class);
+    private static final String RESOURCES_PATH = "/partition-round-robin-cluster-test";
+
+
+    @Test(timeOut = APPLICATION_TEST_TIMEOUT)
+    public void testDeployApplication() {
+        try {
+            log.info("-------------------Started Partition One after another test case----------------------");
+
+            String autoscalingPolicyId = "autoscaling-policy-3";
+
+            boolean addedScalingPolicy =
+                    restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.AUTOSCALING_POLICIES_PATH
+                                    + "/" + autoscalingPolicyId + ".json",
+                            RestConstants.AUTOSCALING_POLICIES, RestConstants.AUTOSCALING_POLICIES_NAME);
+            assertEquals(addedScalingPolicy, true);
+
+            boolean addedC1 =
+                    restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "c7.json",
+                            RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+            assertEquals(addedC1, true);
+
+            boolean addedN1 = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
+                            "network-partition-11.json",
+                    RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
+            assertEquals(addedN1, true);
+
+            boolean addedDep =
+                    restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.DEPLOYMENT_POLICIES_PATH + "/" +
+                                    "deployment-policy-5.json",
+                            RestConstants.DEPLOYMENT_POLICIES, RestConstants.DEPLOYMENT_POLICIES_NAME);
+            assertEquals(addedDep, true);
+
+            boolean added = restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.APPLICATIONS_PATH + "/" +
+                            "single-cluster-scaling-test.json", RestConstants.APPLICATIONS,
+                    RestConstants.APPLICATIONS_NAME);
+            assertEquals(added, true);
+
+            ApplicationBean bean = (ApplicationBean) restClientTenant1.getEntity(RestConstants.APPLICATIONS,
+                    "single-cluster-scaling-test", ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
+            assertEquals(bean.getApplicationId(), "single-cluster-scaling-test");
+
+            boolean addAppPolicy =
+                    restClientTenant1.addEntity(RESOURCES_PATH + RestConstants.APPLICATION_POLICIES_PATH + "/" +
+                                    "application-policy-4.json", RestConstants.APPLICATION_POLICIES,
+                            RestConstants.APPLICATION_POLICIES_NAME);
+            assertEquals(addAppPolicy, true);
+
+            ApplicationPolicyBean policyBean = (ApplicationPolicyBean) restClientTenant1.getEntity(
+                    RestConstants.APPLICATION_POLICIES,
+                    "application-policy-4", ApplicationPolicyBean.class,
+                    RestConstants.APPLICATION_POLICIES_NAME);
+
+            //deploy the application
+            String resourcePath = RestConstants.APPLICATIONS + "/" + "single-cluster-scaling-test" +
+                    RestConstants.APPLICATIONS_DEPLOY + "/" + "application-policy-4";
+            boolean deployed = restClientTenant1.deployEntity(resourcePath,
+                    RestConstants.APPLICATIONS_NAME);
+            assertEquals(deployed, true);
+
+            //Application active handling
+            TopologyHandler.getInstance().assertApplicationStatus(bean.getApplicationId(),
+                    ApplicationStatus.Active, tenant1Id);
+
+            //Cluster active handling
+            TopologyHandler.getInstance().assertClusterActivation(bean.getApplicationId(), tenant1Id);
+
+            //Verifying whether members got created using round robin algorithm
+            assertClusterWithRoundRobinAlgorithm(bean.getApplicationId());
+
+            //Removing one member from cluster and check for auto healing
+
+
+            boolean removedAuto = restClientTenant1.removeEntity(RestConstants.AUTOSCALING_POLICIES,
+                    autoscalingPolicyId, RestConstants.AUTOSCALING_POLICIES_NAME);
+            assertEquals(removedAuto, false);
+
+            boolean removedNet = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
+                    "network-partition-11",
+                    RestConstants.NETWORK_PARTITIONS_NAME);
+            //Trying to remove the used network partition
+            assertEquals(removedNet, false);
+
+            boolean removedDep = restClientTenant1.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
+                    "deployment-policy-5", RestConstants.DEPLOYMENT_POLICIES_NAME);
+            assertEquals(removedDep, false);
+
+            //Un-deploying the application
+            String resourcePathUndeploy = RestConstants.APPLICATIONS + "/" + "single-cluster-scaling-test" +
+                    RestConstants.APPLICATIONS_UNDEPLOY;
+
+            boolean unDeployed = restClientTenant1.undeployEntity(resourcePathUndeploy,
+                    RestConstants.APPLICATIONS_NAME);
+            assertEquals(unDeployed, true);
+
+            boolean undeploy =
+                    TopologyHandler.getInstance().assertApplicationUndeploy("single-cluster-scaling-test", tenant1Id);
+            if (!undeploy) {
+                //Need to forcefully undeploy the application
+                log.info("Force undeployment is going to start for the [application] " + "single-cluster-scaling-test");
+
+                restClientTenant1.undeployEntity(RestConstants.APPLICATIONS + "/" + "single-cluster-scaling-test" +
+                        RestConstants.APPLICATIONS_UNDEPLOY + "?force=true", RestConstants.APPLICATIONS);
+
+                boolean forceUndeployed = TopologyHandler.getInstance()
+                        .assertApplicationUndeploy("single-cluster-scaling-test", tenant1Id);
+                assertEquals(forceUndeployed, true, String.format("Forceful undeployment failed for the application %s",
+                        "single-cluster-scaling-test"));
+
+            }
+
+            boolean removed = restClientTenant1.removeEntity(RestConstants.APPLICATIONS, "single-cluster-scaling-test",
+                    RestConstants.APPLICATIONS_NAME);
+            assertEquals(removed, true);
+
+            ApplicationBean beanRemoved = (ApplicationBean) restClientTenant1.getEntity(RestConstants.APPLICATIONS,
+                    "single-cluster-scaling-test", ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
+            assertEquals(beanRemoved, null);
+
+            boolean removedC1 = restClientTenant1.removeEntity(RestConstants.CARTRIDGES, "c7",
+                    RestConstants.CARTRIDGES_NAME);
+            assertEquals(removedC1, true);
+
+
+            removedAuto = restClientTenant1.removeEntity(RestConstants.AUTOSCALING_POLICIES,
+                    autoscalingPolicyId, RestConstants.AUTOSCALING_POLICIES_NAME);
+            assertEquals(removedAuto, true);
+
+            removedDep = restClientTenant1.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
+                    "deployment-policy-5", RestConstants.DEPLOYMENT_POLICIES_NAME);
+            assertEquals(removedDep, true);
+
+            removedNet = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
+                    "network-partition-11", RestConstants.NETWORK_PARTITIONS_NAME);
+            assertEquals(removedNet, false);
+
+
+            boolean removeAppPolicy = restClientTenant1.removeEntity(RestConstants.APPLICATION_POLICIES,
+                    "application-policy-4", RestConstants.APPLICATION_POLICIES_NAME);
+            assertEquals(removeAppPolicy, true);
+
+            removedNet = restClientTenant1.removeEntity(RestConstants.NETWORK_PARTITIONS,
+                    "network-partition-11", RestConstants.NETWORK_PARTITIONS_NAME);
+            assertEquals(removedNet, true);
+
+            log.info(
+                    "-------------------------------Ended Partition one after another test case-------------------------------");
+
+        }
+        catch (Exception e) {
+            log.error("An error occurred while handling  application bursting", e);
+            assertTrue("An error occurred while handling  application bursting", false);
+        }
+    }
+
+    /**
+     * Assert application activation
+     *
+     * @param applicationName
+     */
+    private void assertClusterWithRoundRobinAlgorithm(String applicationName) {
+        Application application = ApplicationManager.getApplications().getApplication(applicationName);
+        assertNotNull(String.format("Application is not found: [application-id] %s",
+                applicationName), application);
+
+        Set<ClusterDataHolder> clusterDataHolderSet = application.getClusterDataRecursively();
+        for (ClusterDataHolder clusterDataHolder : clusterDataHolderSet) {
+            String serviceName = clusterDataHolder.getServiceType();
+            String clusterId = clusterDataHolder.getClusterId();
+            Service service = TopologyManager.getTopology().getService(serviceName);
+            assertNotNull(String.format("Service is not found: [application-id] %s [service] %s",
+                    applicationName, serviceName), service);
+
+            Cluster cluster = service.getCluster(clusterId);
+            assertNotNull(String.format("Cluster is not found: [application-id] %s [service] %s [cluster-id] %s",
+                    applicationName, serviceName, clusterId), cluster);
+
+            for (ClusterInstance instance : cluster.getInstanceIdToInstanceContextMap().values()) {
+                List<String> partitionsUsedInMembers = new ArrayList<String>();
+                Map<String, List<Long>> partitionIdToMembersMap = new HashMap<String, List<Long>>();
+                for (Member member : cluster.getMembers()) {
+                    String partitionId = member.getPartitionId();
+                    if (!partitionIdToMembersMap.containsKey(partitionId)) {
+                        List<Long> members = new ArrayList<Long>();
+                        members.add(member.getInitTime());
+                        partitionIdToMembersMap.put(partitionId, members);
+                    } else {
+                        partitionIdToMembersMap.get(partitionId).add(member.getInitTime());
+                    }
+                    if (!partitionsUsedInMembers.contains(partitionId)) {
+                        partitionsUsedInMembers.add(partitionId);
+                    }
+                }
+                String p1 = "network-partition-11-partition-1";
+                String p2 = "network-partition-11-partition-2";
+                List<Long> p1InitTime = partitionIdToMembersMap.get(p1);
+                Collections.sort(p1InitTime);
+
+                List<Long> p2InitTime = partitionIdToMembersMap.get(p2);
+                Collections.sort(p2InitTime);
+
+                List<Long> allInitTime = new ArrayList<Long>();
+                allInitTime.addAll(p1InitTime);
+                allInitTime.addAll(p2InitTime);
+                Collections.sort(allInitTime);
+
+                int p1Index = -1;
+                int p2Index = -1;
+                String previousPartition = null;
+                for (int i = 0; i < allInitTime.size(); i++) {
+                    if (previousPartition == null) {
+                        if (p1InitTime.get(0) == allInitTime.get(i)) {
+                            previousPartition = p1;
+                            p1Index++;
+                        } else if (p2InitTime.get(0) == allInitTime.get(i)) {
+                            previousPartition = p2;
+                            p2Index++;
+
+                        }
+                    } else if (previousPartition.equals(p1)) {
+                        p2Index++;
+                        previousPartition = p2;
+                        assertEquals(allInitTime.get(i), p2InitTime.get(p2Index),
+                                "Partition-2 doesn't not contain correct values in current iteration");
+                        if (p1Index >= 0) {
+                            assertEquals(allInitTime.get(i - 1), p1InitTime.get(p1Index),
+                                    "Partition-1 doesn't not contain correct values in the previous iteration");
+                            if (p1Index + 1 <= (p1InitTime.size() - 1) && i + 1 <= (allInitTime.size() - 1)) {
+                                assertEquals(allInitTime.get(i + 1), p1InitTime.get(p1Index + 1),
+                                        "Partition-1 doesn't not contain correct values in the next iteration");
+
+                            }
+                        }
+                    } else {
+                        p1Index++;
+                        previousPartition = p1;
+                        assertEquals(allInitTime.get(i), p1InitTime.get(p1Index),
+                                "Partition-1 doesn't not contain correct values in current iteration");
+                        if (p2Index >= 0) {
+                            assertEquals(allInitTime.get(i - 1), p2InitTime.get(p2Index),
+                                    "Partition-2 doesn't not contain correct values  in the previous iteration");
+                            if ((p2Index + 1) <= (p2InitTime.size() - 1) && (i + 1) <= (allInitTime.size() - 1)) {
+                                assertEquals(allInitTime.get(i + 1), p2InitTime.get(p2Index + 1),
+                                        "Partition-2 doesn't not contain correct values in the next iteration");
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
+}
\ No newline at end of file