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/06 21:59:48 UTC
[4/5] stratos git commit: Cleaning up module structure, parent pom,
Stratos distribution
http://git-wip-us.apache.org/repos/asf/stratos/blob/d9fb5f01/products/python-cartridge-agent/integration/src/test/java/org/apache/stratos/python.cartridge.agent/test/PythonAgentTestManager.java
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/integration/src/test/java/org/apache/stratos/python.cartridge.agent/test/PythonAgentTestManager.java b/products/python-cartridge-agent/integration/src/test/java/org/apache/stratos/python.cartridge.agent/test/PythonAgentTestManager.java
deleted file mode 100644
index 5ba6c6a..0000000
--- a/products/python-cartridge-agent/integration/src/test/java/org/apache/stratos/python.cartridge.agent/test/PythonAgentTestManager.java
+++ /dev/null
@@ -1,461 +0,0 @@
-package org.apache.stratos.python.cartridge.agent.test;/*
- * 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 org.apache.activemq.broker.BrokerService;
-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.common.threading.StratosThreadPool;
-import org.apache.stratos.messaging.broker.publish.EventPublisher;
-import org.apache.stratos.messaging.broker.publish.EventPublisherPool;
-import org.apache.stratos.messaging.event.Event;
-import org.apache.stratos.messaging.listener.instance.status.InstanceActivatedEventListener;
-import org.apache.stratos.messaging.listener.instance.status.InstanceStartedEventListener;
-import org.apache.stratos.messaging.message.receiver.instance.status.InstanceStatusEventReceiver;
-import org.apache.stratos.messaging.message.receiver.topology.TopologyEventReceiver;
-import org.apache.stratos.messaging.util.MessagingUtil;
-
-import java.io.*;
-import java.net.ServerSocket;
-import java.net.Socket;
-import java.util.*;
-import java.util.concurrent.ExecutorService;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipInputStream;
-
-public class PythonAgentTestManager {
- protected final Properties integrationProperties = new Properties();
- private static final Log log = LogFactory.getLog(PythonAgentTestManager.class);
- protected BrokerService broker = new BrokerService();
-
- public final long TIMEOUT = 180000;
- public static final String NEW_LINE = System.getProperty("line.separator");
- public static final String ACTIVEMQ_AMQP_BIND_ADDRESS = "activemq.amqp.bind.address";
- public static final String ACTIVEMQ_MQTT_BIND_ADDRESS = "activemq.mqtt.bind.address";
- public static final String CEP_PORT = "cep.port";
- public static final String DISTRIBUTION_NAME = "distribution.name";
- protected final UUID PYTHON_AGENT_DIR_NAME = UUID.randomUUID();
-
- protected Map<Integer, ServerSocket> serverSocketMap = new HashMap<>();
- protected Map<String, Executor> executorList = new HashMap<String, Executor>();
-
- protected int cepPort;
- protected String amqpBindAddress;
- protected String mqttBindAddress;
- protected String distributionName;
-
- protected boolean eventReceiverInitiated = false;
- protected TopologyEventReceiver topologyEventReceiver;
- protected InstanceStatusEventReceiver instanceStatusEventReceiver;
- protected boolean instanceStarted;
- protected boolean instanceActivated;
- protected ByteArrayOutputStreamLocal outputStream;
-
- /**
- * Setup method for test method testPythonCartridgeAgent
- */
- protected void setup(String resourcePath) {
- try {
- startBroker();
- }
- catch (Exception e) {
- log.error("Error while starting MB", e);
- return;
- }
- if (!this.eventReceiverInitiated) {
- ExecutorService executorService = StratosThreadPool.getExecutorService("TEST_THREAD_POOL", 15);
- topologyEventReceiver = new TopologyEventReceiver();
- topologyEventReceiver.setExecutorService(executorService);
- topologyEventReceiver.execute();
-
- instanceStatusEventReceiver = new InstanceStatusEventReceiver();
- instanceStatusEventReceiver.setExecutorService(executorService);
- instanceStatusEventReceiver.execute();
-
- this.instanceStarted = false;
- instanceStatusEventReceiver.addEventListener(new InstanceStartedEventListener() {
- @Override
- protected void onEvent(Event event) {
- log.info("Instance started event received");
- instanceStarted = true;
- }
- });
-
- this.instanceActivated = false;
- instanceStatusEventReceiver.addEventListener(new InstanceActivatedEventListener() {
- @Override
- protected void onEvent(Event event) {
- log.info("Instance activated event received");
- instanceActivated = true;
- }
- });
-
- this.eventReceiverInitiated = true;
- }
- // Simulate CEP Thrift server
- //startServerSocket(cepPort);
- // TODO: create a mock thrift server; sockets will not work with health stats publisher
- String agentPath = setupPythonAgent(resourcePath);
- log.info("Python agent working directory name: " + PYTHON_AGENT_DIR_NAME);
- log.info("Starting python cartridge agent...");
- this.outputStream = executeCommand("python " + agentPath + "/agent.py > " +
- PythonAgentTestManager.class.getResource(File.separator).getPath() + "/../" + PYTHON_AGENT_DIR_NAME +
- "/cartridge-agent-console.log");
- }
-
-
- protected void tearDown() {
- tearDown(null);
- }
-
- /**
- * TearDown method for test method testPythonCartridgeAgent
- */
- protected void tearDown(String sourcePath) {
- for (Map.Entry<String, Executor> entry : executorList.entrySet()) {
- try {
- String commandText = entry.getKey();
- Executor executor = entry.getValue();
- log.info("Terminating process: " + commandText);
- executor.setExitValue(0);
- executor.getWatchdog().destroyProcess();
- }
- catch (Exception ignore) {
- }
- }
- // wait until everything cleans up to avoid connection errors
- sleep(1000);
- for (ServerSocket serverSocket : serverSocketMap.values()) {
- try {
- log.info("Stopping socket server: " + serverSocket.getLocalSocketAddress());
- serverSocket.close();
- }
- catch (IOException ignore) {
- }
- }
-
- try {
- log.info("Deleting source checkout folder...");
- FileUtils.deleteDirectory(new File(sourcePath));
- }
- catch (Exception ignore) {
- }
- this.instanceStatusEventReceiver.terminate();
- this.topologyEventReceiver.terminate();
-
- this.instanceActivated = false;
- this.instanceStarted = false;
- try {
- broker.stop();
- }
- catch (Exception e) {
- log.error("Error while stopping the broker service", e);
- }
- }
-
- public PythonAgentTestManager() {
- try {
- integrationProperties
- .load(PythonAgentTestManager.class.getResourceAsStream("/integration-test.properties"));
- distributionName = integrationProperties.getProperty(DISTRIBUTION_NAME);
- amqpBindAddress = integrationProperties.getProperty(ACTIVEMQ_AMQP_BIND_ADDRESS);
- mqttBindAddress = integrationProperties.getProperty(ACTIVEMQ_MQTT_BIND_ADDRESS);
- cepPort = Integer.parseInt(integrationProperties.getProperty(CEP_PORT));
- log.info("PCA 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);
- }
- }
-
- protected void startBroker() throws Exception {
- broker.addConnector(amqpBindAddress);
- broker.addConnector(mqttBindAddress);
- broker.setBrokerName("testBroker");
- broker.setDataDirectory(
- PythonAgentTestManager.class.getResource("/").getPath() + "/../" + PYTHON_AGENT_DIR_NAME +
- "/activemq-data");
- broker.start();
- log.info("Broker service started!");
- }
-
- protected void startCommunicatorThread() {
- Thread communicatorThread = new Thread(new Runnable() {
- @Override
- public void run() {
- 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("Exception in thread") || line.contains("ERROR")) {
- try {
- throw new RuntimeException(line);
- }
- catch (Exception e) {
- log.error("ERROR found in PCA log", e);
- }
- }
- log.info(line);
- }
- }
- sleep(100);
- }
- }
- });
- communicatorThread.start();
- }
-
- /**
- * Start server socket
- *
- * @param port
- */
- protected void startServerSocket(final int port) {
- Thread socketThread = new Thread(new Runnable() {
- @Override
- public void run() {
- while (true) { // do this infinitely until test is complete
- try {
- ServerSocket serverSocket = new ServerSocket(port);
- serverSocketMap.put(port, serverSocket);
- log.info("Server socket started on port: " + port);
- Socket socket = serverSocket.accept();
- log.info("Client connected to [port] " + port);
-
- InputStream is = socket.getInputStream();
- byte[] buffer = new byte[1024];
- int read;
- while (true) {
- if (socket.isClosed()) {
- log.info("Socket for [port] " + port + " has been closed.");
- break;
- }
- if ((read = is.read(buffer)) != -1) {
- String output = new String(buffer, 0, read);
- log.info("Message received for [port] " + port + ", [message] " + output);
- }
- }
- }
- catch (IOException e) {
- String message = "Could not start server socket: [port] " + port;
- log.error(message, e);
- throw new RuntimeException(message, e);
- }
- }
- }
- });
- socketThread.start();
- }
-
-
- protected static String getResourcesPath() {
- return PythonAgentTestManager.class.getResource("/").getPath() + "/../../src/test/resources";
- }
-
- protected static String getResourcesPath(String resourcesPath) {
- return PythonAgentTestManager.class.getResource("/").getPath() + "/../../src/test/resources" + resourcesPath;
- }
-
- /**
- * Copy python agent distribution to a new folder, extract it and copy sample configuration files
- *
- * @return
- */
- protected String setupPythonAgent(String resourcesPath) {
- try {
- log.info("Setting up python cartridge agent...");
-
-
- String srcAgentPath = PythonAgentTestManager.class.getResource("/").getPath() +
- "/../../../distribution/target/" + distributionName + ".zip";
- String unzipDestPath =
- PythonAgentTestManager.class.getResource("/").getPath() + "/../" + PYTHON_AGENT_DIR_NAME + "/";
- //FileUtils.copyFile(new File(srcAgentPath), new File(destAgentPath));
- unzip(srcAgentPath, unzipDestPath);
- String destAgentPath = PythonAgentTestManager.class.getResource("/").getPath() + "/../" +
- PYTHON_AGENT_DIR_NAME + "/" + distributionName;
-
- String srcAgentConfPath = getResourcesPath(resourcesPath) + "/agent.conf";
- String destAgentConfPath = destAgentPath + "/agent.conf";
- FileUtils.copyFile(new File(srcAgentConfPath), new File(destAgentConfPath));
-
- String srcLoggingIniPath = getResourcesPath(resourcesPath) + "/logging.ini";
- String destLoggingIniPath = destAgentPath + "/logging.ini";
- FileUtils.copyFile(new File(srcLoggingIniPath), new File(destLoggingIniPath));
-
- String srcPayloadPath = getResourcesPath(resourcesPath) + "/payload";
- String destPayloadPath = destAgentPath + "/payload";
- FileUtils.copyDirectory(new File(srcPayloadPath), new File(destPayloadPath));
-
- log.info("Changing extension scripts permissions");
- File extensionsPath = new File(destAgentPath + "/extensions/bash");
- File[] extensions = extensionsPath.listFiles();
- for (File extension : extensions) {
- extension.setExecutable(true);
- }
-
- 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);
- }
- }
-
- private void unzip(String zipFilePath, String destDirectory) throws IOException {
- File destDir = new File(destDirectory);
- if (!destDir.exists()) {
- destDir.mkdir();
- }
- ZipInputStream zipIn = new ZipInputStream(new FileInputStream(zipFilePath));
- ZipEntry entry = zipIn.getNextEntry();
- // iterates over entries in the zip file
- while (entry != null) {
- String filePath = destDirectory + File.separator + entry.getName();
- if (!entry.isDirectory()) {
- // if the entry is a file, extracts it
- extractFile(zipIn, filePath);
- } else {
- // if the entry is a directory, make the directory
- File dir = new File(filePath);
- dir.mkdir();
- }
- zipIn.closeEntry();
- entry = zipIn.getNextEntry();
- }
- zipIn.close();
- }
-
- private void extractFile(ZipInputStream zipIn, String filePath) throws IOException {
- BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(filePath));
- byte[] bytesIn = new byte[4096];
- int read = 0;
- while ((read = zipIn.read(bytesIn)) != -1) {
- bos.write(bytesIn, 0, read);
- }
- bos.close();
- }
-
- /**
- * Execute shell command
- *
- * @param commandText
- */
- protected ByteArrayOutputStreamLocal executeCommand(final String commandText) {
- final ByteArrayOutputStreamLocal outputStream = new ByteArrayOutputStreamLocal();
- try {
- CommandLine commandline = CommandLine.parse(commandText);
- DefaultExecutor exec = new DefaultExecutor();
- PumpStreamHandler streamHandler = new PumpStreamHandler(outputStream);
- exec.setWorkingDirectory(new File(
- PythonAgentTestManager.class.getResource("/").getPath() + "/../" + PYTHON_AGENT_DIR_NAME));
- exec.setStreamHandler(streamHandler);
- ExecuteWatchdog watchdog = new ExecuteWatchdog(TIMEOUT);
- exec.setWatchdog(watchdog);
- exec.execute(commandline, new ExecuteResultHandler() {
- @Override
- public void onProcessComplete(int i) {
- log.info(commandText + " process completed");
- }
-
- @Override
- public void onProcessFailed(ExecuteException e) {
- log.error(commandText + " process failed", e);
- }
- });
- executorList.put(commandText, exec);
- return outputStream;
- }
- catch (Exception e) {
- log.error(outputStream.toString(), e);
- throw new RuntimeException(e);
- }
- }
-
- /**
- * Sleep current thread
- *
- * @param time
- */
- protected void sleep(long time) {
- try {
- Thread.sleep(time);
- }
- catch (InterruptedException ignore) {
- }
- }
-
- /**
- * Return new lines found in the output
- *
- * @param currentOutputLines current output lines
- * @param output output
- * @return
- */
- protected List<String> getNewLines(List<String> currentOutputLines, String output) {
- List<String> newLines = new ArrayList<String>();
-
- if (StringUtils.isNotBlank(output)) {
- String[] lines = output.split(NEW_LINE);
- for (String line : lines) {
- if (!currentOutputLines.contains(line)) {
- currentOutputLines.add(line);
- newLines.add(line);
- }
- }
- }
- return newLines;
- }
-
- /**
- * Publish messaging event
- *
- * @param event
- */
- protected void publishEvent(Event event) {
- String topicName = MessagingUtil.getMessageTopicName(event);
- EventPublisher eventPublisher = EventPublisherPool.getPublisher(topicName);
- eventPublisher.publish(event);
- }
-
-
- /**
- * Implements ByteArrayOutputStream.isClosed() method
- */
- protected class ByteArrayOutputStreamLocal extends org.apache.commons.io.output.ByteArrayOutputStream {
- private boolean closed;
-
- @Override
- public void close() throws IOException {
- super.close();
- closed = true;
- }
-
- public boolean isClosed() {
- return closed;
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/d9fb5f01/products/python-cartridge-agent/integration/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/integration/src/test/resources/log4j.properties b/products/python-cartridge-agent/integration/src/test/resources/log4j.properties
deleted file mode 100755
index c0c6e78..0000000
--- a/products/python-cartridge-agent/integration/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/d9fb5f01/products/python-cartridge-agent/integration/src/test/resources/pca-testing1.xml
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/integration/src/test/resources/pca-testing1.xml b/products/python-cartridge-agent/integration/src/test/resources/pca-testing1.xml
deleted file mode 100755
index c102914..0000000
--- a/products/python-cartridge-agent/integration/src/test/resources/pca-testing1.xml
+++ /dev/null
@@ -1,29 +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="PythonCartridgeAgentIntegrationSuite1">
- <test name="PCATest">
- <classes>
- <class name="org.apache.stratos.python.cartridge.agent.test.AgentStartupTest"/>
- </classes>
- </test>
-</suite>
http://git-wip-us.apache.org/repos/asf/stratos/blob/d9fb5f01/products/python-cartridge-agent/integration/src/test/resources/pca-testing2.xml
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/integration/src/test/resources/pca-testing2.xml b/products/python-cartridge-agent/integration/src/test/resources/pca-testing2.xml
deleted file mode 100755
index c292953..0000000
--- a/products/python-cartridge-agent/integration/src/test/resources/pca-testing2.xml
+++ /dev/null
@@ -1,29 +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="PythonCartridgeAgentIntegrationSuite2">
- <test name="PCATest">
- <classes>
- <class name="org.apache.stratos.python.cartridge.agent.test.ADCTest"/>
- </classes>
- </test>
-</suite>
http://git-wip-us.apache.org/repos/asf/stratos/blob/d9fb5f01/products/python-cartridge-agent/integration/src/test/resources/pca-testing3.xml
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/integration/src/test/resources/pca-testing3.xml b/products/python-cartridge-agent/integration/src/test/resources/pca-testing3.xml
deleted file mode 100755
index f20cf20..0000000
--- a/products/python-cartridge-agent/integration/src/test/resources/pca-testing3.xml
+++ /dev/null
@@ -1,29 +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="PythonCartridgeAgentIntegrationSuite3">
- <test name="PCATest">
- <classes>
- <class name="org.apache.stratos.python.cartridge.agent.test.ADCMTAppTest"/>
- </classes>
- </test>
-</suite>
http://git-wip-us.apache.org/repos/asf/stratos/blob/d9fb5f01/products/python-cartridge-agent/integration/src/test/resources/pca-testing4.xml
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/integration/src/test/resources/pca-testing4.xml b/products/python-cartridge-agent/integration/src/test/resources/pca-testing4.xml
deleted file mode 100755
index 6462774..0000000
--- a/products/python-cartridge-agent/integration/src/test/resources/pca-testing4.xml
+++ /dev/null
@@ -1,29 +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="PythonCartridgeAgentIntegrationSuite4">
- <test name="PCATest">
- <classes>
- <class name="org.apache.stratos.python.cartridge.agent.test.ADCMTAppTenantUserTest"/>
- </classes>
- </test>
-</suite>
http://git-wip-us.apache.org/repos/asf/stratos/blob/d9fb5f01/products/python-cartridge-agent/integration/src/test/resources/suite-1/agent.conf
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/integration/src/test/resources/suite-1/agent.conf b/products/python-cartridge-agent/integration/src/test/resources/suite-1/agent.conf
deleted file mode 100755
index eae5003..0000000
--- a/products/python-cartridge-agent/integration/src/test/resources/suite-1/agent.conf
+++ /dev/null
@@ -1,45 +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 =1885
-listen.address =localhost
-thrift.receiver.ip =localhost
-thrift.receiver.port =7712
-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
-artifact.clone.retries =5
-artifact.clone.interval =10
-port.check.timeout =600000
-enable.data.publisher =false
-monitoring.server.ip =localhost
-monitoring.server.port =7612
-monitoring.server.secure.port =7712
-monitoring.server.admin.username =admin
-monitoring.server.admin.password =admin
-log.file.paths =/tmp/agent.screen-startup-test.log
-metadata.service.url =https://localhost:9443
-super.tenant.repository.path =/repository/deployment/server/
-tenant.repository.path =/repository/tenants/
http://git-wip-us.apache.org/repos/asf/stratos/blob/d9fb5f01/products/python-cartridge-agent/integration/src/test/resources/suite-1/jndi.properties
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/integration/src/test/resources/suite-1/jndi.properties b/products/python-cartridge-agent/integration/src/test/resources/suite-1/jndi.properties
deleted file mode 100755
index beefe3c..0000000
--- a/products/python-cartridge-agent/integration/src/test/resources/suite-1/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
http://git-wip-us.apache.org/repos/asf/stratos/blob/d9fb5f01/products/python-cartridge-agent/integration/src/test/resources/suite-1/logging.ini
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/integration/src/test/resources/suite-1/logging.ini b/products/python-cartridge-agent/integration/src/test/resources/suite-1/logging.ini
deleted file mode 100755
index 15cad9b..0000000
--- a/products/python-cartridge-agent/integration/src/test/resources/suite-1/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/d9fb5f01/products/python-cartridge-agent/integration/src/test/resources/suite-1/payload/launch-params
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/integration/src/test/resources/suite-1/payload/launch-params b/products/python-cartridge-agent/integration/src/test/resources/suite-1/payload/launch-params
deleted file mode 100755
index 5b98406..0000000
--- a/products/python-cartridge-agent/integration/src/test/resources/suite-1/payload/launch-params
+++ /dev/null
@@ -1 +0,0 @@
-APPLICATION_ID=application-1,APPLICATION_PATH=/tmp/pca-test-suite-1,BASH=/bin/bash,BASHOPTS=cmdhist:complete_fullquote:extquote:force_fignore:hostcomplete:interactive_comments:progcomp:promptvars:sourcepath,BASH_ALIASES=(),BASH_ARGC=(),BASH_ARGV=(),BASH_CMDS=(),BASH_LINENO=([0]="0"),BASH_SOURCE=([0]="/usr/local/bin/populate-user-data.sh"),BASH_VERSINFO=([0]="4" [1]="3" [2]="30" [3]="1" [4]="release" [5]="x86_64-pc-linux-gnu"),BASH_VERSION='4.3.30(1)-release',CARTRIDGE_ALIAS=mytomcat,CARTRIDGE_KEY=PUjpXCLujDhYr5A6,CATALINA_HOME=/opt/tomcat,CEP_IP=54.179.197.243,CEP_PORT=7711,CLUSTER_ID=php.php.domain,CLUSTER_INSTANCE_ID=cluster-1-instance-1,DEPENDENCY_CLUSTER_IDS=myphp.php.domain,DEPLOYMENT=default,DIRSTACK=(),EUID=0,GROUPS=(),GROUP_NAME=null,HOME=/root,HOSTNAME=mytomcat-tomcat-domain3bd3cd47-b95d-475a-aa11-3e3ddc089d49,HOSTTYPE=x86_64,HOST_NAME=mytomcat.tomcat.stratos.org,IFS=' ,',INSTANCE_ID=null,INTERNAL=false,JAVA_HOME=/opt/jdk1.7.0_67,KUBERNETES_CLUSTER_ID=kubernetes-cluster-1,
KUBERNETES_PORT=tcp://10.100.0.2:443,KUBERNETES_PORT_443_TCP=tcp://10.100.0.2:443,KUBERNETES_PORT_443_TCP_ADDR=10.100.0.2,KUBERNETES_PORT_443_TCP_PORT=443,KUBERNETES_PORT_443_TCP_PROTO=tcp,KUBERNETES_RO_PORT=tcp://10.100.0.1:80,KUBERNETES_RO_PORT_80_TCP=tcp://10.100.0.1:80,KUBERNETES_RO_PORT_80_TCP_ADDR=10.100.0.1,KUBERNETES_RO_PORT_80_TCP_PORT=80,KUBERNETES_RO_PORT_80_TCP_PROTO=tcp,KUBERNETES_RO_SERVICE_HOST=10.100.0.1,KUBERNETES_RO_SERVICE_PORT=80,KUBERNETES_SERVICE_HOST=10.100.0.2,KUBERNETES_SERVICE_PORT=443,LB_CLUSTER_ID=null,LOG_LEVEL=DEBUG,MACHTYPE=x86_64-pc-linux-gnu,MB_IP=54.179.197.243,MB_PORT=1883,MEMBER_ID=php.member-1,MIN_COUNT=1,MULTITENANT=false,MYPHP_PHP_DOMAIN_1_PORT=tcp://10.100.171.218:4500,MYPHP_PHP_DOMAIN_1_PORT_4500_TCP=tcp://10.100.171.218:4500,MYPHP_PHP_DOMAIN_1_PORT_4500_TCP_ADDR=10.100.171.218,MYPHP_PHP_DOMAIN_1_PORT_4500_TCP_PORT=4500,MYPHP_PHP_DOMAIN_1_PORT_4500_TCP_PROTO=tcp,MYPHP_PHP_DOMAIN_1_SERVICE_HOST=10.100.171.218,MYPHP_PHP_DOMAIN_1_SERVICE_PORT=45
00,MYTOMCAT_TOMCAT_DOMAIN_1_PORT=tcp://10.100.16.250:4500,MYTOMCAT_TOMCAT_DOMAIN_1_PORT_4500_TCP=tcp://10.100.16.250:4500,MYTOMCAT_TOMCAT_DOMAIN_1_PORT_4500_TCP_ADDR=10.100.16.250,MYTOMCAT_TOMCAT_DOMAIN_1_PORT_4500_TCP_PORT=4500,MYTOMCAT_TOMCAT_DOMAIN_1_PORT_4500_TCP_PROTO=tcp,MYTOMCAT_TOMCAT_DOMAIN_1_SERVICE_HOST=10.100.16.250,MYTOMCAT_TOMCAT_DOMAIN_1_SERVICE_PORT=4500,NETWORK_PARTITION_ID=network-partition-1,OPTERR=1,OPTIND=1,OSTYPE=linux-gnu,PARTITION_ID=partition-1,PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin,PIPESTATUS=([0]="0"),PORTS=8080,POSIXLY_CORRECT=y,PPID=14,PRIMARY=false,PROVIDER=apache,PS4='+ ',PUPPET_DNS_AVAILABLE=null,PUPPET_ENV=false,PUPPET_HOSTNAME=puppet.apache.stratos.org,PUPPET_IP=127.0.0.1,PWD=/opt,SERVICE_NAME=php,SHELL=/bin/bash,SHELLOPTS=braceexpand:hashall:interactive-comments:posix,SHLVL=2,TENANT_ID=-1234,TENANT_RANGE='*',TERM=dumb,TOKEN=eyJhbGciOiJSUzI1NiJ9.eyJleHAiOi04NzI0ODEyNDEsInN1YiI6ImFkbWluIiwiYXpwIjoid3I5SllVaDNtTXd6bVhHVllqWm
VIWnhCV2xFYSIsImFwcElkIjoic2luZ2xlX2dyb3VwX3YxIiwiYXVkIjpbIndyOUpZVWgzbU13em1YR1ZZalplSFp4QldsRWEiXSwiaXNzIjoiaHR0cHM6XC9cL2xvY2FsaG9zdDo5NDQzXC9vYXV0aDJlbmRwb2ludHNcL3Rva2VuIiwiaWF0IjotODcyNDgwMjQwfQ.OSa1gIXUT9amhk1YEU02Yc3JtUYqanzrXh5K1YyvRXcpSiY2Ccn2BfJO0hILF5UooRcGBihzfX3979NRcvGwcUDUvOUJ0eaGPmxFZYbu0nr3xD8lhAO3fa1QYsKAvMnMdwyu2uSgSp6R6EUdVleiwlabUoDsuEcKGkIAn_VQvG0,UID=0,_=posix,LVS_VIRTUAL_IP=192.168.0.40|255.255.255.0
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/d9fb5f01/products/python-cartridge-agent/integration/src/test/resources/suite-2/agent.conf
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/integration/src/test/resources/suite-2/agent.conf b/products/python-cartridge-agent/integration/src/test/resources/suite-2/agent.conf
deleted file mode 100755
index fd3e423..0000000
--- a/products/python-cartridge-agent/integration/src/test/resources/suite-2/agent.conf
+++ /dev/null
@@ -1,45 +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 =1885
-listen.address =localhost
-thrift.receiver.ip =localhost
-thrift.receiver.port =7712
-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 =true
-auto.checkout =true
-artifact.update.interval =15
-artifact.clone.retries =5
-artifact.clone.interval =10
-port.check.timeout =600000
-enable.data.publisher =false
-monitoring.server.ip =localhost
-monitoring.server.port =7612
-monitoring.server.secure.port =7712
-monitoring.server.admin.username =admin
-monitoring.server.admin.password =admin
-log.file.paths =/tmp/agent.screen-adc-test.log
-metadata.service.url =https://localhost:9443
-super.tenant.repository.path =/repository/deployment/server/
-tenant.repository.path =/repository/tenants/
http://git-wip-us.apache.org/repos/asf/stratos/blob/d9fb5f01/products/python-cartridge-agent/integration/src/test/resources/suite-2/jndi.properties
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/integration/src/test/resources/suite-2/jndi.properties b/products/python-cartridge-agent/integration/src/test/resources/suite-2/jndi.properties
deleted file mode 100755
index beefe3c..0000000
--- a/products/python-cartridge-agent/integration/src/test/resources/suite-2/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
http://git-wip-us.apache.org/repos/asf/stratos/blob/d9fb5f01/products/python-cartridge-agent/integration/src/test/resources/suite-2/logging.ini
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/integration/src/test/resources/suite-2/logging.ini b/products/python-cartridge-agent/integration/src/test/resources/suite-2/logging.ini
deleted file mode 100755
index 15cad9b..0000000
--- a/products/python-cartridge-agent/integration/src/test/resources/suite-2/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/d9fb5f01/products/python-cartridge-agent/integration/src/test/resources/suite-2/payload/launch-params
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/integration/src/test/resources/suite-2/payload/launch-params b/products/python-cartridge-agent/integration/src/test/resources/suite-2/payload/launch-params
deleted file mode 100755
index aa4fcc3..0000000
--- a/products/python-cartridge-agent/integration/src/test/resources/suite-2/payload/launch-params
+++ /dev/null
@@ -1 +0,0 @@
-APPLICATION_ID=application1,SERVICE_NAME=tomcat,HOST_NAME=tomcat.stratos.org,MULTITENANT=false,TENANT_ID=-1234,TENANT_RANGE=*,CARTRIDGE_ALIAS=tomcat,CLUSTER_ID=tomcat.domain,CLUSTER_INSTANCE_ID=cluster-1-instance-1,CARTRIDGE_KEY=PUjpXCLujDhYr5A6,DEPLOYMENT=default,REPO_URL=https://github.com/imesh/stratos-php-applications.git,PORTS=8080,PUPPET_IP=127.0.0.1,PUPPET_HOSTNAME=puppet.apache.stratos.org,PUPPET_ENV=false,MEMBER_ID=tomcat.member-1,LB_CLUSTER_ID=null,NETWORK_PARTITION_ID=network-p1,PARTITION_ID=p1,APPLICATION_PATH=/tmp/pca-test-suite-2,MIN_COUNT=1,INTERNAL=false,CLUSTERING_PRIMARY_KEY=A,LOG_FILE_PATHS=/tmp/temp.log,PERSISTENCE_MAPPING=null
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/d9fb5f01/products/python-cartridge-agent/integration/src/test/resources/suite-3/agent.conf
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/integration/src/test/resources/suite-3/agent.conf b/products/python-cartridge-agent/integration/src/test/resources/suite-3/agent.conf
deleted file mode 100755
index 0ee1dce..0000000
--- a/products/python-cartridge-agent/integration/src/test/resources/suite-3/agent.conf
+++ /dev/null
@@ -1,45 +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 =1885
-listen.address =localhost
-thrift.receiver.ip =localhost
-thrift.receiver.port =7712
-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 =true
-auto.checkout =true
-artifact.update.interval =15
-artifact.clone.retries =5
-artifact.clone.interval =10
-port.check.timeout =600000
-enable.data.publisher =false
-monitoring.server.ip =localhost
-monitoring.server.port =7612
-monitoring.server.secure.port =7712
-monitoring.server.admin.username =admin
-monitoring.server.admin.password =admin
-log.file.paths =/tmp/agent.screen-adc-mt-test.log
-metadata.service.url =https://localhost:9443
-super.tenant.repository.path =/repository/deployment/server/
-tenant.repository.path =/repository/tenants/
http://git-wip-us.apache.org/repos/asf/stratos/blob/d9fb5f01/products/python-cartridge-agent/integration/src/test/resources/suite-3/jndi.properties
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/integration/src/test/resources/suite-3/jndi.properties b/products/python-cartridge-agent/integration/src/test/resources/suite-3/jndi.properties
deleted file mode 100755
index beefe3c..0000000
--- a/products/python-cartridge-agent/integration/src/test/resources/suite-3/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
http://git-wip-us.apache.org/repos/asf/stratos/blob/d9fb5f01/products/python-cartridge-agent/integration/src/test/resources/suite-3/logging.ini
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/integration/src/test/resources/suite-3/logging.ini b/products/python-cartridge-agent/integration/src/test/resources/suite-3/logging.ini
deleted file mode 100755
index 15cad9b..0000000
--- a/products/python-cartridge-agent/integration/src/test/resources/suite-3/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/d9fb5f01/products/python-cartridge-agent/integration/src/test/resources/suite-3/payload/launch-params
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/integration/src/test/resources/suite-3/payload/launch-params b/products/python-cartridge-agent/integration/src/test/resources/suite-3/payload/launch-params
deleted file mode 100755
index ed8c67f..0000000
--- a/products/python-cartridge-agent/integration/src/test/resources/suite-3/payload/launch-params
+++ /dev/null
@@ -1 +0,0 @@
-APPLICATION_ID=application-3,SERVICE_NAME=tomcat-mt,HOST_NAME=tomcat.stratos.org,MULTITENANT=true,TENANT_ID=-1234,TENANT_RANGE=*,CARTRIDGE_ALIAS=tomcat,CLUSTER_ID=tomcat.domain,CLUSTER_INSTANCE_ID=cluster-1-instance-1,CARTRIDGE_KEY=PUjpXCLujDhYr5A6,DEPLOYMENT=default,REPO_URL=https://github.com/imesh/stratos-php-applications.git,PORTS=8080,PUPPET_IP=127.0.0.1,PUPPET_HOSTNAME=puppet.apache.stratos.org,PUPPET_ENV=false,MEMBER_ID=tomcat.member-1,LB_CLUSTER_ID=null,NETWORK_PARTITION_ID=network-p1,PARTITION_ID=p1,APPLICATION_PATH=/tmp/pca-test-suite-3,MIN_COUNT=1,INTERNAL=false,CLUSTERING_PRIMARY_KEY=A,LOG_FILE_PATHS=/tmp/temp.log,PERSISTENCE_MAPPING=null
http://git-wip-us.apache.org/repos/asf/stratos/blob/d9fb5f01/products/python-cartridge-agent/integration/src/test/resources/suite-4/agent.conf
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/integration/src/test/resources/suite-4/agent.conf b/products/python-cartridge-agent/integration/src/test/resources/suite-4/agent.conf
deleted file mode 100755
index f945968..0000000
--- a/products/python-cartridge-agent/integration/src/test/resources/suite-4/agent.conf
+++ /dev/null
@@ -1,45 +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 =1885
-listen.address =localhost
-thrift.receiver.ip =localhost
-thrift.receiver.port =7712
-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 =true
-auto.checkout =true
-artifact.update.interval =15
-artifact.clone.retries =5
-artifact.clone.interval =10
-port.check.timeout =600000
-enable.data.publisher =false
-monitoring.server.ip =localhost
-monitoring.server.port =7612
-monitoring.server.secure.port =7712
-monitoring.server.admin.username =admin
-monitoring.server.admin.password =admin
-log.file.paths =/tmp/agent.screen-adc-mt-tenant-user-test.log
-metadata.service.url =https://localhost:9443
-super.tenant.repository.path =/repository/deployment/server/
-tenant.repository.path =/repository/tenants/
http://git-wip-us.apache.org/repos/asf/stratos/blob/d9fb5f01/products/python-cartridge-agent/integration/src/test/resources/suite-4/jndi.properties
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/integration/src/test/resources/suite-4/jndi.properties b/products/python-cartridge-agent/integration/src/test/resources/suite-4/jndi.properties
deleted file mode 100755
index beefe3c..0000000
--- a/products/python-cartridge-agent/integration/src/test/resources/suite-4/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
http://git-wip-us.apache.org/repos/asf/stratos/blob/d9fb5f01/products/python-cartridge-agent/integration/src/test/resources/suite-4/logging.ini
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/integration/src/test/resources/suite-4/logging.ini b/products/python-cartridge-agent/integration/src/test/resources/suite-4/logging.ini
deleted file mode 100755
index 15cad9b..0000000
--- a/products/python-cartridge-agent/integration/src/test/resources/suite-4/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/d9fb5f01/products/python-cartridge-agent/integration/src/test/resources/suite-4/payload/launch-params
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/integration/src/test/resources/suite-4/payload/launch-params b/products/python-cartridge-agent/integration/src/test/resources/suite-4/payload/launch-params
deleted file mode 100755
index b701066..0000000
--- a/products/python-cartridge-agent/integration/src/test/resources/suite-4/payload/launch-params
+++ /dev/null
@@ -1 +0,0 @@
-APPLICATION_ID=application-4,SERVICE_NAME=tomcat-mt,HOST_NAME=tomcat.stratos.org,MULTITENANT=true,TENANT_ID=4,TENANT_RANGE=*,CARTRIDGE_ALIAS=tomcat,CLUSTER_ID=tomcat.domain,CLUSTER_INSTANCE_ID=cluster-1-instance-1,CARTRIDGE_KEY=PUjpXCLujDhYr5A6,DEPLOYMENT=default,REPO_URL=https://github.com/imesh/stratos-php-applications.git,PORTS=8080,PUPPET_IP=127.0.0.1,PUPPET_HOSTNAME=puppet.apache.stratos.org,PUPPET_ENV=false,MEMBER_ID=tomcat.member-1,LB_CLUSTER_ID=null,NETWORK_PARTITION_ID=network-p1,PARTITION_ID=p1,APPLICATION_PATH=/tmp/pca-test-suite-4,MIN_COUNT=1,INTERNAL=false,CLUSTERING_PRIMARY_KEY=A,LOG_FILE_PATHS=/tmp/temp.log,PERSISTENCE_MAPPING=null
http://git-wip-us.apache.org/repos/asf/stratos/blob/d9fb5f01/products/python-cartridge-agent/integration/src/test/resources/test-conf/integration-test.properties
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/integration/src/test/resources/test-conf/integration-test.properties b/products/python-cartridge-agent/integration/src/test/resources/test-conf/integration-test.properties
deleted file mode 100755
index 1242841..0000000
--- a/products/python-cartridge-agent/integration/src/test/resources/test-conf/integration-test.properties
+++ /dev/null
@@ -1,26 +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.version=${project.version}
-distribution.name=${python.cartridge.agent.distribution.name}-${project.version}
-activemq.amqp.bind.address=tcp://localhost:61617
-activemq.mqtt.bind.address=mqtt://localhost:1885
-cep.port=7712
-stratos.endpoint=http://localhost:9763
-stratos.admin.username=admin
-stratos.admin.password=admin
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/d9fb5f01/products/python-cartridge-agent/modules/distribution/pom.xml
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/modules/distribution/pom.xml b/products/python-cartridge-agent/modules/distribution/pom.xml
new file mode 100644
index 0000000..afa987f
--- /dev/null
+++ b/products/python-cartridge-agent/modules/distribution/pom.xml
@@ -0,0 +1,59 @@
+<?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.
+ -->
+<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>python-cartridge-agent-parent</artifactId>
+ <version>4.1.3-SNAPSHOT</version>
+ <relativePath>../../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>python-cartridge-agent-distribution</artifactId>
+ <packaging>pom</packaging>
+ <name>Apache Stratos - Python Cartridge Agent</name>
+ <description>Apache Stratos Python Cartridge Agent Distribution</description>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>1-pre_dist</id>
+ <phase>test</phase>
+ <goals>
+ <goal>attached</goal>
+ </goals>
+ <configuration>
+ <finalName>${python.cartridge.agent.distribution.name}-${project.version}</finalName>
+ <descriptors>
+ <descriptor>src/main/assembly/bin.xml</descriptor>
+ </descriptors>
+ <appendAssemblyId>false</appendAssemblyId>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/d9fb5f01/products/python-cartridge-agent/modules/distribution/src/main/assembly/bin.xml
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/modules/distribution/src/main/assembly/bin.xml b/products/python-cartridge-agent/modules/distribution/src/main/assembly/bin.xml
new file mode 100644
index 0000000..fa8874c
--- /dev/null
+++ b/products/python-cartridge-agent/modules/distribution/src/main/assembly/bin.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.
+ -->
+<assembly>
+ <id>bin</id>
+ <formats>
+ <format>zip</format>
+ </formats>
+ <fileSets>
+ <fileSet>
+ <directory>
+ ${project.basedir}/../../../components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent
+ </directory>
+ <outputDirectory>.</outputDirectory>
+ <includes>
+ <include>**/*</include>
+ </includes>
+ <fileMode>0755</fileMode>
+ </fileSet>
+ </fileSets>
+ <files>
+ <file>
+ <source>${project.basedir}/src/main/notice/NOTICE</source>
+ <outputDirectory>/</outputDirectory>
+ <filtered>true</filtered>
+ <fileMode>644</fileMode>
+ </file>
+ <file>
+ <source>${project.basedir}/src/main/license/LICENSE</source>
+ <outputDirectory>/</outputDirectory>
+ <filtered>true</filtered>
+ <fileMode>644</fileMode>
+ </file>
+ <file>
+ <source>${project.basedir}/src/main/readme/README</source>
+ <outputDirectory>/</outputDirectory>
+ <filtered>true</filtered>
+ <fileMode>644</fileMode>
+ </file>
+ </files>
+</assembly>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/d9fb5f01/products/python-cartridge-agent/modules/distribution/src/main/license/LICENSE
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/modules/distribution/src/main/license/LICENSE b/products/python-cartridge-agent/modules/distribution/src/main/license/LICENSE
new file mode 100644
index 0000000..7a4a3ea
--- /dev/null
+++ b/products/python-cartridge-agent/modules/distribution/src/main/license/LICENSE
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ 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.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/d9fb5f01/products/python-cartridge-agent/modules/distribution/src/main/notice/NOTICE
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/modules/distribution/src/main/notice/NOTICE b/products/python-cartridge-agent/modules/distribution/src/main/notice/NOTICE
new file mode 100644
index 0000000..c59ffa6
--- /dev/null
+++ b/products/python-cartridge-agent/modules/distribution/src/main/notice/NOTICE
@@ -0,0 +1,5 @@
+Apache Stratos Python Cartridge Agent
+Copyright 2015 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/d9fb5f01/products/python-cartridge-agent/modules/distribution/src/main/readme/README
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/modules/distribution/src/main/readme/README b/products/python-cartridge-agent/modules/distribution/src/main/readme/README
new file mode 100644
index 0000000..92066bf
--- /dev/null
+++ b/products/python-cartridge-agent/modules/distribution/src/main/readme/README
@@ -0,0 +1,32 @@
+Python Cartridge Agent (PCA)
+============================
+
+Cartridge agent manages cartridge instance lifecycle and publishes its health statistics
+to Complex Event Processor (CEP). It provides a set of extension points for implementing
+logic required for configuring the server.
+
+How to run Live Tests
+---------------------
+1. Install following packages
+
+ apt-get install -y git python python-pip python-dev gcc zip
+
+2. Install dependent python modules:
+ ```
+ pip install paho-mqtt
+ pip install psutil
+ pip install pexpect
+ pip install pycrypto
+ pip install gitpython
+ pip install yapsy
+ ```
+
+3. Start ActiveMQ:
+ ```
+ <activemq-home>/bin/activemq start
+ ```
+
+4. Run python cartridge agent live tests:
+ ```
+ mvn clean install -Plive
+ ```
http://git-wip-us.apache.org/repos/asf/stratos/blob/d9fb5f01/products/python-cartridge-agent/modules/integration/.gitignore
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/modules/integration/.gitignore b/products/python-cartridge-agent/modules/integration/.gitignore
new file mode 100644
index 0000000..4d01b31
--- /dev/null
+++ b/products/python-cartridge-agent/modules/integration/.gitignore
@@ -0,0 +1 @@
+cartridge-agent.log