http://git-wip-us.apache.org/repos/asf/stratos/blob/4b864473/extensions/das/artifacts/eventsink/in_flight_requests.xml
----------------------------------------------------------------------
diff --git a/extensions/das/artifacts/eventsink/in_flight_requests.xml 
b/extensions/das/artifacts/eventsink/in_flight_requests.xml
deleted file mode 100644
index d4ca48b..0000000
--- a/extensions/das/artifacts/eventsink/in_flight_requests.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<!--
-
- 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.
-
--->
-<EventStoreConfiguration>
-    <TableSchema>
-        <ColumnDefinition>
-            <Name>time_stamp</Name>
-            <EnableIndexing>false</EnableIndexing>
-            <IsPrimaryKey>false</IsPrimaryKey>
-            <EnableScoreParam>false</EnableScoreParam>
-            <Type>LONG</Type>
-        </ColumnDefinition>
-        <ColumnDefinition>
-            <Name>cluster_id</Name>
-            <EnableIndexing>false</EnableIndexing>
-            <IsPrimaryKey>false</IsPrimaryKey>
-            <EnableScoreParam>false</EnableScoreParam>
-            <Type>STRING</Type>
-        </ColumnDefinition>
-        <ColumnDefinition>
-            <Name>cluster_instance_id</Name>
-            <EnableIndexing>false</EnableIndexing>
-            <IsPrimaryKey>false</IsPrimaryKey>
-            <EnableScoreParam>false</EnableScoreParam>
-            <Type>STRING</Type>
-        </ColumnDefinition>
-        <ColumnDefinition>
-            <Name>network_partition_id</Name>
-            <EnableIndexing>false</EnableIndexing>
-            <IsPrimaryKey>false</IsPrimaryKey>
-            <EnableScoreParam>false</EnableScoreParam>
-            <Type>STRING</Type>
-        </ColumnDefinition>
-        <ColumnDefinition>
-            <Name>in_flight_request_count</Name>
-            <EnableIndexing>false</EnableIndexing>
-            <IsPrimaryKey>false</IsPrimaryKey>
-            <EnableScoreParam>false</EnableScoreParam>
-            <Type>DOUBLE</Type>
-        </ColumnDefinition>
-    </TableSchema>
-    <Source>
-        <StreamId>in_flight_requests:1.0.0</StreamId>
-    </Source>
-    <RecordStoreName>EVENT_STORE</RecordStoreName>
-</EventStoreConfiguration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/4b864473/extensions/das/artifacts/eventsink/org_apache_stratos_cloud_controller.xml
----------------------------------------------------------------------
diff --git 
a/extensions/das/artifacts/eventsink/org_apache_stratos_cloud_controller.xml 
b/extensions/das/artifacts/eventsink/org_apache_stratos_cloud_controller.xml
deleted file mode 100644
index f0dae09..0000000
--- a/extensions/das/artifacts/eventsink/org_apache_stratos_cloud_controller.xml
+++ /dev/null
@@ -1,211 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<!--
-
- 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.
-
--->
-<EventStoreConfiguration>
-    <TableSchema>
-        <ColumnDefinition>
-            <Name>timeStamp</Name>
-            <EnableIndexing>false</EnableIndexing>
-            <IsPrimaryKey>false</IsPrimaryKey>
-            <EnableScoreParam>false</EnableScoreParam>
-            <Type>LONG</Type>
-        </ColumnDefinition>
-        <ColumnDefinition>
-            <Name>memberId</Name>
-            <EnableIndexing>false</EnableIndexing>
-            <IsPrimaryKey>false</IsPrimaryKey>
-            <EnableScoreParam>false</EnableScoreParam>
-            <Type>STRING</Type>
-        </ColumnDefinition>
-        <ColumnDefinition>
-            <Name>cartridgeType</Name>
-            <EnableIndexing>false</EnableIndexing>
-            <IsPrimaryKey>false</IsPrimaryKey>
-            <EnableScoreParam>false</EnableScoreParam>
-            <Type>STRING</Type>
-        </ColumnDefinition>
-        <ColumnDefinition>
-            <Name>clusterId</Name>
-            <EnableIndexing>false</EnableIndexing>
-            <IsPrimaryKey>false</IsPrimaryKey>
-            <EnableScoreParam>false</EnableScoreParam>
-            <Type>STRING</Type>
-        </ColumnDefinition>
-        <ColumnDefinition>
-            <Name>clusterInstanceId</Name>
-            <EnableIndexing>false</EnableIndexing>
-            <IsPrimaryKey>false</IsPrimaryKey>
-            <EnableScoreParam>false</EnableScoreParam>
-            <Type>STRING</Type>
-        </ColumnDefinition>
-        <ColumnDefinition>
-            <Name>lbclusterId</Name>
-            <EnableIndexing>false</EnableIndexing>
-            <IsPrimaryKey>false</IsPrimaryKey>
-            <EnableScoreParam>false</EnableScoreParam>
-            <Type>STRING</Type>
-        </ColumnDefinition>
-        <ColumnDefinition>
-            <Name>partitionId</Name>
-            <EnableIndexing>false</EnableIndexing>
-            <IsPrimaryKey>false</IsPrimaryKey>
-            <EnableScoreParam>false</EnableScoreParam>
-            <Type>STRING</Type>
-        </ColumnDefinition>
-        <ColumnDefinition>
-            <Name>networkId</Name>
-            <EnableIndexing>false</EnableIndexing>
-            <IsPrimaryKey>false</IsPrimaryKey>
-            <EnableScoreParam>false</EnableScoreParam>
-            <Type>STRING</Type>
-        </ColumnDefinition>
-        <ColumnDefinition>
-            <Name>instanceType</Name>
-            <EnableIndexing>false</EnableIndexing>
-            <IsPrimaryKey>false</IsPrimaryKey>
-            <EnableScoreParam>false</EnableScoreParam>
-            <Type>STRING</Type>
-        </ColumnDefinition>
-        <ColumnDefinition>
-            <Name>scalingReason</Name>
-            <EnableIndexing>false</EnableIndexing>
-            <IsPrimaryKey>false</IsPrimaryKey>
-            <EnableScoreParam>false</EnableScoreParam>
-            <Type>STRING</Type>
-        </ColumnDefinition>
-        <ColumnDefinition>
-            <Name>scalingTime</Name>
-            <EnableIndexing>false</EnableIndexing>
-            <IsPrimaryKey>false</IsPrimaryKey>
-            <EnableScoreParam>false</EnableScoreParam>
-            <Type>LONG</Type>
-        </ColumnDefinition>
-        <ColumnDefinition>
-            <Name>isMultiTenant</Name>
-            <EnableIndexing>false</EnableIndexing>
-            <IsPrimaryKey>false</IsPrimaryKey>
-            <EnableScoreParam>false</EnableScoreParam>
-            <Type>STRING</Type>
-        </ColumnDefinition>
-        <ColumnDefinition>
-            <Name>iaas</Name>
-            <EnableIndexing>false</EnableIndexing>
-            <IsPrimaryKey>false</IsPrimaryKey>
-            <EnableScoreParam>false</EnableScoreParam>
-            <Type>STRING</Type>
-        </ColumnDefinition>
-        <ColumnDefinition>
-            <Name>status</Name>
-            <EnableIndexing>false</EnableIndexing>
-            <IsPrimaryKey>false</IsPrimaryKey>
-            <EnableScoreParam>false</EnableScoreParam>
-            <Type>STRING</Type>
-        </ColumnDefinition>
-        <ColumnDefinition>
-            <Name>hostName</Name>
-            <EnableIndexing>false</EnableIndexing>
-            <IsPrimaryKey>false</IsPrimaryKey>
-            <EnableScoreParam>false</EnableScoreParam>
-            <Type>STRING</Type>
-        </ColumnDefinition>
-        <ColumnDefinition>
-            <Name>hypervisor</Name>
-            <EnableIndexing>false</EnableIndexing>
-            <IsPrimaryKey>false</IsPrimaryKey>
-            <EnableScoreParam>false</EnableScoreParam>
-            <Type>STRING</Type>
-        </ColumnDefinition>
-        <ColumnDefinition>
-            <Name>ram</Name>
-            <EnableIndexing>false</EnableIndexing>
-            <IsPrimaryKey>false</IsPrimaryKey>
-            <EnableScoreParam>false</EnableScoreParam>
-            <Type>STRING</Type>
-        </ColumnDefinition>
-        <ColumnDefinition>
-            <Name>imageId</Name>
-            <EnableIndexing>false</EnableIndexing>
-            <IsPrimaryKey>false</IsPrimaryKey>
-            <EnableScoreParam>false</EnableScoreParam>
-            <Type>STRING</Type>
-        </ColumnDefinition>
-        <ColumnDefinition>
-            <Name>loginPort</Name>
-            <EnableIndexing>false</EnableIndexing>
-            <IsPrimaryKey>false</IsPrimaryKey>
-            <EnableScoreParam>false</EnableScoreParam>
-            <Type>INTEGER</Type>
-        </ColumnDefinition>
-        <ColumnDefinition>
-            <Name>osName</Name>
-            <EnableIndexing>false</EnableIndexing>
-            <IsPrimaryKey>false</IsPrimaryKey>
-            <EnableScoreParam>false</EnableScoreParam>
-            <Type>STRING</Type>
-        </ColumnDefinition>
-        <ColumnDefinition>
-            <Name>osVersion</Name>
-            <EnableIndexing>false</EnableIndexing>
-            <IsPrimaryKey>false</IsPrimaryKey>
-            <EnableScoreParam>false</EnableScoreParam>
-            <Type>STRING</Type>
-        </ColumnDefinition>
-        <ColumnDefinition>
-            <Name>osArch</Name>
-            <EnableIndexing>false</EnableIndexing>
-            <IsPrimaryKey>false</IsPrimaryKey>
-            <EnableScoreParam>false</EnableScoreParam>
-            <Type>STRING</Type>
-        </ColumnDefinition>
-        <ColumnDefinition>
-            <Name>is64bitOS</Name>
-            <EnableIndexing>false</EnableIndexing>
-            <IsPrimaryKey>false</IsPrimaryKey>
-            <EnableScoreParam>false</EnableScoreParam>
-            <Type>STRING</Type>
-        </ColumnDefinition>
-        <ColumnDefinition>
-            <Name>privateIPAddresses</Name>
-            <EnableIndexing>false</EnableIndexing>
-            <IsPrimaryKey>false</IsPrimaryKey>
-            <EnableScoreParam>false</EnableScoreParam>
-            <Type>STRING</Type>
-        </ColumnDefinition>
-        <ColumnDefinition>
-            <Name>publicIPAddresses</Name>
-            <EnableIndexing>false</EnableIndexing>
-            <IsPrimaryKey>false</IsPrimaryKey>
-            <EnableScoreParam>false</EnableScoreParam>
-            <Type>STRING</Type>
-        </ColumnDefinition>
-        <ColumnDefinition>
-            <Name>allocateIPAddresses</Name>
-            <EnableIndexing>false</EnableIndexing>
-            <IsPrimaryKey>false</IsPrimaryKey>
-            <EnableScoreParam>false</EnableScoreParam>
-            <Type>STRING</Type>
-        </ColumnDefinition>
-    </TableSchema>
-    <Source>
-        <StreamId>org.apache.stratos.cloud.controller:1.0.0</StreamId>
-    </Source>
-    <RecordStoreName>EVENT_STORE</RecordStoreName>
-</EventStoreConfiguration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/4b864473/extensions/das/artifacts/eventstreams/cartridge_agent_health_stats_1.0.0.json
----------------------------------------------------------------------
diff --git 
a/extensions/das/artifacts/eventstreams/cartridge_agent_health_stats_1.0.0.json 
b/extensions/das/artifacts/eventstreams/cartridge_agent_health_stats_1.0.0.json
deleted file mode 100644
index ec61229..0000000
--- 
a/extensions/das/artifacts/eventstreams/cartridge_agent_health_stats_1.0.0.json
+++ /dev/null
@@ -1,40 +0,0 @@
-{
-  "name": "cartridge_agent_health_stats",
-  "version": "1.0.0",
-  "nickName": "",
-  "description": "",
-  "payloadData": [
-    {
-      "name": "time_stamp",
-      "type": "LONG"
-    },
-    {
-      "name": "cluster_id",
-      "type": "STRING"
-    },
-    {
-      "name": "cluster_instance_id",
-      "type": "STRING"
-    },
-    {
-      "name": "network_partition_id",
-      "type": "STRING"
-    },
-    {
-      "name": "member_id",
-      "type": "STRING"
-    },
-    {
-      "name": "partition_id",
-      "type": "STRING"
-    },
-    {
-      "name": "health_description",
-      "type": "STRING"
-    },
-    {
-      "name": "value",
-      "type": "DOUBLE"
-    }
-  ]
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/4b864473/extensions/das/artifacts/eventstreams/in_flight_requests_1.0.0.json
----------------------------------------------------------------------
diff --git 
a/extensions/das/artifacts/eventstreams/in_flight_requests_1.0.0.json 
b/extensions/das/artifacts/eventstreams/in_flight_requests_1.0.0.json
deleted file mode 100644
index 8c5232a..0000000
--- a/extensions/das/artifacts/eventstreams/in_flight_requests_1.0.0.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
-  "name": "in_flight_requests",
-  "version": "1.0.0",
-  "nickName": "",
-  "description": "",
-  "payloadData": [
-    {
-      "name": "time_stamp",
-      "type": "LONG"
-    },
-    {
-      "name": "cluster_id",
-      "type": "STRING"
-    },
-    {
-      "name": "cluster_instance_id",
-      "type": "STRING"
-    },
-    {
-      "name": "network_partition_id",
-      "type": "STRING"
-    },
-    {
-      "name": "in_flight_request_count",
-      "type": "DOUBLE"
-    }
-  ]
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/4b864473/extensions/das/artifacts/eventstreams/org.apache.stratos.cloud.controller_1.0.0.json
----------------------------------------------------------------------
diff --git 
a/extensions/das/artifacts/eventstreams/org.apache.stratos.cloud.controller_1.0.0.json
 
b/extensions/das/artifacts/eventstreams/org.apache.stratos.cloud.controller_1.0.0.json
deleted file mode 100644
index de1025f..0000000
--- 
a/extensions/das/artifacts/eventstreams/org.apache.stratos.cloud.controller_1.0.0.json
+++ /dev/null
@@ -1,112 +0,0 @@
-{
-  "name": "org.apache.stratos.cloud.controller",
-  "version": "1.0.0",
-  "nickName": "cloud.controller",
-  "description": "Instances booted up by the Cloud Controller",
-  "payloadData": [
-    {
-      "name": "timeStamp",
-      "type": "LONG"
-    },
-    {
-      "name": "memberId",
-      "type": "STRING"
-    },
-    {
-      "name": "cartridgeType",
-      "type": "STRING"
-    },
-    {
-      "name": "clusterId",
-      "type": "STRING"
-    },
-    {
-      "name": "clusterInstanceId",
-      "type": "STRING"
-    },
-    {
-      "name": "lbclusterId",
-      "type": "STRING"
-    },
-    {
-      "name": "partitionId",
-      "type": "STRING"
-    },
-    {
-      "name": "networkId",
-      "type": "STRING"
-    },
-    {
-      "name": "instanceType",
-      "type": "STRING"
-    },
-    {
-      "name": "scalingReason",
-      "type": "STRING"
-    },
-    {
-      "name": "scalingTime",
-      "type": "LONG"
-    },
-    {
-      "name": "isMultiTenant",
-      "type": "STRING"
-    },
-    {
-      "name": "iaas",
-      "type": "STRING"
-    },
-    {
-      "name": "status",
-      "type": "STRING"
-    },
-    {
-      "name": "hostName",
-      "type": "STRING"
-    },
-    {
-      "name": "hypervisor",
-      "type": "STRING"
-    },
-    {
-      "name": "ram",
-      "type": "STRING"
-    },
-    {
-      "name": "imageId",
-      "type": "STRING"
-    },
-    {
-      "name": "loginPort",
-      "type": "INT"
-    },
-    {
-      "name": "osName",
-      "type": "STRING"
-    },
-    {
-      "name": "osVersion",
-      "type": "STRING"
-    },
-    {
-      "name": "osArch",
-      "type": "STRING"
-    },
-    {
-      "name": "is64bitOS",
-      "type": "STRING"
-    },
-    {
-      "name": "privateIPAddresses",
-      "type": "STRING"
-    },
-    {
-      "name": "publicIPAddresses",
-      "type": "STRING"
-    },
-    {
-      "name": "allocateIPAddresses",
-      "type": "STRING"
-    }
-  ]
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/4b864473/extensions/das/artifacts/sparkscript/CCEvent
----------------------------------------------------------------------
diff --git a/extensions/das/artifacts/sparkscript/CCEvent 
b/extensions/das/artifacts/sparkscript/CCEvent
deleted file mode 100644
index b8bb6fd..0000000
--- a/extensions/das/artifacts/sparkscript/CCEvent
+++ /dev/null
@@ -1,18 +0,0 @@
-CREATE TEMPORARY TABLE memberstatus
-USING CarbonAnalytics
-OPTIONS (tableName "ORG_APACHE_STRATOS_CLOUD_CONTROLLER");
-
-CREATE TEMPORARY TABLE memberstatusnew
-USING CarbonAnalytics
-OPTIONS (tableName "CLUSTER_MEMBER_NEW",
-         schema "startTime String, endTime String, clusterId STRING, 
activatedInstanceCount INT, terminatedInstanceCount INT, activeInstanceCount 
INT");
-
-;WITH InstanceCount as
-(select clusterId, count(case when status='Active' and timeStamp > 
current_time(null)-60000 and timeStamp <= current_time(null) then 1 else NULL 
end) as activatedInstanceCount, count(case when status='Terminated' and 
timeStamp > current_time(null)-60000 and timeStamp <= current_time(null) then 1 
else NULL end) as terminatedInstanceCount, (sum(case when status='Active' then 
1 else 0 end) - sum(case when status='Terminated' then 1 else 0 end))as 
activeInstanceCount from memberstatus group by clusterId)
-INSERT INTO table memberstatusnew select 
time(current_time(null)-60000),time(current_time(null)),clusterId, 
activatedInstanceCount, terminatedInstanceCount,activeInstanceCount from 
InstanceCount;
-
-CREATE TEMPORARY TABLE membersnew
-USING CarbonAnalytics
-OPTIONS (tableName "MEMBER_NEW",schema "clusterId STRING, clusterInstanceId 
STRING, networkId STRING, partitionId STRING, cartridgeType STRING, 
instanceType STRING, memberId STRING, scalingTime LONG,scalingReason STRING, 
timeStamp STRING");
-
-INSERT INTO TABLE membersnew select 
clusterId,clusterInstanceId,networkId,partitionId,cartridgeType,instanceType, 
memberId,scalingTime,scalingReason,time(timeStamp)as timeStamp FROM 
memberstatus where status='Created';
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/4b864473/extensions/das/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/das/pom.xml b/extensions/das/pom.xml
deleted file mode 100644
index 5231674..0000000
--- a/extensions/das/pom.xml
+++ /dev/null
@@ -1,40 +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.
-  -->
-<project xmlns="http://maven.apache.org/POM/4.0.0";
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
-    <parent>
-        <artifactId>stratos-extensions</artifactId>
-        <groupId>org.apache.stratos</groupId>
-        <version>4.1.0-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <groupId>org.apache.stratos</groupId>
-    <artifactId>strats-das-extension</artifactId>
-    <packaging>pom</packaging>
-    <name>Apache Stratos - DAS Extension</name>
-    <description>Apache Stratos extensions for DAS.</description>
-    <modules>
-        <module>spark-udf</module>
-    </modules>
-
-
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/4b864473/extensions/das/spark-udf/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/das/spark-udf/pom.xml b/extensions/das/spark-udf/pom.xml
deleted file mode 100644
index ced0f0a..0000000
--- a/extensions/das/spark-udf/pom.xml
+++ /dev/null
@@ -1,36 +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.
-  -->
-<project xmlns="http://maven.apache.org/POM/4.0.0";
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
-    <parent>
-        <artifactId>strats-das-extension</artifactId>
-        <groupId>org.apache.stratos</groupId>
-        <version>4.1.1-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <groupId>org.apache.stratos</groupId>
-    <artifactId>apache-stratos-spark-udf</artifactId>
-    <name>Apache Stratos - Spark UDF</name>
-    <description>Apache Stratos Spark UDF for DAS</description>
-
-
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/4b864473/extensions/das/spark-udf/src/main/java/org/apache/stratos/das/extension/spark/udf/TimeUDF.java
----------------------------------------------------------------------
diff --git 
a/extensions/das/spark-udf/src/main/java/org/apache/stratos/das/extension/spark/udf/TimeUDF.java
 
b/extensions/das/spark-udf/src/main/java/org/apache/stratos/das/extension/spark/udf/TimeUDF.java
deleted file mode 100644
index 0b8f408..0000000
--- 
a/extensions/das/spark-udf/src/main/java/org/apache/stratos/das/extension/spark/udf/TimeUDF.java
+++ /dev/null
@@ -1,49 +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.das.extension.spark.udf;
-
-import java.text.SimpleDateFormat;
-import java.util.Date;
-
-/**
- * Implementing UDF for implementing spark sql query related to time.
- */
-public class TimeUDF {
-    /**
-     * Convert time(ms) to DateFormat
-     *
-     * @param timeStamp time in ms
-     * @return date as String
-     */
-    public String time(Long timeStamp) {
-        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
-        Date date = new Date(timeStamp.longValue());
-        return sdf.format(date);
-    }
-
-    /**
-     * Get the current time in ms
-     *
-     * @param param
-     * @return
-     */
-    public long current_time(Integer param) {
-        return System.currentTimeMillis();
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/4b864473/features/cloud-controller/org.apache.stratos.cloud.controller.feature/pom.xml
----------------------------------------------------------------------
diff --git 
a/features/cloud-controller/org.apache.stratos.cloud.controller.feature/pom.xml 
b/features/cloud-controller/org.apache.stratos.cloud.controller.feature/pom.xml
index 9d023c1..6fd6218 100644
--- 
a/features/cloud-controller/org.apache.stratos.cloud.controller.feature/pom.xml
+++ 
b/features/cloud-controller/org.apache.stratos.cloud.controller.feature/pom.xml
@@ -63,7 +63,6 @@
             <plugin>
                 <groupId>org.wso2.maven</groupId>
                 <artifactId>carbon-p2-plugin</artifactId>
-                <version>${carbon.p2.plugin.version}</version>
                 <executions>
                     <execution>
                         <id>4-p2-feature-generation</id>
@@ -178,4 +177,4 @@
             </plugin>
         </plugins>
     </build>
-</project>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/4b864473/products/stratos/modules/distribution/src/main/conf/drools/dependent-scaling.drl
----------------------------------------------------------------------
diff --git 
a/products/stratos/modules/distribution/src/main/conf/drools/dependent-scaling.drl
 
b/products/stratos/modules/distribution/src/main/conf/drools/dependent-scaling.drl
index a8102da..6e76706 100644
--- 
a/products/stratos/modules/distribution/src/main/conf/drools/dependent-scaling.drl
+++ 
b/products/stratos/modules/distribution/src/main/conf/drools/dependent-scaling.drl
@@ -33,8 +33,6 @@ global java.lang.String clusterId;
 global Integer roundedRequiredInstanceCount;
 global org.apache.stratos.autoscaler.rule.RuleTasksDelegator delegator;
 global java.lang.String algorithmName;
-global java.lang.Boolean isPrimary;
-global java.util.List primaryMembers;
 
 rule "Dependent Scaling Rule"
 dialect "mvel"
@@ -84,9 +82,7 @@ dialect "mvel"
 
                         log.info("[dependency-scale] [scale-up] Partition 
available, hence trying to spawn an instance to scale up!" );
                         log.debug("[dependency-scale] [scale-up] " + " 
[partition] " + partitionContext.getPartitionId() + " [cluster] " + clusterId );
-                        long scalingTime = System.currentTimeMillis();
-                        String scalingReason = "Dependency scaling";
-                        delegator.delegateSpawn(partitionContext, clusterId, 
clusterInstanceContext.getId(), isPrimary,scalingReason,scalingTime);
+                        delegator.delegateSpawn(partitionContext, clusterId, 
clusterInstanceContext.getId());
                         count++;
                     } else {
                         partitionsAvailable = false;
@@ -132,8 +128,6 @@ dialect "mvel"
 
                     for(MemberStatsContext memberStatsContext: 
partitionContext.getMemberStatsContexts().values()){
 
-                                               if( 
!primaryMembers.contains(memberStatsContext.getMemberId()) ) {
-
                             LoadAverage loadAverage = 
memberStatsContext.getLoadAverage();
                             log.debug("[dependency-scale] [scale-down] " + " 
[cluster] "
                                 + clusterId + " [member] " + 
memberStatsContext.getMemberId() + " Load average: " + loadAverage);
@@ -163,9 +157,6 @@ dialect "mvel"
                                 lowestOverallLoad = overallLoad;
                             }
 
-
-                                           }
-
                     }
                     if(selectedMemberStatsContext != null) {
                         log.info("[dependency-scale] [scale-down] Trying to 
terminating an instace to scale down!" );

http://git-wip-us.apache.org/repos/asf/stratos/blob/4b864473/products/stratos/modules/distribution/src/main/conf/drools/mincheck.drl
----------------------------------------------------------------------
diff --git 
a/products/stratos/modules/distribution/src/main/conf/drools/mincheck.drl 
b/products/stratos/modules/distribution/src/main/conf/drools/mincheck.drl
index 4eaab2b..1254c7c 100755
--- a/products/stratos/modules/distribution/src/main/conf/drools/mincheck.drl
+++ b/products/stratos/modules/distribution/src/main/conf/drools/mincheck.drl
@@ -44,8 +44,6 @@ global 
org.apache.stratos.autoscaler.context.AutoscalerContext context;
 global org.apache.stratos.autoscaler.rule.RuleTasksDelegator delegator;
 global java.util.Map partitionCtxts;
 global java.lang.String clusterId;
-global java.lang.Boolean isPrimary;
-global Integer primaryMemberCount;
 global java.lang.String algorithmName;
 
 rule "Minimum Rule"
@@ -59,20 +57,13 @@ dialect "mvel"
         eval(log.debug("[min-check] [network-partition] " + 
clusterInstanceContext.getNetworkPartitionId() + " [cluster-instance] " + 
clusterInstanceContext.getId() + " [cluster] " + clusterId + " Non terminated 
member count: " + clusterInstanceContext.getNonTerminatedMemberCount()))
         eval(log.debug("[min-check] [network-partition] " + 
clusterInstanceContext.getNetworkPartitionId() + " [cluster-instance] " + 
clusterInstanceContext.getId() + " [cluster] " + clusterId + " Minimum member 
count: " + clusterInstanceContext.getMinInstanceCount()))
 
-        eval ( (isPrimary && (primaryMemberCount < 
clusterInstanceContext.getMinInstanceCount())) || ( !isPrimary && 
(clusterInstanceContext.getNonTerminatedMemberCount() < 
clusterInstanceContext.getMinInstanceCount())) )
+        eval ( (clusterInstanceContext.getNonTerminatedMemberCount() < 
clusterInstanceContext.getMinInstanceCount()))
 
     then
 
         int additionalInstances = 0;
-        if(isPrimary){
-
-            additionalInstances = clusterInstanceContext.getMinInstanceCount() 
- primaryMemberCount;
-            log.debug("[min-check] true [primary] true [primary member count] 
" + primaryMemberCount + " [cluster] " + clusterId);
-        } else {
-
-            additionalInstances = clusterInstanceContext.getMinInstanceCount() 
- clusterInstanceContext.getNonTerminatedMemberCount();
-            log.debug("[min-check] true [primary] false [non terminated member 
count] " + clusterInstanceContext.getNonTerminatedMemberCount()+ " [cluster] " 
+ clusterId);
-        }
+        additionalInstances = clusterInstanceContext.getMinInstanceCount() - 
clusterInstanceContext.getNonTerminatedMemberCount();
+        log.debug("[min-check] true [non terminated member count] " + 
clusterInstanceContext.getNonTerminatedMemberCount()+ " [cluster] " + 
clusterId);
 
         int count = 0;
         boolean partitionsAvailable = true;
@@ -84,14 +75,11 @@ dialect "mvel"
 
                 log.info("[min-check] Partition available, hence trying to 
spawn an instance to fulfil minimum count!" + " [cluster] " + clusterId);
                 log.debug("[min-check] " + " [partition] " + 
partitionContext.getPartitionId() + " [cluster] " + clusterId);
-                long scalingTime = System.currentTimeMillis();
-                String scalingReason = "Scaling up to fulfil minimum count, 
[Cluster Min Members] "+clusterInstanceContext.getMinInstanceCount()+" 
[Additional instances to be created] " + additionalInstances;
-                delegator.delegateSpawn(partitionContext, clusterId, 
clusterInstanceContext.getId(), isPrimary,scalingReason,scalingTime);
-
+                delegator.delegateSpawn(partitionContext, clusterId, 
clusterInstanceContext.getId());
 
                 count++;
             } else {
-
+                log.warn("[min-check] Partition is not available to fulfil 
minimum count!" + " [cluster] " + clusterId);
                 partitionsAvailable = false;
             }
         }

http://git-wip-us.apache.org/repos/asf/stratos/blob/4b864473/products/stratos/modules/distribution/src/main/conf/drools/scaling.drl
----------------------------------------------------------------------
diff --git 
a/products/stratos/modules/distribution/src/main/conf/drools/scaling.drl 
b/products/stratos/modules/distribution/src/main/conf/drools/scaling.drl
index ad8cf25..61ed1a3 100644
--- a/products/stratos/modules/distribution/src/main/conf/drools/scaling.drl
+++ b/products/stratos/modules/distribution/src/main/conf/drools/scaling.drl
@@ -51,8 +51,6 @@ global java.lang.String clusterId;
 global java.lang.Boolean rifReset;
 global java.lang.Boolean mcReset;
 global java.lang.Boolean laReset;
-global java.lang.Boolean isPrimary;
-global java.util.List primaryMembers;
 global java.lang.Boolean arspiReset;
 global java.lang.String algorithmName;
 
@@ -164,10 +162,6 @@ dialect "mvel"
                     boolean partitionsAvailable = true;
                     int count = 0;
 
-                    String autoscalingReason = (numberOfRequiredInstances == 
numberOfInstancesReuquiredBasedOnRif)?"Scaling up due to RIF, [Predicted Value] 
"+rifPredictedValue+" [Threshold] "+rifThreshold:(numberOfRequiredInstances== 
numberOfInstancesReuquiredBasedOnMemoryConsumption)?"Scaling up due to MC, 
[Predicted Value] "+mcPredictedValue+" [Threshold] "+mcThreshold:"Scaling up 
due to LA, [Predicted Value] "+laPredictedValue+" [Threshold] "+laThreshold;
-                    autoscalingReason += " [Number of required instances] 
"+numberOfRequiredInstances+" [Cluster Max Members] "+clusterMaxMembers+" 
[Additional instances to be created] " + additionalInstances;
-
-
                     while(count != additionalInstances && partitionsAvailable){
 
                         ClusterLevelPartitionContext partitionContext = 
(ClusterLevelPartitionContext) 
partitionAlgorithm.getNextScaleUpPartitionContext(clusterInstanceContext.getPartitionCtxtsAsAnArray());
@@ -186,8 +180,7 @@ dialect "mvel"
                                 " [laPredictedValue] " + laPredictedValue + " 
[laThreshold] " + laThreshold);
 
                             log.debug("[scale-up] " + " [partition] " + 
partitionContext.getPartitionId() + " [cluster] " + clusterId );
-                            long scalingTime = System.currentTimeMillis();
-                            delegator.delegateSpawn(partitionContext, 
clusterId, clusterInstanceContext.getId(), 
isPrimary,autoscalingReason,scalingTime);
+                            delegator.delegateSpawn(partitionContext, 
clusterId, clusterInstanceContext.getId());
                             count++;
                         } else {
 
@@ -242,14 +235,9 @@ dialect "mvel"
                                 " [laPredictedValue] " + laPredictedValue + " 
[laThreshold] " + laThreshold
                             );
 
-                            // In partition context member stat context, all 
the primary members need to be
-                            // avoided being selected as the member to 
terminated
-
 
                             for(MemberStatsContext memberStatsContext: 
partitionContext.getMemberStatsContexts().values()){
 
-                                if( 
!primaryMembers.contains(memberStatsContext.getMemberId()) ) {
-
                                 LoadAverage loadAverage = 
memberStatsContext.getLoadAverage();
                                 log.debug("[scale-down] " + " [cluster] "
                                     + clusterId + " [member] " + 
memberStatsContext.getMemberId() + " Load average: " + loadAverage);
@@ -283,9 +271,6 @@ dialect "mvel"
                                     lowestOverallLoad = overallLoad;
                                 }
 
-
-                              }
-
                             }
                             if(selectedMemberStatsContext != null) {
                                 log.info("[scale-down] Trying to terminating 
an instace to scale down!" );

http://git-wip-us.apache.org/repos/asf/stratos/blob/4b864473/products/stratos/modules/distribution/src/main/conf/thrift-client-config.xml
----------------------------------------------------------------------
diff --git 
a/products/stratos/modules/distribution/src/main/conf/thrift-client-config.xml 
b/products/stratos/modules/distribution/src/main/conf/thrift-client-config.xml
index f730c42..5cacada 100644
--- 
a/products/stratos/modules/distribution/src/main/conf/thrift-client-config.xml
+++ 
b/products/stratos/modules/distribution/src/main/conf/thrift-client-config.xml
@@ -18,22 +18,10 @@
   ~ under the License.
   -->
 
-<!-- Apache thrift client configuration for publishing statistics to WSO2 CEP 
and WSO2 DAS-->
+<!-- Apache thrift client configuration for publishing statistics to WSO2 CEP 
-->
 <thriftClientConfiguration>
-    <config>
-        <name>cep</name>
-        <statsPublisherEnabled>true</statsPublisherEnabled>
-        <username>admin</username>
-        <password>admin</password>
-        <ip>localhost</ip>
-        <port>7611</port>
-    </config>
-    <config>
-        <name>das</name>
-        <statsPublisherEnabled>false</statsPublisherEnabled>
-        <username>admin</username>
-        <password>admin</password>
-        <ip>localhost</ip>
-        <port>7612</port>
-    </config>
+    <username>admin</username>
+    <password>admin</password>
+    <ip>localhost</ip>
+    <port>7611</port>
 </thriftClientConfiguration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/4b864473/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/RestConstants.java
----------------------------------------------------------------------
diff --git 
a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/RestConstants.java
 
b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/RestConstants.java
index 2f52da6..b460a78 100644
--- 
a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/RestConstants.java
+++ 
b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/RestConstants.java
@@ -52,12 +52,4 @@ public class RestConstants {
     public static final String APPLICATION_POLICIES_PATH = 
"/application-policies/";
     public static final String APPLICATION_POLICIES_NAME = "applicationPolicy";
 
-    public static final String TENANT1_RESOURCE ="/tenant/tenant1.json";
-    public static final String TENANT2_RESOURCE ="/tenant/tenant2.json";
-    public static final String TENANT1_GET_RESOURCE ="test1.com";
-    public static final String TENANT2_GET_RESOURCE ="test2.com";
-    public static final String TENANT_API = "/" + API + "/tenants";
-    public static final String TENANTS_NAME = "tenants";
-
-
 }

http://git-wip-us.apache.org/repos/asf/stratos/blob/4b864473/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/StratosTestServerManager.java
----------------------------------------------------------------------
diff --git 
a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/StratosTestServerManager.java
 
b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/StratosTestServerManager.java
index 52293ba..a7dd781 100755
--- 
a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/StratosTestServerManager.java
+++ 
b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/StratosTestServerManager.java
@@ -26,11 +26,10 @@ import org.apache.commons.logging.LogFactory;
 import org.apache.log4j.Level;
 import org.apache.log4j.Logger;
 import org.apache.stratos.common.test.TestLogAppender;
+import org.apache.stratos.integration.tests.application.SampleApplicationsTest;
 import org.apache.stratos.integration.tests.rest.IntegrationMockClient;
 import org.apache.stratos.integration.tests.rest.RestClient;
-import org.apache.stratos.messaging.domain.tenant.Tenant;
 import org.testng.annotations.AfterSuite;
-import org.testng.annotations.BeforeClass;
 import org.testng.annotations.BeforeSuite;
 import org.wso2.carbon.integration.framework.TestServerManager;
 import org.wso2.carbon.integration.framework.utils.FrameworkSettings;
@@ -39,91 +38,39 @@ import org.wso2.carbon.integration.framework.utils.TestUtil;
 
 import java.io.File;
 import java.io.IOException;
-import java.util.Properties;
+import java.net.URL;
 
-import static org.junit.Assert.assertTrue;
-import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertNotNull;
 
 /**
  * Prepare activemq, Stratos server for tests, enables mock iaas, starts 
servers and stop them after the tests.
  */
 public class StratosTestServerManager extends TestServerManager {
+
     private static final Log log = 
LogFactory.getLog(StratosTestServerManager.class);
-    public static final String PATH_SEP = File.separator;
-    public static final String BASE_PATH = 
StratosTestServerManager.class.getResource(PATH_SEP).getPath();
-    public static final String CARBON_CONF_PATH = "repository" + PATH_SEP + 
"conf";
-    public static final String STRATOS_DISTRIBUTION_NAME = "distribution.path";
-    public final static String PORT_OFFSET = "carbon.port.offset";
-    public static final String ACTIVEMQ_BIND_ADDRESS = "activemq.bind.address";
-    public static final String STRATOS_ENDPOINT = "stratos.endpoint";
-    public static final String ADMIN_USERNAME = "stratos.admin.username";
-    public static final String ADMIN_PASSWORD = "stratos.admin.password";
-    private static final String TENANT1_USER_NAME = "stratos.tenant1.username";
-    private static final String TENANT1_PASSWD = "stratos.tenant1.password";
-    private static final String TENANT2_USER_NAME = "stratos.tenant2.username";
-    private static final String TENANT2_PASSWD = "stratos.tenant2.password";
-    public static final String MOCK_IAAS_XML_FILENAME = "mock-iaas.xml";
-    public static final String SCALING_DROOL_FILENAME = "scaling.drl";
-    public static final String JNDI_PROPERTIES_FILENAME = "jndi.properties";
-    public static final String JMS_OUTPUT_ADAPTER_FILENAME = 
"JMSOutputAdaptor.xml";
-    private static final String LOG4J_PROPERTIES_FILENAME = "log4j.properties";
 
-    private static Properties integrationProperties;
-    protected String distributionName;
-    protected int portOffset;
-    protected String adminUsername;
-    protected String adminPassword;
-    protected String tenant1UserName;
-    protected String tenant1Password;
-    protected String tenant2UserName;
-    protected String tenant2Password;
-    protected String stratosEndpoint;
-    protected String activemqBindAddress;
-    protected RestClient restClientAdmin;
+    private final static String CARBON_ZIP = 
SampleApplicationsTest.class.getResource("/").getPath() +
+            "/../../../distribution/target/apache-stratos-4.2.0-SNAPSHOT.zip";
+    private final static int PORT_OFFSET = 0;
+    private static final String ACTIVEMQ_BIND_ADDRESS = 
"tcp://localhost:61617";
+    private static final String MOCK_IAAS_XML_FILE = "mock-iaas.xml";
+    private static final String SCALING_DROOL_FILE = "scaling.drl";
+    private static final String JNDI_PROPERTIES_FILE = "jndi.properties";
+    private static final String JMS_OUTPUT_ADAPTER_FILE = 
"JMSOutputAdaptor.xml";
+    protected RestClient restClient;
+    private String endpoint = "http://localhost:9763";;
+
     private BrokerService broker = new BrokerService();
     private TestLogAppender testLogAppender = new TestLogAppender();
     private ServerUtils serverUtils;
+    private String carbonHome;
     protected IntegrationMockClient mockIaasApiClient;
-    protected RestClient restClientTenant1;
-    protected RestClient restClientTenant2;
-    protected int tenant1Id;
-    protected int tenant2Id;
 
     public StratosTestServerManager() {
-        super(BASE_PATH + 
getIntegrationTestProperty(STRATOS_DISTRIBUTION_NAME),
-                Integer.parseInt(getIntegrationTestProperty(PORT_OFFSET)));
-
-        distributionName = 
integrationProperties.getProperty(STRATOS_DISTRIBUTION_NAME);
-        portOffset = 
Integer.parseInt(integrationProperties.getProperty(PORT_OFFSET));
-        adminUsername = integrationProperties.getProperty(ADMIN_USERNAME);
-        adminPassword = integrationProperties.getProperty(ADMIN_PASSWORD);
-        tenant1UserName = integrationProperties.getProperty(TENANT1_USER_NAME);
-        tenant1Password = integrationProperties.getProperty(TENANT1_PASSWD);
-        tenant2UserName = integrationProperties.getProperty(TENANT2_USER_NAME);
-        tenant2Password = integrationProperties.getProperty(TENANT2_PASSWD);
-        stratosEndpoint = integrationProperties.getProperty(STRATOS_ENDPOINT);
-        activemqBindAddress = 
integrationProperties.getProperty(ACTIVEMQ_BIND_ADDRESS);
+        super(CARBON_ZIP, PORT_OFFSET);
         serverUtils = new ServerUtils();
-        mockIaasApiClient = new IntegrationMockClient(stratosEndpoint + 
"/mock-iaas/api");
-        restClientAdmin = new RestClient(stratosEndpoint, adminUsername, 
adminPassword);
-        restClientTenant1 = new RestClient(stratosEndpoint, tenant1UserName, 
tenant1Password);
-        restClientTenant2 = new RestClient(stratosEndpoint, tenant2UserName, 
tenant2Password);
-    }
-
-    private static String getIntegrationTestProperty(String key) {
-        if (integrationProperties == null) {
-            integrationProperties = new Properties();
-            try {
-                integrationProperties
-                        
.load(StratosTestServerManager.class.getResourceAsStream("/integration-test.properties"));
-                log.info("Stratos integration properties: " + 
integrationProperties.toString());
-            }
-            catch (IOException e) {
-                log.error("Error loading integration-test.properties file from 
classpath. Please make sure that file " +
-                        "exists in classpath.", e);
-            }
-        }
-        return integrationProperties.getProperty(key);
+        restClient = new RestClient(endpoint, "admin", "admin");
+        mockIaasApiClient = new IntegrationMockClient(endpoint + 
"/mock-iaas/api");
     }
 
     @Override
@@ -139,7 +86,7 @@ public class StratosTestServerManager extends 
TestServerManager {
             
broker.setDataDirectory(StratosTestServerManager.class.getResource("/").getPath()
 +
                     File.separator + ".." + File.separator + "activemq-data");
             broker.setBrokerName("testBroker");
-            broker.addConnector(activemqBindAddress);
+            broker.addConnector(ACTIVEMQ_BIND_ADDRESS);
             broker.start();
             long time2 = System.currentTimeMillis();
             log.info(String.format("ActiveMQ started in %d sec", (time2 - 
time1) / 1000));
@@ -159,13 +106,13 @@ public class StratosTestServerManager extends 
TestServerManager {
             if (carbonZip == null) {
                 throw new IllegalArgumentException("carbon zip file is null");
             } else {
-                String carbonHome = 
this.serverUtils.setUpCarbonHome(carbonZip);
+                carbonHome = this.serverUtils.setUpCarbonHome(carbonZip);
                 TestUtil.copySecurityVerificationService(carbonHome);
                 this.copyArtifacts(carbonHome);
                 log.info("Stratos server setup completed");
 
                 log.info("Starting Stratos server...");
-                this.serverUtils.startServerUsingCarbonHome(carbonHome, 
carbonHome, "stratos", portOffset, null);
+                this.serverUtils.startServerUsingCarbonHome(carbonHome, 
carbonHome, "stratos", PORT_OFFSET, null);
                 FrameworkSettings.init();
 
                 while (!serverStarted()) {
@@ -180,7 +127,6 @@ public class StratosTestServerManager extends 
TestServerManager {
 
                 long time4 = System.currentTimeMillis();
                 log.info(String.format("Stratos server started in %d sec", 
(time4 - time3) / 1000));
-                createTenants();
                 return carbonHome;
             }
         }
@@ -189,29 +135,6 @@ public class StratosTestServerManager extends 
TestServerManager {
         }
     }
 
-    private void createTenants() {
-        log.info("Added tenants to the testing suit");
-        boolean addedTenant1 = restClientAdmin
-                .addEntity(RestConstants.TENANT1_RESOURCE, 
RestConstants.TENANT_API, RestConstants.TENANTS_NAME);
-        assertEquals(addedTenant1, true);
-        boolean addedTenant2 = restClientAdmin
-                .addEntity(RestConstants.TENANT2_RESOURCE, 
RestConstants.TENANT_API, RestConstants.TENANTS_NAME);
-        assertEquals(addedTenant2, true);
-    }
-
-
-    @BeforeClass
-    public void getTenantDetails() {
-        Tenant tenant1 = (Tenant) restClientAdmin
-                .getEntity(RestConstants.TENANT_API, 
RestConstants.TENANT1_GET_RESOURCE, Tenant.class,
-                        RestConstants.TENANTS_NAME);
-        tenant1Id = tenant1.getTenantId();
-        Tenant tenant2 = (Tenant) restClientAdmin
-                .getEntity(RestConstants.TENANT_API, 
RestConstants.TENANT2_GET_RESOURCE, Tenant.class,
-                        RestConstants.TENANTS_NAME);
-        tenant2Id = tenant2.getTenantId();
-    }
-
     private boolean mockServiceStarted() {
         for (String message : testLogAppender.getMessages()) {
             if (message.contains("Mock IaaS service component activated")) {
@@ -237,28 +160,24 @@ public class StratosTestServerManager extends 
TestServerManager {
     }
 
     protected void copyArtifacts(String carbonHome) throws IOException {
-        String commonResourcesPath = BASE_PATH + PATH_SEP + ".." + PATH_SEP + 
".." + PATH_SEP + "src" + PATH_SEP +
-                "test" + PATH_SEP + "resources" + PATH_SEP + "common";
-        copyConfigFile(carbonHome, commonResourcesPath, 
MOCK_IAAS_XML_FILENAME, CARBON_CONF_PATH);
-        copyConfigFile(carbonHome, commonResourcesPath, 
JNDI_PROPERTIES_FILENAME, CARBON_CONF_PATH);
-        copyConfigFile(carbonHome, commonResourcesPath, 
LOG4J_PROPERTIES_FILENAME, CARBON_CONF_PATH);
-        //copyConfigFile(carbonHome, commonResourcesPath, 
SCALING_DROOL_FILENAME, CARBON_CONF_PATH + PATH_SEP +
-        //      "drools");
-        copyConfigFile(carbonHome, commonResourcesPath, 
JMS_OUTPUT_ADAPTER_FILENAME,
-                "repository" + PATH_SEP + "deployment" + PATH_SEP + "server" + 
PATH_SEP + "outputeventadaptors");
+        copyConfigFile(carbonHome, MOCK_IAAS_XML_FILE);
+        copyConfigFile(carbonHome, JNDI_PROPERTIES_FILE);
+        copyConfigFile(carbonHome, SCALING_DROOL_FILE, 
"repository/conf/drools");
+        copyConfigFile(carbonHome, JMS_OUTPUT_ADAPTER_FILE, 
"repository/deployment/server/outputeventadaptors");
     }
 
-    private void copyConfigFile(String carbonHome, String filePath, String 
fileName, String destinationFolder)
-            throws
-            IOException {
+    private void copyConfigFile(String carbonHome, String sourceFilePath) 
throws IOException {
+        copyConfigFile(carbonHome, sourceFilePath, "repository/conf");
+    }
 
-        String fileAbsPath = filePath + PATH_SEP + fileName;
-        log.info("Copying file: " + fileAbsPath);
-        File srcFile = new File(fileAbsPath);
-        assertTrue(srcFile.exists());
-        File destFile = new File(carbonHome + PATH_SEP + destinationFolder + 
PATH_SEP + fileName);
+    private void copyConfigFile(String carbonHome, String sourceFilePath, 
String destinationFolder) throws IOException {
+        log.info("Copying file: " + sourceFilePath);
+        URL fileURL = getClass().getResource("/" + sourceFilePath);
+        assertNotNull(fileURL);
+        File srcFile = new File(fileURL.getFile());
+        File destFile = new File(carbonHome + "/" + destinationFolder + "/" + 
sourceFilePath);
         FileUtils.copyFile(srcFile, destFile);
-        log.info("Copying file [source] " + srcFile.getAbsolutePath() + " to 
[dest] " + destFile.getAbsolutePath());
+        log.info(sourceFilePath + " file copied");
     }
 
     private boolean serverStopped() {
@@ -279,4 +198,4 @@ public class StratosTestServerManager extends 
TestServerManager {
         }
         return false;
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/4b864473/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/TopologyHandler.java
----------------------------------------------------------------------
diff --git 
a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/TopologyHandler.java
 
b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/TopologyHandler.java
index a8e516f..9c9764b 100644
--- 
a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/TopologyHandler.java
+++ 
b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/TopologyHandler.java
@@ -58,11 +58,9 @@ import static junit.framework.Assert.*;
 public class TopologyHandler {
     private static final Log log = LogFactory.getLog(TopologyHandler.class);
 
-
-    public static final int APPLICATION_ACTIVATION_TIMEOUT = 400000;
-    public static final int APPLICATION_UNDEPLOYMENT_TIMEOUT = 60000;
-    public static final int APPLICATION_TOPOLOGY_TIMEOUT = 60000;
-
+    public static final int APPLICATION_ACTIVATION_TIMEOUT = 360000;
+    public static final int APPLICATION_UNDEPLOYMENT_TIMEOUT = 120000;
+    public static final int APPLICATION_TOPOLOGY_TIMEOUT = 90000;
     public static final String APPLICATION_STATUS_CREATED = "Created";
     public static final String APPLICATION_STATUS_UNDEPLOYING = "Undeploying";
     private ApplicationsEventReceiver applicationsEventReceiver;
@@ -163,18 +161,17 @@ public class TopologyHandler {
     /**
      * Assert application activation
      *
-     * @param tenantId
      * @param applicationName
      */
-    public void assertApplicationStatus(String applicationName, 
ApplicationStatus status, int tenantId) {
+    public void assertApplicationStatus(String applicationName, 
ApplicationStatus status) {
         long startTime = System.currentTimeMillis();
-        Application application = 
ApplicationManager.getApplications().getApplicationByTenant(applicationName, 
tenantId);
+        Application application = 
ApplicationManager.getApplications().getApplication(applicationName);
         while (!((application != null) && (application.getStatus() == 
status))) {
             try {
                 Thread.sleep(1000);
             } catch (InterruptedException ignore) {
             }
-            application = 
ApplicationManager.getApplications().getApplicationByTenant(applicationName,tenantId);
+            application = 
ApplicationManager.getApplications().getApplication(applicationName);
             if ((System.currentTimeMillis() - startTime) > 
APPLICATION_ACTIVATION_TIMEOUT) {
                 break;
             }
@@ -185,24 +182,13 @@ public class TopologyHandler {
                 status, application.getStatus());
     }
 
-    public Application getApplication(String applicationName, int tenantId) {
-        return 
ApplicationManager.getApplications().getApplicationByTenant(applicationName, 
tenantId);
-    }
-
-    public void assertApplicationForNonAvailability(String applicationName,  
int tenantId) {
-
-        Application application = 
ApplicationManager.getApplications().getApplicationByTenant(applicationName, 
tenantId);
-        assertNull(String.format("Application is found for other tenant : 
[application-id] %s", applicationName),application);
-    }
-
     /**
      * Assert application activation
      *
      * @param applicationName
-     * @param tenantId
      */
-    public void assertGroupActivation(String applicationName, int tenantId) {
-        Application application = 
ApplicationManager.getApplications().getApplicationByTenant(applicationName, 
tenantId);
+    public void assertGroupActivation(String applicationName) {
+        Application application = 
ApplicationManager.getApplications().getApplication(applicationName);
         assertNotNull(String.format("Application is not found: 
[application-id] %s",
                 applicationName), application);
 
@@ -216,24 +202,23 @@ public class TopologyHandler {
      * Assert application activation
      *
      * @param applicationName
-     * @param tenantId
      */
-    public void assertClusterActivation(String applicationName, int tenantId) {
-        Application application = 
ApplicationManager.getApplications().getApplicationByTenant(applicationName, 
tenantId);
+    public void assertClusterActivation(String applicationName) {
+        Application application = 
ApplicationManager.getApplications().getApplication(applicationName);
         assertNotNull(String.format("Application is not found: 
[application-id] %s",
                 applicationName), application);
 
         Set<ClusterDataHolder> clusterDataHolderSet = 
application.getClusterDataRecursively();
         for (ClusterDataHolder clusterDataHolder : clusterDataHolderSet) {
-            String serviceUuid = clusterDataHolder.getServiceUuid();
+            String serviceName = clusterDataHolder.getServiceType();
             String clusterId = clusterDataHolder.getClusterId();
-            Service service = 
TopologyManager.getTopology().getService(serviceUuid);
+            Service service = 
TopologyManager.getTopology().getService(serviceName);
             assertNotNull(String.format("Service is not found: 
[application-id] %s [service] %s",
-                    applicationName, serviceUuid), service);
+                    applicationName, serviceName), service);
 
             Cluster cluster = service.getCluster(clusterId);
             assertNotNull(String.format("Cluster is not found: 
[application-id] %s [service] %s [cluster-id] %s",
-                    applicationName, serviceUuid, clusterId), cluster);
+                    applicationName, serviceName, clusterId), cluster);
             boolean clusterActive = false;
 
             for (ClusterInstance instance : 
cluster.getInstanceIdToInstanceContextMap().values()) {
@@ -260,27 +245,26 @@ public class TopologyHandler {
     /**
      * Assert application activation
      *
-     * @param tenantId
      * @param applicationName
      */
-
-    public void terminateMemberFromCluster(String cartridgeName, String 
applicationName, IntegrationMockClient mockIaasApiClient, int tenantId) {
-        Application application = 
ApplicationManager.getApplications().getApplicationByTenant(applicationName, 
tenantId);
+    public void terminateMemberFromCluster(String cartridgeName, String 
applicationName,
+                                           IntegrationMockClient 
mockIaasApiClient) {
+        Application application = 
ApplicationManager.getApplications().getApplication(applicationName);
         assertNotNull(String.format("Application is not found: 
[application-id] %s",
                 applicationName), application);
 
         Set<ClusterDataHolder> clusterDataHolderSet = 
application.getClusterDataRecursively();
         for (ClusterDataHolder clusterDataHolder : clusterDataHolderSet) {
-            String serviceUuid = clusterDataHolder.getServiceUuid();
-            if(cartridgeName.equals(serviceUuid)) {
+            String serviceName = clusterDataHolder.getServiceType();
+            if(cartridgeName.equals(serviceName)) {
                 String clusterId = clusterDataHolder.getClusterId();
-                Service service = 
TopologyManager.getTopology().getService(serviceUuid);
-                assertNotNull(String.format("Service is not found: 
[application-id] %s [service uuid] %s",
-                        applicationName, serviceUuid), service);
+                Service service = 
TopologyManager.getTopology().getService(serviceName);
+                assertNotNull(String.format("Service is not found: 
[application-id] %s [service] %s",
+                        applicationName, serviceName), service);
 
                 Cluster cluster = service.getCluster(clusterId);
                 assertNotNull(String.format("Cluster is not found: 
[application-id] %s [service] %s [cluster-id] %s",
-                        applicationName, serviceUuid, clusterId), cluster);
+                        applicationName, serviceName, clusterId), cluster);
                 boolean memberTerminated = false;
 
                 for (ClusterInstance instance : 
cluster.getInstanceIdToInstanceContextMap().values()) {
@@ -306,16 +290,16 @@ public class TopologyHandler {
 
     }
 
-    public void assertClusterMinMemberCount(String applicationName, int 
minMembers, int tenantId) {
+    public void assertClusterMinMemberCount(String applicationName, int 
minMembers) {
         long startTime = System.currentTimeMillis();
 
-        Application application = 
ApplicationManager.getApplications().getApplicationByTenant(applicationName, 
tenantId);
+        Application application = 
ApplicationManager.getApplications().getApplication(applicationName);
         assertNotNull(String.format("Application is not found: 
[application-id] %s",
                 applicationName), application);
 
         Set<ClusterDataHolder> clusterDataHolderSet = 
application.getClusterDataRecursively();
         for (ClusterDataHolder clusterDataHolder : clusterDataHolderSet) {
-            String serviceName = clusterDataHolder.getServiceUuid();
+            String serviceName = clusterDataHolder.getServiceType();
             String clusterId = clusterDataHolder.getClusterId();
             Service service = 
TopologyManager.getTopology().getService(serviceName);
             assertNotNull(String.format("Service is not found: 
[application-id] %s [service] %s",
@@ -375,14 +359,13 @@ public class TopologyHandler {
      * Assert application activation
      *
      * @param applicationName
-     * @param tenantId
      */
-    public boolean assertApplicationUndeploy(String applicationName, int 
tenantId) {
+    public boolean assertApplicationUndeploy(String applicationName) {
         long startTime = System.currentTimeMillis();
-        Application application = 
ApplicationManager.getApplications().getApplicationByTenant(applicationName, 
tenantId);
+        Application application = 
ApplicationManager.getApplications().getApplication(applicationName);
         ApplicationContext applicationContext = null;
         try {
-            applicationContext = 
AutoscalerServiceClient.getInstance().getApplicationByTenant(applicationName,tenantId);
+            applicationContext = 
AutoscalerServiceClient.getInstance().getApplication(applicationName);
         } catch (RemoteException e) {
             log.error("Error while getting the application context for 
[application] " + applicationName);
         }
@@ -392,9 +375,9 @@ public class TopologyHandler {
                 Thread.sleep(1000);
             } catch (InterruptedException ignore) {
             }
-            application = 
ApplicationManager.getApplications().getApplicationByTenant(applicationName,tenantId);
+            application = 
ApplicationManager.getApplications().getApplication(applicationName);
             try {
-                applicationContext = 
AutoscalerServiceClient.getInstance().getApplicationByTenant(applicationName,tenantId);
+                applicationContext = 
AutoscalerServiceClient.getInstance().getApplication(applicationName);
             } catch (RemoteException e) {
                 log.error("Error while getting the application context for 
[application] " + applicationName);
             }
@@ -421,12 +404,11 @@ public class TopologyHandler {
     /**
      * Assert application activation
      *
-     * @param tenantId
      * @param applicationName
      */
-    public void assertGroupInstanceCount(String applicationName, String 
groupAlias, int count, int tenantId) {
+    public void assertGroupInstanceCount(String applicationName, String 
groupAlias, int count) {
         long startTime = System.currentTimeMillis();
-        Application application = 
ApplicationManager.getApplications().getApplicationByTenant(applicationName, 
tenantId);
+        Application application = 
ApplicationManager.getApplications().getApplication(applicationName);
         if (application != null) {
             Group group = application.getGroupRecursively(groupAlias);
             while (group.getInstanceContextCount() != count) {
@@ -599,8 +581,8 @@ public class TopologyHandler {
         return appId + "-" + groupId + "-" + instanceId;
     }
 
-    public String getClusterIdFromAlias(String applicationId, String alias,int 
tenantId) {
-        Application application = 
ApplicationManager.getApplications().getApplicationByTenant(applicationId,tenantId);
+    public String getClusterIdFromAlias(String applicationId, String alias) {
+        Application application = 
ApplicationManager.getApplications().getApplication(applicationId);
         assertNotNull(application);
 
         ClusterDataHolder dataHolder = 
application.getClusterDataHolderRecursivelyByAlias(alias);

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

Reply via email to