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

[17/17] stratos git commit: Moving python cartridge agent automation tests to python cartridge agent component

Moving python cartridge agent automation tests to python cartridge agent component


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

Branch: refs/heads/master
Commit: b11e4de274b188a40996c7e14ac1644cfd48e08c
Parents: fd45344
Author: Imesh Gunaratne <im...@apache.org>
Authored: Tue Feb 10 21:20:01 2015 +0530
Committer: Imesh Gunaratne <im...@apache.org>
Committed: Tue Feb 10 21:20:13 2015 +0530

----------------------------------------------------------------------
 .../pom.xml                                     |  113 --
 .../src/main/resources/cloud-services-desc.xml  |   20 -
 .../test/PythonCartridgeAgentTest.java          |  279 ----
 .../src/test/resources/agent.conf               |   59 -
 .../src/test/resources/jndi.properties          |   22 -
 .../src/test/resources/log4j.properties         |   41 -
 .../src/test/resources/logging.ini              |   52 -
 .../src/test/resources/payload/launch-params    |    1 -
 .../README.md                                   |    6 +
 .../cartridgeagent/__init__.py                  |    0
 .../cartridgeagent/cartridgeagent/__init__.py   |   16 -
 .../cartridgeagent/cartridgeagent/agent.conf    |   60 -
 .../cartridgeagent/cartridgeagent/agent.py      |  370 -----
 .../cartridgeagent/extensions/artifacts-copy.sh |   32 -
 .../extensions/artifacts-updated.sh             |   28 -
 .../cartridgeagent/extensions/clean.sh          |   28 -
 .../extensions/complete-tenant.sh               |   30 -
 .../extensions/complete-topology.sh             |   34 -
 .../extensions/instance-activated.sh            |   28 -
 .../extensions/instance-started.sh              |   27 -
 .../extensions/member-activated.sh              |   43 -
 .../cartridgeagent/extensions/member-started.sh |   43 -
 .../extensions/member-suspended.sh              |   43 -
 .../extensions/member-terminated.sh             |   43 -
 .../cartridgeagent/extensions/mount-volumes.sh  |   87 -
 .../cartridgeagent/extensions/start-servers.sh  |   39 -
 .../extensions/subscription-domain-added.sh     |   39 -
 .../extensions/subscription-domain-removed.sh   |   37 -
 .../extensions/tenant-subscribed.sh             |   28 -
 .../extensions/tenant-unsubscribed.sh           |   28 -
 .../cartridgeagent/cartridgeagent/logging.ini   |   52 -
 .../cartridgeagent/modules/__init__.py          |   16 -
 .../modules/artifactmgt/__init__.py             |   17 -
 .../modules/artifactmgt/git/__init__.py         |   17 -
 .../modules/artifactmgt/git/agentgithandler.py  |  538 -------
 .../modules/artifactmgt/repository.py           |   38 -
 .../cartridgeagent/modules/config/__init__.py   |   17 -
 .../config/cartridgeagentconfiguration.py       |  379 -----
 .../modules/databridge/__init__.py              |   17 -
 .../cartridgeagent/modules/databridge/agent.py  |  227 ---
 .../modules/databridge/thrift/__init__.py       |   17 -
 .../databridge/thrift/gen/Data/__init__.py      |    1 -
 .../databridge/thrift/gen/Data/constants.py     |    8 -
 .../databridge/thrift/gen/Data/ttypes.py        |  320 ----
 .../databridge/thrift/gen/Exception/__init__.py |    1 -
 .../thrift/gen/Exception/constants.py           |    8 -
 .../databridge/thrift/gen/Exception/ttypes.py   |  473 ------
 .../ThriftEventTransmissionService-remote       |  117 --
 .../ThriftEventTransmissionService.py           | 1143 -------------
 .../ThriftEventTransmissionService/__init__.py  |    1 -
 .../ThriftEventTransmissionService/constants.py |    8 -
 .../ThriftEventTransmissionService/ttypes.py    |   21 -
 .../ThriftSecureEventTransmissionService-remote |  131 --
 .../ThriftSecureEventTransmissionService.py     | 1495 ------------------
 .../__init__.py                                 |    1 -
 .../constants.py                                |    8 -
 .../ttypes.py                                   |   21 -
 .../modules/databridge/thrift/gen/__init__.py   |    0
 .../modules/databridge/thrift/publisher.py      |  110 --
 .../modules/databridge/thrift/thrift/TSCons.py  |   35 -
 .../databridge/thrift/thrift/TSerialization.py  |   38 -
 .../databridge/thrift/thrift/TTornado.py        |  153 --
 .../modules/databridge/thrift/thrift/Thrift.py  |  170 --
 .../databridge/thrift/thrift/__init__.py        |   20 -
 .../databridge/thrift/thrift/protocol/TBase.py  |   81 -
 .../thrift/thrift/protocol/TBinaryProtocol.py   |  261 ---
 .../thrift/thrift/protocol/TCompactProtocol.py  |  405 -----
 .../thrift/thrift/protocol/TJSONProtocol.py     |  552 -------
 .../thrift/thrift/protocol/TProtocol.py         |  406 -----
 .../thrift/thrift/protocol/__init__.py          |   20 -
 .../thrift/thrift/protocol/fastbinary.c         | 1219 --------------
 .../thrift/thrift/server/THttpServer.py         |   87 -
 .../thrift/thrift/server/TNonblockingServer.py  |  346 ----
 .../thrift/thrift/server/TProcessPoolServer.py  |  118 --
 .../databridge/thrift/thrift/server/TServer.py  |  269 ----
 .../databridge/thrift/thrift/server/__init__.py |   20 -
 .../thrift/thrift/transport/THttpClient.py      |  147 --
 .../thrift/thrift/transport/TSSLSocket.py       |  214 ---
 .../thrift/thrift/transport/TSocket.py          |  176 ---
 .../thrift/thrift/transport/TTransport.py       |  330 ----
 .../thrift/thrift/transport/TTwisted.py         |  221 ---
 .../thrift/thrift/transport/TZlibTransport.py   |  249 ---
 .../thrift/thrift/transport/__init__.py         |   20 -
 .../modules/datapublisher/__init__.py           |   18 -
 .../modules/datapublisher/exception/__init__.py |   17 -
 .../exception/datapublisherexception.py         |   33 -
 .../modules/datapublisher/logpublisher.py       |  273 ----
 .../cartridgeagent/modules/event/__init__.py    |    0
 .../modules/event/application/__init__.py       |   17 -
 .../event/application/signup/__init__.py        |   17 -
 .../modules/event/application/signup/events.py  |   62 -
 .../modules/event/instance/__init__.py          |   16 -
 .../modules/event/instance/notifier/__init__.py |   17 -
 .../modules/event/instance/notifier/events.py   |   82 -
 .../modules/event/instance/status/__init__.py   |   17 -
 .../modules/event/instance/status/events.py     |  118 --
 .../modules/event/tenant/__init__.py            |   16 -
 .../modules/event/tenant/events.py              |  147 --
 .../modules/event/topology/__init__.py          |   17 -
 .../modules/event/topology/events.py            |  374 -----
 .../modules/exception/__init__.py               |   16 -
 .../gitrepositorysynchronizationexception.py    |   35 -
 .../exception/parameternotfoundexception.py     |   36 -
 .../exception/thriftreceiverofflineexception.py |   35 -
 .../modules/extensions/__init__.py              |   16 -
 .../modules/extensions/extensionhandler.py      |  393 -----
 .../modules/healthstatspublisher/__init__.py    |   16 -
 .../abstracthealthstatisticspublisher.py        |   62 -
 .../modules/healthstatspublisher/healthstats.py |  261 ---
 .../modules/publisher/__init__.py               |   16 -
 .../publisher/cartridgeagentpublisher.py        |  177 ---
 .../modules/subscriber/__init__.py              |   17 -
 .../modules/subscriber/eventsubscriber.py       |   93 --
 .../cartridgeagent/modules/tenant/__init__.py   |   16 -
 .../modules/tenant/tenantcontext.py             |  184 ---
 .../cartridgeagent/modules/topology/__init__.py |   16 -
 .../modules/topology/topologycontext.py         |  466 ------
 .../cartridgeagent/modules/util/__init__.py     |   16 -
 .../modules/util/asyncscheduledtask.py          |   72 -
 .../modules/util/cartridgeagentconstants.py     |  143 --
 .../modules/util/cartridgeagentutils.py         |  121 --
 .../modules/util/extensionutils.py              |  503 ------
 .../cartridgeagent/modules/util/log.py          |   55 -
 .../cartridgeagent/tests/__init__.py            |   16 -
 .../tests/conf/complete_topology_event.json     |    1 -
 .../tests/conf/git/auth_repo.json               |   10 -
 .../tests/conf/git/auth_repo2.json              |   10 -
 .../tests/conf/git/simple_repo.json             |   10 -
 .../cartridgeagent/tests/test_events.py         |  125 --
 .../cartridgeagent/tests/test_git.py            |   79 -
 .../cartridgeagent/tests/test_util.py           |  127 --
 .../pom.xml                                     |  152 +-
 .../src/main/python/cartridge.agent/__init__.py |    0
 .../cartridge.agent/cartridge.agent/__init__.py |   16 +
 .../cartridge.agent/cartridge.agent/agent.conf  |   60 +
 .../cartridge.agent/cartridge.agent/agent.py    |  370 +++++
 .../extensions/artifacts-copy.sh                |   32 +
 .../extensions/artifacts-updated.sh             |   28 +
 .../cartridge.agent/extensions/clean.sh         |   28 +
 .../extensions/complete-tenant.sh               |   30 +
 .../extensions/complete-topology.sh             |   34 +
 .../extensions/instance-activated.sh            |   28 +
 .../extensions/instance-started.sh              |   27 +
 .../extensions/member-activated.sh              |   43 +
 .../extensions/member-started.sh                |   43 +
 .../extensions/member-suspended.sh              |   43 +
 .../extensions/member-terminated.sh             |   43 +
 .../cartridge.agent/extensions/mount-volumes.sh |   87 +
 .../cartridge.agent/extensions/start-servers.sh |   39 +
 .../extensions/subscription-domain-added.sh     |   39 +
 .../extensions/subscription-domain-removed.sh   |   37 +
 .../extensions/tenant-subscribed.sh             |   28 +
 .../extensions/tenant-unsubscribed.sh           |   28 +
 .../cartridge.agent/cartridge.agent/logging.ini |   52 +
 .../cartridge.agent/modules/__init__.py         |   16 +
 .../modules/artifactmgt/__init__.py             |   17 +
 .../modules/artifactmgt/git/__init__.py         |   17 +
 .../modules/artifactmgt/git/agentgithandler.py  |  538 +++++++
 .../modules/artifactmgt/repository.py           |   38 +
 .../cartridge.agent/modules/config/__init__.py  |   17 +
 .../config/cartridgeagentconfiguration.py       |  379 +++++
 .../modules/databridge/__init__.py              |   17 +
 .../cartridge.agent/modules/databridge/agent.py |  227 +++
 .../modules/databridge/thrift/__init__.py       |   17 +
 .../databridge/thrift/gen/Data/__init__.py      |    1 +
 .../databridge/thrift/gen/Data/constants.py     |    8 +
 .../databridge/thrift/gen/Data/ttypes.py        |  320 ++++
 .../databridge/thrift/gen/Exception/__init__.py |    1 +
 .../thrift/gen/Exception/constants.py           |    8 +
 .../databridge/thrift/gen/Exception/ttypes.py   |  473 ++++++
 .../ThriftEventTransmissionService-remote       |  117 ++
 .../ThriftEventTransmissionService.py           | 1143 +++++++++++++
 .../ThriftEventTransmissionService/__init__.py  |    1 +
 .../ThriftEventTransmissionService/constants.py |    8 +
 .../ThriftEventTransmissionService/ttypes.py    |   21 +
 .../ThriftSecureEventTransmissionService-remote |  131 ++
 .../ThriftSecureEventTransmissionService.py     | 1495 ++++++++++++++++++
 .../__init__.py                                 |    1 +
 .../constants.py                                |    8 +
 .../ttypes.py                                   |   21 +
 .../modules/databridge/thrift/gen/__init__.py   |    0
 .../modules/databridge/thrift/publisher.py      |  110 ++
 .../modules/databridge/thrift/thrift/TSCons.py  |   35 +
 .../databridge/thrift/thrift/TSerialization.py  |   38 +
 .../databridge/thrift/thrift/TTornado.py        |  153 ++
 .../modules/databridge/thrift/thrift/Thrift.py  |  170 ++
 .../databridge/thrift/thrift/__init__.py        |   20 +
 .../databridge/thrift/thrift/protocol/TBase.py  |   81 +
 .../thrift/thrift/protocol/TBinaryProtocol.py   |  261 +++
 .../thrift/thrift/protocol/TCompactProtocol.py  |  405 +++++
 .../thrift/thrift/protocol/TJSONProtocol.py     |  552 +++++++
 .../thrift/thrift/protocol/TProtocol.py         |  406 +++++
 .../thrift/thrift/protocol/__init__.py          |   20 +
 .../thrift/thrift/protocol/fastbinary.c         | 1219 ++++++++++++++
 .../thrift/thrift/server/THttpServer.py         |   87 +
 .../thrift/thrift/server/TNonblockingServer.py  |  346 ++++
 .../thrift/thrift/server/TProcessPoolServer.py  |  118 ++
 .../databridge/thrift/thrift/server/TServer.py  |  269 ++++
 .../databridge/thrift/thrift/server/__init__.py |   20 +
 .../thrift/thrift/transport/THttpClient.py      |  147 ++
 .../thrift/thrift/transport/TSSLSocket.py       |  214 +++
 .../thrift/thrift/transport/TSocket.py          |  176 +++
 .../thrift/thrift/transport/TTransport.py       |  330 ++++
 .../thrift/thrift/transport/TTwisted.py         |  221 +++
 .../thrift/thrift/transport/TZlibTransport.py   |  249 +++
 .../thrift/thrift/transport/__init__.py         |   20 +
 .../modules/datapublisher/__init__.py           |   18 +
 .../modules/datapublisher/exception/__init__.py |   17 +
 .../exception/datapublisherexception.py         |   33 +
 .../modules/datapublisher/logpublisher.py       |  273 ++++
 .../cartridge.agent/modules/event/__init__.py   |    0
 .../modules/event/application/__init__.py       |   17 +
 .../event/application/signup/__init__.py        |   17 +
 .../modules/event/application/signup/events.py  |   62 +
 .../modules/event/instance/__init__.py          |   16 +
 .../modules/event/instance/notifier/__init__.py |   17 +
 .../modules/event/instance/notifier/events.py   |   82 +
 .../modules/event/instance/status/__init__.py   |   17 +
 .../modules/event/instance/status/events.py     |  118 ++
 .../modules/event/tenant/__init__.py            |   16 +
 .../modules/event/tenant/events.py              |  147 ++
 .../modules/event/topology/__init__.py          |   17 +
 .../modules/event/topology/events.py            |  374 +++++
 .../modules/exception/__init__.py               |   16 +
 .../gitrepositorysynchronizationexception.py    |   35 +
 .../exception/parameternotfoundexception.py     |   36 +
 .../exception/thriftreceiverofflineexception.py |   35 +
 .../modules/extensions/__init__.py              |   16 +
 .../modules/extensions/extensionhandler.py      |  393 +++++
 .../modules/healthstatspublisher/__init__.py    |   16 +
 .../abstracthealthstatisticspublisher.py        |   62 +
 .../modules/healthstatspublisher/healthstats.py |  261 +++
 .../modules/publisher/__init__.py               |   16 +
 .../publisher/cartridgeagentpublisher.py        |  177 +++
 .../modules/subscriber/__init__.py              |   17 +
 .../modules/subscriber/eventsubscriber.py       |   93 ++
 .../cartridge.agent/modules/tenant/__init__.py  |   16 +
 .../modules/tenant/tenantcontext.py             |  184 +++
 .../modules/topology/__init__.py                |   16 +
 .../modules/topology/topologycontext.py         |  466 ++++++
 .../cartridge.agent/modules/util/__init__.py    |   16 +
 .../modules/util/asyncscheduledtask.py          |   72 +
 .../modules/util/cartridgeagentconstants.py     |  143 ++
 .../modules/util/cartridgeagentutils.py         |  121 ++
 .../modules/util/extensionutils.py              |  503 ++++++
 .../cartridge.agent/modules/util/log.py         |   55 +
 .../python/cartridge.agent/tests/__init__.py    |   16 +
 .../tests/conf/complete_topology_event.json     |    1 +
 .../tests/conf/git/auth_repo.json               |   10 +
 .../tests/conf/git/auth_repo2.json              |   10 +
 .../tests/conf/git/simple_repo.json             |   10 +
 .../python/cartridge.agent/tests/test_events.py |  125 ++
 .../python/cartridge.agent/tests/test_git.py    |   79 +
 .../python/cartridge.agent/tests/test_util.py   |  127 ++
 .../src/main/resources/cloud-services-desc.xml  |   20 +
 .../test/PythonCartridgeAgentTest.java          |  279 ++++
 .../src/test/resources/agent.conf               |   59 +
 .../src/test/resources/jndi.properties          |   22 +
 .../src/test/resources/log4j.properties         |   41 +
 .../src/test/resources/logging.ini              |   52 +
 .../src/test/resources/payload/launch-params    |    1 +
 261 files changed, 16827 insertions(+), 16844 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/b11e4de2/components/org.apache.stratos.python.cartridge.agent.test/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent.test/pom.xml b/components/org.apache.stratos.python.cartridge.agent.test/pom.xml
deleted file mode 100644
index d912683..0000000
--- a/components/org.apache.stratos.python.cartridge.agent.test/pom.xml
+++ /dev/null
@@ -1,113 +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.
-  -->
-
-<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">
-    <parent>
-        <groupId>org.apache.stratos</groupId>
-        <artifactId>stratos-components-parent</artifactId>
-        <version>4.1.0-SNAPSHOT</version>
-    </parent>
-
-    <modelVersion>4.0.0</modelVersion>
-    <artifactId>org.apache.stratos.python.cartridge.agent.test</artifactId>
-    <packaging>bundle</packaging>
-    <name>Apache Stratos - Python Cartridge Agent Tests</name>
-
-    <profiles>
-        <profile>
-            <id>live</id>
-            <build>
-                <plugins>
-                    <plugin>
-                        <groupId>org.apache.maven.plugins</groupId>
-                        <artifactId>maven-surefire-plugin</artifactId>
-                        <configuration>
-                            <includes>
-                                <include>**/*/PythonCartridgeAgentTest.java</include>
-                            </includes>
-                            <systemPropertyVariables></systemPropertyVariables>
-                        </configuration>
-                    </plugin>
-                </plugins>
-            </build>
-        </profile>
-    </profiles>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-bundle-plugin</artifactId>
-                <extensions>true</extensions>
-                <configuration>
-                    <instructions>
-                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
-                        <Bundle-Name>${project.artifactId}</Bundle-Name>
-                        <DynamicImport-Package>*</DynamicImport-Package>
-                    </instructions>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-
-    <dependencies>
-        <dependency>
-             <groupId>junit</groupId>
-             <artifactId>junit</artifactId>
-             <scope>test</scope>
-         </dependency>
-        <dependency>
-            <groupId>org.wso2.carbon</groupId>
-            <artifactId>org.wso2.carbon.logging</artifactId>
-            <version>${wso2carbon.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>commons-lang.wso2</groupId>
-            <artifactId>commons-lang</artifactId>
-            <version>2.6.0.wso2v1</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.commons</groupId>
-            <artifactId>commons-io</artifactId>
-            <version>1.3.2</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.commons</groupId>
-            <artifactId>commons-exec</artifactId>
-            <version>1.0.1</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.commons</groupId>
-            <artifactId>commons-lang3</artifactId>
-            <version>3.1</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.activemq</groupId>
-            <artifactId>activemq-all</artifactId>
-            <version>5.10.0</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.stratos</groupId>
-            <artifactId>org.apache.stratos.messaging</artifactId>
-            <version>4.1.0-SNAPSHOT</version>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
-</project>

http://git-wip-us.apache.org/repos/asf/stratos/blob/b11e4de2/components/org.apache.stratos.python.cartridge.agent.test/src/main/resources/cloud-services-desc.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent.test/src/main/resources/cloud-services-desc.xml b/components/org.apache.stratos.python.cartridge.agent.test/src/main/resources/cloud-services-desc.xml
deleted file mode 100644
index 98cabe1..0000000
--- a/components/org.apache.stratos.python.cartridge.agent.test/src/main/resources/cloud-services-desc.xml
+++ /dev/null
@@ -1,20 +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.
-  -->
-<cloudServices xmlns="http://wso2.com/carbon/cloud/mgt/services">
-</cloudServices>

http://git-wip-us.apache.org/repos/asf/stratos/blob/b11e4de2/components/org.apache.stratos.python.cartridge.agent.test/src/test/java/org/apache/stratos/python.cartridge.agent/test/PythonCartridgeAgentTest.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent.test/src/test/java/org/apache/stratos/python.cartridge.agent/test/PythonCartridgeAgentTest.java b/components/org.apache.stratos.python.cartridge.agent.test/src/test/java/org/apache/stratos/python.cartridge.agent/test/PythonCartridgeAgentTest.java
deleted file mode 100644
index ba1128b..0000000
--- a/components/org.apache.stratos.python.cartridge.agent.test/src/test/java/org/apache/stratos/python.cartridge.agent/test/PythonCartridgeAgentTest.java
+++ /dev/null
@@ -1,279 +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.python.cartridge.agent.test;
-
-import org.apache.commons.exec.*;
-import org.apache.commons.io.FileUtils;
-import org.apache.commons.lang.StringUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.messaging.broker.publish.EventPublisher;
-import org.apache.stratos.messaging.broker.publish.EventPublisherPool;
-import org.apache.stratos.messaging.domain.topology.*;
-import org.apache.stratos.messaging.event.instance.notifier.ArtifactUpdatedEvent;
-import org.apache.stratos.messaging.event.topology.CompleteTopologyEvent;
-import org.apache.stratos.messaging.util.MessagingUtil;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.IOException;
-import java.net.ServerSocket;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Properties;
-import java.util.UUID;
-
-import static junit.framework.Assert.assertTrue;
-
-public class PythonCartridgeAgentTest {
-
-    private static final Log log = LogFactory.getLog(PythonCartridgeAgentTest.class);
-
-    private static final String NEW_LINE = System.getProperty("line.separator");
-    private static final String CLUSTER_ID = "php.php.domain";
-    private static final String DEPLOYMENT_POLICY_NAME = "deployment-policy-1";
-    private static final String AUTOSCALING_POLICY_NAME = "autoscaling-policy-1";
-    private static final String APP_ID = "application-1";
-    private static final String MEMBER_ID = "php.member-1";
-    private static final String CLUSTER_INSTANCE_ID = "cluster-1-instance-1";
-    private static final String NETWORK_PARTITION_ID = "network-partition-1";
-    private static final String PARTITION_ID = "partition-1";
-    private static final String TENANT_ID = "-1234";
-
-    @BeforeClass
-    public static void setUp(){
-        // Set jndi.properties.dir system property for initializing event publishers and receivers
-        System.setProperty("jndi.properties.dir", getResourcesFolderPath());
-    }
-
-    private static String getResourcesFolderPath() {
-        String path = PythonCartridgeAgentTest.class.getResource("/").getPath();
-        return StringUtils.removeEnd(path, File.separator);
-    }
-
-    @Test(timeout = 300000)
-    public void testPythonCartridgeAgent() {
-
-        // Simulate CEP server socket
-        startServerSocket(7711);
-
-        String agentPath = setupPythonAgent();
-        log.info("Starting python cartridge agent...");
-        ByteArrayOutputStreamLocal outputStream = executeCommand("python " + agentPath + "/agent.py");
-
-        List<String> outputLines = new ArrayList<String>();
-        while (!outputStream.isClosed()) {
-            List<String> newLines = getNewLines(outputLines, outputStream.toString());
-            if(newLines.size() > 0) {
-                for(String line : newLines) {
-                    if(line.contains("Subscribed to 'topology/#'")) {
-                        Topology topology = createTestTopology();
-                        CompleteTopologyEvent completeTopologyEvent = new CompleteTopologyEvent(topology);
-                        String topicName = MessagingUtil.getMessageTopicName(completeTopologyEvent);
-                        EventPublisher eventPublisher = EventPublisherPool.getPublisher(topicName);
-                        eventPublisher.publish(completeTopologyEvent);
-
-                        // Simulate server socket
-                        startServerSocket(9080);
-                    }
-                    if(line.contains("Artifact repository found")) {
-                        ArtifactUpdatedEvent artifactUpdatedEvent = new ArtifactUpdatedEvent();
-                        artifactUpdatedEvent.setClusterId(CLUSTER_ID);
-                        artifactUpdatedEvent.setTenantId(TENANT_ID);
-                        artifactUpdatedEvent.setRepoURL("https://github.com/imesh/stratos-php-applications.git");
-                        String topicName = MessagingUtil.getMessageTopicName(artifactUpdatedEvent);
-                        EventPublisher eventPublisher = EventPublisherPool.getPublisher(topicName);
-                        eventPublisher.publish(artifactUpdatedEvent);
-                    }
-                    if (line.contains("Exception in thread") || line.contains("ERROR")) {
-                        break;
-                    }
-
-                    if(line.contains("Git clone operation for tenant u'" + TENANT_ID + "' successful")) {
-                        assertTrue(true);
-                        return;
-                    }
-
-                    log.info(line);
-                }
-            }
-            sleep(500);
-        }
-    }
-
-    private void startServerSocket(final int port) {
-        Thread socketThread = new Thread(new Runnable() {
-            @Override
-            public void run() {
-                try {
-                    ServerSocket cep = new ServerSocket(port);
-                    cep.accept();
-                } catch (IOException e) {
-                    log.error("Could not start server socket", e);
-                }
-            }
-        });
-        socketThread.start();
-    }
-
-    /**
-     * Create test topology
-     * @return
-     */
-    private Topology createTestTopology() {
-        Topology topology = new Topology();
-        Service service = new Service("php", ServiceType.SingleTenant);
-        topology.addService(service);
-
-        Cluster cluster = new Cluster(service.getServiceName(), CLUSTER_ID, DEPLOYMENT_POLICY_NAME,
-                AUTOSCALING_POLICY_NAME, APP_ID);
-        service.addCluster(cluster);
-
-        Member member = new Member(service.getServiceName(), cluster.getClusterId(), MEMBER_ID,
-                CLUSTER_INSTANCE_ID, NETWORK_PARTITION_ID, PARTITION_ID, System.currentTimeMillis());
-        member.setDefaultPrivateIP("10.0.0.1");
-        member.setDefaultPublicIP("20.0.0.1");
-        Properties properties = new Properties();
-        properties.setProperty("prop1", "value1");
-        member.setProperties(properties);
-        member.setStatus(MemberStatus.Initialized);
-        cluster.addMember(member);
-
-        return topology;
-    }
-
-    /**
-     * Return new lines found in the output
-     * @param currentOutputLines current output lines
-     * @param output output
-     * @return
-     */
-    private List<String> getNewLines(List<String> currentOutputLines, String output) {
-        List<String> newLines = new ArrayList<String>();
-
-        if(StringUtils.isNotBlank(output)) {
-            String [] lines = output.split(NEW_LINE);
-            if(lines != null) {
-                for(String line : lines) {
-                    if(!currentOutputLines.contains(line)) {
-                        currentOutputLines.add(line);
-                        newLines.add(line);
-                    }
-                }
-            }
-        }
-        return newLines;
-    }
-
-    /**
-     * Sleep current thread
-     * @param time
-     */
-    private void sleep(long time) {
-        try {
-            Thread.sleep(time);
-        } catch (InterruptedException ignore) {
-        }
-    }
-
-    /**
-     * Copy python agent distribution to a new folder, extract it and copy sample configuration files
-     * @return
-     */
-    private String setupPythonAgent() {
-        try {
-            log.info("Setting up python cartridge agent...");
-            String srcAgentPath = getResourcesFolderPath() + "/../../../org.apache.stratos.python.cartridge.agent/cartridgeagent/cartridgeagent";
-            String destAgentPath = getResourcesFolderPath() + "/../" + UUID.randomUUID() + "/cartridge.agent";
-            FileUtils.copyDirectory(new File(srcAgentPath), new File(destAgentPath));
-
-            List<File> extensionFiles = (List<File>) FileUtils.listFiles(new File(srcAgentPath + "/extensions"), new String[] { "sh"}, false);
-            for(File extensionFile : extensionFiles) {
-                executeCommand("chmod +x " + extensionFile.getAbsolutePath());
-            }
-
-            String srcAgentConfPath = getResourcesFolderPath() + "/agent.conf";
-            String destAgentConfPath = destAgentPath + "/agent.conf";
-            FileUtils.copyFile(new File(srcAgentConfPath), new File(destAgentConfPath));
-
-            String srcLoggingIniPath = getResourcesFolderPath() + "/logging.ini";
-            String destLoggingIniPath = destAgentPath + "/logging.ini";
-            FileUtils.copyFile(new File(srcLoggingIniPath), new File(destLoggingIniPath));
-
-            String srcPayloadPath = getResourcesFolderPath() + "/payload";
-            String destPayloadPath = destAgentPath + "/payload";
-            FileUtils.copyDirectory(new File(srcPayloadPath), new File(destPayloadPath));
-            log.info("Python cartridge agent setup completed");
-
-            return destAgentPath;
-        } catch (Exception e) {
-            String message = "Could not copy cartridge agent distribution";
-            log.error(message, e);
-            throw new RuntimeException(message, e);
-        }
-    }
-
-    /**
-     * Execute shell command
-     * @param commandText
-     */
-    private ByteArrayOutputStreamLocal executeCommand(String commandText) {
-        final ByteArrayOutputStreamLocal outputStream = new ByteArrayOutputStreamLocal();
-        try {
-            CommandLine commandline = CommandLine.parse(commandText);
-            DefaultExecutor exec = new DefaultExecutor();
-            PumpStreamHandler streamHandler = new PumpStreamHandler(outputStream);
-            exec.setStreamHandler(streamHandler);
-            exec.execute(commandline, new ExecuteResultHandler() {
-                @Override
-                public void onProcessComplete(int i) {
-                }
-
-                @Override
-                public void onProcessFailed(ExecuteException e) {
-                    log.error("Process failed", e);
-                }
-            });
-            return outputStream;
-        } catch (Exception e) {
-            log.error(outputStream.toString(), e);
-            throw new RuntimeException(e);
-        }
-    }
-
-    /**
-     * Implements isClosed() method
-     */
-    private class ByteArrayOutputStreamLocal extends ByteArrayOutputStream  {
-        private boolean closed;
-
-        @Override
-        public void close() throws IOException {
-            super.close();
-            closed = true;
-        }
-
-        public boolean isClosed() {
-            return closed;
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/b11e4de2/components/org.apache.stratos.python.cartridge.agent.test/src/test/resources/agent.conf
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent.test/src/test/resources/agent.conf b/components/org.apache.stratos.python.cartridge.agent.test/src/test/resources/agent.conf
deleted file mode 100644
index bb264ac..0000000
--- a/components/org.apache.stratos.python.cartridge.agent.test/src/test/resources/agent.conf
+++ /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.
-
-[agent]
-mb.ip                                 =localhost
-mb.port                               =1883
-listen.address                        =localhost
-thrift.receiver.ip                    =localhost
-thrift.receiver.port                  =7711
-thrift.server.admin.username          =admin
-thrift.server.admin.password          =admin
-cep.stats.publisher.enabled           =true
-lb.private.ip                         =
-lb.public.ip                          =
-enable.artifact.update                =true
-auto.commit                           =false
-auto.checkout                         =true
-artifact.update.interval              =15
-port.check.timeout                    =600000
-enable.data.publisher                 =false
-monitoring.server.ip                  =192.168.1.4
-monitoring.server.port                =7611
-monitoring.server.secure.port         =7711
-monitoring.server.admin.username      =admin
-monitoring.server.admin.password      =admin
-log.file.paths                        =
-super.tenant.repository.path          =/repository/deployment/server/
-tenant.repository.path                =/repository/tenants/
-extension.instance.started            =instance-started.sh
-extension.start.servers               =start-servers.sh
-extension.instance.activated          =instance-activated.sh
-extension.artifacts.updated           =artifacts-updated.sh
-extension.clean                       =clean.sh
-extension.mount.volumes               =mount_volumes.sh
-extension.member.started              =member-started.sh
-extension.member.activated            =member-activated.sh
-extension.member.suspended            =member-suspended.sh
-extension.member.terminated           =member-terminated.sh
-extension.complete.topology           =complete-topology.sh
-extension.complete.tenant             =complete-tenant.sh
-extension.subscription.domain.added   =subscription-domain-added.sh
-extension.subscription.domain.removed =subscription-domain-removed.sh
-extension.artifacts.copy              =artifacts-copy.sh
-extension.tenant.subscribed           =tenant-subscribed.sh
-extension.tenant.unsubscribed         =tenant-unsubscribed.sh
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/b11e4de2/components/org.apache.stratos.python.cartridge.agent.test/src/test/resources/jndi.properties
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent.test/src/test/resources/jndi.properties b/components/org.apache.stratos.python.cartridge.agent.test/src/test/resources/jndi.properties
deleted file mode 100644
index 21d7420..0000000
--- a/components/org.apache.stratos.python.cartridge.agent.test/src/test/resources/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:61616
-java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory

http://git-wip-us.apache.org/repos/asf/stratos/blob/b11e4de2/components/org.apache.stratos.python.cartridge.agent.test/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent.test/src/test/resources/log4j.properties b/components/org.apache.stratos.python.cartridge.agent.test/src/test/resources/log4j.properties
deleted file mode 100644
index c0c6e78..0000000
--- a/components/org.apache.stratos.python.cartridge.agent.test/src/test/resources/log4j.properties
+++ /dev/null
@@ -1,41 +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.
-#
-
-# Set root logger level and appenders
-log4j.rootLogger=INFO, CONSOLE_APPENDER, FILE_APPENDER
-
-# CONSOLE_APPENDER is set to be a ConsoleAppender.
-log4j.appender.CONSOLE_APPENDER=org.apache.log4j.ConsoleAppender
-
-# The standard error log where all the warnings, errors and fatal errors will be logged
-log4j.appender.FILE_APPENDER=org.apache.log4j.FileAppender
-log4j.appender.FILE_APPENDER.File=cartridge-agent.log
-log4j.appender.FILE_APPENDER.layout=org.apache.log4j.PatternLayout
-log4j.appender.FILE_APPENDER.layout.ConversionPattern=%d{ISO8601} [%X{ip}-%X{host}] [%t] %5p %c{1} %m%n
-log4j.appender.FILE_APPENDER.threshold=DEBUG
-
-# CONSOLE_APPENDER uses PatternLayout.
-log4j.appender.CONSOLE_APPENDER.layout=org.apache.log4j.PatternLayout
-log4j.appender.CONSOLE_APPENDER.layout.ConversionPattern=[%d{ISO8601}] %5p - [%c{1}] %m%n
-
-log4j.logger.org.apache.stratos.cartridge.agent=INFO
-log4j.logger.org.apache.stratos.messaging=INFO
-log4j.logger.org.apache.stratos.common.util=DEBUG
-log4j.logger.org.wso2.andes.client=ERROR
-log4j.logger.org.apache.activemq.jndi.ActiveMQInitialContextFactory=ERROR
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/b11e4de2/components/org.apache.stratos.python.cartridge.agent.test/src/test/resources/logging.ini
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent.test/src/test/resources/logging.ini b/components/org.apache.stratos.python.cartridge.agent.test/src/test/resources/logging.ini
deleted file mode 100644
index 15cad9b..0000000
--- a/components/org.apache.stratos.python.cartridge.agent.test/src/test/resources/logging.ini
+++ /dev/null
@@ -1,52 +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.
-
-
-[formatters]
-keys=default
-
-[formatter_default]
-format=[%(asctime)s] %(levelname)s {%(filename)s:%(funcName)s} - %(message)s
-class=logging.Formatter
-
-[handlers]
-keys=console, error_file, log_file
-
-[handler_console]
-class=logging.StreamHandler
-formatter=default
-args=tuple()
-
-[handler_log_file]
-class=logging.FileHandler
-level=DEBUG
-formatter=default
-args=("agent.log", "w")
-
-[handler_error_file]
-class=logging.FileHandler
-level=ERROR
-formatter=default
-args=("error.log", "w")
-
-[loggers]
-keys=root
-
-[logger_root]
-level=DEBUG
-formatter=default
-handlers=console,error_file,log_file
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/b11e4de2/components/org.apache.stratos.python.cartridge.agent.test/src/test/resources/payload/launch-params
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent.test/src/test/resources/payload/launch-params b/components/org.apache.stratos.python.cartridge.agent.test/src/test/resources/payload/launch-params
deleted file mode 100644
index 858d622..0000000
--- a/components/org.apache.stratos.python.cartridge.agent.test/src/test/resources/payload/launch-params
+++ /dev/null
@@ -1 +0,0 @@
-APPLICATION_ID=application1,SERVICE_NAME=php,HOST_NAME=php.php.stratos.org,MULTITENANT=false,TENANT_ID=-1234,TENANT_RANGE=*,CARTRIDGE_ALIAS=php,CLUSTER_ID=php.php.domain,CLUSTER_INSTANCE_ID=single-cartridge-app-1,CARTRIDGE_KEY=PUjpXCLujDhYr5A6,DEPLOYMENT=default,REPO_URL=https://github.com/imesh/stratos-php-applications.git,PORTS=9080,PUPPET_IP=127.0.0.1,PUPPET_HOSTNAME=puppet.apache.stratos.org,PUPPET_ENV=false,MEMBER_ID=php.member-1,LB_CLUSTER_ID=null,NETWORK_PARTITION_ID=network-p1,PARTITION_ID=p1,APPLICATION_PATH=/tmp/stratos-pca-test-app-path/,MIN_COUNT=1,INTERNAL=false,CLUSTERING_PRIMARY_KEY=A,LOG_FILE_PATHS=/tmp/temp.log,PERSISTENCE_MAPPING=null,MP_IP=192.168.1.4,MB_PORT=1883
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/b11e4de2/components/org.apache.stratos.python.cartridge.agent/README.md
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent/README.md b/components/org.apache.stratos.python.cartridge.agent/README.md
new file mode 100644
index 0000000..28ef8b6
--- /dev/null
+++ b/components/org.apache.stratos.python.cartridge.agent/README.md
@@ -0,0 +1,6 @@
+Running Live Tests
+==================
+
+1. Start ActiveMQ
+2. Execute following command to run python cartridge agent live tests:
+   ```mvn clean install -Plive```
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/b11e4de2/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/__init__.py
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/__init__.py b/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/__init__.py
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/stratos/blob/b11e4de2/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/cartridgeagent/__init__.py
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/cartridgeagent/__init__.py b/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/cartridgeagent/__init__.py
deleted file mode 100644
index d216be4..0000000
--- a/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/cartridgeagent/__init__.py
+++ /dev/null
@@ -1,16 +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.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/b11e4de2/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/cartridgeagent/agent.conf
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/cartridgeagent/agent.conf b/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/cartridgeagent/agent.conf
deleted file mode 100644
index 1e1f764..0000000
--- a/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/cartridgeagent/agent.conf
+++ /dev/null
@@ -1,60 +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.
-
-[agent]
-mb.ip                                 =MB-IP
-mb.port                               =MB-PORT
-listen.address                        =LISTEN_ADDR
-thrift.receiver.ip                    =CEP-IP
-thrift.receiver.port                  =CEP-PORT
-thrift.server.admin.username          =CEP-ADMIN-USERNAME
-thrift.server.admin.password          =CEP-ADMIN-PASSWORD
-cep.stats.publisher.enabled           =ENABLE_HEALTH_PUBLISHER
-lb.private.ip                         =LB_PRIVATE_IP
-lb.public.ip                          =LB_PUBLIC_IP
-enable.artifact.update                =ENABLE_ARTFCT_UPDATE
-auto.commit                           =COMMIT_ENABLED
-auto.checkout                         =CHECKOUT_ENABLED
-artifact.update.interval              =ARTFCT_UPDATE_INT
-port.check.timeout                    =PORT_CHECK_TIMEOUT
-enable.data.publisher                 =ENABLE-DATA-PUBLISHER
-monitoring.server.ip                  =MONITORING-SERVER-IP
-monitoring.server.port                =MONITORING-SERVER-PORT
-monitoring.server.secure.port         =MONITORING-SERVER-SECURE-PORT
-monitoring.server.admin.username      =MONITORING-SERVER-ADMIN-USERNAME
-monitoring.server.admin.password      =MONITORING-SERVER-ADMIN-PASSWORD
-log.file.paths                        =LOG_FILE_PATHS
-APPLICATION_PATH                      =APPLICATION_PATH
-super.tenant.repository.path          =/repository/deployment/server/
-tenant.repository.path                =/repository/tenants/
-extension.instance.started            =instance-started.sh
-extension.start.servers               =start-servers.sh
-extension.instance.activated          =instance-activated.sh
-extension.artifacts.updated           =artifacts-updated.sh
-extension.clean                       =clean.sh
-extension.mount.volumes               =mount_volumes.sh
-extension.member.started              =member-started.sh
-extension.member.activated            =member-activated.sh
-extension.member.suspended            =member-suspended.sh
-extension.member.terminated           =member-terminated.sh
-extension.complete.topology           =complete-topology.sh
-extension.complete.tenant             =complete-tenant.sh
-extension.subscription.domain.added   =subscription-domain-added.sh
-extension.subscription.domain.removed =subscription-domain-removed.sh
-extension.artifacts.copy              =artifacts-copy.sh
-extension.tenant.subscribed           =tenant-subscribed.sh
-extension.tenant.unsubscribed         =tenant-unsubscribed.sh
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/b11e4de2/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/cartridgeagent/agent.py
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/cartridgeagent/agent.py b/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/cartridgeagent/agent.py
deleted file mode 100644
index 54599d3..0000000
--- a/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/cartridgeagent/agent.py
+++ /dev/null
@@ -1,370 +0,0 @@
-#!/usr/bin/env python
-# 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.
-
-import threading
-import sys
-
-from modules.exception.parameternotfoundexception import ParameterNotFoundException
-from modules.subscriber import eventsubscriber
-from modules.publisher import cartridgeagentpublisher
-from modules.event.instance.notifier.events import *
-from modules.event.tenant.events import *
-from modules.event.topology.events import *
-from modules.event.application.signup.events import *
-from modules.tenant.tenantcontext import *
-from modules.topology.topologycontext import *
-from modules.datapublisher.logpublisher import *
-from modules.config import cartridgeagentconfiguration
-from modules.extensions import extensionhandler
-from modules.util import extensionutils
-
-
-class CartridgeAgent(threading.Thread):
-    extension_handler = extensionhandler.ExtensionHandler()
-
-    def __init__(self):
-        threading.Thread.__init__(self)
-
-        mb_ip = cartridgeagentconfiguration.CartridgeAgentConfiguration().read_property(cartridgeagentconstants.MB_IP)
-        mb_port = cartridgeagentconfiguration.CartridgeAgentConfiguration().read_property(cartridgeagentconstants.MB_PORT)
-
-        self.__instance_event_subscriber = eventsubscriber.EventSubscriber(
-            cartridgeagentconstants.INSTANCE_NOTIFIER_TOPIC,
-            mb_ip,
-            mb_port)
-        self.__tenant_event_subscriber = eventsubscriber.EventSubscriber(
-            cartridgeagentconstants.TENANT_TOPIC,
-            mb_ip,
-            mb_port)
-        self.__application_event_subscriber = eventsubscriber.EventSubscriber(
-            cartridgeagentconstants.APPLICATION_SIGNUP,
-            mb_ip,
-            mb_port)
-        self.__topology_event_subscriber = eventsubscriber.EventSubscriber(
-            cartridgeagentconstants.TOPOLOGY_TOPIC,
-            mb_ip,
-            mb_port)
-
-        self.__tenant_context_initialized = False
-        self.log_publish_manager = None
-        self.terminated = False
-        self.log = LogFactory().get_log(__name__)
-        self.cartridge_agent_config = CartridgeAgentConfiguration()
-
-    def run(self):
-        self.log.info("Starting Cartridge Agent...")
-
-        #Check if required properties are set
-        self.validate_required_properties()
-
-        #Start topology event receiver thread
-        self.register_topology_event_listeners()
-
-        # wait until complete topology message is received to get LB IP
-        extensionutils.wait_for_complete_topology()
-
-        #wait for member initialized event
-        while not self.cartridge_agent_config.initialized:
-            self.log.debug("Waiting for cartridge agent to be initialized...")
-            time.sleep(1)
-
-        #Start instance notifier listener thread
-        self.subscribe_to_topics_and_register_listeners()
-
-        #Start tenant event receiver thread
-        self.register_tenant_event_listeners()
-
-        #start application signup event listener
-        self.register_application_signup_event_listeners()
-
-        #Execute instance started shell script
-        CartridgeAgent.extension_handler.on_instance_started_event()
-
-        #Publish instance started event
-        cartridgeagentpublisher.publish_instance_started_event()
-
-        #Execute start servers extension
-        try:
-            CartridgeAgent.extension_handler.start_server_extension()
-        except:
-            self.log.exception("Error processing start servers event")
-
-        #Wait for all ports to be active
-        cartridgeagentutils.wait_until_ports_active(
-            self.cartridge_agent_config.listen_address,
-            self.cartridge_agent_config.ports,
-            int(self.cartridge_agent_config.read_property("port.check.timeout", critical=False))
-        )
-
-        # check if artifact management is required before publishing instance activated event
-        repo_url = self.cartridge_agent_config.repo_url
-        if repo_url is None or str(repo_url).strip() == "":
-            self.log.info("No artifact repository found")
-            CartridgeAgent.extension_handler.on_instance_activated_event()
-            cartridgeagentpublisher.publish_instance_activated_event()
-        else:
-            self.log.info("Artifact repository found, waiting for artifact updated event to checkout artifacts: [repo_url] %s", repo_url)
-
-        persistence_mappping_payload = self.cartridge_agent_config.persistence_mappings
-        if persistence_mappping_payload is not None:
-            CartridgeAgent.extension_handler.volume_mount_extension(persistence_mappping_payload)
-
-        # start log publishing thread
-        if DataPublisherConfiguration.get_instance().enabled:
-            log_file_paths = self.cartridge_agent_config.log_file_paths
-            if log_file_paths is None:
-                self.log.exception("No valid log file paths found, no logs will be published")
-            else:
-                self.log_publish_manager = LogPublisherManager(log_file_paths)
-                self.log_publish_manager.start()
-
-        while not self.terminated:
-            time.sleep(1)
-
-        if DataPublisherConfiguration.get_instance().enabled:
-            self.log_publish_manager.terminate_all_publishers()
-
-    def terminate(self):
-        """
-        Allows the CartridgeAgent thread to be terminated
-
-        :return: void
-        """
-        self.terminated = True
-
-    def validate_required_properties(self):
-        """
-        Checks if required properties are set
-        :return: void
-        """
-        #PARAM_FILE_PATH
-        try:
-            self.cartridge_agent_config.read_property(cartridgeagentconstants.PARAM_FILE_PATH)
-        except ParameterNotFoundException:
-            self.log.error("System property not found: %r" % cartridgeagentconstants.PARAM_FILE_PATH)
-            return
-
-        #EXTENSIONS_DIR
-        try:
-            self.cartridge_agent_config.read_property(cartridgeagentconstants.EXTENSIONS_DIR)
-        except ParameterNotFoundException:
-            self.log.error("System property not found: %r" % cartridgeagentconstants.EXTENSIONS_DIR)
-            return
-        
-    def subscribe_to_topics_and_register_listeners(self):
-        self.log.debug("Starting instance notifier event message receiver thread")
-
-        self.__instance_event_subscriber.register_handler("ArtifactUpdatedEvent", self.on_artifact_updated)
-        self.__instance_event_subscriber.register_handler("InstanceCleanupMemberEvent", self.on_instance_cleanup_member)
-        self.__instance_event_subscriber.register_handler("InstanceCleanupClusterEvent", self.on_instance_cleanup_cluster)
-
-        self.__instance_event_subscriber.start()
-        self.log.info("Instance notifier event message receiver thread started")
-
-        # wait till subscribed to continue
-        while not self.__instance_event_subscriber.is_subscribed():
-            time.sleep(2)
-
-    def on_artifact_updated(self, msg):
-        event_obj = ArtifactUpdatedEvent.create_from_json(msg.payload)
-        CartridgeAgent.extension_handler.on_artifact_updated_event(event_obj)
-
-    def on_instance_cleanup_member(self, msg):
-        member_in_payload = self.cartridge_agent_config.member_id
-        event_obj = InstanceCleanupMemberEvent.create_from_json(msg.payload)
-        member_in_event = event_obj.member_id
-        if member_in_payload == member_in_event:
-            CartridgeAgent.extension_handler.on_instance_cleanup_member_event(event_obj)
-
-    def on_instance_cleanup_cluster(self, msg):
-        event_obj = InstanceCleanupClusterEvent.create_from_json(msg.payload)
-        cluster_in_payload = self.cartridge_agent_config.cluster_id
-        cluster_in_event = event_obj.cluster_id
-        instance_in_payload = self.cartridge_agent_config.cluster_instance_id
-        instance_in_event = event_obj.cluster_instance_id
-
-        if cluster_in_event == cluster_in_payload and instance_in_payload == instance_in_event:
-            CartridgeAgent.extension_handler.on_instance_cleanup_cluster_event(event_obj)
-
-    def register_topology_event_listeners(self):
-        self.log.debug("Starting topology event message receiver thread")
-
-        self.__topology_event_subscriber.register_handler("MemberActivatedEvent", self.on_member_activated)
-        self.__topology_event_subscriber.register_handler("MemberTerminatedEvent", self.on_member_terminated)
-        self.__topology_event_subscriber.register_handler("MemberSuspendedEvent", self.on_member_suspended)
-        self.__topology_event_subscriber.register_handler("CompleteTopologyEvent", self.on_complete_topology)
-        self.__topology_event_subscriber.register_handler("MemberStartedEvent", self.on_member_started)
-        self.__topology_event_subscriber.register_handler("MemberCreatedEvent", self.on_member_created)
-        self.__topology_event_subscriber.register_handler("MemberInitializedEvent", self.on_member_initialized)
-
-        self.__topology_event_subscriber.start()
-        self.log.info("Cartridge agent topology receiver thread started")
-
-    def on_member_created(self, msg):
-        self.log.debug("Member created event received: %r" % msg.payload)
-
-    def on_member_initialized(self, msg):
-        self.log.debug("Member initialized event received: %r" % msg.payload)
-
-        if self.cartridge_agent_config.initialized:
-            return
-
-        event_obj = MemberInitializedEvent.create_from_json(msg.payload)
-        try:
-            CartridgeAgent.extension_handler.on_member_initialized_event(event_obj)
-        except:
-            self.log.exception("Error processing member initialized event")
-
-    def on_member_activated(self, msg):
-        self.log.debug("Member activated event received: %r" % msg.payload)
-        if not self.cartridge_agent_config.initialized:
-            return
-
-        event_obj = MemberActivatedEvent.create_from_json(msg.payload)
-        try:
-            CartridgeAgent.extension_handler.on_member_activated_event(event_obj)
-        except:
-            self.log.exception("Error processing member activated event")
-
-    def on_member_terminated(self, msg):
-        self.log.debug("Member terminated event received: %r" % msg.payload)
-        if not self.cartridge_agent_config.initialized:
-            return
-
-        event_obj = MemberTerminatedEvent.create_from_json(msg.payload)
-        try:
-            CartridgeAgent.extension_handler.on_member_terminated_event(event_obj)
-        except:
-            self.log.exception("Error processing member terminated event")
-
-    def on_member_suspended(self, msg):
-        self.log.debug("Member suspended event received: %r" % msg.payload)
-        if not self.cartridge_agent_config.initialized:
-            return
-
-        event_obj = MemberSuspendedEvent.create_from_json(msg.payload)
-        try:
-            CartridgeAgent.extension_handler.on_member_suspended_event(event_obj)
-        except:
-            self.log.exception("Error processing member suspended event")
-
-    def on_complete_topology(self, msg):
-        if not TopologyContext.topology.initialized:
-            self.log.debug("Complete topology event received")
-            event_obj = CompleteTopologyEvent.create_from_json(msg.payload)
-            TopologyContext.update(event_obj.topology)
-            try:
-                CartridgeAgent.extension_handler.on_complete_topology_event(event_obj)
-            except:
-                self.log.exception("Error processing complete topology event")
-        else:
-            self.log.debug("Complete topology event updating task disabled")
-
-    def on_member_started(self, msg):
-        self.log.debug("Member started event received: %r" % msg.payload)
-        if not self.cartridge_agent_config.initialized:
-            return
-
-        event_obj = MemberStartedEvent.create_from_json(msg.payload)
-        try:
-            CartridgeAgent.extension_handler.on_member_started_event(event_obj)
-        except:
-            self.log.exception("Error processing member started event")
-
-    def register_tenant_event_listeners(self):
-        self.log.debug("Starting tenant event message receiver thread")
-        self.__tenant_event_subscriber.register_handler("SubscriptionDomainAddedEvent", self.on_subscription_domain_added)
-        self.__tenant_event_subscriber.register_handler("SubscriptionDomainsRemovedEvent", self.on_subscription_domain_removed)
-        self.__tenant_event_subscriber.register_handler("CompleteTenantEvent", self.on_complete_tenant)
-        self.__tenant_event_subscriber.register_handler("TenantSubscribedEvent", self.on_tenant_subscribed)
-
-        self.__tenant_event_subscriber.start()
-        self.log.info("Tenant event message receiver thread started")
-
-    def register_application_signup_event_listeners(self):
-        self.log.debug("Starting application signup event message receiver thread")
-        self.__application_event_subscriber.register_handler("ApplicationSignUpRemovedEvent",self.on_application_signup_removed)
-        self.__application_event_subscriber.start()
-        self.log.info("Application signup event message receiver thread started")
-
-    def on_subscription_domain_added(self, msg):
-        self.log.debug("Subscription domain added event received : %r" % msg.payload)
-        event_obj = SubscriptionDomainAddedEvent.create_from_json(msg.payload)
-        try:
-            CartridgeAgent.extension_handler.on_subscription_domain_added_event(event_obj)
-        except:
-            self.log.exception("Error processing subscription domains added event")
-
-    def on_subscription_domain_removed(self, msg):
-        self.log.debug("Subscription domain removed event received : %r" % msg.payload)
-        event_obj = SubscriptionDomainRemovedEvent.create_from_json(msg.payload)
-        try:
-            CartridgeAgent.extension_handler.on_subscription_domain_removed_event(event_obj)
-        except:
-            self.log.exception("Error processing subscription domains removed event")
-
-    def on_complete_tenant(self, msg):
-        if not self.__tenant_context_initialized:
-            self.log.debug("Complete tenant event received")
-            event_obj = CompleteTenantEvent.create_from_json(msg.payload)
-            TenantContext.update(event_obj.tenants)
-
-            try:
-                CartridgeAgent.extension_handler.on_complete_tenant_event(event_obj)
-                self.__tenant_context_initialized = True
-            except:
-                self.log.exception("Error processing complete tenant event")
-        else:
-            self.log.debug("Complete tenant event updating task disabled")
-
-    def on_tenant_subscribed(self, msg):
-        self.log.debug("Tenant subscribed event received: %r" % msg.payload)
-        event_obj = TenantSubscribedEvent.create_from_json(msg.payload)
-        try:
-            CartridgeAgent.extension_handler.on_tenant_subscribed_event(event_obj)
-        except:
-            self.log.exception("Error processing tenant subscribed event")
-
-    def on_application_signup_removed(self, msg):
-        self.log.debug("Application signup removed event received: %r" % msg.payload)
-        event_obj = ApplicationSignUpRemovedEvent.create_from_json(msg.payload)
-        try:
-            CartridgeAgent.extension_handler.on_application_signup_removal_event(event_obj)
-        except:
-            self.log.exception("Error processing tenant unSubscribed event")
-
-
-def uncaught_exception_mg(exctype, value, tb):
-    log = LogFactory().get_log(__name__)
-    log.exception("UNCAUGHT EXCEPTION:", value)
-
-def main():
-    sys.excepthook = uncaught_exception_mg
-    cartridge_agent = CartridgeAgent()
-    log = LogFactory().get_log(__name__)
-
-    try:
-        log.debug("Starting cartridge agent")
-        cartridge_agent.start()
-    except:
-        log.exception("Cartridge Agent Exception")
-        cartridge_agent.terminate()
-
-
-if __name__ == "__main__":
-    main()

http://git-wip-us.apache.org/repos/asf/stratos/blob/b11e4de2/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/cartridgeagent/extensions/artifacts-copy.sh
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/cartridgeagent/extensions/artifacts-copy.sh b/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/cartridgeagent/extensions/artifacts-copy.sh
deleted file mode 100755
index baa0aeb..0000000
--- a/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/cartridgeagent/extensions/artifacts-copy.sh
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/bash
-# --------------------------------------------------------------
-#
-# 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 extension script will be executed once the update artifacts
-# event is received and they are copied to the given path.
-# --------------------------------------------------------------
-#
-
-log=/var/log/apache-stratos/cartridge-agent-extensions.log
-if [[ ! -d $2 ]]; then
-   mkdir -p $2
-fi
-cp -rf $1* $2
-echo "Artifacts Copied" | tee -a $log

http://git-wip-us.apache.org/repos/asf/stratos/blob/b11e4de2/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/cartridgeagent/extensions/artifacts-updated.sh
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/cartridgeagent/extensions/artifacts-updated.sh b/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/cartridgeagent/extensions/artifacts-updated.sh
deleted file mode 100755
index 15d5591..0000000
--- a/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/cartridgeagent/extensions/artifacts-updated.sh
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/bash
-# --------------------------------------------------------------
-#
-# 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 extension script will be executed once the update artifacts
-# event is received and they are copied to the given path.
-# --------------------------------------------------------------
-#
-
-log=/var/log/apache-stratos/cartridge-agent-extensions.log
-echo `date`": Artifacts Updated Event" | tee -a $log

http://git-wip-us.apache.org/repos/asf/stratos/blob/b11e4de2/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/cartridgeagent/extensions/clean.sh
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/cartridgeagent/extensions/clean.sh b/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/cartridgeagent/extensions/clean.sh
deleted file mode 100755
index c62ad35..0000000
--- a/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/cartridgeagent/extensions/clean.sh
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/bash
-# --------------------------------------------------------------
-#
-# 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 extension script will be executed when stratos manager requests
-# to clean up the instance before terminating it.
-# --------------------------------------------------------------
-#
-
-log=/var/log/apache-stratos/cartridge-agent-extensions.log
-echo `date`": Cleaning the cartridge" | tee -a $log

http://git-wip-us.apache.org/repos/asf/stratos/blob/b11e4de2/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/cartridgeagent/extensions/complete-tenant.sh
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/cartridgeagent/extensions/complete-tenant.sh b/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/cartridgeagent/extensions/complete-tenant.sh
deleted file mode 100755
index 2586474..0000000
--- a/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/cartridgeagent/extensions/complete-tenant.sh
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/bash
-# --------------------------------------------------------------
-#
-# 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 extension script will be executed when complete tenant
-# event is received.
-# --------------------------------------------------------------
-#
-
-log=/var/log/apache-stratos/cartridge-agent-extensions.log
-echo `date`": Complete Tenant Event: " | tee -a $log
-echo "Member List: ${STRATOS_MEMBER_LIST_JSON}" | tee -a $log
-echo "Tenant List: ${STRATOS_TENANT_LIST_JSON}" | tee -a $log

http://git-wip-us.apache.org/repos/asf/stratos/blob/b11e4de2/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/cartridgeagent/extensions/complete-topology.sh
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/cartridgeagent/extensions/complete-topology.sh b/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/cartridgeagent/extensions/complete-topology.sh
deleted file mode 100755
index ea2e941..0000000
--- a/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/cartridgeagent/extensions/complete-topology.sh
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/bash
-# --------------------------------------------------------------
-#
-# 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 extension script will be executed when complete topology 
-# event is received.
-# --------------------------------------------------------------
-#
-
-log=/var/log/apache-stratos/cartridge-agent-extensions.log
-echo `date`": Complete Topology Event: " | tee -a $log
-echo "LB IP: ${STRATOS_LB_IP}" | tee -a $log
-echo "LB PUBLIC IP: $STRATOS_LB_PUBLIC_IP}" | tee -a $log
-echo "STRATOS_PARAM_FILE_PATH: ${STRATOS_PARAM_FILE_PATH}"
-echo "Member List: ${STRATOS_MEMBER_LIST_JSON}" | tee -a $log
-echo "Complete Topology: ${STRATOS_TOPOLOGY_JSON}" | tee -a $log
-echo "Members in LB: ${STRATOS_MEMBERS_IN_LB_JSON}" | tee -a $log

http://git-wip-us.apache.org/repos/asf/stratos/blob/b11e4de2/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/cartridgeagent/extensions/instance-activated.sh
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/cartridgeagent/extensions/instance-activated.sh b/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/cartridgeagent/extensions/instance-activated.sh
deleted file mode 100755
index f5d60e8..0000000
--- a/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/cartridgeagent/extensions/instance-activated.sh
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/bash
-# --------------------------------------------------------------
-#
-# 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 extension script will be executed once the instance is
-# activated and ready to serve incoming requests.
-# --------------------------------------------------------------
-#
-
-log=/var/log/apache-stratos/cartridge-agent-extensions.log
-echo `date`": Instance activated" | tee -a $log

http://git-wip-us.apache.org/repos/asf/stratos/blob/b11e4de2/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/cartridgeagent/extensions/instance-started.sh
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/cartridgeagent/extensions/instance-started.sh b/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/cartridgeagent/extensions/instance-started.sh
deleted file mode 100755
index 7b5aa6a..0000000
--- a/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/cartridgeagent/extensions/instance-started.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/bash
-# --------------------------------------------------------------
-#
-# 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 extension script will be executed once the instance is started.
-# --------------------------------------------------------------
-#
-
-log=/var/log/apache-stratos/cartridge-agent-extensions.log
-echo `date`": Instance Started Event: " | tee -a $log

http://git-wip-us.apache.org/repos/asf/stratos/blob/b11e4de2/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/cartridgeagent/extensions/member-activated.sh
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/cartridgeagent/extensions/member-activated.sh b/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/cartridgeagent/extensions/member-activated.sh
deleted file mode 100755
index e59b41e..0000000
--- a/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/cartridgeagent/extensions/member-activated.sh
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/bin/bash
-# --------------------------------------------------------------
-#
-# 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 extension script will be executed when member activated
-# event is received.
-# --------------------------------------------------------------
-#
-
-log=/var/log/apache-stratos/cartridge-agent-extensions.log
-OUTPUT=`date`": Member Activated Event: "
-OUTPUT="$OUTPUT MEMBER_ID: ${STRATOS_MEMBER_ID}, "
-OUTPUT="$OUTPUT MEMBER_IP: ${STRATOS_MEMBER_IP}, "
-OUTPUT="$OUTPUT CLUSTER_ID: ${STRATOS_CLUSTER_ID}, "
-OUTPUT="$OUTPUT LB_CLUSTER_ID: ${STRATOS_LB_CLUSTER_ID}, "
-OUTPUT="$OUTPUT NETWORK_PARTITION_ID: ${STRATOS_NETWORK_PARTITION_ID}, "
-OUTPUT="$OUTPUT SERVICE_NAME: ${STRATOS_SERVICE_NAME}, "
-OUTPUT="$OUTPUT PORTS: ${STRATOS_PORTS},"
-OUTPUT="$OUTPUT STRATOS_LB_IP: ${STRATOS_LB_IP},"
-OUTPUT="$OUTPUT STRATOS_LB_PUBLIC_IP: ${STRATOS_LB_PUBLIC_IP},"
-OUTPUT="$OUTPUT APPLICATION_PATH: ${APPLICATION_PATH},"
-OUTPUT="$OUTPUT STRATOS_PARAM_FILE_PATH: ${STRATOS_PARAM_FILE_PATH}"
-echo $OUTPUT | tee -a $log
-echo "Member List: ${STRATOS_MEMBER_LIST_JSON}" | tee -a $log
-echo "Topology: ${STRATOS_TOPOLOGY_JSON}" | tee -a $log
-echo "---------------" | tee -a $log

http://git-wip-us.apache.org/repos/asf/stratos/blob/b11e4de2/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/cartridgeagent/extensions/member-started.sh
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/cartridgeagent/extensions/member-started.sh b/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/cartridgeagent/extensions/member-started.sh
deleted file mode 100755
index b750fd0..0000000
--- a/components/org.apache.stratos.python.cartridge.agent/cartridgeagent/cartridgeagent/extensions/member-started.sh
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/bin/bash
-# --------------------------------------------------------------
-#
-# 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 extension script will be executed when member suspended
-# event is received.
-# --------------------------------------------------------------
-#
-
-log=/var/log/apache-stratos/cartridge-agent-extensions.log
-OUTPUT=`date`": Member Started Event: "
-OUTPUT="$OUTPUT MEMBER_ID: ${STRATOS_MEMBER_ID}, "
-OUTPUT="$OUTPUT MEMBER_IP: ${STRATOS_MEMBER_IP}, "
-OUTPUT="$OUTPUT CLUSTER_ID: ${STRATOS_CLUSTER_ID}, "
-OUTPUT="$OUTPUT LB_CLUSTER_ID: ${STRATOS_LB_CLUSTER_ID}, "
-OUTPUT="$OUTPUT NETWORK_PARTITION_ID: ${STRATOS_NETWORK_PARTITION_ID}, "
-OUTPUT="$OUTPUT SERVICE_NAME: ${STRATOS_SERVICE_NAME}, "
-OUTPUT="$OUTPUT PORTS: ${STRATOS_PORTS},"
-OUTPUT="$OUTPUT STRATOS_LB_IP: ${STRATOS_LB_IP},"
-OUTPUT="$OUTPUT STRATOS_LB_PUBLIC_IP: ${STRATOS_LB_PUBLIC_IP},"
-OUTPUT="$OUTPUT APPLICATION_PATH: ${APPLICATION_PATH},"
-OUTPUT="$OUTPUT STRATOS_PARAM_FILE_PATH: ${STRATOS_PARAM_FILE_PATH}"
-echo $OUTPUT | tee -a $log
-echo "Member List: ${STRATOS_MEMBER_LIST_JSON}" | tee -a $log
-echo "Topology: ${STRATOS_TOPOLOGY_JSON}" | tee -a $log
-echo "---------------" | tee -a $log