You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by ga...@apache.org on 2015/12/07 11:19:30 UTC
[01/50] [abbrv] stratos git commit: Add const for REPO_NOTIFY_NAME
entity
Repository: stratos
Updated Branches:
refs/heads/release-4.1.5 aae197a72 -> 04c97cbd4
Add const for REPO_NOTIFY_NAME entity
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/5d75186f
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/5d75186f
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/5d75186f
Branch: refs/heads/release-4.1.5
Commit: 5d75186ffe9d0d638c4f12538ae29fa1a2bc9722
Parents: 348a71b
Author: Akila Perera <ra...@gmail.com>
Authored: Mon Nov 30 00:08:30 2015 +0530
Committer: gayangunarathne <ga...@wso2.com>
Committed: Mon Dec 7 10:16:24 2015 +0000
----------------------------------------------------------------------
.../java/org/apache/stratos/integration/common/RestConstants.java | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/5d75186f/products/stratos/modules/integration/test-common/src/main/java/org/apache/stratos/integration/common/RestConstants.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-common/src/main/java/org/apache/stratos/integration/common/RestConstants.java b/products/stratos/modules/integration/test-common/src/main/java/org/apache/stratos/integration/common/RestConstants.java
index aa2a220..7467e5d 100644
--- a/products/stratos/modules/integration/test-common/src/main/java/org/apache/stratos/integration/common/RestConstants.java
+++ b/products/stratos/modules/integration/test-common/src/main/java/org/apache/stratos/integration/common/RestConstants.java
@@ -35,6 +35,7 @@ public class RestConstants {
public static final String APPLICATIONS_DEPLOY = "/deploy";
public static final String APPLICATIONS_UNDEPLOY = "/undeploy";
public static final String REPO_NOTIFY = "/" + API + "/repo/notify";
+ public static final String REPO_NOTIFY_NAME = "GitHook";
public static final String AUTOSCALING_POLICIES_PATH = "/autoscaling-policies/";
public static final String AUTOSCALING_POLICIES_NAME = "autoscalingPolicy";
[17/50] [abbrv] stratos git commit: Rename default timeout consts
Posted by ga...@apache.org.
Rename default timeout consts
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/0725fb13
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/0725fb13
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/0725fb13
Branch: refs/heads/release-4.1.5
Commit: 0725fb13e981cde16f40e6a6fad82e00a5538bde
Parents: 34cc042
Author: Akila Perera <ra...@gmail.com>
Authored: Mon Nov 30 00:28:05 2015 +0530
Committer: gayangunarathne <ga...@wso2.com>
Committed: Mon Dec 7 10:16:26 2015 +0000
----------------------------------------------------------------------
.../stratos/integration/tests/StratosIntegrationTest.java | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/0725fb13/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/StratosIntegrationTest.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/StratosIntegrationTest.java b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/StratosIntegrationTest.java
index fca858e..7de8020 100644
--- a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/StratosIntegrationTest.java
+++ b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/StratosIntegrationTest.java
@@ -34,9 +34,8 @@ public class StratosIntegrationTest {
protected String stratosSecuredBackendURL;
protected RestClient restClient;
protected MockIaasApiClient mockIaasApiClient;
- public static final int GLOBAL_TEST_TIMEOUT = 5 * 60 * 1000; // 5 mins
- public static final int IAAS_PROVIDER_TEST_TIMEOUT = 10 * 60 * 1000; // 10 mins
- public static final int APPLICATION_TEST_TIMEOUT = 25 * 60 * 1000; // 25 mins
+ public static final int DEFAULT_TEST_TIMEOUT = 5 * 60 * 1000; // 5 mins
+ public static final int DEFAULT_APPLICATION_TEST_TIMEOUT = 25 * 60 * 1000; // 25 mins
public StratosIntegrationTest() {
try {
[41/50] [abbrv] stratos git commit: Revert "Update the AS registry
manager"
Posted by ga...@apache.org.
Revert "Update the AS registry manager"
This reverts commit e64081f7944dadced190054eb44f8d1dafe0f892.
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/10a25456
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/10a25456
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/10a25456
Branch: refs/heads/release-4.1.5
Commit: 10a25456215b3c76a8f8ae05b65c378a8b247690
Parents: 456c6e2
Author: gayangunarathne <ga...@wso2.com>
Authored: Sun Dec 6 13:21:47 2015 +0530
Committer: gayangunarathne <ga...@wso2.com>
Committed: Mon Dec 7 10:16:30 2015 +0000
----------------------------------------------------------------------
.../apache/stratos/autoscaler/registry/RegistryManager.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/10a25456/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java
index 343b76a..925c4ff 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java
@@ -85,7 +85,7 @@ public class RegistryManager {
return instance;
}
- private synchronized Object retrieve(String resourcePath) {
+ private Object retrieve(String resourcePath) {
try {
Resource resource = registryService.get(resourcePath);
return resource.getContent();
@@ -99,7 +99,7 @@ public class RegistryManager {
}
}
- private synchronized void delete(String resourcePath) {
+ private void delete(String resourcePath) {
try {
registryService.beginTransaction();
registryService.delete(resourcePath);
@@ -138,7 +138,7 @@ public class RegistryManager {
* @param dataObj object to be persisted.
* @param resourcePath resource path to be persisted.
*/
- private synchronized void persist(Object dataObj, String resourcePath) throws AutoScalerException {
+ private void persist(Object dataObj, String resourcePath) throws AutoScalerException {
try {
registryService.beginTransaction();
[14/50] [abbrv] stratos git commit: PCA - Publish MB events using a
thread and timeout after 5 seconds. Improved PCA structure and removed
unnecessary threading PCA Live Test - Improved logging,
improved MB HA test case
Posted by ga...@apache.org.
PCA - Publish MB events using a thread and timeout after 5 seconds. Improved PCA structure and removed unnecessary threading
PCA Live Test - Improved logging, improved MB HA test case
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/f0740ec0
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/f0740ec0
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/f0740ec0
Branch: refs/heads/release-4.1.5
Commit: f0740ec0b7ee5f80248ef9e4ff853cddca5f04e8
Parents: 38b196c
Author: Chamila de Alwis <ch...@apache.org>
Authored: Fri Nov 27 14:36:42 2015 +0530
Committer: gayangunarathne <ga...@wso2.com>
Committed: Mon Dec 7 10:16:26 2015 +0000
----------------------------------------------------------------------
.../cartridge.agent/cartridge.agent/agent.py | 62 +-
.../modules/event/eventhandler.py | 1181 +++++++++---------
.../cartridge.agent/publisher.py | 72 +-
.../cartridge.agent/subscriber.py | 8 +-
.../integration/tests/ADCExtensionTestCase.java | 5 +
.../tests/ADCMTAppTenantUserTestCase.java | 5 +
.../integration/tests/ADCMTAppTestCase.java | 5 +
.../agent/integration/tests/ADCTestCase.java | 5 +
.../integration/tests/AgentStartupTestCase.java | 5 +
.../integration/tests/CEPHAModeTestCase.java | 5 +
.../tests/MessageBrokerHATestCase.java | 30 +-
.../tests/PythonAgentIntegrationTest.java | 14 +-
.../MessageBrokerHATestCase/agent.conf | 2 +-
.../src/test/resources/log4j.properties | 2 +-
.../src/test/resources/test-suite-all.xml | 1 +
.../src/test/resources/test-suite-smoke.xml | 2 +
16 files changed, 734 insertions(+), 670 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/f0740ec0/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/agent.py
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/agent.py b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/agent.py
index 959568b..6b81dff 100644
--- a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/agent.py
+++ b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/agent.py
@@ -16,22 +16,19 @@
# specific language governing permissions and limitations
# under the License.
-import threading
-
import publisher
from logpublisher import *
from modules.event.application.signup.events import *
from modules.event.domain.mapping.events import *
-from modules.event.eventhandler import EventHandler
+import modules.event.eventhandler as event_handler
from modules.event.instance.notifier.events import *
from modules.event.tenant.events import *
from modules.event.topology.events import *
from subscriber import EventSubscriber
-class CartridgeAgent(threading.Thread):
+class CartridgeAgent(object):
def __init__(self):
- threading.Thread.__init__(self)
Config.initialize_config()
self.__tenant_context_initialized = False
self.__log_publish_manager = None
@@ -47,9 +44,7 @@ class CartridgeAgent(threading.Thread):
self.__app_topic_subscriber = EventSubscriber(constants.APPLICATION_SIGNUP, mb_urls, mb_uname, mb_pwd)
self.__topology_event_subscriber = EventSubscriber(constants.TOPOLOGY_TOPIC, mb_urls, mb_uname, mb_pwd)
- self.__event_handler = EventHandler()
-
- def run(self):
+ def run_agent(self):
self.__log.info("Starting Cartridge Agent...")
# Start topology event receiver thread
@@ -58,7 +53,7 @@ class CartridgeAgent(threading.Thread):
if Config.lvs_virtual_ip is None or str(Config.lvs_virtual_ip).strip() == "":
self.__log.debug("LVS Virtual IP is not defined")
else:
- self.__event_handler.create_dummy_interface()
+ event_handler.create_dummy_interface()
# request complete topology event from CC by publishing CompleteTopologyRequestEvent
publisher.publish_complete_topology_request_event()
@@ -84,14 +79,14 @@ class CartridgeAgent(threading.Thread):
publisher.publish_complete_tenant_request_event()
# Execute instance started shell script
- self.__event_handler.on_instance_started_event()
+ event_handler.on_instance_started_event()
# Publish instance started event
publisher.publish_instance_started_event()
# Execute start servers extension
try:
- self.__event_handler.start_server_extension()
+ event_handler.start_server_extension()
except Exception as e:
self.__log.exception("Error processing start servers event: %s" % e)
@@ -100,7 +95,7 @@ class CartridgeAgent(threading.Thread):
if repo_url is None or str(repo_url).strip() == "":
self.__log.info("No artifact repository found")
publisher.publish_instance_activated_event()
- self.__event_handler.on_instance_activated_event()
+ event_handler.on_instance_activated_event()
else:
# instance activated event will be published in artifact updated event handler
self.__log.info(
@@ -109,7 +104,7 @@ class CartridgeAgent(threading.Thread):
persistence_mapping_payload = Config.persistence_mappings
if persistence_mapping_payload is not None:
- self.__event_handler.volume_mount_extension(persistence_mapping_payload)
+ event_handler.volume_mount_extension(persistence_mapping_payload)
# start log publishing thread
if DataPublisherConfiguration.get_instance().enabled:
@@ -198,14 +193,14 @@ class CartridgeAgent(threading.Thread):
def on_artifact_updated(self, msg):
event_obj = ArtifactUpdatedEvent.create_from_json(msg.payload)
- self.__event_handler.on_artifact_updated_event(event_obj)
+ event_handler.on_artifact_updated_event(event_obj)
def on_instance_cleanup_member(self, msg):
member_in_payload = Config.member_id
event_obj = InstanceCleanupMemberEvent.create_from_json(msg.payload)
member_in_event = event_obj.member_id
if member_in_payload == member_in_event:
- self.__event_handler.on_instance_cleanup_member_event()
+ event_handler.on_instance_cleanup_member_event()
def on_instance_cleanup_cluster(self, msg):
event_obj = InstanceCleanupClusterEvent.create_from_json(msg.payload)
@@ -215,7 +210,7 @@ class CartridgeAgent(threading.Thread):
instance_in_event = event_obj.cluster_instance_id
if cluster_in_event == cluster_in_payload and instance_in_payload == instance_in_event:
- self.__event_handler.on_instance_cleanup_cluster_event()
+ event_handler.on_instance_cleanup_cluster_event()
def on_member_created(self, msg):
self.__log.debug("Member created event received: %r" % msg.payload)
@@ -227,7 +222,7 @@ class CartridgeAgent(threading.Thread):
if not TopologyContext.topology.initialized:
return
- self.__event_handler.on_member_initialized_event(event_obj)
+ event_handler.on_member_initialized_event(event_obj)
def on_member_activated(self, msg):
self.__log.debug("Member activated event received: %r" % msg.payload)
@@ -235,7 +230,7 @@ class CartridgeAgent(threading.Thread):
return
event_obj = MemberActivatedEvent.create_from_json(msg.payload)
- self.__event_handler.on_member_activated_event(event_obj)
+ event_handler.on_member_activated_event(event_obj)
def on_member_terminated(self, msg):
self.__log.debug("Member terminated event received: %r" % msg.payload)
@@ -243,7 +238,7 @@ class CartridgeAgent(threading.Thread):
return
event_obj = MemberTerminatedEvent.create_from_json(msg.payload)
- self.__event_handler.on_member_terminated_event(event_obj)
+ event_handler.on_member_terminated_event(event_obj)
def on_member_suspended(self, msg):
self.__log.debug("Member suspended event received: %r" % msg.payload)
@@ -251,7 +246,7 @@ class CartridgeAgent(threading.Thread):
return
event_obj = MemberSuspendedEvent.create_from_json(msg.payload)
- self.__event_handler.on_member_suspended_event(event_obj)
+ event_handler.on_member_suspended_event(event_obj)
def on_complete_topology(self, msg):
event_obj = CompleteTopologyEvent.create_from_json(msg.payload)
@@ -259,7 +254,7 @@ class CartridgeAgent(threading.Thread):
if not TopologyContext.topology.initialized:
self.__log.info("Topology initialized from complete topology event")
TopologyContext.topology.initialized = True
- self.__event_handler.on_complete_topology_event(event_obj)
+ event_handler.on_complete_topology_event(event_obj)
self.__log.debug("Topology context updated with [topology] %r" % event_obj.topology.json_str)
@@ -269,17 +264,17 @@ class CartridgeAgent(threading.Thread):
return
event_obj = MemberStartedEvent.create_from_json(msg.payload)
- self.__event_handler.on_member_started_event(event_obj)
+ event_handler.on_member_started_event(event_obj)
def on_domain_mapping_added(self, msg):
self.__log.debug("Subscription domain added event received : %r" % msg.payload)
event_obj = DomainMappingAddedEvent.create_from_json(msg.payload)
- self.__event_handler.on_domain_mapping_added_event(event_obj)
+ event_handler.on_domain_mapping_added_event(event_obj)
def on_domain_mapping_removed(self, msg):
self.__log.debug("Subscription domain removed event received : %r" % msg.payload)
event_obj = DomainMappingRemovedEvent.create_from_json(msg.payload)
- self.__event_handler.on_domain_mapping_removed_event(event_obj)
+ event_handler.on_domain_mapping_removed_event(event_obj)
def on_complete_tenant(self, msg):
event_obj = CompleteTenantEvent.create_from_json(msg.payload)
@@ -287,19 +282,19 @@ class CartridgeAgent(threading.Thread):
if not self.__tenant_context_initialized:
self.__log.info("Tenant context initialized from complete tenant event")
self.__tenant_context_initialized = True
- self.__event_handler.on_complete_tenant_event(event_obj)
+ event_handler.on_complete_tenant_event(event_obj)
self.__log.debug("Tenant context updated with [tenant list] %r" % event_obj.tenant_list_json)
def on_tenant_subscribed(self, msg):
self.__log.debug("Tenant subscribed event received: %r" % msg.payload)
event_obj = TenantSubscribedEvent.create_from_json(msg.payload)
- self.__event_handler.on_tenant_subscribed_event(event_obj)
+ event_handler.on_tenant_subscribed_event(event_obj)
def on_application_signup_removed(self, msg):
self.__log.debug("Application signup removed event received: %r" % msg.payload)
event_obj = ApplicationSignUpRemovedEvent.create_from_json(msg.payload)
- self.__event_handler.on_application_signup_removed_event(event_obj)
+ event_handler.on_application_signup_removed_event(event_obj)
def wait_for_complete_topology(self):
while not TopologyContext.topology.initialized:
@@ -308,17 +303,12 @@ class CartridgeAgent(threading.Thread):
self.__log.info("Complete topology event received")
-def main():
- cartridge_agent = CartridgeAgent()
+if __name__ == "__main__":
log = LogFactory().get_log(__name__)
-
try:
log.info("Starting Stratos cartridge agent...")
- cartridge_agent.start()
+ cartridge_agent = CartridgeAgent()
+ cartridge_agent.run_agent()
except Exception as e:
log.exception("Cartridge Agent Exception: %r" % e)
- cartridge_agent.terminate()
-
-
-if __name__ == "__main__":
- main()
+ # cartridge_agent.terminate()
http://git-wip-us.apache.org/repos/asf/stratos/blob/f0740ec0/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/event/eventhandler.py
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/event/eventhandler.py b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/event/eventhandler.py
index 6e2aa4f..f8b0c2b 100644
--- a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/event/eventhandler.py
+++ b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/event/eventhandler.py
@@ -21,8 +21,6 @@ from threading import Thread
import publisher
from entity import *
-import constants
-from config import Config
from ..artifactmgt.git.agentgithandler import *
from ..artifactmgt.repository import Repository
from ..util import cartridgeagentutils
@@ -31,485 +29,492 @@ from ..util.log import LogFactory
SUPER_TENANT_ID = "-1234"
SUPER_TENANT_REPO_PATH = "/repository/deployment/server/"
TENANT_REPO_PATH = "/repository/tenants/"
+log = LogFactory().get_log(__name__)
+
+"""
+Event execution related logic
+"""
+
+
+def on_instance_started_event():
+ log.debug("Processing instance started event...")
+ # TODO: copy artifacts extension
+ execute_event_extendables(constants.INSTANCE_STARTED_EVENT, {})
+
+
+def create_dummy_interface():
+ log.debug("Processing lvs dummy interface creation...")
+ lvs_vip = Config.lvs_virtual_ip.split("|")
+ log.debug("LVS dummy interface creation values %s %s " % (lvs_vip[0], lvs_vip[1]))
+ execute_event_extendables(
+ constants.CREATE_LVS_DUMMY_INTERFACE,
+ {"EVENT": constants.CREATE_LVS_DUMMY_INTERFACE,
+ "LVS_DUMMY_VIRTUAL_IP": lvs_vip[0],
+ "LVS_SUBNET_MASK": lvs_vip[1]}
+ )
+
+
+def on_instance_activated_event():
+ log.debug("Processing instance activated event...")
+ execute_event_extendables(constants.INSTANCE_ACTIVATED_EVENT, {})
+
+
+def on_artifact_updated_event(artifacts_updated_event):
+ log.debug(
+ "Processing artifact updated event for [tenant] %s [cluster] %s [status] %s"
+ % (str(artifacts_updated_event.tenant_id), artifacts_updated_event.cluster_id, artifacts_updated_event.status))
+
+ cluster_id_event = str(artifacts_updated_event.cluster_id).strip()
+ cluster_id_payload = Config.cluster_id
+ repo_url = str(artifacts_updated_event.repo_url).strip()
+
+ if repo_url == "":
+ log.error("Repository URL is empty. Failed to process artifact updated event.")
+ return
+
+ if cluster_id_payload is None or cluster_id_payload == "":
+ log.error("Cluster ID in payload is empty. Failed to process artifact updated event.")
+ return
+
+ if cluster_id_payload != cluster_id_event:
+ log.debug("Cluster ID in artifact updated event does not match. Skipping event handler.")
+ return
+
+ repo_password = None
+ if artifacts_updated_event.repo_password is not None:
+ secret = Config.cartridge_key
+ repo_password = cartridgeagentutils.decrypt_password(artifacts_updated_event.repo_password, secret)
+
+ if Config.app_path is None:
+ log.error("Repository path is empty. Failed to process artifact updated event.")
+ return
+
+ repo_username = artifacts_updated_event.repo_username
+ tenant_id = artifacts_updated_event.tenant_id
+ is_multitenant = Config.is_multiTenant
+ commit_enabled = artifacts_updated_event.commit_enabled
+
+ # create repo object
+ local_repo_path = get_repo_path_for_tenant(str(tenant_id), Config.app_path, is_multitenant)
+ repo_info = Repository(repo_url, repo_username, repo_password, local_repo_path, tenant_id, commit_enabled)
+ log.info("Executing checkout job on artifact updated event...")
+
+ try:
+ Config.artifact_checkout_plugin.plugin_object.checkout(repo_info)
+ except Exception as e:
+ log.exception(
+ "Checkout job on artifact updated event failed for tenant: %s %s" % (repo_info.tenant_id, e))
+
+ # execute artifact updated extension
+ plugin_values = {"ARTIFACT_UPDATED_CLUSTER_ID": artifacts_updated_event.cluster_id,
+ "ARTIFACT_UPDATED_TENANT_ID": artifacts_updated_event.tenant_id,
+ "ARTIFACT_UPDATED_REPO_URL": artifacts_updated_event.repo_url,
+ "ARTIFACT_UPDATED_REPO_PASSWORD": artifacts_updated_event.repo_password,
+ "ARTIFACT_UPDATED_REPO_USERNAME": artifacts_updated_event.repo_username,
+ "ARTIFACT_UPDATED_STATUS": artifacts_updated_event.status}
+
+ try:
+ execute_event_extendables(constants.ARTIFACT_UPDATED_EVENT, plugin_values)
+ except Exception as e:
+ log.exception("Could not execute plugins for artifact updated event: %s" % e)
+
+ if not Config.activated:
+ # publish instance activated event if not yet activated
+ publisher.publish_instance_activated_event()
+ on_instance_activated_event()
+
+ update_artifacts = Config.read_property(constants.ENABLE_ARTIFACT_UPDATE, True)
+ auto_commit = Config.is_commits_enabled
+ auto_checkout = Config.is_checkout_enabled
+ log.info("ADC configuration: [update_artifacts] %s, [auto-commit] %s, [auto-checkout] %s"
+ % (update_artifacts, auto_commit, auto_checkout))
+
+ if update_artifacts:
+ try:
+ update_interval = int(Config.artifact_update_interval)
+ except ValueError:
+ log.exception("Invalid artifact sync interval specified: %s" % ValueError)
+ update_interval = 10
+
+ log.info("Artifact updating task enabled, update interval: %s seconds" % update_interval)
+
+ log.info("Auto Commit is turned %s " % ("on" if auto_commit else "off"))
+ log.info("Auto Checkout is turned %s " % ("on" if auto_checkout else "off"))
+
+ AgentGitHandler.schedule_artifact_update_task(
+ repo_info,
+ auto_checkout,
+ auto_commit,
+ update_interval)
+
+
+def on_instance_cleanup_cluster_event():
+ log.debug("Processing instance cleanup cluster event...")
+ cleanup(constants.INSTANCE_CLEANUP_CLUSTER_EVENT)
+
+
+def on_instance_cleanup_member_event():
+ log.debug("Processing instance cleanup member event...")
+ cleanup(constants.INSTANCE_CLEANUP_MEMBER_EVENT)
+
+
+def on_member_activated_event(member_activated_event):
+ log.debug(
+ "Processing Member activated event: [service] %r [cluster] %r [member] %r"
+ % (member_activated_event.service_name,
+ member_activated_event.cluster_id,
+ member_activated_event.member_id))
+
+ member_initialized = is_member_initialized_in_topology(
+ member_activated_event.service_name,
+ member_activated_event.cluster_id,
+ member_activated_event.member_id)
+
+ if not member_initialized:
+ log.error("Member has not initialized, failed to execute member activated event")
+ return
+
+ execute_event_extendables(constants.MEMBER_ACTIVATED_EVENT, {})
+
+
+def on_complete_topology_event(complete_topology_event):
+ log.debug("Processing Complete topology event...")
+
+ service_name_in_payload = Config.service_name
+ cluster_id_in_payload = Config.cluster_id
+ member_id_in_payload = Config.member_id
+
+ if not Config.initialized:
+ member_initialized = is_member_initialized_in_topology(
+ service_name_in_payload,
+ cluster_id_in_payload,
+ member_id_in_payload)
+ if member_initialized:
+ # Set cartridge agent as initialized since member is available and it is in initialized state
+ Config.initialized = True
+ log.info(
+ "Member initialized [member id] %s, [cluster-id] %s, [service] %s"
+ % (member_id_in_payload, cluster_id_in_payload, service_name_in_payload))
-class EventHandler:
+ topology = complete_topology_event.get_topology()
+ service = topology.get_service(service_name_in_payload)
+ if service is None:
+ raise Exception("Service not found in topology [service] %s" % service_name_in_payload)
+
+ cluster = service.get_cluster(cluster_id_in_payload)
+ if cluster is None:
+ raise Exception("Cluster id not found in topology [cluster] %s" % cluster_id_in_payload)
+
+ plugin_values = {"TOPOLOGY_JSON": json.dumps(topology.json_str),
+ "MEMBER_LIST_JSON": json.dumps(cluster.member_list_json)}
+
+ execute_event_extendables(constants.COMPLETE_TOPOLOGY_EVENT, plugin_values)
+
+
+def on_member_initialized_event(member_initialized_event):
"""
- Event execution related logic
+ Member initialized event is sent by cloud controller once volume attachment and
+ ip address allocation is completed successfully
+ :param member_initialized_event:
+ :return:
"""
+ log.debug("Processing Member initialized event...")
+ service_name_in_payload = Config.service_name
+ cluster_id_in_payload = Config.cluster_id
+ member_id_in_payload = Config.member_id
+
+ if not Config.initialized and member_id_in_payload == member_initialized_event.member_id:
+ member_exists = member_exists_in_topology(
+ service_name_in_payload,
+ cluster_id_in_payload,
+ member_id_in_payload)
+
+ log.debug("Member exists: %s" % member_exists)
+
+ if member_exists:
+ Config.initialized = True
+ mark_member_as_initialized(service_name_in_payload, cluster_id_in_payload, member_id_in_payload)
+ log.info("Instance marked as initialized on member initialized event")
+ else:
+ raise Exception("Member [member-id] %s not found in topology while processing member initialized "
+ "event. [Topology] %s" % (member_id_in_payload, TopologyContext.get_topology()))
- def __init__(self):
- self.__log = LogFactory().get_log(__name__)
+ execute_event_extendables(constants.MEMBER_INITIALIZED_EVENT, {})
- def on_instance_started_event(self):
- self.__log.debug("Processing instance started event...")
- # TODO: copy artifacts extension
- self.execute_event_extendables(constants.INSTANCE_STARTED_EVENT, {})
-
- def create_dummy_interface(self):
- self.__log.debug("Processing lvs dummy interface creation...")
- lvs_vip = Config.lvs_virtual_ip.split("|")
- self.__log.debug("LVS dummy interface creation values %s %s " % (lvs_vip[0], lvs_vip[1]))
- self.execute_event_extendables(constants.CREATE_LVS_DUMMY_INTERFACE,
- {"EVENT": constants.CREATE_LVS_DUMMY_INTERFACE,
- "LVS_DUMMY_VIRTUAL_IP": lvs_vip[0],
- "LVS_SUBNET_MASK": lvs_vip[1]})
-
- def on_instance_activated_event(self):
- self.__log.debug("Processing instance activated event...")
- self.execute_event_extendables(constants.INSTANCE_ACTIVATED_EVENT, {})
-
- def on_artifact_updated_event(self, artifacts_updated_event):
- self.__log.debug("Processing artifact updated event for [tenant] %s [cluster] %s [status] %s" %
- (str(artifacts_updated_event.tenant_id),
- artifacts_updated_event.cluster_id,
- artifacts_updated_event.status))
-
- cluster_id_event = str(artifacts_updated_event.cluster_id).strip()
- cluster_id_payload = Config.cluster_id
- repo_url = str(artifacts_updated_event.repo_url).strip()
-
- if repo_url == "":
- self.__log.error("Repository URL is empty. Failed to process artifact updated event.")
- return
-
- if cluster_id_payload is None or cluster_id_payload == "":
- self.__log.error("Cluster ID in payload is empty. Failed to process artifact updated event.")
- return
-
- if cluster_id_payload != cluster_id_event:
- self.__log.debug("Cluster ID in artifact updated event does not match. Skipping event handler.")
- return
-
- repo_password = None
- if artifacts_updated_event.repo_password is not None:
- secret = Config.cartridge_key
- repo_password = cartridgeagentutils.decrypt_password(artifacts_updated_event.repo_password, secret)
-
- if Config.app_path is None:
- self.__log.error("Repository path is empty. Failed to process artifact updated event.")
- return
-
- if not EventHandler.validate_repo_path(Config.app_path):
- self.__log.error(
- "Repository path cannot be accessed, or is invalid. Failed to process artifact updated event.")
- return
-
- repo_username = artifacts_updated_event.repo_username
- tenant_id = artifacts_updated_event.tenant_id
- is_multitenant = Config.is_multiTenant
- commit_enabled = artifacts_updated_event.commit_enabled
-
- # create repo object
- local_repo_path = self.get_repo_path_for_tenant(str(tenant_id), Config.app_path, is_multitenant)
- repo_info = Repository(repo_url, repo_username, repo_password, local_repo_path, tenant_id, commit_enabled)
- self.__log.info("Executing checkout job on artifact updated event...")
- try:
- Config.artifact_checkout_plugin.plugin_object.checkout(repo_info)
- except Exception as e:
- self.__log.exception(
- "Checkout job on artifact updated event failed for tenant: %s %s" % (repo_info.tenant_id, e))
+def on_complete_tenant_event(complete_tenant_event):
+ log.debug("Processing Complete tenant event...")
- # execute artifact updated extension
- plugin_values = {"ARTIFACT_UPDATED_CLUSTER_ID": artifacts_updated_event.cluster_id,
- "ARTIFACT_UPDATED_TENANT_ID": artifacts_updated_event.tenant_id,
- "ARTIFACT_UPDATED_REPO_URL": artifacts_updated_event.repo_url,
- "ARTIFACT_UPDATED_REPO_PASSWORD": artifacts_updated_event.repo_password,
- "ARTIFACT_UPDATED_REPO_USERNAME": artifacts_updated_event.repo_username,
- "ARTIFACT_UPDATED_STATUS": artifacts_updated_event.status}
+ tenant_list_json = complete_tenant_event.tenant_list_json
+ log.debug("Complete tenants:" + json.dumps(tenant_list_json))
- try:
- self.execute_event_extendables(constants.ARTIFACT_UPDATED_EVENT, plugin_values)
- except Exception as e:
- self.__log.exception("Could not execute plugins for artifact updated event: %s" % e)
-
- if not Config.activated:
- # publish instance activated event if not yet activated
- publisher.publish_instance_activated_event()
- self.on_instance_activated_event()
-
- update_artifacts = Config.read_property(constants.ENABLE_ARTIFACT_UPDATE, True)
- auto_commit = Config.is_commits_enabled
- auto_checkout = Config.is_checkout_enabled
- self.__log.info("ADC configuration: [update_artifacts] %s, [auto-commit] %s, [auto-checkout] %s",
- update_artifacts, auto_commit, auto_checkout)
- if update_artifacts:
- try:
- update_interval = int(Config.artifact_update_interval)
- except ValueError:
- self.__log.exception("Invalid artifact sync interval specified: %s" % ValueError)
- update_interval = 10
-
- self.__log.info("Artifact updating task enabled, update interval: %s seconds" % update_interval)
-
- self.__log.info("Auto Commit is turned %s " % ("on" if auto_commit else "off"))
- self.__log.info("Auto Checkout is turned %s " % ("on" if auto_checkout else "off"))
-
- AgentGitHandler.schedule_artifact_update_task(
- repo_info,
- auto_checkout,
- auto_commit,
- update_interval)
-
- def on_instance_cleanup_cluster_event(self):
- self.__log.debug("Processing instance cleanup cluster event...")
- self.cleanup(constants.INSTANCE_CLEANUP_CLUSTER_EVENT)
-
- def on_instance_cleanup_member_event(self):
- self.__log.debug("Processing instance cleanup member event...")
- self.cleanup(constants.INSTANCE_CLEANUP_MEMBER_EVENT)
-
- def on_member_activated_event(self, member_activated_event):
- self.__log.debug("Processing Member activated event: [service] %r [cluster] %r [member] %r"
- % (member_activated_event.service_name,
- member_activated_event.cluster_id,
- member_activated_event.member_id))
-
- member_initialized = self.is_member_initialized_in_topology(
- member_activated_event.service_name,
- member_activated_event.cluster_id,
- member_activated_event.member_id)
-
- if not member_initialized:
- self.__log.error("Member has not initialized, failed to execute member activated event")
- return
-
- self.execute_event_extendables(constants.MEMBER_ACTIVATED_EVENT, {})
-
- def on_complete_topology_event(self, complete_topology_event):
- self.__log.debug("Processing Complete topology event...")
-
- service_name_in_payload = Config.service_name
- cluster_id_in_payload = Config.cluster_id
- member_id_in_payload = Config.member_id
-
- if not Config.initialized:
- member_initialized = self.is_member_initialized_in_topology(
- service_name_in_payload,
- cluster_id_in_payload,
- member_id_in_payload)
-
- if member_initialized:
- # Set cartridge agent as initialized since member is available and it is in initialized state
- Config.initialized = True
- self.__log.info("Member initialized [member id] %s, [cluster-id] %s, [service] %s" %
- (member_id_in_payload, cluster_id_in_payload, service_name_in_payload))
-
- topology = complete_topology_event.get_topology()
- service = topology.get_service(service_name_in_payload)
- if service is None:
- raise Exception("Service not found in topology [service] %s" % service_name_in_payload)
+ plugin_values = {"TENANT_LIST_JSON": json.dumps(tenant_list_json)}
- cluster = service.get_cluster(cluster_id_in_payload)
- if cluster is None:
- raise Exception("Cluster id not found in topology [cluster] %s" % cluster_id_in_payload)
-
- plugin_values = {"TOPOLOGY_JSON": json.dumps(topology.json_str),
- "MEMBER_LIST_JSON": json.dumps(cluster.member_list_json)}
-
- self.execute_event_extendables(constants.COMPLETE_TOPOLOGY_EVENT, plugin_values)
-
- def on_member_initialized_event(self, member_initialized_event):
- """
- Member initialized event is sent by cloud controller once volume attachment and
- ip address allocation is completed successfully
- :return:
- """
- self.__log.debug("Processing Member initialized event...")
- service_name_in_payload = Config.service_name
- cluster_id_in_payload = Config.cluster_id
- member_id_in_payload = Config.member_id
-
- if not Config.initialized and member_id_in_payload == member_initialized_event.member_id:
- member_exists = self.member_exists_in_topology(service_name_in_payload, cluster_id_in_payload,
- member_id_in_payload)
- self.__log.debug("Member exists: %s" % member_exists)
- if member_exists:
- Config.initialized = True
- self.mark_member_as_initialized(service_name_in_payload, cluster_id_in_payload, member_id_in_payload)
- self.__log.info("Instance marked as initialized on member initialized event")
- else:
- raise Exception("Member [member-id] %s not found in topology while processing member initialized "
- "event. [Topology] %s" % (member_id_in_payload, TopologyContext.get_topology()))
+ execute_event_extendables(constants.COMPLETE_TENANT_EVENT, plugin_values)
+
+
+def on_member_terminated_event(member_terminated_event):
+ log.debug(
+ "Processing Member terminated event: [service] %s [cluster] %s [member] %s"
+ % (member_terminated_event.service_name, member_terminated_event.cluster_id, member_terminated_event.member_id))
+
+ member_initialized = is_member_initialized_in_topology(
+ member_terminated_event.service_name,
+ member_terminated_event.cluster_id,
+ member_terminated_event.member_id
+ )
+
+ if not member_initialized:
+ log.error("Member has not initialized, failed to execute member terminated event")
+ return
+
+ execute_event_extendables(constants.MEMBER_TERMINATED_EVENT, {})
+
+
+def on_member_suspended_event(member_suspended_event):
+ log.debug(
+ "Processing Member suspended event: [service] %s [cluster] %s [member] %s"
+ % (member_suspended_event.service_name, member_suspended_event.cluster_id, member_suspended_event.member_id))
+
+ member_initialized = is_member_initialized_in_topology(
+ member_suspended_event.service_name,
+ member_suspended_event.cluster_id,
+ member_suspended_event.member_id
+ )
+
+ if not member_initialized:
+ log.error("Member has not initialized, failed to execute member suspended event")
+ return
+
+ execute_event_extendables(constants.MEMBER_SUSPENDED_EVENT, {})
+
+
+def on_member_started_event(member_started_event):
+ log.debug(
+ "Processing Member started event: [service] %s [cluster] %s [member] %s"
+ % (member_started_event.service_name, member_started_event.cluster_id, member_started_event.member_id))
+
+ member_initialized = is_member_initialized_in_topology(
+ member_started_event.service_name,
+ member_started_event.cluster_id,
+ member_started_event.member_id
+ )
+
+ if not member_initialized:
+ log.error("Member has not initialized, failed to execute member started event")
+ return
+
+ execute_event_extendables(constants.MEMBER_STARTED_EVENT, {})
+
+
+def start_server_extension():
+ log.debug("Processing start server extension...")
+ service_name_in_payload = Config.service_name
+ cluster_id_in_payload = Config.cluster_id
+ member_id_in_payload = Config.member_id
+ member_initialized = is_member_initialized_in_topology(
+ service_name_in_payload, cluster_id_in_payload, member_id_in_payload)
+
+ if not member_initialized:
+ log.error("Member has not initialized, failed to execute start server event")
+ return
+
+ execute_event_extendables("StartServers", {})
+
+
+def volume_mount_extension(persistence_mappings_payload):
+ log.debug("Processing volume mount extension...")
+ execute_event_extendables("VolumeMount", persistence_mappings_payload)
+
+
+def on_domain_mapping_added_event(domain_mapping_added_event):
+ tenant_domain = find_tenant_domain(domain_mapping_added_event.tenant_id)
+ log.debug(
+ "Processing Domain mapping added event: [tenant-id] " + str(domain_mapping_added_event.tenant_id) +
+ " [tenant-domain] " + tenant_domain + " [domain-name] " + domain_mapping_added_event.domain_name +
+ " [application-context] " + domain_mapping_added_event.application_context
+ )
+
+ plugin_values = {"SUBSCRIPTION_APPLICATION_ID": domain_mapping_added_event.application_id,
+ "SUBSCRIPTION_SERVICE_NAME": domain_mapping_added_event.service_name,
+ "SUBSCRIPTION_DOMAIN_NAME": domain_mapping_added_event.domain_name,
+ "SUBSCRIPTION_CLUSTER_ID": domain_mapping_added_event.cluster_id,
+ "SUBSCRIPTION_TENANT_ID": int(domain_mapping_added_event.tenant_id),
+ "SUBSCRIPTION_TENANT_DOMAIN": tenant_domain,
+ "SUBSCRIPTION_CONTEXT_PATH":
+ domain_mapping_added_event.context_path}
+
+ execute_event_extendables(constants.DOMAIN_MAPPING_ADDED_EVENT, plugin_values)
+
+
+def on_domain_mapping_removed_event(domain_mapping_removed_event):
+ tenant_domain = find_tenant_domain(domain_mapping_removed_event.tenant_id)
+ log.info(
+ "Domain mapping removed event received: [tenant-id] " + str(domain_mapping_removed_event.tenant_id) +
+ " [tenant-domain] " + tenant_domain + " [domain-name] " + domain_mapping_removed_event.domain_name
+ )
+
+ plugin_values = {"SUBSCRIPTION_APPLICATION_ID": domain_mapping_removed_event.application_id,
+ "SUBSCRIPTION_SERVICE_NAME": domain_mapping_removed_event.service_name,
+ "SUBSCRIPTION_DOMAIN_NAME": domain_mapping_removed_event.domain_name,
+ "SUBSCRIPTION_CLUSTER_ID": domain_mapping_removed_event.cluster_id,
+ "SUBSCRIPTION_TENANT_ID": int(domain_mapping_removed_event.tenant_id),
+ "SUBSCRIPTION_TENANT_DOMAIN": tenant_domain}
+
+ execute_event_extendables(constants.DOMAIN_MAPPING_REMOVED_EVENT, plugin_values)
+
+
+def on_copy_artifacts_extension(src, dest):
+ log.debug("Processing Copy artifacts extension...")
+ plugin_values = {"SOURCE": src, "DEST": dest}
+ execute_event_extendables("CopyArtifacts", plugin_values)
- self.execute_event_extendables(constants.MEMBER_INITIALIZED_EVENT, {})
-
- def on_complete_tenant_event(self, complete_tenant_event):
- self.__log.debug("Processing Complete tenant event...")
-
- tenant_list_json = complete_tenant_event.tenant_list_json
- self.__log.debug("Complete tenants:" + json.dumps(tenant_list_json))
-
- plugin_values = {"TENANT_LIST_JSON": json.dumps(tenant_list_json)}
-
- self.execute_event_extendables(constants.COMPLETE_TENANT_EVENT, plugin_values)
-
- def on_member_terminated_event(self, member_terminated_event):
- self.__log.debug("Processing Member terminated event: [service] %s [cluster] %s [member] %s" %
- (member_terminated_event.service_name, member_terminated_event.cluster_id,
- member_terminated_event.member_id))
-
- member_initialized = self.is_member_initialized_in_topology(
- member_terminated_event.service_name,
- member_terminated_event.cluster_id,
- member_terminated_event.member_id
- )
-
- if not member_initialized:
- self.__log.error("Member has not initialized, failed to execute member terminated event")
- return
-
- self.execute_event_extendables(constants.MEMBER_TERMINATED_EVENT, {})
-
- def on_member_suspended_event(self, member_suspended_event):
- self.__log.debug("Processing Member suspended event: [service] %s [cluster] %s [member] %s" %
- (member_suspended_event.service_name, member_suspended_event.cluster_id,
- member_suspended_event.member_id))
-
- member_initialized = self.is_member_initialized_in_topology(
- member_suspended_event.service_name,
- member_suspended_event.cluster_id,
- member_suspended_event.member_id
- )
-
- if not member_initialized:
- self.__log.error("Member has not initialized, failed to execute member suspended event")
- return
-
- self.execute_event_extendables(constants.MEMBER_SUSPENDED_EVENT, {})
-
- def on_member_started_event(self, member_started_event):
- self.__log.debug("Processing Member started event: [service] %s [cluster] %s [member] %s" %
- (member_started_event.service_name, member_started_event.cluster_id,
- member_started_event.member_id))
-
- member_initialized = self.is_member_initialized_in_topology(
- member_started_event.service_name,
- member_started_event.cluster_id,
- member_started_event.member_id
- )
-
- if not member_initialized:
- self.__log.error("Member has not initialized, failed to execute member started event")
- return
-
- self.execute_event_extendables(constants.MEMBER_STARTED_EVENT, {})
-
- def start_server_extension(self):
- self.__log.debug("Processing start server extension...")
- service_name_in_payload = Config.service_name
- cluster_id_in_payload = Config.cluster_id
- member_id_in_payload = Config.member_id
- member_initialized = self.is_member_initialized_in_topology(service_name_in_payload, cluster_id_in_payload,
- member_id_in_payload)
-
- if not member_initialized:
- self.__log.error("Member has not initialized, failed to execute start server event")
- return
-
- self.execute_event_extendables("StartServers", {})
-
- def volume_mount_extension(self, persistence_mappings_payload):
- self.__log.debug("Processing volume mount extension...")
- self.execute_event_extendables("VolumeMount", persistence_mappings_payload)
-
- def on_domain_mapping_added_event(self, domain_mapping_added_event):
- tenant_domain = EventHandler.find_tenant_domain(domain_mapping_added_event.tenant_id)
- self.__log.debug(
- "Processing Domain mapping added event: [tenant-id] " + str(domain_mapping_added_event.tenant_id) +
- " [tenant-domain] " + tenant_domain + " [domain-name] " + domain_mapping_added_event.domain_name +
- " [application-context] " + domain_mapping_added_event.application_context
- )
-
- plugin_values = {"SUBSCRIPTION_APPLICATION_ID": domain_mapping_added_event.application_id,
- "SUBSCRIPTION_SERVICE_NAME": domain_mapping_added_event.service_name,
- "SUBSCRIPTION_DOMAIN_NAME": domain_mapping_added_event.domain_name,
- "SUBSCRIPTION_CLUSTER_ID": domain_mapping_added_event.cluster_id,
- "SUBSCRIPTION_TENANT_ID": int(domain_mapping_added_event.tenant_id),
- "SUBSCRIPTION_TENANT_DOMAIN": tenant_domain,
- "SUBSCRIPTION_CONTEXT_PATH":
- domain_mapping_added_event.context_path}
-
- self.execute_event_extendables(constants.DOMAIN_MAPPING_ADDED_EVENT, plugin_values)
-
- def on_domain_mapping_removed_event(self, domain_mapping_removed_event):
- tenant_domain = EventHandler.find_tenant_domain(domain_mapping_removed_event.tenant_id)
- self.__log.info(
- "Domain mapping removed event received: [tenant-id] " + str(domain_mapping_removed_event.tenant_id) +
- " [tenant-domain] " + tenant_domain + " [domain-name] " + domain_mapping_removed_event.domain_name
- )
-
- plugin_values = {"SUBSCRIPTION_APPLICATION_ID": domain_mapping_removed_event.application_id,
- "SUBSCRIPTION_SERVICE_NAME": domain_mapping_removed_event.service_name,
- "SUBSCRIPTION_DOMAIN_NAME": domain_mapping_removed_event.domain_name,
- "SUBSCRIPTION_CLUSTER_ID": domain_mapping_removed_event.cluster_id,
- "SUBSCRIPTION_TENANT_ID": int(domain_mapping_removed_event.tenant_id),
- "SUBSCRIPTION_TENANT_DOMAIN": tenant_domain}
-
- self.execute_event_extendables(constants.DOMAIN_MAPPING_REMOVED_EVENT, plugin_values)
-
- def on_copy_artifacts_extension(self, src, dest):
- self.__log.debug("Processing Copy artifacts extension...")
- plugin_values = {"SOURCE": src, "DEST": dest}
- self.execute_event_extendables("CopyArtifacts", plugin_values)
-
- def on_tenant_subscribed_event(self, tenant_subscribed_event):
- self.__log.debug(
- "Processing Tenant subscribed event: [tenant] " + str(tenant_subscribed_event.tenant_id) +
- " [service] " + tenant_subscribed_event.service_name + " [cluster] " + tenant_subscribed_event.cluster_ids
- )
-
- self.execute_event_extendables(constants.TENANT_SUBSCRIBED_EVENT, {})
-
- def on_application_signup_removed_event(self, application_signup_removal_event):
- self.__log.debug(
- "Processing Tenant unsubscribed event: [tenant] " + str(application_signup_removal_event.tenantId) +
- " [application ID] " + str(application_signup_removal_event.applicationId)
- )
-
- if Config.application_id == application_signup_removal_event.applicationId:
- AgentGitHandler.remove_repo(application_signup_removal_event.tenantId)
-
- self.execute_event_extendables(constants.APPLICATION_SIGNUP_REMOVAL_EVENT, {})
-
- def cleanup(self, event):
- self.__log.debug("Executing cleanup extension for event %s..." % event)
- publisher.publish_maintenance_mode_event()
- self.execute_event_extendables("clean", {})
- publisher.publish_instance_ready_to_shutdown_event()
-
- def execute_event_extendables(self, event, input_values):
- """ Execute the extensions and plugins related to the event
- :param event: The event name string
- :param input_values: the values to be passed to the plugin
- :return:
- """
- try:
- input_values = EventHandler.add_common_input_values(input_values)
- except Exception as e:
- self.__log.error("Error while adding common input values for event extendables: %s" % e)
- input_values["EVENT"] = event
- self.__log.debug("Executing extensions for [event] %s with [input values] %s" % (event, input_values))
- # Execute the extension
- self.execute_extension_for_event(event, input_values)
- # Execute the plugins
- self.execute_plugins_for_event(event, input_values)
-
- def execute_plugins_for_event(self, event, input_values):
- """ For each plugin registered for the specified event, start a plugin execution thread
- :param str event: The event name string
- :param dict input_values: the values to be passed to the plugin
- :return:
- """
- try:
- plugins_for_event = Config.plugins.get(event)
- if plugins_for_event is not None:
- for plugin_info in plugins_for_event:
- self.__log.debug("Executing plugin %s for event %s" % (plugin_info.name, event))
- plugin_thread = PluginExecutor(plugin_info, input_values)
- plugin_thread.start()
-
- # block till plugin run completes.
- plugin_thread.join()
- else:
- self.__log.debug("No plugins registered for event %s" % event)
- except Exception as e:
- self.__log.exception("Error while executing plugin for event %s: %s" % (event, e))
-
- def execute_extension_for_event(self, event, extension_values):
- """ Execute the extension related to the event
- :param event: The event name string
- :param extension_values: the values to be passed to the plugin
- :return:
- """
- try:
- if Config.extension_executor is not None:
- self.__log.debug("Executing extension for event [%s]" % event)
- extension_thread = PluginExecutor(Config.extension_executor, extension_values)
- extension_thread.start()
+
+def on_tenant_subscribed_event(tenant_subscribed_event):
+ log.debug(
+ "Processing Tenant subscribed event: [tenant] " + str(tenant_subscribed_event.tenant_id) +
+ " [service] " + tenant_subscribed_event.service_name + " [cluster] " + tenant_subscribed_event.cluster_ids
+ )
+
+ execute_event_extendables(constants.TENANT_SUBSCRIBED_EVENT, {})
+
+
+def on_application_signup_removed_event(application_signup_removal_event):
+ log.debug(
+ "Processing Tenant unsubscribed event: [tenant] " + str(application_signup_removal_event.tenantId) +
+ " [application ID] " + str(application_signup_removal_event.applicationId)
+ )
+
+ if Config.application_id == application_signup_removal_event.applicationId:
+ AgentGitHandler.remove_repo(application_signup_removal_event.tenantId)
+
+ execute_event_extendables(constants.APPLICATION_SIGNUP_REMOVAL_EVENT, {})
+
+
+def cleanup(event):
+ log.debug("Executing cleanup extension for event %s..." % event)
+ publisher.publish_maintenance_mode_event()
+ execute_event_extendables("clean", {})
+ publisher.publish_instance_ready_to_shutdown_event()
+
+
+def execute_event_extendables(event, input_values):
+ """ Execute the extensions and plugins related to the event
+ :param event: The event name string
+ :param input_values: the values to be passed to the plugin
+ :return:
+ """
+ try:
+ input_values = add_common_input_values(input_values)
+ except Exception as e:
+ log.error("Error while adding common input values for event extendables: %s" % e)
+ input_values["EVENT"] = event
+ log.debug("Executing extensions for [event] %s with [input values] %s" % (event, input_values))
+ # Execute the extension
+ execute_extension_for_event(event, input_values)
+ # Execute the plugins
+ execute_plugins_for_event(event, input_values)
+
+
+def execute_plugins_for_event(event, input_values):
+ """ For each plugin registered for the specified event, start a plugin execution thread
+ :param str event: The event name string
+ :param dict input_values: the values to be passed to the plugin
+ :return:
+ """
+ try:
+ plugins_for_event = Config.plugins.get(event)
+ if plugins_for_event is not None:
+ for plugin_info in plugins_for_event:
+ log.debug("Executing plugin %s for event %s" % (plugin_info.name, event))
+ plugin_thread = PluginExecutor(plugin_info, input_values)
+ plugin_thread.start()
# block till plugin run completes.
- extension_thread.join()
- else:
- self.__log.debug("No extensions registered for event %s" % event)
- except OSError as e:
- self.__log.warn("No extension was found for event %s: %s" % (event, e))
- except Exception as e:
- self.__log.exception("Error while executing extension for event %s: %s" % (event, e))
-
- def get_repo_path_for_tenant(self, tenant_id, git_local_repo_path, is_multitenant):
- """ Finds the repository path for tenant to clone from the remote repository
- :param tenant_id:
- :param git_local_repo_path:
- :param is_multitenant:
- :return:
- """
- repo_path = ""
-
- if is_multitenant:
- if tenant_id == SUPER_TENANT_ID:
- # super tenant, /repository/deploy/server/
- super_tenant_repo_path = Config.super_tenant_repository_path
- # "app_path"
- repo_path += git_local_repo_path
-
- if super_tenant_repo_path is not None and super_tenant_repo_path != "":
- super_tenant_repo_path = super_tenant_repo_path if super_tenant_repo_path.startswith("/") \
- else "/" + super_tenant_repo_path
- super_tenant_repo_path = super_tenant_repo_path if super_tenant_repo_path.endswith("/") \
- else super_tenant_repo_path + "/"
- # "app_path/repository/deploy/server/"
- repo_path += super_tenant_repo_path
- else:
- # "app_path/repository/deploy/server/"
- repo_path += SUPER_TENANT_REPO_PATH
+ plugin_thread.join()
+ else:
+ log.debug("No plugins registered for event %s" % event)
+ except Exception as e:
+ log.exception("Error while executing plugin for event %s: %s" % (event, e))
+
+def execute_extension_for_event(event, extension_values):
+ """ Execute the extension related to the event
+ :param event: The event name string
+ :param extension_values: the values to be passed to the plugin
+ :return:
+ """
+ try:
+ if Config.extension_executor is not None:
+ log.debug("Executing extension for event [%s]" % event)
+ extension_thread = PluginExecutor(Config.extension_executor, extension_values)
+ extension_thread.start()
+
+ # block till plugin run completes.
+ extension_thread.join()
+ else:
+ log.debug("No extensions registered for event %s" % event)
+ except OSError as e:
+ log.warn("No extension was found for event %s: %s" % (event, e))
+ except Exception as e:
+ log.exception("Error while executing extension for event %s: %s" % (event, e))
+
+
+def get_repo_path_for_tenant(tenant_id, git_local_repo_path, is_multitenant):
+ """ Finds the repository path for tenant to clone from the remote repository
+ :param tenant_id:
+ :param git_local_repo_path:
+ :param is_multitenant:
+ :return:
+ """
+ repo_path = ""
+
+ if is_multitenant:
+ if tenant_id == SUPER_TENANT_ID:
+ # super tenant, /repository/deploy/server/
+ super_tenant_repo_path = Config.super_tenant_repository_path
+ # "app_path"
+ repo_path += git_local_repo_path
+
+ if super_tenant_repo_path is not None and super_tenant_repo_path != "":
+ super_tenant_repo_path = super_tenant_repo_path if super_tenant_repo_path.startswith("/") \
+ else "/" + super_tenant_repo_path
+ super_tenant_repo_path = super_tenant_repo_path if super_tenant_repo_path.endswith("/") \
+ else super_tenant_repo_path + "/"
+ # "app_path/repository/deploy/server/"
+ repo_path += super_tenant_repo_path
else:
- # normal tenant, /repository/tenants/tenant_id
- tenant_repo_path = Config.tenant_repository_path
- # "app_path"
- repo_path += git_local_repo_path
-
- if tenant_repo_path is not None and tenant_repo_path != "":
- tenant_repo_path = tenant_repo_path if tenant_repo_path.startswith("/") else "/" + tenant_repo_path
- tenant_repo_path = tenant_repo_path if tenant_repo_path.endswith("/") else tenant_repo_path + "/"
- # "app_path/repository/tenants/244653444"
- repo_path += tenant_repo_path + tenant_id
- else:
- # "app_path/repository/tenants/244653444"
- repo_path += TENANT_REPO_PATH + tenant_id
-
- # tenant_dir_path = git_local_repo_path + AgentGitHandler.TENANT_REPO_PATH + tenant_id
- # GitUtils.create_dir(repo_path)
+ # "app_path/repository/deploy/server/"
+ repo_path += SUPER_TENANT_REPO_PATH
+
else:
- # not multi tenant, app_path
- repo_path = git_local_repo_path
-
- self.__log.debug("Repo path returned : %r" % repo_path)
- return repo_path
-
- def is_member_initialized_in_topology(self, service_name, cluster_id, member_id):
- if self.member_exists_in_topology(service_name, cluster_id, member_id):
- topology = TopologyContext.get_topology()
- service = topology.get_service(service_name)
- if service is None:
- raise Exception("Service not found in topology [service] %s" % service_name)
-
- cluster = service.get_cluster(cluster_id)
- if cluster is None:
- raise Exception("Cluster id not found in topology [cluster] %s" % cluster_id)
-
- member = cluster.get_member(member_id)
- if member is None:
- raise Exception("Member id not found in topology [member] %s" % member_id)
-
- self.__log.info("Found member: " + member.to_json())
- if member.status == MemberStatus.Initialized:
- return True
- return False
+ # normal tenant, /repository/tenants/tenant_id
+ tenant_repo_path = Config.tenant_repository_path
+ # "app_path"
+ repo_path += git_local_repo_path
+
+ if tenant_repo_path is not None and tenant_repo_path != "":
+ tenant_repo_path = tenant_repo_path if tenant_repo_path.startswith("/") else "/" + tenant_repo_path
+ tenant_repo_path = tenant_repo_path if tenant_repo_path.endswith("/") else tenant_repo_path + "/"
+ # "app_path/repository/tenants/244653444"
+ repo_path += tenant_repo_path + tenant_id
+ else:
+ # "app_path/repository/tenants/244653444"
+ repo_path += TENANT_REPO_PATH + tenant_id
+
+ # tenant_dir_path = git_local_repo_path + AgentGitHandler.TENANT_REPO_PATH + tenant_id
+ # GitUtils.create_dir(repo_path)
+ else:
+ # not multi tenant, app_path
+ repo_path = git_local_repo_path
- def member_exists_in_topology(self, service_name, cluster_id, member_id):
+ log.debug("Repo path returned : %r" % repo_path)
+ return repo_path
+
+
+def is_member_initialized_in_topology(service_name, cluster_id, member_id):
+ if member_exists_in_topology(service_name, cluster_id, member_id):
topology = TopologyContext.get_topology()
service = topology.get_service(service_name)
if service is None:
@@ -519,131 +524,149 @@ class EventHandler:
if cluster is None:
raise Exception("Cluster id not found in topology [cluster] %s" % cluster_id)
- activated_member = cluster.get_member(member_id)
- if activated_member is None:
- self.__log.error("Member id not found in topology [member] %s" % member_id)
- return False
+ member = cluster.get_member(member_id)
+ if member is None:
+ raise Exception("Member id not found in topology [member] %s" % member_id)
- return True
+ log.info("Found member: " + member.to_json())
+ if member.status == MemberStatus.Initialized:
+ return True
+ return False
- @staticmethod
- def mark_member_as_initialized(service_name, cluster_id, member_id):
- topology = TopologyContext.get_topology()
- service = topology.get_service(service_name)
+
+def member_exists_in_topology(service_name, cluster_id, member_id):
+ topology = TopologyContext.get_topology()
+ service = topology.get_service(service_name)
+ if service is None:
+ raise Exception("Service not found in topology [service] %s" % service_name)
+
+ cluster = service.get_cluster(cluster_id)
+ if cluster is None:
+ raise Exception("Cluster id not found in topology [cluster] %s" % cluster_id)
+
+ activated_member = cluster.get_member(member_id)
+ if activated_member is None:
+ log.error("Member id not found in topology [member] %s" % member_id)
+ return False
+
+ return True
+
+
+def mark_member_as_initialized(service_name, cluster_id, member_id):
+ topology = TopologyContext.get_topology()
+ service = topology.get_service(service_name)
+ if service is None:
+ raise Exception("Service not found in topology [service] %s" % service_name)
+
+ cluster = service.get_cluster(cluster_id)
+ if cluster is None:
+ raise Exception("Cluster id not found in topology [cluster] %s" % cluster_id)
+
+ member = cluster.get_member(member_id)
+ if member is None:
+ raise Exception("Member id not found in topology [member] %s" % member_id)
+ member.status = MemberStatus.Initialized
+
+
+def add_common_input_values(plugin_values):
+ """
+ Adds the common parameters to be used by the extension scripts
+ :param dict[str, str] plugin_values: Dictionary to be added
+ :return: Dictionary with updated parameters
+ :rtype: dict[str, str]
+ """
+ if plugin_values is None:
+ plugin_values = {}
+ elif type(plugin_values) != dict:
+ plugin_values = {"VALUE1": str(plugin_values)}
+
+ plugin_values["APPLICATION_PATH"] = Config.app_path
+ plugin_values["PARAM_FILE_PATH"] = Config.read_property(constants.PARAM_FILE_PATH, False)
+ plugin_values["PERSISTENCE_MAPPINGS"] = Config.persistence_mappings
+
+ lb_cluster_id_in_payload = Config.lb_cluster_id
+ lb_private_ip, lb_public_ip = get_lb_member_ip(lb_cluster_id_in_payload)
+ plugin_values["LB_IP"] = lb_private_ip if lb_private_ip is not None else Config.lb_private_ip
+ plugin_values["LB_PUBLIC_IP"] = lb_public_ip if lb_public_ip is not None else Config.lb_public_ip
+
+ topology = TopologyContext.get_topology()
+ if topology.initialized:
+ service = topology.get_service(Config.service_name)
if service is None:
- raise Exception("Service not found in topology [service] %s" % service_name)
+ raise Exception("Service not found in topology [service] %s" % Config.service_name)
- cluster = service.get_cluster(cluster_id)
+ cluster = service.get_cluster(Config.cluster_id)
if cluster is None:
- raise Exception("Cluster id not found in topology [cluster] %s" % cluster_id)
+ raise Exception("Cluster id not found in topology [cluster] %s" % Config.cluster_id)
- member = cluster.get_member(member_id)
+ member = cluster.get_member(Config.member_id)
if member is None:
- raise Exception("Member id not found in topology [member] %s" % member_id)
- member.status = MemberStatus.Initialized
-
- @staticmethod
- def add_common_input_values(plugin_values):
- """
- Adds the common parameters to be used by the extension scripts
- :param dict[str, str] plugin_values: Dictionary to be added
- :return: Dictionary with updated parameters
- :rtype: dict[str, str]
- """
- if plugin_values is None:
- plugin_values = {}
- elif type(plugin_values) != dict:
- plugin_values = {"VALUE1": str(plugin_values)}
-
- plugin_values["APPLICATION_PATH"] = Config.app_path
- plugin_values["PARAM_FILE_PATH"] = Config.read_property(constants.PARAM_FILE_PATH, False)
- plugin_values["PERSISTENCE_MAPPINGS"] = Config.persistence_mappings
-
- lb_cluster_id_in_payload = Config.lb_cluster_id
- lb_private_ip, lb_public_ip = EventHandler.get_lb_member_ip(lb_cluster_id_in_payload)
- plugin_values["LB_IP"] = lb_private_ip if lb_private_ip is not None else Config.lb_private_ip
- plugin_values["LB_PUBLIC_IP"] = lb_public_ip if lb_public_ip is not None else Config.lb_public_ip
+ raise Exception("Member id not found in topology [member] %s" % Config.member_id)
- topology = TopologyContext.get_topology()
- if topology.initialized:
- service = topology.get_service(Config.service_name)
- if service is None:
- raise Exception("Service not found in topology [service] %s" % Config.service_name)
-
- cluster = service.get_cluster(Config.cluster_id)
- if cluster is None:
- raise Exception("Cluster id not found in topology [cluster] %s" % Config.cluster_id)
-
- member = cluster.get_member(Config.member_id)
- if member is None:
- raise Exception("Member id not found in topology [member] %s" % Config.member_id)
-
- EventHandler.add_properties(service.properties, plugin_values, "SERVICE_PROPERTY")
- EventHandler.add_properties(cluster.properties, plugin_values, "CLUSTER_PROPERTY")
- EventHandler.add_properties(member.properties, plugin_values, "MEMBER_PROPERTY")
-
- plugin_values.update(Config.get_payload_params())
-
- return EventHandler.clean_process_parameters(plugin_values)
-
- @staticmethod
- def add_properties(properties, params, prefix):
- """
- Adds the given property list to the parameters list with given prefix in the parameter name
- :param dict[str, str] properties: service properties
- :param dict[str, str] params:
- :param str prefix:
- :return: dict[str, str]
- """
- if properties is None or properties.items() is None:
- return
-
- for key in properties:
- params[prefix + "_" + key] = str(properties[key])
-
- @staticmethod
- def get_lb_member_ip(lb_cluster_id):
- topology = TopologyContext.get_topology()
- services = topology.get_services()
-
- for service in services:
- clusters = service.get_clusters()
- for cluster in clusters:
- members = cluster.get_members()
- for member in members:
- if member.cluster_id == lb_cluster_id:
- return member.member_default_private_ip, member.member_default_public_ip
-
- return None, None
-
- @staticmethod
- def clean_process_parameters(params):
- """
- Removes any null valued parameters before passing them to the extension scripts
- :param dict params:
- :return: cleaned parameters
- :rtype: dict
- """
- for key, value in params.items():
- if value is None:
- del params[key]
-
- return params
-
- @staticmethod
- def find_tenant_domain(tenant_id):
- tenant = TenantContext.get_tenant(tenant_id)
- if tenant is None:
- raise RuntimeError("Tenant could not be found: [tenant-id] %s" % str(tenant_id))
-
- return tenant.tenant_domain
-
- @staticmethod
- def validate_repo_path(app_path):
- # app path would be ex: /var/www, or /opt/server/data
- return os.access(app_path, os.W_OK)
+ add_properties(service.properties, plugin_values, "SERVICE_PROPERTY")
+ add_properties(cluster.properties, plugin_values, "CLUSTER_PROPERTY")
+ add_properties(member.properties, plugin_values, "MEMBER_PROPERTY")
+
+ plugin_values.update(Config.get_payload_params())
+
+ return clean_process_parameters(plugin_values)
+
+
+def add_properties(properties, params, prefix):
+ """
+ Adds the given property list to the parameters list with given prefix in the parameter name
+ :param dict[str, str] properties: service properties
+ :param dict[str, str] params:
+ :param str prefix:
+ :return: dict[str, str]
+ """
+ if properties is None or properties.items() is None:
+ return
+
+ for key in properties:
+ params[prefix + "_" + key] = str(properties[key])
+
+
+def get_lb_member_ip(lb_cluster_id):
+ topology = TopologyContext.get_topology()
+ services = topology.get_services()
+
+ for service in services:
+ clusters = service.get_clusters()
+ for cluster in clusters:
+ members = cluster.get_members()
+ for member in members:
+ if member.cluster_id == lb_cluster_id:
+ return member.member_default_private_ip, member.member_default_public_ip
+
+ return None, None
+
+
+def clean_process_parameters(params):
+ """
+ Removes any null valued parameters before passing them to the extension scripts
+ :param dict params:
+ :return: cleaned parameters
+ :rtype: dict
+ """
+ for key, value in params.items():
+ if value is None:
+ del params[key]
+
+ return params
+
+
+def find_tenant_domain(tenant_id):
+ tenant = TenantContext.get_tenant(tenant_id)
+ if tenant is None:
+ raise RuntimeError("Tenant could not be found: [tenant-id] %s" % str(tenant_id))
+
+ return tenant.tenant_domain
+def validate_repo_path(app_path):
+ # app path would be ex: /var/www, or /opt/server/data
+ return os.access(app_path, os.W_OK)
class PluginExecutor(Thread):
http://git-wip-us.apache.org/repos/asf/stratos/blob/f0740ec0/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/publisher.py
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/publisher.py b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/publisher.py
index a24650a..5b6190e 100644
--- a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/publisher.py
+++ b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/publisher.py
@@ -15,10 +15,10 @@
# specific language governing permissions and limitations
# under the License.
-import threading
-
+from threading import Thread
import paho.mqtt.publish as publish
import time
+from Queue import Queue, Empty
import constants
import healthstats
@@ -201,7 +201,7 @@ def get_publisher(topic):
return publishers[topic]
-class EventPublisher:
+class EventPublisher(object):
"""
Handles publishing events to topics to the provided message broker
"""
@@ -210,24 +210,9 @@ class EventPublisher:
self.__topic = topic
self.__log = LogFactory().get_log(__name__)
self.__start_time = int(time.time())
+ self.__msg_queue = Queue()
def publish(self, event):
- publisher_thread = threading.Thread(target=self.__publish_event, args=(event,))
- publisher_thread.start()
-
- def __publish_event(self, event):
- """
- Publishes the given event to the message broker.
-
- When a list of message brokers are given the event is published to the first message broker
- available. Therefore the message brokers should share the data (ex: Sharing the KahaDB in ActiveMQ).
-
- When the event cannot be published, it will be retried until the mb_publisher_timeout is exceeded.
- This value is set in the agent.conf.
-
- :param event:
- :return: True if the event was published.
- """
if Config.mb_username is None:
auth = None
else:
@@ -244,20 +229,59 @@ class EventPublisher:
for mb_url in Config.mb_urls:
mb_ip, mb_port = mb_url.split(":")
+ # start a thread to execute publish event
+ publisher_thread = Thread(target=self.__publish_event, args=(event, mb_ip, mb_port, auth, payload))
+ publisher_thread.start()
+
+ # give sometime for the thread to complete
+ time.sleep(5)
+
+ # check if thread is still running and notify
+ if publisher_thread.isAlive():
+ self.__log.debug(
+ "Event publishing timed out before succeeding. The message broker could be offline.")
+
+ # check if publish.single() succeeded
try:
- publish.single(self.__topic, payload, hostname=mb_ip, port=mb_port, auth=auth)
- self.__log.debug("Event type: %s published to MB: %s:%s" % (str(event.__class__), mb_ip, mb_port))
+ published = self.__msg_queue.get(block=False)
+ except Empty:
+ published = False
+
+ if published:
return True
- except:
- self.__log.debug(
- "Could not publish event to message broker %s:%s." % (mb_ip, mb_port))
+ # All the brokers on the list were offline
self.__log.debug(
"Could not publish event to any of the provided message brokers. Retrying in %s seconds."
% retry_interval)
time.sleep(retry_interval)
+ # Even publisher timeout exceeded
self.__log.warn("Could not publish event to any of the provided message brokers before "
"the timeout [%s] exceeded. The event will be dropped." % Config.mb_publisher_timeout)
return False
+
+ def __publish_event(self, event, mb_ip, mb_port, auth, payload):
+ """
+ Publishes the given event to the message broker.
+
+ When a list of message brokers are given the event is published to the first message broker
+ available. Therefore the message brokers should share the data (ex: Sharing the KahaDB in ActiveMQ).
+
+ When the event cannot be published, it will be retried until the mb_publisher_timeout is exceeded.
+ This value is set in the agent.conf.
+
+ :param event:
+ :return: True if the event was published.
+ """
+ try:
+ self.__log.debug("Publishing [event] %s to %s:%s" % (event.__class__.__name__, mb_ip, mb_port))
+ publish.single(self.__topic, payload, hostname=mb_ip, port=mb_port, auth=auth)
+ self.__log.debug("[Event] %s published to MB: %s:%s" % (str(event.__class__.__name__), mb_ip, mb_port))
+ self.__msg_queue.put(True)
+ except Exception as err:
+ self.__log.debug(
+ "Could not publish [event] %s to message broker %s:%s. : %s"
+ % (str(event.__class__.__name__), mb_ip, mb_port, err))
+ self.__msg_queue.put(False)
http://git-wip-us.apache.org/repos/asf/stratos/blob/f0740ec0/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/subscriber.py
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/subscriber.py b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/subscriber.py
index ff5cef9..c5a6d2d 100644
--- a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/subscriber.py
+++ b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/subscriber.py
@@ -178,7 +178,6 @@ class EventExecutor(threading.Thread):
def __init__(self, event_queue):
threading.Thread.__init__(self)
self.__event_queue = event_queue
- # TODO: several handlers for one event
self.__event_handlers = {}
EventSubscriber.log = LogFactory().get_log(__name__)
@@ -191,10 +190,9 @@ class EventExecutor(threading.Thread):
try:
EventSubscriber.log.debug("Executing handler for event %r" % event)
handler(event_msg)
- except:
- EventSubscriber.log.exception("Error processing %r event" % event)
+ except Exception as err:
+ EventSubscriber.log.exception("Error processing %r event: %s" % (event, err))
else:
-
EventSubscriber.log.debug("Event handler not found for event : %r" % event)
def register_event_handler(self, event, handler):
@@ -226,7 +224,7 @@ class MessageBrokerHeartBeatChecker(AbstractAsyncScheduledTask):
try:
self.__mb_client.connect(self.__mb_ip, self.__mb_port, 60)
self.__mb_client.disconnect()
- except:
+ except Exception:
self.__log.info(
"Message broker %s:%s cannot be reached. Disconnecting client..." % (self.__mb_ip, self.__mb_port))
self.__connected_client.disconnect()
http://git-wip-us.apache.org/repos/asf/stratos/blob/f0740ec0/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/ADCExtensionTestCase.java
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/ADCExtensionTestCase.java b/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/ADCExtensionTestCase.java
index 2398099..ab4975a 100644
--- a/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/ADCExtensionTestCase.java
+++ b/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/ADCExtensionTestCase.java
@@ -67,6 +67,11 @@ public class ADCExtensionTestCase extends PythonAgentIntegrationTest {
startServerSocket(8080);
}
+ @Override
+ protected String getClassName() {
+ return this.getClass().getSimpleName();
+ }
+
/**
* TearDown method for test method testPythonCartridgeAgent
*/
http://git-wip-us.apache.org/repos/asf/stratos/blob/f0740ec0/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/ADCMTAppTenantUserTestCase.java
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/ADCMTAppTenantUserTestCase.java b/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/ADCMTAppTenantUserTestCase.java
index 6e40dd6..05d5ba2 100644
--- a/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/ADCMTAppTenantUserTestCase.java
+++ b/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/ADCMTAppTenantUserTestCase.java
@@ -70,6 +70,11 @@ public class ADCMTAppTenantUserTestCase extends PythonAgentIntegrationTest {
startServerSocket(8080);
}
+ @Override
+ protected String getClassName() {
+ return this.getClass().getSimpleName();
+ }
+
/**
* TearDown method for test method testPythonCartridgeAgent
*/
http://git-wip-us.apache.org/repos/asf/stratos/blob/f0740ec0/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/ADCMTAppTestCase.java
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/ADCMTAppTestCase.java b/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/ADCMTAppTestCase.java
index 6f0b070..444a5e0 100644
--- a/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/ADCMTAppTestCase.java
+++ b/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/ADCMTAppTestCase.java
@@ -72,6 +72,11 @@ public class ADCMTAppTestCase extends PythonAgentIntegrationTest {
startServerSocket(8080);
}
+ @Override
+ protected String getClassName() {
+ return this.getClass().getSimpleName();
+ }
+
/**
* TearDown method for test method testPythonCartridgeAgent
*/
http://git-wip-us.apache.org/repos/asf/stratos/blob/f0740ec0/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/ADCTestCase.java
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/ADCTestCase.java b/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/ADCTestCase.java
index 0dc92be..dba6197 100755
--- a/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/ADCTestCase.java
+++ b/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/ADCTestCase.java
@@ -63,6 +63,11 @@ public class ADCTestCase extends PythonAgentIntegrationTest {
public ADCTestCase() throws IOException {
}
+ @Override
+ protected String getClassName() {
+ return this.getClass().getSimpleName();
+ }
+
@BeforeMethod(alwaysRun = true)
public void setupADCTest() throws Exception {
log.info("Setting up ADCTestCase");
http://git-wip-us.apache.org/repos/asf/stratos/blob/f0740ec0/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/AgentStartupTestCase.java
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/AgentStartupTestCase.java b/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/AgentStartupTestCase.java
index ea156b6..db21359 100755
--- a/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/AgentStartupTestCase.java
+++ b/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/AgentStartupTestCase.java
@@ -79,6 +79,11 @@ public class AgentStartupTestCase extends PythonAgentIntegrationTest {
startServerSocket(8080);
}
+ @Override
+ protected String getClassName() {
+ return this.getClass().getSimpleName();
+ }
+
/**
* TearDown method for test method testPythonCartridgeAgent
*/
http://git-wip-us.apache.org/repos/asf/stratos/blob/f0740ec0/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/CEPHAModeTestCase.java
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/CEPHAModeTestCase.java b/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/CEPHAModeTestCase.java
index 44d295b..ce13d3f 100644
--- a/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/CEPHAModeTestCase.java
+++ b/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/CEPHAModeTestCase.java
@@ -76,6 +76,11 @@ public class CEPHAModeTestCase extends PythonAgentIntegrationTest {
}
+ @Override
+ protected String getClassName() {
+ return this.getClass().getSimpleName();
+ }
+
@BeforeMethod(alwaysRun = true)
public void setupCEPHAModeTest() throws Exception {
http://git-wip-us.apache.org/repos/asf/stratos/blob/f0740ec0/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/MessageBrokerHATestCase.java
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/MessageBrokerHATestCase.java b/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/MessageBrokerHATestCase.java
index b1f4d8b..8c72f2d 100644
--- a/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/MessageBrokerHATestCase.java
+++ b/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/MessageBrokerHATestCase.java
@@ -42,6 +42,11 @@ public class MessageBrokerHATestCase extends PythonAgentIntegrationTest {
public MessageBrokerHATestCase() throws IOException {
}
+ @Override
+ protected String getClassName() {
+ return this.getClass().getSimpleName();
+ }
+
private static final Log log = LogFactory.getLog(MessageBrokerHATestCase.class);
private static final int HA_TEST_TIMEOUT = 300000;
private static final String CLUSTER_ID = "php.php.domain";
@@ -169,10 +174,11 @@ public class MessageBrokerHATestCase extends PythonAgentIntegrationTest {
MEMBER_ID);
publishEvent(instanceCleanupMemberEvent);
publishCleanupEvent = true;
- waitUntilCleanupEventIsReceivedAndStopDefaultMB();
+
+ stopActiveMQInstance("testBroker-" + amqpBindPorts[0] + "-" + mqttBindPorts[0]);
}
- if (line.contains("Could not publish event to message broker localhost:1885.")) {
+ if (line.contains("Could not publish [event] ")) {
log.info("Event publishing to default message broker failed and the next option is tried.");
exit = true;
}
@@ -186,26 +192,6 @@ public class MessageBrokerHATestCase extends PythonAgentIntegrationTest {
log.info("MessageBrokerHATestCase publisher test completed successfully.");
}
- private void waitUntilCleanupEventIsReceivedAndStopDefaultMB() {
- boolean eventReceived = false;
- List<String> outputLines = new ArrayList<>();
-
- while (!eventReceived) {
- List<String> newLines = getNewLines(outputLines, outputStream.toString());
- if (newLines.size() > 0) {
- for (String line : newLines) {
- if (line.contains("Message received: instance/notifier/InstanceCleanupMemberEvent")) {
- // take down the default broker
- stopActiveMQInstance("testBroker-" + amqpBindPorts[0] + "-" + mqttBindPorts[0]);
- eventReceived = true;
- }
- }
- }
- log.info("Waiting until cleanup event is received by PCA...");
- }
- log.info("Cleanup event is received by PCA.");
- }
-
private void assertAgentActivation() {
pcaActivated = false;
instanceActivated = false;
[44/50] [abbrv] stratos git commit: Revert "Preparing for the release
4.1.5"
Posted by ga...@apache.org.
Revert "Preparing for the release 4.1.5"
This reverts commit 41a2ea4166ba2cc5763e91226eac6e77abc80845.
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/b56891cf
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/b56891cf
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/b56891cf
Branch: refs/heads/release-4.1.5
Commit: b56891cf6c7e85bf81ae80912966e66bd30aea72
Parents: bd7d246
Author: gayangunarathne <ga...@wso2.com>
Authored: Mon Dec 7 10:07:53 2015 +0000
Committer: gayangunarathne <ga...@wso2.com>
Committed: Mon Dec 7 10:16:30 2015 +0000
----------------------------------------------------------------------
components/org.apache.stratos.autoscaler/pom.xml | 2 +-
components/org.apache.stratos.cartridge.agent/pom.xml | 2 +-
components/org.apache.stratos.cli/pom.xml | 2 +-
components/org.apache.stratos.cloud.controller/pom.xml | 2 +-
components/org.apache.stratos.common/pom.xml | 2 +-
components/org.apache.stratos.custom.handlers/pom.xml | 2 +-
components/org.apache.stratos.kubernetes.client/pom.xml | 2 +-
components/org.apache.stratos.load.balancer.common/pom.xml | 2 +-
.../org.apache.stratos.load.balancer.extension.api/pom.xml | 2 +-
components/org.apache.stratos.load.balancer/pom.xml | 2 +-
components/org.apache.stratos.manager.styles/pom.xml | 2 +-
components/org.apache.stratos.manager/pom.xml | 2 +-
components/org.apache.stratos.messaging/pom.xml | 2 +-
components/org.apache.stratos.metadata.client/pom.xml | 2 +-
components/org.apache.stratos.metadata.service/pom.xml | 2 +-
components/org.apache.stratos.mock.iaas.api/pom.xml | 2 +-
components/org.apache.stratos.mock.iaas.client/pom.xml | 2 +-
components/org.apache.stratos.mock.iaas/pom.xml | 2 +-
components/org.apache.stratos.python.cartridge.agent/pom.xml | 2 +-
components/org.apache.stratos.python.cli/pom.xml | 2 +-
components/org.apache.stratos.rest.endpoint/pom.xml | 2 +-
components/pom.xml | 4 ++--
dependencies/fabric8/kubernetes-api/pom.xml | 2 +-
dependencies/fabric8/pom.xml | 2 +-
dependencies/guice-assistedinject/pom.xml | 2 +-
dependencies/guice-multibindings/pom.xml | 2 +-
dependencies/guice/pom.xml | 2 +-
dependencies/jclouds/cloudstack/pom.xml | 2 +-
dependencies/jclouds/ec2/pom.xml | 2 +-
.../jclouds/google-jclouds-labs/google-cloud-storage/pom.xml | 2 +-
.../jclouds/google-jclouds-labs/google-compute-engine/pom.xml | 2 +-
dependencies/jclouds/google-jclouds-labs/googlecloud/pom.xml | 2 +-
dependencies/jclouds/google-jclouds-labs/oauth/pom.xml | 2 +-
dependencies/jclouds/google-jclouds-labs/pom.xml | 2 +-
dependencies/jclouds/jclouds-blobstore/pom.xml | 2 +-
dependencies/jclouds/jclouds-bouncycastle/pom.xml | 2 +-
dependencies/jclouds/jclouds-compute/pom.xml | 2 +-
dependencies/jclouds/jclouds-core/pom.xml | 2 +-
dependencies/jclouds/jclouds-enterprise/pom.xml | 2 +-
dependencies/jclouds/jclouds-joda/pom.xml | 2 +-
dependencies/jclouds/jclouds-netty/pom.xml | 2 +-
dependencies/jclouds/jclouds-sshj/pom.xml | 2 +-
dependencies/jclouds/openstack-common/pom.xml | 2 +-
dependencies/jclouds/openstack-keystone/pom.xml | 2 +-
dependencies/jclouds/openstack-neutron/pom.xml | 2 +-
dependencies/jclouds/openstack-nova/pom.xml | 2 +-
dependencies/jclouds/pom.xml | 2 +-
dependencies/jclouds/sts/pom.xml | 2 +-
dependencies/pom.xml | 2 +-
dependencies/rocoto/pom.xml | 2 +-
dependencies/sshj/pom.xml | 2 +-
extensions/cep/modules/distribution/pom.xml | 2 +-
.../cep/modules/stratos-cep-extension/wso2cep-3.0.0/pom.xml | 2 +-
.../cep/modules/stratos-cep-extension/wso2cep-3.1.0/pom.xml | 2 +-
extensions/cep/pom.xml | 2 +-
.../das/modules/artifacts/metering-dashboard/capps/pom.xml | 2 +-
.../das/modules/artifacts/monitoring-dashboard/capps/pom.xml | 2 +-
extensions/das/modules/distribution/pom.xml | 2 +-
extensions/das/modules/stratos-das-extension/pom.xml | 2 +-
extensions/das/pom.xml | 2 +-
extensions/load-balancer/modules/aws-extension/pom.xml | 2 +-
extensions/load-balancer/modules/haproxy-extension/pom.xml | 2 +-
extensions/load-balancer/modules/lvs-extension/pom.xml | 2 +-
extensions/load-balancer/modules/nginx-extension/pom.xml | 2 +-
extensions/load-balancer/pom.xml | 2 +-
extensions/pom.xml | 2 +-
.../autoscaler/org.apache.stratos.autoscaler.feature/pom.xml | 2 +-
features/autoscaler/pom.xml | 2 +-
features/cep/org.apache.stratos.event.processor.feature/pom.xml | 2 +-
.../org.apache.stratos.event.processor.server.feature/pom.xml | 2 +-
features/cep/pom.xml | 2 +-
.../org.apache.stratos.cloud.controller.feature/pom.xml | 2 +-
features/cloud-controller/pom.xml | 2 +-
features/common/org.apache.stratos.common.feature/pom.xml | 2 +-
features/common/org.apache.stratos.common.server.feature/pom.xml | 2 +-
.../common/org.apache.stratos.custom.handlers.feature/pom.xml | 2 +-
features/common/pom.xml | 2 +-
.../org.apache.stratos.load.balancer.common.feature/pom.xml | 2 +-
.../org.apache.stratos.load.balancer.feature/pom.xml | 2 +-
features/load-balancer/pom.xml | 2 +-
.../org.apache.stratos.metadata.client.feature/pom.xml | 2 +-
.../org.apache.stratos.metadata.service.feature/pom.xml | 2 +-
features/manager/pom.xml | 2 +-
.../org.apache.stratos.rest.endpoint.feature/pom.xml | 2 +-
.../stratos-mgt/org.apache.stratos.manager.feature/pom.xml | 2 +-
.../org.apache.stratos.manager.server.feature/pom.xml | 2 +-
features/manager/stratos-mgt/pom.xml | 2 +-
.../styles/org.apache.stratos.manager.styles.feature/pom.xml | 2 +-
features/messaging/org.apache.stratos.messaging.feature/pom.xml | 2 +-
features/messaging/pom.xml | 2 +-
.../mock-iaas/org.apache.stratos.mock.iaas.api.feature/pom.xml | 2 +-
features/mock-iaas/pom.xml | 2 +-
features/pom.xml | 2 +-
pom.xml | 2 +-
products/cartridge-agent/modules/distribution/pom.xml | 2 +-
products/cartridge-agent/pom.xml | 2 +-
products/load-balancer/modules/distribution/pom.xml | 2 +-
products/load-balancer/modules/p2-profile-gen/pom.xml | 2 +-
products/load-balancer/pom.xml | 2 +-
products/pom.xml | 2 +-
products/python-cartridge-agent/modules/distribution/pom.xml | 2 +-
products/python-cartridge-agent/modules/integration/pom.xml | 2 +-
.../modules/integration/test-common/pom.xml | 2 +-
.../modules/integration/test-integration/pom.xml | 2 +-
products/python-cartridge-agent/pom.xml | 2 +-
products/python-cli/modules/distribution/pom.xml | 2 +-
products/python-cli/pom.xml | 2 +-
products/stratos-cli/modules/distribution/pom.xml | 2 +-
products/stratos-cli/pom.xml | 2 +-
products/stratos/modules/distribution/pom.xml | 2 +-
products/stratos/modules/integration/pom.xml | 2 +-
products/stratos/modules/integration/test-common/pom.xml | 2 +-
products/stratos/modules/integration/test-integration/pom.xml | 2 +-
products/stratos/modules/p2-profile-gen/pom.xml | 2 +-
products/stratos/pom.xml | 2 +-
service-stubs/org.apache.stratos.autoscaler.service.stub/pom.xml | 2 +-
.../org.apache.stratos.cloud.controller.service.stub/pom.xml | 2 +-
service-stubs/org.apache.stratos.manager.service.stub/pom.xml | 2 +-
service-stubs/pom.xml | 2 +-
119 files changed, 120 insertions(+), 120 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/components/org.apache.stratos.autoscaler/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/pom.xml b/components/org.apache.stratos.autoscaler/pom.xml
index ad46636..1a74b82 100644
--- a/components/org.apache.stratos.autoscaler/pom.xml
+++ b/components/org.apache.stratos.autoscaler/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-components-parent</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>org.apache.stratos.autoscaler</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/components/org.apache.stratos.cartridge.agent/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cartridge.agent/pom.xml b/components/org.apache.stratos.cartridge.agent/pom.xml
index 013ecc4..0f45bbf 100644
--- a/components/org.apache.stratos.cartridge.agent/pom.xml
+++ b/components/org.apache.stratos.cartridge.agent/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-components-parent</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>org.apache.stratos.cartridge.agent</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/components/org.apache.stratos.cli/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/pom.xml b/components/org.apache.stratos.cli/pom.xml
index 85b2293..e05709a 100644
--- a/components/org.apache.stratos.cli/pom.xml
+++ b/components/org.apache.stratos.cli/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-components-parent</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>org.apache.stratos.cli</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/components/org.apache.stratos.cloud.controller/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/pom.xml b/components/org.apache.stratos.cloud.controller/pom.xml
index 923c58f..953d034 100644
--- a/components/org.apache.stratos.cloud.controller/pom.xml
+++ b/components/org.apache.stratos.cloud.controller/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-components-parent</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>org.apache.stratos.cloud.controller</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/components/org.apache.stratos.common/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/pom.xml b/components/org.apache.stratos.common/pom.xml
index 4521c5b..64d93f3 100644
--- a/components/org.apache.stratos.common/pom.xml
+++ b/components/org.apache.stratos.common/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-components-parent</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>org.apache.stratos.common</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/components/org.apache.stratos.custom.handlers/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.custom.handlers/pom.xml b/components/org.apache.stratos.custom.handlers/pom.xml
index 10b679d..c4e3218 100644
--- a/components/org.apache.stratos.custom.handlers/pom.xml
+++ b/components/org.apache.stratos.custom.handlers/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-components-parent</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>org.apache.stratos.custom.handlers</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/components/org.apache.stratos.kubernetes.client/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.kubernetes.client/pom.xml b/components/org.apache.stratos.kubernetes.client/pom.xml
index 31b9c54..38c45bd 100644
--- a/components/org.apache.stratos.kubernetes.client/pom.xml
+++ b/components/org.apache.stratos.kubernetes.client/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-components-parent</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>org.apache.stratos.kubernetes.client</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/components/org.apache.stratos.load.balancer.common/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.load.balancer.common/pom.xml b/components/org.apache.stratos.load.balancer.common/pom.xml
index bd5df24..27626c1 100644
--- a/components/org.apache.stratos.load.balancer.common/pom.xml
+++ b/components/org.apache.stratos.load.balancer.common/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-components-parent</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>org.apache.stratos.load.balancer.common</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/components/org.apache.stratos.load.balancer.extension.api/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.load.balancer.extension.api/pom.xml b/components/org.apache.stratos.load.balancer.extension.api/pom.xml
index d3e94be..ec765e1 100644
--- a/components/org.apache.stratos.load.balancer.extension.api/pom.xml
+++ b/components/org.apache.stratos.load.balancer.extension.api/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-components-parent</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>org.apache.stratos.load.balancer.extension.api</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/components/org.apache.stratos.load.balancer/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.load.balancer/pom.xml b/components/org.apache.stratos.load.balancer/pom.xml
index 44e16fe..498d848 100644
--- a/components/org.apache.stratos.load.balancer/pom.xml
+++ b/components/org.apache.stratos.load.balancer/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-components-parent</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>org.apache.stratos.load.balancer</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/components/org.apache.stratos.manager.styles/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.styles/pom.xml b/components/org.apache.stratos.manager.styles/pom.xml
index ca08a9a..3c1f8d8 100644
--- a/components/org.apache.stratos.manager.styles/pom.xml
+++ b/components/org.apache.stratos.manager.styles/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-components-parent</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/components/org.apache.stratos.manager/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/pom.xml b/components/org.apache.stratos.manager/pom.xml
index b2b3b1d..8eb64cc 100644
--- a/components/org.apache.stratos.manager/pom.xml
+++ b/components/org.apache.stratos.manager/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-components-parent</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>org.apache.stratos.manager</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/components/org.apache.stratos.messaging/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/pom.xml b/components/org.apache.stratos.messaging/pom.xml
index 73aaa4f..3f2089a 100644
--- a/components/org.apache.stratos.messaging/pom.xml
+++ b/components/org.apache.stratos.messaging/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-components-parent</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>org.apache.stratos.messaging</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/components/org.apache.stratos.metadata.client/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.metadata.client/pom.xml b/components/org.apache.stratos.metadata.client/pom.xml
index a8d310e..f280c09 100644
--- a/components/org.apache.stratos.metadata.client/pom.xml
+++ b/components/org.apache.stratos.metadata.client/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-components-parent</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>org.apache.stratos.metadata.client</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/components/org.apache.stratos.metadata.service/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.metadata.service/pom.xml b/components/org.apache.stratos.metadata.service/pom.xml
index 23b4e77..12f8c72 100644
--- a/components/org.apache.stratos.metadata.service/pom.xml
+++ b/components/org.apache.stratos.metadata.service/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-components-parent</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>org.apache.stratos.metadata.service</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/components/org.apache.stratos.mock.iaas.api/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.mock.iaas.api/pom.xml b/components/org.apache.stratos.mock.iaas.api/pom.xml
index 0e45ad5..b88c6c2 100644
--- a/components/org.apache.stratos.mock.iaas.api/pom.xml
+++ b/components/org.apache.stratos.mock.iaas.api/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-components-parent</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>org.apache.stratos.mock.iaas.api</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/components/org.apache.stratos.mock.iaas.client/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.mock.iaas.client/pom.xml b/components/org.apache.stratos.mock.iaas.client/pom.xml
index c4f0b16..4fe9b57 100644
--- a/components/org.apache.stratos.mock.iaas.client/pom.xml
+++ b/components/org.apache.stratos.mock.iaas.client/pom.xml
@@ -23,7 +23,7 @@
<parent>
<artifactId>stratos-components-parent</artifactId>
<groupId>org.apache.stratos</groupId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>org.apache.stratos.mock.iaas.client</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/components/org.apache.stratos.mock.iaas/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.mock.iaas/pom.xml b/components/org.apache.stratos.mock.iaas/pom.xml
index 5dbb5ec..cc11078 100644
--- a/components/org.apache.stratos.mock.iaas/pom.xml
+++ b/components/org.apache.stratos.mock.iaas/pom.xml
@@ -23,7 +23,7 @@
<parent>
<artifactId>stratos-components-parent</artifactId>
<groupId>org.apache.stratos</groupId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>org.apache.stratos.mock.iaas</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/components/org.apache.stratos.python.cartridge.agent/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent/pom.xml b/components/org.apache.stratos.python.cartridge.agent/pom.xml
index 2c1b7dd..1ea6aa7 100644
--- a/components/org.apache.stratos.python.cartridge.agent/pom.xml
+++ b/components/org.apache.stratos.python.cartridge.agent/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-components-parent</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>org.apache.stratos.python.cartridge.agent</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/components/org.apache.stratos.python.cli/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cli/pom.xml b/components/org.apache.stratos.python.cli/pom.xml
index 7719fa0..ab6411e 100644
--- a/components/org.apache.stratos.python.cli/pom.xml
+++ b/components/org.apache.stratos.python.cli/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-components-parent</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>org.apache.stratos.python.cli</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/components/org.apache.stratos.rest.endpoint/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/pom.xml b/components/org.apache.stratos.rest.endpoint/pom.xml
index 0f02d4c..2aaeada 100644
--- a/components/org.apache.stratos.rest.endpoint/pom.xml
+++ b/components/org.apache.stratos.rest.endpoint/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-components-parent</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>org.apache.stratos.rest.endpoint</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/components/pom.xml
----------------------------------------------------------------------
diff --git a/components/pom.xml b/components/pom.xml
index 8e883fe..540bd9d 100644
--- a/components/pom.xml
+++ b/components/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-parent</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>stratos-components-parent</artifactId>
@@ -93,4 +93,4 @@
</build>
</profile>
</profiles>
-</project>
+</project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/dependencies/fabric8/kubernetes-api/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/fabric8/kubernetes-api/pom.xml b/dependencies/fabric8/kubernetes-api/pom.xml
index 14fecb8..d60c976 100644
--- a/dependencies/fabric8/kubernetes-api/pom.xml
+++ b/dependencies/fabric8/kubernetes-api/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-dependencies-fabric8</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>kubernetes-api</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/dependencies/fabric8/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/fabric8/pom.xml b/dependencies/fabric8/pom.xml
index f924b56..ba0ebe6 100644
--- a/dependencies/fabric8/pom.xml
+++ b/dependencies/fabric8/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-dependents</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>stratos-dependencies-fabric8</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/dependencies/guice-assistedinject/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/guice-assistedinject/pom.xml b/dependencies/guice-assistedinject/pom.xml
index 200b8ff..76185af 100644
--- a/dependencies/guice-assistedinject/pom.xml
+++ b/dependencies/guice-assistedinject/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-dependents</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>guice-assistedinject</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/dependencies/guice-multibindings/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/guice-multibindings/pom.xml b/dependencies/guice-multibindings/pom.xml
index 6f3785e..3d002e3 100644
--- a/dependencies/guice-multibindings/pom.xml
+++ b/dependencies/guice-multibindings/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-dependents</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>guice-multibindings</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/dependencies/guice/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/guice/pom.xml b/dependencies/guice/pom.xml
index 34002c0..89cf949 100644
--- a/dependencies/guice/pom.xml
+++ b/dependencies/guice/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-dependents</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>guice</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/dependencies/jclouds/cloudstack/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/cloudstack/pom.xml b/dependencies/jclouds/cloudstack/pom.xml
index 78ef876..2b95424 100644
--- a/dependencies/jclouds/cloudstack/pom.xml
+++ b/dependencies/jclouds/cloudstack/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-dependencies-jclouds</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>cloudstack</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/dependencies/jclouds/ec2/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/ec2/pom.xml b/dependencies/jclouds/ec2/pom.xml
index 6b0f1a4..1a8ec6c 100644
--- a/dependencies/jclouds/ec2/pom.xml
+++ b/dependencies/jclouds/ec2/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-dependencies-jclouds</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>ec2</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/dependencies/jclouds/google-jclouds-labs/google-cloud-storage/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/google-jclouds-labs/google-cloud-storage/pom.xml b/dependencies/jclouds/google-jclouds-labs/google-cloud-storage/pom.xml
index 5d4ba39..021d587 100644
--- a/dependencies/jclouds/google-jclouds-labs/google-cloud-storage/pom.xml
+++ b/dependencies/jclouds/google-jclouds-labs/google-cloud-storage/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>google-jclouds-labs</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>google-cloud-storage</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/dependencies/jclouds/google-jclouds-labs/google-compute-engine/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/google-jclouds-labs/google-compute-engine/pom.xml b/dependencies/jclouds/google-jclouds-labs/google-compute-engine/pom.xml
index 0133f97..0af4e36 100644
--- a/dependencies/jclouds/google-jclouds-labs/google-compute-engine/pom.xml
+++ b/dependencies/jclouds/google-jclouds-labs/google-compute-engine/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>google-jclouds-labs</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>google-compute-engine</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/dependencies/jclouds/google-jclouds-labs/googlecloud/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/google-jclouds-labs/googlecloud/pom.xml b/dependencies/jclouds/google-jclouds-labs/googlecloud/pom.xml
index aa93fb2..5d4dea5 100644
--- a/dependencies/jclouds/google-jclouds-labs/googlecloud/pom.xml
+++ b/dependencies/jclouds/google-jclouds-labs/googlecloud/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>google-jclouds-labs</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>googlecloud</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/dependencies/jclouds/google-jclouds-labs/oauth/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/google-jclouds-labs/oauth/pom.xml b/dependencies/jclouds/google-jclouds-labs/oauth/pom.xml
index 6d6b812..2eac9c0 100644
--- a/dependencies/jclouds/google-jclouds-labs/oauth/pom.xml
+++ b/dependencies/jclouds/google-jclouds-labs/oauth/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>google-jclouds-labs</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>oauth</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/dependencies/jclouds/google-jclouds-labs/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/google-jclouds-labs/pom.xml b/dependencies/jclouds/google-jclouds-labs/pom.xml
index 44ef8e0..3ef4ec5 100644
--- a/dependencies/jclouds/google-jclouds-labs/pom.xml
+++ b/dependencies/jclouds/google-jclouds-labs/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-dependencies-jclouds</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>google-jclouds-labs</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/dependencies/jclouds/jclouds-blobstore/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/jclouds-blobstore/pom.xml b/dependencies/jclouds/jclouds-blobstore/pom.xml
index 5f928d2..c831798 100644
--- a/dependencies/jclouds/jclouds-blobstore/pom.xml
+++ b/dependencies/jclouds/jclouds-blobstore/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-dependencies-jclouds</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>jclouds-blobstore</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/dependencies/jclouds/jclouds-bouncycastle/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/jclouds-bouncycastle/pom.xml b/dependencies/jclouds/jclouds-bouncycastle/pom.xml
index 656a5a4..c4be8ec 100644
--- a/dependencies/jclouds/jclouds-bouncycastle/pom.xml
+++ b/dependencies/jclouds/jclouds-bouncycastle/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-dependencies-jclouds</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>jclouds-bouncycastle</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/dependencies/jclouds/jclouds-compute/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/jclouds-compute/pom.xml b/dependencies/jclouds/jclouds-compute/pom.xml
index aa3a59c..a07126d 100644
--- a/dependencies/jclouds/jclouds-compute/pom.xml
+++ b/dependencies/jclouds/jclouds-compute/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-dependencies-jclouds</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>jclouds-compute</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/dependencies/jclouds/jclouds-core/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/jclouds-core/pom.xml b/dependencies/jclouds/jclouds-core/pom.xml
index 9620525..4e5ac81 100644
--- a/dependencies/jclouds/jclouds-core/pom.xml
+++ b/dependencies/jclouds/jclouds-core/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-dependencies-jclouds</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>jclouds-core</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/dependencies/jclouds/jclouds-enterprise/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/jclouds-enterprise/pom.xml b/dependencies/jclouds/jclouds-enterprise/pom.xml
index ba2d34b..5401ad4 100644
--- a/dependencies/jclouds/jclouds-enterprise/pom.xml
+++ b/dependencies/jclouds/jclouds-enterprise/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-dependencies-jclouds</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>jclouds-enterprise</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/dependencies/jclouds/jclouds-joda/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/jclouds-joda/pom.xml b/dependencies/jclouds/jclouds-joda/pom.xml
index b02b536..55f3e25 100644
--- a/dependencies/jclouds/jclouds-joda/pom.xml
+++ b/dependencies/jclouds/jclouds-joda/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-dependencies-jclouds</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>jclouds-joda</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/dependencies/jclouds/jclouds-netty/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/jclouds-netty/pom.xml b/dependencies/jclouds/jclouds-netty/pom.xml
index 58ab5dd..0598a82 100644
--- a/dependencies/jclouds/jclouds-netty/pom.xml
+++ b/dependencies/jclouds/jclouds-netty/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-dependencies-jclouds</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>jclouds-netty</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/dependencies/jclouds/jclouds-sshj/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/jclouds-sshj/pom.xml b/dependencies/jclouds/jclouds-sshj/pom.xml
index 4ad8f0d..8f147b3 100644
--- a/dependencies/jclouds/jclouds-sshj/pom.xml
+++ b/dependencies/jclouds/jclouds-sshj/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-dependencies-jclouds</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>jclouds-sshj</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/dependencies/jclouds/openstack-common/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/openstack-common/pom.xml b/dependencies/jclouds/openstack-common/pom.xml
index bd56e1a..25041f4 100644
--- a/dependencies/jclouds/openstack-common/pom.xml
+++ b/dependencies/jclouds/openstack-common/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-dependencies-jclouds</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>openstack-common</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/dependencies/jclouds/openstack-keystone/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/openstack-keystone/pom.xml b/dependencies/jclouds/openstack-keystone/pom.xml
index 940bf0e..7a532c8 100644
--- a/dependencies/jclouds/openstack-keystone/pom.xml
+++ b/dependencies/jclouds/openstack-keystone/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-dependencies-jclouds</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>openstack-keystone</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/dependencies/jclouds/openstack-neutron/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/openstack-neutron/pom.xml b/dependencies/jclouds/openstack-neutron/pom.xml
index 8f91b9d..e45b860 100644
--- a/dependencies/jclouds/openstack-neutron/pom.xml
+++ b/dependencies/jclouds/openstack-neutron/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-dependencies-jclouds</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>openstack-neutron</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/dependencies/jclouds/openstack-nova/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/openstack-nova/pom.xml b/dependencies/jclouds/openstack-nova/pom.xml
index 854bdda..328fc4e 100644
--- a/dependencies/jclouds/openstack-nova/pom.xml
+++ b/dependencies/jclouds/openstack-nova/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-dependencies-jclouds</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>openstack-nova</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/dependencies/jclouds/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/pom.xml b/dependencies/jclouds/pom.xml
index 3c11e6e..e84984f 100644
--- a/dependencies/jclouds/pom.xml
+++ b/dependencies/jclouds/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-dependents</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>stratos-dependencies-jclouds</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/dependencies/jclouds/sts/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/sts/pom.xml b/dependencies/jclouds/sts/pom.xml
index 73254dd..1785224 100644
--- a/dependencies/jclouds/sts/pom.xml
+++ b/dependencies/jclouds/sts/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-dependencies-jclouds</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>sts</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/dependencies/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/pom.xml b/dependencies/pom.xml
index 63323a4..9d8e420 100644
--- a/dependencies/pom.xml
+++ b/dependencies/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-parent</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>stratos-dependents</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/dependencies/rocoto/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/rocoto/pom.xml b/dependencies/rocoto/pom.xml
index d1be336..4f8072d 100644
--- a/dependencies/rocoto/pom.xml
+++ b/dependencies/rocoto/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-dependents</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>rocoto</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/dependencies/sshj/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/sshj/pom.xml b/dependencies/sshj/pom.xml
index 688f71e..74740d6 100644
--- a/dependencies/sshj/pom.xml
+++ b/dependencies/sshj/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-dependents</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>net.schmizz.sshj</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/extensions/cep/modules/distribution/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/cep/modules/distribution/pom.xml b/extensions/cep/modules/distribution/pom.xml
index 5c0e1c5..b1266f9 100644
--- a/extensions/cep/modules/distribution/pom.xml
+++ b/extensions/cep/modules/distribution/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>cep-extensions</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/extensions/cep/modules/stratos-cep-extension/wso2cep-3.0.0/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/cep/modules/stratos-cep-extension/wso2cep-3.0.0/pom.xml b/extensions/cep/modules/stratos-cep-extension/wso2cep-3.0.0/pom.xml
index a687c7d..a455bcf 100644
--- a/extensions/cep/modules/stratos-cep-extension/wso2cep-3.0.0/pom.xml
+++ b/extensions/cep/modules/stratos-cep-extension/wso2cep-3.0.0/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>cep-extensions</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/extensions/cep/modules/stratos-cep-extension/wso2cep-3.1.0/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/cep/modules/stratos-cep-extension/wso2cep-3.1.0/pom.xml b/extensions/cep/modules/stratos-cep-extension/wso2cep-3.1.0/pom.xml
index 4297c09..8208571 100644
--- a/extensions/cep/modules/stratos-cep-extension/wso2cep-3.1.0/pom.xml
+++ b/extensions/cep/modules/stratos-cep-extension/wso2cep-3.1.0/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>cep-extensions</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/extensions/cep/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/cep/pom.xml b/extensions/cep/pom.xml
index 4d9fa76..b746075 100644
--- a/extensions/cep/pom.xml
+++ b/extensions/cep/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-extensions</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>cep-extensions</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/extensions/das/modules/artifacts/metering-dashboard/capps/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/pom.xml b/extensions/das/modules/artifacts/metering-dashboard/capps/pom.xml
index 4221521..dacc1da 100644
--- a/extensions/das/modules/artifacts/metering-dashboard/capps/pom.xml
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/pom.xml
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>das-extension</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/extensions/das/modules/artifacts/monitoring-dashboard/capps/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/monitoring-dashboard/capps/pom.xml b/extensions/das/modules/artifacts/monitoring-dashboard/capps/pom.xml
index 3e69f60..18c375e 100644
--- a/extensions/das/modules/artifacts/monitoring-dashboard/capps/pom.xml
+++ b/extensions/das/modules/artifacts/monitoring-dashboard/capps/pom.xml
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>das-extension</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/extensions/das/modules/distribution/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/das/modules/distribution/pom.xml b/extensions/das/modules/distribution/pom.xml
index cfb212c..43e6b8a 100644
--- a/extensions/das/modules/distribution/pom.xml
+++ b/extensions/das/modules/distribution/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>das-extension</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/extensions/das/modules/stratos-das-extension/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/das/modules/stratos-das-extension/pom.xml b/extensions/das/modules/stratos-das-extension/pom.xml
index 0cc4985..e7d9053 100644
--- a/extensions/das/modules/stratos-das-extension/pom.xml
+++ b/extensions/das/modules/stratos-das-extension/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>das-extension</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/extensions/das/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/das/pom.xml b/extensions/das/pom.xml
index c2af510..e81a68b 100644
--- a/extensions/das/pom.xml
+++ b/extensions/das/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-extensions</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/extensions/load-balancer/modules/aws-extension/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/load-balancer/modules/aws-extension/pom.xml b/extensions/load-balancer/modules/aws-extension/pom.xml
index c3cf5dc..36dc5c8 100644
--- a/extensions/load-balancer/modules/aws-extension/pom.xml
+++ b/extensions/load-balancer/modules/aws-extension/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-load-balancer-extensions</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/extensions/load-balancer/modules/haproxy-extension/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/load-balancer/modules/haproxy-extension/pom.xml b/extensions/load-balancer/modules/haproxy-extension/pom.xml
index a1e39b2..5f42132 100644
--- a/extensions/load-balancer/modules/haproxy-extension/pom.xml
+++ b/extensions/load-balancer/modules/haproxy-extension/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-load-balancer-extensions</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/extensions/load-balancer/modules/lvs-extension/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/load-balancer/modules/lvs-extension/pom.xml b/extensions/load-balancer/modules/lvs-extension/pom.xml
index a85a2f1..e100c70 100644
--- a/extensions/load-balancer/modules/lvs-extension/pom.xml
+++ b/extensions/load-balancer/modules/lvs-extension/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-load-balancer-extensions</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/extensions/load-balancer/modules/nginx-extension/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/load-balancer/modules/nginx-extension/pom.xml b/extensions/load-balancer/modules/nginx-extension/pom.xml
index 5cd94e3..71989d1 100644
--- a/extensions/load-balancer/modules/nginx-extension/pom.xml
+++ b/extensions/load-balancer/modules/nginx-extension/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-load-balancer-extensions</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/extensions/load-balancer/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/load-balancer/pom.xml b/extensions/load-balancer/pom.xml
index 37455f4..f11ef0b 100644
--- a/extensions/load-balancer/pom.xml
+++ b/extensions/load-balancer/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-extensions</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>stratos-load-balancer-extensions</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/extensions/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/pom.xml b/extensions/pom.xml
index fc86407..197c31c 100644
--- a/extensions/pom.xml
+++ b/extensions/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-parent</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>stratos-extensions</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/features/autoscaler/org.apache.stratos.autoscaler.feature/pom.xml
----------------------------------------------------------------------
diff --git a/features/autoscaler/org.apache.stratos.autoscaler.feature/pom.xml b/features/autoscaler/org.apache.stratos.autoscaler.feature/pom.xml
index d3f4e4a..6534a26 100644
--- a/features/autoscaler/org.apache.stratos.autoscaler.feature/pom.xml
+++ b/features/autoscaler/org.apache.stratos.autoscaler.feature/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>autoscaler-features</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/features/autoscaler/pom.xml
----------------------------------------------------------------------
diff --git a/features/autoscaler/pom.xml b/features/autoscaler/pom.xml
index 4abb0f2..b5d81b4 100644
--- a/features/autoscaler/pom.xml
+++ b/features/autoscaler/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-features-parent</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>autoscaler-features</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/features/cep/org.apache.stratos.event.processor.feature/pom.xml
----------------------------------------------------------------------
diff --git a/features/cep/org.apache.stratos.event.processor.feature/pom.xml b/features/cep/org.apache.stratos.event.processor.feature/pom.xml
index dd3f3e6..1ccca10 100644
--- a/features/cep/org.apache.stratos.event.processor.feature/pom.xml
+++ b/features/cep/org.apache.stratos.event.processor.feature/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>cep-features</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/features/cep/org.apache.stratos.event.processor.server.feature/pom.xml
----------------------------------------------------------------------
diff --git a/features/cep/org.apache.stratos.event.processor.server.feature/pom.xml b/features/cep/org.apache.stratos.event.processor.server.feature/pom.xml
index 37f47cf..06a5d61 100644
--- a/features/cep/org.apache.stratos.event.processor.server.feature/pom.xml
+++ b/features/cep/org.apache.stratos.event.processor.server.feature/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>cep-features</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/features/cep/pom.xml
----------------------------------------------------------------------
diff --git a/features/cep/pom.xml b/features/cep/pom.xml
index 2f9745b..aabdf6c 100644
--- a/features/cep/pom.xml
+++ b/features/cep/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-features-parent</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>cep-features</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/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 ce05a41..3befc3d 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
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>cloud-controller-features</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/features/cloud-controller/pom.xml
----------------------------------------------------------------------
diff --git a/features/cloud-controller/pom.xml b/features/cloud-controller/pom.xml
index 31752f0..f5becdd 100644
--- a/features/cloud-controller/pom.xml
+++ b/features/cloud-controller/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-features-parent</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/features/common/org.apache.stratos.common.feature/pom.xml
----------------------------------------------------------------------
diff --git a/features/common/org.apache.stratos.common.feature/pom.xml b/features/common/org.apache.stratos.common.feature/pom.xml
index 8cca3fe..5d75e68 100644
--- a/features/common/org.apache.stratos.common.feature/pom.xml
+++ b/features/common/org.apache.stratos.common.feature/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>common-features</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>org.apache.stratos.common.feature</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/features/common/org.apache.stratos.common.server.feature/pom.xml
----------------------------------------------------------------------
diff --git a/features/common/org.apache.stratos.common.server.feature/pom.xml b/features/common/org.apache.stratos.common.server.feature/pom.xml
index 2bf4317..ec4cd0c 100644
--- a/features/common/org.apache.stratos.common.server.feature/pom.xml
+++ b/features/common/org.apache.stratos.common.server.feature/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>common-features</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/features/common/org.apache.stratos.custom.handlers.feature/pom.xml
----------------------------------------------------------------------
diff --git a/features/common/org.apache.stratos.custom.handlers.feature/pom.xml b/features/common/org.apache.stratos.custom.handlers.feature/pom.xml
index 7e3a23e..ef9dbd2 100644
--- a/features/common/org.apache.stratos.custom.handlers.feature/pom.xml
+++ b/features/common/org.apache.stratos.custom.handlers.feature/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>common-features</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/features/common/pom.xml
----------------------------------------------------------------------
diff --git a/features/common/pom.xml b/features/common/pom.xml
index 912a91d..a29442b 100644
--- a/features/common/pom.xml
+++ b/features/common/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-features-parent</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>common-features</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/features/load-balancer/org.apache.stratos.load.balancer.common.feature/pom.xml
----------------------------------------------------------------------
diff --git a/features/load-balancer/org.apache.stratos.load.balancer.common.feature/pom.xml b/features/load-balancer/org.apache.stratos.load.balancer.common.feature/pom.xml
index d6da3f5..c428358 100644
--- a/features/load-balancer/org.apache.stratos.load.balancer.common.feature/pom.xml
+++ b/features/load-balancer/org.apache.stratos.load.balancer.common.feature/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>loadbalancer-features</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>org.apache.stratos.load.balancer.common.feature</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/features/load-balancer/org.apache.stratos.load.balancer.feature/pom.xml
----------------------------------------------------------------------
diff --git a/features/load-balancer/org.apache.stratos.load.balancer.feature/pom.xml b/features/load-balancer/org.apache.stratos.load.balancer.feature/pom.xml
index 4e325dd..eed0860 100644
--- a/features/load-balancer/org.apache.stratos.load.balancer.feature/pom.xml
+++ b/features/load-balancer/org.apache.stratos.load.balancer.feature/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>loadbalancer-features</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>org.apache.stratos.load.balancer.feature</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/features/load-balancer/pom.xml
----------------------------------------------------------------------
diff --git a/features/load-balancer/pom.xml b/features/load-balancer/pom.xml
index 34df3ba..f643ec6 100644
--- a/features/load-balancer/pom.xml
+++ b/features/load-balancer/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-features-parent</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>loadbalancer-features</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/features/manager/metadata-service/org.apache.stratos.metadata.client.feature/pom.xml
----------------------------------------------------------------------
diff --git a/features/manager/metadata-service/org.apache.stratos.metadata.client.feature/pom.xml b/features/manager/metadata-service/org.apache.stratos.metadata.client.feature/pom.xml
index 2589dd3..196a2be 100644
--- a/features/manager/metadata-service/org.apache.stratos.metadata.client.feature/pom.xml
+++ b/features/manager/metadata-service/org.apache.stratos.metadata.client.feature/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-manager-features</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/features/manager/metadata-service/org.apache.stratos.metadata.service.feature/pom.xml
----------------------------------------------------------------------
diff --git a/features/manager/metadata-service/org.apache.stratos.metadata.service.feature/pom.xml b/features/manager/metadata-service/org.apache.stratos.metadata.service.feature/pom.xml
index 473da68..b8889d2 100644
--- a/features/manager/metadata-service/org.apache.stratos.metadata.service.feature/pom.xml
+++ b/features/manager/metadata-service/org.apache.stratos.metadata.service.feature/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-manager-features</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/features/manager/pom.xml
----------------------------------------------------------------------
diff --git a/features/manager/pom.xml b/features/manager/pom.xml
index 8688d97..e2d2804 100644
--- a/features/manager/pom.xml
+++ b/features/manager/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-features-parent</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>stratos-manager-features</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/features/manager/rest-endpoint/org.apache.stratos.rest.endpoint.feature/pom.xml
----------------------------------------------------------------------
diff --git a/features/manager/rest-endpoint/org.apache.stratos.rest.endpoint.feature/pom.xml b/features/manager/rest-endpoint/org.apache.stratos.rest.endpoint.feature/pom.xml
index a160373..6ab73bb 100644
--- a/features/manager/rest-endpoint/org.apache.stratos.rest.endpoint.feature/pom.xml
+++ b/features/manager/rest-endpoint/org.apache.stratos.rest.endpoint.feature/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-manager-features</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/features/manager/stratos-mgt/org.apache.stratos.manager.feature/pom.xml
----------------------------------------------------------------------
diff --git a/features/manager/stratos-mgt/org.apache.stratos.manager.feature/pom.xml b/features/manager/stratos-mgt/org.apache.stratos.manager.feature/pom.xml
index 3096a46..1d472dd 100644
--- a/features/manager/stratos-mgt/org.apache.stratos.manager.feature/pom.xml
+++ b/features/manager/stratos-mgt/org.apache.stratos.manager.feature/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-mgt-parent-feature</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>org.apache.stratos.manager.feature</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/features/manager/stratos-mgt/org.apache.stratos.manager.server.feature/pom.xml
----------------------------------------------------------------------
diff --git a/features/manager/stratos-mgt/org.apache.stratos.manager.server.feature/pom.xml b/features/manager/stratos-mgt/org.apache.stratos.manager.server.feature/pom.xml
index 33f9aaa..66ee3eb 100644
--- a/features/manager/stratos-mgt/org.apache.stratos.manager.server.feature/pom.xml
+++ b/features/manager/stratos-mgt/org.apache.stratos.manager.server.feature/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-mgt-parent-feature</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>org.apache.stratos.manager.server.feature</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/features/manager/stratos-mgt/pom.xml
----------------------------------------------------------------------
diff --git a/features/manager/stratos-mgt/pom.xml b/features/manager/stratos-mgt/pom.xml
index e32d310..b03c997 100644
--- a/features/manager/stratos-mgt/pom.xml
+++ b/features/manager/stratos-mgt/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-manager-features</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>stratos-mgt-parent-feature</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/features/manager/styles/org.apache.stratos.manager.styles.feature/pom.xml
----------------------------------------------------------------------
diff --git a/features/manager/styles/org.apache.stratos.manager.styles.feature/pom.xml b/features/manager/styles/org.apache.stratos.manager.styles.feature/pom.xml
index 78de51b..68fc7ff 100644
--- a/features/manager/styles/org.apache.stratos.manager.styles.feature/pom.xml
+++ b/features/manager/styles/org.apache.stratos.manager.styles.feature/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-manager-features</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/features/messaging/org.apache.stratos.messaging.feature/pom.xml
----------------------------------------------------------------------
diff --git a/features/messaging/org.apache.stratos.messaging.feature/pom.xml b/features/messaging/org.apache.stratos.messaging.feature/pom.xml
index 6d32926..4b0e09b 100644
--- a/features/messaging/org.apache.stratos.messaging.feature/pom.xml
+++ b/features/messaging/org.apache.stratos.messaging.feature/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>messaging-features</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>org.apache.stratos.messaging.feature</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/features/messaging/pom.xml
----------------------------------------------------------------------
diff --git a/features/messaging/pom.xml b/features/messaging/pom.xml
index cf48121..6f829f4 100644
--- a/features/messaging/pom.xml
+++ b/features/messaging/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-features-parent</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>messaging-features</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/features/mock-iaas/org.apache.stratos.mock.iaas.api.feature/pom.xml
----------------------------------------------------------------------
diff --git a/features/mock-iaas/org.apache.stratos.mock.iaas.api.feature/pom.xml b/features/mock-iaas/org.apache.stratos.mock.iaas.api.feature/pom.xml
index 29d755d..1ee50ac 100644
--- a/features/mock-iaas/org.apache.stratos.mock.iaas.api.feature/pom.xml
+++ b/features/mock-iaas/org.apache.stratos.mock.iaas.api.feature/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>mock-iaas-features</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>org.apache.stratos.mock.iaas.api.feature</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/features/mock-iaas/pom.xml
----------------------------------------------------------------------
diff --git a/features/mock-iaas/pom.xml b/features/mock-iaas/pom.xml
index 62aa744..430a345 100644
--- a/features/mock-iaas/pom.xml
+++ b/features/mock-iaas/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-features-parent</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/features/pom.xml
----------------------------------------------------------------------
diff --git a/features/pom.xml b/features/pom.xml
index 502bfa0..2f2d578 100644
--- a/features/pom.xml
+++ b/features/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-parent</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>stratos-features-parent</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 453330d..50dd47a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -29,7 +29,7 @@
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-parent</artifactId>
<packaging>pom</packaging>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
<name>Apache Stratos</name>
<description>Apache Stratos is an open source polyglot Platform as a Service (PaaS) framework</description>
<url>http://stratos.apache.org</url>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/products/cartridge-agent/modules/distribution/pom.xml
----------------------------------------------------------------------
diff --git a/products/cartridge-agent/modules/distribution/pom.xml b/products/cartridge-agent/modules/distribution/pom.xml
index 61aa802..e0be347 100644
--- a/products/cartridge-agent/modules/distribution/pom.xml
+++ b/products/cartridge-agent/modules/distribution/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>cartidge-agent</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/products/cartridge-agent/pom.xml
----------------------------------------------------------------------
diff --git a/products/cartridge-agent/pom.xml b/products/cartridge-agent/pom.xml
index 4cffdfc..c4f251d 100644
--- a/products/cartridge-agent/pom.xml
+++ b/products/cartridge-agent/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-products-parent</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>cartidge-agent</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/products/load-balancer/modules/distribution/pom.xml
----------------------------------------------------------------------
diff --git a/products/load-balancer/modules/distribution/pom.xml b/products/load-balancer/modules/distribution/pom.xml
index a367dc4..5761c2c 100755
--- a/products/load-balancer/modules/distribution/pom.xml
+++ b/products/load-balancer/modules/distribution/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.stratos.load.balancer</groupId>
<artifactId>load-balancer-parent</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/products/load-balancer/modules/p2-profile-gen/pom.xml
----------------------------------------------------------------------
diff --git a/products/load-balancer/modules/p2-profile-gen/pom.xml b/products/load-balancer/modules/p2-profile-gen/pom.xml
index 7ddb2f5..f201d35 100755
--- a/products/load-balancer/modules/p2-profile-gen/pom.xml
+++ b/products/load-balancer/modules/p2-profile-gen/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos.load.balancer</groupId>
<artifactId>load-balancer-parent</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/products/load-balancer/pom.xml
----------------------------------------------------------------------
diff --git a/products/load-balancer/pom.xml b/products/load-balancer/pom.xml
index ae22d39..e8c0a0c 100755
--- a/products/load-balancer/pom.xml
+++ b/products/load-balancer/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-parent</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/products/pom.xml
----------------------------------------------------------------------
diff --git a/products/pom.xml b/products/pom.xml
index b2b4a93..b9806e1 100644
--- a/products/pom.xml
+++ b/products/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-parent</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/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
index 2de75d3..737fd72 100644
--- a/products/python-cartridge-agent/modules/distribution/pom.xml
+++ b/products/python-cartridge-agent/modules/distribution/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>python-cartridge-agent-parent</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/products/python-cartridge-agent/modules/integration/pom.xml
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/modules/integration/pom.xml b/products/python-cartridge-agent/modules/integration/pom.xml
index 1cf0a22..f16d8a3 100755
--- a/products/python-cartridge-agent/modules/integration/pom.xml
+++ b/products/python-cartridge-agent/modules/integration/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>python-cartridge-agent-parent</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/products/python-cartridge-agent/modules/integration/test-common/pom.xml
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/modules/integration/test-common/pom.xml b/products/python-cartridge-agent/modules/integration/test-common/pom.xml
index 81098be..4175928 100755
--- a/products/python-cartridge-agent/modules/integration/test-common/pom.xml
+++ b/products/python-cartridge-agent/modules/integration/test-common/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>python-cartridge-agent-integration</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>org.apache.stratos.python.cartridge.agent.integration.common</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/products/python-cartridge-agent/modules/integration/test-integration/pom.xml
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/modules/integration/test-integration/pom.xml b/products/python-cartridge-agent/modules/integration/test-integration/pom.xml
index d5e0b79..47d1de3 100755
--- a/products/python-cartridge-agent/modules/integration/test-integration/pom.xml
+++ b/products/python-cartridge-agent/modules/integration/test-integration/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>python-cartridge-agent-integration</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>python-agent-test-integration</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/products/python-cartridge-agent/pom.xml
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/pom.xml b/products/python-cartridge-agent/pom.xml
index bc22986..5aef681 100755
--- a/products/python-cartridge-agent/pom.xml
+++ b/products/python-cartridge-agent/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-products-parent</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>python-cartridge-agent-parent</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/products/python-cli/modules/distribution/pom.xml
----------------------------------------------------------------------
diff --git a/products/python-cli/modules/distribution/pom.xml b/products/python-cli/modules/distribution/pom.xml
index 6abe77b..9597e8b 100644
--- a/products/python-cli/modules/distribution/pom.xml
+++ b/products/python-cli/modules/distribution/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>apache-stratos-python-cli-parent</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/products/python-cli/pom.xml
----------------------------------------------------------------------
diff --git a/products/python-cli/pom.xml b/products/python-cli/pom.xml
index 9d30429..41f2c6d 100644
--- a/products/python-cli/pom.xml
+++ b/products/python-cli/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-products-parent</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/products/stratos-cli/modules/distribution/pom.xml
----------------------------------------------------------------------
diff --git a/products/stratos-cli/modules/distribution/pom.xml b/products/stratos-cli/modules/distribution/pom.xml
index c607a2f..80d0814 100644
--- a/products/stratos-cli/modules/distribution/pom.xml
+++ b/products/stratos-cli/modules/distribution/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>apache-stratos-cli-parent</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/products/stratos-cli/pom.xml
----------------------------------------------------------------------
diff --git a/products/stratos-cli/pom.xml b/products/stratos-cli/pom.xml
index 2757264..2370fa3 100644
--- a/products/stratos-cli/pom.xml
+++ b/products/stratos-cli/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-products-parent</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/products/stratos/modules/distribution/pom.xml
----------------------------------------------------------------------
diff --git a/products/stratos/modules/distribution/pom.xml b/products/stratos/modules/distribution/pom.xml
index 0cf2928..9c23923 100755
--- a/products/stratos/modules/distribution/pom.xml
+++ b/products/stratos/modules/distribution/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/products/stratos/modules/integration/pom.xml
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/pom.xml b/products/stratos/modules/integration/pom.xml
index 432ccf8..1f4feca 100755
--- a/products/stratos/modules/integration/pom.xml
+++ b/products/stratos/modules/integration/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
[39/50] [abbrv] stratos git commit: Adding MetadataServiceTestCase as
a failed test
Posted by ga...@apache.org.
Adding MetadataServiceTestCase as a failed test
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/33c79f42
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/33c79f42
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/33c79f42
Branch: refs/heads/release-4.1.5
Commit: 33c79f425bcaf94c19a636d33f9f569978c60ced
Parents: 642bd6c
Author: gayangunarathne <ga...@wso2.com>
Authored: Wed Dec 2 14:05:35 2015 +0530
Committer: gayangunarathne <ga...@wso2.com>
Committed: Mon Dec 7 10:16:29 2015 +0000
----------------------------------------------------------------------
.../integration/tests/application/MetadataServiceTestCase.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/33c79f42/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/MetadataServiceTestCase.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/MetadataServiceTestCase.java b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/MetadataServiceTestCase.java
index 5ba3634..2f58695 100644
--- a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/MetadataServiceTestCase.java
+++ b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/MetadataServiceTestCase.java
@@ -49,7 +49,7 @@ import static org.testng.AssertJUnit.assertTrue;
* Deploy a sample application on mock IaaS and load test metadata service with high load of concurrent read/write
* operations from multiple clients
*/
-@Test(groups = { "application", "metadata" })
+@Test(groups = { "application", "metadata", "failed" })
public class MetadataServiceTestCase extends StratosIntegrationTest {
private static final Log log = LogFactory.getLog(MetadataServiceTestCase.class);
private static final String RESOURCES_PATH = "/metadata-service-test";
[19/50] [abbrv] stratos git commit: Throw MetadataException on
failures in MetadataApiRegistry (instead of RegistryException coming from
Carbon)
Posted by ga...@apache.org.
Throw MetadataException on failures in MetadataApiRegistry (instead of RegistryException coming from Carbon)
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/8c615acb
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/8c615acb
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/8c615acb
Branch: refs/heads/release-4.1.5
Commit: 8c615acbaed06b6f489f9660f144960da2d4663f
Parents: 3a31c1c
Author: Akila Perera <ra...@gmail.com>
Authored: Mon Nov 30 00:22:40 2015 +0530
Committer: gayangunarathne <ga...@wso2.com>
Committed: Mon Dec 7 10:16:26 2015 +0000
----------------------------------------------------------------------
.../metadata/service/registry/DataStore.java | 21 ++++++-----
.../service/registry/MetadataApiRegistry.java | 37 ++++++++++----------
2 files changed, 31 insertions(+), 27 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/8c615acb/components/org.apache.stratos.metadata.service/src/main/java/org/apache/stratos/metadata/service/registry/DataStore.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.metadata.service/src/main/java/org/apache/stratos/metadata/service/registry/DataStore.java b/components/org.apache.stratos.metadata.service/src/main/java/org/apache/stratos/metadata/service/registry/DataStore.java
index a71c745..20ae1ac 100644
--- a/components/org.apache.stratos.metadata.service/src/main/java/org/apache/stratos/metadata/service/registry/DataStore.java
+++ b/components/org.apache.stratos.metadata.service/src/main/java/org/apache/stratos/metadata/service/registry/DataStore.java
@@ -18,8 +18,8 @@
*/
package org.apache.stratos.metadata.service.registry;
-
import org.apache.stratos.metadata.service.definition.Property;
+import org.apache.stratos.metadata.service.exception.MetadataException;
import org.wso2.carbon.registry.api.RegistryException;
import java.util.List;
@@ -29,18 +29,21 @@ import java.util.List;
*/
public interface DataStore {
- public void addPropertyToApplication(String applicationId, Property property) throws RegistryException;
+ public void addPropertyToApplication(String applicationId, Property property)
+ throws RegistryException, MetadataException;
- public List<Property> getApplicationProperties(String applicationId) throws RegistryException;
+ public List<Property> getApplicationProperties(String applicationId) throws MetadataException;
- public List<Property> getClusterProperties(String applicationId, String clusterId)
- throws RegistryException;
+ public List<Property> getClusterProperties(String applicationId, String clusterId) throws MetadataException;
- public void addPropertyToCluster(String applicationId, String clusterId, Property property) throws RegistryException;
+ public void addPropertyToCluster(String applicationId, String clusterId, Property property)
+ throws RegistryException, MetadataException;
- public boolean deleteApplicationProperties(String applicationId) throws RegistryException;
+ public boolean deleteApplicationProperties(String applicationId) throws RegistryException, MetadataException;
- public boolean removePropertyFromApplication(String applicationId, String propertyName) throws RegistryException;
+ public boolean removePropertyFromApplication(String applicationId, String propertyName)
+ throws RegistryException, MetadataException;
- public boolean removePropertyValueFromApplication(String applicationId, String propertyName, String valueToRemove) throws RegistryException;
+ public boolean removePropertyValueFromApplication(String applicationId, String propertyName, String valueToRemove)
+ throws RegistryException, MetadataException;
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/8c615acb/components/org.apache.stratos.metadata.service/src/main/java/org/apache/stratos/metadata/service/registry/MetadataApiRegistry.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.metadata.service/src/main/java/org/apache/stratos/metadata/service/registry/MetadataApiRegistry.java b/components/org.apache.stratos.metadata.service/src/main/java/org/apache/stratos/metadata/service/registry/MetadataApiRegistry.java
index 11d1468..75ddbc7 100644
--- a/components/org.apache.stratos.metadata.service/src/main/java/org/apache/stratos/metadata/service/registry/MetadataApiRegistry.java
+++ b/components/org.apache.stratos.metadata.service/src/main/java/org/apache/stratos/metadata/service/registry/MetadataApiRegistry.java
@@ -67,9 +67,9 @@ public class MetadataApiRegistry implements DataStore {
*
* @param applicationId Application ID under which properties should be retrieved
* @return List of properties
- * @throws RegistryException
+ * @throws MetadataException
*/
- public List<Property> getApplicationProperties(String applicationId) throws RegistryException {
+ public List<Property> getApplicationProperties(String applicationId) throws MetadataException {
String resourcePath = mainResource + applicationId;
try {
acquireReadLock(applicationId);
@@ -79,7 +79,7 @@ public class MetadataApiRegistry implements DataStore {
.format("Failed to get properties from registry [resource-path] %s for " + "[application-id] %s",
resourcePath, applicationId);
log.error(msg, e);
- throw new RegistryException(msg, e);
+ throw new MetadataException(msg, e);
} finally {
try {
releaseReadLock(applicationId);
@@ -94,9 +94,9 @@ public class MetadataApiRegistry implements DataStore {
* @param applicationId Application ID under which properties should be retrieved
* @param clusterId Cluster ID under which properties should be retrieved
* @return List of properties
- * @throws RegistryException
+ * @throws MetadataException
*/
- public List<Property> getClusterProperties(String applicationId, String clusterId) throws RegistryException {
+ public List<Property> getClusterProperties(String applicationId, String clusterId) throws MetadataException {
String resourcePath = mainResource + applicationId + "/" + clusterId;
try {
acquireReadLock(applicationId);
@@ -105,7 +105,7 @@ public class MetadataApiRegistry implements DataStore {
String msg = String.format("Failed to get properties from registry [resource-path] %s for [application-id] "
+ "%s, [cluster-id] %s", resourcePath, applicationId, clusterId);
log.error(msg, e);
- throw new RegistryException(msg, e);
+ throw new MetadataException(msg, e);
} finally {
try {
releaseReadLock(applicationId);
@@ -143,7 +143,8 @@ public class MetadataApiRegistry implements DataStore {
return newProperties;
}
- public void addPropertyToApplication(String applicationId, Property property) throws RegistryException {
+ public void addPropertyToApplication(String applicationId, Property property)
+ throws RegistryException, MetadataException {
Registry registry = getRegistry();
String resourcePath = mainResource + applicationId;
@@ -192,7 +193,7 @@ public class MetadataApiRegistry implements DataStore {
.format("Failed to persist properties in registry: [resource-path] %s, [key] %s, [values] %s",
resourcePath, property.getKey(), Arrays.asList(property.getValues()));
log.error(msg, e);
- throw new RegistryException(msg, e);
+ throw new MetadataException(msg, e);
} finally {
try {
releaseWriteLock(applicationId);
@@ -208,7 +209,7 @@ public class MetadataApiRegistry implements DataStore {
}
public boolean removePropertyValueFromApplication(String applicationId, String propertyKey, String valueToRemove)
- throws RegistryException {
+ throws RegistryException, MetadataException {
Registry registry = getRegistry();
String resourcePath = mainResource + applicationId;
@@ -233,7 +234,7 @@ public class MetadataApiRegistry implements DataStore {
propertyKey, valueToRemove));
return true;
} catch (Exception e) {
- throw new RegistryException(
+ throw new MetadataException(
String.format("Could not remove registry resource: [resource-path] %s, [key] %s, [value] %s",
resourcePath, propertyKey, valueToRemove), e);
} finally {
@@ -250,10 +251,10 @@ public class MetadataApiRegistry implements DataStore {
* @param applicationId Application ID against which added property will be stored
* @param clusterId Cluster ID against which added property will be stored
* @param property Property to be stored in the registry
- * @throws RegistryException
+ * @throws RegistryException, MetadataException
*/
public void addPropertyToCluster(String applicationId, String clusterId, Property property)
- throws RegistryException {
+ throws RegistryException, MetadataException {
Registry registry = getRegistry();
String resourcePath = mainResource + applicationId + "/" + clusterId;
@@ -278,7 +279,7 @@ public class MetadataApiRegistry implements DataStore {
"Registry property persisted: [resource-path] %s [Property Name] %s [Property Values] %s",
resourcePath, property.getKey(), Arrays.asList(property.getValues())));
} catch (Exception e) {
- throw new RegistryException(
+ throw new MetadataException(
String.format("Could not add registry resource: [resource-path] %s, [key] %s, [value] %s",
resourcePath, property.getKey(), Arrays.asList(property.getValues())), e);
@@ -299,9 +300,9 @@ public class MetadataApiRegistry implements DataStore {
*
* @param applicationId ID of the application.
* @return True if resource exist and able to delete, else false.
- * @throws RegistryException
+ * @throws RegistryException, MetadataException
*/
- public boolean deleteApplicationProperties(String applicationId) throws RegistryException {
+ public boolean deleteApplicationProperties(String applicationId) throws RegistryException, MetadataException {
if (StringUtils.isBlank(applicationId)) {
throw new IllegalArgumentException("Application ID can not be null");
}
@@ -320,7 +321,7 @@ public class MetadataApiRegistry implements DataStore {
}
return true;
} catch (Exception e) {
- throw new RegistryException(
+ throw new MetadataException(
String.format("Could not remove registry resource: [resource-path] %s", resourcePath), e);
} finally {
try {
@@ -331,7 +332,7 @@ public class MetadataApiRegistry implements DataStore {
}
public boolean removePropertyFromApplication(String applicationId, String propertyKey)
- throws org.wso2.carbon.registry.api.RegistryException {
+ throws RegistryException, MetadataException {
Registry registry = getRegistry();
String resourcePath = mainResource + applicationId;
Resource nodeResource;
@@ -361,7 +362,7 @@ public class MetadataApiRegistry implements DataStore {
propertyKey));
return true;
} catch (Exception e) {
- throw new RegistryException(
+ throw new MetadataException(
String.format("Could not remove registry resource: [resource-path] %s, [key] %s", resourcePath,
propertyKey), e);
} finally {
[22/50] [abbrv] stratos git commit: Cleaning up test cases. Remove
duplicate assertions. Fix formatting.
Posted by ga...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/a22f27a6/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/SampleApplicationsTestCase.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/SampleApplicationsTestCase.java b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/SampleApplicationsTestCase.java
index 581115a..29566f6 100644
--- a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/SampleApplicationsTestCase.java
+++ b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/SampleApplicationsTestCase.java
@@ -41,32 +41,37 @@ import static org.testng.AssertJUnit.assertTrue;
/**
* Sample application tests with application add, .
*/
+@Test(groups = { "application" })
public class SampleApplicationsTestCase extends StratosIntegrationTest {
private static final Log log = LogFactory.getLog(SampleApplicationsTestCase.class);
private static final String RESOURCES_PATH = "/sample-applications-test";
+ long startTime;
- @Test(timeOut = APPLICATION_TEST_TIMEOUT, groups = {"stratos.application.deployment"})
+ @Test(timeOut = DEFAULT_APPLICATION_TEST_TIMEOUT,
+ priority = 1)
public void testApplication() throws Exception {
- String autoscalingPolicyId = "autoscaling-policy-sample-applications-test";
+ startTime = System.currentTimeMillis();
+ log.info("Running SampleApplicationsTestCase.testApplication test method...");
- boolean addedScalingPolicy = restClient.addEntity(RESOURCES_PATH + RestConstants.AUTOSCALING_POLICIES_PATH
- + "/" + autoscalingPolicyId + ".json",
+ String autoscalingPolicyId = "autoscaling-policy-sample-applications-test";
+ boolean addedScalingPolicy = restClient.addEntity(
+ RESOURCES_PATH + RestConstants.AUTOSCALING_POLICIES_PATH + "/" + autoscalingPolicyId + ".json",
RestConstants.AUTOSCALING_POLICIES, RestConstants.AUTOSCALING_POLICIES_NAME);
assertEquals(addedScalingPolicy, true);
- boolean addedC1 = restClient.addEntity(
- RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "c1-sample-applications-test.json",
- RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+ boolean addedC1 = restClient
+ .addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "c1-sample-applications-test.json",
+ RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
assertEquals(addedC1, true);
- boolean addedC2 = restClient.addEntity(
- RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "c2-sample-applications-test.json",
- RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+ boolean addedC2 = restClient
+ .addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "c2-sample-applications-test.json",
+ RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
assertEquals(addedC2, true);
- boolean addedC3 = restClient.addEntity(
- RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "c3-sample-applications-test.json",
- RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+ boolean addedC3 = restClient
+ .addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "c3-sample-applications-test.json",
+ RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
assertEquals(addedC3, true);
boolean addedG1 = restClient.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGE_GROUPS_PATH +
@@ -75,23 +80,23 @@ public class SampleApplicationsTestCase extends StratosIntegrationTest {
assertEquals(addedG1, true);
CartridgeGroupBean beanG1 = (CartridgeGroupBean) restClient.
- getEntity(RestConstants.CARTRIDGE_GROUPS, "G1-sample-applications-test",
- CartridgeGroupBean.class, RestConstants.CARTRIDGE_GROUPS_NAME);
+ getEntity(RestConstants.CARTRIDGE_GROUPS, "G1-sample-applications-test", CartridgeGroupBean.class,
+ RestConstants.CARTRIDGE_GROUPS_NAME);
assertEquals(beanG1.getName(), "G1-sample-applications-test");
boolean addedN1 = restClient.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
- "network-partition-sample-applications-test-1.json",
- RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
+ "network-partition-sample-applications-test-1.json", RestConstants.NETWORK_PARTITIONS,
+ RestConstants.NETWORK_PARTITIONS_NAME);
assertEquals(addedN1, true);
boolean addedN2 = restClient.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
- "network-partition-sample-applications-test-2.json",
- RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
+ "network-partition-sample-applications-test-2.json", RestConstants.NETWORK_PARTITIONS,
+ RestConstants.NETWORK_PARTITIONS_NAME);
assertEquals(addedN2, true);
boolean addedDep = restClient.addEntity(RESOURCES_PATH + RestConstants.DEPLOYMENT_POLICIES_PATH + "/" +
- "deployment-policy-sample-applications-test.json",
- RestConstants.DEPLOYMENT_POLICIES, RestConstants.DEPLOYMENT_POLICIES_NAME);
+ "deployment-policy-sample-applications-test.json", RestConstants.DEPLOYMENT_POLICIES,
+ RestConstants.DEPLOYMENT_POLICIES_NAME);
assertEquals(addedDep, true);
boolean added = restClient.addEntity(RESOURCES_PATH + RestConstants.APPLICATIONS_PATH + "/" +
@@ -99,8 +104,9 @@ public class SampleApplicationsTestCase extends StratosIntegrationTest {
RestConstants.APPLICATIONS_NAME);
assertEquals(added, true);
- ApplicationBean bean = (ApplicationBean) restClient.getEntity(RestConstants.APPLICATIONS,
- "g-sc-G123-1-sample-applications-test", ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
+ ApplicationBean bean = (ApplicationBean) restClient
+ .getEntity(RestConstants.APPLICATIONS, "g-sc-G123-1-sample-applications-test", ApplicationBean.class,
+ RestConstants.APPLICATIONS_NAME);
assertEquals(bean.getApplicationId(), "g-sc-G123-1-sample-applications-test");
CartridgeGroupReferenceBean group1 = bean.getComponents().getGroups().get(0);
@@ -138,12 +144,13 @@ public class SampleApplicationsTestCase extends StratosIntegrationTest {
assertEquals(c3.getCartridgeMax(), 2);
boolean updated = restClient.updateEntity(RESOURCES_PATH + RestConstants.APPLICATIONS_PATH +
- "/g-sc-G123-1-sample-applications-test-v1.json",
- RestConstants.APPLICATIONS, RestConstants.APPLICATIONS_NAME);
+ "/g-sc-G123-1-sample-applications-test-v1.json", RestConstants.APPLICATIONS,
+ RestConstants.APPLICATIONS_NAME);
assertEquals(updated, true);
- ApplicationBean updatedBean = (ApplicationBean) restClient.getEntity(RestConstants.APPLICATIONS,
- "g-sc-G123-1-sample-applications-test", ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
+ ApplicationBean updatedBean = (ApplicationBean) restClient
+ .getEntity(RestConstants.APPLICATIONS, "g-sc-G123-1-sample-applications-test", ApplicationBean.class,
+ RestConstants.APPLICATIONS_NAME);
assertEquals(bean.getApplicationId(), "g-sc-G123-1-sample-applications-test");
@@ -181,224 +188,226 @@ public class SampleApplicationsTestCase extends StratosIntegrationTest {
assertEquals(c3.getCartridgeMin(), 2);
assertEquals(c3.getCartridgeMax(), 3);
-
- boolean removedGroup =
- restClient.removeEntity(RestConstants.CARTRIDGE_GROUPS, "G1-sample-applications-test",
- RestConstants.CARTRIDGE_GROUPS_NAME);
+ boolean removedGroup = restClient.removeEntity(RestConstants.CARTRIDGE_GROUPS, "G1-sample-applications-test",
+ RestConstants.CARTRIDGE_GROUPS_NAME);
assertFalse(removedGroup);
- boolean removedAuto = restClient.removeEntity(RestConstants.AUTOSCALING_POLICIES,
- autoscalingPolicyId, RestConstants.AUTOSCALING_POLICIES_NAME);
+ boolean removedAuto = restClient.removeEntity(RestConstants.AUTOSCALING_POLICIES, autoscalingPolicyId,
+ RestConstants.AUTOSCALING_POLICIES_NAME);
assertFalse(removedAuto);
- boolean removedNet = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS,
- "network-partition-sample-applications-test-1",
- RestConstants.NETWORK_PARTITIONS_NAME);
+ boolean removedNet = restClient
+ .removeEntity(RestConstants.NETWORK_PARTITIONS, "network-partition-sample-applications-test-1",
+ RestConstants.NETWORK_PARTITIONS_NAME);
//Trying to remove the used network partition
assertFalse(removedNet);
- boolean removedDep = restClient.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
- "deployment-policy-sample-applications-test", RestConstants.DEPLOYMENT_POLICIES_NAME);
+ boolean removedDep = restClient
+ .removeEntity(RestConstants.DEPLOYMENT_POLICIES, "deployment-policy-sample-applications-test",
+ RestConstants.DEPLOYMENT_POLICIES_NAME);
assertFalse(removedDep);
- boolean removed =
- restClient.removeEntity(RestConstants.APPLICATIONS, "g-sc-G123-1-sample-applications-test",
- RestConstants.APPLICATIONS_NAME);
+ boolean removed = restClient.removeEntity(RestConstants.APPLICATIONS, "g-sc-G123-1-sample-applications-test",
+ RestConstants.APPLICATIONS_NAME);
assertTrue(removed);
- ApplicationBean beanRemoved = (ApplicationBean) restClient.getEntity(RestConstants.APPLICATIONS,
- "g-sc-G123-1-sample-applications-test", ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
+ ApplicationBean beanRemoved = (ApplicationBean) restClient
+ .getEntity(RestConstants.APPLICATIONS, "g-sc-G123-1-sample-applications-test", ApplicationBean.class,
+ RestConstants.APPLICATIONS_NAME);
assertNull(beanRemoved);
removedGroup = restClient.removeEntity(RestConstants.CARTRIDGE_GROUPS, "G1-sample-applications-test",
RestConstants.CARTRIDGE_GROUPS_NAME);
assertEquals(removedGroup, true);
- boolean removedC1 = restClient.removeEntity(RestConstants.CARTRIDGES, "c1-sample-applications-test",
- RestConstants.CARTRIDGES_NAME);
+ boolean removedC1 = restClient
+ .removeEntity(RestConstants.CARTRIDGES, "c1-sample-applications-test", RestConstants.CARTRIDGES_NAME);
assertEquals(removedC1, true);
- boolean removedC2 = restClient.removeEntity(RestConstants.CARTRIDGES, "c2-sample-applications-test",
- RestConstants.CARTRIDGES_NAME);
+ boolean removedC2 = restClient
+ .removeEntity(RestConstants.CARTRIDGES, "c2-sample-applications-test", RestConstants.CARTRIDGES_NAME);
assertEquals(removedC2, true);
- boolean removedC3 = restClient.removeEntity(RestConstants.CARTRIDGES, "c3-sample-applications-test",
- RestConstants.CARTRIDGES_NAME);
+ boolean removedC3 = restClient
+ .removeEntity(RestConstants.CARTRIDGES, "c3-sample-applications-test", RestConstants.CARTRIDGES_NAME);
assertEquals(removedC3, true);
- removedAuto = restClient.removeEntity(RestConstants.AUTOSCALING_POLICIES,
- autoscalingPolicyId, RestConstants.AUTOSCALING_POLICIES_NAME);
+ removedAuto = restClient.removeEntity(RestConstants.AUTOSCALING_POLICIES, autoscalingPolicyId,
+ RestConstants.AUTOSCALING_POLICIES_NAME);
assertEquals(removedAuto, true);
- removedDep = restClient.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
- "deployment-policy-sample-applications-test", RestConstants.DEPLOYMENT_POLICIES_NAME);
+ removedDep = restClient
+ .removeEntity(RestConstants.DEPLOYMENT_POLICIES, "deployment-policy-sample-applications-test",
+ RestConstants.DEPLOYMENT_POLICIES_NAME);
assertEquals(removedDep, true);
- removedNet = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS,
- "network-partition-sample-applications-test-1", RestConstants.NETWORK_PARTITIONS_NAME);
+ removedNet = restClient
+ .removeEntity(RestConstants.NETWORK_PARTITIONS, "network-partition-sample-applications-test-1",
+ RestConstants.NETWORK_PARTITIONS_NAME);
assertEquals(removedNet, true);
- boolean removedN2 = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS,
- "network-partition-sample-applications-test-2", RestConstants.NETWORK_PARTITIONS_NAME);
- assertEquals(removedN2, true, String.format(
- "[Network partition] network-partition-sample-applications-test-2 could not be removed for " +
- "[application] g-sc-G123-1-sample-applications-test"));
+ boolean removedN2 = restClient
+ .removeEntity(RestConstants.NETWORK_PARTITIONS, "network-partition-sample-applications-test-2",
+ RestConstants.NETWORK_PARTITIONS_NAME);
+ assertEquals(removedN2, true,
+ "[Network partition] network-partition-sample-applications-test-2 could not be removed for "
+ + "[application] g-sc-G123-1-sample-applications-test");
}
- @Test(timeOut = APPLICATION_TEST_TIMEOUT, groups = {"stratos.application.deployment"})
+ @Test(timeOut = DEFAULT_APPLICATION_TEST_TIMEOUT,
+ priority = 2)
public void testApplicationList() throws Exception {
- String autoscalingPolicyId = "autoscaling-policy-sample-applications-test";
-
- boolean addedScalingPolicy = restClient.addEntity(RESOURCES_PATH + RestConstants.AUTOSCALING_POLICIES_PATH
- + "/" + autoscalingPolicyId + ".json",
- RestConstants.AUTOSCALING_POLICIES, RestConstants.AUTOSCALING_POLICIES_NAME);
- assertEquals(addedScalingPolicy, true);
-
- boolean addedC1 = restClient.addEntity(
- RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "c1-sample-applications-test.json",
- RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
- assertEquals(addedC1, true);
-
- boolean addedC2 = restClient.addEntity(
- RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "c2-sample-applications-test.json",
- RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
- assertEquals(addedC2, true);
-
- boolean addedC3 = restClient.addEntity(
- RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "c3-sample-applications-test.json",
- RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
- assertEquals(addedC3, true);
-
- boolean addedG1 = restClient.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGE_GROUPS_PATH +
- "/" + "cartridge-nested-sample-applications-test.json", RestConstants.CARTRIDGE_GROUPS,
- RestConstants.CARTRIDGE_GROUPS_NAME);
- assertEquals(addedG1, true);
-
- CartridgeGroupBean beanG1 = (CartridgeGroupBean) restClient.
- getEntity(RestConstants.CARTRIDGE_GROUPS, "G1-sample-applications-test",
- CartridgeGroupBean.class, RestConstants.CARTRIDGE_GROUPS_NAME);
- assertEquals(beanG1.getName(), "G1-sample-applications-test");
-
- boolean addedN1 = restClient.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
- "network-partition-sample-applications-test-1.json",
- RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
- assertEquals(addedN1, true);
-
- boolean addedN2 = restClient.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
- "network-partition-sample-applications-test-2.json",
- RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
- assertEquals(addedN2, true);
-
- boolean addedDep = restClient.addEntity(RESOURCES_PATH + RestConstants.DEPLOYMENT_POLICIES_PATH + "/" +
- "deployment-policy-sample-applications-test.json",
- RestConstants.DEPLOYMENT_POLICIES, RestConstants.DEPLOYMENT_POLICIES_NAME);
- assertEquals(addedDep, true);
-
- String app1 = "sample-applications-test-1";
- String app2 = "sample-applications-test-2";
- boolean added = restClient.addEntity(RESOURCES_PATH + RestConstants.APPLICATIONS_PATH + "/" +
- app1 + ".json", RestConstants.APPLICATIONS,
- RestConstants.APPLICATIONS_NAME);
- assertEquals(added, true);
-
- added = restClient.addEntity(RESOURCES_PATH + RestConstants.APPLICATIONS_PATH + "/" +
- app2 + ".json", RestConstants.APPLICATIONS,
- RestConstants.APPLICATIONS_NAME);
- assertEquals(added, true);
-
- Type listType = new TypeToken<ArrayList<ApplicationBean>>() {
- }.getType();
-
- List<ApplicationBean> applicationList = (List<ApplicationBean>) restClient.
- listEntity(RestConstants.APPLICATIONS,
- listType, RestConstants.APPLICATIONS_NAME);
- assertTrue(applicationList.size() >= 2);
-
-
- ApplicationBean bean1 = null;
- for (ApplicationBean applicationBean : applicationList) {
- if (applicationBean.getApplicationId().equals(app1)) {
- bean1 = applicationBean;
- }
- }
- assertNotNull(bean1);
+ log.info("Running SampleApplicationsTestCase.testApplicationList test method...");
- ApplicationBean bean2 = null;
- for (ApplicationBean applicationBean : applicationList) {
- if (applicationBean.getApplicationId().equals(app2)) {
- bean2 = applicationBean;
- }
+ String autoscalingPolicyId = "autoscaling-policy-sample-applications-test";
+ boolean addedScalingPolicy = restClient.addEntity(
+ RESOURCES_PATH + RestConstants.AUTOSCALING_POLICIES_PATH + "/" + autoscalingPolicyId + ".json",
+ RestConstants.AUTOSCALING_POLICIES, RestConstants.AUTOSCALING_POLICIES_NAME);
+ assertEquals(addedScalingPolicy, true);
+
+ boolean addedC1 = restClient
+ .addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "c1-sample-applications-test.json",
+ RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+ assertEquals(addedC1, true);
+
+ boolean addedC2 = restClient
+ .addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "c2-sample-applications-test.json",
+ RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+ assertEquals(addedC2, true);
+
+ boolean addedC3 = restClient
+ .addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "c3-sample-applications-test.json",
+ RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+ assertEquals(addedC3, true);
+
+ boolean addedG1 = restClient.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGE_GROUPS_PATH +
+ "/" + "cartridge-nested-sample-applications-test.json", RestConstants.CARTRIDGE_GROUPS,
+ RestConstants.CARTRIDGE_GROUPS_NAME);
+ assertEquals(addedG1, true);
+
+ CartridgeGroupBean beanG1 = (CartridgeGroupBean) restClient.
+ getEntity(RestConstants.CARTRIDGE_GROUPS, "G1-sample-applications-test", CartridgeGroupBean.class,
+ RestConstants.CARTRIDGE_GROUPS_NAME);
+ assertEquals(beanG1.getName(), "G1-sample-applications-test");
+
+ boolean addedN1 = restClient.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
+ "network-partition-sample-applications-test-1.json", RestConstants.NETWORK_PARTITIONS,
+ RestConstants.NETWORK_PARTITIONS_NAME);
+ assertEquals(addedN1, true);
+
+ boolean addedN2 = restClient.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
+ "network-partition-sample-applications-test-2.json", RestConstants.NETWORK_PARTITIONS,
+ RestConstants.NETWORK_PARTITIONS_NAME);
+ assertEquals(addedN2, true);
+
+ boolean addedDep = restClient.addEntity(RESOURCES_PATH + RestConstants.DEPLOYMENT_POLICIES_PATH + "/" +
+ "deployment-policy-sample-applications-test.json", RestConstants.DEPLOYMENT_POLICIES,
+ RestConstants.DEPLOYMENT_POLICIES_NAME);
+ assertEquals(addedDep, true);
+
+ String app1 = "sample-applications-test-1";
+ String app2 = "sample-applications-test-2";
+ boolean added = restClient.addEntity(RESOURCES_PATH + RestConstants.APPLICATIONS_PATH + "/" +
+ app1 + ".json", RestConstants.APPLICATIONS, RestConstants.APPLICATIONS_NAME);
+ assertEquals(added, true);
+
+ added = restClient.addEntity(RESOURCES_PATH + RestConstants.APPLICATIONS_PATH + "/" +
+ app2 + ".json", RestConstants.APPLICATIONS, RestConstants.APPLICATIONS_NAME);
+ assertEquals(added, true);
+
+ Type listType = new TypeToken<ArrayList<ApplicationBean>>() {
+ }.getType();
+
+ List<ApplicationBean> applicationList = (List<ApplicationBean>) restClient.
+ listEntity(RestConstants.APPLICATIONS, listType, RestConstants.APPLICATIONS_NAME);
+ assertTrue(applicationList.size() >= 2);
+
+ ApplicationBean bean1 = null;
+ for (ApplicationBean applicationBean : applicationList) {
+ if (applicationBean.getApplicationId().equals(app1)) {
+ bean1 = applicationBean;
}
- assertNotNull(bean2);
+ }
+ assertNotNull(bean1);
+ ApplicationBean bean2 = null;
+ for (ApplicationBean applicationBean : applicationList) {
+ if (applicationBean.getApplicationId().equals(app2)) {
+ bean2 = applicationBean;
+ }
+ }
+ assertNotNull(bean2);
- boolean removed = restClient.removeEntity(RestConstants.APPLICATIONS, app1,
- RestConstants.APPLICATIONS_NAME);
- assertTrue(removed);
+ boolean removedGroup = restClient.removeEntity(RestConstants.CARTRIDGE_GROUPS, "G1-sample-applications-test",
+ RestConstants.CARTRIDGE_GROUPS_NAME);
+ assertFalse(removedGroup);
- ApplicationBean beanRemoved = (ApplicationBean) restClient.getEntity(RestConstants.APPLICATIONS,
- app1, ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
- assertNull(beanRemoved);
+ boolean removedAuto = restClient.removeEntity(RestConstants.AUTOSCALING_POLICIES, autoscalingPolicyId,
+ RestConstants.AUTOSCALING_POLICIES_NAME);
+ assertFalse(removedAuto);
- boolean removedGroup =
- restClient.removeEntity(RestConstants.CARTRIDGE_GROUPS, "G1-sample-applications-test",
- RestConstants.CARTRIDGE_GROUPS_NAME);
- assertFalse(removedGroup);
+ boolean removedNet = restClient
+ .removeEntity(RestConstants.NETWORK_PARTITIONS, "network-partition-sample-applications-test-1",
+ RestConstants.NETWORK_PARTITIONS_NAME);
+ //Trying to remove the used network partition
+ assertFalse(removedNet);
- boolean removedAuto = restClient.removeEntity(RestConstants.AUTOSCALING_POLICIES,
- autoscalingPolicyId, RestConstants.AUTOSCALING_POLICIES_NAME);
- assertFalse(removedAuto);
+ boolean removedDep = restClient
+ .removeEntity(RestConstants.DEPLOYMENT_POLICIES, "deployment-policy-sample-applications-test",
+ RestConstants.DEPLOYMENT_POLICIES_NAME);
+ assertFalse(removedDep);
- boolean removedNet = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS,
- "network-partition-sample-applications-test-1",
- RestConstants.NETWORK_PARTITIONS_NAME);
- //Trying to remove the used network partition
- assertFalse(removedNet);
+ boolean removed = restClient.removeEntity(RestConstants.APPLICATIONS, app1, RestConstants.APPLICATIONS_NAME);
+ assertTrue(removed);
- boolean removedDep = restClient.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
- "deployment-policy-sample-applications-test", RestConstants.DEPLOYMENT_POLICIES_NAME);
- assertFalse(removedDep);
+ ApplicationBean beanRemoved = (ApplicationBean) restClient
+ .getEntity(RestConstants.APPLICATIONS, app1, ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
+ assertNull(beanRemoved);
- removed = restClient.removeEntity(RestConstants.APPLICATIONS, app2,
- RestConstants.APPLICATIONS_NAME);
- assertTrue(removed);
+ removed = restClient.removeEntity(RestConstants.APPLICATIONS, app2, RestConstants.APPLICATIONS_NAME);
+ assertTrue(removed);
- beanRemoved = (ApplicationBean) restClient.getEntity(RestConstants.APPLICATIONS,
- app2, ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
- assertNull(beanRemoved);
+ beanRemoved = (ApplicationBean) restClient
+ .getEntity(RestConstants.APPLICATIONS, app2, ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
+ assertNull(beanRemoved);
- removedGroup = restClient.removeEntity(RestConstants.CARTRIDGE_GROUPS, "G1-sample-applications-test",
- RestConstants.CARTRIDGE_GROUPS_NAME);
- assertEquals(removedGroup, true);
+ removedGroup = restClient.removeEntity(RestConstants.CARTRIDGE_GROUPS, "G1-sample-applications-test",
+ RestConstants.CARTRIDGE_GROUPS_NAME);
+ assertEquals(removedGroup, true);
- boolean removedC1 = restClient.removeEntity(RestConstants.CARTRIDGES, "c1-sample-applications-test",
- RestConstants.CARTRIDGES_NAME);
- assertEquals(removedC1, true);
+ boolean removedC1 = restClient
+ .removeEntity(RestConstants.CARTRIDGES, "c1-sample-applications-test", RestConstants.CARTRIDGES_NAME);
+ assertEquals(removedC1, true);
- boolean removedC2 = restClient.removeEntity(RestConstants.CARTRIDGES, "c2-sample-applications-test",
- RestConstants.CARTRIDGES_NAME);
- assertEquals(removedC2, true);
+ boolean removedC2 = restClient
+ .removeEntity(RestConstants.CARTRIDGES, "c2-sample-applications-test", RestConstants.CARTRIDGES_NAME);
+ assertEquals(removedC2, true);
- boolean removedC3 = restClient.removeEntity(RestConstants.CARTRIDGES, "c3-sample-applications-test",
- RestConstants.CARTRIDGES_NAME);
- assertEquals(removedC3, true);
+ boolean removedC3 = restClient
+ .removeEntity(RestConstants.CARTRIDGES, "c3-sample-applications-test", RestConstants.CARTRIDGES_NAME);
+ assertEquals(removedC3, true);
- removedAuto = restClient.removeEntity(RestConstants.AUTOSCALING_POLICIES,
- autoscalingPolicyId, RestConstants.AUTOSCALING_POLICIES_NAME);
- assertEquals(removedAuto, true);
+ removedAuto = restClient.removeEntity(RestConstants.AUTOSCALING_POLICIES, autoscalingPolicyId,
+ RestConstants.AUTOSCALING_POLICIES_NAME);
+ assertEquals(removedAuto, true);
- removedDep = restClient.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
- "deployment-policy-sample-applications-test", RestConstants.DEPLOYMENT_POLICIES_NAME);
- assertEquals(removedDep, true);
+ removedDep = restClient
+ .removeEntity(RestConstants.DEPLOYMENT_POLICIES, "deployment-policy-sample-applications-test",
+ RestConstants.DEPLOYMENT_POLICIES_NAME);
+ assertEquals(removedDep, true);
- removedNet = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS,
- "network-partition-sample-applications-test-1", RestConstants.NETWORK_PARTITIONS_NAME);
- assertEquals(removedNet, true);
+ removedNet = restClient
+ .removeEntity(RestConstants.NETWORK_PARTITIONS, "network-partition-sample-applications-test-1",
+ RestConstants.NETWORK_PARTITIONS_NAME);
+ assertEquals(removedNet, true);
- boolean removedN2 = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS,
- "network-partition-sample-applications-test-2", RestConstants.NETWORK_PARTITIONS_NAME);
- assertEquals(removedN2, true, String.format(
- "[Network partition] network-partition-sample-applications-test-2 could not be removed for " +
- "[application] g-sc-G123-1-sample-applications-test"));
+ boolean removedN2 = restClient
+ .removeEntity(RestConstants.NETWORK_PARTITIONS, "network-partition-sample-applications-test-2",
+ RestConstants.NETWORK_PARTITIONS_NAME);
+ assertEquals(removedN2, true,
+ "[Network partition] network-partition-sample-applications-test-2 could not be removed for "
+ + "[application] g-sc-G123-1-sample-applications-test");
+ long duration = System.currentTimeMillis() - startTime;
+ log.info(String.format("SampleApplicationsTestCase completed in [duration] %s ms", duration));
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/stratos/blob/a22f27a6/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/SingleClusterScalingTestCase.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/SingleClusterScalingTestCase.java b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/SingleClusterScalingTestCase.java
index 3ea53e7..7e0ac78 100644
--- a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/SingleClusterScalingTestCase.java
+++ b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/SingleClusterScalingTestCase.java
@@ -21,12 +21,10 @@ package org.apache.stratos.integration.tests.application;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.stratos.common.beans.application.ApplicationBean;
-import org.apache.stratos.common.beans.policy.deployment.ApplicationPolicyBean;
import org.apache.stratos.integration.common.RestConstants;
import org.apache.stratos.integration.common.TopologyHandler;
import org.apache.stratos.integration.tests.StratosIntegrationTest;
import org.apache.stratos.messaging.domain.application.Application;
-import org.apache.stratos.messaging.domain.application.ApplicationStatus;
import org.apache.stratos.messaging.domain.application.ClusterDataHolder;
import org.apache.stratos.messaging.domain.instance.ClusterInstance;
import org.apache.stratos.messaging.domain.topology.Cluster;
@@ -40,15 +38,14 @@ import org.testng.annotations.Test;
import java.util.Set;
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertNull;
+import static org.testng.Assert.*;
import static org.testng.AssertJUnit.assertNotNull;
import static org.testng.AssertJUnit.assertTrue;
/**
* This will handle the scale-up and scale-down of a particular cluster bursting test cases
*/
+@Test(groups = { "application", "scale" })
public class SingleClusterScalingTestCase extends StratosIntegrationTest {
private static final Log log = LogFactory.getLog(SingleClusterScalingTestCase.class);
private static final String RESOURCES_PATH = "/single-cluster-scaling-test";
@@ -61,38 +58,39 @@ public class SingleClusterScalingTestCase extends StratosIntegrationTest {
private static final int CLUSTER_SCALE_UP_TIMEOUT = 180000;
private static final int CLUSTER_SCALE_DOWN_TIMEOUT = 360000;
private int activeInstancesAfterScaleup = 0;
+ private TopologyHandler topologyHandler = TopologyHandler.getInstance();
- @Test(timeOut = APPLICATION_TEST_TIMEOUT, groups = {"stratos.application.deployment"})
+ @Test(timeOut = DEFAULT_APPLICATION_TEST_TIMEOUT)
public void testDeployApplication() throws Exception {
- TopologyHandler topologyHandler = TopologyHandler.getInstance();
+ log.info("Running SingleClusterScalingTestCase.testDeployApplication test method...");
+ long startTime = System.currentTimeMillis();
- boolean addedScalingPolicy = restClient.addEntity(RESOURCES_PATH + RestConstants.AUTOSCALING_POLICIES_PATH
- + "/" + autoscalingPolicyId + ".json",
+ boolean addedScalingPolicy = restClient.addEntity(
+ RESOURCES_PATH + RestConstants.AUTOSCALING_POLICIES_PATH + "/" + autoscalingPolicyId + ".json",
RestConstants.AUTOSCALING_POLICIES, RestConstants.AUTOSCALING_POLICIES_NAME);
Assert.assertTrue(addedScalingPolicy);
- boolean addedC1 = restClient.addEntity(
- RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + cartridgeId + ".json",
- RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+ boolean addedC1 = restClient
+ .addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + cartridgeId + ".json",
+ RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
Assert.assertTrue(addedC1);
boolean addedN1 = restClient.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
- networkPartitionId + ".json",
- RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
+ networkPartitionId + ".json", RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
Assert.assertTrue(addedN1);
boolean addedDep = restClient.addEntity(RESOURCES_PATH + RestConstants.DEPLOYMENT_POLICIES_PATH + "/" +
- deploymentPolicyId + ".json",
- RestConstants.DEPLOYMENT_POLICIES, RestConstants.DEPLOYMENT_POLICIES_NAME);
+ deploymentPolicyId + ".json", RestConstants.DEPLOYMENT_POLICIES,
+ RestConstants.DEPLOYMENT_POLICIES_NAME);
Assert.assertTrue(addedDep);
boolean added = restClient.addEntity(RESOURCES_PATH + RestConstants.APPLICATIONS_PATH + "/" +
- applicationId + ".json", RestConstants.APPLICATIONS,
- RestConstants.APPLICATIONS_NAME);
+ applicationId + ".json", RestConstants.APPLICATIONS, RestConstants.APPLICATIONS_NAME);
Assert.assertTrue(added);
- ApplicationBean bean = (ApplicationBean) restClient.getEntity(RestConstants.APPLICATIONS,
- applicationId, ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
+ ApplicationBean bean = (ApplicationBean) restClient
+ .getEntity(RestConstants.APPLICATIONS, applicationId, ApplicationBean.class,
+ RestConstants.APPLICATIONS_NAME);
assertEquals(bean.getApplicationId(), applicationId);
boolean addAppPolicy = restClient.addEntity(RESOURCES_PATH + RestConstants.APPLICATION_POLICIES_PATH + "/" +
@@ -103,13 +101,11 @@ public class SingleClusterScalingTestCase extends StratosIntegrationTest {
//deploy the application
String resourcePath = RestConstants.APPLICATIONS + "/" + applicationId +
RestConstants.APPLICATIONS_DEPLOY + "/" + applicationPolicyId;
- boolean deployed = restClient.deployEntity(resourcePath,
- RestConstants.APPLICATIONS_NAME);
+ boolean deployed = restClient.deployEntity(resourcePath, RestConstants.APPLICATIONS_NAME);
Assert.assertTrue(deployed);
//Application active handling
- topologyHandler.assertApplicationStatus(bean.getApplicationId()
- , ApplicationStatus.Active);
+ TopologyHandler.getInstance().assertApplicationActiveStatus(bean.getApplicationId());
//Cluster active handling
topologyHandler.assertClusterActivation(bean.getApplicationId());
@@ -123,26 +119,24 @@ public class SingleClusterScalingTestCase extends StratosIntegrationTest {
//Check whether cluster could scale-down upto the minimum
assertClusterScaleDownToMinimumCount(bean.getApplicationId());
- boolean removedAuto = restClient.removeEntity(RestConstants.AUTOSCALING_POLICIES,
- autoscalingPolicyId, RestConstants.AUTOSCALING_POLICIES_NAME);
+ boolean removedAuto = restClient.removeEntity(RestConstants.AUTOSCALING_POLICIES, autoscalingPolicyId,
+ RestConstants.AUTOSCALING_POLICIES_NAME);
assertFalse(removedAuto);
- boolean removedNet = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS,
- networkPartitionId,
+ boolean removedNet = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS, networkPartitionId,
RestConstants.NETWORK_PARTITIONS_NAME);
//Trying to remove the used network partition
assertFalse(removedNet);
- boolean removedDep = restClient.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
- deploymentPolicyId, RestConstants.DEPLOYMENT_POLICIES_NAME);
+ boolean removedDep = restClient.removeEntity(RestConstants.DEPLOYMENT_POLICIES, deploymentPolicyId,
+ RestConstants.DEPLOYMENT_POLICIES_NAME);
assertFalse(removedDep);
//Un-deploying the application
String resourcePathUndeploy = RestConstants.APPLICATIONS + "/" + applicationId +
RestConstants.APPLICATIONS_UNDEPLOY;
- boolean unDeployed = restClient.undeployEntity(resourcePathUndeploy,
- RestConstants.APPLICATIONS_NAME);
+ boolean unDeployed = restClient.undeployEntity(resourcePathUndeploy, RestConstants.APPLICATIONS_NAME);
Assert.assertTrue(unDeployed);
boolean undeploy = topologyHandler.assertApplicationUndeploy(applicationId);
@@ -150,45 +144,48 @@ public class SingleClusterScalingTestCase extends StratosIntegrationTest {
//Need to forcefully undeploy the application
log.info(String.format("Force undeployment is going to start for the [application] %s", applicationId));
- restClient.undeployEntity(RestConstants.APPLICATIONS + "/" + applicationId+
+ restClient.undeployEntity(RestConstants.APPLICATIONS + "/" + applicationId +
RestConstants.APPLICATIONS_UNDEPLOY + "?force=true", RestConstants.APPLICATIONS);
boolean forceUndeployed = topologyHandler.assertApplicationUndeploy(applicationId);
- assertTrue(String.format("Forceful undeployment failed for the application %s",
- applicationId), forceUndeployed);
+ assertTrue(String.format("Forceful undeployment failed for the application %s", applicationId),
+ forceUndeployed);
}
- boolean removed = restClient.removeEntity(RestConstants.APPLICATIONS, applicationId,
- RestConstants.APPLICATIONS_NAME);
+ boolean removed = restClient
+ .removeEntity(RestConstants.APPLICATIONS, applicationId, RestConstants.APPLICATIONS_NAME);
Assert.assertTrue(removed);
- ApplicationBean beanRemoved = (ApplicationBean) restClient.getEntity(RestConstants.APPLICATIONS,
- applicationId, ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
+ ApplicationBean beanRemoved = (ApplicationBean) restClient
+ .getEntity(RestConstants.APPLICATIONS, applicationId, ApplicationBean.class,
+ RestConstants.APPLICATIONS_NAME);
assertNull(beanRemoved);
- boolean removedC1 = restClient.removeEntity(RestConstants.CARTRIDGES, cartridgeId,
- RestConstants.CARTRIDGES_NAME);
+ boolean removedC1 = restClient
+ .removeEntity(RestConstants.CARTRIDGES, cartridgeId, RestConstants.CARTRIDGES_NAME);
Assert.assertTrue(removedC1);
- removedAuto = restClient.removeEntity(RestConstants.AUTOSCALING_POLICIES,
- autoscalingPolicyId, RestConstants.AUTOSCALING_POLICIES_NAME);
+ removedAuto = restClient.removeEntity(RestConstants.AUTOSCALING_POLICIES, autoscalingPolicyId,
+ RestConstants.AUTOSCALING_POLICIES_NAME);
Assert.assertTrue(removedAuto);
- removedDep = restClient.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
- deploymentPolicyId, RestConstants.DEPLOYMENT_POLICIES_NAME);
+ removedDep = restClient.removeEntity(RestConstants.DEPLOYMENT_POLICIES, deploymentPolicyId,
+ RestConstants.DEPLOYMENT_POLICIES_NAME);
Assert.assertTrue(removedDep);
- removedNet = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS,
- networkPartitionId, RestConstants.NETWORK_PARTITIONS_NAME);
+ removedNet = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS, networkPartitionId,
+ RestConstants.NETWORK_PARTITIONS_NAME);
assertFalse(removedNet);
- boolean removeAppPolicy = restClient.removeEntity(RestConstants.APPLICATION_POLICIES,
- applicationPolicyId, RestConstants.APPLICATION_POLICIES_NAME);
+ boolean removeAppPolicy = restClient.removeEntity(RestConstants.APPLICATION_POLICIES, applicationPolicyId,
+ RestConstants.APPLICATION_POLICIES_NAME);
Assert.assertTrue(removeAppPolicy);
- removedNet = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS,
- networkPartitionId, RestConstants.NETWORK_PARTITIONS_NAME);
+ removedNet = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS, networkPartitionId,
+ RestConstants.NETWORK_PARTITIONS_NAME);
Assert.assertTrue(removedNet);
+ long duration = System.currentTimeMillis() - startTime;
+ log.info(String.format("SingleClusterScalingTestCase completed in [duration] %s ms", duration));
}
/**
@@ -198,24 +195,22 @@ public class SingleClusterScalingTestCase extends StratosIntegrationTest {
*/
private void assertClusterWithScalingup(String applicationName) {
Application application = ApplicationManager.getApplications().getApplication(applicationName);
- assertNotNull(String.format("Application is not found: [application-id] %s",
- applicationName), application);
+ assertNotNull(String.format("Application is not found: [application-id] %s", applicationName), application);
boolean clusterScaleup = false;
String clusterId = null;
long startTime = System.currentTimeMillis();
while (!clusterScaleup) {
try {
Thread.sleep(1000);
- }
- catch (InterruptedException ignore) {
+ } catch (InterruptedException ignore) {
}
Set<ClusterDataHolder> clusterDataHolderSet = application.getClusterDataRecursively();
for (ClusterDataHolder clusterDataHolder : clusterDataHolderSet) {
String serviceName = clusterDataHolder.getServiceType();
clusterId = clusterDataHolder.getClusterId();
Service service = TopologyManager.getTopology().getService(serviceName);
- assertNotNull(String.format("Service is not found: [application-id] %s [service] %s",
- applicationName, serviceName), service);
+ 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",
@@ -252,24 +247,22 @@ public class SingleClusterScalingTestCase extends StratosIntegrationTest {
*/
private void assertClusterWithScaleDown(String applicationName) {
Application application = ApplicationManager.getApplications().getApplication(applicationName);
- assertNotNull(String.format("Application is not found: [application-id] %s",
- applicationName), application);
+ assertNotNull(String.format("Application is not found: [application-id] %s", applicationName), application);
boolean clusterScaleDown = false;
String clusterId = null;
long startTime = System.currentTimeMillis();
while (!clusterScaleDown) {
try {
Thread.sleep(1000);
- }
- catch (InterruptedException ignore) {
+ } catch (InterruptedException ignore) {
}
Set<ClusterDataHolder> clusterDataHolderSet = application.getClusterDataRecursively();
for (ClusterDataHolder clusterDataHolder : clusterDataHolderSet) {
String serviceName = clusterDataHolder.getServiceType();
clusterId = clusterDataHolder.getClusterId();
Service service = TopologyManager.getTopology().getService(serviceName);
- assertNotNull(String.format("Service is not found: [application-id] %s [service] %s",
- applicationName, serviceName), service);
+ 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",
@@ -312,24 +305,22 @@ public class SingleClusterScalingTestCase extends StratosIntegrationTest {
*/
private void assertClusterScaleDownToMinimumCount(String applicationName) {
Application application = ApplicationManager.getApplications().getApplication(applicationName);
- assertNotNull(String.format("Application is not found: [application-id] %s",
- applicationName), application);
+ assertNotNull(String.format("Application is not found: [application-id] %s", applicationName), application);
boolean clusterScaleDown = false;
String clusterId = null;
long startTime = System.currentTimeMillis();
while (!clusterScaleDown) {
try {
Thread.sleep(1000);
- }
- catch (InterruptedException ignore) {
+ } catch (InterruptedException ignore) {
}
Set<ClusterDataHolder> clusterDataHolderSet = application.getClusterDataRecursively();
for (ClusterDataHolder clusterDataHolder : clusterDataHolderSet) {
String serviceName = clusterDataHolder.getServiceType();
clusterId = clusterDataHolder.getClusterId();
Service service = TopologyManager.getTopology().getService(serviceName);
- assertNotNull(String.format("Service is not found: [application-id] %s [service] %s",
- applicationName, serviceName), service);
+ 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",
@@ -357,4 +348,4 @@ public class SingleClusterScalingTestCase extends StratosIntegrationTest {
assertEquals(clusterScaleDown, true,
String.format("Cluster did not get scaled up: [cluster-id] %s", clusterId));
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/stratos/blob/a22f27a6/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/cartridge/CartridgeGroupTestCase.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/cartridge/CartridgeGroupTestCase.java b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/cartridge/CartridgeGroupTestCase.java
new file mode 100644
index 0000000..7cbf603
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/cartridge/CartridgeGroupTestCase.java
@@ -0,0 +1,241 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.stratos.integration.tests.cartridge;
+
+import com.google.gson.reflect.TypeToken;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.stratos.common.beans.cartridge.CartridgeGroupBean;
+import org.apache.stratos.integration.common.RestConstants;
+import org.apache.stratos.integration.tests.StratosIntegrationTest;
+import org.testng.annotations.Test;
+
+import java.lang.reflect.Type;
+import java.util.ArrayList;
+import java.util.List;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertNotNull;
+import static org.testng.AssertJUnit.*;
+
+/**
+ * Test to handle Cartridge group CRUD operations
+ */
+@Test(groups = { "cartridge" })
+public class CartridgeGroupTestCase extends StratosIntegrationTest {
+ private static final Log log = LogFactory.getLog(CartridgeGroupTestCase.class);
+ private static final String RESOURCES_PATH = "/cartridge-group-test";
+ private long startTime;
+
+ @Test(timeOut = DEFAULT_TEST_TIMEOUT,
+ priority = 1)
+ public void testCartridgeGroup() throws Exception {
+ log.info("Running CartridgeGroupTestCase.testCartridgeGroup test method...");
+ startTime = System.currentTimeMillis();
+
+ boolean addedC1 = restClient.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH +
+ "/" + "c4-cartridge-group-test.json", RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+ assertTrue(String.format("Cartridge did not added: [cartridge-name] %s", "c4-cartridge-group-test"), addedC1);
+
+ boolean addedC2 = restClient.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH +
+ "/" + "c5-cartridge-group-test.json", RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+ assertTrue(String.format("Cartridge did not added: [cartridge-name] %s", "c5-cartridge-group-test"), addedC2);
+
+ boolean addedC3 = restClient.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH +
+ "/" + "c6-cartridge-group-test.json", RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+ assertTrue(String.format("Cartridge did not added: [cartridge-name] %s", "c6-cartridge-group-test"), addedC3);
+
+ boolean added = restClient.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGE_GROUPS_PATH +
+ "/" + "g4-g5-g6-cartridge-group-test.json", RestConstants.CARTRIDGE_GROUPS,
+ RestConstants.CARTRIDGE_GROUPS_NAME);
+ assertTrue(String.format("Cartridge Group did not added: [cartridge-group-name] %s",
+ "g4-g5-g6-cartridge-group-test"), added);
+
+ CartridgeGroupBean bean = (CartridgeGroupBean) restClient.
+ getEntity(RestConstants.CARTRIDGE_GROUPS, "G4-cartridge-group-test", CartridgeGroupBean.class,
+ RestConstants.CARTRIDGE_GROUPS_NAME);
+ assertEquals(bean.getName(), "G4-cartridge-group-test",
+ String.format("Cartridge Group name did not match: [cartridge-group-name] %s",
+ "g4-g5-g6-cartridge-group-test.json"));
+
+ boolean updated = restClient.updateEntity(RESOURCES_PATH + RestConstants.CARTRIDGE_GROUPS_PATH +
+ "/" + "g4-g5-g6-cartridge-group-test-v1.json", RestConstants.CARTRIDGE_GROUPS,
+ RestConstants.CARTRIDGE_GROUPS_NAME);
+ assertTrue(String.format("Cartridge Group did not updated: [cartridge-group-name] %s",
+ "g4-g5-g6-cartridge-group-test"), updated);
+
+ CartridgeGroupBean updatedBean = (CartridgeGroupBean) restClient.
+ getEntity(RestConstants.CARTRIDGE_GROUPS, "G4-cartridge-group-test", CartridgeGroupBean.class,
+ RestConstants.CARTRIDGE_GROUPS_NAME);
+ assertEquals(updatedBean.getName(), "G4-cartridge-group-test",
+ String.format("Updated Cartridge Group didn't match: [cartridge-group-name] %s",
+ "g4-g5-g6-cartridge-group-test"));
+
+ boolean removedC1 = restClient
+ .removeEntity(RestConstants.CARTRIDGES, "c4-cartridge-group-test", RestConstants.CARTRIDGE_GROUPS_NAME);
+ assertFalse(
+ String.format("Cartridge can be removed while it is used in " + "cartridge group: [cartridge-name] %s",
+ "c4-cartridge-group-test"), removedC1);
+
+ boolean removedC2 = restClient
+ .removeEntity(RestConstants.CARTRIDGES, "c5-cartridge-group-test", RestConstants.CARTRIDGE_GROUPS_NAME);
+ assertFalse(
+ String.format("Cartridge can be removed while it is used in " + "cartridge group: [cartridge-name] %s",
+ "c5-cartridge-group-test"), removedC2);
+
+ boolean removedC3 = restClient
+ .removeEntity(RestConstants.CARTRIDGES, "c6-cartridge-group-test", RestConstants.CARTRIDGE_GROUPS_NAME);
+ assertFalse(
+ String.format("Cartridge can be removed while it is used in " + "cartridge group: [cartridge-name] %s",
+ "c6-cartridge-group-test"), removedC3);
+
+ boolean removed = restClient.removeEntity(RestConstants.CARTRIDGE_GROUPS, "G4-cartridge-group-test",
+ RestConstants.CARTRIDGE_GROUPS_NAME);
+ assertTrue(String.format("Cartridge Group did not removed: [cartridge-group-name] %s",
+ "g4-g5-g6-cartridge-group-test"), removed);
+
+ CartridgeGroupBean beanRemoved = (CartridgeGroupBean) restClient.
+ getEntity(RestConstants.CARTRIDGE_GROUPS, "G4-cartridge-group-test", CartridgeGroupBean.class,
+ RestConstants.CARTRIDGE_GROUPS_NAME);
+ assertEquals(beanRemoved, null,
+ String.format("Cartridge Group did not removed completely: [cartridge-group-name] %s",
+ "g4-g5-g6-cartridge-group-test"));
+
+ removedC1 = restClient
+ .removeEntity(RestConstants.CARTRIDGES, "c4-cartridge-group-test", RestConstants.CARTRIDGE_GROUPS_NAME);
+ assertTrue(String.format("Cartridge can not be removed : [cartridge-name] %s", "c4-cartridge-group-test"),
+ removedC1);
+
+ removedC2 = restClient
+ .removeEntity(RestConstants.CARTRIDGES, "c5-cartridge-group-test", RestConstants.CARTRIDGE_GROUPS_NAME);
+ assertTrue(String.format("Cartridge can not be removed : [cartridge-name] %s", "c5-cartridge-group-test"),
+ removedC2);
+
+ removedC3 = restClient
+ .removeEntity(RestConstants.CARTRIDGES, "c6-cartridge-group-test", RestConstants.CARTRIDGE_GROUPS_NAME);
+ assertTrue(String.format("Cartridge can not be removed : [cartridge-name] %s", "c6-cartridge-group-test"),
+ removedC3);
+ }
+
+ @Test(timeOut = DEFAULT_TEST_TIMEOUT,
+ priority = 2)
+ public void testCartridgeGroupList() throws Exception {
+ log.info("Running CartridgeGroupTestCase.testCartridgeGroupList test method...");
+ boolean addedC1 = restClient.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH +
+ "/" + "c4-cartridge-group-test.json", RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+ assertTrue(String.format("Cartridge did not added: [cartridge-name] %s", "c4-cartridge-group-test"), addedC1);
+
+ boolean addedC2 = restClient.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH +
+ "/" + "c5-cartridge-group-test.json", RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+ assertTrue(String.format("Cartridge did not added: [cartridge-name] %s", "c5-cartridge-group-test"), addedC2);
+
+ boolean addedC3 = restClient.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH +
+ "/" + "c6-cartridge-group-test.json", RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+ assertTrue(String.format("Cartridge did not added: [cartridge-name] %s", "c6-cartridge-group-test"), addedC3);
+
+ String group1 = "group-1-cartridge-group-test";
+ String group2 = "group-2-cartridge-group-test";
+
+ boolean added = restClient.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGE_GROUPS_PATH +
+ "/" + group1 + ".json", RestConstants.CARTRIDGE_GROUPS, RestConstants.CARTRIDGE_GROUPS_NAME);
+ assertTrue(String.format("Cartridge Group did not added: [cartridge-group-name] %s", group1), added);
+
+ added = restClient.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGE_GROUPS_PATH +
+ "/" + group2 + ".json", RestConstants.CARTRIDGE_GROUPS, RestConstants.CARTRIDGE_GROUPS_NAME);
+ assertTrue(String.format("Cartridge Group did not added: [cartridge-group-name] %s", group1), added);
+
+ Type listType = new TypeToken<ArrayList<CartridgeGroupBean>>() {
+ }.getType();
+
+ List<CartridgeGroupBean> cartridgeGroupList = (List<CartridgeGroupBean>) restClient.
+ listEntity(RestConstants.CARTRIDGE_GROUPS, listType, RestConstants.CARTRIDGE_GROUPS_NAME);
+ assertTrue(cartridgeGroupList.size() >= 2);
+
+ CartridgeGroupBean bean1 = null;
+ for (CartridgeGroupBean cartridgeGroupBean : cartridgeGroupList) {
+ if (cartridgeGroupBean.getName().equals(group1)) {
+ bean1 = cartridgeGroupBean;
+ }
+ }
+ assertNotNull(bean1);
+
+ CartridgeGroupBean bean2 = null;
+ for (CartridgeGroupBean cartridgeGroupBean : cartridgeGroupList) {
+ if (cartridgeGroupBean.getName().equals(group2)) {
+ bean2 = cartridgeGroupBean;
+ }
+ }
+ assertNotNull(bean2);
+
+ boolean removed = restClient
+ .removeEntity(RestConstants.CARTRIDGE_GROUPS, group1, RestConstants.CARTRIDGE_GROUPS_NAME);
+ assertTrue(String.format("Cartridge Group did not removed: [cartridge-group-name] %s", group1), removed);
+
+ CartridgeGroupBean beanRemoved = (CartridgeGroupBean) restClient.
+ getEntity(RestConstants.CARTRIDGE_GROUPS, group1, CartridgeGroupBean.class,
+ RestConstants.CARTRIDGE_GROUPS_NAME);
+ assertNull(String.format("Cartridge Group did not removed completely: " + "[cartridge-group-name] %s", group1),
+ beanRemoved);
+
+ boolean removedC1 = restClient
+ .removeEntity(RestConstants.CARTRIDGES, "c4-cartridge-group-test", RestConstants.CARTRIDGE_GROUPS_NAME);
+ assertFalse(
+ String.format("Cartridge can be removed while it is used in " + "cartridge group: [cartridge-name] %s",
+ "c4-cartridge-group-test"), removedC1);
+
+ boolean removedC2 = restClient
+ .removeEntity(RestConstants.CARTRIDGES, "c5-cartridge-group-test", RestConstants.CARTRIDGE_GROUPS_NAME);
+ assertFalse(
+ String.format("Cartridge can be removed while it is used in " + "cartridge group: [cartridge-name] %s",
+ "c5-cartridge-group-test"), removedC2);
+
+ boolean removedC3 = restClient
+ .removeEntity(RestConstants.CARTRIDGES, "c6-cartridge-group-test", RestConstants.CARTRIDGE_GROUPS_NAME);
+ assertFalse(
+ String.format("Cartridge can be removed while it is used in " + "cartridge group: [cartridge-name] %s",
+ "c6-cartridge-group-test"), removedC3);
+
+ removed = restClient.removeEntity(RestConstants.CARTRIDGE_GROUPS, group2, RestConstants.CARTRIDGE_GROUPS_NAME);
+ assertTrue(String.format("Cartridge Group did not removed: [cartridge-group-name] %s", group2), removed);
+
+ beanRemoved = (CartridgeGroupBean) restClient.
+ getEntity(RestConstants.CARTRIDGE_GROUPS, group2, CartridgeGroupBean.class,
+ RestConstants.CARTRIDGE_GROUPS_NAME);
+ assertNull(String.format("Cartridge Group did not removed completely: " + "[cartridge-group-name] %s", group2),
+ beanRemoved);
+
+ removedC1 = restClient
+ .removeEntity(RestConstants.CARTRIDGES, "c4-cartridge-group-test", RestConstants.CARTRIDGE_GROUPS_NAME);
+ assertTrue(String.format("Cartridge can not be removed : [cartridge-name] %s", "c4-cartridge-group-test"),
+ removedC1);
+
+ removedC2 = restClient
+ .removeEntity(RestConstants.CARTRIDGES, "c5-cartridge-group-test", RestConstants.CARTRIDGE_GROUPS_NAME);
+ assertTrue(String.format("Cartridge can not be removed : [cartridge-name] %s", "c5-cartridge-group-test"),
+ removedC2);
+
+ removedC3 = restClient
+ .removeEntity(RestConstants.CARTRIDGES, "c6-cartridge-group-test", RestConstants.CARTRIDGE_GROUPS_NAME);
+ assertTrue(String.format("Cartridge can not be removed : [cartridge-name] %s", "c6-cartridge-group-test"),
+ removedC3);
+ long duration = System.currentTimeMillis() - startTime;
+ log.info(String.format("ApplicationBurstingTestCase completed in [duration] %s ms", duration));
+ }
+}
http://git-wip-us.apache.org/repos/asf/stratos/blob/a22f27a6/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/cartridge/CartridgeTestCase.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/cartridge/CartridgeTestCase.java b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/cartridge/CartridgeTestCase.java
new file mode 100644
index 0000000..3672373
--- /dev/null
+++ b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/cartridge/CartridgeTestCase.java
@@ -0,0 +1,183 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.stratos.integration.tests.cartridge;
+
+import com.google.gson.reflect.TypeToken;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.stratos.common.beans.PropertyBean;
+import org.apache.stratos.common.beans.cartridge.CartridgeBean;
+import org.apache.stratos.integration.common.RestConstants;
+import org.apache.stratos.integration.tests.StratosIntegrationTest;
+import org.testng.annotations.Test;
+
+import java.lang.reflect.Type;
+import java.util.ArrayList;
+import java.util.List;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertNull;
+import static org.testng.AssertJUnit.assertNotNull;
+import static org.testng.AssertJUnit.assertTrue;
+
+/**
+ * Test to handle Cartridge CRUD operations
+ */
+@Test(groups = { "cartridge" })
+public class CartridgeTestCase extends StratosIntegrationTest {
+ private static final Log log = LogFactory.getLog(CartridgeTestCase.class);
+ private static final String RESOURCES_PATH = "/cartridge-test";
+ private long startTime;
+
+ @Test(timeOut = DEFAULT_TEST_TIMEOUT,
+ priority = 1)
+ public void testCartridge() throws Exception {
+ log.info("Running CartridgeTestCase.testCartridge test method...");
+ startTime = System.currentTimeMillis();
+
+ String cartridgeType = "c0-cartridge-test";
+ boolean added = restClient.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" +
+ cartridgeType + ".json", RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+ assertTrue(added);
+ CartridgeBean bean = (CartridgeBean) restClient.
+ getEntity(RestConstants.CARTRIDGES, cartridgeType, CartridgeBean.class, RestConstants.CARTRIDGES_NAME);
+ assertEquals(bean.getCategory(), "Application");
+ assertEquals(bean.getHost(), "qmog.cisco.com");
+ for (PropertyBean property : bean.getProperty()) {
+ if (property.getName().equals("payload_parameter.CEP_IP")) {
+ assertEquals(property.getValue(), "octl.qmog.cisco.com");
+ } else if (property.getName().equals("payload_parameter.CEP_ADMIN_PASSWORD")) {
+ assertEquals(property.getValue(), "admin");
+ } else if (property.getName().equals("payload_parameter.MONITORING_SERVER_IP")) {
+ assertEquals(property.getValue(), "octl.qmog.cisco.com");
+ } else if (property.getName().equals("payload_parameter.QTCM_NETWORK_COUNT")) {
+ assertEquals(property.getValue(), "1");
+ } else if (property.getName().equals("payload_parameter.MONITORING_SERVER_ADMIN_PASSWORD")) {
+ assertEquals(property.getValue(), "admin");
+ } else if (property.getName().equals("payload_parameter.QTCM_DNS_SEGMENT")) {
+ assertEquals(property.getValue(), "test");
+ } else if (property.getName().equals("payload_parameter.MONITORING_SERVER_SECURE_PORT")) {
+ assertEquals(property.getValue(), "7711");
+ } else if (property.getName().equals("payload_parameter.MONITORING_SERVER_PORT")) {
+ assertEquals(property.getValue(), "7611");
+ } else if (property.getName().equals("payload_parameter.CEP_PORT")) {
+ assertEquals(property.getValue(), "7611");
+ } else if (property.getName().equals("payload_parameter.MB_PORT")) {
+ assertEquals(property.getValue(), "61616");
+ }
+ }
+
+ boolean updated = restClient.updateEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" +
+ cartridgeType + "-v1.json", RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+ assertTrue(updated);
+ CartridgeBean updatedBean = (CartridgeBean) restClient.
+ getEntity(RestConstants.CARTRIDGES, cartridgeType, CartridgeBean.class, RestConstants.CARTRIDGES_NAME);
+ assertEquals(updatedBean.getType(), "c0-cartridge-test");
+ assertEquals(updatedBean.getCategory(), "Data");
+ assertEquals(updatedBean.getHost(), "qmog.cisco.com12");
+ for (PropertyBean property : updatedBean.getProperty()) {
+ if (property.getName().equals("payload_parameter.CEP_IP")) {
+ assertEquals(property.getValue(), "octl.qmog.cisco.com123");
+ } else if (property.getName().equals("payload_parameter.CEP_ADMIN_PASSWORD")) {
+ assertEquals(property.getValue(), "admin123");
+ } else if (property.getName().equals("payload_parameter.MONITORING_SERVER_IP")) {
+ assertEquals(property.getValue(), "octl.qmog.cisco.com123");
+ } else if (property.getName().equals("payload_parameter.QTCM_NETWORK_COUNT")) {
+ assertEquals(property.getValue(), "3");
+ } else if (property.getName().equals("payload_parameter.MONITORING_SERVER_ADMIN_PASSWORD")) {
+ assertEquals(property.getValue(), "admin123");
+ } else if (property.getName().equals("payload_parameter.QTCM_DNS_SEGMENT")) {
+ assertEquals(property.getValue(), "test123");
+ } else if (property.getName().equals("payload_parameter.MONITORING_SERVER_SECURE_PORT")) {
+ assertEquals(property.getValue(), "7712");
+ } else if (property.getName().equals("payload_parameter.MONITORING_SERVER_PORT")) {
+ assertEquals(property.getValue(), "7612");
+ } else if (property.getName().equals("payload_parameter.CEP_PORT")) {
+ assertEquals(property.getValue(), "7612");
+ } else if (property.getName().equals("payload_parameter.MB_PORT")) {
+ assertEquals(property.getValue(), "61617");
+ }
+ }
+
+ boolean removed = restClient
+ .removeEntity(RestConstants.CARTRIDGES, cartridgeType, RestConstants.CARTRIDGES_NAME);
+ assertTrue(removed);
+
+ CartridgeBean beanRemoved = (CartridgeBean) restClient.
+ getEntity(RestConstants.CARTRIDGES, cartridgeType, CartridgeBean.class, RestConstants.CARTRIDGES_NAME);
+ assertNull(beanRemoved);
+ }
+
+ @Test(timeOut = DEFAULT_TEST_TIMEOUT,
+ priority = 2)
+ public void testCartridgeList() throws Exception {
+ log.info("Running CartridgeTestCase.testCartridgeList test method...");
+
+ String cartridgeType1 = "c1-cartridge-test";
+ String cartridgeType2 = "c2-cartridge-test";
+ boolean added1 = restClient.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" +
+ cartridgeType1 + ".json", RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+ assertTrue(added1);
+
+ boolean added2 = restClient.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" +
+ cartridgeType2 + ".json", RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+ assertTrue(added2);
+
+ Type listType = new TypeToken<ArrayList<CartridgeBean>>() {
+ }.getType();
+
+ List<CartridgeBean> cartridgeList = (List<CartridgeBean>) restClient
+ .listEntity(RestConstants.CARTRIDGES, listType, RestConstants.CARTRIDGES_NAME);
+ assertTrue(cartridgeList.size() >= 2);
+
+ CartridgeBean bean1 = null;
+ for (CartridgeBean cartridgeBean : cartridgeList) {
+ if (cartridgeBean.getType().equals(cartridgeType1)) {
+ bean1 = cartridgeBean;
+ }
+ }
+ assertNotNull(bean1);
+
+ CartridgeBean bean2 = null;
+ for (CartridgeBean cartridgeBean : cartridgeList) {
+ if (cartridgeBean.getType().equals(cartridgeType1)) {
+ bean2 = cartridgeBean;
+ }
+ }
+ assertNotNull(bean2);
+
+ boolean removed = restClient
+ .removeEntity(RestConstants.CARTRIDGES, cartridgeType1, RestConstants.CARTRIDGES_NAME);
+ assertTrue(removed);
+
+ CartridgeBean beanRemoved = (CartridgeBean) restClient.
+ getEntity(RestConstants.CARTRIDGES, cartridgeType1, CartridgeBean.class, RestConstants.CARTRIDGES_NAME);
+ assertEquals(beanRemoved, null);
+
+ removed = restClient.removeEntity(RestConstants.CARTRIDGES, cartridgeType2, RestConstants.CARTRIDGES_NAME);
+ assertTrue(removed);
+
+ beanRemoved = (CartridgeBean) restClient.
+ getEntity(RestConstants.CARTRIDGES, cartridgeType2, CartridgeBean.class, RestConstants.CARTRIDGES_NAME);
+ assertNull(beanRemoved);
+ long duration = System.currentTimeMillis() - startTime;
+ log.info(String.format("CartridgeTestCase completed in [duration] %s ms", duration));
+ }
+}
[02/50] [abbrv] stratos git commit: Fix formatting. Move
acquireRad/WriteLock out of try block.
Posted by ga...@apache.org.
Fix formatting. Move acquireRad/WriteLock out of try block.
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/452c31fa
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/452c31fa
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/452c31fa
Branch: refs/heads/release-4.1.5
Commit: 452c31fa771ce46027ff7786cdcee98fbc8535bd
Parents: b9a4f12
Author: Akila Perera <ra...@gmail.com>
Authored: Mon Nov 30 00:20:29 2015 +0530
Committer: gayangunarathne <ga...@wso2.com>
Committed: Mon Dec 7 10:16:25 2015 +0000
----------------------------------------------------------------------
.../messaging/topology/TopologyBuilder.java | 66 +++++++++-----------
1 file changed, 29 insertions(+), 37 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/452c31fa/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/messaging/topology/TopologyBuilder.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/messaging/topology/TopologyBuilder.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/messaging/topology/TopologyBuilder.java
index d0a21d1..109cf30 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/messaging/topology/TopologyBuilder.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/messaging/topology/TopologyBuilder.java
@@ -69,8 +69,8 @@ public class TopologyBuilder {
if (cartridgeList == null) {
throw new RuntimeException("Cartridge list is empty");
}
+ TopologyHolder.acquireWriteLock();
try {
- TopologyHolder.acquireWriteLock();
for (Cartridge cartridge : cartridgeList) {
if (!topology.serviceExists(cartridge.getType())) {
ServiceType serviceType = cartridge.isMultiTenant() ?
@@ -126,8 +126,8 @@ public class TopologyBuilder {
throw new RuntimeException(String.format("Service %s does not exist", cartridge.getType()));
}
if (service.getClusters().size() == 0) {
+ TopologyHolder.acquireWriteLock();
try {
- TopologyHolder.acquireWriteLock();
topology.removeService(cartridge.getType());
TopologyHolder.updateTopology(topology);
} finally {
@@ -149,8 +149,8 @@ public class TopologyBuilder {
for (Cluster cluster : appClusters) {
Service service = topology.getService(cluster.getServiceName());
if (service == null) {
- throw new RuntimeException("Service " + cluster.getServiceName()
- + " not found in topology, unable to create cluster");
+ throw new RuntimeException(
+ "Service " + cluster.getServiceName() + " not found in topology, unable to create cluster");
}
service.addCluster(cluster);
log.info("Cluster created: [cluster] " + cluster.getClusterId());
@@ -312,8 +312,8 @@ public class TopologyBuilder {
throw new RuntimeException(String.format("Cluster %s does not exist for service %s", ctxt.getClusterId(),
ctxt.getCartridgeType()));
}
+ TopologyHolder.acquireWriteLock();
try {
- TopologyHolder.acquireWriteLock();
Cluster cluster = service.removeCluster(ctxt.getClusterId());
deploymentPolicy = cluster.getDeploymentPolicyName();
TopologyHolder.updateTopology(topology);
@@ -344,8 +344,8 @@ public class TopologyBuilder {
if (cluster.memberExists(memberId)) {
throw new RuntimeException(String.format("Member %s already exists", memberId));
}
+ TopologyHolder.acquireWriteLock();
try {
- TopologyHolder.acquireWriteLock();
Member member = new Member(service.getServiceName(), clusterId, memberId, clusterInstanceId,
networkPartitionId, partitionId, memberContext.getLoadBalancingIPType(), initTime);
member.setStatus(MemberStatus.Created);
@@ -396,9 +396,8 @@ public class TopologyBuilder {
if (member == null) {
throw new RuntimeException(String.format("Member %s does not exist", memberContext.getMemberId()));
}
+ TopologyHolder.acquireWriteLock();
try {
- TopologyHolder.acquireWriteLock();
-
// Set instance id returned by the IaaS
member.setInstanceId(memberContext.getInstanceId());
// Set ip addresses
@@ -493,9 +492,8 @@ public class TopologyBuilder {
throw new RuntimeException(
String.format("Member %s does not exist", instanceStartedEvent.getMemberId()));
}
-
+ TopologyHolder.acquireWriteLock();
try {
- TopologyHolder.acquireWriteLock();
// try update lifecycle state
if (!member.isStateTransitionValid(MemberStatus.Starting)) {
log.error("Invalid State Transition from " + member.getStatus() + " to " +
@@ -564,8 +562,8 @@ public class TopologyBuilder {
// grouping - set grouid
//TODO
memberActivatedEvent.setApplicationId(null);
+ TopologyHolder.acquireWriteLock();
try {
- TopologyHolder.acquireWriteLock();
// try update lifecycle state
if (!member.isStateTransitionValid(MemberStatus.Active)) {
log.error("Invalid state transition from [" + member.getStatus() + "] to [" +
@@ -665,9 +663,8 @@ public class TopologyBuilder {
instanceReadyToShutdownEvent.getNetworkPartitionId(), instanceReadyToShutdownEvent.getPartitionId());
//member ReadyToShutDown state change time
Long timestamp = null;
+ TopologyHolder.acquireWriteLock();
try {
- TopologyHolder.acquireWriteLock();
-
if (!member.isStateTransitionValid(MemberStatus.ReadyToShutDown)) {
throw new RuntimeException("Invalid State Transition from " + member.getStatus() + " to " +
MemberStatus.ReadyToShutDown);
@@ -723,8 +720,8 @@ public class TopologyBuilder {
instanceMaintenanceModeEvent.getServiceName(), instanceMaintenanceModeEvent.getClusterId(),
instanceMaintenanceModeEvent.getClusterInstanceId(), instanceMaintenanceModeEvent.getMemberId(),
instanceMaintenanceModeEvent.getNetworkPartitionId(), instanceMaintenanceModeEvent.getPartitionId());
+ TopologyHolder.acquireWriteLock();
try {
- TopologyHolder.acquireWriteLock();
// try update lifecycle state
if (!member.isStateTransitionValid(MemberStatus.In_Maintenance)) {
throw new RuntimeException(
@@ -769,15 +766,15 @@ public class TopologyBuilder {
String clusterAlias = CloudControllerUtil.getAliasFromClusterId(clusterId);
Member member = cluster.getMember(memberId);
if (member == null) {
- throw new RuntimeException((String.format("Member %s does not exist", memberId)));
+ throw new RuntimeException((String.format("Member [member-id] %s does not exist", memberId)));
}
String clusterInstanceId = member.getClusterInstanceId();
//member terminated time
Long timestamp = null;
+ TopologyHolder.acquireWriteLock();
try {
- TopologyHolder.acquireWriteLock();
properties = member.getProperties();
cluster.removeMember(member);
TopologyHolder.updateTopology(topology);
@@ -804,7 +801,6 @@ public class TopologyBuilder {
public static void handleClusterActivatedEvent(
ClusterStatusClusterActivatedEvent clusterStatusClusterActivatedEvent) throws RegistryException {
-
Topology topology = TopologyHolder.getTopology();
Service service = topology.getService(clusterStatusClusterActivatedEvent.getServiceName());
//update the status of the cluster
@@ -830,12 +826,10 @@ public class TopologyBuilder {
ClusterInstanceActivatedEvent clusterInstanceActivatedEvent = new ClusterInstanceActivatedEvent(
clusterStatusClusterActivatedEvent.getAppId(), clusterStatusClusterActivatedEvent.getServiceName(),
clusterStatusClusterActivatedEvent.getClusterId(), clusterStatusClusterActivatedEvent.getInstanceId());
+ TopologyHolder.acquireWriteLock();
try {
- TopologyHolder.acquireWriteLock();
-
Collection<KubernetesService> kubernetesServices = clusterContext
.getKubernetesServices(clusterStatusClusterActivatedEvent.getInstanceId());
-
if ((kubernetesServices != null) && (kubernetesServices.size() > 0)) {
try {
// Generate access URLs for kubernetes services
@@ -850,28 +844,28 @@ public class TopologyBuilder {
// Using type URI since only http, https, ftp, file, jar protocols are
// supported in URL
int port = kubernetesService.getPort();
- if(cluster.getLoadBalancerIps().size() > 0) {
+ if (cluster.getLoadBalancerIps().size() > 0) {
// Load balancer ips have been provided, need to use proxy port
port = findProxyPort(applicationId, clusterId, kubernetesService.getPortName());
}
- URI accessURL = new URI(kubernetesService.getProtocol(), null, hostname,
- port, null, null, null);
+ URI accessURL = new URI(kubernetesService.getProtocol(), null, hostname, port, null,
+ null, null);
cluster.addAccessUrl(clusterStatusClusterActivatedEvent.getInstanceId(),
accessURL.toString());
clusterInstanceActivatedEvent.addAccessUrl(accessURL.toString());
}
}
}
- if(cluster.getLoadBalancerIps().size() == 0) {
+ if (cluster.getLoadBalancerIps().size() == 0) {
// Load balancer ips not given, use node public ips as load balancer ips
List<String> nodePublicIpsList = new ArrayList<>();
nodePublicIpsList.addAll(nodePublicIps);
cluster.setLoadBalancerIps(nodePublicIpsList);
clusterInstanceActivatedEvent.setLoadBalancerIps(nodePublicIpsList);
}
- log.info(String.format("Access URLs generated for kubernetes services: [application] %s " +
- "[cluster] %s [access-urls] %s",
- applicationId, clusterId, clusterInstanceActivatedEvent.getAccessUrls()));
+ log.info(String.format("Access URLs generated for kubernetes services: [application] %s "
+ + "[cluster] %s [access-urls] %s", applicationId, clusterId,
+ clusterInstanceActivatedEvent.getAccessUrls()));
} catch (URISyntaxException e) {
log.error("Could not generate access URLs for Kubernetes services", e);
}
@@ -881,8 +875,8 @@ public class TopologyBuilder {
getClusterPortMappings(applicationId, clusterId);
for (ClusterPortMapping portMapping : portMappings) {
for (String hostname : cluster.getHostNames()) {
- URI accessURL = new URI(portMapping.getProtocol(), null, hostname,
- portMapping.getPort(), null, null, null);
+ URI accessURL = new URI(portMapping.getProtocol(), null, hostname, portMapping.getPort(),
+ null, null, null);
cluster.addAccessUrl(clusterStatusClusterActivatedEvent.getInstanceId(),
accessURL.toString());
clusterInstanceActivatedEvent.addAccessUrl(accessURL.toString());
@@ -924,13 +918,14 @@ public class TopologyBuilder {
private static int findProxyPort(String applicationId, String clusterId, String portName) {
List<ClusterPortMapping> portMappings = CloudControllerContext.getInstance().
getClusterPortMappings(applicationId, clusterId);
- for(ClusterPortMapping portMapping : portMappings) {
- if(portMapping.getName().equals(portName)) {
+ for (ClusterPortMapping portMapping : portMappings) {
+ if (portMapping.getName().equals(portName)) {
return portMapping.getProxyPort();
}
}
- throw new RuntimeException(String.format("Port mapping not found: [application] %s [cluster] %s " +
- "[port-name] %s", applicationId, clusterId, portName));
+ throw new RuntimeException(
+ String.format("Port mapping not found: [application] %s [cluster] %s " + "[port-name] %s",
+ applicationId, clusterId, portName));
}
public static void handleClusterInactivateEvent(ClusterStatusClusterInactivateEvent clusterInactivateEvent)
@@ -953,8 +948,8 @@ public class TopologyBuilder {
ClusterInstanceInactivateEvent clusterInactivatedEvent1 = new ClusterInstanceInactivateEvent(
clusterInactivateEvent.getAppId(), clusterInactivateEvent.getServiceName(),
clusterInactivateEvent.getClusterId(), clusterInactivateEvent.getInstanceId());
+ TopologyHolder.acquireWriteLock();
try {
- TopologyHolder.acquireWriteLock();
ClusterInstance context = cluster.getInstanceContexts(clusterInactivateEvent.getInstanceId());
if (context == null) {
throw new RuntimeException("Cluster Instance Context is not found for [cluster] " +
@@ -1024,14 +1019,11 @@ public class TopologyBuilder {
} finally {
TopologyHolder.releaseWriteLock();
}
-
}
public static void handleClusterTerminatingEvent(ClusterStatusClusterTerminatingEvent event)
throws RegistryException {
-
TopologyHolder.acquireWriteLock();
-
try {
Topology topology = TopologyHolder.getTopology();
Cluster cluster = topology.getService(event.getServiceName()).
[47/50] [abbrv] stratos git commit: Changing cep and das distibution
name
Posted by ga...@apache.org.
Changing cep and das distibution name
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/65142d8f
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/65142d8f
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/65142d8f
Branch: refs/heads/release-4.1.5
Commit: 65142d8f19679b037a775930e8781d50f049aa56
Parents: 10a2545
Author: Thanuja <th...@wso2.com>
Authored: Sun Dec 6 14:14:09 2015 +0530
Committer: gayangunarathne <ga...@wso2.com>
Committed: Mon Dec 7 10:16:30 2015 +0000
----------------------------------------------------------------------
extensions/cep/modules/distribution/pom.xml | 6 +++---
extensions/das/modules/distribution/pom.xml | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/65142d8f/extensions/cep/modules/distribution/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/cep/modules/distribution/pom.xml b/extensions/cep/modules/distribution/pom.xml
index 8f6442a..5c0e1c5 100644
--- a/extensions/cep/modules/distribution/pom.xml
+++ b/extensions/cep/modules/distribution/pom.xml
@@ -27,10 +27,10 @@
<relativePath>../../pom.xml</relativePath>
</parent>
- <artifactId>apache-stratos-cep-artifacts</artifactId>
+ <artifactId>apache-stratos-cep-extension</artifactId>
<packaging>pom</packaging>
- <name>Apache Stratos - CEP Artifacts</name>
- <description>Apache Stratos CEP artifacts</description>
+ <name>Apache Stratos - CEP Extension</name>
+ <description>Apache Stratos CEP Extension</description>
<profiles>
<profile>
http://git-wip-us.apache.org/repos/asf/stratos/blob/65142d8f/extensions/das/modules/distribution/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/das/modules/distribution/pom.xml b/extensions/das/modules/distribution/pom.xml
index d8ab5d8..cfb212c 100644
--- a/extensions/das/modules/distribution/pom.xml
+++ b/extensions/das/modules/distribution/pom.xml
@@ -27,10 +27,10 @@
<relativePath>../../pom.xml</relativePath>
</parent>
- <artifactId>apache-stratos-das-artifacts</artifactId>
+ <artifactId>apache-stratos-das-extension</artifactId>
<packaging>pom</packaging>
- <name>Apache Stratos - DAS Artifacts</name>
- <description>Apache Stratos DAS Artifacts</description>
+ <name>Apache Stratos - DAS Extension</name>
+ <description>Apache Stratos DAS Extension</description>
<profiles>
<profile>
[10/50] [abbrv] stratos git commit: Update log4j.properties file used
in integration test with necessary DEBUG logs to help troubleshoot test
failures
Posted by ga...@apache.org.
Update log4j.properties file used in integration test with necessary DEBUG logs to help troubleshoot test failures
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/f6c828a6
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/f6c828a6
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/f6c828a6
Branch: refs/heads/release-4.1.5
Commit: f6c828a64a556e00e77740b7c6a2c509d46e87eb
Parents: 0725fb1
Author: Akila Perera <ra...@gmail.com>
Authored: Mon Nov 30 00:29:05 2015 +0530
Committer: gayangunarathne <ga...@wso2.com>
Committed: Mon Dec 7 10:16:26 2015 +0000
----------------------------------------------------------------------
.../src/test/resources/common/log4j.properties | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/f6c828a6/products/stratos/modules/integration/test-integration/src/test/resources/common/log4j.properties
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/common/log4j.properties b/products/stratos/modules/integration/test-integration/src/test/resources/common/log4j.properties
index 2d49c47..f948315 100644
--- a/products/stratos/modules/integration/test-integration/src/test/resources/common/log4j.properties
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/common/log4j.properties
@@ -52,17 +52,23 @@ log4j.logger.me.prettyprint.cassandra.hector.TimingLogger=ERROR
log4j.logger.org.wso2=INFO
# Apache Stratos logging configuration
-log4j.logger.org.apache.stratos.manager=INFO
+log4j.logger.org.apache.stratos.manager=DEBUG
log4j.logger.org.apache.stratos.autoscaler=DEBUG
log4j.logger.org.apache.stratos.messaging=INFO
log4j.logger.org.apache.stratos.cloud.controller=DEBUG
log4j.logger.org.wso2.andes.client=ERROR
# Autoscaler rule logs
-log4j.logger.org.apache.stratos.autoscaler.rule.RuleLog=DEBUG
+log4j.logger.org.apache.stratos.autoscaler.rule.RuleLog=INFO
+
log4j.logger.org.apache.stratos.cloud.controller.messaging.topology.TopologyHolder=INFO
-log4j.logger.org.apache.stratos.mock.iaas.client=DEBUG
-log4j.logger.org.apache.stratos.mock.iaas.services=DEBUG
+log4j.logger.org.apache.stratos.mock.iaas=DEBUG
+log4j.logger.org.apache.stratos.mock.iaas.client=INFO
+log4j.logger.org.apache.stratos.mock.iaas.statistics.publisher=INFO
log4j.logger.org.apache.stratos.metadata.service=DEBUG
+log4j.logger.org.apache.stratos.messaging.message.processor.application=DEBUG
+log4j.logger.org.apache.stratos.messaging.message.processor.cluster=DEBUG
+log4j.logger.org.apache.stratos.messaging.domain.application=DEBUG
+log4j.logger.org.apache.stratos.autoscaler.applications.ApplicationHolder=INFO
# Apache jclouds
#log4j.logger.jclouds.wire=DEBUG
[26/50] [abbrv] stratos git commit: Adding cep extension jars to
distribution
Posted by ga...@apache.org.
Adding cep extension jars to distribution
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/3bb3484a
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/3bb3484a
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/3bb3484a
Branch: refs/heads/release-4.1.5
Commit: 3bb3484a2f9b6e0ddbbfb55716e661e84ee3d526
Parents: beae56f
Author: Thanuja <th...@wso2.com>
Authored: Mon Nov 30 01:46:11 2015 +0530
Committer: gayangunarathne <ga...@wso2.com>
Committed: Mon Dec 7 10:16:27 2015 +0000
----------------------------------------------------------------------
extensions/cep/modules/distribution/pom.xml | 10 ++++++++++
extensions/cep/modules/distribution/src/assembly/bin.xml | 9 +++++++++
extensions/cep/pom.xml | 2 +-
pom.xml | 10 ++++++++++
4 files changed, 30 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/3bb3484a/extensions/cep/modules/distribution/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/cep/modules/distribution/pom.xml b/extensions/cep/modules/distribution/pom.xml
index 923d815..9d88b6e 100644
--- a/extensions/cep/modules/distribution/pom.xml
+++ b/extensions/cep/modules/distribution/pom.xml
@@ -63,4 +63,14 @@
</build>
</profile>
</profiles>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.stratos</groupId>
+ <artifactId>org.apache.stratos.cep300.extension</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.stratos</groupId>
+ <artifactId>org.apache.stratos.cep.310.extension</artifactId>
+ </dependency>
+ </dependencies>
</project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/3bb3484a/extensions/cep/modules/distribution/src/assembly/bin.xml
----------------------------------------------------------------------
diff --git a/extensions/cep/modules/distribution/src/assembly/bin.xml b/extensions/cep/modules/distribution/src/assembly/bin.xml
index 509a6e2..8706de0 100755
--- a/extensions/cep/modules/distribution/src/assembly/bin.xml
+++ b/extensions/cep/modules/distribution/src/assembly/bin.xml
@@ -56,4 +56,13 @@
<fileMode>644</fileMode>
</file>
</files>
+ <dependencySets>
+ <dependencySet>
+ <outputDirectory>${project.artifactId}-${project.version}/lib</outputDirectory>
+ <includes>
+ <include>org.apache.stratos:org.apache.stratos.cep300.extension:jar</include>
+ <include>org.apache.stratos:org.apache.stratos.cep.310.extension:jar</include>
+ </includes>
+ </dependencySet>
+ </dependencySets>
</assembly>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/3bb3484a/extensions/cep/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/cep/pom.xml b/extensions/cep/pom.xml
index 6c182f4..4d9fa76 100644
--- a/extensions/cep/pom.xml
+++ b/extensions/cep/pom.xml
@@ -32,8 +32,8 @@
<description>Apache Stratos CEP Extensions</description>
<modules>
- <module>modules/distribution</module>
<module>modules/stratos-cep-extension/wso2cep-3.0.0</module>
<module>modules/stratos-cep-extension/wso2cep-3.1.0</module>
+ <module>modules/distribution</module>
</modules>
</project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/3bb3484a/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 7686da2..be072eb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1028,6 +1028,16 @@
</dependency>
<dependency>
<groupId>org.apache.stratos</groupId>
+ <artifactId>org.apache.stratos.cep300.extension</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.stratos</groupId>
+ <artifactId>org.apache.stratos.cep.310.extension</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.stratos</groupId>
<artifactId>org.apache.stratos.das.extension</artifactId>
<version>${project.version}</version>
</dependency>
[30/50] [abbrv] stratos git commit: Fixing the issue of data
publishers are created for nodes which has false value set to
statsPublisherEnabled in thrift-client-config.xml
Posted by ga...@apache.org.
Fixing the issue of data publishers are created for nodes which has false value set to statsPublisherEnabled in thrift-client-config.xml
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/06332ee8
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/06332ee8
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/06332ee8
Branch: refs/heads/release-4.1.5
Commit: 06332ee8524dcd664901fe5f094996a2a7bc91d7
Parents: d333ff4
Author: Thanuja <th...@wso2.com>
Authored: Mon Nov 30 01:42:30 2015 +0530
Committer: gayangunarathne <ga...@wso2.com>
Committed: Mon Dec 7 10:16:27 2015 +0000
----------------------------------------------------------------------
.../statistics/publisher/ThriftStatisticsPublisher.java | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/06332ee8/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/statistics/publisher/ThriftStatisticsPublisher.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/statistics/publisher/ThriftStatisticsPublisher.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/statistics/publisher/ThriftStatisticsPublisher.java
index 95c0478..f86293a 100644
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/statistics/publisher/ThriftStatisticsPublisher.java
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/statistics/publisher/ThriftStatisticsPublisher.java
@@ -85,11 +85,13 @@ public class ThriftStatisticsPublisher implements StatisticsPublisher {
ArrayList<ReceiverGroup> receiverGroups = new ArrayList<ReceiverGroup>();
for (ThriftClientInfo thriftClientInfo : thriftClientInfoList) {
- ArrayList<DataPublisherHolder> dataPublisherHolders = new ArrayList<DataPublisherHolder>();
- DataPublisherHolder aNode = new DataPublisherHolder(null, buildUrl(thriftClientInfo), thriftClientInfo.getUsername(), thriftClientInfo.getPassword());
- dataPublisherHolders.add(aNode);
- ReceiverGroup group = new ReceiverGroup(dataPublisherHolders);
- receiverGroups.add(group);
+ if (thriftClientInfo.isStatsPublisherEnabled()) {
+ ArrayList<DataPublisherHolder> dataPublisherHolders = new ArrayList<DataPublisherHolder>();
+ DataPublisherHolder aNode = new DataPublisherHolder(null, buildUrl(thriftClientInfo), thriftClientInfo.getUsername(), thriftClientInfo.getPassword());
+ dataPublisherHolders.add(aNode);
+ ReceiverGroup group = new ReceiverGroup(dataPublisherHolders);
+ receiverGroups.add(group);
+ }
}
return receiverGroups;
[20/50] [abbrv] stratos git commit: Catch a generic Exception in
MetadataApi
Posted by ga...@apache.org.
Catch a generic Exception in MetadataApi
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/3a31c1c9
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/3a31c1c9
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/3a31c1c9
Branch: refs/heads/release-4.1.5
Commit: 3a31c1c9e52dbcbdbb934e6db90b0078888fe403
Parents: 452c31f
Author: Akila Perera <ra...@gmail.com>
Authored: Mon Nov 30 00:21:10 2015 +0530
Committer: gayangunarathne <ga...@wso2.com>
Committed: Mon Dec 7 10:16:26 2015 +0000
----------------------------------------------------------------------
.../stratos/metadata/service/api/MetadataApi.java | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/3a31c1c9/components/org.apache.stratos.metadata.service/src/main/java/org/apache/stratos/metadata/service/api/MetadataApi.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.metadata.service/src/main/java/org/apache/stratos/metadata/service/api/MetadataApi.java b/components/org.apache.stratos.metadata.service/src/main/java/org/apache/stratos/metadata/service/api/MetadataApi.java
index 53174e0..053e030 100644
--- a/components/org.apache.stratos.metadata.service/src/main/java/org/apache/stratos/metadata/service/api/MetadataApi.java
+++ b/components/org.apache.stratos.metadata.service/src/main/java/org/apache/stratos/metadata/service/api/MetadataApi.java
@@ -68,7 +68,7 @@ public class MetadataApi {
propertiesArr = new Property[properties.size()];
propertiesArr = properties.toArray(propertiesArr);
}
- } catch (RegistryException e) {
+ } catch (Exception e) {
String msg = "Error occurred while getting properties ";
log.error(msg, e);
throw new RestAPIException(msg, e);
@@ -98,7 +98,7 @@ public class MetadataApi {
propertiesArr = new Property[properties.size()];
propertiesArr = properties.toArray(propertiesArr);
}
- } catch (RegistryException e) {
+ } catch (Exception e) {
String msg = "Error occurred while getting properties ";
log.error(msg, e);
throw new RestAPIException(msg, e);
@@ -133,7 +133,7 @@ public class MetadataApi {
break;
}
}
- } catch (RegistryException e) {
+ } catch (Exception e) {
String msg = "Error occurred while getting property";
log.error(msg, e);
throw new RestAPIException(msg, e);
@@ -169,7 +169,7 @@ public class MetadataApi {
break;
}
}
- } catch (RegistryException e) {
+ } catch (Exception e) {
String msg = "Error occurred while getting property";
log.error(msg, e);
throw new RestAPIException(msg, e);
@@ -194,7 +194,7 @@ public class MetadataApi {
try {
registry.addPropertyToApplication(applicationId, property);
- } catch (RegistryException e) {
+ } catch (Exception e) {
String msg = "Error occurred while adding properties ";
log.error(msg, e);
throw new RestAPIException(msg, e);
@@ -212,7 +212,7 @@ public class MetadataApi {
try {
registry.addPropertyToCluster(applicationId, clusterId, property);
- } catch (RegistryException e) {
+ } catch (Exception e) {
String msg = "Error occurred while adding properties ";
log.error(msg, e);
throw new RestAPIException(msg, e);
@@ -232,7 +232,7 @@ public class MetadataApi {
if (!deleted) {
log.warn(String.format("No metadata is associated with given appId %s", applicationId));
}
- } catch (RegistryException e) {
+ } catch (Exception e) {
String msg = "Resource attached with appId could not be deleted [application-id] " + applicationId;
log.error(msg, e);
throw new RestAPIException(msg, e);
@@ -252,7 +252,7 @@ public class MetadataApi {
if (!deleted) {
log.warn(String.format("No metadata is associated with given appId %s", applicationId));
}
- } catch (RegistryException e) {
+ } catch (Exception e) {
String msg = String
.format("[application-id] %s [property-name] %s deletion failed ", applicationId, propertyName);
log.error(msg, e);
@@ -274,7 +274,7 @@ public class MetadataApi {
if (!deleted) {
log.warn(String.format("No metadata is associated with given [application-id] %s", applicationId));
}
- } catch (RegistryException e) {
+ } catch (Exception e) {
String msg = String
.format("[application-id] %s [property-name] %s [value] %s deletion failed" + applicationId,
propertyName, propertyValue);
[36/50] [abbrv] stratos git commit: Update the thrift config of the
lb extensions
Posted by ga...@apache.org.
Update the thrift config of the lb extensions
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/8bb91b72
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/8bb91b72
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/8bb91b72
Branch: refs/heads/release-4.1.5
Commit: 8bb91b7294aa1d3bd664f858581a88e5f7644696
Parents: 574eb48
Author: gayangunarathne <ga...@wso2.com>
Authored: Sun Dec 6 01:44:36 2015 +0530
Committer: gayangunarathne <ga...@wso2.com>
Committed: Mon Dec 7 10:16:29 2015 +0000
----------------------------------------------------------------------
.../src/main/conf/thrift-client-config.xml | 24 ++++++++++++++++----
.../src/main/conf/thrift-client-config.xml | 24 ++++++++++++++++----
.../src/main/conf/thrift-client-config.xml | 24 ++++++++++++++++----
.../src/main/conf/thrift-client-config.xml | 24 +++++++++++++++-----
4 files changed, 75 insertions(+), 21 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/8bb91b72/extensions/load-balancer/modules/aws-extension/src/main/conf/thrift-client-config.xml
----------------------------------------------------------------------
diff --git a/extensions/load-balancer/modules/aws-extension/src/main/conf/thrift-client-config.xml b/extensions/load-balancer/modules/aws-extension/src/main/conf/thrift-client-config.xml
index 5cacada..2e95c57 100644
--- a/extensions/load-balancer/modules/aws-extension/src/main/conf/thrift-client-config.xml
+++ b/extensions/load-balancer/modules/aws-extension/src/main/conf/thrift-client-config.xml
@@ -20,8 +20,22 @@
<!-- Apache thrift client configuration for publishing statistics to WSO2 CEP -->
<thriftClientConfiguration>
- <username>admin</username>
- <password>admin</password>
- <ip>localhost</ip>
- <port>7611</port>
-</thriftClientConfiguration>
\ No newline at end of file
+ <config>
+ <cep>
+ <node id="node-01">
+ <statsPublisherEnabled>true</statsPublisherEnabled>
+ <username>admin</username>
+ <password>admin</password>
+ <ip>localhost</ip>
+ <port>7611</port>
+ </node>
+ <!--<node id="node-02">
+ <statsPublisherEnabled>true</statsPublisherEnabled>
+ <username>admin</username>
+ <password>admin</password>
+ <ip>10.10.1.1</ip>
+ <port>7714</port>
+ </node>-->
+ </cep>
+ </config>
+</thriftClientConfiguration>
http://git-wip-us.apache.org/repos/asf/stratos/blob/8bb91b72/extensions/load-balancer/modules/haproxy-extension/src/main/conf/thrift-client-config.xml
----------------------------------------------------------------------
diff --git a/extensions/load-balancer/modules/haproxy-extension/src/main/conf/thrift-client-config.xml b/extensions/load-balancer/modules/haproxy-extension/src/main/conf/thrift-client-config.xml
index 5cacada..2e95c57 100644
--- a/extensions/load-balancer/modules/haproxy-extension/src/main/conf/thrift-client-config.xml
+++ b/extensions/load-balancer/modules/haproxy-extension/src/main/conf/thrift-client-config.xml
@@ -20,8 +20,22 @@
<!-- Apache thrift client configuration for publishing statistics to WSO2 CEP -->
<thriftClientConfiguration>
- <username>admin</username>
- <password>admin</password>
- <ip>localhost</ip>
- <port>7611</port>
-</thriftClientConfiguration>
\ No newline at end of file
+ <config>
+ <cep>
+ <node id="node-01">
+ <statsPublisherEnabled>true</statsPublisherEnabled>
+ <username>admin</username>
+ <password>admin</password>
+ <ip>localhost</ip>
+ <port>7611</port>
+ </node>
+ <!--<node id="node-02">
+ <statsPublisherEnabled>true</statsPublisherEnabled>
+ <username>admin</username>
+ <password>admin</password>
+ <ip>10.10.1.1</ip>
+ <port>7714</port>
+ </node>-->
+ </cep>
+ </config>
+</thriftClientConfiguration>
http://git-wip-us.apache.org/repos/asf/stratos/blob/8bb91b72/extensions/load-balancer/modules/lvs-extension/src/main/conf/thrift-client-config.xml
----------------------------------------------------------------------
diff --git a/extensions/load-balancer/modules/lvs-extension/src/main/conf/thrift-client-config.xml b/extensions/load-balancer/modules/lvs-extension/src/main/conf/thrift-client-config.xml
index 86a5fc6..1dffaa3 100644
--- a/extensions/load-balancer/modules/lvs-extension/src/main/conf/thrift-client-config.xml
+++ b/extensions/load-balancer/modules/lvs-extension/src/main/conf/thrift-client-config.xml
@@ -18,8 +18,22 @@
-->
<thriftClientConfiguration>
- <username>admin</username>
- <password>admin</password>
- <ip>localhost</ip>
- <port>7611</port>
-</thriftClientConfiguration>
\ No newline at end of file
+ <config>
+ <cep>
+ <node id="node-01">
+ <statsPublisherEnabled>true</statsPublisherEnabled>
+ <username>admin</username>
+ <password>admin</password>
+ <ip>localhost</ip>
+ <port>7611</port>
+ </node>
+ <!--<node id="node-02">
+ <statsPublisherEnabled>true</statsPublisherEnabled>
+ <username>admin</username>
+ <password>admin</password>
+ <ip>10.10.1.1</ip>
+ <port>7714</port>
+ </node>-->
+ </cep>
+ </config>
+</thriftClientConfiguration>
http://git-wip-us.apache.org/repos/asf/stratos/blob/8bb91b72/extensions/load-balancer/modules/nginx-extension/src/main/conf/thrift-client-config.xml
----------------------------------------------------------------------
diff --git a/extensions/load-balancer/modules/nginx-extension/src/main/conf/thrift-client-config.xml b/extensions/load-balancer/modules/nginx-extension/src/main/conf/thrift-client-config.xml
index 5cacada..e2de82e 100644
--- a/extensions/load-balancer/modules/nginx-extension/src/main/conf/thrift-client-config.xml
+++ b/extensions/load-balancer/modules/nginx-extension/src/main/conf/thrift-client-config.xml
@@ -19,9 +19,21 @@
-->
<!-- Apache thrift client configuration for publishing statistics to WSO2 CEP -->
-<thriftClientConfiguration>
- <username>admin</username>
- <password>admin</password>
- <ip>localhost</ip>
- <port>7611</port>
-</thriftClientConfiguration>
\ No newline at end of file
+<config>
+ <cep>
+ <node id="node-01">
+ <statsPublisherEnabled>true</statsPublisherEnabled>
+ <username>admin</username>
+ <password>admin</password>
+ <ip>localhost</ip>
+ <port>7611</port>
+ </node>
+ <!--<node id="node-02">
+ <statsPublisherEnabled>true</statsPublisherEnabled>
+ <username>admin</username>
+ <password>admin</password>
+ <ip>10.10.1.1</ip>
+ <port>7714</port>
+ </node>-->
+ </cep>
+</config>
\ No newline at end of file
[03/50] [abbrv] stratos git commit: Increase executor thread pool
size to 20 to compensate for event receivers
Posted by ga...@apache.org.
Increase executor thread pool size to 20 to compensate for event receivers
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/b9a4f128
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/b9a4f128
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/b9a4f128
Branch: refs/heads/release-4.1.5
Commit: b9a4f128ef9ac61fbbdc06094b965521d1c39623
Parents: b5f4f74
Author: Akila Perera <ra...@gmail.com>
Authored: Mon Nov 30 00:19:25 2015 +0530
Committer: gayangunarathne <ga...@wso2.com>
Committed: Mon Dec 7 10:16:25 2015 +0000
----------------------------------------------------------------------
.../cloud/controller/internal/CloudControllerServiceComponent.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/b9a4f128/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/internal/CloudControllerServiceComponent.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/internal/CloudControllerServiceComponent.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/internal/CloudControllerServiceComponent.java
index 808ac5c..3a0b1e3 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/internal/CloudControllerServiceComponent.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/internal/CloudControllerServiceComponent.java
@@ -75,7 +75,7 @@ public class CloudControllerServiceComponent {
private static final String CLOUD_CONTROLLER_COORDINATOR_LOCK = "cloud.controller.coordinator.lock";
private static final String THREAD_POOL_ID = "cloud.controller.thread.pool";
private static final String SCHEDULER_THREAD_POOL_ID = "cloud.controller.scheduler.thread.pool";
- private static final int THREAD_POOL_SIZE = 10;
+ private static final int THREAD_POOL_SIZE = 20;
private static final int SCHEDULER_THREAD_POOL_SIZE = 5;
private ClusterStatusTopicReceiver clusterStatusTopicReceiver;
[35/50] [abbrv] stratos git commit: PCA - Validate agent.conf entries
when loading Config, refactor handler methods for mb events, fix util methods,
fix exception initialization
Posted by ga...@apache.org.
PCA - Validate agent.conf entries when loading Config, refactor handler methods for mb events, fix util methods, fix exception initialization
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/5ca33acb
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/5ca33acb
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/5ca33acb
Branch: refs/heads/release-4.1.5
Commit: 5ca33acbd64a64d80feaf81f7bc7e599802809e2
Parents: a639344
Author: Chamila de Alwis <ch...@apache.org>
Authored: Tue Dec 1 17:35:25 2015 +0530
Committer: gayangunarathne <ga...@wso2.com>
Committed: Mon Dec 7 10:16:29 2015 +0000
----------------------------------------------------------------------
.../cartridge.agent/cartridge.agent/agent.py | 144 +++++++++++--------
.../cartridge.agent/cartridge.agent/config.py | 83 ++++++++++-
.../cartridge.agent/exception.py | 46 +++---
.../cartridge.agent/healthstats.py | 34 +----
.../cartridge.agent/logpublisher.py | 2 +-
.../modules/artifactmgt/git/agentgithandler.py | 4 +-
.../modules/event/application/signup/events.py | 3 -
.../modules/event/instance/notifier/events.py | 2 +-
.../modules/event/tenant/events.py | 2 +-
.../modules/util/cartridgeagentutils.py | 75 ++++++----
.../cartridge.agent/publisher.py | 4 +-
11 files changed, 250 insertions(+), 149 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/5ca33acb/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/agent.py
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/agent.py b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/agent.py
index 6b81dff..7f95f26 100644
--- a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/agent.py
+++ b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/agent.py
@@ -30,12 +30,10 @@ from subscriber import EventSubscriber
class CartridgeAgent(object):
def __init__(self):
Config.initialize_config()
- self.__tenant_context_initialized = False
- self.__log_publish_manager = None
self.__terminated = False
self.__log = LogFactory().get_log(__name__)
- mb_urls = Config.mb_urls
+ mb_urls = Config.mb_urls.split(",")
mb_uname = Config.mb_username
mb_pwd = Config.mb_password
@@ -87,8 +85,8 @@ class CartridgeAgent(object):
# Execute start servers extension
try:
event_handler.start_server_extension()
- except Exception as e:
- self.__log.exception("Error processing start servers event: %s" % e)
+ except Exception as ex:
+ self.__log.exception("Error processing start servers event: %s" % ex)
# check if artifact management is required before publishing instance activated event
repo_url = Config.repo_url
@@ -107,21 +105,22 @@ class CartridgeAgent(object):
event_handler.volume_mount_extension(persistence_mapping_payload)
# start log publishing thread
+ log_publish_manager = None
if DataPublisherConfiguration.get_instance().enabled:
log_file_paths = Config.log_file_paths
if log_file_paths is None:
self.__log.exception("No valid log file paths found, no logs will be published")
else:
self.__log.debug("Starting Log Publisher Manager: [Log file paths] %s" % ", ".join(log_file_paths))
- self.__log_publish_manager = LogPublisherManager(log_file_paths)
- self.__log_publish_manager.start()
+ log_publish_manager = LogPublisherManager(log_file_paths)
+ log_publish_manager.start()
# run until terminated
while not self.__terminated:
time.sleep(5)
if DataPublisherConfiguration.get_instance().enabled:
- self.__log_publish_manager.terminate_all_publishers()
+ log_publish_manager.terminate_all_publishers()
def terminate(self):
"""
@@ -134,9 +133,10 @@ class CartridgeAgent(object):
def register_instance_topic_listeners(self):
self.__log.debug("Starting instance notifier event message receiver thread")
- self.__inst_topic_subscriber.register_handler("ArtifactUpdatedEvent", self.on_artifact_updated)
- self.__inst_topic_subscriber.register_handler("InstanceCleanupMemberEvent", self.on_instance_cleanup_member)
- self.__inst_topic_subscriber.register_handler("InstanceCleanupClusterEvent", self.on_instance_cleanup_cluster)
+ self.__inst_topic_subscriber.register_handler("ArtifactUpdatedEvent", Handlers.on_artifact_updated)
+ self.__inst_topic_subscriber.register_handler("InstanceCleanupMemberEvent", Handlers.on_instance_cleanup_member)
+ self.__inst_topic_subscriber.register_handler(
+ "InstanceCleanupClusterEvent", Handlers.on_instance_cleanup_cluster)
self.__inst_topic_subscriber.start()
self.__log.info("Instance notifier event message receiver thread started")
@@ -148,13 +148,13 @@ class CartridgeAgent(object):
def register_topology_event_listeners(self):
self.__log.debug("Starting topology event message receiver thread")
- self.__topology_event_subscriber.register_handler("MemberActivatedEvent", self.on_member_activated)
- self.__topology_event_subscriber.register_handler("MemberTerminatedEvent", self.on_member_terminated)
- self.__topology_event_subscriber.register_handler("MemberSuspendedEvent", self.on_member_suspended)
- self.__topology_event_subscriber.register_handler("CompleteTopologyEvent", self.on_complete_topology)
- self.__topology_event_subscriber.register_handler("MemberStartedEvent", self.on_member_started)
- self.__topology_event_subscriber.register_handler("MemberCreatedEvent", self.on_member_created)
- self.__topology_event_subscriber.register_handler("MemberInitializedEvent", self.on_member_initialized)
+ self.__topology_event_subscriber.register_handler("MemberActivatedEvent", Handlers.on_member_activated)
+ self.__topology_event_subscriber.register_handler("MemberTerminatedEvent", Handlers.on_member_terminated)
+ self.__topology_event_subscriber.register_handler("MemberSuspendedEvent", Handlers.on_member_suspended)
+ self.__topology_event_subscriber.register_handler("CompleteTopologyEvent", Handlers.on_complete_topology)
+ self.__topology_event_subscriber.register_handler("MemberStartedEvent", Handlers.on_member_started)
+ self.__topology_event_subscriber.register_handler("MemberCreatedEvent", Handlers.on_member_created)
+ self.__topology_event_subscriber.register_handler("MemberInitializedEvent", Handlers.on_member_initialized)
self.__topology_event_subscriber.start()
self.__log.info("Cartridge agent topology receiver thread started")
@@ -166,11 +166,11 @@ class CartridgeAgent(object):
def register_tenant_event_listeners(self):
self.__log.debug("Starting tenant event message receiver thread")
self.__tenant_topic_subscriber.register_handler("DomainMappingAddedEvent",
- self.on_domain_mapping_added)
+ Handlers.on_domain_mapping_added)
self.__tenant_topic_subscriber.register_handler("DomainsMappingRemovedEvent",
- self.on_domain_mapping_removed)
- self.__tenant_topic_subscriber.register_handler("CompleteTenantEvent", self.on_complete_tenant)
- self.__tenant_topic_subscriber.register_handler("TenantSubscribedEvent", self.on_tenant_subscribed)
+ Handlers.on_domain_mapping_removed)
+ self.__tenant_topic_subscriber.register_handler("CompleteTenantEvent", Handlers.on_complete_tenant)
+ self.__tenant_topic_subscriber.register_handler("TenantSubscribedEvent", Handlers.on_tenant_subscribed)
self.__tenant_topic_subscriber.start()
self.__log.info("Tenant event message receiver thread started")
@@ -182,7 +182,7 @@ class CartridgeAgent(object):
def register_application_signup_event_listeners(self):
self.__log.debug("Starting application signup event message receiver thread")
self.__app_topic_subscriber.register_handler("ApplicationSignUpRemovedEvent",
- self.on_application_signup_removed)
+ Handlers.on_application_signup_removed)
self.__app_topic_subscriber.start()
self.__log.info("Application signup event message receiver thread started")
@@ -191,18 +191,36 @@ class CartridgeAgent(object):
while not self.__app_topic_subscriber.is_subscribed():
time.sleep(1)
- def on_artifact_updated(self, msg):
+ def wait_for_complete_topology(self):
+ while not TopologyContext.topology.initialized:
+ self.__log.info("Waiting for complete topology event...")
+ time.sleep(5)
+ self.__log.info("Complete topology event received")
+
+
+class Handlers(object):
+ """
+ Handler methods for message broker events
+ """
+
+ __log = LogFactory().get_log(__name__)
+ __tenant_context_initialized = False
+
+ @staticmethod
+ def on_artifact_updated(msg):
event_obj = ArtifactUpdatedEvent.create_from_json(msg.payload)
event_handler.on_artifact_updated_event(event_obj)
- def on_instance_cleanup_member(self, msg):
+ @staticmethod
+ def on_instance_cleanup_member(msg):
member_in_payload = Config.member_id
event_obj = InstanceCleanupMemberEvent.create_from_json(msg.payload)
member_in_event = event_obj.member_id
if member_in_payload == member_in_event:
event_handler.on_instance_cleanup_member_event()
- def on_instance_cleanup_cluster(self, msg):
+ @staticmethod
+ def on_instance_cleanup_cluster(msg):
event_obj = InstanceCleanupClusterEvent.create_from_json(msg.payload)
cluster_in_payload = Config.cluster_id
cluster_in_event = event_obj.cluster_id
@@ -212,11 +230,13 @@ class CartridgeAgent(object):
if cluster_in_event == cluster_in_payload and instance_in_payload == instance_in_event:
event_handler.on_instance_cleanup_cluster_event()
- def on_member_created(self, msg):
- self.__log.debug("Member created event received: %r" % msg.payload)
+ @staticmethod
+ def on_member_created(msg):
+ Handlers.__log.debug("Member created event received: %r" % msg.payload)
- def on_member_initialized(self, msg):
- self.__log.debug("Member initialized event received: %r" % msg.payload)
+ @staticmethod
+ def on_member_initialized(msg):
+ Handlers.__log.debug("Member initialized event received: %r" % msg.payload)
event_obj = MemberInitializedEvent.create_from_json(msg.payload)
if not TopologyContext.topology.initialized:
@@ -224,84 +244,88 @@ class CartridgeAgent(object):
event_handler.on_member_initialized_event(event_obj)
- def on_member_activated(self, msg):
- self.__log.debug("Member activated event received: %r" % msg.payload)
+ @staticmethod
+ def on_member_activated(msg):
+ Handlers.__log.debug("Member activated event received: %r" % msg.payload)
if not TopologyContext.topology.initialized:
return
event_obj = MemberActivatedEvent.create_from_json(msg.payload)
event_handler.on_member_activated_event(event_obj)
- def on_member_terminated(self, msg):
- self.__log.debug("Member terminated event received: %r" % msg.payload)
+ @staticmethod
+ def on_member_terminated(msg):
+ Handlers.__log.debug("Member terminated event received: %r" % msg.payload)
if not TopologyContext.topology.initialized:
return
event_obj = MemberTerminatedEvent.create_from_json(msg.payload)
event_handler.on_member_terminated_event(event_obj)
- def on_member_suspended(self, msg):
- self.__log.debug("Member suspended event received: %r" % msg.payload)
+ @staticmethod
+ def on_member_suspended(msg):
+ Handlers.__log.debug("Member suspended event received: %r" % msg.payload)
if not TopologyContext.topology.initialized:
return
event_obj = MemberSuspendedEvent.create_from_json(msg.payload)
event_handler.on_member_suspended_event(event_obj)
- def on_complete_topology(self, msg):
+ @staticmethod
+ def on_complete_topology(msg):
event_obj = CompleteTopologyEvent.create_from_json(msg.payload)
TopologyContext.update(event_obj.topology)
if not TopologyContext.topology.initialized:
- self.__log.info("Topology initialized from complete topology event")
+ Handlers.__log.info("Topology initialized from complete topology event")
TopologyContext.topology.initialized = True
event_handler.on_complete_topology_event(event_obj)
- self.__log.debug("Topology context updated with [topology] %r" % event_obj.topology.json_str)
+ Handlers.__log.debug("Topology context updated with [topology] %r" % event_obj.topology.json_str)
- def on_member_started(self, msg):
- self.__log.debug("Member started event received: %r" % msg.payload)
+ @staticmethod
+ def on_member_started(msg):
+ Handlers.__log.debug("Member started event received: %r" % msg.payload)
if not TopologyContext.topology.initialized:
return
event_obj = MemberStartedEvent.create_from_json(msg.payload)
event_handler.on_member_started_event(event_obj)
- def on_domain_mapping_added(self, msg):
- self.__log.debug("Subscription domain added event received : %r" % msg.payload)
+ @staticmethod
+ def on_domain_mapping_added(msg):
+ Handlers.__log.debug("Subscription domain added event received : %r" % msg.payload)
event_obj = DomainMappingAddedEvent.create_from_json(msg.payload)
event_handler.on_domain_mapping_added_event(event_obj)
- def on_domain_mapping_removed(self, msg):
- self.__log.debug("Subscription domain removed event received : %r" % msg.payload)
+ @staticmethod
+ def on_domain_mapping_removed(msg):
+ Handlers.__log.debug("Subscription domain removed event received : %r" % msg.payload)
event_obj = DomainMappingRemovedEvent.create_from_json(msg.payload)
event_handler.on_domain_mapping_removed_event(event_obj)
- def on_complete_tenant(self, msg):
+ @staticmethod
+ def on_complete_tenant(msg):
event_obj = CompleteTenantEvent.create_from_json(msg.payload)
TenantContext.update(event_obj.tenants)
- if not self.__tenant_context_initialized:
- self.__log.info("Tenant context initialized from complete tenant event")
- self.__tenant_context_initialized = True
+ if not Handlers.__tenant_context_initialized:
+ Handlers.__log.info("Tenant context initialized from complete tenant event")
+ Handlers.__tenant_context_initialized = True
event_handler.on_complete_tenant_event(event_obj)
- self.__log.debug("Tenant context updated with [tenant list] %r" % event_obj.tenant_list_json)
+ Handlers.__log.debug("Tenant context updated with [tenant list] %r" % event_obj.tenant_list_json)
- def on_tenant_subscribed(self, msg):
- self.__log.debug("Tenant subscribed event received: %r" % msg.payload)
+ @staticmethod
+ def on_tenant_subscribed(msg):
+ Handlers.__log.debug("Tenant subscribed event received: %r" % msg.payload)
event_obj = TenantSubscribedEvent.create_from_json(msg.payload)
event_handler.on_tenant_subscribed_event(event_obj)
- def on_application_signup_removed(self, msg):
- self.__log.debug("Application signup removed event received: %r" % msg.payload)
+ @staticmethod
+ def on_application_signup_removed(msg):
+ Handlers.__log.debug("Application signup removed event received: %r" % msg.payload)
event_obj = ApplicationSignUpRemovedEvent.create_from_json(msg.payload)
event_handler.on_application_signup_removed_event(event_obj)
- def wait_for_complete_topology(self):
- while not TopologyContext.topology.initialized:
- self.__log.info("Waiting for complete topology event...")
- time.sleep(5)
- self.__log.info("Complete topology event received")
-
if __name__ == "__main__":
log = LogFactory().get_log(__name__)
http://git-wip-us.apache.org/repos/asf/stratos/blob/5ca33acb/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/config.py
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/config.py b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/config.py
index f1a70ec..72fc5e2 100644
--- a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/config.py
+++ b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/config.py
@@ -22,7 +22,7 @@ import sys
from yapsy.PluginManager import PluginManager
from modules.util.log import LogFactory
-from exception import ParameterNotFoundException
+from exception import ParameterNotFoundException, InvalidConfigValueException
import constants
from plugins.contracts import ICartridgeAgentPlugin, IArtifactCommitPlugin, IArtifactCheckoutPlugin, \
IHealthStatReaderPlugin
@@ -148,6 +148,18 @@ class Config:
""" :type : str """
mb_publisher_timeout = None
""" :type : int """
+ cep_username = None
+ """ :type : str """
+ cep_password = None
+ """ :type : str """
+ cep_urls = []
+ """ :type : list """
+ artifact_clone_retry_count = None
+ """ :type : str """
+ artifact_clone_retry_interval = None
+ """ :type : str """
+ port_check_timeout = None
+ """ :type : str """
@staticmethod
def read_conf_file():
@@ -351,8 +363,29 @@ class Config:
Config.mb_username = Config.read_property(constants.MB_USERNAME, False)
Config.mb_password = Config.read_property(constants.MB_PASSWORD, False)
- Config.mb_urls = Config.read_property(constants.MB_URLS).split(",")
+ Config.mb_urls = Config.read_property(constants.MB_URLS)
Config.mb_publisher_timeout = int(Config.read_property(constants.MB_PUBLISHER_TIMEOUT))
+
+ Config.cep_username = Config.read_property(constants.CEP_SERVER_ADMIN_USERNAME)
+ Config.cep_password = Config.read_property(constants.CEP_SERVER_ADMIN_PASSWORD)
+ Config.cep_urls = Config.read_property(constants.CEP_RECEIVER_URLS)
+
+ try:
+ Config.artifact_clone_retry_count = Config.read_property(constants.ARTIFACT_CLONE_RETRIES)
+ except ParameterNotFoundException:
+ Config.artifact_clone_retry_count = "5"
+
+ try:
+ Config.artifact_clone_retry_interval = Config.read_property(constants.ARTIFACT_CLONE_INTERVAL)
+ except ParameterNotFoundException:
+ Config.artifact_clone_retry_interval = "10"
+
+ try:
+ Config.port_check_timeout = Config.read_property(constants.PORT_CHECK_TIMEOUT)
+ except ParameterNotFoundException:
+ Config.port_check_timeout = "600000"
+
+ Config.validate_config()
except ParameterNotFoundException as ex:
raise RuntimeError(ex)
@@ -381,6 +414,52 @@ class Config:
Config.extension_executor = Config.initialize_extensions()
@staticmethod
+ def validate_config():
+ try:
+ Config.validate_url_list(Config.mb_urls, constants.MB_URLS)
+ Config.validate_int(Config.mb_publisher_timeout, constants.MB_PUBLISHER_TIMEOUT)
+ Config.validate_url_list(Config.cep_urls, constants.CEP_RECEIVER_URLS)
+ Config.validate_int(Config.artifact_update_interval, constants.ARTIFACT_UPDATE_INTERVAL)
+ Config.validate_int(Config.artifact_clone_retry_count, constants.ARTIFACT_CLONE_RETRIES)
+ Config.validate_int(Config.artifact_clone_retry_interval, constants.ARTIFACT_CLONE_INTERVAL)
+ Config.validate_int(Config.port_check_timeout, constants.PORT_CHECK_TIMEOUT)
+ except ValueError as err:
+ raise InvalidConfigValueException("Invalid configuration for Cartridge Agent", err)
+
+ @staticmethod
+ def validate_url_list(urls, field_name):
+ """
+ host1:port1,host2:port2
+
+ :param urls:
+ :param field_name:
+ :return:
+ """
+ url_list = str(urls).split(",")
+ if len(url_list) < 1:
+ raise ValueError("Invalid value [field] \"%s\"" % field_name)
+
+ for single_url in url_list:
+ try:
+ url_ip, url_port = single_url.split(":")
+ except ValueError:
+ raise ValueError("Invalid host or port number value for [field] %s", field_name)
+
+ @staticmethod
+ def validate_int(int_value, field_name):
+ """
+ valid integer value
+
+ :param int_value:
+ :param field_name:
+ :return:
+ """
+ try:
+ int(int_value)
+ except ValueError:
+ raise ValueError("Invalid int value for [field] %s " % field_name)
+
+ @staticmethod
def initialize_plugins():
""" Find, load, activate and group plugins for Python CA
:return: a tuple of (PluginManager, plugins, artifact management plugins)
http://git-wip-us.apache.org/repos/asf/stratos/blob/5ca33acb/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/exception.py
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/exception.py b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/exception.py
index 1586c4d..345efee 100644
--- a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/exception.py
+++ b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/exception.py
@@ -21,17 +21,8 @@ class CartridgeAgentException(Exception):
Exception super class to be used by specific exceptions thrown in the cartridge agent
"""
- def __init__(self, message):
- super(CartridgeAgentException, self).__init__(message)
- self.__message = message
-
- def get_message(self):
- """
- The message provided when the exception is raised
- :return: message
- :rtype: str
- """
- return self.__message
+ def __init__(self, *args, **kwargs):
+ Exception.__init__(self, *args, **kwargs)
class DataPublisherException(CartridgeAgentException):
@@ -39,8 +30,8 @@ class DataPublisherException(CartridgeAgentException):
Exception to be used during log publishing operations
"""
- def __init__(self, message):
- super(DataPublisherException, self).__init__(message)
+ def __init__(self, *args, **kwargs):
+ CartridgeAgentException.__init__(self, *args, **kwargs)
class PluginExecutionException(CartridgeAgentException):
@@ -48,8 +39,8 @@ class PluginExecutionException(CartridgeAgentException):
Exception raised when a runtime error is met while executing an plugin script
"""
- def __init__(self, message):
- super(PluginExecutionException, self).__init__(message)
+ def __init__(self, *args, **kwargs):
+ CartridgeAgentException.__init__(self, *args, **kwargs)
class GitRepositorySynchronizationException(CartridgeAgentException):
@@ -57,8 +48,8 @@ class GitRepositorySynchronizationException(CartridgeAgentException):
Exception raised during a git repository related task
"""
- def __init__(self, message):
- super(GitRepositorySynchronizationException, self).__init__(message)
+ def __init__(self, *args, **kwargs):
+ CartridgeAgentException.__init__(self, *args, **kwargs)
class ParameterNotFoundException(CartridgeAgentException):
@@ -67,8 +58,8 @@ class ParameterNotFoundException(CartridgeAgentException):
of the cartridge agent
"""
- def __init__(self, message):
- super(ParameterNotFoundException, self).__init__(message)
+ def __init__(self, *args, **kwargs):
+ CartridgeAgentException.__init__(self, *args, **kwargs)
class ThriftReceiverOfflineException(CartridgeAgentException):
@@ -76,8 +67,8 @@ class ThriftReceiverOfflineException(CartridgeAgentException):
Exception raised when the connection to the Thrift receiver is dropped when publishing events
"""
- def __init__(self, message):
- super(ThriftReceiverOfflineException, self).__init__(message)
+ def __init__(self, *args, **kwargs):
+ CartridgeAgentException.__init__(self, *args, **kwargs)
class CEPPublisherException(CartridgeAgentException):
@@ -85,5 +76,14 @@ class CEPPublisherException(CartridgeAgentException):
Exception to be used during CEP publishing operations
"""
- def __init__(self, message):
- super(CEPPublisherException, self).__init__(message)
+ def __init__(self, *args, **kwargs):
+ CartridgeAgentException.__init__(self, *args, **kwargs)
+
+
+class InvalidConfigValueException(CartridgeAgentException):
+ """
+ Exception to be used when validating agent configuration
+ """
+
+ def __init__(self, *args, **kwargs):
+ CartridgeAgentException.__init__(self, *args, **kwargs)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/5ca33acb/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/healthstats.py
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/healthstats.py b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/healthstats.py
index 71f2894..2005537 100644
--- a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/healthstats.py
+++ b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/healthstats.py
@@ -62,7 +62,7 @@ class HealthStatisticsPublisherManager(Thread):
self.log.debug("Publishing load average: %r" % cartridge_stats.load_avg)
self.publisher.publish_load_average(cartridge_stats.load_avg)
- except Exception as e:
+ except Exception:
self.log.exception(
"Couldn't publish health statistics to CEP. Thrift Receiver offline. Reconnecting...")
self.publisher = HealthStatisticsPublisher()
@@ -76,33 +76,17 @@ class HealthStatisticsPublisher:
"""
log = LogFactory().get_log(__name__)
- @staticmethod
- def read_config(conf_key):
- """
- Read a given key from the cartridge agent configuration
- :param conf_key: The key to look for in the CA config
- :return: The value for the key from the CA config
- :raise: RuntimeError if the given key is not found in the CA config
- """
- conf_value = Config.read_property(conf_key, False)
-
- if conf_value is None or conf_value.strip() == "":
- raise RuntimeError("System property not found: " + conf_key)
-
- return conf_value
-
def __init__(self):
self.publishers = []
self.deactive_publishers = []
- self.cep_admin_username = HealthStatisticsPublisher.read_config(constants.CEP_SERVER_ADMIN_USERNAME)
- self.cep_admin_password = HealthStatisticsPublisher.read_config(constants.CEP_SERVER_ADMIN_PASSWORD)
+ self.cep_admin_username = Config.cep_username
+ self.cep_admin_password = Config.cep_password
self.stream_definition = HealthStatisticsPublisher.create_stream_definition()
HealthStatisticsPublisher.log.debug("Stream definition created: %r" % str(self.stream_definition))
# 1.1.1.1:1883,2.2.2.2:1883
- cep_urls = HealthStatisticsPublisher.read_config(constants.CEP_RECEIVER_URLS)
- cep_urls = cep_urls.split(',')
+ cep_urls = Config.cep_urls.split(',')
for cep_url in cep_urls:
cep_active = self.is_cep_active(cep_url)
@@ -207,14 +191,10 @@ class HealthStatisticsPublisher:
return true if active
:param cep_url:
"""
- ports = []
cep_ip = cep_url.split(':')[0]
cep_port = cep_url.split(':')[1]
- ports.append(cep_port)
- cep_active = cartridgeagentutils.check_ports_active(
- cep_ip,
- ports)
+ cep_active = cartridgeagentutils.check_port_active(cep_ip, cep_port)
return cep_active
@@ -229,8 +209,8 @@ class HealthStatisticsPublisher:
except Exception as ex:
raise ThriftReceiverOfflineException(ex)
- deactive_ceps = self.deactive_publishers
- for cep_url in deactive_ceps:
+ inactive_ceps = self.deactive_publishers
+ for cep_url in inactive_ceps:
cep_active = self.is_cep_active(cep_url)
if cep_active:
self.add_publishers(cep_url)
http://git-wip-us.apache.org/repos/asf/stratos/blob/5ca33acb/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/logpublisher.py
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/logpublisher.py b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/logpublisher.py
index e7ab1c7..b9f5d63 100644
--- a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/logpublisher.py
+++ b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/logpublisher.py
@@ -145,7 +145,7 @@ class LogPublisherManager(Thread):
ports_active = cartridgeagentutils.wait_until_ports_active(
DataPublisherConfiguration.get_instance().monitoring_server_ip,
self.ports,
- int(Config.read_property("port.check.timeout", critical=False)))
+ int(Config.port_check_timeout))
if not ports_active:
self.log.debug("Monitoring server is not active")
http://git-wip-us.apache.org/repos/asf/stratos/blob/5ca33acb/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/artifactmgt/git/agentgithandler.py
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/artifactmgt/git/agentgithandler.py b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/artifactmgt/git/agentgithandler.py
index 2170a33..15d3733 100644
--- a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/artifactmgt/git/agentgithandler.py
+++ b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/artifactmgt/git/agentgithandler.py
@@ -168,8 +168,8 @@ class AgentGitHandler:
"""
git_clone_successful = False
# Read properties from agent.conf
- max_retry_attempts = int(Config.read_property(constants.ARTIFACT_CLONE_RETRIES, 5))
- retry_interval = int(Config.read_property(constants.ARTIFACT_CLONE_INTERVAL, 10))
+ max_retry_attempts = int(Config.artifact_clone_retry_count)
+ retry_interval = int(Config.artifact_clone_retry_interval)
retry_attempts = 0
# Iterate until git clone is successful or reaches max retry attempts
http://git-wip-us.apache.org/repos/asf/stratos/blob/5ca33acb/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/event/application/signup/events.py
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/event/application/signup/events.py b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/event/application/signup/events.py
index f44dd04..13bb680 100644
--- a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/event/application/signup/events.py
+++ b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/event/application/signup/events.py
@@ -27,7 +27,6 @@ class ApplicationSignUpAddedEvent:
self.clusterIds = None
""" :type : list[str] """
-
@staticmethod
def create_from_json(json_str):
json_obj = json.loads(json_str)
@@ -49,7 +48,6 @@ class ApplicationSignUpRemovedEvent:
self.clusterIds = None
""" :type : list[str] """
-
@staticmethod
def create_from_json(json_str):
json_obj = json.loads(json_str)
@@ -59,4 +57,3 @@ class ApplicationSignUpRemovedEvent:
app_signup_removed.tenantId = json_obj["tenantId"] if "tenantId" in json_obj else None
return app_signup_removed
-
http://git-wip-us.apache.org/repos/asf/stratos/blob/5ca33acb/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/event/instance/notifier/events.py
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/event/instance/notifier/events.py b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/event/instance/notifier/events.py
index 41dc133..d19cd0c 100644
--- a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/event/instance/notifier/events.py
+++ b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/event/instance/notifier/events.py
@@ -79,4 +79,4 @@ class InstanceCleanupMemberEvent:
json_obj = json.loads(json_str)
m_id = json_obj["memberId"] if "memberId" in json_obj else None
- return InstanceCleanupMemberEvent(m_id)
\ No newline at end of file
+ return InstanceCleanupMemberEvent(m_id)
http://git-wip-us.apache.org/repos/asf/stratos/blob/5ca33acb/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/event/tenant/events.py
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/event/tenant/events.py b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/event/tenant/events.py
index 2e287bd..8a49bc2 100644
--- a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/event/tenant/events.py
+++ b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/event/tenant/events.py
@@ -84,4 +84,4 @@ class TenantUnsubscribedEvent:
instance.service_name = json_obj["serviceName"] if "serviceName" in json_obj else None
instance.cluster_ids = json_obj["clusterIds"] if "clusterIds" in json_obj else None
- return instance
\ No newline at end of file
+ return instance
http://git-wip-us.apache.org/repos/asf/stratos/blob/5ca33acb/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/util/cartridgeagentutils.py
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/util/cartridgeagentutils.py b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/util/cartridgeagentutils.py
index 79bc6c5..e5ad877 100644
--- a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/util/cartridgeagentutils.py
+++ b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/util/cartridgeagentutils.py
@@ -24,12 +24,18 @@ import hashlib
from log import LogFactory
+BS = 16
+
log = LogFactory().get_log(__name__)
-unpad = lambda s: s[0:-ord(s[-1])]
-current_milli_time = lambda: int(round(time.time() * 1000))
-BS = 16
-pad = lambda s: s + (BS - len(s) % BS) * chr(BS - len(s) % BS)
+
+def unpad(s): return s[0:-ord(s[-1])]
+
+
+def current_milli_time(): return int(round(time.time() * 1000))
+
+
+def pad(s): return s + (BS - len(s) % BS) * chr(BS - len(s) % BS)
def decrypt_password(pass_str, secret):
@@ -77,11 +83,26 @@ def wait_until_ports_active(ip_address, ports, ports_check_timeout=600000):
log.debug("Port check timeout: %s" % ports_check_timeout)
- active = False
+ ports_left = ports
start_time = current_milli_time()
- while not active:
+
+ # check ports until all are active or timeout exceeds
+ while True:
log.info("Waiting for ports to be active: [ip] %s [ports] %s" % (ip_address, ports))
- active = check_ports_active(ip_address, ports)
+
+ # check each port for activity
+ for checking_port in list(ports_left):
+ port_active = check_port_active(ip_address, checking_port)
+ if port_active:
+ log.debug("Port %s on host %s active" % (checking_port, ip_address))
+ ports_left.remove(checking_port)
+
+ # if no ports are left to check for activity, return
+ if len(ports_left) == 0:
+ log.info("Ports activated: [ip] %r [ports] %r" % (ip_address, ports))
+ return True
+
+ # active = check_ports_active(ip_address, ports)
end_time = current_milli_time()
duration = end_time - start_time
@@ -92,33 +113,33 @@ def wait_until_ports_active(ip_address, ports, ports_check_timeout=600000):
time.sleep(5)
- log.info("Ports activated: [ip] %r [ports] %r" % (ip_address, ports))
- return True
-
-def check_ports_active(ip_address, ports):
+def check_port_active(ip_address, port):
"""
- Checks the given list of port addresses for active state
+ Checks the given port on the given host for activity
:param str ip_address: Ip address of the member to be checked
- :param list[str] ports: The list of ports to be checked
+ :param str port: The port to be checked
:return: True if the ports are active, False if at least one is not active
:rtype: bool
"""
- if len(ports) < 1:
- raise RuntimeError("No ports found")
-
- for port in ports:
- s = socket.socket()
- s.settimeout(5)
- try:
- s.connect((ip_address, int(port)))
- log.debug("Port %s is active" % port)
- s.close()
- except socket.error:
- log.debug("Port %s is not active" % port)
- return False
+ if port is None:
+ raise RuntimeError("Cannot check invalid port for activity")
+
+ try:
+ port_int = int(port)
+ except ValueError:
+ raise RuntimeError("Cannot check invalid port for activity %s" % port)
- return True
+ s = socket.socket()
+ s.settimeout(5)
+ try:
+ s.connect((ip_address, port_int))
+ log.debug("Port %s is active" % port)
+ s.close()
+ return True
+ except socket.error:
+ log.debug("Port %s is not active" % port)
+ return False
class IncrementalCeilingListIterator(object):
http://git-wip-us.apache.org/repos/asf/stratos/blob/5ca33acb/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/publisher.py
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/publisher.py b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/publisher.py
index 5b6190e..229c354 100644
--- a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/publisher.py
+++ b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/publisher.py
@@ -71,7 +71,7 @@ def publish_instance_activated_event():
ports_active = cartridgeagentutils.wait_until_ports_active(
listen_address,
configuration_ports,
- int(Config.read_property("port.check.timeout", critical=False)))
+ int(Config.port_check_timeout))
if ports_active:
log.info("Publishing instance activated event...")
@@ -226,7 +226,7 @@ class EventPublisher(object):
while int(time.time()) - self.__start_time < (Config.mb_publisher_timeout * 1000):
retry_interval = retry_iterator.get_next_retry_interval()
- for mb_url in Config.mb_urls:
+ for mb_url in Config.mb_urls.split(","):
mb_ip, mb_port = mb_url.split(":")
# start a thread to execute publish event
[15/50] [abbrv] stratos git commit: Fixing line spaces added
Posted by ga...@apache.org.
Fixing line spaces added
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/38b196c1
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/38b196c1
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/38b196c1
Branch: refs/heads/release-4.1.5
Commit: 38b196c1f4ac66f4636c16a4bacac55ea74fdea8
Parents: a64d1ac
Author: Pubudu Gunatilaka <pu...@gmail.com>
Authored: Mon Nov 30 13:49:10 2015 +0530
Committer: gayangunarathne <ga...@wso2.com>
Committed: Mon Dec 7 10:16:26 2015 +0000
----------------------------------------------------------------------
.../cloud/controller/messaging/topology/TopologyBuilder.java | 1 -
.../apache/stratos/rest/endpoint/api/StratosApiV41Utils.java | 6 ++----
2 files changed, 2 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/38b196c1/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/messaging/topology/TopologyBuilder.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/messaging/topology/TopologyBuilder.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/messaging/topology/TopologyBuilder.java
index 109cf30..6fe25f8 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/messaging/topology/TopologyBuilder.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/messaging/topology/TopologyBuilder.java
@@ -415,7 +415,6 @@ public class TopologyBuilder {
log.error("Invalid state transition from " + member.getStatus() + " to " +
MemberStatus.Initialized);
} else {
-
Cluster cluster = service.getCluster(memberContext.getClusterId());
String clusterId = cluster.getClusterId();
ClusterContext clusterContext = CloudControllerContext.getInstance().getClusterContext(clusterId);
http://git-wip-us.apache.org/repos/asf/stratos/blob/38b196c1/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
index 87aff60..ffe2a24 100644
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
@@ -1578,8 +1578,6 @@ public class StratosApiV41Utils {
if (group.getCartridges() != null) {
if (group.getDeploymentPolicy() != null) {
groupParentHasDeploymentPolicy = true;
- } else {
- groupParentHasDeploymentPolicy = false;
}
validateCartridgesForDeploymentPolicy(group.getCartridges(), groupParentHasDeploymentPolicy);
}
@@ -1610,9 +1608,9 @@ public class StratosApiV41Utils {
* @throws RestAPIException
*/
private static void validateCartridgesForDeploymentPolicy(List<CartridgeReferenceBean> cartridgeReferenceBeans,
- boolean hasDeploymentPolicy) throws RestAPIException {
+ boolean groupParentHasDeploymentPolicy) throws RestAPIException {
- if (hasDeploymentPolicy) {
+ if (groupParentHasDeploymentPolicy) {
for (CartridgeReferenceBean cartridge : cartridgeReferenceBeans) {
if (cartridge.getSubscribableInfo().getDeploymentPolicy() != null) {
String message = "Group deployment policy already exists. Remove deployment policy from " +
[43/50] [abbrv] stratos git commit: Revert "Preparing for the release
4.1.5"
Posted by ga...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/products/stratos/modules/integration/test-common/pom.xml
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-common/pom.xml b/products/stratos/modules/integration/test-common/pom.xml
index c51e17a..4da23fa 100755
--- a/products/stratos/modules/integration/test-common/pom.xml
+++ b/products/stratos/modules/integration/test-common/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-integration</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>org.apache.stratos.integration.common</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/products/stratos/modules/integration/test-integration/pom.xml
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/pom.xml b/products/stratos/modules/integration/test-integration/pom.xml
index 153bb3e..642b333 100755
--- a/products/stratos/modules/integration/test-integration/pom.xml
+++ b/products/stratos/modules/integration/test-integration/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-integration</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>stratos-test-integration</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/products/stratos/modules/p2-profile-gen/pom.xml
----------------------------------------------------------------------
diff --git a/products/stratos/modules/p2-profile-gen/pom.xml b/products/stratos/modules/p2-profile-gen/pom.xml
index 3d41443..657f686 100644
--- a/products/stratos/modules/p2-profile-gen/pom.xml
+++ b/products/stratos/modules/p2-profile-gen/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/products/stratos/pom.xml
----------------------------------------------------------------------
diff --git a/products/stratos/pom.xml b/products/stratos/pom.xml
index 5154490..69874e0 100755
--- a/products/stratos/pom.xml
+++ b/products/stratos/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-products-parent</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>stratos</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/service-stubs/org.apache.stratos.autoscaler.service.stub/pom.xml
----------------------------------------------------------------------
diff --git a/service-stubs/org.apache.stratos.autoscaler.service.stub/pom.xml b/service-stubs/org.apache.stratos.autoscaler.service.stub/pom.xml
index 1b7dfbb..0374959 100644
--- a/service-stubs/org.apache.stratos.autoscaler.service.stub/pom.xml
+++ b/service-stubs/org.apache.stratos.autoscaler.service.stub/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-service-stubs-parent</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>org.apache.stratos.autoscaler.service.stub</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/service-stubs/org.apache.stratos.cloud.controller.service.stub/pom.xml
----------------------------------------------------------------------
diff --git a/service-stubs/org.apache.stratos.cloud.controller.service.stub/pom.xml b/service-stubs/org.apache.stratos.cloud.controller.service.stub/pom.xml
index 8315e74..fb182e6 100644
--- a/service-stubs/org.apache.stratos.cloud.controller.service.stub/pom.xml
+++ b/service-stubs/org.apache.stratos.cloud.controller.service.stub/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-service-stubs-parent</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>org.apache.stratos.cloud.controller.service.stub</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/service-stubs/org.apache.stratos.manager.service.stub/pom.xml
----------------------------------------------------------------------
diff --git a/service-stubs/org.apache.stratos.manager.service.stub/pom.xml b/service-stubs/org.apache.stratos.manager.service.stub/pom.xml
index 892e38f..7d99cc3 100644
--- a/service-stubs/org.apache.stratos.manager.service.stub/pom.xml
+++ b/service-stubs/org.apache.stratos.manager.service.stub/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-service-stubs-parent</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>org.apache.stratos.manager.service.stub</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/b56891cf/service-stubs/pom.xml
----------------------------------------------------------------------
diff --git a/service-stubs/pom.xml b/service-stubs/pom.xml
index ab66ab6..d8dc84c 100644
--- a/service-stubs/pom.xml
+++ b/service-stubs/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-parent</artifactId>
- <version>4.1.5</version>
+ <version>4.1.5-SNAPSHOT</version>
</parent>
<artifactId>stratos-service-stubs-parent</artifactId>
[16/50] [abbrv] stratos git commit: PCA Live Test - Improved agent
log display by removing duplicate log entries
Posted by ga...@apache.org.
PCA Live Test - Improved agent log display by removing duplicate log entries
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/93a3f672
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/93a3f672
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/93a3f672
Branch: refs/heads/release-4.1.5
Commit: 93a3f67250433ab9926b4d972db233b1609ef748
Parents: f0740ec
Author: Chamila de Alwis <ch...@apache.org>
Authored: Fri Nov 27 18:05:09 2015 +0530
Committer: gayangunarathne <ga...@wso2.com>
Committed: Mon Dec 7 10:16:26 2015 +0000
----------------------------------------------------------------------
.../integration/tests/PythonAgentIntegrationTest.java | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/93a3f672/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/PythonAgentIntegrationTest.java
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/PythonAgentIntegrationTest.java b/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/PythonAgentIntegrationTest.java
index 08042b7..7f436f6 100644
--- a/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/PythonAgentIntegrationTest.java
+++ b/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/PythonAgentIntegrationTest.java
@@ -311,7 +311,7 @@ public abstract class PythonAgentIntegrationTest {
Thread communicatorThread = new Thread(new Runnable() {
@Override
public void run() {
- List<String> outputLines = new ArrayList<String>();
+ List<String> outputLines = new ArrayList<>();
while (!outputStream.isClosed()) {
List<String> newLines = getNewLines(outputLines, outputStream.toString());
if (newLines.size() > 0) {
@@ -544,12 +544,13 @@ public abstract class PythonAgentIntegrationTest {
* @return new lines printed by Python agent process
*/
protected List<String> getNewLines(List<String> currentOutputLines, String output) {
- List<String> newLines = new ArrayList<String>();
+ List<String> newLines = new ArrayList<>();
if (StringUtils.isNotBlank(output)) {
- String[] lines = output.split(NEW_LINE);
- for (String line : lines) {
- if (!currentOutputLines.contains(line)) {
+ List<String> lines = Arrays.asList(output.split(NEW_LINE));
+ if (lines.size() > 0) {
+ int readStartIndex = (currentOutputLines.size() > 0) ? currentOutputLines.size() - 1 : 0;
+ for (String line : lines.subList(readStartIndex , lines.size() - 1)) {
currentOutputLines.add(line);
newLines.add(line);
}
[07/50] [abbrv] stratos git commit: Fixed formatting and log messages
Posted by ga...@apache.org.
Fixed formatting and log messages
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/706887a9
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/706887a9
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/706887a9
Branch: refs/heads/release-4.1.5
Commit: 706887a954f8212cd95e01711794bad961cf6238
Parents: 9f939eb
Author: Akila Perera <ra...@gmail.com>
Authored: Mon Nov 30 00:15:10 2015 +0530
Committer: gayangunarathne <ga...@wso2.com>
Committed: Mon Dec 7 10:16:25 2015 +0000
----------------------------------------------------------------------
.../services/impl/AutoscalerServiceImpl.java | 38 ++++++++++----------
1 file changed, 19 insertions(+), 19 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/706887a9/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java
index 6f84b75..0943de0 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java
@@ -34,7 +34,6 @@ import org.apache.stratos.autoscaler.context.InstanceContext;
import org.apache.stratos.autoscaler.context.cluster.ClusterInstanceContext;
import org.apache.stratos.autoscaler.context.partition.ClusterLevelPartitionContext;
import org.apache.stratos.autoscaler.context.partition.network.NetworkPartitionContext;
-import org.apache.stratos.autoscaler.event.publisher.ClusterStatusEventPublisher;
import org.apache.stratos.autoscaler.exception.*;
import org.apache.stratos.autoscaler.exception.application.ApplicationDefinitionException;
import org.apache.stratos.autoscaler.exception.application.InvalidApplicationPolicyException;
@@ -44,7 +43,6 @@ import org.apache.stratos.autoscaler.exception.policy.*;
import org.apache.stratos.autoscaler.monitor.Monitor;
import org.apache.stratos.autoscaler.monitor.cluster.ClusterMonitor;
import org.apache.stratos.autoscaler.monitor.component.ApplicationMonitor;
-import org.apache.stratos.autoscaler.monitor.component.GroupMonitor;
import org.apache.stratos.autoscaler.pojo.Dependencies;
import org.apache.stratos.autoscaler.pojo.ServiceGroup;
import org.apache.stratos.autoscaler.pojo.policy.PolicyManager;
@@ -465,7 +463,7 @@ public class AutoscalerServiceImpl implements AutoscalerService {
ApplicationMonitor appMonitor = asCtx.getAppMonitor(applicationId);
if (appMonitor == null) {
- log.info(String.format("Could not find application monitor for the application %s, " + "hence returning",
+ log.info(String.format("Could not find application monitor for [application-id] %s, hence returning false",
applicationId));
return false;
}
@@ -505,7 +503,7 @@ public class AutoscalerServiceImpl implements AutoscalerService {
return false;
} else {
log.info(String.format("Previous graceful un-deployment is in progress for "
- + "[application-id] %s , thus terminating instances directly", applicationId));
+ + "[application-id] %s , thus terminating instances directly", applicationId));
appMonitor.setForce(true);
terminateAllMembersAndClustersForcefully(applicationId);
}
@@ -996,8 +994,8 @@ public class AutoscalerServiceImpl implements AutoscalerService {
.terminateInstanceForcefully(memberIdToTerminate);
} catch (Exception e) {
log.error(String.format(
- "Forceful termination of member %s has failed, but continuing forceful "
- + "deletion of other members", memberIdToTerminate));
+ "Forceful termination of member %s has failed, but continuing forceful "
+ + "deletion of other members", memberIdToTerminate));
}
}
}
@@ -1114,9 +1112,9 @@ public class AutoscalerServiceImpl implements AutoscalerService {
}
}
if (isPartitionFound == false) {
- String msg = String.format("Partition Id is not found: [deployment-policy-id] %s "
- + "[network-partition-id] %s [partition-id] %s", deploymentPolicyId,
- networkPartitionId, partitionId);
+ String msg = String
+ .format("Partition Id is not found: [deployment-policy-id] %s [network-partition-id] %s "
+ + "[partition-id] %s", deploymentPolicyId, networkPartitionId, partitionId);
log.error(msg);
throw new InvalidDeploymentPolicyException(msg);
}
@@ -1125,9 +1123,10 @@ public class AutoscalerServiceImpl implements AutoscalerService {
// partition algorithm can't be null or empty
String partitionAlgorithm = networkPartitionRef.getPartitionAlgo();
if (StringUtils.isBlank(partitionAlgorithm)) {
- String msg = String.format("Partition algorithm is blank: [deployment-policy-id] %s "
- + "[network-partition-id] %s [partition-algorithm] %s", deploymentPolicyId,
- networkPartitionId, partitionAlgorithm);
+ String msg = String
+ .format("Partition algorithm is blank: [deployment-policy-id] %s [network-partition-id] %s "
+ + "[partition-algorithm] %s", deploymentPolicyId, networkPartitionId,
+ partitionAlgorithm);
log.error(msg);
throw new InvalidDeploymentPolicyException(msg);
}
@@ -1135,10 +1134,11 @@ public class AutoscalerServiceImpl implements AutoscalerService {
// partition algorithm should be either one-after-another or round-robin
if ((!StratosConstants.PARTITION_ROUND_ROBIN_ALGORITHM_ID.equals(partitionAlgorithm))
&& (!StratosConstants.PARTITION_ONE_AFTER_ANOTHER_ALGORITHM_ID.equals(partitionAlgorithm))) {
- String msg = String.format("Partition algorithm is not valid: [deployment-policy-id] %s " +
- "[network-partition-id] %s [partition-algorithm] %s. : " +
- "Partition algorithm should be either one-after-another or round-robin ",
- deploymentPolicyId, networkPartitionId, partitionAlgorithm);
+ String msg = String
+ .format("Partition algorithm is not valid: [deployment-policy-id] %s [network-partition-id] "
+ + "%s [partition-algorithm] %s. Partition algorithm should be either "
+ + "one-after-another or round-robin ", deploymentPolicyId, networkPartitionId,
+ partitionAlgorithm);
log.error(msg);
throw new InvalidDeploymentPolicyException(msg);
}
@@ -1146,9 +1146,9 @@ public class AutoscalerServiceImpl implements AutoscalerService {
// a network partition reference should contain at least one partition reference
PartitionRef[] partitions = networkPartitionRef.getPartitionRefs();
if (null == partitions || partitions.length == 0) {
- String msg = String.format("Network partition does not have any partition references: "
- + "[deployment-policy-id] %s [network-partition-id] %s", deploymentPolicyId,
- networkPartitionId);
+ String msg = String
+ .format("Network partition does not have any partition references [deployment-policy-id] %s "
+ + "[network-partition-id] %s", deploymentPolicyId, networkPartitionId);
log.error(msg);
throw new InvalidDeploymentPolicyException(msg);
}
[49/50] [abbrv] stratos git commit: Preparing release for the
4.1.5-rc3
Posted by ga...@apache.org.
Preparing release for the 4.1.5-rc3
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/04c97cbd
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/04c97cbd
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/04c97cbd
Branch: refs/heads/release-4.1.5
Commit: 04c97cbd4ad80f02e01183ed52ff45fd0d967eb3
Parents: 98732fc
Author: gayangunarathne <ga...@wso2.com>
Authored: Mon Dec 7 08:21:19 2015 +0000
Committer: gayangunarathne <ga...@wso2.com>
Committed: Mon Dec 7 10:16:30 2015 +0000
----------------------------------------------------------------------
components/org.apache.stratos.autoscaler/pom.xml | 2 +-
components/org.apache.stratos.cartridge.agent/pom.xml | 2 +-
components/org.apache.stratos.cli/pom.xml | 2 +-
components/org.apache.stratos.cloud.controller/pom.xml | 2 +-
components/org.apache.stratos.common/pom.xml | 2 +-
components/org.apache.stratos.custom.handlers/pom.xml | 2 +-
components/org.apache.stratos.kubernetes.client/pom.xml | 2 +-
components/org.apache.stratos.load.balancer.common/pom.xml | 2 +-
components/org.apache.stratos.load.balancer.extension.api/pom.xml | 2 +-
components/org.apache.stratos.load.balancer/pom.xml | 2 +-
components/org.apache.stratos.manager.styles/pom.xml | 2 +-
components/org.apache.stratos.manager/pom.xml | 2 +-
components/org.apache.stratos.messaging/pom.xml | 2 +-
components/org.apache.stratos.metadata.client/pom.xml | 2 +-
components/org.apache.stratos.metadata.service/pom.xml | 2 +-
components/org.apache.stratos.mock.iaas.api/pom.xml | 2 +-
components/org.apache.stratos.mock.iaas.client/pom.xml | 2 +-
components/org.apache.stratos.mock.iaas/pom.xml | 2 +-
components/org.apache.stratos.python.cartridge.agent/pom.xml | 2 +-
components/org.apache.stratos.python.cli/pom.xml | 2 +-
components/org.apache.stratos.rest.endpoint/pom.xml | 2 +-
components/pom.xml | 2 +-
dependencies/fabric8/kubernetes-api/pom.xml | 2 +-
dependencies/fabric8/pom.xml | 2 +-
dependencies/guice-assistedinject/pom.xml | 2 +-
dependencies/guice-multibindings/pom.xml | 2 +-
dependencies/guice/pom.xml | 2 +-
dependencies/jclouds/cloudstack/pom.xml | 2 +-
dependencies/jclouds/ec2/pom.xml | 2 +-
.../jclouds/google-jclouds-labs/google-cloud-storage/pom.xml | 2 +-
.../jclouds/google-jclouds-labs/google-compute-engine/pom.xml | 2 +-
dependencies/jclouds/google-jclouds-labs/googlecloud/pom.xml | 2 +-
dependencies/jclouds/google-jclouds-labs/oauth/pom.xml | 2 +-
dependencies/jclouds/google-jclouds-labs/pom.xml | 2 +-
dependencies/jclouds/jclouds-blobstore/pom.xml | 2 +-
dependencies/jclouds/jclouds-bouncycastle/pom.xml | 2 +-
dependencies/jclouds/jclouds-compute/pom.xml | 2 +-
dependencies/jclouds/jclouds-core/pom.xml | 2 +-
dependencies/jclouds/jclouds-enterprise/pom.xml | 2 +-
dependencies/jclouds/jclouds-joda/pom.xml | 2 +-
dependencies/jclouds/jclouds-netty/pom.xml | 2 +-
dependencies/jclouds/jclouds-sshj/pom.xml | 2 +-
dependencies/jclouds/openstack-common/pom.xml | 2 +-
dependencies/jclouds/openstack-keystone/pom.xml | 2 +-
dependencies/jclouds/openstack-neutron/pom.xml | 2 +-
dependencies/jclouds/openstack-nova/pom.xml | 2 +-
dependencies/jclouds/pom.xml | 2 +-
dependencies/jclouds/sts/pom.xml | 2 +-
dependencies/pom.xml | 2 +-
dependencies/rocoto/pom.xml | 2 +-
dependencies/sshj/pom.xml | 2 +-
extensions/cep/modules/distribution/pom.xml | 2 +-
extensions/cep/modules/stratos-cep-extension/wso2cep-3.0.0/pom.xml | 2 +-
extensions/cep/modules/stratos-cep-extension/wso2cep-3.1.0/pom.xml | 2 +-
extensions/cep/pom.xml | 2 +-
extensions/das/modules/artifacts/metering-dashboard/capps/pom.xml | 2 +-
.../das/modules/artifacts/monitoring-dashboard/capps/pom.xml | 2 +-
extensions/das/modules/distribution/pom.xml | 2 +-
extensions/das/modules/stratos-das-extension/pom.xml | 2 +-
extensions/das/pom.xml | 2 +-
extensions/load-balancer/modules/aws-extension/pom.xml | 2 +-
extensions/load-balancer/modules/haproxy-extension/pom.xml | 2 +-
extensions/load-balancer/modules/lvs-extension/pom.xml | 2 +-
extensions/load-balancer/modules/nginx-extension/pom.xml | 2 +-
extensions/load-balancer/pom.xml | 2 +-
extensions/pom.xml | 2 +-
features/autoscaler/org.apache.stratos.autoscaler.feature/pom.xml | 2 +-
features/autoscaler/pom.xml | 2 +-
features/cep/org.apache.stratos.event.processor.feature/pom.xml | 2 +-
.../cep/org.apache.stratos.event.processor.server.feature/pom.xml | 2 +-
features/cep/pom.xml | 2 +-
.../org.apache.stratos.cloud.controller.feature/pom.xml | 2 +-
features/cloud-controller/pom.xml | 2 +-
features/common/org.apache.stratos.common.feature/pom.xml | 2 +-
features/common/org.apache.stratos.common.server.feature/pom.xml | 2 +-
features/common/org.apache.stratos.custom.handlers.feature/pom.xml | 2 +-
features/common/pom.xml | 2 +-
.../org.apache.stratos.load.balancer.common.feature/pom.xml | 2 +-
.../load-balancer/org.apache.stratos.load.balancer.feature/pom.xml | 2 +-
features/load-balancer/pom.xml | 2 +-
.../org.apache.stratos.metadata.client.feature/pom.xml | 2 +-
.../org.apache.stratos.metadata.service.feature/pom.xml | 2 +-
features/manager/pom.xml | 2 +-
.../rest-endpoint/org.apache.stratos.rest.endpoint.feature/pom.xml | 2 +-
.../manager/stratos-mgt/org.apache.stratos.manager.feature/pom.xml | 2 +-
.../stratos-mgt/org.apache.stratos.manager.server.feature/pom.xml | 2 +-
features/manager/stratos-mgt/pom.xml | 2 +-
.../styles/org.apache.stratos.manager.styles.feature/pom.xml | 2 +-
features/messaging/org.apache.stratos.messaging.feature/pom.xml | 2 +-
features/messaging/pom.xml | 2 +-
.../mock-iaas/org.apache.stratos.mock.iaas.api.feature/pom.xml | 2 +-
features/mock-iaas/pom.xml | 2 +-
features/pom.xml | 2 +-
pom.xml | 2 +-
products/cartridge-agent/modules/distribution/pom.xml | 2 +-
products/cartridge-agent/pom.xml | 2 +-
products/load-balancer/modules/distribution/pom.xml | 2 +-
products/load-balancer/modules/p2-profile-gen/pom.xml | 2 +-
products/load-balancer/pom.xml | 2 +-
products/pom.xml | 2 +-
products/python-cartridge-agent/modules/distribution/pom.xml | 2 +-
products/python-cartridge-agent/modules/integration/pom.xml | 2 +-
.../python-cartridge-agent/modules/integration/test-common/pom.xml | 2 +-
.../modules/integration/test-integration/pom.xml | 2 +-
products/python-cartridge-agent/pom.xml | 2 +-
products/python-cli/modules/distribution/pom.xml | 2 +-
products/python-cli/pom.xml | 2 +-
products/stratos-cli/modules/distribution/pom.xml | 2 +-
products/stratos-cli/pom.xml | 2 +-
products/stratos/modules/distribution/pom.xml | 2 +-
products/stratos/modules/integration/pom.xml | 2 +-
products/stratos/modules/integration/test-common/pom.xml | 2 +-
products/stratos/modules/integration/test-integration/pom.xml | 2 +-
products/stratos/modules/p2-profile-gen/pom.xml | 2 +-
products/stratos/pom.xml | 2 +-
service-stubs/org.apache.stratos.autoscaler.service.stub/pom.xml | 2 +-
.../org.apache.stratos.cloud.controller.service.stub/pom.xml | 2 +-
service-stubs/org.apache.stratos.manager.service.stub/pom.xml | 2 +-
service-stubs/pom.xml | 2 +-
119 files changed, 119 insertions(+), 119 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/components/org.apache.stratos.autoscaler/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/pom.xml b/components/org.apache.stratos.autoscaler/pom.xml
index 1a74b82..ad46636 100644
--- a/components/org.apache.stratos.autoscaler/pom.xml
+++ b/components/org.apache.stratos.autoscaler/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-components-parent</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>org.apache.stratos.autoscaler</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/components/org.apache.stratos.cartridge.agent/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cartridge.agent/pom.xml b/components/org.apache.stratos.cartridge.agent/pom.xml
index 0f45bbf..013ecc4 100644
--- a/components/org.apache.stratos.cartridge.agent/pom.xml
+++ b/components/org.apache.stratos.cartridge.agent/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-components-parent</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>org.apache.stratos.cartridge.agent</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/components/org.apache.stratos.cli/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/pom.xml b/components/org.apache.stratos.cli/pom.xml
index e05709a..85b2293 100644
--- a/components/org.apache.stratos.cli/pom.xml
+++ b/components/org.apache.stratos.cli/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-components-parent</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>org.apache.stratos.cli</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/components/org.apache.stratos.cloud.controller/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/pom.xml b/components/org.apache.stratos.cloud.controller/pom.xml
index 953d034..923c58f 100644
--- a/components/org.apache.stratos.cloud.controller/pom.xml
+++ b/components/org.apache.stratos.cloud.controller/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-components-parent</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>org.apache.stratos.cloud.controller</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/components/org.apache.stratos.common/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/pom.xml b/components/org.apache.stratos.common/pom.xml
index 64d93f3..4521c5b 100644
--- a/components/org.apache.stratos.common/pom.xml
+++ b/components/org.apache.stratos.common/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-components-parent</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>org.apache.stratos.common</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/components/org.apache.stratos.custom.handlers/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.custom.handlers/pom.xml b/components/org.apache.stratos.custom.handlers/pom.xml
index c4e3218..10b679d 100644
--- a/components/org.apache.stratos.custom.handlers/pom.xml
+++ b/components/org.apache.stratos.custom.handlers/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-components-parent</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>org.apache.stratos.custom.handlers</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/components/org.apache.stratos.kubernetes.client/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.kubernetes.client/pom.xml b/components/org.apache.stratos.kubernetes.client/pom.xml
index 38c45bd..31b9c54 100644
--- a/components/org.apache.stratos.kubernetes.client/pom.xml
+++ b/components/org.apache.stratos.kubernetes.client/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-components-parent</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>org.apache.stratos.kubernetes.client</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/components/org.apache.stratos.load.balancer.common/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.load.balancer.common/pom.xml b/components/org.apache.stratos.load.balancer.common/pom.xml
index 27626c1..bd5df24 100644
--- a/components/org.apache.stratos.load.balancer.common/pom.xml
+++ b/components/org.apache.stratos.load.balancer.common/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-components-parent</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>org.apache.stratos.load.balancer.common</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/components/org.apache.stratos.load.balancer.extension.api/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.load.balancer.extension.api/pom.xml b/components/org.apache.stratos.load.balancer.extension.api/pom.xml
index ec765e1..d3e94be 100644
--- a/components/org.apache.stratos.load.balancer.extension.api/pom.xml
+++ b/components/org.apache.stratos.load.balancer.extension.api/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-components-parent</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>org.apache.stratos.load.balancer.extension.api</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/components/org.apache.stratos.load.balancer/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.load.balancer/pom.xml b/components/org.apache.stratos.load.balancer/pom.xml
index 498d848..44e16fe 100644
--- a/components/org.apache.stratos.load.balancer/pom.xml
+++ b/components/org.apache.stratos.load.balancer/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-components-parent</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>org.apache.stratos.load.balancer</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/components/org.apache.stratos.manager.styles/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.styles/pom.xml b/components/org.apache.stratos.manager.styles/pom.xml
index 3c1f8d8..ca08a9a 100644
--- a/components/org.apache.stratos.manager.styles/pom.xml
+++ b/components/org.apache.stratos.manager.styles/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-components-parent</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
<relativePath>../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/components/org.apache.stratos.manager/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/pom.xml b/components/org.apache.stratos.manager/pom.xml
index 8eb64cc..b2b3b1d 100644
--- a/components/org.apache.stratos.manager/pom.xml
+++ b/components/org.apache.stratos.manager/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-components-parent</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>org.apache.stratos.manager</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/components/org.apache.stratos.messaging/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/pom.xml b/components/org.apache.stratos.messaging/pom.xml
index 3f2089a..73aaa4f 100644
--- a/components/org.apache.stratos.messaging/pom.xml
+++ b/components/org.apache.stratos.messaging/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-components-parent</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>org.apache.stratos.messaging</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/components/org.apache.stratos.metadata.client/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.metadata.client/pom.xml b/components/org.apache.stratos.metadata.client/pom.xml
index f280c09..a8d310e 100644
--- a/components/org.apache.stratos.metadata.client/pom.xml
+++ b/components/org.apache.stratos.metadata.client/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-components-parent</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>org.apache.stratos.metadata.client</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/components/org.apache.stratos.metadata.service/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.metadata.service/pom.xml b/components/org.apache.stratos.metadata.service/pom.xml
index 12f8c72..23b4e77 100644
--- a/components/org.apache.stratos.metadata.service/pom.xml
+++ b/components/org.apache.stratos.metadata.service/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-components-parent</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>org.apache.stratos.metadata.service</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/components/org.apache.stratos.mock.iaas.api/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.mock.iaas.api/pom.xml b/components/org.apache.stratos.mock.iaas.api/pom.xml
index b88c6c2..0e45ad5 100644
--- a/components/org.apache.stratos.mock.iaas.api/pom.xml
+++ b/components/org.apache.stratos.mock.iaas.api/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-components-parent</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>org.apache.stratos.mock.iaas.api</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/components/org.apache.stratos.mock.iaas.client/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.mock.iaas.client/pom.xml b/components/org.apache.stratos.mock.iaas.client/pom.xml
index 4fe9b57..c4f0b16 100644
--- a/components/org.apache.stratos.mock.iaas.client/pom.xml
+++ b/components/org.apache.stratos.mock.iaas.client/pom.xml
@@ -23,7 +23,7 @@
<parent>
<artifactId>stratos-components-parent</artifactId>
<groupId>org.apache.stratos</groupId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>org.apache.stratos.mock.iaas.client</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/components/org.apache.stratos.mock.iaas/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.mock.iaas/pom.xml b/components/org.apache.stratos.mock.iaas/pom.xml
index cc11078..5dbb5ec 100644
--- a/components/org.apache.stratos.mock.iaas/pom.xml
+++ b/components/org.apache.stratos.mock.iaas/pom.xml
@@ -23,7 +23,7 @@
<parent>
<artifactId>stratos-components-parent</artifactId>
<groupId>org.apache.stratos</groupId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>org.apache.stratos.mock.iaas</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/components/org.apache.stratos.python.cartridge.agent/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent/pom.xml b/components/org.apache.stratos.python.cartridge.agent/pom.xml
index 1ea6aa7..2c1b7dd 100644
--- a/components/org.apache.stratos.python.cartridge.agent/pom.xml
+++ b/components/org.apache.stratos.python.cartridge.agent/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-components-parent</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>org.apache.stratos.python.cartridge.agent</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/components/org.apache.stratos.python.cli/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cli/pom.xml b/components/org.apache.stratos.python.cli/pom.xml
index ab6411e..7719fa0 100644
--- a/components/org.apache.stratos.python.cli/pom.xml
+++ b/components/org.apache.stratos.python.cli/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-components-parent</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>org.apache.stratos.python.cli</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/components/org.apache.stratos.rest.endpoint/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/pom.xml b/components/org.apache.stratos.rest.endpoint/pom.xml
index 2aaeada..0f02d4c 100644
--- a/components/org.apache.stratos.rest.endpoint/pom.xml
+++ b/components/org.apache.stratos.rest.endpoint/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-components-parent</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>org.apache.stratos.rest.endpoint</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/components/pom.xml
----------------------------------------------------------------------
diff --git a/components/pom.xml b/components/pom.xml
index 540bd9d..6d768ab 100644
--- a/components/pom.xml
+++ b/components/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-parent</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>stratos-components-parent</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/dependencies/fabric8/kubernetes-api/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/fabric8/kubernetes-api/pom.xml b/dependencies/fabric8/kubernetes-api/pom.xml
index d60c976..14fecb8 100644
--- a/dependencies/fabric8/kubernetes-api/pom.xml
+++ b/dependencies/fabric8/kubernetes-api/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-dependencies-fabric8</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>kubernetes-api</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/dependencies/fabric8/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/fabric8/pom.xml b/dependencies/fabric8/pom.xml
index ba0ebe6..f924b56 100644
--- a/dependencies/fabric8/pom.xml
+++ b/dependencies/fabric8/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-dependents</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>stratos-dependencies-fabric8</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/dependencies/guice-assistedinject/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/guice-assistedinject/pom.xml b/dependencies/guice-assistedinject/pom.xml
index 76185af..200b8ff 100644
--- a/dependencies/guice-assistedinject/pom.xml
+++ b/dependencies/guice-assistedinject/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-dependents</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>guice-assistedinject</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/dependencies/guice-multibindings/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/guice-multibindings/pom.xml b/dependencies/guice-multibindings/pom.xml
index 3d002e3..6f3785e 100644
--- a/dependencies/guice-multibindings/pom.xml
+++ b/dependencies/guice-multibindings/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-dependents</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>guice-multibindings</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/dependencies/guice/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/guice/pom.xml b/dependencies/guice/pom.xml
index 89cf949..34002c0 100644
--- a/dependencies/guice/pom.xml
+++ b/dependencies/guice/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-dependents</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>guice</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/dependencies/jclouds/cloudstack/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/cloudstack/pom.xml b/dependencies/jclouds/cloudstack/pom.xml
index 2b95424..78ef876 100644
--- a/dependencies/jclouds/cloudstack/pom.xml
+++ b/dependencies/jclouds/cloudstack/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-dependencies-jclouds</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>cloudstack</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/dependencies/jclouds/ec2/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/ec2/pom.xml b/dependencies/jclouds/ec2/pom.xml
index 1a8ec6c..6b0f1a4 100644
--- a/dependencies/jclouds/ec2/pom.xml
+++ b/dependencies/jclouds/ec2/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-dependencies-jclouds</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>ec2</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/dependencies/jclouds/google-jclouds-labs/google-cloud-storage/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/google-jclouds-labs/google-cloud-storage/pom.xml b/dependencies/jclouds/google-jclouds-labs/google-cloud-storage/pom.xml
index 021d587..5d4ba39 100644
--- a/dependencies/jclouds/google-jclouds-labs/google-cloud-storage/pom.xml
+++ b/dependencies/jclouds/google-jclouds-labs/google-cloud-storage/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>google-jclouds-labs</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>google-cloud-storage</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/dependencies/jclouds/google-jclouds-labs/google-compute-engine/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/google-jclouds-labs/google-compute-engine/pom.xml b/dependencies/jclouds/google-jclouds-labs/google-compute-engine/pom.xml
index 0af4e36..0133f97 100644
--- a/dependencies/jclouds/google-jclouds-labs/google-compute-engine/pom.xml
+++ b/dependencies/jclouds/google-jclouds-labs/google-compute-engine/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>google-jclouds-labs</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>google-compute-engine</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/dependencies/jclouds/google-jclouds-labs/googlecloud/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/google-jclouds-labs/googlecloud/pom.xml b/dependencies/jclouds/google-jclouds-labs/googlecloud/pom.xml
index 5d4dea5..aa93fb2 100644
--- a/dependencies/jclouds/google-jclouds-labs/googlecloud/pom.xml
+++ b/dependencies/jclouds/google-jclouds-labs/googlecloud/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>google-jclouds-labs</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>googlecloud</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/dependencies/jclouds/google-jclouds-labs/oauth/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/google-jclouds-labs/oauth/pom.xml b/dependencies/jclouds/google-jclouds-labs/oauth/pom.xml
index 2eac9c0..6d6b812 100644
--- a/dependencies/jclouds/google-jclouds-labs/oauth/pom.xml
+++ b/dependencies/jclouds/google-jclouds-labs/oauth/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>google-jclouds-labs</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>oauth</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/dependencies/jclouds/google-jclouds-labs/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/google-jclouds-labs/pom.xml b/dependencies/jclouds/google-jclouds-labs/pom.xml
index 3ef4ec5..44ef8e0 100644
--- a/dependencies/jclouds/google-jclouds-labs/pom.xml
+++ b/dependencies/jclouds/google-jclouds-labs/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-dependencies-jclouds</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>google-jclouds-labs</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/dependencies/jclouds/jclouds-blobstore/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/jclouds-blobstore/pom.xml b/dependencies/jclouds/jclouds-blobstore/pom.xml
index c831798..5f928d2 100644
--- a/dependencies/jclouds/jclouds-blobstore/pom.xml
+++ b/dependencies/jclouds/jclouds-blobstore/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-dependencies-jclouds</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>jclouds-blobstore</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/dependencies/jclouds/jclouds-bouncycastle/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/jclouds-bouncycastle/pom.xml b/dependencies/jclouds/jclouds-bouncycastle/pom.xml
index c4be8ec..656a5a4 100644
--- a/dependencies/jclouds/jclouds-bouncycastle/pom.xml
+++ b/dependencies/jclouds/jclouds-bouncycastle/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-dependencies-jclouds</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>jclouds-bouncycastle</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/dependencies/jclouds/jclouds-compute/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/jclouds-compute/pom.xml b/dependencies/jclouds/jclouds-compute/pom.xml
index a07126d..aa3a59c 100644
--- a/dependencies/jclouds/jclouds-compute/pom.xml
+++ b/dependencies/jclouds/jclouds-compute/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-dependencies-jclouds</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>jclouds-compute</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/dependencies/jclouds/jclouds-core/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/jclouds-core/pom.xml b/dependencies/jclouds/jclouds-core/pom.xml
index 4e5ac81..9620525 100644
--- a/dependencies/jclouds/jclouds-core/pom.xml
+++ b/dependencies/jclouds/jclouds-core/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-dependencies-jclouds</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>jclouds-core</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/dependencies/jclouds/jclouds-enterprise/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/jclouds-enterprise/pom.xml b/dependencies/jclouds/jclouds-enterprise/pom.xml
index 5401ad4..ba2d34b 100644
--- a/dependencies/jclouds/jclouds-enterprise/pom.xml
+++ b/dependencies/jclouds/jclouds-enterprise/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-dependencies-jclouds</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>jclouds-enterprise</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/dependencies/jclouds/jclouds-joda/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/jclouds-joda/pom.xml b/dependencies/jclouds/jclouds-joda/pom.xml
index 55f3e25..b02b536 100644
--- a/dependencies/jclouds/jclouds-joda/pom.xml
+++ b/dependencies/jclouds/jclouds-joda/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-dependencies-jclouds</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>jclouds-joda</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/dependencies/jclouds/jclouds-netty/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/jclouds-netty/pom.xml b/dependencies/jclouds/jclouds-netty/pom.xml
index 0598a82..58ab5dd 100644
--- a/dependencies/jclouds/jclouds-netty/pom.xml
+++ b/dependencies/jclouds/jclouds-netty/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-dependencies-jclouds</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>jclouds-netty</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/dependencies/jclouds/jclouds-sshj/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/jclouds-sshj/pom.xml b/dependencies/jclouds/jclouds-sshj/pom.xml
index 8f147b3..4ad8f0d 100644
--- a/dependencies/jclouds/jclouds-sshj/pom.xml
+++ b/dependencies/jclouds/jclouds-sshj/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-dependencies-jclouds</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>jclouds-sshj</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/dependencies/jclouds/openstack-common/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/openstack-common/pom.xml b/dependencies/jclouds/openstack-common/pom.xml
index 25041f4..bd56e1a 100644
--- a/dependencies/jclouds/openstack-common/pom.xml
+++ b/dependencies/jclouds/openstack-common/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-dependencies-jclouds</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>openstack-common</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/dependencies/jclouds/openstack-keystone/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/openstack-keystone/pom.xml b/dependencies/jclouds/openstack-keystone/pom.xml
index 7a532c8..940bf0e 100644
--- a/dependencies/jclouds/openstack-keystone/pom.xml
+++ b/dependencies/jclouds/openstack-keystone/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-dependencies-jclouds</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>openstack-keystone</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/dependencies/jclouds/openstack-neutron/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/openstack-neutron/pom.xml b/dependencies/jclouds/openstack-neutron/pom.xml
index e45b860..8f91b9d 100644
--- a/dependencies/jclouds/openstack-neutron/pom.xml
+++ b/dependencies/jclouds/openstack-neutron/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-dependencies-jclouds</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>openstack-neutron</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/dependencies/jclouds/openstack-nova/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/openstack-nova/pom.xml b/dependencies/jclouds/openstack-nova/pom.xml
index 328fc4e..854bdda 100644
--- a/dependencies/jclouds/openstack-nova/pom.xml
+++ b/dependencies/jclouds/openstack-nova/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-dependencies-jclouds</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>openstack-nova</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/dependencies/jclouds/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/pom.xml b/dependencies/jclouds/pom.xml
index e84984f..3c11e6e 100644
--- a/dependencies/jclouds/pom.xml
+++ b/dependencies/jclouds/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-dependents</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>stratos-dependencies-jclouds</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/dependencies/jclouds/sts/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/sts/pom.xml b/dependencies/jclouds/sts/pom.xml
index 1785224..73254dd 100644
--- a/dependencies/jclouds/sts/pom.xml
+++ b/dependencies/jclouds/sts/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-dependencies-jclouds</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>sts</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/dependencies/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/pom.xml b/dependencies/pom.xml
index 9d8e420..63323a4 100644
--- a/dependencies/pom.xml
+++ b/dependencies/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-parent</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>stratos-dependents</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/dependencies/rocoto/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/rocoto/pom.xml b/dependencies/rocoto/pom.xml
index 4f8072d..d1be336 100644
--- a/dependencies/rocoto/pom.xml
+++ b/dependencies/rocoto/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-dependents</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>rocoto</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/dependencies/sshj/pom.xml
----------------------------------------------------------------------
diff --git a/dependencies/sshj/pom.xml b/dependencies/sshj/pom.xml
index 74740d6..688f71e 100644
--- a/dependencies/sshj/pom.xml
+++ b/dependencies/sshj/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-dependents</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>net.schmizz.sshj</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/extensions/cep/modules/distribution/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/cep/modules/distribution/pom.xml b/extensions/cep/modules/distribution/pom.xml
index b1266f9..5c0e1c5 100644
--- a/extensions/cep/modules/distribution/pom.xml
+++ b/extensions/cep/modules/distribution/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>cep-extensions</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
<relativePath>../../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/extensions/cep/modules/stratos-cep-extension/wso2cep-3.0.0/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/cep/modules/stratos-cep-extension/wso2cep-3.0.0/pom.xml b/extensions/cep/modules/stratos-cep-extension/wso2cep-3.0.0/pom.xml
index a455bcf..a687c7d 100644
--- a/extensions/cep/modules/stratos-cep-extension/wso2cep-3.0.0/pom.xml
+++ b/extensions/cep/modules/stratos-cep-extension/wso2cep-3.0.0/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>cep-extensions</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/extensions/cep/modules/stratos-cep-extension/wso2cep-3.1.0/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/cep/modules/stratos-cep-extension/wso2cep-3.1.0/pom.xml b/extensions/cep/modules/stratos-cep-extension/wso2cep-3.1.0/pom.xml
index 8208571..4297c09 100644
--- a/extensions/cep/modules/stratos-cep-extension/wso2cep-3.1.0/pom.xml
+++ b/extensions/cep/modules/stratos-cep-extension/wso2cep-3.1.0/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>cep-extensions</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/extensions/cep/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/cep/pom.xml b/extensions/cep/pom.xml
index b746075..4d9fa76 100644
--- a/extensions/cep/pom.xml
+++ b/extensions/cep/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-extensions</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>cep-extensions</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/extensions/das/modules/artifacts/metering-dashboard/capps/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/pom.xml b/extensions/das/modules/artifacts/metering-dashboard/capps/pom.xml
index dacc1da..4221521 100644
--- a/extensions/das/modules/artifacts/metering-dashboard/capps/pom.xml
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/pom.xml
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>das-extension</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/extensions/das/modules/artifacts/monitoring-dashboard/capps/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/monitoring-dashboard/capps/pom.xml b/extensions/das/modules/artifacts/monitoring-dashboard/capps/pom.xml
index 18c375e..3e69f60 100644
--- a/extensions/das/modules/artifacts/monitoring-dashboard/capps/pom.xml
+++ b/extensions/das/modules/artifacts/monitoring-dashboard/capps/pom.xml
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>das-extension</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/extensions/das/modules/distribution/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/das/modules/distribution/pom.xml b/extensions/das/modules/distribution/pom.xml
index 43e6b8a..cfb212c 100644
--- a/extensions/das/modules/distribution/pom.xml
+++ b/extensions/das/modules/distribution/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>das-extension</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
<relativePath>../../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/extensions/das/modules/stratos-das-extension/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/das/modules/stratos-das-extension/pom.xml b/extensions/das/modules/stratos-das-extension/pom.xml
index e7d9053..0cc4985 100644
--- a/extensions/das/modules/stratos-das-extension/pom.xml
+++ b/extensions/das/modules/stratos-das-extension/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>das-extension</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/extensions/das/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/das/pom.xml b/extensions/das/pom.xml
index e81a68b..c2af510 100644
--- a/extensions/das/pom.xml
+++ b/extensions/das/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-extensions</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<modelVersion>4.0.0</modelVersion>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/extensions/load-balancer/modules/aws-extension/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/load-balancer/modules/aws-extension/pom.xml b/extensions/load-balancer/modules/aws-extension/pom.xml
index 36dc5c8..c3cf5dc 100644
--- a/extensions/load-balancer/modules/aws-extension/pom.xml
+++ b/extensions/load-balancer/modules/aws-extension/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-load-balancer-extensions</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
<relativePath>../../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/extensions/load-balancer/modules/haproxy-extension/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/load-balancer/modules/haproxy-extension/pom.xml b/extensions/load-balancer/modules/haproxy-extension/pom.xml
index 5f42132..a1e39b2 100644
--- a/extensions/load-balancer/modules/haproxy-extension/pom.xml
+++ b/extensions/load-balancer/modules/haproxy-extension/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-load-balancer-extensions</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
<relativePath>../../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/extensions/load-balancer/modules/lvs-extension/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/load-balancer/modules/lvs-extension/pom.xml b/extensions/load-balancer/modules/lvs-extension/pom.xml
index e100c70..a85a2f1 100644
--- a/extensions/load-balancer/modules/lvs-extension/pom.xml
+++ b/extensions/load-balancer/modules/lvs-extension/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-load-balancer-extensions</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
<relativePath>../../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/extensions/load-balancer/modules/nginx-extension/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/load-balancer/modules/nginx-extension/pom.xml b/extensions/load-balancer/modules/nginx-extension/pom.xml
index 71989d1..5cd94e3 100644
--- a/extensions/load-balancer/modules/nginx-extension/pom.xml
+++ b/extensions/load-balancer/modules/nginx-extension/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-load-balancer-extensions</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
<relativePath>../../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/extensions/load-balancer/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/load-balancer/pom.xml b/extensions/load-balancer/pom.xml
index f11ef0b..37455f4 100644
--- a/extensions/load-balancer/pom.xml
+++ b/extensions/load-balancer/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-extensions</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>stratos-load-balancer-extensions</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/extensions/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/pom.xml b/extensions/pom.xml
index 197c31c..fc86407 100644
--- a/extensions/pom.xml
+++ b/extensions/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-parent</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>stratos-extensions</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/features/autoscaler/org.apache.stratos.autoscaler.feature/pom.xml
----------------------------------------------------------------------
diff --git a/features/autoscaler/org.apache.stratos.autoscaler.feature/pom.xml b/features/autoscaler/org.apache.stratos.autoscaler.feature/pom.xml
index 6534a26..d3f4e4a 100644
--- a/features/autoscaler/org.apache.stratos.autoscaler.feature/pom.xml
+++ b/features/autoscaler/org.apache.stratos.autoscaler.feature/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>autoscaler-features</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
<relativePath>../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/features/autoscaler/pom.xml
----------------------------------------------------------------------
diff --git a/features/autoscaler/pom.xml b/features/autoscaler/pom.xml
index b5d81b4..4abb0f2 100644
--- a/features/autoscaler/pom.xml
+++ b/features/autoscaler/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-features-parent</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>autoscaler-features</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/features/cep/org.apache.stratos.event.processor.feature/pom.xml
----------------------------------------------------------------------
diff --git a/features/cep/org.apache.stratos.event.processor.feature/pom.xml b/features/cep/org.apache.stratos.event.processor.feature/pom.xml
index 1ccca10..dd3f3e6 100644
--- a/features/cep/org.apache.stratos.event.processor.feature/pom.xml
+++ b/features/cep/org.apache.stratos.event.processor.feature/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>cep-features</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
<relativePath>../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/features/cep/org.apache.stratos.event.processor.server.feature/pom.xml
----------------------------------------------------------------------
diff --git a/features/cep/org.apache.stratos.event.processor.server.feature/pom.xml b/features/cep/org.apache.stratos.event.processor.server.feature/pom.xml
index 06a5d61..37f47cf 100644
--- a/features/cep/org.apache.stratos.event.processor.server.feature/pom.xml
+++ b/features/cep/org.apache.stratos.event.processor.server.feature/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>cep-features</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
<relativePath>../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/features/cep/pom.xml
----------------------------------------------------------------------
diff --git a/features/cep/pom.xml b/features/cep/pom.xml
index aabdf6c..2f9745b 100644
--- a/features/cep/pom.xml
+++ b/features/cep/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-features-parent</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>cep-features</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/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 3befc3d..ce05a41 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
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>cloud-controller-features</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
<relativePath>../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/features/cloud-controller/pom.xml
----------------------------------------------------------------------
diff --git a/features/cloud-controller/pom.xml b/features/cloud-controller/pom.xml
index f5becdd..31752f0 100644
--- a/features/cloud-controller/pom.xml
+++ b/features/cloud-controller/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-features-parent</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
<relativePath>../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/features/common/org.apache.stratos.common.feature/pom.xml
----------------------------------------------------------------------
diff --git a/features/common/org.apache.stratos.common.feature/pom.xml b/features/common/org.apache.stratos.common.feature/pom.xml
index 5d75e68..8cca3fe 100644
--- a/features/common/org.apache.stratos.common.feature/pom.xml
+++ b/features/common/org.apache.stratos.common.feature/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>common-features</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>org.apache.stratos.common.feature</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/features/common/org.apache.stratos.common.server.feature/pom.xml
----------------------------------------------------------------------
diff --git a/features/common/org.apache.stratos.common.server.feature/pom.xml b/features/common/org.apache.stratos.common.server.feature/pom.xml
index ec4cd0c..2bf4317 100644
--- a/features/common/org.apache.stratos.common.server.feature/pom.xml
+++ b/features/common/org.apache.stratos.common.server.feature/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>common-features</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
<relativePath>../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/features/common/org.apache.stratos.custom.handlers.feature/pom.xml
----------------------------------------------------------------------
diff --git a/features/common/org.apache.stratos.custom.handlers.feature/pom.xml b/features/common/org.apache.stratos.custom.handlers.feature/pom.xml
index ef9dbd2..7e3a23e 100644
--- a/features/common/org.apache.stratos.custom.handlers.feature/pom.xml
+++ b/features/common/org.apache.stratos.custom.handlers.feature/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>common-features</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
<relativePath>../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/features/common/pom.xml
----------------------------------------------------------------------
diff --git a/features/common/pom.xml b/features/common/pom.xml
index a29442b..912a91d 100644
--- a/features/common/pom.xml
+++ b/features/common/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-features-parent</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>common-features</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/features/load-balancer/org.apache.stratos.load.balancer.common.feature/pom.xml
----------------------------------------------------------------------
diff --git a/features/load-balancer/org.apache.stratos.load.balancer.common.feature/pom.xml b/features/load-balancer/org.apache.stratos.load.balancer.common.feature/pom.xml
index c428358..d6da3f5 100644
--- a/features/load-balancer/org.apache.stratos.load.balancer.common.feature/pom.xml
+++ b/features/load-balancer/org.apache.stratos.load.balancer.common.feature/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>loadbalancer-features</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>org.apache.stratos.load.balancer.common.feature</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/features/load-balancer/org.apache.stratos.load.balancer.feature/pom.xml
----------------------------------------------------------------------
diff --git a/features/load-balancer/org.apache.stratos.load.balancer.feature/pom.xml b/features/load-balancer/org.apache.stratos.load.balancer.feature/pom.xml
index eed0860..4e325dd 100644
--- a/features/load-balancer/org.apache.stratos.load.balancer.feature/pom.xml
+++ b/features/load-balancer/org.apache.stratos.load.balancer.feature/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>loadbalancer-features</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>org.apache.stratos.load.balancer.feature</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/features/load-balancer/pom.xml
----------------------------------------------------------------------
diff --git a/features/load-balancer/pom.xml b/features/load-balancer/pom.xml
index f643ec6..34df3ba 100644
--- a/features/load-balancer/pom.xml
+++ b/features/load-balancer/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-features-parent</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>loadbalancer-features</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/features/manager/metadata-service/org.apache.stratos.metadata.client.feature/pom.xml
----------------------------------------------------------------------
diff --git a/features/manager/metadata-service/org.apache.stratos.metadata.client.feature/pom.xml b/features/manager/metadata-service/org.apache.stratos.metadata.client.feature/pom.xml
index 196a2be..2589dd3 100644
--- a/features/manager/metadata-service/org.apache.stratos.metadata.client.feature/pom.xml
+++ b/features/manager/metadata-service/org.apache.stratos.metadata.client.feature/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-manager-features</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
<relativePath>../../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/features/manager/metadata-service/org.apache.stratos.metadata.service.feature/pom.xml
----------------------------------------------------------------------
diff --git a/features/manager/metadata-service/org.apache.stratos.metadata.service.feature/pom.xml b/features/manager/metadata-service/org.apache.stratos.metadata.service.feature/pom.xml
index b8889d2..473da68 100644
--- a/features/manager/metadata-service/org.apache.stratos.metadata.service.feature/pom.xml
+++ b/features/manager/metadata-service/org.apache.stratos.metadata.service.feature/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-manager-features</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
<relativePath>../../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/features/manager/pom.xml
----------------------------------------------------------------------
diff --git a/features/manager/pom.xml b/features/manager/pom.xml
index e2d2804..8688d97 100644
--- a/features/manager/pom.xml
+++ b/features/manager/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-features-parent</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>stratos-manager-features</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/features/manager/rest-endpoint/org.apache.stratos.rest.endpoint.feature/pom.xml
----------------------------------------------------------------------
diff --git a/features/manager/rest-endpoint/org.apache.stratos.rest.endpoint.feature/pom.xml b/features/manager/rest-endpoint/org.apache.stratos.rest.endpoint.feature/pom.xml
index 6ab73bb..a160373 100644
--- a/features/manager/rest-endpoint/org.apache.stratos.rest.endpoint.feature/pom.xml
+++ b/features/manager/rest-endpoint/org.apache.stratos.rest.endpoint.feature/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-manager-features</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
<relativePath>../../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/features/manager/stratos-mgt/org.apache.stratos.manager.feature/pom.xml
----------------------------------------------------------------------
diff --git a/features/manager/stratos-mgt/org.apache.stratos.manager.feature/pom.xml b/features/manager/stratos-mgt/org.apache.stratos.manager.feature/pom.xml
index 1d472dd..3096a46 100644
--- a/features/manager/stratos-mgt/org.apache.stratos.manager.feature/pom.xml
+++ b/features/manager/stratos-mgt/org.apache.stratos.manager.feature/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-mgt-parent-feature</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>org.apache.stratos.manager.feature</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/features/manager/stratos-mgt/org.apache.stratos.manager.server.feature/pom.xml
----------------------------------------------------------------------
diff --git a/features/manager/stratos-mgt/org.apache.stratos.manager.server.feature/pom.xml b/features/manager/stratos-mgt/org.apache.stratos.manager.server.feature/pom.xml
index 66ee3eb..33f9aaa 100644
--- a/features/manager/stratos-mgt/org.apache.stratos.manager.server.feature/pom.xml
+++ b/features/manager/stratos-mgt/org.apache.stratos.manager.server.feature/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-mgt-parent-feature</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>org.apache.stratos.manager.server.feature</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/features/manager/stratos-mgt/pom.xml
----------------------------------------------------------------------
diff --git a/features/manager/stratos-mgt/pom.xml b/features/manager/stratos-mgt/pom.xml
index b03c997..e32d310 100644
--- a/features/manager/stratos-mgt/pom.xml
+++ b/features/manager/stratos-mgt/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-manager-features</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>stratos-mgt-parent-feature</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/features/manager/styles/org.apache.stratos.manager.styles.feature/pom.xml
----------------------------------------------------------------------
diff --git a/features/manager/styles/org.apache.stratos.manager.styles.feature/pom.xml b/features/manager/styles/org.apache.stratos.manager.styles.feature/pom.xml
index 68fc7ff..78de51b 100644
--- a/features/manager/styles/org.apache.stratos.manager.styles.feature/pom.xml
+++ b/features/manager/styles/org.apache.stratos.manager.styles.feature/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-manager-features</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
<relativePath>../../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/features/messaging/org.apache.stratos.messaging.feature/pom.xml
----------------------------------------------------------------------
diff --git a/features/messaging/org.apache.stratos.messaging.feature/pom.xml b/features/messaging/org.apache.stratos.messaging.feature/pom.xml
index 4b0e09b..6d32926 100644
--- a/features/messaging/org.apache.stratos.messaging.feature/pom.xml
+++ b/features/messaging/org.apache.stratos.messaging.feature/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>messaging-features</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>org.apache.stratos.messaging.feature</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/features/messaging/pom.xml
----------------------------------------------------------------------
diff --git a/features/messaging/pom.xml b/features/messaging/pom.xml
index 6f829f4..cf48121 100644
--- a/features/messaging/pom.xml
+++ b/features/messaging/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-features-parent</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>messaging-features</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/features/mock-iaas/org.apache.stratos.mock.iaas.api.feature/pom.xml
----------------------------------------------------------------------
diff --git a/features/mock-iaas/org.apache.stratos.mock.iaas.api.feature/pom.xml b/features/mock-iaas/org.apache.stratos.mock.iaas.api.feature/pom.xml
index 1ee50ac..29d755d 100644
--- a/features/mock-iaas/org.apache.stratos.mock.iaas.api.feature/pom.xml
+++ b/features/mock-iaas/org.apache.stratos.mock.iaas.api.feature/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>mock-iaas-features</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>org.apache.stratos.mock.iaas.api.feature</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/features/mock-iaas/pom.xml
----------------------------------------------------------------------
diff --git a/features/mock-iaas/pom.xml b/features/mock-iaas/pom.xml
index 430a345..62aa744 100644
--- a/features/mock-iaas/pom.xml
+++ b/features/mock-iaas/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-features-parent</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
<relativePath>../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/features/pom.xml
----------------------------------------------------------------------
diff --git a/features/pom.xml b/features/pom.xml
index 2f2d578..502bfa0 100644
--- a/features/pom.xml
+++ b/features/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-parent</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>stratos-features-parent</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 50dd47a..453330d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -29,7 +29,7 @@
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-parent</artifactId>
<packaging>pom</packaging>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
<name>Apache Stratos</name>
<description>Apache Stratos is an open source polyglot Platform as a Service (PaaS) framework</description>
<url>http://stratos.apache.org</url>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/products/cartridge-agent/modules/distribution/pom.xml
----------------------------------------------------------------------
diff --git a/products/cartridge-agent/modules/distribution/pom.xml b/products/cartridge-agent/modules/distribution/pom.xml
index e0be347..61aa802 100644
--- a/products/cartridge-agent/modules/distribution/pom.xml
+++ b/products/cartridge-agent/modules/distribution/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>cartidge-agent</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
<relativePath>../../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/products/cartridge-agent/pom.xml
----------------------------------------------------------------------
diff --git a/products/cartridge-agent/pom.xml b/products/cartridge-agent/pom.xml
index c4f251d..4cffdfc 100644
--- a/products/cartridge-agent/pom.xml
+++ b/products/cartridge-agent/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-products-parent</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>cartidge-agent</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/products/load-balancer/modules/distribution/pom.xml
----------------------------------------------------------------------
diff --git a/products/load-balancer/modules/distribution/pom.xml b/products/load-balancer/modules/distribution/pom.xml
index 5761c2c..a367dc4 100755
--- a/products/load-balancer/modules/distribution/pom.xml
+++ b/products/load-balancer/modules/distribution/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.stratos.load.balancer</groupId>
<artifactId>load-balancer-parent</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
<relativePath>../../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/products/load-balancer/modules/p2-profile-gen/pom.xml
----------------------------------------------------------------------
diff --git a/products/load-balancer/modules/p2-profile-gen/pom.xml b/products/load-balancer/modules/p2-profile-gen/pom.xml
index f201d35..7ddb2f5 100755
--- a/products/load-balancer/modules/p2-profile-gen/pom.xml
+++ b/products/load-balancer/modules/p2-profile-gen/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos.load.balancer</groupId>
<artifactId>load-balancer-parent</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
<relativePath>../../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/products/load-balancer/pom.xml
----------------------------------------------------------------------
diff --git a/products/load-balancer/pom.xml b/products/load-balancer/pom.xml
index e8c0a0c..ae22d39 100755
--- a/products/load-balancer/pom.xml
+++ b/products/load-balancer/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-parent</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
<relativePath>../../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/products/pom.xml
----------------------------------------------------------------------
diff --git a/products/pom.xml b/products/pom.xml
index b9806e1..b2b4a93 100644
--- a/products/pom.xml
+++ b/products/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-parent</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<modelVersion>4.0.0</modelVersion>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/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
index 737fd72..2de75d3 100644
--- a/products/python-cartridge-agent/modules/distribution/pom.xml
+++ b/products/python-cartridge-agent/modules/distribution/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>python-cartridge-agent-parent</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
<relativePath>../../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/products/python-cartridge-agent/modules/integration/pom.xml
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/modules/integration/pom.xml b/products/python-cartridge-agent/modules/integration/pom.xml
index f16d8a3..1cf0a22 100755
--- a/products/python-cartridge-agent/modules/integration/pom.xml
+++ b/products/python-cartridge-agent/modules/integration/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>python-cartridge-agent-parent</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
<relativePath>../../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/products/python-cartridge-agent/modules/integration/test-common/pom.xml
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/modules/integration/test-common/pom.xml b/products/python-cartridge-agent/modules/integration/test-common/pom.xml
index 4175928..81098be 100755
--- a/products/python-cartridge-agent/modules/integration/test-common/pom.xml
+++ b/products/python-cartridge-agent/modules/integration/test-common/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>python-cartridge-agent-integration</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>org.apache.stratos.python.cartridge.agent.integration.common</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/products/python-cartridge-agent/modules/integration/test-integration/pom.xml
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/modules/integration/test-integration/pom.xml b/products/python-cartridge-agent/modules/integration/test-integration/pom.xml
index 47d1de3..d5e0b79 100755
--- a/products/python-cartridge-agent/modules/integration/test-integration/pom.xml
+++ b/products/python-cartridge-agent/modules/integration/test-integration/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>python-cartridge-agent-integration</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>python-agent-test-integration</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/products/python-cartridge-agent/pom.xml
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/pom.xml b/products/python-cartridge-agent/pom.xml
index 5aef681..bc22986 100755
--- a/products/python-cartridge-agent/pom.xml
+++ b/products/python-cartridge-agent/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-products-parent</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>python-cartridge-agent-parent</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/products/python-cli/modules/distribution/pom.xml
----------------------------------------------------------------------
diff --git a/products/python-cli/modules/distribution/pom.xml b/products/python-cli/modules/distribution/pom.xml
index 9597e8b..6abe77b 100644
--- a/products/python-cli/modules/distribution/pom.xml
+++ b/products/python-cli/modules/distribution/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>apache-stratos-python-cli-parent</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
<relativePath>../../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/products/python-cli/pom.xml
----------------------------------------------------------------------
diff --git a/products/python-cli/pom.xml b/products/python-cli/pom.xml
index 41f2c6d..9d30429 100644
--- a/products/python-cli/pom.xml
+++ b/products/python-cli/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-products-parent</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
<relativePath>../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/products/stratos-cli/modules/distribution/pom.xml
----------------------------------------------------------------------
diff --git a/products/stratos-cli/modules/distribution/pom.xml b/products/stratos-cli/modules/distribution/pom.xml
index 80d0814..c607a2f 100644
--- a/products/stratos-cli/modules/distribution/pom.xml
+++ b/products/stratos-cli/modules/distribution/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>apache-stratos-cli-parent</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
<relativePath>../../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/products/stratos-cli/pom.xml
----------------------------------------------------------------------
diff --git a/products/stratos-cli/pom.xml b/products/stratos-cli/pom.xml
index 2370fa3..2757264 100644
--- a/products/stratos-cli/pom.xml
+++ b/products/stratos-cli/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-products-parent</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
<relativePath>../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/products/stratos/modules/distribution/pom.xml
----------------------------------------------------------------------
diff --git a/products/stratos/modules/distribution/pom.xml b/products/stratos/modules/distribution/pom.xml
index 9c23923..0cf2928 100755
--- a/products/stratos/modules/distribution/pom.xml
+++ b/products/stratos/modules/distribution/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
<relativePath>../../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/products/stratos/modules/integration/pom.xml
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/pom.xml b/products/stratos/modules/integration/pom.xml
index 1f4feca..432ccf8 100755
--- a/products/stratos/modules/integration/pom.xml
+++ b/products/stratos/modules/integration/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
<relativePath>../../pom.xml</relativePath>
</parent>
[48/50] [abbrv] stratos git commit: Preparing release for the
4.1.5-rc3
Posted by ga...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/products/stratos/modules/integration/test-common/pom.xml
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-common/pom.xml b/products/stratos/modules/integration/test-common/pom.xml
index 4da23fa..c51e17a 100755
--- a/products/stratos/modules/integration/test-common/pom.xml
+++ b/products/stratos/modules/integration/test-common/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-integration</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>org.apache.stratos.integration.common</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/products/stratos/modules/integration/test-integration/pom.xml
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/pom.xml b/products/stratos/modules/integration/test-integration/pom.xml
index 642b333..153bb3e 100755
--- a/products/stratos/modules/integration/test-integration/pom.xml
+++ b/products/stratos/modules/integration/test-integration/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-integration</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>stratos-test-integration</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/products/stratos/modules/p2-profile-gen/pom.xml
----------------------------------------------------------------------
diff --git a/products/stratos/modules/p2-profile-gen/pom.xml b/products/stratos/modules/p2-profile-gen/pom.xml
index 657f686..3d41443 100644
--- a/products/stratos/modules/p2-profile-gen/pom.xml
+++ b/products/stratos/modules/p2-profile-gen/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
<relativePath>../../pom.xml</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/products/stratos/pom.xml
----------------------------------------------------------------------
diff --git a/products/stratos/pom.xml b/products/stratos/pom.xml
index 69874e0..5154490 100755
--- a/products/stratos/pom.xml
+++ b/products/stratos/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-products-parent</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>stratos</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/service-stubs/org.apache.stratos.autoscaler.service.stub/pom.xml
----------------------------------------------------------------------
diff --git a/service-stubs/org.apache.stratos.autoscaler.service.stub/pom.xml b/service-stubs/org.apache.stratos.autoscaler.service.stub/pom.xml
index 0374959..1b7dfbb 100644
--- a/service-stubs/org.apache.stratos.autoscaler.service.stub/pom.xml
+++ b/service-stubs/org.apache.stratos.autoscaler.service.stub/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-service-stubs-parent</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>org.apache.stratos.autoscaler.service.stub</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/service-stubs/org.apache.stratos.cloud.controller.service.stub/pom.xml
----------------------------------------------------------------------
diff --git a/service-stubs/org.apache.stratos.cloud.controller.service.stub/pom.xml b/service-stubs/org.apache.stratos.cloud.controller.service.stub/pom.xml
index fb182e6..8315e74 100644
--- a/service-stubs/org.apache.stratos.cloud.controller.service.stub/pom.xml
+++ b/service-stubs/org.apache.stratos.cloud.controller.service.stub/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-service-stubs-parent</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>org.apache.stratos.cloud.controller.service.stub</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/service-stubs/org.apache.stratos.manager.service.stub/pom.xml
----------------------------------------------------------------------
diff --git a/service-stubs/org.apache.stratos.manager.service.stub/pom.xml b/service-stubs/org.apache.stratos.manager.service.stub/pom.xml
index 7d99cc3..892e38f 100644
--- a/service-stubs/org.apache.stratos.manager.service.stub/pom.xml
+++ b/service-stubs/org.apache.stratos.manager.service.stub/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-service-stubs-parent</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>org.apache.stratos.manager.service.stub</artifactId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/04c97cbd/service-stubs/pom.xml
----------------------------------------------------------------------
diff --git a/service-stubs/pom.xml b/service-stubs/pom.xml
index d8dc84c..ab66ab6 100644
--- a/service-stubs/pom.xml
+++ b/service-stubs/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.stratos</groupId>
<artifactId>stratos-parent</artifactId>
- <version>4.1.5-SNAPSHOT</version>
+ <version>4.1.5</version>
</parent>
<artifactId>stratos-service-stubs-parent</artifactId>
[40/50] [abbrv] stratos git commit: Updating releases in
doap_Stratos.rdf
Posted by ga...@apache.org.
Updating releases in doap_Stratos.rdf
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/574eb48a
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/574eb48a
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/574eb48a
Branch: refs/heads/release-4.1.5
Commit: 574eb48a2e77fa54ae35f2b95873934b85ffc991
Parents: 33831f5
Author: Imesh Gunaratne <im...@apache.org>
Authored: Sat Dec 5 20:59:34 2015 +0530
Committer: gayangunarathne <ga...@wso2.com>
Committed: Mon Dec 7 10:16:29 2015 +0000
----------------------------------------------------------------------
doap_Stratos.rdf | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/574eb48a/doap_Stratos.rdf
----------------------------------------------------------------------
diff --git a/doap_Stratos.rdf b/doap_Stratos.rdf
index bf2c620..e5dfac5 100644
--- a/doap_Stratos.rdf
+++ b/doap_Stratos.rdf
@@ -48,6 +48,34 @@
<revision>4.0.0</revision>
</Version>
</release>
+ <release>
+ <Version>
+ <name>Apache Stgratos 4.1.1</name>
+ <created>2014-07-13</created>
+ <revision>4.1.1</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>Apache Stgratos 4.1.2</name>
+ <created>2014-09-02</created>
+ <revision>4.1.2</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>Apache Stgratos 4.1.3</name>
+ <created>2014-09-23</created>
+ <revision>4.1.3</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>Apache Stgratos 4.1.4</name>
+ <created>2014-10-22</created>
+ <revision>4.1.4</revision>
+ </Version>
+ </release>
<repository>
<SVNRepository>
<location rdf:resource="https://git-wip-us.apache.org/repos/asf/stratos.git"/>
[32/50] [abbrv] stratos git commit: Renaming cep-310 extension
artifact id
Posted by ga...@apache.org.
Renaming cep-310 extension artifact id
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/a3ed54b4
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/a3ed54b4
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/a3ed54b4
Branch: refs/heads/release-4.1.5
Commit: a3ed54b4de66d522463073a62e09025000c591cf
Parents: 0dce72e
Author: Thanuja <th...@wso2.com>
Authored: Mon Nov 30 13:30:30 2015 +0530
Committer: gayangunarathne <ga...@wso2.com>
Committed: Mon Dec 7 10:16:28 2015 +0000
----------------------------------------------------------------------
extensions/cep/modules/distribution/pom.xml | 2 +-
extensions/cep/modules/distribution/src/assembly/bin.xml | 2 +-
extensions/cep/modules/stratos-cep-extension/wso2cep-3.1.0/pom.xml | 2 +-
pom.xml | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/a3ed54b4/extensions/cep/modules/distribution/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/cep/modules/distribution/pom.xml b/extensions/cep/modules/distribution/pom.xml
index 9d88b6e..8f6442a 100644
--- a/extensions/cep/modules/distribution/pom.xml
+++ b/extensions/cep/modules/distribution/pom.xml
@@ -70,7 +70,7 @@
</dependency>
<dependency>
<groupId>org.apache.stratos</groupId>
- <artifactId>org.apache.stratos.cep.310.extension</artifactId>
+ <artifactId>org.apache.stratos.cep310.extension</artifactId>
</dependency>
</dependencies>
</project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/a3ed54b4/extensions/cep/modules/distribution/src/assembly/bin.xml
----------------------------------------------------------------------
diff --git a/extensions/cep/modules/distribution/src/assembly/bin.xml b/extensions/cep/modules/distribution/src/assembly/bin.xml
index 8706de0..ee6c14b 100755
--- a/extensions/cep/modules/distribution/src/assembly/bin.xml
+++ b/extensions/cep/modules/distribution/src/assembly/bin.xml
@@ -61,7 +61,7 @@
<outputDirectory>${project.artifactId}-${project.version}/lib</outputDirectory>
<includes>
<include>org.apache.stratos:org.apache.stratos.cep300.extension:jar</include>
- <include>org.apache.stratos:org.apache.stratos.cep.310.extension:jar</include>
+ <include>org.apache.stratos:org.apache.stratos.cep310.extension:jar</include>
</includes>
</dependencySet>
</dependencySets>
http://git-wip-us.apache.org/repos/asf/stratos/blob/a3ed54b4/extensions/cep/modules/stratos-cep-extension/wso2cep-3.1.0/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/cep/modules/stratos-cep-extension/wso2cep-3.1.0/pom.xml b/extensions/cep/modules/stratos-cep-extension/wso2cep-3.1.0/pom.xml
index 838e4a1..4297c09 100644
--- a/extensions/cep/modules/stratos-cep-extension/wso2cep-3.1.0/pom.xml
+++ b/extensions/cep/modules/stratos-cep-extension/wso2cep-3.1.0/pom.xml
@@ -21,7 +21,7 @@
<relativePath>../../../pom.xml</relativePath>
</parent>
- <artifactId>org.apache.stratos.cep.310.extension</artifactId>
+ <artifactId>org.apache.stratos.cep310.extension</artifactId>
<name>Apache Stratos - CEP Extensions</name>
<description>Apache Stratos CEP Extensions</description>
http://git-wip-us.apache.org/repos/asf/stratos/blob/a3ed54b4/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index be072eb..453330d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1033,7 +1033,7 @@
</dependency>
<dependency>
<groupId>org.apache.stratos</groupId>
- <artifactId>org.apache.stratos.cep.310.extension</artifactId>
+ <artifactId>org.apache.stratos.cep310.extension</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
[11/50] [abbrv] stratos git commit: Remove the clean when generating
the car files
Posted by ga...@apache.org.
Remove the clean when generating the car files
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/64657eaf
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/64657eaf
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/64657eaf
Branch: refs/heads/release-4.1.5
Commit: 64657eafa35c482468421c9621c765754129fdd4
Parents: e44144b
Author: gayangunarathne <ga...@wso2.com>
Authored: Mon Nov 30 10:50:40 2015 +0530
Committer: gayangunarathne <ga...@wso2.com>
Committed: Mon Dec 7 10:16:26 2015 +0000
----------------------------------------------------------------------
.../artifacts/metering-dashboard/capps/pom.xml | 14 +-------------
.../artifacts/monitoring-dashboard/capps/pom.xml | 12 ------------
2 files changed, 1 insertion(+), 25 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/64657eaf/extensions/das/modules/artifacts/metering-dashboard/capps/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/pom.xml b/extensions/das/modules/artifacts/metering-dashboard/capps/pom.xml
index c38f6f1..4221521 100644
--- a/extensions/das/modules/artifacts/metering-dashboard/capps/pom.xml
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/pom.xml
@@ -37,19 +37,7 @@
<build>
<plugins>
- <plugin>
- <artifactId>maven-clean-plugin</artifactId>
- <executions>
- <execution>
- <id>auto-clean</id>
- <phase>initialize</phase>
- <goals>
- <goal>clean</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
+ <plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
http://git-wip-us.apache.org/repos/asf/stratos/blob/64657eaf/extensions/das/modules/artifacts/monitoring-dashboard/capps/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/monitoring-dashboard/capps/pom.xml b/extensions/das/modules/artifacts/monitoring-dashboard/capps/pom.xml
index 0ae78b7..3e69f60 100644
--- a/extensions/das/modules/artifacts/monitoring-dashboard/capps/pom.xml
+++ b/extensions/das/modules/artifacts/monitoring-dashboard/capps/pom.xml
@@ -38,18 +38,6 @@
<build>
<plugins>
<plugin>
- <artifactId>maven-clean-plugin</artifactId>
- <executions>
- <execution>
- <id>auto-clean</id>
- <phase>initialize</phase>
- <goals>
- <goal>clean</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
[09/50] [abbrv] stratos git commit: Set parallel false at suite level
in testng configuration file
Posted by ga...@apache.org.
Set parallel false at suite level in testng configuration file
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/e44144b5
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/e44144b5
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/e44144b5
Branch: refs/heads/release-4.1.5
Commit: e44144b59139c32038eeedc1c556ef72f5a9c78a
Parents: f6c828a
Author: Akila Perera <ra...@gmail.com>
Authored: Mon Nov 30 00:29:47 2015 +0530
Committer: gayangunarathne <ga...@wso2.com>
Committed: Mon Dec 7 10:16:26 2015 +0000
----------------------------------------------------------------------
.../test-integration/src/test/resources/test-suite-all.xml | 4 ++--
.../test-integration/src/test/resources/test-suite-smoke.xml | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/e44144b5/products/stratos/modules/integration/test-integration/src/test/resources/test-suite-all.xml
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/test-suite-all.xml b/products/stratos/modules/integration/test-integration/src/test/resources/test-suite-all.xml
index be687f2..5a73f7c 100644
--- a/products/stratos/modules/integration/test-integration/src/test/resources/test-suite-all.xml
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/test-suite-all.xml
@@ -20,7 +20,7 @@
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
-<suite name="StratosIntegrationSuite">
+<suite name="StratosIntegrationSuite" parallel="false">
<listeners>
<listener class-name="org.wso2.carbon.automation.engine.testlisteners.TestExecutionListener"/>
<listener class-name="org.wso2.carbon.automation.engine.testlisteners.TestSuiteListener"/>
@@ -41,4 +41,4 @@
<package name="org.apache.stratos.integration.tests.*"/>
</packages>
</test>
-</suite>
\ No newline at end of file
+</suite>
http://git-wip-us.apache.org/repos/asf/stratos/blob/e44144b5/products/stratos/modules/integration/test-integration/src/test/resources/test-suite-smoke.xml
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/resources/test-suite-smoke.xml b/products/stratos/modules/integration/test-integration/src/test/resources/test-suite-smoke.xml
index 0f388d7..0e2fbf0 100644
--- a/products/stratos/modules/integration/test-integration/src/test/resources/test-suite-smoke.xml
+++ b/products/stratos/modules/integration/test-integration/src/test/resources/test-suite-smoke.xml
@@ -20,7 +20,7 @@
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
-<suite name="StratosIntegrationSuite">
+<suite name="StratosIntegrationSuite" parallel="false">
<listeners>
<listener class-name="org.wso2.carbon.automation.engine.testlisteners.TestExecutionListener"/>
<listener class-name="org.wso2.carbon.automation.engine.testlisteners.TestSuiteListener"/>
[12/50] [abbrv] stratos git commit: PCA - STRATOS-1634 and
STRATOS-1635 - Log displays passworded git URL, PCA doesn't validate app_path
Posted by ga...@apache.org.
PCA - STRATOS-1634 and STRATOS-1635 - Log displays passworded git URL, PCA doesn't validate app_path
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/a64d1ac4
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/a64d1ac4
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/a64d1ac4
Branch: refs/heads/release-4.1.5
Commit: a64d1ac48bbb6c53dcbd8964f71412b7869642c3
Parents: 46eee21
Author: Chamila de Alwis <ch...@apache.org>
Authored: Mon Nov 30 12:33:57 2015 +0530
Committer: gayangunarathne <ga...@wso2.com>
Committed: Mon Dec 7 10:16:26 2015 +0000
----------------------------------------------------------------------
.../modules/artifactmgt/git/agentgithandler.py | 7 +-
.../modules/event/eventhandler.py | 12 ++
.../modules/util/cartridgeagentutils.py | 4 +-
.../plugins/DefaultArtifactCheckout.py | 4 +-
.../tests/ADCValidationTestCase.java | 176 +++++++++++++++++++
.../resources/ADCValidationTestCase/agent.conf | 46 +++++
.../resources/ADCValidationTestCase/logging.ini | 52 ++++++
.../ADCValidationTestCase/payload/launch-params | 1 +
8 files changed, 296 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/a64d1ac4/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/artifactmgt/git/agentgithandler.py
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/artifactmgt/git/agentgithandler.py b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/artifactmgt/git/agentgithandler.py
index c283011..2170a33 100644
--- a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/artifactmgt/git/agentgithandler.py
+++ b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/artifactmgt/git/agentgithandler.py
@@ -152,7 +152,7 @@ class AgentGitHandler:
# clone the repo to a temporary location first to avoid conflicts
AgentGitHandler.log.debug(
"Cloning artifacts from URL: %s to temp location: %s" % (git_repo.repo_url, temp_repo_path))
- Repo.clone_from(git_repo.repo_url, temp_repo_path)
+ Repo.clone_from(git_repo.auth_url, temp_repo_path)
# move the cloned dir to application path
copy_tree(temp_repo_path, git_repo.local_repo_path)
@@ -216,7 +216,8 @@ class AgentGitHandler:
git_repo = GitRepository()
git_repo.tenant_id = repo_info.tenant_id
git_repo.local_repo_path = repo_info.repo_path
- git_repo.repo_url = AgentGitHandler.create_auth_url(repo_info)
+ git_repo.repo_url = repo_info.repo_url
+ git_repo.auth_url = AgentGitHandler.create_auth_url(repo_info)
git_repo.repo_username = repo_info.repo_username
git_repo.repo_password = repo_info.repo_password
git_repo.commit_enabled = repo_info.commit_enabled
@@ -378,6 +379,8 @@ class GitRepository:
def __init__(self):
self.repo_url = None
""" :type : str """
+ self.auth_url = None
+ """ :type : str """
self.local_repo_path = None
""" :type : str """
self.cloned = False
http://git-wip-us.apache.org/repos/asf/stratos/blob/a64d1ac4/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/event/eventhandler.py
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/event/eventhandler.py b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/event/eventhandler.py
index 85624ae..6e2aa4f 100644
--- a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/event/eventhandler.py
+++ b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/event/eventhandler.py
@@ -90,6 +90,11 @@ class EventHandler:
self.__log.error("Repository path is empty. Failed to process artifact updated event.")
return
+ if not EventHandler.validate_repo_path(Config.app_path):
+ self.__log.error(
+ "Repository path cannot be accessed, or is invalid. Failed to process artifact updated event.")
+ return
+
repo_username = artifacts_updated_event.repo_username
tenant_id = artifacts_updated_event.tenant_id
is_multitenant = Config.is_multiTenant
@@ -633,6 +638,13 @@ class EventHandler:
return tenant.tenant_domain
+ @staticmethod
+ def validate_repo_path(app_path):
+ # app path would be ex: /var/www, or /opt/server/data
+ return os.access(app_path, os.W_OK)
+
+
+
class PluginExecutor(Thread):
""" Executes a given plugin on a separate thread, passing the given dictionary of values to the plugin entry method
http://git-wip-us.apache.org/repos/asf/stratos/blob/a64d1ac4/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/util/cartridgeagentutils.py
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/util/cartridgeagentutils.py b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/util/cartridgeagentutils.py
index ebd6889..79bc6c5 100644
--- a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/util/cartridgeagentutils.py
+++ b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/util/cartridgeagentutils.py
@@ -59,8 +59,8 @@ def decrypt_password(pass_str, secret):
# remove nonprintable characters that are padded in the decrypted password
dec_pass = filter(lambda x: x in string.printable, dec_pass)
- dec_pass_md5 = hashlib.md5(dec_pass.encode('utf-8')).hexdigest()
- log.debug("Decrypted password md5sum: [%r]" % dec_pass_md5)
+ # dec_pass_md5 = hashlib.md5(dec_pass.encode('utf-8')).hexdigest()
+ # log.debug("Decrypted password md5sum: [%r]" % dec_pass_md5)
return dec_pass
http://git-wip-us.apache.org/repos/asf/stratos/blob/a64d1ac4/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/plugins/DefaultArtifactCheckout.py
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/plugins/DefaultArtifactCheckout.py b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/plugins/DefaultArtifactCheckout.py
index c25d0e8..27cf99c 100644
--- a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/plugins/DefaultArtifactCheckout.py
+++ b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/plugins/DefaultArtifactCheckout.py
@@ -72,8 +72,8 @@ class DefaultArtifactCheckout(IArtifactCheckoutPlugin):
self.log.debug("Executing git pull: [tenant-id] %s [repo-url] %s",
git_repo.tenant_id, git_repo.repo_url)
updated = AgentGitHandler.pull(git_repo)
- self.log.debug("Git pull executed: [tenant-id] %s [repo-url] %s",
- git_repo.tenant_id, git_repo.repo_url)
+ self.log.debug("Git pull executed: [tenant-id] %s [repo-url] %s [SUCCESS] %s",
+ git_repo.tenant_id, git_repo.repo_url, updated)
else:
# not a valid repository, might've been corrupted. do a re-clone
self.log.debug("Local repository is not valid. Doing a re-clone to purify.")
http://git-wip-us.apache.org/repos/asf/stratos/blob/a64d1ac4/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/ADCValidationTestCase.java
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/ADCValidationTestCase.java b/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/ADCValidationTestCase.java
new file mode 100644
index 0000000..5148992
--- /dev/null
+++ b/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/ADCValidationTestCase.java
@@ -0,0 +1,176 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.stratos.python.cartridge.agent.integration.tests;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.stratos.common.domain.LoadBalancingIPType;
+import org.apache.stratos.messaging.domain.topology.*;
+import org.apache.stratos.messaging.event.instance.notifier.ArtifactUpdatedEvent;
+import org.apache.stratos.messaging.event.topology.CompleteTopologyEvent;
+import org.apache.stratos.messaging.event.topology.MemberInitializedEvent;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+
+/**
+ * Test validation for application path input on the PCA
+ */
+public class ADCValidationTestCase extends PythonAgentIntegrationTest {
+ private static final int ADC_TEST_TIMEOUT = 300000;
+ private final Log log = LogFactory.getLog(ADCValidationTestCase.class);
+// private final String INVALID_APP_PATH = "ddd/ffs/ss";
+ private static final String CLUSTER_ID = "tomcat.domain";
+ private static final String DEPLOYMENT_POLICY_NAME = "deployment-policy-2";
+ private static final String AUTOSCALING_POLICY_NAME = "autoscaling-policy-2";
+ private static final String APP_ID = "application-2";
+ private static final String MEMBER_ID = "tomcat.member-1";
+ private static final String INSTANCE_ID = "instance-1";
+ private static final String CLUSTER_INSTANCE_ID = "cluster-1-instance-1";
+ private static final String NETWORK_PARTITION_ID = "network-partition-1";
+ private static final String PARTITION_ID = "partition-1";
+ private static final String TENANT_ID = "-1234";
+ private static final String SERVICE_NAME = "tomcat";
+
+ private boolean logDetected = false;
+
+ public ADCValidationTestCase() throws IOException {
+ }
+
+ @BeforeMethod(alwaysRun = true)
+ public void setUp() throws Exception {
+ log.info("Setting up ADCTestCase");
+ // Set jndi.properties.dir system property for initializing event publishers and receivers
+ System.setProperty("jndi.properties.dir", getCommonResourcesPath());
+
+ super.setup(ADC_TEST_TIMEOUT);
+ startServerSocket(8080);
+
+ }
+
+ @AfterMethod(alwaysRun = true)
+ public void tearDownADC(){
+ tearDown();
+ }
+
+ @Test(timeOut = ADC_TEST_TIMEOUT, groups = {"adddddd"})
+ public void testAppPathValidation(){
+ log.info("Testing app path validation for ADC");
+ startCommunicatorThread();
+
+ Thread startupTestThread = new Thread(new Runnable() {
+ @Override
+ public void run() {
+ while (!eventReceiverInitialized) {
+ sleep(1000);
+ }
+ List<String> outputLines = new ArrayList<>();
+ while (!outputStream.isClosed()) {
+ List<String> newLines = getNewLines(outputLines, outputStream.toString());
+ if (newLines.size() > 0) {
+ for (String line : newLines) {
+ if (line.contains("Subscribed to 'topology/#'")) {
+ sleep(2000);
+ // Send complete topology event
+ log.info("Publishing complete topology event...");
+ Topology topology = createTestTopology();
+ CompleteTopologyEvent completeTopologyEvent = new CompleteTopologyEvent(topology);
+ publishEvent(completeTopologyEvent);
+ log.info("Complete topology event published");
+
+ // Publish member initialized event
+ log.info("Publishing member initialized event...");
+ MemberInitializedEvent memberInitializedEvent = new MemberInitializedEvent(SERVICE_NAME,
+ CLUSTER_ID, CLUSTER_INSTANCE_ID, MEMBER_ID, NETWORK_PARTITION_ID, PARTITION_ID,
+ INSTANCE_ID);
+ publishEvent(memberInitializedEvent);
+ log.info("Member initialized event published");
+ }
+
+ // Send artifact updated event to activate the instance first
+ if (line.contains("Artifact repository found")) {
+ publishEvent(getArtifactUpdatedEventForPrivateRepo());
+ log.info("Artifact updated event published");
+ }
+
+ if (line.contains("Repository path cannot be accessed, or is invalid.")){
+ logDetected = true;
+ log.info("PCA Event handler failed validation for an invalid app path.");
+ }
+ }
+ }
+ sleep(1000);
+ }
+ }
+ });
+ startupTestThread.start();
+
+ while (!logDetected) {
+ sleep(1000);
+ }
+ }
+
+ public static ArtifactUpdatedEvent getArtifactUpdatedEventForPrivateRepo() {
+ ArtifactUpdatedEvent privateRepoEvent = createTestArtifactUpdatedEvent();
+ privateRepoEvent.setRepoURL("https://bitbucket.org/testapache2211/testrepo.git");
+ privateRepoEvent.setRepoUserName("testapache2211");
+ privateRepoEvent.setRepoPassword("+to2qVW16jzy+Xb/zuafQQ==");
+ return privateRepoEvent;
+ }
+
+ private static ArtifactUpdatedEvent createTestArtifactUpdatedEvent() {
+ ArtifactUpdatedEvent artifactUpdatedEvent = new ArtifactUpdatedEvent();
+ artifactUpdatedEvent.setClusterId(CLUSTER_ID);
+ artifactUpdatedEvent.setTenantId(TENANT_ID);
+ return artifactUpdatedEvent;
+ }
+
+ /**
+ * Create test topology
+ *
+ * @return Topology object with mock information
+ */
+ private Topology createTestTopology() {
+ Topology topology = new Topology();
+ Service service = new Service(SERVICE_NAME, ServiceType.SingleTenant);
+ topology.addService(service);
+
+ Cluster cluster = new Cluster(service.getServiceName(), CLUSTER_ID, DEPLOYMENT_POLICY_NAME,
+ AUTOSCALING_POLICY_NAME, APP_ID);
+ service.addCluster(cluster);
+
+ Member member = new Member(service.getServiceName(), cluster.getClusterId(), MEMBER_ID, CLUSTER_INSTANCE_ID,
+ NETWORK_PARTITION_ID, PARTITION_ID, LoadBalancingIPType.Private, System.currentTimeMillis());
+
+ member.setDefaultPrivateIP("10.0.0.1");
+ member.setDefaultPublicIP("20.0.0.1");
+ Properties properties = new Properties();
+ properties.setProperty("prop1", "value1");
+ member.setProperties(properties);
+ member.setStatus(MemberStatus.Created);
+ cluster.addMember(member);
+ return topology;
+ }
+}
http://git-wip-us.apache.org/repos/asf/stratos/blob/a64d1ac4/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/ADCValidationTestCase/agent.conf
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/ADCValidationTestCase/agent.conf b/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/ADCValidationTestCase/agent.conf
new file mode 100755
index 0000000..d8363e7
--- /dev/null
+++ b/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/ADCValidationTestCase/agent.conf
@@ -0,0 +1,46 @@
+# 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.urls =localhost:1885
+mb.username =system
+mb.password =manager
+mb.publisher.timeout =900
+listen.address =localhost
+thrift.receiver.urls =localhost: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/a64d1ac4/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/ADCValidationTestCase/logging.ini
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/ADCValidationTestCase/logging.ini b/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/ADCValidationTestCase/logging.ini
new file mode 100755
index 0000000..15cad9b
--- /dev/null
+++ b/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/ADCValidationTestCase/logging.ini
@@ -0,0 +1,52 @@
+# 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/a64d1ac4/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/ADCValidationTestCase/payload/launch-params
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/ADCValidationTestCase/payload/launch-params b/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/ADCValidationTestCase/payload/launch-params
new file mode 100755
index 0000000..375ff6a
--- /dev/null
+++ b/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/ADCValidationTestCase/payload/launch-params
@@ -0,0 +1 @@
+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=ddd/ffs/ss,MIN_COUNT=1,INTERNAL=false,CLUSTERING_PRIMARY_KEY=A,LOG_FILE_PATHS=/tmp/temp.log,PERSISTENCE_MAPPING=null
\ No newline at end of file
[13/50] [abbrv] stratos git commit: PCA - Publish MB events using a
thread and timeout after 5 seconds. Improved PCA structure and removed
unnecessary threading PCA Live Test - Improved logging,
improved MB HA test case
Posted by ga...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/f0740ec0/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/PythonAgentIntegrationTest.java
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/PythonAgentIntegrationTest.java b/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/PythonAgentIntegrationTest.java
index 6e25b6b..08042b7 100644
--- a/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/PythonAgentIntegrationTest.java
+++ b/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/PythonAgentIntegrationTest.java
@@ -48,7 +48,7 @@ import java.util.concurrent.ExecutorService;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
-public class PythonAgentIntegrationTest {
+public abstract class PythonAgentIntegrationTest {
public static final String PATH_SEP = File.separator;
public static final String NEW_LINE = System.getProperty("line.separator");
@@ -219,6 +219,10 @@ public class PythonAgentIntegrationTest {
this.topologyEventReceiver.terminate();
this.initializerEventReceiver.terminate();
+ this.instanceStatusEventReceiver = null;
+ this.topologyEventReceiver = null;
+ this.initializerEventReceiver = null;
+
this.instanceActivated = false;
this.instanceStarted = false;
@@ -319,7 +323,7 @@ public class PythonAgentIntegrationTest {
log.error("ERROR found in PCA log", e);
}
}
- log.debug("[PCA] " + line);
+ log.debug("[" + getClassName() + "] [PCA] " + line);
}
}
sleep(100);
@@ -330,6 +334,12 @@ public class PythonAgentIntegrationTest {
}
/**
+ * Return concrete class name
+ * @return
+ */
+ protected abstract String getClassName();
+
+ /**
* Start server socket
*
* @param port Port number of server socket to be started
http://git-wip-us.apache.org/repos/asf/stratos/blob/f0740ec0/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/MessageBrokerHATestCase/agent.conf
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/MessageBrokerHATestCase/agent.conf b/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/MessageBrokerHATestCase/agent.conf
index c6c55f3..770a548 100644
--- a/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/MessageBrokerHATestCase/agent.conf
+++ b/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/MessageBrokerHATestCase/agent.conf
@@ -19,7 +19,7 @@
mb.urls =localhost:1885,localhost:1886,localhost:1887
mb.username =system
mb.password =manager
-mb.publisher.timeout =20
+mb.publisher.timeout =200
listen.address =localhost
thrift.receiver.urls =localhost:7712
thrift.server.admin.username =admin
http://git-wip-us.apache.org/repos/asf/stratos/blob/f0740ec0/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/log4j.properties b/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/log4j.properties
index 759bbb4..74b61aa 100644
--- a/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/log4j.properties
+++ b/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/log4j.properties
@@ -31,7 +31,7 @@ log4j.additivity.org.apache.stratos.python.cartridge.agent.integration.tests.Pyt
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
#log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p {%c}:%L - %m%n
+log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p {%c{1}}:%L - %m%n
log4j.appender.stdout.threshold=DEBUG
http://git-wip-us.apache.org/repos/asf/stratos/blob/f0740ec0/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/test-suite-all.xml
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/test-suite-all.xml b/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/test-suite-all.xml
index d8e342f..0e87501 100755
--- a/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/test-suite-all.xml
+++ b/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/test-suite-all.xml
@@ -24,6 +24,7 @@
<test name="all" preserve-order="true" parallel="false">
<groups>
<run>
+ <exclude name="ha"/>
<exclude name="failed"/>
<exclude name="disabled"/>
</run>
http://git-wip-us.apache.org/repos/asf/stratos/blob/f0740ec0/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/test-suite-smoke.xml
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/test-suite-smoke.xml b/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/test-suite-smoke.xml
index bcac412..77aeb2d 100755
--- a/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/test-suite-smoke.xml
+++ b/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/test-suite-smoke.xml
@@ -25,6 +25,8 @@
<groups>
<run>
<include name="smoke"/>
+ <!--<include name="ha"/>-->
+ <exclude name="ha"/>
<exclude name="failed"/>
<exclude name="disabled"/>
</run>
[08/50] [abbrv] stratos git commit: Update the aws lb extension
artifact id
Posted by ga...@apache.org.
Update the aws lb extension artifact id
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/46eee217
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/46eee217
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/46eee217
Branch: refs/heads/release-4.1.5
Commit: 46eee217f4312a5c11e4ea45cd6aa8b46fd10262
Parents: 64657ea
Author: gayangunarathne <ga...@wso2.com>
Authored: Mon Nov 30 10:51:17 2015 +0530
Committer: gayangunarathne <ga...@wso2.com>
Committed: Mon Dec 7 10:16:26 2015 +0000
----------------------------------------------------------------------
extensions/load-balancer/modules/aws-extension/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/46eee217/extensions/load-balancer/modules/aws-extension/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/load-balancer/modules/aws-extension/pom.xml b/extensions/load-balancer/modules/aws-extension/pom.xml
index ec16839..c3cf5dc 100644
--- a/extensions/load-balancer/modules/aws-extension/pom.xml
+++ b/extensions/load-balancer/modules/aws-extension/pom.xml
@@ -28,7 +28,7 @@
<relativePath>../../pom.xml</relativePath>
</parent>
- <artifactId>org.apache.stratos.aws.extension</artifactId>
+ <artifactId>apache-stratos-aws-extension</artifactId>
<name>Apache Stratos - AWS LB Extension</name>
<description>Apache Stratos AWS Extension for Load Balancing</description>
[23/50] [abbrv] stratos git commit: Cleaning up test cases. Remove
duplicate assertions. Fix formatting.
Posted by ga...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/a22f27a6/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/GroupTerminationBehaviorTestCase.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/GroupTerminationBehaviorTestCase.java b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/GroupTerminationBehaviorTestCase.java
index 7ef911f..d7b400a 100644
--- a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/GroupTerminationBehaviorTestCase.java
+++ b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/GroupTerminationBehaviorTestCase.java
@@ -22,11 +22,9 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.stratos.common.beans.application.ApplicationBean;
import org.apache.stratos.common.beans.cartridge.CartridgeGroupBean;
-import org.apache.stratos.common.beans.policy.deployment.ApplicationPolicyBean;
import org.apache.stratos.integration.common.RestConstants;
import org.apache.stratos.integration.common.TopologyHandler;
import org.apache.stratos.integration.tests.StratosIntegrationTest;
-import org.apache.stratos.messaging.domain.application.ApplicationStatus;
import org.apache.stratos.messaging.domain.topology.Member;
import org.testng.annotations.Test;
@@ -36,14 +34,15 @@ import java.util.Map;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertNull;
-import static org.testng.AssertJUnit.assertFalse;
import static org.testng.AssertJUnit.assertTrue;
/**
* Handling the termination behavior of the group
*/
+@Test(groups = { "application", "failed" })
public class GroupTerminationBehaviorTestCase extends StratosIntegrationTest {
private static final Log log = LogFactory.getLog(GroupTerminationBehaviorTestCase.class);
+ private TopologyHandler topologyHandler = TopologyHandler.getInstance();
private static final String RESOURCES_PATH = "/group-termination-behavior-test";
private static final String autoscalingPolicyId = "autoscaling-policy-group-termination-behavior-test";
private static final String cartridgeId1 = "c1-group-termination-behavior-test";
@@ -55,40 +54,38 @@ public class GroupTerminationBehaviorTestCase extends StratosIntegrationTest {
private static final String deploymentPolicyId = "deployment-policy-group-termination-behavior-test";
private static final int GROUP_INACTIVE_TIMEOUT = 180000;
- @Test(timeOut = APPLICATION_TEST_TIMEOUT, groups = {"stratos.application.deployment", "failed"})
+ @Test(timeOut = DEFAULT_APPLICATION_TEST_TIMEOUT)
public void testTerminationBehavior() throws Exception {
+ log.info("Running GroupTerminationBehaviorTestCase.testTerminationBehavior test method...");
+ long startTime = System.currentTimeMillis();
- TopologyHandler topologyHandler = TopologyHandler.getInstance();
-
- boolean addedScalingPolicy = restClient.addEntity(RESOURCES_PATH + RestConstants.AUTOSCALING_POLICIES_PATH
- + "/" + autoscalingPolicyId + ".json",
+ boolean addedScalingPolicy = restClient.addEntity(
+ RESOURCES_PATH + RestConstants.AUTOSCALING_POLICIES_PATH + "/" + autoscalingPolicyId + ".json",
RestConstants.AUTOSCALING_POLICIES, RestConstants.AUTOSCALING_POLICIES_NAME);
assertTrue(addedScalingPolicy);
- boolean addedC1 = restClient.addEntity(
- RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + cartridgeId1 + ".json",
- RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+ boolean addedC1 = restClient
+ .addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + cartridgeId1 + ".json",
+ RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
assertTrue(addedC1);
- boolean addedC2 = restClient.addEntity(
- RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + cartridgeId2 + ".json",
- RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+ boolean addedC2 = restClient
+ .addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + cartridgeId2 + ".json",
+ RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
assertTrue(addedC2);
- boolean addedC3 = restClient.addEntity(
- RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + cartridgeId3 + ".json",
- RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+ boolean addedC3 = restClient
+ .addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + cartridgeId3 + ".json",
+ RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
assertTrue(addedC3);
- boolean addedC4 = restClient.addEntity(
- RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + cartridgeId4 + ".json",
- RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+ boolean addedC4 = restClient
+ .addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + cartridgeId4 + ".json",
+ RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
assertTrue(addedC4);
boolean addedG1 = restClient.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGE_GROUPS_PATH +
- "/" + cartridgeGroupId + ".json",
- RestConstants.CARTRIDGE_GROUPS,
- RestConstants.CARTRIDGE_GROUPS_NAME);
+ "/" + cartridgeGroupId + ".json", RestConstants.CARTRIDGE_GROUPS, RestConstants.CARTRIDGE_GROUPS_NAME);
assertTrue(addedG1);
CartridgeGroupBean beanG1 = (CartridgeGroupBean) restClient.
@@ -97,61 +94,54 @@ public class GroupTerminationBehaviorTestCase extends StratosIntegrationTest {
assertEquals(beanG1.getName(), "g-sc-G4-group-termination-behavior-test");
boolean addedN1 = restClient.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
- networkPartitionId1 + ".json",
- RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
+ networkPartitionId1 + ".json", RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
assertTrue(addedN1);
boolean addedDep = restClient.addEntity(RESOURCES_PATH + RestConstants.DEPLOYMENT_POLICIES_PATH + "/" +
- deploymentPolicyId + ".json",
- RestConstants.DEPLOYMENT_POLICIES, RestConstants.DEPLOYMENT_POLICIES_NAME);
+ deploymentPolicyId + ".json", RestConstants.DEPLOYMENT_POLICIES,
+ RestConstants.DEPLOYMENT_POLICIES_NAME);
assertTrue(addedDep);
final String applicationId = "group-termination-behavior-test";
boolean added = restClient.addEntity(RESOURCES_PATH + RestConstants.APPLICATIONS_PATH + "/" +
- applicationId + ".json", RestConstants.APPLICATIONS,
- RestConstants.APPLICATIONS_NAME);
+ applicationId + ".json", RestConstants.APPLICATIONS, RestConstants.APPLICATIONS_NAME);
assertTrue(added);
- ApplicationBean bean = (ApplicationBean) restClient.getEntity(RestConstants.APPLICATIONS,
- applicationId, ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
+ ApplicationBean bean = (ApplicationBean) restClient
+ .getEntity(RestConstants.APPLICATIONS, applicationId, ApplicationBean.class,
+ RestConstants.APPLICATIONS_NAME);
assertEquals(bean.getApplicationId(), "group-termination-behavior-test");
final String applicationPolicyId = "application-policy-group-termination-behavior-test";
boolean addAppPolicy = restClient.addEntity(RESOURCES_PATH + RestConstants.APPLICATION_POLICIES_PATH + "/" +
- applicationPolicyId + ".json",
- RestConstants.APPLICATION_POLICIES,
+ applicationPolicyId + ".json", RestConstants.APPLICATION_POLICIES,
RestConstants.APPLICATION_POLICIES_NAME);
assertTrue(addAppPolicy);
//deploy the application
String resourcePath = RestConstants.APPLICATIONS + "/" + applicationId +
RestConstants.APPLICATIONS_DEPLOY + "/" + applicationPolicyId;
- boolean deployed = restClient.deployEntity(resourcePath,
- RestConstants.APPLICATIONS_NAME);
+ boolean deployed = restClient.deployEntity(resourcePath, RestConstants.APPLICATIONS_NAME);
assertTrue(deployed);
- String groupId = topologyHandler.generateId(bean.getApplicationId(),
- "g-G1-1x0-group-termination-behavior-test", bean.getApplicationId() + "-1");
+ String groupId = topologyHandler.generateId(bean.getApplicationId(), "g-G1-1x0-group-termination-behavior-test",
+ bean.getApplicationId() + "-1");
String clusterIdC3 = topologyHandler.
- getClusterIdFromAlias(bean.getApplicationId(),
- "c3-1x0-group-termination-behavior-test");
+ getClusterIdFromAlias(bean.getApplicationId(), "c3-1x0-group-termination-behavior-test");
String clusterIdC4 = topologyHandler.
- getClusterIdFromAlias(bean.getApplicationId(),
- "c4-1x0-group-termination-behavior-test");
+ getClusterIdFromAlias(bean.getApplicationId(), "c4-1x0-group-termination-behavior-test");
String clusterIdC2 = topologyHandler.
- getClusterIdFromAlias(bean.getApplicationId(),
- "c2-1x0-group-termination-behavior-test");
+ getClusterIdFromAlias(bean.getApplicationId(), "c2-1x0-group-termination-behavior-test");
assertCreationOfNodes(groupId, clusterIdC2);
assertCreationOfNodes(clusterIdC3, clusterIdC4);
//Application active handling
- topologyHandler.assertApplicationStatus(bean.getApplicationId(),
- ApplicationStatus.Active);
+ TopologyHandler.getInstance().assertApplicationActiveStatus(bean.getApplicationId());
//Group active handling
topologyHandler.assertGroupActivation(bean.getApplicationId());
@@ -159,8 +149,8 @@ public class GroupTerminationBehaviorTestCase extends StratosIntegrationTest {
//Cluster active handling
topologyHandler.assertClusterActivation(bean.getApplicationId());
- Map<String, Member> memberMap = TopologyHandler.getInstance().getMembersForCluster
- ("c3-group-termination-behavior-test", bean.getApplicationId());
+ Map<String, Member> memberMap = TopologyHandler.getInstance()
+ .getMembersForCluster("c3-group-termination-behavior-test", bean.getApplicationId());
//Terminate members in the cluster
for (Map.Entry<String, Member> entry : memberMap.entrySet()) {
@@ -185,8 +175,7 @@ public class GroupTerminationBehaviorTestCase extends StratosIntegrationTest {
assertCreationOfNodes(clusterIdC3, clusterIdC4);
//Application active handling
- topologyHandler.assertApplicationStatus(bean.getApplicationId(),
- ApplicationStatus.Active);
+ TopologyHandler.getInstance().assertApplicationActiveStatus(bean.getApplicationId());
//Group active handling
topologyHandler.assertGroupActivation(bean.getApplicationId());
@@ -194,31 +183,11 @@ public class GroupTerminationBehaviorTestCase extends StratosIntegrationTest {
//Cluster active handling
topologyHandler.assertClusterActivation(bean.getApplicationId());
- boolean removedGroup = restClient.removeEntity(RestConstants.CARTRIDGE_GROUPS,
- "g-sc-G4-group-termination-behavior-test",
- RestConstants.CARTRIDGE_GROUPS_NAME);
- assertFalse(removedGroup);
-
- boolean removedAuto = restClient.removeEntity(RestConstants.AUTOSCALING_POLICIES,
- autoscalingPolicyId, RestConstants.AUTOSCALING_POLICIES_NAME);
- assertFalse(removedAuto);
-
- boolean removedNet = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS,
- networkPartitionId1,
- RestConstants.NETWORK_PARTITIONS_NAME);
- //Trying to remove the used network partition
- assertFalse(removedNet);
-
- boolean removedDep = restClient.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
- deploymentPolicyId, RestConstants.DEPLOYMENT_POLICIES_NAME);
- assertFalse(removedDep);
-
//Un-deploying the application
String resourcePathUndeploy = RestConstants.APPLICATIONS + "/" + applicationId +
RestConstants.APPLICATIONS_UNDEPLOY;
- boolean unDeployed = restClient.undeployEntity(resourcePathUndeploy,
- RestConstants.APPLICATIONS_NAME);
+ boolean unDeployed = restClient.undeployEntity(resourcePathUndeploy, RestConstants.APPLICATIONS_NAME);
assertTrue(unDeployed);
boolean undeploy = topologyHandler.assertApplicationUndeploy(applicationId);
@@ -230,55 +199,59 @@ public class GroupTerminationBehaviorTestCase extends StratosIntegrationTest {
RestConstants.APPLICATIONS_UNDEPLOY + "?force=true", RestConstants.APPLICATIONS);
boolean forceUndeployed = topologyHandler.assertApplicationUndeploy(applicationId);
- assertTrue(String.format("Forceful undeployment failed for the application %s",
- applicationId), forceUndeployed);
+ assertTrue(String.format("Forceful undeployment failed for the application %s", applicationId),
+ forceUndeployed);
}
- boolean removed = restClient.removeEntity(RestConstants.APPLICATIONS, applicationId,
- RestConstants.APPLICATIONS_NAME);
+ boolean removed = restClient
+ .removeEntity(RestConstants.APPLICATIONS, applicationId, RestConstants.APPLICATIONS_NAME);
assertTrue(removed);
- ApplicationBean beanRemoved = (ApplicationBean) restClient.getEntity(RestConstants.APPLICATIONS,
- applicationId, ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
+ ApplicationBean beanRemoved = (ApplicationBean) restClient
+ .getEntity(RestConstants.APPLICATIONS, applicationId, ApplicationBean.class,
+ RestConstants.APPLICATIONS_NAME);
assertNull(beanRemoved);
- removedGroup = restClient.removeEntity(RestConstants.CARTRIDGE_GROUPS,
- "g-sc-G4-group-termination-behavior-test",
- RestConstants.CARTRIDGE_GROUPS_NAME);
+ boolean removedGroup = restClient
+ .removeEntity(RestConstants.CARTRIDGE_GROUPS, "g-sc-G4-group-termination-behavior-test",
+ RestConstants.CARTRIDGE_GROUPS_NAME);
assertTrue(removedGroup);
- boolean removedC1 = restClient.removeEntity(RestConstants.CARTRIDGES, cartridgeId1,
- RestConstants.CARTRIDGES_NAME);
+ boolean removedC1 = restClient
+ .removeEntity(RestConstants.CARTRIDGES, cartridgeId1, RestConstants.CARTRIDGES_NAME);
assertTrue(removedC1);
- boolean removedC2 = restClient.removeEntity(RestConstants.CARTRIDGES, cartridgeId2,
- RestConstants.CARTRIDGES_NAME);
+ boolean removedC2 = restClient
+ .removeEntity(RestConstants.CARTRIDGES, cartridgeId2, RestConstants.CARTRIDGES_NAME);
assertTrue(removedC2);
- boolean removedC3 = restClient.removeEntity(RestConstants.CARTRIDGES, cartridgeId3,
- RestConstants.CARTRIDGES_NAME);
+ boolean removedC3 = restClient
+ .removeEntity(RestConstants.CARTRIDGES, cartridgeId3, RestConstants.CARTRIDGES_NAME);
assertTrue(removedC3);
- boolean removedC4 = restClient.removeEntity(RestConstants.CARTRIDGES, cartridgeId4,
- RestConstants.CARTRIDGES_NAME);
+ boolean removedC4 = restClient
+ .removeEntity(RestConstants.CARTRIDGES, cartridgeId4, RestConstants.CARTRIDGES_NAME);
assertTrue(removedC4);
- removedAuto = restClient.removeEntity(RestConstants.AUTOSCALING_POLICIES,
- autoscalingPolicyId, RestConstants.AUTOSCALING_POLICIES_NAME);
+ boolean removedAuto = restClient.removeEntity(RestConstants.AUTOSCALING_POLICIES, autoscalingPolicyId,
+ RestConstants.AUTOSCALING_POLICIES_NAME);
assertTrue(removedAuto);
- removedDep = restClient.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
- deploymentPolicyId, RestConstants.DEPLOYMENT_POLICIES_NAME);
+ boolean removedDep = restClient.removeEntity(RestConstants.DEPLOYMENT_POLICIES, deploymentPolicyId,
+ RestConstants.DEPLOYMENT_POLICIES_NAME);
assertTrue(removedDep);
- removedNet = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS,
- networkPartitionId1, RestConstants.NETWORK_PARTITIONS_NAME);
- assertFalse(removedNet);
-
- boolean removeAppPolicy = restClient.removeEntity(RestConstants.APPLICATION_POLICIES,
- applicationPolicyId, RestConstants.APPLICATION_POLICIES_NAME);
+ boolean removeAppPolicy = restClient.removeEntity(RestConstants.APPLICATION_POLICIES, applicationPolicyId,
+ RestConstants.APPLICATION_POLICIES_NAME);
assertTrue(removeAppPolicy);
+
+ boolean removedNet = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS, networkPartitionId1,
+ RestConstants.NETWORK_PARTITIONS_NAME);
+ assertTrue(removedNet);
+
+ long duration = System.currentTimeMillis() - startTime;
+ log.info(String.format("GroupTerminationBehaviorTestCase completed in [duration] %s ms", duration));
}
private void assertGroupInactive(String groupId, String clusterId) {
@@ -288,8 +261,7 @@ public class GroupTerminationBehaviorTestCase extends StratosIntegrationTest {
while (!inActiveMap.containsKey(clusterId)) {
try {
Thread.sleep(1000);
- }
- catch (InterruptedException ignore) {
+ } catch (InterruptedException ignore) {
}
inActiveMap = TopologyHandler.getInstance().getInActiveMembers();
if ((System.currentTimeMillis() - startTime) > GROUP_INACTIVE_TIMEOUT) {
@@ -301,8 +273,7 @@ public class GroupTerminationBehaviorTestCase extends StratosIntegrationTest {
while (!inActiveMap.containsKey(groupId)) {
try {
Thread.sleep(1000);
- }
- catch (InterruptedException ignore) {
+ } catch (InterruptedException ignore) {
}
inActiveMap = TopologyHandler.getInstance().getInActiveMembers();
if ((System.currentTimeMillis() - startTime) > GROUP_INACTIVE_TIMEOUT) {
@@ -320,8 +291,7 @@ public class GroupTerminationBehaviorTestCase extends StratosIntegrationTest {
while (!terminatingMembers.containsKey(clusterId)) {
try {
Thread.sleep(1000);
- }
- catch (InterruptedException ignore) {
+ } catch (InterruptedException ignore) {
}
terminatingMembers = TopologyHandler.getInstance().getTerminatingMembers();
if ((System.currentTimeMillis() - startTime) > GROUP_INACTIVE_TIMEOUT) {
@@ -334,8 +304,7 @@ public class GroupTerminationBehaviorTestCase extends StratosIntegrationTest {
while (!terminatingMembers.containsKey(groupId)) {
try {
Thread.sleep(1000);
- }
- catch (InterruptedException ignore) {
+ } catch (InterruptedException ignore) {
}
terminatingMembers = TopologyHandler.getInstance().getTerminatingMembers();
if ((System.currentTimeMillis() - startTime) > GROUP_INACTIVE_TIMEOUT) {
@@ -354,8 +323,7 @@ public class GroupTerminationBehaviorTestCase extends StratosIntegrationTest {
while (!terminatedMembers.containsKey(clusterId)) {
try {
Thread.sleep(1000);
- }
- catch (InterruptedException ignore) {
+ } catch (InterruptedException ignore) {
}
terminatedMembers = TopologyHandler.getInstance().getTerminatedMembers();
if ((System.currentTimeMillis() - startTime) > GROUP_INACTIVE_TIMEOUT) {
@@ -368,8 +336,7 @@ public class GroupTerminationBehaviorTestCase extends StratosIntegrationTest {
while (!terminatedMembers.containsKey(groupId)) {
try {
Thread.sleep(1000);
- }
- catch (InterruptedException ignore) {
+ } catch (InterruptedException ignore) {
}
terminatedMembers = TopologyHandler.getInstance().getTerminatedMembers();
if ((System.currentTimeMillis() - startTime) > GROUP_INACTIVE_TIMEOUT) {
@@ -389,8 +356,7 @@ public class GroupTerminationBehaviorTestCase extends StratosIntegrationTest {
while (!activeMembers.containsKey(firstNodeId)) {
try {
Thread.sleep(1000);
- }
- catch (InterruptedException ignored) {
+ } catch (InterruptedException ignored) {
}
activeMembers = TopologyHandler.getInstance().getActivateddMembers();
if ((System.currentTimeMillis() - startTime) > GROUP_INACTIVE_TIMEOUT) {
@@ -402,8 +368,7 @@ public class GroupTerminationBehaviorTestCase extends StratosIntegrationTest {
while (!createdMembers.containsKey(secondNodeId)) {
try {
Thread.sleep(1000);
- }
- catch (InterruptedException ignored) {
+ } catch (InterruptedException ignored) {
}
createdMembers = TopologyHandler.getInstance().getCreatedMembers();
if ((System.currentTimeMillis() - startTime) > GROUP_INACTIVE_TIMEOUT) {
@@ -412,5 +377,8 @@ public class GroupTerminationBehaviorTestCase extends StratosIntegrationTest {
}
assertTrue(createdMembers.containsKey(secondNodeId));
assertTrue(createdMembers.get(secondNodeId) > activeMembers.get(firstNodeId));
+
+ long duration = System.currentTimeMillis() - startTime;
+ log.info(String.format("GroupTerminationBehaviorTestCase completed in [duration] %s ms", duration));
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/stratos/blob/a22f27a6/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/MetadataServiceTestCase.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/MetadataServiceTestCase.java b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/MetadataServiceTestCase.java
index f33ecad..5ba3634 100644
--- a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/MetadataServiceTestCase.java
+++ b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/MetadataServiceTestCase.java
@@ -28,14 +28,11 @@ import org.apache.stratos.common.beans.policy.deployment.ApplicationPolicyBean;
import org.apache.stratos.integration.common.RestConstants;
import org.apache.stratos.integration.common.TopologyHandler;
import org.apache.stratos.integration.tests.StratosIntegrationTest;
-import org.apache.stratos.messaging.domain.application.ApplicationStatus;
import org.apache.stratos.messaging.domain.topology.Member;
import org.apache.stratos.metadata.client.beans.PropertyBean;
import org.apache.stratos.mock.iaas.domain.MockInstanceMetadata;
import org.testng.Assert;
-import org.testng.annotations.AfterTest;
-import org.testng.annotations.BeforeTest;
-import org.testng.annotations.Test;
+import org.testng.annotations.*;
import java.util.ArrayList;
import java.util.Arrays;
@@ -52,7 +49,7 @@ import static org.testng.AssertJUnit.assertTrue;
* Deploy a sample application on mock IaaS and load test metadata service with high load of concurrent read/write
* operations from multiple clients
*/
-@Test(groups = { "stratos.application.deployment", "metadata" })
+@Test(groups = { "application", "metadata" })
public class MetadataServiceTestCase extends StratosIntegrationTest {
private static final Log log = LogFactory.getLog(MetadataServiceTestCase.class);
private static final String RESOURCES_PATH = "/metadata-service-test";
@@ -77,10 +74,10 @@ public class MetadataServiceTestCase extends StratosIntegrationTest {
public static final String APPLICATION_POLICY_ID = "application-policy-metadata-service-test";
public static final String DEPLOYMENT_POLICY_ID = "deployment-policy-metadata-service-test";
- @BeforeTest(timeOut = APPLICATION_TEST_TIMEOUT)
+ @BeforeClass(timeOut = DEFAULT_APPLICATION_TEST_TIMEOUT)
public void deployApplications() throws Exception {
+ log.info("Running MetadataServiceTestCase.deployApplications method...");
startTime = System.currentTimeMillis();
- log.info("Adding autoscaling policy [autoscale policy id] " + AUTOSCALE_POLICY_ID);
boolean addedScalingPolicy = restClient.addEntity(
RESOURCES_PATH + RestConstants.AUTOSCALING_POLICIES_PATH + "/" + AUTOSCALE_POLICY_ID + ".json",
RestConstants.AUTOSCALING_POLICIES, RestConstants.AUTOSCALING_POLICIES_NAME);
@@ -154,13 +151,13 @@ public class MetadataServiceTestCase extends StratosIntegrationTest {
assertTrue(deployed);
log.info("Waiting for application-1 status to become ACTIVE...");
- topologyHandler.assertApplicationStatus(bean1.getApplicationId(), ApplicationStatus.Active);
+ TopologyHandler.getInstance().assertApplicationActiveStatus(bean1.getApplicationId());
log.info("Waiting for cluster status of application-1 to become ACTIVE...");
topologyHandler.assertClusterActivation(bean1.getApplicationId());
log.info("Waiting for application-2 status to become ACTIVE...");
- topologyHandler.assertApplicationStatus(bean2.getApplicationId(), ApplicationStatus.Active);
+ TopologyHandler.getInstance().assertApplicationActiveStatus(bean2.getApplicationId());
log.info("Waiting for cluster status of application-2 to become ACTIVE...");
topologyHandler.assertClusterActivation(bean2.getApplicationId());
@@ -200,10 +197,11 @@ public class MetadataServiceTestCase extends StratosIntegrationTest {
return payloadProperties;
}
- @Test(timeOut = APPLICATION_TEST_TIMEOUT,
+ @Test(timeOut = DEFAULT_APPLICATION_TEST_TIMEOUT,
description = "Application startup, activation and metadata service basic test",
priority = 1)
public void testBasicOperations() throws Exception {
+ log.info("Running MetadataServiceTestCase.testBasicOperations test method...");
String key = "mykey";
String val1 = "myval1";
String val2 = "myval2";
@@ -266,10 +264,11 @@ public class MetadataServiceTestCase extends StratosIntegrationTest {
log.info("Metadata service basic test completed successfully");
}
- @Test(timeOut = APPLICATION_TEST_TIMEOUT,
+ @Test(timeOut = DEFAULT_APPLICATION_TEST_TIMEOUT,
description = "Application startup, activation and metadata service concurrency test",
priority = 2)
public void metadataConcurrencyTest() throws Exception {
+ log.info("Running MetadataServiceTestCase.metadataConcurrencyTest test method...");
log.info("Starting multiple clients to add properties");
ExecutorService taskExecutor = Executors.newFixedThreadPool(5);
List<Callable<Void>> tasks = new ArrayList<>();
@@ -289,10 +288,11 @@ public class MetadataServiceTestCase extends StratosIntegrationTest {
log.info("Metadata service concurrency test completed successfully");
}
- @Test(timeOut = APPLICATION_TEST_TIMEOUT,
+ @Test(timeOut = DEFAULT_APPLICATION_TEST_TIMEOUT,
description = "Application startup, activation and metadata service security test",
priority = 3)
public void metadataSecurityTest() throws Exception {
+ log.info("Running MetadataServiceTestCase.metadataSecurityTest test method...");
String key = "mykey";
String val1 = "myval1";
@@ -321,10 +321,11 @@ public class MetadataServiceTestCase extends StratosIntegrationTest {
log.info("Metadata service security test completed successfully");
}
- @Test(timeOut = APPLICATION_TEST_TIMEOUT,
+ @Test(timeOut = DEFAULT_APPLICATION_TEST_TIMEOUT,
description = "Application startup, activation and metadata service concurrency test",
priority = 10)
public void cleanupAfterUndeployingAppTest() throws Exception {
+ log.info("Running MetadataServiceTestCase.cleanupAfterUndeployingAppTest test method...");
// undeploy the app and check whether metadata entries are cleared
log.info("Un-deploying the application [application id] " + APPLICATION_1_ID);
String resourcePathUndeploy = RestConstants.APPLICATIONS + "/" + APPLICATION_1_ID +
@@ -367,8 +368,9 @@ public class MetadataServiceTestCase extends StratosIntegrationTest {
};
}
- @AfterTest(timeOut = APPLICATION_TEST_TIMEOUT)
+ @AfterClass(timeOut = DEFAULT_APPLICATION_TEST_TIMEOUT)
public void cleanup() throws Exception {
+ log.info("Running MetadataServiceTestCase.cleanup method...");
// remove app-1
log.info("Removing the application [application id] " + APPLICATION_1_ID);
boolean removedApp = restClient
@@ -436,6 +438,6 @@ public class MetadataServiceTestCase extends StratosIntegrationTest {
RestConstants.NETWORK_PARTITIONS_NAME);
assertTrue(removedNet);
long duration = System.currentTimeMillis() - startTime;
- log.info("Metadata test completed in " + duration + " ms");
+ log.info(String.format("MetadataServiceTestCase completed in [duration] %s ms", duration));
}
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/a22f27a6/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/PartitionOneAfterAnotherClusterTestCase.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/PartitionOneAfterAnotherClusterTestCase.java b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/PartitionOneAfterAnotherClusterTestCase.java
index 301cd53..6cbcef1 100644
--- a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/PartitionOneAfterAnotherClusterTestCase.java
+++ b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/PartitionOneAfterAnotherClusterTestCase.java
@@ -26,7 +26,6 @@ import org.apache.stratos.integration.common.RestConstants;
import org.apache.stratos.integration.common.TopologyHandler;
import org.apache.stratos.integration.tests.StratosIntegrationTest;
import org.apache.stratos.messaging.domain.application.Application;
-import org.apache.stratos.messaging.domain.application.ApplicationStatus;
import org.apache.stratos.messaging.domain.application.ClusterDataHolder;
import org.apache.stratos.messaging.domain.instance.ClusterInstance;
import org.apache.stratos.messaging.domain.topology.Cluster;
@@ -34,6 +33,7 @@ import org.apache.stratos.messaging.domain.topology.Member;
import org.apache.stratos.messaging.domain.topology.Service;
import org.apache.stratos.messaging.message.receiver.application.ApplicationManager;
import org.apache.stratos.messaging.message.receiver.topology.TopologyManager;
+import org.testng.Assert;
import org.testng.annotations.Test;
import java.util.*;
@@ -45,63 +45,62 @@ import static org.testng.AssertJUnit.assertTrue;
/**
* This will handle the scale-up and scale-down of a particular cluster bursting test cases
*/
+@Test(groups = { "application", "failed" })
public class PartitionOneAfterAnotherClusterTestCase extends StratosIntegrationTest {
private static final Log log = LogFactory.getLog(PartitionOneAfterAnotherClusterTestCase.class);
private static final String RESOURCES_PATH = "/partition-round-robin-cluster-test";
+ private TopologyHandler topologyHandler = TopologyHandler.getInstance();
- @Test(timeOut = APPLICATION_TEST_TIMEOUT, groups = {"stratos.application.deployment", "failed"})
+ @Test(timeOut = DEFAULT_APPLICATION_TEST_TIMEOUT)
public void testDeployApplication() throws Exception {
- TopologyHandler topologyHandler = TopologyHandler.getInstance();
- String autoscalingPolicyId = "autoscaling-policy-3";
+ log.info("Running PartitionOneAfterAnotherClusterTestCase.testDeployApplication test method...");
+ long startTime = System.currentTimeMillis();
- boolean addedScalingPolicy = restClient.addEntity(RESOURCES_PATH + RestConstants.AUTOSCALING_POLICIES_PATH
- + "/" + autoscalingPolicyId + ".json",
+ String autoscalingPolicyId = "autoscaling-policy-3";
+ boolean addedScalingPolicy = restClient.addEntity(
+ RESOURCES_PATH + RestConstants.AUTOSCALING_POLICIES_PATH + "/" + autoscalingPolicyId + ".json",
RestConstants.AUTOSCALING_POLICIES, RestConstants.AUTOSCALING_POLICIES_NAME);
- assertEquals(addedScalingPolicy, true);
+ Assert.assertTrue(addedScalingPolicy, "Could not add autoscaling policy");
- boolean addedC1 = restClient.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "c7.json",
- RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
- assertEquals(addedC1, true);
+ boolean addedC1 = restClient
+ .addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + "c7.json", RestConstants.CARTRIDGES,
+ RestConstants.CARTRIDGES_NAME);
+ Assert.assertTrue(addedC1, "Could not add cartridge");
boolean addedN1 = restClient.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
- "network-partition-11.json",
- RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
- assertEquals(addedN1, true);
+ "network-partition-11.json", RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
+ Assert.assertTrue(addedN1, "Could not add network partition");
boolean addedDep = restClient.addEntity(RESOURCES_PATH + RestConstants.DEPLOYMENT_POLICIES_PATH + "/" +
- "deployment-policy-5.json",
- RestConstants.DEPLOYMENT_POLICIES, RestConstants.DEPLOYMENT_POLICIES_NAME);
- assertEquals(addedDep, true);
+ "deployment-policy-5.json", RestConstants.DEPLOYMENT_POLICIES, RestConstants.DEPLOYMENT_POLICIES_NAME);
+ Assert.assertTrue(addedDep, "Could not add deployment policy");
boolean added = restClient.addEntity(RESOURCES_PATH + RestConstants.APPLICATIONS_PATH + "/" +
- "single-cluster-scaling-test.json", RestConstants.APPLICATIONS,
- RestConstants.APPLICATIONS_NAME);
- assertEquals(added, true);
+ "single-cluster-scaling-test.json", RestConstants.APPLICATIONS, RestConstants.APPLICATIONS_NAME);
+ Assert.assertTrue(added, "Could not add application");
- ApplicationBean bean = (ApplicationBean) restClient.getEntity(RestConstants.APPLICATIONS,
- "single-cluster-scaling-test", ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
+ ApplicationBean bean = (ApplicationBean) restClient
+ .getEntity(RestConstants.APPLICATIONS, "single-cluster-scaling-test", ApplicationBean.class,
+ RestConstants.APPLICATIONS_NAME);
assertEquals(bean.getApplicationId(), "single-cluster-scaling-test");
boolean addAppPolicy = restClient.addEntity(RESOURCES_PATH + RestConstants.APPLICATION_POLICIES_PATH + "/" +
"application-policy-4.json", RestConstants.APPLICATION_POLICIES,
RestConstants.APPLICATION_POLICIES_NAME);
- assertEquals(addAppPolicy, true);
+ Assert.assertTrue(addAppPolicy, "Could not add application policy");
- ApplicationPolicyBean policyBean = (ApplicationPolicyBean) restClient.getEntity(
- RestConstants.APPLICATION_POLICIES,
- "application-policy-4", ApplicationPolicyBean.class,
- RestConstants.APPLICATION_POLICIES_NAME);
+ ApplicationPolicyBean policyBean = (ApplicationPolicyBean) restClient
+ .getEntity(RestConstants.APPLICATION_POLICIES, "application-policy-4", ApplicationPolicyBean.class,
+ RestConstants.APPLICATION_POLICIES_NAME);
//deploy the application
String resourcePath = RestConstants.APPLICATIONS + "/" + "single-cluster-scaling-test" +
RestConstants.APPLICATIONS_DEPLOY + "/" + "application-policy-4";
- boolean deployed = restClient.deployEntity(resourcePath,
- RestConstants.APPLICATIONS_NAME);
- assertEquals(deployed, true);
+ boolean deployed = restClient.deployEntity(resourcePath, RestConstants.APPLICATIONS_NAME);
+ Assert.assertTrue(deployed, "Could not deploy app");
//Application active handling
- topologyHandler.assertApplicationStatus(bean.getApplicationId(),
- ApplicationStatus.Active);
+ TopologyHandler.getInstance().assertApplicationActiveStatus(bean.getApplicationId());
//Cluster active handling
topologyHandler.assertClusterActivation(bean.getApplicationId());
@@ -111,28 +110,25 @@ public class PartitionOneAfterAnotherClusterTestCase extends StratosIntegrationT
//Removing one member from cluster and check for auto healing
+ boolean removedAuto = restClient.removeEntity(RestConstants.AUTOSCALING_POLICIES, autoscalingPolicyId,
+ RestConstants.AUTOSCALING_POLICIES_NAME);
+ Assert.assertTrue(removedAuto, "Could not remove autoscaling policy");
- boolean removedAuto = restClient.removeEntity(RestConstants.AUTOSCALING_POLICIES,
- autoscalingPolicyId, RestConstants.AUTOSCALING_POLICIES_NAME);
- assertEquals(removedAuto, false);
-
- boolean removedNet = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS,
- "network-partition-11",
+ boolean removedNet = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS, "network-partition-11",
RestConstants.NETWORK_PARTITIONS_NAME);
//Trying to remove the used network partition
- assertEquals(removedNet, false);
+ Assert.assertTrue(removedNet, "Could not remove network partition");
- boolean removedDep = restClient.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
- "deployment-policy-5", RestConstants.DEPLOYMENT_POLICIES_NAME);
- assertEquals(removedDep, false);
+ boolean removedDep = restClient.removeEntity(RestConstants.DEPLOYMENT_POLICIES, "deployment-policy-5",
+ RestConstants.DEPLOYMENT_POLICIES_NAME);
+ Assert.assertTrue(removedDep, "Could not remove deployment policy");
//Un-deploying the application
String resourcePathUndeploy = RestConstants.APPLICATIONS + "/" + "single-cluster-scaling-test" +
RestConstants.APPLICATIONS_UNDEPLOY;
- boolean unDeployed = restClient.undeployEntity(resourcePathUndeploy,
- RestConstants.APPLICATIONS_NAME);
- assertEquals(unDeployed, true);
+ boolean unDeployed = restClient.undeployEntity(resourcePathUndeploy, RestConstants.APPLICATIONS_NAME);
+ Assert.assertTrue(unDeployed, "Could not undeploy app");
boolean undeploy = topologyHandler.assertApplicationUndeploy("single-cluster-scaling-test");
if (!undeploy) {
@@ -143,44 +139,45 @@ public class PartitionOneAfterAnotherClusterTestCase extends StratosIntegrationT
RestConstants.APPLICATIONS_UNDEPLOY + "?force=true", RestConstants.APPLICATIONS);
boolean forceUndeployed = topologyHandler.assertApplicationUndeploy("single-cluster-scaling-test");
- assertTrue(String.format("Forceful undeployment failed for the application %s",
- "single-cluster-scaling-test"), forceUndeployed);
+ assertTrue(
+ String.format("Forceful undeployment failed for the application %s", "single-cluster-scaling-test"),
+ forceUndeployed);
}
boolean removed = restClient.removeEntity(RestConstants.APPLICATIONS, "single-cluster-scaling-test",
RestConstants.APPLICATIONS_NAME);
- assertEquals(removed, true);
+ Assert.assertTrue(removed, "Could not remomve application");
- ApplicationBean beanRemoved = (ApplicationBean) restClient.getEntity(RestConstants.APPLICATIONS,
- "single-cluster-scaling-test", ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
+ ApplicationBean beanRemoved = (ApplicationBean) restClient
+ .getEntity(RestConstants.APPLICATIONS, "single-cluster-scaling-test", ApplicationBean.class,
+ RestConstants.APPLICATIONS_NAME);
assertEquals(beanRemoved, null);
- boolean removedC1 = restClient.removeEntity(RestConstants.CARTRIDGES, "c7",
- RestConstants.CARTRIDGES_NAME);
- assertEquals(removedC1, true);
-
-
- removedAuto = restClient.removeEntity(RestConstants.AUTOSCALING_POLICIES,
- autoscalingPolicyId, RestConstants.AUTOSCALING_POLICIES_NAME);
- assertEquals(removedAuto, true);
+ boolean removedC1 = restClient.removeEntity(RestConstants.CARTRIDGES, "c7", RestConstants.CARTRIDGES_NAME);
+ Assert.assertTrue(removedC1, "Could not remove cartridge");
- removedDep = restClient.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
- "deployment-policy-5", RestConstants.DEPLOYMENT_POLICIES_NAME);
- assertEquals(removedDep, true);
+ removedAuto = restClient.removeEntity(RestConstants.AUTOSCALING_POLICIES, autoscalingPolicyId,
+ RestConstants.AUTOSCALING_POLICIES_NAME);
+ Assert.assertTrue(removedAuto, "Could not remove autoscaling policy");
- removedNet = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS,
- "network-partition-11", RestConstants.NETWORK_PARTITIONS_NAME);
- assertEquals(removedNet, false);
+ removedDep = restClient.removeEntity(RestConstants.DEPLOYMENT_POLICIES, "deployment-policy-5",
+ RestConstants.DEPLOYMENT_POLICIES_NAME);
+ Assert.assertTrue(removedDep, "Could not remomve deployment policy");
+ removedNet = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS, "network-partition-11",
+ RestConstants.NETWORK_PARTITIONS_NAME);
+ Assert.assertTrue(removedNet, "Could not remove network partition");
- boolean removeAppPolicy = restClient.removeEntity(RestConstants.APPLICATION_POLICIES,
- "application-policy-4", RestConstants.APPLICATION_POLICIES_NAME);
- assertEquals(removeAppPolicy, true);
+ boolean removeAppPolicy = restClient.removeEntity(RestConstants.APPLICATION_POLICIES, "application-policy-4",
+ RestConstants.APPLICATION_POLICIES_NAME);
+ Assert.assertTrue(removeAppPolicy, "Could not remove application policy");
- removedNet = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS,
- "network-partition-11", RestConstants.NETWORK_PARTITIONS_NAME);
- assertEquals(removedNet, true);
+ removedNet = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS, "network-partition-11",
+ RestConstants.NETWORK_PARTITIONS_NAME);
+ Assert.assertTrue(removedNet, "Could not remove network partition");
+ long duration = System.currentTimeMillis() - startTime;
+ log.info(String.format("PartitionOneAfterAnotherClusterTestCase completed in [duration] %s ms", duration));
}
/**
@@ -190,16 +187,15 @@ public class PartitionOneAfterAnotherClusterTestCase extends StratosIntegrationT
*/
private void assertClusterWithRoundRobinAlgorithm(String applicationName) {
Application application = ApplicationManager.getApplications().getApplication(applicationName);
- assertNotNull(String.format("Application is not found: [application-id] %s",
- applicationName), application);
+ assertNotNull(String.format("Application is not found: [application-id] %s", applicationName), application);
Set<ClusterDataHolder> clusterDataHolderSet = application.getClusterDataRecursively();
for (ClusterDataHolder clusterDataHolder : clusterDataHolderSet) {
String serviceName = clusterDataHolder.getServiceType();
String clusterId = clusterDataHolder.getClusterId();
Service service = TopologyManager.getTopology().getService(serviceName);
- assertNotNull(String.format("Service is not found: [application-id] %s [service] %s",
- applicationName, serviceName), service);
+ 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",
@@ -262,8 +258,8 @@ public class PartitionOneAfterAnotherClusterTestCase extends StratosIntegrationT
} else {
p1Index++;
previousPartition = p1;
- assertEquals(allInitTime.get(i), p1InitTime.get(p1Index), "Partition-1 doesn't not contain " +
- "correct values in current iteration");
+ assertEquals(allInitTime.get(i), p1InitTime.get(p1Index),
+ "Partition-1 doesn't not contain " + "correct values in current iteration");
if (p2Index >= 0) {
assertEquals(allInitTime.get(i - 1), p2InitTime.get(p2Index),
"Partition-2 doesn't not contain correct values in the previous iteration");
@@ -277,4 +273,4 @@ public class PartitionOneAfterAnotherClusterTestCase extends StratosIntegrationT
}
}
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/stratos/blob/a22f27a6/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/PartitionRoundRobinClusterTestCase.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/PartitionRoundRobinClusterTestCase.java b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/PartitionRoundRobinClusterTestCase.java
index b8d119c..4fa50b9 100644
--- a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/PartitionRoundRobinClusterTestCase.java
+++ b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/PartitionRoundRobinClusterTestCase.java
@@ -25,7 +25,6 @@ import org.apache.stratos.integration.common.RestConstants;
import org.apache.stratos.integration.common.TopologyHandler;
import org.apache.stratos.integration.tests.StratosIntegrationTest;
import org.apache.stratos.messaging.domain.application.Application;
-import org.apache.stratos.messaging.domain.application.ApplicationStatus;
import org.apache.stratos.messaging.domain.application.ClusterDataHolder;
import org.apache.stratos.messaging.domain.instance.ClusterInstance;
import org.apache.stratos.messaging.domain.topology.Cluster;
@@ -39,7 +38,6 @@ import org.testng.annotations.Test;
import java.util.*;
import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertFalse;
import static org.testng.Assert.assertNull;
import static org.testng.AssertJUnit.assertNotNull;
import static org.testng.AssertJUnit.assertTrue;
@@ -47,6 +45,7 @@ import static org.testng.AssertJUnit.assertTrue;
/**
* This will handle the scale-up and scale-down of a particular cluster bursting test cases
*/
+@Test(groups = { "application", "round-robin" })
public class PartitionRoundRobinClusterTestCase extends StratosIntegrationTest {
private static final Log log = LogFactory.getLog(PartitionRoundRobinClusterTestCase.class);
private static final String RESOURCES_PATH = "/partition-round-robin-cluster-test";
@@ -56,40 +55,39 @@ public class PartitionRoundRobinClusterTestCase extends StratosIntegrationTest {
private static final String deploymentPolicyId = "deployment-policy-partition-round-robin-test";
private static final String applicationId = "partition-round-robin-test";
private static final String applicationPolicyId = "application-policy-partition-round-robin-test";
+ private TopologyHandler topologyHandler = TopologyHandler.getInstance();
- @Test(timeOut = APPLICATION_TEST_TIMEOUT, groups = {"stratos.application.deployment"})
+ @Test(timeOut = DEFAULT_APPLICATION_TEST_TIMEOUT)
public void testDeployApplication() throws Exception {
+ log.info("Running PartitionRoundRobinClusterTestCase.testDeployApplication test method...");
+ long startTime = System.currentTimeMillis();
-
- TopologyHandler topologyHandler = TopologyHandler.getInstance();
-
- boolean addedScalingPolicy = restClient.addEntity(RESOURCES_PATH + RestConstants.AUTOSCALING_POLICIES_PATH
- + "/" + autoscalingPolicyId + ".json",
+ boolean addedScalingPolicy = restClient.addEntity(
+ RESOURCES_PATH + RestConstants.AUTOSCALING_POLICIES_PATH + "/" + autoscalingPolicyId + ".json",
RestConstants.AUTOSCALING_POLICIES, RestConstants.AUTOSCALING_POLICIES_NAME);
Assert.assertTrue(addedScalingPolicy);
- boolean addedC1 = restClient.addEntity(
- RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + cartridgeId + ".json",
- RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+ boolean addedC1 = restClient
+ .addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + cartridgeId + ".json",
+ RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
Assert.assertTrue(addedC1);
boolean addedN1 = restClient.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
- networkPartitionId + ".json",
- RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
+ networkPartitionId + ".json", RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
Assert.assertTrue(addedN1);
boolean addedDep = restClient.addEntity(RESOURCES_PATH + RestConstants.DEPLOYMENT_POLICIES_PATH + "/" +
- deploymentPolicyId + ".json",
- RestConstants.DEPLOYMENT_POLICIES, RestConstants.DEPLOYMENT_POLICIES_NAME);
+ deploymentPolicyId + ".json", RestConstants.DEPLOYMENT_POLICIES,
+ RestConstants.DEPLOYMENT_POLICIES_NAME);
Assert.assertTrue(addedDep);
boolean added = restClient.addEntity(RESOURCES_PATH + RestConstants.APPLICATIONS_PATH + "/" +
- applicationId + ".json", RestConstants.APPLICATIONS,
- RestConstants.APPLICATIONS_NAME);
+ applicationId + ".json", RestConstants.APPLICATIONS, RestConstants.APPLICATIONS_NAME);
Assert.assertTrue(added);
- ApplicationBean bean = (ApplicationBean) restClient.getEntity(RestConstants.APPLICATIONS,
- applicationId, ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
+ ApplicationBean bean = (ApplicationBean) restClient
+ .getEntity(RestConstants.APPLICATIONS, applicationId, ApplicationBean.class,
+ RestConstants.APPLICATIONS_NAME);
assertEquals(bean.getApplicationId(), applicationId);
boolean addAppPolicy = restClient.addEntity(RESOURCES_PATH + RestConstants.APPLICATION_POLICIES_PATH + "/" +
@@ -100,14 +98,11 @@ public class PartitionRoundRobinClusterTestCase extends StratosIntegrationTest {
//deploy the application
String resourcePath = RestConstants.APPLICATIONS + "/" + applicationId +
RestConstants.APPLICATIONS_DEPLOY + "/" + applicationPolicyId;
- boolean deployed = restClient.deployEntity(resourcePath,
- RestConstants.APPLICATIONS_NAME);
+ boolean deployed = restClient.deployEntity(resourcePath, RestConstants.APPLICATIONS_NAME);
Assert.assertTrue(deployed);
-
//Application active handling
- topologyHandler.assertApplicationStatus(bean.getApplicationId(),
- ApplicationStatus.Active);
+ TopologyHandler.getInstance().assertApplicationActiveStatus(bean.getApplicationId());
//Cluster active handling
topologyHandler.assertClusterActivation(bean.getApplicationId());
@@ -115,86 +110,57 @@ public class PartitionRoundRobinClusterTestCase extends StratosIntegrationTest {
//Verifying whether members got created using round robin algorithm
assertClusterWithRoundRobinAlgorithm(bean.getApplicationId());
- //Application in-active handling
- log.info("Waiting for the faulty member detection from " +
- "CEP as the statistics are stopped...");
- topologyHandler.assertApplicationStatus(bean.getApplicationId(),
- ApplicationStatus.Inactive);
-
- //Application active handling after application becomes active again
- topologyHandler.assertApplicationStatus(bean.getApplicationId(),
- ApplicationStatus.Active);
-
- //Cluster active handling
- topologyHandler.assertClusterActivation(bean.getApplicationId());
-
- boolean removedAuto = restClient.removeEntity(RestConstants.AUTOSCALING_POLICIES,
- autoscalingPolicyId, RestConstants.AUTOSCALING_POLICIES_NAME);
- assertFalse(removedAuto);
-
- boolean removedNet = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS,
- networkPartitionId,
- RestConstants.NETWORK_PARTITIONS_NAME);
- //Trying to remove the used network partition
- assertFalse(removedNet);
-
- boolean removedDep = restClient.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
- deploymentPolicyId, RestConstants.DEPLOYMENT_POLICIES_NAME);
- assertFalse(removedDep);
-
//Un-deploying the application
String resourcePathUndeploy = RestConstants.APPLICATIONS + "/" + applicationId +
RestConstants.APPLICATIONS_UNDEPLOY;
- boolean unDeployed = restClient.undeployEntity(resourcePathUndeploy,
- RestConstants.APPLICATIONS_NAME);
+ boolean unDeployed = restClient.undeployEntity(resourcePathUndeploy, RestConstants.APPLICATIONS_NAME);
Assert.assertTrue(unDeployed);
boolean undeploy = topologyHandler.assertApplicationUndeploy(applicationId);
if (!undeploy) {
//Need to forcefully undeploy the application
- log.info(String.format("Force undeployment is going to start for the [application] %s", applicationId));
+ log.info(String.format("Force undeployment is going to start for [application-id] %s", applicationId));
restClient.undeployEntity(RestConstants.APPLICATIONS + "/" + applicationId +
RestConstants.APPLICATIONS_UNDEPLOY + "?force=true", RestConstants.APPLICATIONS);
boolean forceUndeployed = topologyHandler.assertApplicationUndeploy(applicationId);
- assertTrue(String.format("Forceful undeployment failed for the application %s",
- applicationId), forceUndeployed);
+ assertTrue(String.format("Forceful undeployment failed for the application %s", applicationId),
+ forceUndeployed);
}
- boolean removed = restClient.removeEntity(RestConstants.APPLICATIONS, applicationId,
- RestConstants.APPLICATIONS_NAME);
+ boolean removed = restClient
+ .removeEntity(RestConstants.APPLICATIONS, applicationId, RestConstants.APPLICATIONS_NAME);
Assert.assertTrue(removed);
- ApplicationBean beanRemoved = (ApplicationBean) restClient.getEntity(RestConstants.APPLICATIONS,
- applicationId, ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
+ ApplicationBean beanRemoved = (ApplicationBean) restClient
+ .getEntity(RestConstants.APPLICATIONS, applicationId, ApplicationBean.class,
+ RestConstants.APPLICATIONS_NAME);
assertNull(beanRemoved);
- boolean removedC1 = restClient.removeEntity(RestConstants.CARTRIDGES, cartridgeId,
- RestConstants.CARTRIDGES_NAME);
+ boolean removedC1 = restClient
+ .removeEntity(RestConstants.CARTRIDGES, cartridgeId, RestConstants.CARTRIDGES_NAME);
Assert.assertTrue(removedC1);
- removedAuto = restClient.removeEntity(RestConstants.AUTOSCALING_POLICIES,
- autoscalingPolicyId, RestConstants.AUTOSCALING_POLICIES_NAME);
+ boolean removedAuto = restClient.removeEntity(RestConstants.AUTOSCALING_POLICIES, autoscalingPolicyId,
+ RestConstants.AUTOSCALING_POLICIES_NAME);
Assert.assertTrue(removedAuto);
- removedDep = restClient.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
- deploymentPolicyId, RestConstants.DEPLOYMENT_POLICIES_NAME);
+ boolean removedDep = restClient.removeEntity(RestConstants.DEPLOYMENT_POLICIES, deploymentPolicyId,
+ RestConstants.DEPLOYMENT_POLICIES_NAME);
Assert.assertTrue(removedDep);
- removedNet = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS,
- networkPartitionId, RestConstants.NETWORK_PARTITIONS_NAME);
- assertFalse(removedNet);
-
- boolean removeAppPolicy = restClient.removeEntity(RestConstants.APPLICATION_POLICIES,
- applicationPolicyId, RestConstants.APPLICATION_POLICIES_NAME);
+ boolean removeAppPolicy = restClient.removeEntity(RestConstants.APPLICATION_POLICIES, applicationPolicyId,
+ RestConstants.APPLICATION_POLICIES_NAME);
Assert.assertTrue(removeAppPolicy);
- removedNet = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS,
- networkPartitionId, RestConstants.NETWORK_PARTITIONS_NAME);
+ boolean removedNet = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS, networkPartitionId,
+ RestConstants.NETWORK_PARTITIONS_NAME);
Assert.assertTrue(removedNet);
+ long duration = System.currentTimeMillis() - startTime;
+ log.info(String.format("PartitionRoundRobinClusterTestCase completed in [duration] %s ms", duration));
}
/**
@@ -204,16 +170,15 @@ public class PartitionRoundRobinClusterTestCase extends StratosIntegrationTest {
*/
private void assertClusterWithRoundRobinAlgorithm(String applicationName) {
Application application = ApplicationManager.getApplications().getApplication(applicationName);
- assertNotNull(String.format("Application is not found: [application-id] %s",
- applicationName), application);
+ assertNotNull(String.format("Application is not found: [application-id] %s", applicationName), application);
Set<ClusterDataHolder> clusterDataHolderSet = application.getClusterDataRecursively();
for (ClusterDataHolder clusterDataHolder : clusterDataHolderSet) {
String serviceName = clusterDataHolder.getServiceType();
String clusterId = clusterDataHolder.getClusterId();
Service service = TopologyManager.getTopology().getService(serviceName);
- assertNotNull(String.format("Service is not found: [application-id] %s [service] %s",
- applicationName, serviceName), service);
+ 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",
@@ -243,7 +208,7 @@ public class PartitionRoundRobinClusterTestCase extends StratosIntegrationTest {
List<Long> p2InitTime = partitionIdToMembersMap.get(p2);
Collections.sort(p2InitTime);
- List<Long> allInitTime = new ArrayList<Long>();
+ List<Long> allInitTime = new ArrayList<>();
allInitTime.addAll(p1InitTime);
allInitTime.addAll(p2InitTime);
Collections.sort(allInitTime);
@@ -253,10 +218,10 @@ public class PartitionRoundRobinClusterTestCase extends StratosIntegrationTest {
String previousPartition = null;
for (int i = 0; i < allInitTime.size(); i++) {
if (previousPartition == null) {
- if (p1InitTime.get(0) == allInitTime.get(i)) {
+ if (Objects.equals(p1InitTime.get(0), allInitTime.get(i))) {
previousPartition = p1;
p1Index++;
- } else if (p2InitTime.get(0) == allInitTime.get(i)) {
+ } else if (Objects.equals(p2InitTime.get(0), allInitTime.get(i))) {
previousPartition = p2;
p2Index++;
@@ -292,4 +257,4 @@ public class PartitionRoundRobinClusterTestCase extends StratosIntegrationTest {
}
}
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/stratos/blob/a22f27a6/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/SampleApplicationStartupTestCase.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/SampleApplicationStartupTestCase.java b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/SampleApplicationStartupTestCase.java
index e0c9a23..306a5e0 100644
--- a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/SampleApplicationStartupTestCase.java
+++ b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/SampleApplicationStartupTestCase.java
@@ -28,7 +28,6 @@ import org.apache.stratos.common.beans.policy.deployment.ApplicationPolicyBean;
import org.apache.stratos.integration.common.RestConstants;
import org.apache.stratos.integration.common.TopologyHandler;
import org.apache.stratos.integration.tests.StratosIntegrationTest;
-import org.apache.stratos.messaging.domain.application.ApplicationStatus;
import org.apache.stratos.messaging.domain.topology.Member;
import org.apache.stratos.metadata.client.beans.PropertyBean;
import org.apache.stratos.mock.iaas.domain.MockInstanceMetadata;
@@ -45,9 +44,11 @@ import static org.testng.AssertJUnit.assertTrue;
* Deploy a sample application on mock IaaS and assert whether application instance, cluster instance, member instances
* are getting activated. Kill the mock instance and check whether
*/
+@Test(groups = { "application", "smoke" })
public class SampleApplicationStartupTestCase extends StratosIntegrationTest {
private static final Log log = LogFactory.getLog(SampleApplicationStartupTestCase.class);
private static final String RESOURCES_PATH = "/sample-application-startup-test";
+ private TopologyHandler topologyHandler = TopologyHandler.getInstance();
private static final String PAYLOAD_PARAMETER_SEPARATOR = ",";
private static final String PAYLOAD_PARAMETER_NAME_VALUE_SEPARATOR = "=";
private static final String PAYLOAD_PARAMETER_TOKEN_KEY = "TOKEN";
@@ -55,13 +56,13 @@ public class SampleApplicationStartupTestCase extends StratosIntegrationTest {
private GsonBuilder gsonBuilder = new GsonBuilder();
private Gson gson = gsonBuilder.create();
- @Test(timeOut = APPLICATION_TEST_TIMEOUT,
- description = "Application startup, activation and faulty member " + "detection",
- groups = { "stratos.application.startup", "smoke" })
+ @Test(timeOut = DEFAULT_APPLICATION_TEST_TIMEOUT,
+ description = "Application startup, activation and faulty member detection")
public void testApplication() throws Exception {
- String autoscalingPolicyId = "autoscaling-policy-sample-application-startup-test";
- TopologyHandler topologyHandler = TopologyHandler.getInstance();
+ log.info("Running SampleApplicationStartupTestCase.testApplication test method...");
+ long startTime = System.currentTimeMillis();
+ String autoscalingPolicyId = "autoscaling-policy-sample-application-startup-test";
log.info("Adding autoscaling policy [autoscale policy id] " + autoscalingPolicyId);
boolean addedScalingPolicy = restClient.addEntity(
RESOURCES_PATH + RestConstants.AUTOSCALING_POLICIES_PATH + "/" + autoscalingPolicyId + ".json",
@@ -89,7 +90,7 @@ public class SampleApplicationStartupTestCase extends StratosIntegrationTest {
log.info("Adding application [application id] sample-application-startup-test");
boolean addedApp = restClient.addEntity(RESOURCES_PATH + RestConstants.APPLICATIONS_PATH + "/" +
"sample-application-startup-test.json", RestConstants.APPLICATIONS, RestConstants.APPLICATIONS_NAME);
- assertEquals(addedApp, true);
+ Assert.assertTrue(addedApp);
ApplicationBean bean = (ApplicationBean) restClient
.getEntity(RestConstants.APPLICATIONS, "sample-application-startup-test", ApplicationBean.class,
@@ -109,18 +110,18 @@ public class SampleApplicationStartupTestCase extends StratosIntegrationTest {
assertEquals(policyBean.getId(), "application-policy-sample-application-startup-test");
// Used policies/cartridges should not removed...asserting validations when removing policies
- log.info("Trying to remove the used autoscaling policy...");
+ log.info("Trying to remove used autoscaling policy...");
boolean removedUsedAuto = restClient.removeEntity(RestConstants.AUTOSCALING_POLICIES, autoscalingPolicyId,
RestConstants.AUTOSCALING_POLICIES_NAME);
assertFalse(removedUsedAuto);
- log.info("Trying to remove the used network partition...");
+ log.info("Trying to remove used network partition...");
boolean removedUsedNet = restClient
.removeEntity(RestConstants.NETWORK_PARTITIONS, "network-partition-sample-application-startup-test",
RestConstants.NETWORK_PARTITIONS_NAME);
assertFalse(removedUsedNet);
- log.info("Trying to remove the used deployment policy...");
+ log.info("Trying to remove used deployment policy...");
boolean removedUsedDep = restClient
.removeEntity(RestConstants.DEPLOYMENT_POLICIES, "deployment-policy-sample-application-startup-test",
RestConstants.DEPLOYMENT_POLICIES_NAME);
@@ -145,7 +146,8 @@ public class SampleApplicationStartupTestCase extends StratosIntegrationTest {
assertFalse(removed);
log.info("Waiting for application status to become ACTIVE...");
- topologyHandler.assertApplicationStatus(bean.getApplicationId(), ApplicationStatus.Active);
+ //topologyHandler.assertApplicationStatus(bean.getApplicationId(), ApplicationStatus.Active);
+ TopologyHandler.getInstance().assertApplicationActiveStatus(bean.getApplicationId());
log.info("Waiting for cluster status to become ACTIVE...");
topologyHandler.assertClusterActivation(bean.getApplicationId());
@@ -187,9 +189,7 @@ public class SampleApplicationStartupTestCase extends StratosIntegrationTest {
Assert.assertTrue(propertyBean != null && propertyBean.getValues().size() > 0, "Empty property list");
List<String> addedValues = new ArrayList<>(Arrays.asList(val1, val2));
boolean hasPropertiesAdded = propertyBean.getValues().containsAll(addedValues);
-
Assert.assertTrue(hasPropertiesAdded, "Metadata properties retrieved are not correct");
- log.info("Metadata test completed successfully");
log.info("Terminating members in [cluster id] c1-sample-application-startup-test in mock IaaS directly to "
+ "simulate faulty members...");
@@ -202,11 +202,12 @@ public class SampleApplicationStartupTestCase extends StratosIntegrationTest {
}
// application status should be marked as inactive since some members are faulty
log.info("Waiting for application status to become INACTIVE");
- topologyHandler.assertApplicationStatus(bean.getApplicationId(), ApplicationStatus.Inactive);
+ TopologyHandler.getInstance().assertApplicationActiveStatus(bean.getApplicationId());
// application should recover itself and become active after spinning more instances
log.info("Waiting for application status to become ACTIVE...");
- topologyHandler.assertApplicationStatus(bean.getApplicationId(), ApplicationStatus.Active);
+ //topologyHandler.assertApplicationStatus(bean.getApplicationId(), ApplicationStatus.Active);
+ TopologyHandler.getInstance().assertApplicationActiveStatus(bean.getApplicationId());
log.info("Waiting for cluster status to become ACTIVE...");
topologyHandler.assertClusterActivation(bean.getApplicationId());
@@ -231,7 +232,7 @@ public class SampleApplicationStartupTestCase extends StratosIntegrationTest {
"sample-application-startup-test"), forceUndeployed);
}
- log.info("Removing the application [application id] sample-application-startup-test");
+ log.info("Removing application [application id] sample-application-startup-test");
boolean removedApp = restClient.removeEntity(RestConstants.APPLICATIONS, "sample-application-startup-test",
RestConstants.APPLICATIONS_NAME);
assertTrue(removedApp);
@@ -241,35 +242,36 @@ public class SampleApplicationStartupTestCase extends StratosIntegrationTest {
RestConstants.APPLICATIONS_NAME);
assertNull(beanRemoved);
- log.info("Removing the application policy [application policy id] "
+ log.info("Removing application policy [application policy id] "
+ "application-policy-sample-application-startup-test");
boolean removeAppPolicy = restClient
.removeEntity(RestConstants.APPLICATION_POLICIES, "application-policy-sample-application-startup-test",
RestConstants.APPLICATION_POLICIES_NAME);
assertTrue(removeAppPolicy);
- log.info("Removing the cartridge [cartridge type] c1-sample-application-startup-test");
+ log.info("Removing cartridge [cartridge type] c1-sample-application-startup-test");
boolean removedC1 = restClient.removeEntity(RestConstants.CARTRIDGES, "c1-sample-application-startup-test",
RestConstants.CARTRIDGES_NAME);
assertTrue(removedC1);
- log.info("Removing the autoscaling policy [autoscaling policy id] " + autoscalingPolicyId);
+ log.info("Removing autoscaling policy [autoscaling policy id] " + autoscalingPolicyId);
boolean removedAuto = restClient.removeEntity(RestConstants.AUTOSCALING_POLICIES, autoscalingPolicyId,
RestConstants.AUTOSCALING_POLICIES_NAME);
assertTrue(removedAuto);
- log.info("Removing the deployment policy [deployment policy id] "
+ log.info("Removing deployment policy [deployment policy id] "
+ "deployment-policy-sample-application-startup-test");
boolean removedDep = restClient
.removeEntity(RestConstants.DEPLOYMENT_POLICIES, "deployment-policy-sample-application-startup-test",
RestConstants.DEPLOYMENT_POLICIES_NAME);
assertTrue(removedDep);
- log.info("Removing the network partition [network partition id] "
- + "network-partition-sample-application-startup-test");
+ log.info("Removing network partition [network partition id] network-partition-sample-application-startup-test");
boolean removedNet = restClient
.removeEntity(RestConstants.NETWORK_PARTITIONS, "network-partition-sample-application-startup-test",
RestConstants.NETWORK_PARTITIONS_NAME);
assertTrue(removedNet);
+ long duration = System.currentTimeMillis() - startTime;
+ log.info(String.format("SampleApplicationStartupTestCase completed in [duration] %s ms", duration));
}
}
[21/50] [abbrv] stratos git commit: Cleaning up test cases. Remove
duplicate assertions. Fix formatting.
Posted by ga...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/a22f27a6/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/group/CartridgeGroupTestCase.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/group/CartridgeGroupTestCase.java b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/group/CartridgeGroupTestCase.java
deleted file mode 100644
index 38e440f..0000000
--- a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/group/CartridgeGroupTestCase.java
+++ /dev/null
@@ -1,251 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.stratos.integration.tests.group;
-
-import com.google.gson.reflect.TypeToken;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.common.beans.cartridge.CartridgeGroupBean;
-import org.apache.stratos.integration.common.RestConstants;
-import org.apache.stratos.integration.tests.StratosIntegrationTest;
-import org.testng.annotations.Test;
-
-import java.lang.reflect.Type;
-import java.util.ArrayList;
-import java.util.List;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertNotNull;
-import static org.testng.AssertJUnit.*;
-
-/**
- * Test to handle Cartridge group CRUD operations
- */
-public class CartridgeGroupTestCase extends StratosIntegrationTest {
- private static final Log log = LogFactory.getLog(CartridgeGroupTestCase.class);
- private static final String RESOURCES_PATH = "/cartridge-group-test";
-
- @Test(timeOut = GLOBAL_TEST_TIMEOUT, groups = {"stratos.cartridge.deployment", "smoke"})
- public void testCartridgeGroup() throws Exception {
- boolean addedC1 = restClient.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH +
- "/" + "c4-cartridge-group-test.json",
- RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
- assertTrue(String.format("Cartridge did not added: [cartridge-name] %s",
- "c4-cartridge-group-test"), addedC1);
-
- boolean addedC2 = restClient.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH +
- "/" + "c5-cartridge-group-test.json",
- RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
- assertTrue(String.format("Cartridge did not added: [cartridge-name] %s",
- "c5-cartridge-group-test"), addedC2);
-
- boolean addedC3 = restClient.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH +
- "/" + "c6-cartridge-group-test.json",
- RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
- assertTrue(String.format("Cartridge did not added: [cartridge-name] %s",
- "c6-cartridge-group-test"), addedC3);
-
- boolean added = restClient.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGE_GROUPS_PATH +
- "/" + "g4-g5-g6-cartridge-group-test.json", RestConstants.CARTRIDGE_GROUPS,
- RestConstants.CARTRIDGE_GROUPS_NAME);
- assertTrue(String.format("Cartridge Group did not added: [cartridge-group-name] %s",
- "g4-g5-g6-cartridge-group-test"), added);
-
- CartridgeGroupBean bean = (CartridgeGroupBean) restClient.
- getEntity(RestConstants.CARTRIDGE_GROUPS, "G4-cartridge-group-test",
- CartridgeGroupBean.class, RestConstants.CARTRIDGE_GROUPS_NAME);
- assertEquals(bean.getName(), "G4-cartridge-group-test",
- String.format("Cartridge Group name did not match: [cartridge-group-name] %s",
- "g4-g5-g6-cartridge-group-test.json"));
-
- boolean updated = restClient.updateEntity(RESOURCES_PATH + RestConstants.CARTRIDGE_GROUPS_PATH +
- "/" + "g4-g5-g6-cartridge-group-test-v1.json",
- RestConstants.CARTRIDGE_GROUPS, RestConstants.CARTRIDGE_GROUPS_NAME);
- assertTrue(String.format("Cartridge Group did not updated: [cartridge-group-name] %s",
- "g4-g5-g6-cartridge-group-test"), updated);
-
- CartridgeGroupBean updatedBean = (CartridgeGroupBean) restClient.
- getEntity(RestConstants.CARTRIDGE_GROUPS, "G4-cartridge-group-test",
- CartridgeGroupBean.class, RestConstants.CARTRIDGE_GROUPS_NAME);
- assertEquals(updatedBean.getName(), "G4-cartridge-group-test",
- String.format("Updated Cartridge Group didn't match: [cartridge-group-name] %s",
- "g4-g5-g6-cartridge-group-test"));
-
- boolean removedC1 = restClient.removeEntity(RestConstants.CARTRIDGES, "c4-cartridge-group-test",
- RestConstants.CARTRIDGE_GROUPS_NAME);
- assertFalse(String.format("Cartridge can be removed while it is used in " +
- "cartridge group: [cartridge-name] %s", "c4-cartridge-group-test"), removedC1);
-
- boolean removedC2 = restClient.removeEntity(RestConstants.CARTRIDGES, "c5-cartridge-group-test",
- RestConstants.CARTRIDGE_GROUPS_NAME);
- assertFalse(String.format("Cartridge can be removed while it is used in " +
- "cartridge group: [cartridge-name] %s",
- "c5-cartridge-group-test"), removedC2);
-
- boolean removedC3 = restClient.removeEntity(RestConstants.CARTRIDGES, "c6-cartridge-group-test",
- RestConstants.CARTRIDGE_GROUPS_NAME);
- assertFalse(String.format("Cartridge can be removed while it is used in " +
- "cartridge group: [cartridge-name] %s",
- "c6-cartridge-group-test"), removedC3);
-
- boolean removed = restClient.removeEntity(RestConstants.CARTRIDGE_GROUPS, "G4-cartridge-group-test",
- RestConstants.CARTRIDGE_GROUPS_NAME);
- assertTrue(String.format("Cartridge Group did not removed: [cartridge-group-name] %s",
- "g4-g5-g6-cartridge-group-test"), removed);
-
- CartridgeGroupBean beanRemoved = (CartridgeGroupBean) restClient.
- getEntity(RestConstants.CARTRIDGE_GROUPS, "G4-cartridge-group-test",
- CartridgeGroupBean.class, RestConstants.CARTRIDGE_GROUPS_NAME);
- assertEquals(beanRemoved, null,
- String.format("Cartridge Group did not removed completely: [cartridge-group-name] %s",
- "g4-g5-g6-cartridge-group-test"));
-
- removedC1 = restClient.removeEntity(RestConstants.CARTRIDGES, "c4-cartridge-group-test",
- RestConstants.CARTRIDGE_GROUPS_NAME);
- assertTrue(String.format("Cartridge can not be removed : [cartridge-name] %s",
- "c4-cartridge-group-test"), removedC1);
-
- removedC2 = restClient.removeEntity(RestConstants.CARTRIDGES, "c5-cartridge-group-test",
- RestConstants.CARTRIDGE_GROUPS_NAME);
- assertTrue(String.format("Cartridge can not be removed : [cartridge-name] %s",
- "c5-cartridge-group-test"), removedC2);
-
- removedC3 = restClient.removeEntity(RestConstants.CARTRIDGES, "c6-cartridge-group-test",
- RestConstants.CARTRIDGE_GROUPS_NAME);
- assertTrue(String.format("Cartridge can not be removed : [cartridge-name] %s",
- "c6-cartridge-group-test"), removedC3);
- }
-
- @Test(timeOut = GLOBAL_TEST_TIMEOUT, groups = {"stratos.cartridge.deployment", "smoke"})
- public void testCartridgeGroupList() throws Exception {
- boolean addedC1 = restClient.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH +
- "/" + "c4-cartridge-group-test.json",
- RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
- assertTrue(String.format("Cartridge did not added: [cartridge-name] %s",
- "c4-cartridge-group-test"), addedC1);
-
- boolean addedC2 = restClient.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH +
- "/" + "c5-cartridge-group-test.json",
- RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
- assertTrue(String.format("Cartridge did not added: [cartridge-name] %s",
- "c5-cartridge-group-test"), addedC2);
-
- boolean addedC3 = restClient.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH +
- "/" + "c6-cartridge-group-test.json",
- RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
- assertTrue(String.format("Cartridge did not added: [cartridge-name] %s",
- "c6-cartridge-group-test"), addedC3);
-
- String group1 = "group-1-cartridge-group-test";
- String group2 = "group-2-cartridge-group-test";
-
- boolean added = restClient.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGE_GROUPS_PATH +
- "/" + group1 + ".json", RestConstants.CARTRIDGE_GROUPS,
- RestConstants.CARTRIDGE_GROUPS_NAME);
- assertTrue(String.format("Cartridge Group did not added: [cartridge-group-name] %s",
- group1), added);
-
- added = restClient.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGE_GROUPS_PATH +
- "/" + group2 + ".json", RestConstants.CARTRIDGE_GROUPS,
- RestConstants.CARTRIDGE_GROUPS_NAME);
- assertTrue(String.format("Cartridge Group did not added: [cartridge-group-name] %s",
- group1), added);
-
- Type listType = new TypeToken<ArrayList<CartridgeGroupBean>>() {
- }.getType();
-
- List<CartridgeGroupBean> cartridgeGroupList = (List<CartridgeGroupBean>) restClient.
- listEntity(RestConstants.CARTRIDGE_GROUPS,
- listType, RestConstants.CARTRIDGE_GROUPS_NAME);
- assertTrue(cartridgeGroupList.size() >= 2);
-
- CartridgeGroupBean bean1 = null;
- for (CartridgeGroupBean cartridgeGroupBean : cartridgeGroupList) {
- if (cartridgeGroupBean.getName().equals(group1)) {
- bean1 = cartridgeGroupBean;
- }
- }
- assertNotNull(bean1);
-
- CartridgeGroupBean bean2 = null;
- for (CartridgeGroupBean cartridgeGroupBean : cartridgeGroupList) {
- if (cartridgeGroupBean.getName().equals(group2)) {
- bean2 = cartridgeGroupBean;
- }
- }
- assertNotNull(bean2);
-
- boolean removed = restClient.removeEntity(RestConstants.CARTRIDGE_GROUPS, group1,
- RestConstants.CARTRIDGE_GROUPS_NAME);
- assertTrue(String.format("Cartridge Group did not removed: [cartridge-group-name] %s",
- group1), removed);
-
- CartridgeGroupBean beanRemoved = (CartridgeGroupBean) restClient.
- getEntity(RestConstants.CARTRIDGE_GROUPS, group1,
- CartridgeGroupBean.class, RestConstants.CARTRIDGE_GROUPS_NAME);
- assertNull(String.format("Cartridge Group did not removed completely: " +
- "[cartridge-group-name] %s",
- group1), beanRemoved);
-
- boolean removedC1 = restClient.removeEntity(RestConstants.CARTRIDGES, "c4-cartridge-group-test",
- RestConstants.CARTRIDGE_GROUPS_NAME);
- assertFalse(String.format("Cartridge can be removed while it is used in " +
- "cartridge group: [cartridge-name] %s", "c4-cartridge-group-test"), removedC1);
-
- boolean removedC2 = restClient.removeEntity(RestConstants.CARTRIDGES, "c5-cartridge-group-test",
- RestConstants.CARTRIDGE_GROUPS_NAME);
- assertFalse(String.format("Cartridge can be removed while it is used in " +
- "cartridge group: [cartridge-name] %s",
- "c5-cartridge-group-test"), removedC2);
-
- boolean removedC3 = restClient.removeEntity(RestConstants.CARTRIDGES, "c6-cartridge-group-test",
- RestConstants.CARTRIDGE_GROUPS_NAME);
- assertFalse(String.format("Cartridge can be removed while it is used in " +
- "cartridge group: [cartridge-name] %s",
- "c6-cartridge-group-test"), removedC3);
-
- removed = restClient.removeEntity(RestConstants.CARTRIDGE_GROUPS, group2,
- RestConstants.CARTRIDGE_GROUPS_NAME);
- assertTrue(String.format("Cartridge Group did not removed: [cartridge-group-name] %s",
- group2), removed);
-
- beanRemoved = (CartridgeGroupBean) restClient.
- getEntity(RestConstants.CARTRIDGE_GROUPS, group2,
- CartridgeGroupBean.class, RestConstants.CARTRIDGE_GROUPS_NAME);
- assertNull(String.format("Cartridge Group did not removed completely: " +
- "[cartridge-group-name] %s",
- group2), beanRemoved);
-
- removedC1 = restClient.removeEntity(RestConstants.CARTRIDGES, "c4-cartridge-group-test",
- RestConstants.CARTRIDGE_GROUPS_NAME);
- assertTrue(String.format("Cartridge can not be removed : [cartridge-name] %s",
- "c4-cartridge-group-test"), removedC1);
-
- removedC2 = restClient.removeEntity(RestConstants.CARTRIDGES, "c5-cartridge-group-test",
- RestConstants.CARTRIDGE_GROUPS_NAME);
- assertTrue(String.format("Cartridge can not be removed : [cartridge-name] %s",
- "c5-cartridge-group-test"), removedC2);
-
- removedC3 = restClient.removeEntity(RestConstants.CARTRIDGES, "c6-cartridge-group-test",
- RestConstants.CARTRIDGE_GROUPS_NAME);
- assertTrue(String.format("Cartridge can not be removed : [cartridge-name] %s",
- "c6-cartridge-group-test"), removedC3);
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/a22f27a6/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/group/CartridgeTestCase.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/group/CartridgeTestCase.java b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/group/CartridgeTestCase.java
deleted file mode 100644
index 4e9484a..0000000
--- a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/group/CartridgeTestCase.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.stratos.integration.tests.group;
-
-import com.google.gson.reflect.TypeToken;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.common.beans.PropertyBean;
-import org.apache.stratos.common.beans.cartridge.CartridgeBean;
-import org.apache.stratos.integration.common.RestConstants;
-import org.apache.stratos.integration.tests.StratosIntegrationTest;
-import org.testng.annotations.Test;
-
-import java.lang.reflect.Type;
-import java.util.ArrayList;
-import java.util.List;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertNull;
-import static org.testng.AssertJUnit.assertNotNull;
-import static org.testng.AssertJUnit.assertTrue;
-
-/**
- * Test to handle Cartridge CRUD operations
- */
-public class CartridgeTestCase extends StratosIntegrationTest {
- private static final Log log = LogFactory.getLog(CartridgeTestCase.class);
- private static final String RESOURCES_PATH = "/cartridge-test";
-
- @Test(timeOut = GLOBAL_TEST_TIMEOUT, groups = {"stratos.cartridge.deployment", "smoke"})
- public void testCartridge() throws Exception {
- String cartridgeType = "c0-cartridge-test";
- boolean added = restClient.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" +
- cartridgeType + ".json",
- RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
- assertTrue(added);
- CartridgeBean bean = (CartridgeBean) restClient.
- getEntity(RestConstants.CARTRIDGES, cartridgeType,
- CartridgeBean.class, RestConstants.CARTRIDGES_NAME);
- assertEquals(bean.getCategory(), "Application");
- assertEquals(bean.getHost(), "qmog.cisco.com");
- for (PropertyBean property : bean.getProperty()) {
- if (property.getName().equals("payload_parameter.CEP_IP")) {
- assertEquals(property.getValue(), "octl.qmog.cisco.com");
- } else if (property.getName().equals("payload_parameter.CEP_ADMIN_PASSWORD")) {
- assertEquals(property.getValue(), "admin");
- } else if (property.getName().equals("payload_parameter.MONITORING_SERVER_IP")) {
- assertEquals(property.getValue(), "octl.qmog.cisco.com");
- } else if (property.getName().equals("payload_parameter.QTCM_NETWORK_COUNT")) {
- assertEquals(property.getValue(), "1");
- } else if (property.getName().equals("payload_parameter.MONITORING_SERVER_ADMIN_PASSWORD")) {
- assertEquals(property.getValue(), "admin");
- } else if (property.getName().equals("payload_parameter.QTCM_DNS_SEGMENT")) {
- assertEquals(property.getValue(), "test");
- } else if (property.getName().equals("payload_parameter.MONITORING_SERVER_SECURE_PORT")) {
- assertEquals(property.getValue(), "7711");
- } else if (property.getName().equals("payload_parameter.MONITORING_SERVER_PORT")) {
- assertEquals(property.getValue(), "7611");
- } else if (property.getName().equals("payload_parameter.CEP_PORT")) {
- assertEquals(property.getValue(), "7611");
- } else if (property.getName().equals("payload_parameter.MB_PORT")) {
- assertEquals(property.getValue(), "61616");
- }
- }
-
-
- boolean updated = restClient.updateEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" +
- cartridgeType + "-v1.json",
- RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
- assertTrue(updated);
- CartridgeBean updatedBean = (CartridgeBean) restClient.
- getEntity(RestConstants.CARTRIDGES, cartridgeType,
- CartridgeBean.class, RestConstants.CARTRIDGES_NAME);
- assertEquals(updatedBean.getType(), "c0-cartridge-test");
- assertEquals(updatedBean.getCategory(), "Data");
- assertEquals(updatedBean.getHost(), "qmog.cisco.com12");
- for (PropertyBean property : updatedBean.getProperty()) {
- if (property.getName().equals("payload_parameter.CEP_IP")) {
- assertEquals(property.getValue(), "octl.qmog.cisco.com123");
- } else if (property.getName().equals("payload_parameter.CEP_ADMIN_PASSWORD")) {
- assertEquals(property.getValue(), "admin123");
- } else if (property.getName().equals("payload_parameter.MONITORING_SERVER_IP")) {
- assertEquals(property.getValue(), "octl.qmog.cisco.com123");
- } else if (property.getName().equals("payload_parameter.QTCM_NETWORK_COUNT")) {
- assertEquals(property.getValue(), "3");
- } else if (property.getName().equals("payload_parameter.MONITORING_SERVER_ADMIN_PASSWORD")) {
- assertEquals(property.getValue(), "admin123");
- } else if (property.getName().equals("payload_parameter.QTCM_DNS_SEGMENT")) {
- assertEquals(property.getValue(), "test123");
- } else if (property.getName().equals("payload_parameter.MONITORING_SERVER_SECURE_PORT")) {
- assertEquals(property.getValue(), "7712");
- } else if (property.getName().equals("payload_parameter.MONITORING_SERVER_PORT")) {
- assertEquals(property.getValue(), "7612");
- } else if (property.getName().equals("payload_parameter.CEP_PORT")) {
- assertEquals(property.getValue(), "7612");
- } else if (property.getName().equals("payload_parameter.MB_PORT")) {
- assertEquals(property.getValue(), "61617");
- }
- }
-
- boolean removed = restClient.removeEntity(RestConstants.CARTRIDGES, cartridgeType,
- RestConstants.CARTRIDGES_NAME);
- assertTrue(removed);
-
- CartridgeBean beanRemoved = (CartridgeBean) restClient.
- getEntity(RestConstants.CARTRIDGES, cartridgeType,
- CartridgeBean.class, RestConstants.CARTRIDGES_NAME);
- assertNull(beanRemoved);
- }
-
- @Test(timeOut = GLOBAL_TEST_TIMEOUT, groups = {"stratos.cartridge.deployment", "smoke"})
- public void testCartridgeList() throws Exception {
- String cartridgeType1 = "c1-cartridge-test";
- String cartridgeType2 = "c2-cartridge-test";
- boolean added1 = restClient.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" +
- cartridgeType1 + ".json",
- RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
- assertTrue(added1);
-
- boolean added2 = restClient.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" +
- cartridgeType2 + ".json",
- RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
- assertTrue(added2);
-
- Type listType = new TypeToken<ArrayList<CartridgeBean>>() {
- }.getType();
-
- List<CartridgeBean> cartridgeList = (List<CartridgeBean>) restClient.listEntity(RestConstants.CARTRIDGES,
- listType, RestConstants.CARTRIDGES_NAME);
- assertTrue(cartridgeList.size() >= 2);
-
- CartridgeBean bean1 = null;
- for (CartridgeBean cartridgeBean : cartridgeList) {
- if (cartridgeBean.getType().equals(cartridgeType1)) {
- bean1 = cartridgeBean;
- }
- }
- assertNotNull(bean1);
-
- CartridgeBean bean2 = null;
- for (CartridgeBean cartridgeBean : cartridgeList) {
- if (cartridgeBean.getType().equals(cartridgeType1)) {
- bean2 = cartridgeBean;
- }
- }
- assertNotNull(bean2);
-
- boolean removed = restClient.removeEntity(RestConstants.CARTRIDGES, cartridgeType1,
- RestConstants.CARTRIDGES_NAME);
- assertTrue(removed);
-
- CartridgeBean beanRemoved = (CartridgeBean) restClient.
- getEntity(RestConstants.CARTRIDGES, cartridgeType1,
- CartridgeBean.class, RestConstants.CARTRIDGES_NAME);
- assertEquals(beanRemoved, null);
-
- removed = restClient.removeEntity(RestConstants.CARTRIDGES, cartridgeType2,
- RestConstants.CARTRIDGES_NAME);
- assertTrue(removed);
-
- beanRemoved = (CartridgeBean) restClient.
- getEntity(RestConstants.CARTRIDGES, cartridgeType2,
- CartridgeBean.class, RestConstants.CARTRIDGES_NAME);
- assertNull(beanRemoved);
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/a22f27a6/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/iaas/IaaSProviderTestCase.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/iaas/IaaSProviderTestCase.java b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/iaas/IaaSProviderTestCase.java
index ba4a3f6..093ecc8 100644
--- a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/iaas/IaaSProviderTestCase.java
+++ b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/iaas/IaaSProviderTestCase.java
@@ -19,6 +19,8 @@
package org.apache.stratos.integration.tests.iaas;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.apache.stratos.common.beans.IaasProviderInfoBean;
import org.apache.stratos.integration.tests.StratosIntegrationTest;
import org.testng.annotations.Test;
@@ -34,22 +36,28 @@ import static org.testng.AssertJUnit.assertTrue;
/**
* IaaS provider related test cases
*/
+
+@Test(groups = { "iaas" })
public class IaaSProviderTestCase extends StratosIntegrationTest {
+ private static final Log log = LogFactory.getLog(IaaSProviderTestCase.class);
+
private static final String RESOURCES_PATH = "/api";
private static final String IDENTIFIER = "/iaasProviders";
-
- @Test(timeOut = APPLICATION_TEST_TIMEOUT, groups = {"stratos.cartridge.iaas"})
+
+ @Test(timeOut = DEFAULT_APPLICATION_TEST_TIMEOUT)
public void testListIaaSProviders() throws Exception {
- assertTrue(true);
-
- IaasProviderInfoBean iaasProviderInfo = (IaasProviderInfoBean) restClient.getEntity(RESOURCES_PATH,
- IDENTIFIER, IaasProviderInfoBean.class, "IaaSProvider");
+ log.info("Running IaaSProviderTestCase.testListIaaSProviders test method...");
+ long startTime = System.currentTimeMillis();
+ assertTrue(true);
+
+ IaasProviderInfoBean iaasProviderInfo = (IaasProviderInfoBean) restClient
+ .getEntity(RESOURCES_PATH, IDENTIFIER, IaasProviderInfoBean.class, "IaaSProvider");
assertNotNull(iaasProviderInfo);
List<String> iaasList = iaasProviderInfo.getIaasProviders();
for (String iaas : iaasList) {
- assertThat(iaas, either(containsString("kubernetes")).or(containsString("mock")) );
- }
+ assertThat(iaas, either(containsString("kubernetes")).or(containsString("mock")));
+ }
+ long duration = System.currentTimeMillis() - startTime;
+ log.info(String.format("IaaSProviderTestCase completed in [duration] %s ms", duration));
}
-
-
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/a22f27a6/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/iaas/IaasProviderAttributeTestCase.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/iaas/IaasProviderAttributeTestCase.java b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/iaas/IaasProviderAttributeTestCase.java
index b6c4553..d90014e 100644
--- a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/iaas/IaasProviderAttributeTestCase.java
+++ b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/iaas/IaasProviderAttributeTestCase.java
@@ -28,7 +28,6 @@ import org.apache.stratos.integration.common.RestConstants;
import org.apache.stratos.integration.common.ServerLogClient;
import org.apache.stratos.integration.common.TopologyHandler;
import org.apache.stratos.integration.tests.StratosIntegrationTest;
-import org.apache.stratos.messaging.domain.application.ApplicationStatus;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
@@ -39,6 +38,7 @@ import java.util.List;
import static org.testng.Assert.*;
import static org.testng.AssertJUnit.assertTrue;
+@Test(groups = { "iaas" })
public class IaasProviderAttributeTestCase extends StratosIntegrationTest {
private static final Log log = LogFactory.getLog(IaasProviderAttributeTestCase.class);
@@ -51,34 +51,36 @@ public class IaasProviderAttributeTestCase extends StratosIntegrationTest {
private static final String UPDATED_CARTRIDGE = "cartridge-iaasprovider-attribute-test-updated";
private static final String APPLICATION = "app-iaasprovider-attribute-test";
private ServerLogClient serverLogClient;
+ private long startTime;
@BeforeClass
- public void setup () throws Exception {
+ public void setup() throws Exception {
serverLogClient = new ServerLogClient(stratosSecuredBackendURL + "/services/", adminUsername, adminPassword);
}
- @Test(timeOut = IAAS_PROVIDER_TEST_TIMEOUT, groups = {"stratos.cartridge.iaas", "all"})
- public void testIaasProviderAttributes () throws Exception {
+ @Test(timeOut = DEFAULT_APPLICATION_TEST_TIMEOUT)
+ public void testIaasProviderAttributes() throws Exception {
+ log.info("Running IaasProviderAttributeTestCase.testIaasProviderAttributes test method...");
+ startTime = System.currentTimeMillis();
// add autoscaling policy
log.info("Adding autoscaling policy [autoscale policy id] " + AUTOSCALING_POLICY);
boolean addedScalingPolicy = restClient.addEntity(RESOURCES_PATH + RestConstants.
- AUTOSCALING_POLICIES_PATH + "/" + AUTOSCALING_POLICY + ".json",
- RestConstants.AUTOSCALING_POLICIES, RestConstants.AUTOSCALING_POLICIES_NAME);
+ AUTOSCALING_POLICIES_PATH + "/" + AUTOSCALING_POLICY + ".json", RestConstants
+ .AUTOSCALING_POLICIES,
+ RestConstants.AUTOSCALING_POLICIES_NAME);
assertTrue(addedScalingPolicy);
// add network partition
log.info("Adding network partition [network partition id] " + NETWORK_PARTITION);
boolean addedN1 = restClient.addEntity(RESOURCES_PATH + "/network-partitions" + "/" +
- NETWORK_PARTITION + ".json", RestConstants.NETWORK_PARTITIONS,
- RestConstants.NETWORK_PARTITIONS_NAME);
+ NETWORK_PARTITION + ".json", RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
assertTrue(addedN1);
// add deployment policy
log.info("Adding deployment policy [deployment policy id] " + DEPLOYMENT_POLICY);
boolean addedDep = restClient.addEntity(RESOURCES_PATH + RestConstants.DEPLOYMENT_POLICIES_PATH + "/" +
- DEPLOYMENT_POLICY + ".json", RestConstants.DEPLOYMENT_POLICIES,
- RestConstants.DEPLOYMENT_POLICIES_NAME);
+ DEPLOYMENT_POLICY + ".json", RestConstants.DEPLOYMENT_POLICIES, RestConstants.DEPLOYMENT_POLICIES_NAME);
assertTrue(addedDep);
// add application policy
@@ -89,8 +91,9 @@ public class IaasProviderAttributeTestCase extends StratosIntegrationTest {
assertTrue(addAppPolicy);
// deploy a default cartridge
- boolean defaultCartridgeAdded = restClient.addEntity(RESOURCES_PATH + "/cartridges/" + CARTRIDGE + ".json",
- RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+ boolean defaultCartridgeAdded = restClient
+ .addEntity(RESOURCES_PATH + "/cartridges/" + CARTRIDGE + ".json", RestConstants.CARTRIDGES,
+ RestConstants.CARTRIDGES_NAME);
assertTrue("Default cartridge not deployed properly", defaultCartridgeAdded);
// deploy application
@@ -100,16 +103,16 @@ public class IaasProviderAttributeTestCase extends StratosIntegrationTest {
assertEquals(addedApp, true);
// Test Iaas Provider attributes
- CartridgeBean defaultCartridgeBean = (CartridgeBean) restClient.getEntity(RestConstants.CARTRIDGES, CARTRIDGE, CartridgeBean.class,
- RestConstants.CARTRIDGES_NAME);
+ CartridgeBean defaultCartridgeBean = (CartridgeBean) restClient
+ .getEntity(RestConstants.CARTRIDGES, CARTRIDGE, CartridgeBean.class, RestConstants.CARTRIDGES_NAME);
assertEquals(CARTRIDGE, defaultCartridgeBean.getType());
List<IaasProviderBean> iaasProviders = defaultCartridgeBean.getIaasProvider();
assertNotNull(iaasProviders, "No Iaas Providers found in default cartridge definition");
IaasProviderBean mockIaasProvider = getMockIaasProvider(iaasProviders);
assertNotNull(mockIaasProvider, "Mock Iaas Provider not found in default cartridge definition");
- assertNotNull(mockIaasProvider.getProperty(), "No properties found in Iaas Provider " +
- "config of default cartridge definition");
+ assertNotNull(mockIaasProvider.getProperty(),
+ "No properties found in Iaas Provider " + "config of default cartridge definition");
///applications/{applicationId}/deploy/{applicationPolicyId}
log.info("Deploying application [application id] app-iaasprovider-attribute-test using [application policy id] "
@@ -127,14 +130,15 @@ public class IaasProviderAttributeTestCase extends StratosIntegrationTest {
TopologyHandler topologyHandler = TopologyHandler.getInstance();
log.info("Waiting for application status to become ACTIVE...");
- topologyHandler.assertApplicationStatus(applicationBean.getApplicationId(), ApplicationStatus.Active);
+ TopologyHandler.getInstance().assertApplicationActiveStatus(applicationBean.getApplicationId());
// create a ServerLogClientInstance and get logs
boolean found = false;
LogEvent[] logEvents = serverLogClient.getAllLogLines();
if (logEvents.length > 0) {
for (LogEvent log : logEvents) {
- if (!log.getMessage().contains("cartridge_property_value_1") && log.getMessage().contains("cc_property_value_1")) {
+ if (!log.getMessage().contains("cartridge_property_value_1") && log.getMessage()
+ .contains("cc_property_value_1")) {
found = true;
break;
}
@@ -148,8 +152,7 @@ public class IaasProviderAttributeTestCase extends StratosIntegrationTest {
String resourcePathUndeploy = RestConstants.APPLICATIONS + "/app-iaasprovider-attribute-test" +
RestConstants.APPLICATIONS_UNDEPLOY;
- boolean undeployedApp = restClient.undeployEntity(resourcePathUndeploy, RestConstants
- .APPLICATIONS_NAME);
+ boolean undeployedApp = restClient.undeployEntity(resourcePathUndeploy, RestConstants.APPLICATIONS_NAME);
assertTrue(undeployedApp);
log.info("Undeployed application 'app-iaasprovider-attribute-test'");
@@ -159,12 +162,14 @@ public class IaasProviderAttributeTestCase extends StratosIntegrationTest {
RestConstants.APPLICATIONS_UNDEPLOY + "?force=true", RestConstants.APPLICATIONS);
boolean forceUndeployed = topologyHandler.assertApplicationUndeploy("app-iaasprovider-attribute-test");
- assertTrue(String.format("Forceful undeployment failed for the application %s",
- "app-iaasprovider-attribute-test"), forceUndeployed);
+ assertTrue(
+ String.format("Forceful undeployment failed for the application %s", "app-iaasprovider-attribute-test"),
+ forceUndeployed);
// update cartridge
- boolean updated = restClient.updateEntity(RESOURCES_PATH + "/cartridges/" + UPDATED_CARTRIDGE + ".json",
- RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+ boolean updated = restClient
+ .updateEntity(RESOURCES_PATH + "/cartridges/" + UPDATED_CARTRIDGE + ".json", RestConstants.CARTRIDGES,
+ RestConstants.CARTRIDGES_NAME);
assertTrue(updated);
log.info("Updated cartridge 'cartridge-iaasprovider-attribute-test'");
@@ -176,7 +181,7 @@ public class IaasProviderAttributeTestCase extends StratosIntegrationTest {
log.info("Re-deployed application 'app-iaasprovider-attribute-test'");
log.info("Waiting for application status to become ACTIVE...");
- topologyHandler.assertApplicationStatus(applicationBean.getApplicationId(), ApplicationStatus.Active);
+ TopologyHandler.getInstance().assertApplicationActiveStatus(applicationBean.getApplicationId());
logEvents = serverLogClient.getAllLogLines();
found = false;
@@ -193,8 +198,10 @@ public class IaasProviderAttributeTestCase extends StratosIntegrationTest {
}
@AfterClass
- public void tearDown () throws Exception {
+ public void tearDown() throws Exception {
terminateAndRemoveAllArtifacts();
+ long duration = System.currentTimeMillis() - startTime;
+ log.info(String.format("IaasProviderAttributeTestCase completed in [duration] %s ms", duration));
}
private IaasProviderBean getMockIaasProvider(List<IaasProviderBean> iaasProviders) {
@@ -206,7 +213,7 @@ public class IaasProviderAttributeTestCase extends StratosIntegrationTest {
return null;
}
- private void terminateAndRemoveAllArtifacts () throws Exception {
+ private void terminateAndRemoveAllArtifacts() throws Exception {
TopologyHandler topologyHandler = TopologyHandler.getInstance();
http://git-wip-us.apache.org/repos/asf/stratos/blob/a22f27a6/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/policies/ApplicationPolicyTestCase.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/policies/ApplicationPolicyTestCase.java b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/policies/ApplicationPolicyTestCase.java
index 2ae3207..8862301 100644
--- a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/policies/ApplicationPolicyTestCase.java
+++ b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/policies/ApplicationPolicyTestCase.java
@@ -40,31 +40,37 @@ import static org.testng.AssertJUnit.assertTrue;
/**
* Test to handle Network partition CRUD operations
*/
+@Test(groups = { "policies" })
public class ApplicationPolicyTestCase extends StratosIntegrationTest {
private static final Log log = LogFactory.getLog(ApplicationPolicyTestCase.class);
private static final String RESOURCES_PATH = "/application-policy-test";
+ private long startTime;
- @Test(timeOut = GLOBAL_TEST_TIMEOUT, groups = {"stratos.policy.management", "smoke"})
+ @Test(timeOut = DEFAULT_TEST_TIMEOUT,
+ priority = 1)
public void testApplicationPolicy() throws Exception {
+ log.info("Running ApplicationPolicyTestCase.testApplicationPolicy test method...");
+ startTime = System.currentTimeMillis();
+
String applicationPolicyId = "application-policy-application-policy-test";
boolean addedN1 = restClient.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
- "network-partition-application-policy-test-1" + ".json",
- RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
+ "network-partition-application-policy-test-1" + ".json", RestConstants.NETWORK_PARTITIONS,
+ RestConstants.NETWORK_PARTITIONS_NAME);
assertTrue(addedN1);
boolean addedN2 = restClient.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
- "network-partition-application-policy-test-2" + ".json",
- RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
+ "network-partition-application-policy-test-2" + ".json", RestConstants.NETWORK_PARTITIONS,
+ RestConstants.NETWORK_PARTITIONS_NAME);
assertTrue(addedN2);
boolean addedDep = restClient.addEntity(RESOURCES_PATH + RestConstants.APPLICATION_POLICIES_PATH + "/" +
- applicationPolicyId + ".json",
- RestConstants.APPLICATION_POLICIES, RestConstants.APPLICATION_POLICIES_NAME);
+ applicationPolicyId + ".json", RestConstants.APPLICATION_POLICIES,
+ RestConstants.APPLICATION_POLICIES_NAME);
assertTrue(addedDep);
ApplicationPolicyBean bean = (ApplicationPolicyBean) restClient.
- getEntity(RestConstants.APPLICATION_POLICIES, applicationPolicyId,
- ApplicationPolicyBean.class, RestConstants.APPLICATION_POLICIES_NAME);
+ getEntity(RestConstants.APPLICATION_POLICIES, applicationPolicyId, ApplicationPolicyBean.class,
+ RestConstants.APPLICATION_POLICIES_NAME);
assertEquals(bean.getId(), applicationPolicyId);
assertEquals(bean.getAlgorithm(), "one-after-another",
String.format("The expected algorithm %s is not found in %s", "one-after-another",
@@ -85,33 +91,34 @@ public class ApplicationPolicyTestCase extends StratosIntegrationTest {
assertEquals(propertyBean.getValue(),
"network-partition-application-policy-test-1,network-partition-application-policy-test-2",
String.format("The networkPartitionGroups algorithm %s is not found in %s",
- "network-partition-application-policy-test-1, network-partition-application-policy-test-2",
- applicationPolicyId));
+ "network-partition-application-policy-test-1, "
+ + "network-partition-application-policy-test-2", applicationPolicyId));
algoFound = true;
}
}
if (!algoFound) {
- assertNull(String.format("The networkPartitionGroups property is not found in %s",
- applicationPolicyId));
+ assertNull(String.format("The networkPartitionGroups property is not found in %s", applicationPolicyId));
}
- boolean removedNet = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS,
- "network-partition-application-policy-test-1", RestConstants.NETWORK_PARTITIONS_NAME);
+ boolean removedNet = restClient
+ .removeEntity(RestConstants.NETWORK_PARTITIONS, "network-partition-application-policy-test-1",
+ RestConstants.NETWORK_PARTITIONS_NAME);
//Trying to remove the used network partition
assertFalse(removedNet);
- boolean removedDep = restClient.removeEntity(RestConstants.APPLICATION_POLICIES,
- applicationPolicyId, RestConstants.APPLICATION_POLICIES_NAME);
+ boolean removedDep = restClient.removeEntity(RestConstants.APPLICATION_POLICIES, applicationPolicyId,
+ RestConstants.APPLICATION_POLICIES_NAME);
assertTrue(removedDep);
ApplicationPolicyBean beanRemovedDep = (ApplicationPolicyBean) restClient.
- getEntity(RestConstants.APPLICATION_POLICIES, applicationPolicyId,
- ApplicationPolicyBean.class, RestConstants.APPLICATION_POLICIES_NAME);
+ getEntity(RestConstants.APPLICATION_POLICIES, applicationPolicyId, ApplicationPolicyBean.class,
+ RestConstants.APPLICATION_POLICIES_NAME);
assertNull(beanRemovedDep);
- boolean removedN1 = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS,
- "network-partition-application-policy-test-1", RestConstants.NETWORK_PARTITIONS_NAME);
+ boolean removedN1 = restClient
+ .removeEntity(RestConstants.NETWORK_PARTITIONS, "network-partition-application-policy-test-1",
+ RestConstants.NETWORK_PARTITIONS_NAME);
assertTrue(removedN1);
NetworkPartitionBean beanRemovedN1 = (NetworkPartitionBean) restClient.
@@ -119,8 +126,9 @@ public class ApplicationPolicyTestCase extends StratosIntegrationTest {
NetworkPartitionBean.class, RestConstants.NETWORK_PARTITIONS_NAME);
assertNull(beanRemovedN1);
- boolean removedN2 = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS,
- "network-partition-application-policy-test-2", RestConstants.NETWORK_PARTITIONS_NAME);
+ boolean removedN2 = restClient
+ .removeEntity(RestConstants.NETWORK_PARTITIONS, "network-partition-application-policy-test-2",
+ RestConstants.NETWORK_PARTITIONS_NAME);
assertTrue(removedN2);
NetworkPartitionBean beanRemovedN2 = (NetworkPartitionBean) restClient.
@@ -129,37 +137,37 @@ public class ApplicationPolicyTestCase extends StratosIntegrationTest {
assertNull(beanRemovedN2);
}
- @Test(timeOut = GLOBAL_TEST_TIMEOUT, groups = {"stratos.policy.management", "smoke"})
+ @Test(timeOut = DEFAULT_TEST_TIMEOUT,
+ priority = 2)
public void testApplicationPolicyList() throws Exception {
String applicationPolicyId1 = "application-policy-application-policy-test-1";
String applicationPolicyId2 = "application-policy-application-policy-test-2";
boolean addedN1 = restClient.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
- "network-partition-application-policy-test-1" + ".json",
- RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
+ "network-partition-application-policy-test-1" + ".json", RestConstants.NETWORK_PARTITIONS,
+ RestConstants.NETWORK_PARTITIONS_NAME);
assertTrue(addedN1);
boolean addedN2 = restClient.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
- "network-partition-application-policy-test-2" + ".json",
- RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
+ "network-partition-application-policy-test-2" + ".json", RestConstants.NETWORK_PARTITIONS,
+ RestConstants.NETWORK_PARTITIONS_NAME);
assertTrue(addedN2);
boolean addedDep = restClient.addEntity(RESOURCES_PATH + RestConstants.APPLICATION_POLICIES_PATH + "/" +
- applicationPolicyId1 + ".json",
- RestConstants.APPLICATION_POLICIES, RestConstants.APPLICATION_POLICIES_NAME);
+ applicationPolicyId1 + ".json", RestConstants.APPLICATION_POLICIES,
+ RestConstants.APPLICATION_POLICIES_NAME);
assertTrue(addedDep);
addedDep = restClient.addEntity(RESOURCES_PATH + RestConstants.APPLICATION_POLICIES_PATH + "/" +
- applicationPolicyId2 + ".json",
- RestConstants.APPLICATION_POLICIES, RestConstants.APPLICATION_POLICIES_NAME);
+ applicationPolicyId2 + ".json", RestConstants.APPLICATION_POLICIES,
+ RestConstants.APPLICATION_POLICIES_NAME);
assertTrue(addedDep);
Type listType = new TypeToken<ArrayList<ApplicationPolicyBean>>() {
}.getType();
List<ApplicationPolicyBean> applicationPolicyList = (List<ApplicationPolicyBean>) restClient.
- listEntity(RestConstants.APPLICATION_POLICIES,
- listType, RestConstants.APPLICATION_POLICIES_NAME);
+ listEntity(RestConstants.APPLICATION_POLICIES, listType, RestConstants.APPLICATION_POLICIES_NAME);
assertTrue(applicationPolicyList.size() >= 2);
ApplicationPolicyBean bean1 = null;
@@ -178,31 +186,33 @@ public class ApplicationPolicyTestCase extends StratosIntegrationTest {
}
assertNotNull(bean2);
- boolean removedDep = restClient.removeEntity(RestConstants.APPLICATION_POLICIES,
- applicationPolicyId1, RestConstants.APPLICATION_POLICIES_NAME);
+ boolean removedDep = restClient.removeEntity(RestConstants.APPLICATION_POLICIES, applicationPolicyId1,
+ RestConstants.APPLICATION_POLICIES_NAME);
assertTrue(removedDep);
ApplicationPolicyBean beanRemovedDep = (ApplicationPolicyBean) restClient.
- getEntity(RestConstants.APPLICATION_POLICIES, applicationPolicyId1,
- ApplicationPolicyBean.class, RestConstants.APPLICATION_POLICIES_NAME);
+ getEntity(RestConstants.APPLICATION_POLICIES, applicationPolicyId1, ApplicationPolicyBean.class,
+ RestConstants.APPLICATION_POLICIES_NAME);
assertNull(beanRemovedDep);
- boolean removedNet = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS,
- "network-partition-application-policy-test-1", RestConstants.NETWORK_PARTITIONS_NAME);
+ boolean removedNet = restClient
+ .removeEntity(RestConstants.NETWORK_PARTITIONS, "network-partition-application-policy-test-1",
+ RestConstants.NETWORK_PARTITIONS_NAME);
//Trying to remove the used network partition
assertFalse(removedNet);
- removedDep = restClient.removeEntity(RestConstants.APPLICATION_POLICIES,
- applicationPolicyId2, RestConstants.APPLICATION_POLICIES_NAME);
+ removedDep = restClient.removeEntity(RestConstants.APPLICATION_POLICIES, applicationPolicyId2,
+ RestConstants.APPLICATION_POLICIES_NAME);
assertTrue(removedDep);
beanRemovedDep = (ApplicationPolicyBean) restClient.
- getEntity(RestConstants.APPLICATION_POLICIES, applicationPolicyId2,
- ApplicationPolicyBean.class, RestConstants.APPLICATION_POLICIES_NAME);
+ getEntity(RestConstants.APPLICATION_POLICIES, applicationPolicyId2, ApplicationPolicyBean.class,
+ RestConstants.APPLICATION_POLICIES_NAME);
assertNull(beanRemovedDep);
- boolean removedN1 = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS,
- "network-partition-application-policy-test-1", RestConstants.NETWORK_PARTITIONS_NAME);
+ boolean removedN1 = restClient
+ .removeEntity(RestConstants.NETWORK_PARTITIONS, "network-partition-application-policy-test-1",
+ RestConstants.NETWORK_PARTITIONS_NAME);
assertTrue(removedN1);
NetworkPartitionBean beanRemovedN1 = (NetworkPartitionBean) restClient.
@@ -210,13 +220,16 @@ public class ApplicationPolicyTestCase extends StratosIntegrationTest {
NetworkPartitionBean.class, RestConstants.NETWORK_PARTITIONS_NAME);
assertNull(beanRemovedN1);
- boolean removedN2 = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS,
- "network-partition-application-policy-test-2", RestConstants.NETWORK_PARTITIONS_NAME);
+ boolean removedN2 = restClient
+ .removeEntity(RestConstants.NETWORK_PARTITIONS, "network-partition-application-policy-test-2",
+ RestConstants.NETWORK_PARTITIONS_NAME);
assertTrue(removedN2);
NetworkPartitionBean beanRemovedN2 = (NetworkPartitionBean) restClient.
getEntity(RestConstants.NETWORK_PARTITIONS, "network-partition-application-policy-test-2",
NetworkPartitionBean.class, RestConstants.NETWORK_PARTITIONS_NAME);
assertNull(beanRemovedN2);
+ long duration = System.currentTimeMillis() - startTime;
+ log.info(String.format("IaaSProviderTestCase completed in [duration] %s ms", duration));
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/stratos/blob/a22f27a6/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/policies/AutoscalingPolicyTestCase.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/policies/AutoscalingPolicyTestCase.java b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/policies/AutoscalingPolicyTestCase.java
index 24da49f..a6fc43b 100644
--- a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/policies/AutoscalingPolicyTestCase.java
+++ b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/policies/AutoscalingPolicyTestCase.java
@@ -35,11 +35,12 @@ import static org.testng.AssertJUnit.*;
/**
* Test to handle autoscaling policy CRUD operations
*/
+@Test(groups = { "policies" })
public class AutoscalingPolicyTestCase extends StratosIntegrationTest {
private static final Log log = LogFactory.getLog(AutoscalingPolicyTestCase.class);
private static final String RESOURCES_PATH = "/autoscaling-policy-test";
- @Test(timeOut = GLOBAL_TEST_TIMEOUT, groups = {"stratos.policy.management", "smoke"})
+ @Test(timeOut = DEFAULT_TEST_TIMEOUT)
public void testAutoscalingPolicy() throws Exception {
String policyId = "autoscaling-policy-autoscaling-policy-test";
boolean added = restClient
@@ -87,7 +88,7 @@ public class AutoscalingPolicyTestCase extends StratosIntegrationTest {
policyId), beanRemoved);
}
- @Test(timeOut = GLOBAL_TEST_TIMEOUT, groups = {"stratos.policy.management", "smoke"})
+ @Test(timeOut = DEFAULT_TEST_TIMEOUT)
public void testAutoscalingPolicyList() throws Exception {
String policyId1 = "autoscaling-policy-autoscaling-policy-test-1";
String policyId2 = "autoscaling-policy-autoscaling-policy-test-2";
http://git-wip-us.apache.org/repos/asf/stratos/blob/a22f27a6/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/policies/DeploymentPolicyTestCase.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/policies/DeploymentPolicyTestCase.java b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/policies/DeploymentPolicyTestCase.java
index 866132a..854c84d 100644
--- a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/policies/DeploymentPolicyTestCase.java
+++ b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/policies/DeploymentPolicyTestCase.java
@@ -40,11 +40,12 @@ import static org.testng.AssertJUnit.*;
/**
* Test to handle Deployment policy CRUD operations
*/
+@Test(groups = { "policies" })
public class DeploymentPolicyTestCase extends StratosIntegrationTest {
private static final Log log = LogFactory.getLog(DeploymentPolicyTestCase.class);
private static final String RESOURCES_PATH = "/deployment-policy-test";
- @Test(timeOut = GLOBAL_TEST_TIMEOUT, groups = {"stratos.policy.management", "smoke"})
+ @Test(timeOut = DEFAULT_TEST_TIMEOUT)
public void testDeploymentPolicy() throws Exception {
String deploymentPolicyId = "deployment-policy-deployment-policy-test";
boolean addedN1 = restClient.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
@@ -166,7 +167,7 @@ public class DeploymentPolicyTestCase extends StratosIntegrationTest {
assertNull(beanRemovedN2);
}
- @Test(timeOut = GLOBAL_TEST_TIMEOUT, groups = {"stratos.policy.management", "smoke"})
+ @Test(timeOut = DEFAULT_TEST_TIMEOUT)
public void testDeploymentPolicyList() throws Exception {
String deploymentPolicyId1 = "deployment-policy-deployment-policy-test-1";
String deploymentPolicyId2 = "deployment-policy-deployment-policy-test-2";
@@ -258,4 +259,4 @@ public class DeploymentPolicyTestCase extends StratosIntegrationTest {
DeploymentPolicyBean.class, RestConstants.NETWORK_PARTITIONS_NAME);
assertNull(beanRemovedN2);
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/stratos/blob/a22f27a6/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/policies/NetworkPartitionTestCase.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/policies/NetworkPartitionTestCase.java b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/policies/NetworkPartitionTestCase.java
index ce8e4f5..9ddbafc 100644
--- a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/policies/NetworkPartitionTestCase.java
+++ b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/policies/NetworkPartitionTestCase.java
@@ -38,11 +38,12 @@ import static org.testng.AssertJUnit.*;
/**
* Test to handle Network partition CRUD operations
*/
+@Test(groups = { "policies" })
public class NetworkPartitionTestCase extends StratosIntegrationTest {
private static final Log log = LogFactory.getLog(NetworkPartitionTestCase.class);
private static final String RESOURCES_PATH = "/network-partition-test";
- @Test(timeOut = GLOBAL_TEST_TIMEOUT, groups = {"stratos.policy.management", "smoke"})
+ @Test(timeOut = DEFAULT_TEST_TIMEOUT)
public void testNetworkPartition() throws Exception {
String networkPartitionId = "network-partition-network-partition-test";
boolean added = restClient.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
@@ -89,7 +90,7 @@ public class NetworkPartitionTestCase extends StratosIntegrationTest {
assertNull(beanRemoved);
}
- @Test(timeOut = GLOBAL_TEST_TIMEOUT, groups = {"stratos.policy.management", "smoke"})
+ @Test(timeOut = DEFAULT_TEST_TIMEOUT)
public void testNetworkPartitionList() throws Exception {
String networkPartitionId1 = "network-partition-network-partition-test-1";
String networkPartitionId2 = "network-partition-network-partition-test-2";
@@ -144,4 +145,4 @@ public class NetworkPartitionTestCase extends StratosIntegrationTest {
NetworkPartitionBean.class, RestConstants.NETWORK_PARTITIONS_NAME);
assertNull(beanRemoved);
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/stratos/blob/a22f27a6/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/users/TenantTestCase.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/users/TenantTestCase.java b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/users/TenantTestCase.java
index e64926f..e9696e1 100644
--- a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/users/TenantTestCase.java
+++ b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/users/TenantTestCase.java
@@ -28,15 +28,15 @@ import static junit.framework.Assert.assertTrue;
/**
* Handling users
*/
+@Test(groups = { "users", "disabled" })
public class TenantTestCase extends StratosIntegrationTest {
private static final String RESOURCES_PATH = "/user-test";
- @Test(timeOut = GLOBAL_TEST_TIMEOUT, groups = {"user.management", "smoke", "disabled"})
+ @Test(timeOut = DEFAULT_TEST_TIMEOUT)
public void addUser() throws Exception {
String tenantId = "tenant-1";
boolean addedUser1 = restClient.addEntity(RESOURCES_PATH + "/" +
- tenantId + ".json",
- RestConstants.USERS, RestConstants.USERS_NAME);
+ tenantId + ".json", RestConstants.USERS, RestConstants.USERS_NAME);
assertTrue(addedUser1);
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/stratos/blob/a22f27a6/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/users/UserTestCase.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/users/UserTestCase.java b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/users/UserTestCase.java
index 24d8a5b..4ee721f 100644
--- a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/users/UserTestCase.java
+++ b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/users/UserTestCase.java
@@ -35,11 +35,12 @@ import static org.testng.AssertJUnit.*;
/**
* Handling users
*/
+@Test(groups = { "users" })
public class UserTestCase extends StratosIntegrationTest {
private static final Log log = LogFactory.getLog(UserTestCase.class);
private static final String RESOURCES_PATH = "/user-test";
- @Test(timeOut = GLOBAL_TEST_TIMEOUT, groups = {"user.management", "smoke"})
+ @Test(timeOut = DEFAULT_TEST_TIMEOUT)
public void addUser() throws Exception {
String userId = "user-1";
boolean addedUser1 = restClient.addEntity(RESOURCES_PATH + "/" +
@@ -101,4 +102,4 @@ public class UserTestCase extends StratosIntegrationTest {
}
assertNull(bean1);
}
-}
\ No newline at end of file
+}
[29/50] [abbrv] stratos git commit: PCA Live Test - Refactoring PCA -
Fixed missing app path validation in event handler
Posted by ga...@apache.org.
PCA Live Test - Refactoring
PCA - Fixed missing app path validation in event handler
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/d333ff45
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/d333ff45
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/d333ff45
Branch: refs/heads/release-4.1.5
Commit: d333ff45175266378faf8f29ac55a35c8d244841
Parents: 24ce689
Author: Chamila de Alwis <ch...@apache.org>
Authored: Mon Nov 30 19:13:49 2015 +0530
Committer: gayangunarathne <ga...@wso2.com>
Committed: Mon Dec 7 10:16:27 2015 +0000
----------------------------------------------------------------------
.../cartridge.agent/healthstats.py | 16 ++---
.../modules/event/eventhandler.py | 9 ++-
.../integration/tests/ADCExtensionTestCase.java | 27 ---------
.../tests/ADCMTAppTenantUserTestCase.java | 42 ++++----------
.../integration/tests/ADCMTAppTestCase.java | 41 ++++---------
.../agent/integration/tests/ADCTestCase.java | 39 ++++---------
.../tests/ADCValidationTestCase.java | 44 +++++---------
.../integration/tests/AgentStartupTestCase.java | 39 ++++---------
.../integration/tests/CEPHAModeTestCase.java | 58 ++++---------------
.../tests/MessageBrokerHATestCase.java | 38 ++++--------
.../tests/PythonAgentIntegrationTest.java | 61 +++++++++++++++++++-
11 files changed, 159 insertions(+), 255 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/d333ff45/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/healthstats.py
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/healthstats.py b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/healthstats.py
index 92d2495..71f2894 100644
--- a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/healthstats.py
+++ b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/healthstats.py
@@ -62,7 +62,7 @@ class HealthStatisticsPublisherManager(Thread):
self.log.debug("Publishing load average: %r" % cartridge_stats.load_avg)
self.publisher.publish_load_average(cartridge_stats.load_avg)
- except ThriftReceiverOfflineException:
+ except Exception as e:
self.log.exception(
"Couldn't publish health statistics to CEP. Thrift Receiver offline. Reconnecting...")
self.publisher = HealthStatisticsPublisher()
@@ -186,6 +186,7 @@ class HealthStatisticsPublisher:
def add_publishers(self, cep_url):
"""
Add publishers to the publisher list for publishing
+ :param cep_url:
"""
cep_ip = cep_url.split(':')[0]
cep_port = cep_url.split(':')[1]
@@ -199,27 +200,28 @@ class HealthStatisticsPublisher:
self.publishers.append(publisher)
-
- def is_cep_active(self, cep_url):
+ @staticmethod
+ def is_cep_active(cep_url):
"""
Check if the cep node is active
return true if active
+ :param cep_url:
"""
- self.ports = []
+ ports = []
cep_ip = cep_url.split(':')[0]
cep_port = cep_url.split(':')[1]
- self.ports.append(cep_port)
+ ports.append(cep_port)
cep_active = cartridgeagentutils.check_ports_active(
cep_ip,
- self.ports)
+ ports)
return cep_active
-
def publish_event(self, event):
"""
Publish events to cep nodes
+ :param event:
"""
for publisher in self.publishers:
try:
http://git-wip-us.apache.org/repos/asf/stratos/blob/d333ff45/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/event/eventhandler.py
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/event/eventhandler.py b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/event/eventhandler.py
index f8b0c2b..cea3c01 100644
--- a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/event/eventhandler.py
+++ b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/event/eventhandler.py
@@ -89,6 +89,13 @@ def on_artifact_updated_event(artifacts_updated_event):
log.error("Repository path is empty. Failed to process artifact updated event.")
return
+ if not validate_repo_path(Config.app_path):
+ log.error(
+ "Repository path cannot be accessed, or is invalid. Failed to process artifact updated event. [App Path] %s"
+ % Config.app_path)
+
+ return
+
repo_username = artifacts_updated_event.repo_username
tenant_id = artifacts_updated_event.tenant_id
is_multitenant = Config.is_multiTenant
@@ -666,7 +673,7 @@ def find_tenant_domain(tenant_id):
def validate_repo_path(app_path):
# app path would be ex: /var/www, or /opt/server/data
- return os.access(app_path, os.W_OK)
+ return os.path.isabs(app_path)
class PluginExecutor(Thread):
http://git-wip-us.apache.org/repos/asf/stratos/blob/d333ff45/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/ADCExtensionTestCase.java
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/ADCExtensionTestCase.java b/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/ADCExtensionTestCase.java
index ab4975a..2fddf6e 100644
--- a/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/ADCExtensionTestCase.java
+++ b/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/ADCExtensionTestCase.java
@@ -132,31 +132,4 @@ public class ADCExtensionTestCase extends PythonAgentIntegrationTest {
artifactUpdatedEvent.setTenantId(TENANT_ID);
return artifactUpdatedEvent;
}
-
- /**
- * Create test topology
- *
- * @return Topology object with mock information
- */
- private Topology createTestTopology() {
- Topology topology = new Topology();
- Service service = new Service(SERVICE_NAME, ServiceType.SingleTenant);
- topology.addService(service);
-
- Cluster cluster = new Cluster(service.getServiceName(), CLUSTER_ID, DEPLOYMENT_POLICY_NAME,
- AUTOSCALING_POLICY_NAME, APP_ID);
- service.addCluster(cluster);
-
- Member member = new Member(service.getServiceName(), cluster.getClusterId(), MEMBER_ID, CLUSTER_INSTANCE_ID,
- NETWORK_PARTITION_ID, PARTITION_ID, LoadBalancingIPType.Private, System.currentTimeMillis());
-
- member.setDefaultPrivateIP("10.0.0.1");
- member.setDefaultPublicIP("20.0.0.1");
- Properties properties = new Properties();
- properties.setProperty("prop1", "value1");
- member.setProperties(properties);
- member.setStatus(MemberStatus.Created);
- cluster.addMember(member);
- return topology;
- }
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/d333ff45/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/ADCMTAppTenantUserTestCase.java
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/ADCMTAppTenantUserTestCase.java b/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/ADCMTAppTenantUserTestCase.java
index 05d5ba2..b653632 100644
--- a/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/ADCMTAppTenantUserTestCase.java
+++ b/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/ADCMTAppTenantUserTestCase.java
@@ -137,7 +137,18 @@ public class ADCMTAppTenantUserTestCase extends PythonAgentIntegrationTest {
sleep(2000);
// Send complete topology event
log.info("Publishing complete topology event...");
- Topology topology = createTestTopology();
+ Topology topology = PythonAgentIntegrationTest.createTestTopology(
+ SERVICE_NAME,
+ CLUSTER_ID,
+ DEPLOYMENT_POLICY_NAME,
+ AUTOSCALING_POLICY_NAME,
+ APP_ID,
+ MEMBER_ID,
+ CLUSTER_INSTANCE_ID,
+ NETWORK_PARTITION_ID,
+ PARTITION_ID,
+ ServiceType.SingleTenant);
+
CompleteTopologyEvent completeTopologyEvent = new CompleteTopologyEvent(topology);
publishEvent(completeTopologyEvent);
log.info("Complete topology event published");
@@ -190,33 +201,4 @@ public class ADCMTAppTenantUserTestCase extends PythonAgentIntegrationTest {
artifactUpdatedEvent.setTenantId(TENANT_ID);
return artifactUpdatedEvent;
}
-
- /**
- * Create test topology
- *
- * @return
- */
- private Topology createTestTopology() {
- Topology topology = new Topology();
- Service service = new Service(SERVICE_NAME, ServiceType.SingleTenant);
- topology.addService(service);
-
- Cluster cluster = new Cluster(service.getServiceName(), CLUSTER_ID, DEPLOYMENT_POLICY_NAME,
- AUTOSCALING_POLICY_NAME, APP_ID);
- service.addCluster(cluster);
-
- Member member = new Member(service.getServiceName(), cluster.getClusterId(), MEMBER_ID,
- CLUSTER_INSTANCE_ID, NETWORK_PARTITION_ID, PARTITION_ID, LoadBalancingIPType.Private,
- System.currentTimeMillis());
-
- member.setDefaultPrivateIP("10.0.0.1");
- member.setDefaultPublicIP("20.0.0.1");
- Properties properties = new Properties();
- properties.setProperty("prop1", "value1");
- member.setProperties(properties);
- member.setStatus(MemberStatus.Created);
- cluster.addMember(member);
-
- return topology;
- }
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/d333ff45/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/ADCMTAppTestCase.java
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/ADCMTAppTestCase.java b/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/ADCMTAppTestCase.java
index 444a5e0..02144e0 100644
--- a/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/ADCMTAppTestCase.java
+++ b/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/ADCMTAppTestCase.java
@@ -139,7 +139,18 @@ public class ADCMTAppTestCase extends PythonAgentIntegrationTest {
sleep(2000);
// Send complete topology event
log.info("Publishing complete topology event...");
- Topology topology = createTestTopology();
+ Topology topology = PythonAgentIntegrationTest.createTestTopology(
+ SERVICE_NAME,
+ CLUSTER_ID,
+ DEPLOYMENT_POLICY_NAME,
+ AUTOSCALING_POLICY_NAME,
+ APP_ID,
+ MEMBER_ID,
+ CLUSTER_INSTANCE_ID,
+ NETWORK_PARTITION_ID,
+ PARTITION_ID,
+ ServiceType.SingleTenant);
+
CompleteTopologyEvent completeTopologyEvent = new CompleteTopologyEvent(topology);
publishEvent(completeTopologyEvent);
log.info("Complete topology event published");
@@ -193,32 +204,4 @@ public class ADCMTAppTestCase extends PythonAgentIntegrationTest {
artifactUpdatedEvent.setTenantId(TENANT_ID);
return artifactUpdatedEvent;
}
-
- /**
- * Create test topology
- *
- * @return
- */
- private Topology createTestTopology() {
- Topology topology = new Topology();
- Service service = new Service(SERVICE_NAME, ServiceType.SingleTenant);
- topology.addService(service);
-
- Cluster cluster = new Cluster(service.getServiceName(), CLUSTER_ID, DEPLOYMENT_POLICY_NAME,
- AUTOSCALING_POLICY_NAME, APP_ID);
- service.addCluster(cluster);
-
- Member member = new Member(service.getServiceName(), cluster.getClusterId(), MEMBER_ID,
- CLUSTER_INSTANCE_ID, NETWORK_PARTITION_ID, PARTITION_ID, LoadBalancingIPType.Private,
- System.currentTimeMillis());
-
- member.setDefaultPrivateIP("10.0.0.1");
- member.setDefaultPublicIP("20.0.0.1");
- Properties properties = new Properties();
- properties.setProperty("prop1", "value1");
- member.setProperties(properties);
- member.setStatus(MemberStatus.Created);
- cluster.addMember(member);
- return topology;
- }
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/d333ff45/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/ADCTestCase.java
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/ADCTestCase.java b/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/ADCTestCase.java
index dba6197..6a42cce 100755
--- a/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/ADCTestCase.java
+++ b/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/ADCTestCase.java
@@ -196,7 +196,17 @@ public class ADCTestCase extends PythonAgentIntegrationTest {
sleep(2000);
// Send complete topology event
log.info("Publishing complete topology event...");
- Topology topology = createTestTopology();
+ Topology topology = PythonAgentIntegrationTest.createTestTopology(
+ SERVICE_NAME,
+ CLUSTER_ID,
+ DEPLOYMENT_POLICY_NAME,
+ AUTOSCALING_POLICY_NAME,
+ APP_ID,
+ MEMBER_ID,
+ CLUSTER_INSTANCE_ID,
+ NETWORK_PARTITION_ID,
+ PARTITION_ID,
+ ServiceType.SingleTenant);
CompleteTopologyEvent completeTopologyEvent = new CompleteTopologyEvent(topology);
publishEvent(completeTopologyEvent);
log.info("Complete topology event published");
@@ -255,31 +265,4 @@ public class ADCTestCase extends PythonAgentIntegrationTest {
artifactUpdatedEvent.setTenantId(TENANT_ID);
return artifactUpdatedEvent;
}
-
- /**
- * Create test topology
- *
- * @return Topology object with mock information
- */
- private Topology createTestTopology() {
- Topology topology = new Topology();
- Service service = new Service(SERVICE_NAME, ServiceType.SingleTenant);
- topology.addService(service);
-
- Cluster cluster = new Cluster(service.getServiceName(), CLUSTER_ID, DEPLOYMENT_POLICY_NAME,
- AUTOSCALING_POLICY_NAME, APP_ID);
- service.addCluster(cluster);
-
- Member member = new Member(service.getServiceName(), cluster.getClusterId(), MEMBER_ID, CLUSTER_INSTANCE_ID,
- NETWORK_PARTITION_ID, PARTITION_ID, LoadBalancingIPType.Private, System.currentTimeMillis());
-
- member.setDefaultPrivateIP("10.0.0.1");
- member.setDefaultPublicIP("20.0.0.1");
- Properties properties = new Properties();
- properties.setProperty("prop1", "value1");
- member.setProperties(properties);
- member.setStatus(MemberStatus.Created);
- cluster.addMember(member);
- return topology;
- }
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/d333ff45/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/ADCValidationTestCase.java
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/ADCValidationTestCase.java b/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/ADCValidationTestCase.java
index 45834e5..50ed350 100644
--- a/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/ADCValidationTestCase.java
+++ b/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/ADCValidationTestCase.java
@@ -21,7 +21,6 @@ package org.apache.stratos.python.cartridge.agent.integration.tests;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.common.domain.LoadBalancingIPType;
import org.apache.stratos.messaging.domain.topology.*;
import org.apache.stratos.messaging.event.instance.notifier.ArtifactUpdatedEvent;
import org.apache.stratos.messaging.event.topology.CompleteTopologyEvent;
@@ -33,7 +32,6 @@ import org.testng.annotations.Test;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
-import java.util.Properties;
/**
* Test validation for application path input on the PCA
@@ -92,7 +90,7 @@ public class ADCValidationTestCase extends PythonAgentIntegrationTest {
sleep(1000);
}
List<String> outputLines = new ArrayList<>();
- while (!outputStream.isClosed()) {
+ while (!outputStream.isClosed() && !logDetected) {
List<String> newLines = getNewLines(outputLines, outputStream.toString());
if (newLines.size() > 0) {
for (String line : newLines) {
@@ -100,7 +98,18 @@ public class ADCValidationTestCase extends PythonAgentIntegrationTest {
sleep(2000);
// Send complete topology event
log.info("Publishing complete topology event...");
- Topology topology = createTestTopology();
+ Topology topology = PythonAgentIntegrationTest.createTestTopology(
+ SERVICE_NAME,
+ CLUSTER_ID,
+ DEPLOYMENT_POLICY_NAME,
+ AUTOSCALING_POLICY_NAME,
+ APP_ID,
+ MEMBER_ID,
+ CLUSTER_INSTANCE_ID,
+ NETWORK_PARTITION_ID,
+ PARTITION_ID,
+ ServiceType.SingleTenant);
+
CompleteTopologyEvent completeTopologyEvent = new CompleteTopologyEvent(topology);
publishEvent(completeTopologyEvent);
log.info("Complete topology event published");
@@ -151,31 +160,4 @@ public class ADCValidationTestCase extends PythonAgentIntegrationTest {
artifactUpdatedEvent.setTenantId(TENANT_ID);
return artifactUpdatedEvent;
}
-
- /**
- * Create test topology
- *
- * @return Topology object with mock information
- */
- private Topology createTestTopology() {
- Topology topology = new Topology();
- Service service = new Service(SERVICE_NAME, ServiceType.SingleTenant);
- topology.addService(service);
-
- Cluster cluster = new Cluster(service.getServiceName(), CLUSTER_ID, DEPLOYMENT_POLICY_NAME,
- AUTOSCALING_POLICY_NAME, APP_ID);
- service.addCluster(cluster);
-
- Member member = new Member(service.getServiceName(), cluster.getClusterId(), MEMBER_ID, CLUSTER_INSTANCE_ID,
- NETWORK_PARTITION_ID, PARTITION_ID, LoadBalancingIPType.Private, System.currentTimeMillis());
-
- member.setDefaultPrivateIP("10.0.0.1");
- member.setDefaultPublicIP("20.0.0.1");
- Properties properties = new Properties();
- properties.setProperty("prop1", "value1");
- member.setProperties(properties);
- member.setStatus(MemberStatus.Created);
- cluster.addMember(member);
- return topology;
- }
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/d333ff45/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/AgentStartupTestCase.java
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/AgentStartupTestCase.java b/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/AgentStartupTestCase.java
index db21359..4f529d7 100755
--- a/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/AgentStartupTestCase.java
+++ b/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/AgentStartupTestCase.java
@@ -61,7 +61,17 @@ public class AgentStartupTestCase extends PythonAgentIntegrationTest {
private boolean topologyContextTestCompleted = false;
private boolean completeTenantInitialized = false;
private boolean thriftTestCompleted = false;
- private Topology topology = createTestTopology();
+ private Topology topology = PythonAgentIntegrationTest.createTestTopology(
+ SERVICE_NAME,
+ CLUSTER_ID,
+ DEPLOYMENT_POLICY_NAME,
+ AUTOSCALING_POLICY_NAME,
+ APP_ID,
+ MEMBER_ID,
+ CLUSTER_INSTANCE_ID,
+ NETWORK_PARTITION_ID,
+ PARTITION_ID,
+ ServiceType.SingleTenant);
public AgentStartupTestCase() throws IOException {
}
@@ -217,31 +227,4 @@ public class AgentStartupTestCase extends PythonAgentIntegrationTest {
tenantList.add(new Tenant(3, "test.three.domain"));
return tenantList;
}
-
- /**
- * Create test topology
- *
- * @return Topology object with mock information
- */
- private Topology createTestTopology() {
- Topology topology = new Topology();
- Service service = new Service(SERVICE_NAME, ServiceType.SingleTenant);
- topology.addService(service);
-
- Cluster cluster = new Cluster(service.getServiceName(), CLUSTER_ID, DEPLOYMENT_POLICY_NAME,
- AUTOSCALING_POLICY_NAME, APP_ID);
- service.addCluster(cluster);
-
- Member member = new Member(service.getServiceName(), cluster.getClusterId(), MEMBER_ID, CLUSTER_INSTANCE_ID,
- NETWORK_PARTITION_ID, PARTITION_ID, LoadBalancingIPType.Private, System.currentTimeMillis());
-
- member.setDefaultPrivateIP("10.0.0.1");
- member.setDefaultPublicIP("20.0.0.1");
- Properties properties = new Properties();
- properties.setProperty("prop1", "value1");
- member.setProperties(properties);
- member.setStatus(MemberStatus.Created);
- cluster.addMember(member);
- return topology;
- }
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/d333ff45/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/CEPHAModeTestCase.java
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/CEPHAModeTestCase.java b/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/CEPHAModeTestCase.java
index ce13d3f..58b6deb 100644
--- a/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/CEPHAModeTestCase.java
+++ b/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/CEPHAModeTestCase.java
@@ -21,12 +21,9 @@ package org.apache.stratos.python.cartridge.agent.integration.tests;
import org.apache.commons.io.IOUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.common.domain.LoadBalancingIPType;
import org.apache.stratos.messaging.domain.topology.*;
-import org.apache.stratos.messaging.event.Event;
import org.apache.stratos.messaging.event.topology.CompleteTopologyEvent;
import org.apache.stratos.messaging.event.topology.MemberInitializedEvent;
-import org.apache.stratos.messaging.listener.instance.status.InstanceActivatedEventListener;
import org.apache.stratos.python.cartridge.agent.integration.common.ThriftTestServer;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
@@ -41,7 +38,6 @@ import java.io.FileInputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
-import java.util.Properties;
public class CEPHAModeTestCase extends PythonAgentIntegrationTest {
@@ -59,7 +55,18 @@ public class CEPHAModeTestCase extends PythonAgentIntegrationTest {
private static final String TENANT_ID = "-1234";
private static final String SERVICE_NAME = "tomcat";
private boolean startupTestCompleted = false;
- private Topology topology = createTestTopology();
+ private Topology topology = PythonAgentIntegrationTest.createTestTopology(
+ SERVICE_NAME,
+ CLUSTER_ID,
+ DEPLOYMENT_POLICY_NAME,
+ AUTOSCALING_POLICY_NAME,
+ APP_ID,
+ MEMBER_ID,
+ CLUSTER_INSTANCE_ID,
+ NETWORK_PARTITION_ID,
+ PARTITION_ID,
+ ServiceType.SingleTenant);
+
private static final int ADC_TIMEOUT = 300000;
private ThriftTestServer secondThriftTestServer;
private boolean thriftTestCompletedinServerTwo = false;
@@ -180,19 +187,6 @@ public class CEPHAModeTestCase extends PythonAgentIntegrationTest {
startupTestThread.start();
- instanceStatusEventReceiver.addEventListener(new InstanceActivatedEventListener() {
- @Override
- protected void onEvent(Event event) {
- log.info("Publishing complete topology with a new member...");
- Member newMember = new Member(SERVICE_NAME, CLUSTER_ID, "new-member", CLUSTER_INSTANCE_ID,
- NETWORK_PARTITION_ID, PARTITION_ID, LoadBalancingIPType.Private, System.currentTimeMillis());
- topology.getService(SERVICE_NAME).getCluster(CLUSTER_ID).addMember(newMember);
- CompleteTopologyEvent completeTopologyEvent = new CompleteTopologyEvent(topology);
- publishEvent(completeTopologyEvent);
- log.info("Complete topology event published with new member");
- }
- });
-
while (!instanceStarted || !instanceActivated || !startupTestCompleted ||
!thriftTestCompletedinServerOne || !thriftTestCompletedinServerTwo) {
// wait until the instance activated event is received.
@@ -274,32 +268,4 @@ public class CEPHAModeTestCase extends PythonAgentIntegrationTest {
}
});
}
-
- /**
- * Create test topology
- *
- * @return Topology object with mock information
- */
- private Topology createTestTopology() {
- Topology topology = new Topology();
- Service service = new Service(SERVICE_NAME, ServiceType.SingleTenant);
- topology.addService(service);
-
- Cluster cluster = new Cluster(service.getServiceName(), CLUSTER_ID, DEPLOYMENT_POLICY_NAME,
- AUTOSCALING_POLICY_NAME, APP_ID);
- service.addCluster(cluster);
-
- Member member = new Member(service.getServiceName(), cluster.getClusterId(), MEMBER_ID,
- CLUSTER_INSTANCE_ID, NETWORK_PARTITION_ID, PARTITION_ID, LoadBalancingIPType.Private,
- System.currentTimeMillis());
-
- member.setDefaultPrivateIP("10.0.0.1");
- member.setDefaultPublicIP("20.0.0.1");
- Properties properties = new Properties();
- properties.setProperty("prop1", "value1");
- member.setProperties(properties);
- member.setStatus(MemberStatus.Created);
- cluster.addMember(member);
- return topology;
- }
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/d333ff45/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/MessageBrokerHATestCase.java
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/MessageBrokerHATestCase.java b/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/MessageBrokerHATestCase.java
index 8c72f2d..1fdd8cd 100644
--- a/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/MessageBrokerHATestCase.java
+++ b/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/MessageBrokerHATestCase.java
@@ -212,7 +212,18 @@ public class MessageBrokerHATestCase extends PythonAgentIntegrationTest {
sleep(2000);
// Send complete topology event
log.info("Publishing complete topology event...");
- Topology topology = createTestTopology();
+ Topology topology = PythonAgentIntegrationTest.createTestTopology(
+ SERVICE_NAME,
+ CLUSTER_ID,
+ DEPLOYMENT_POLICY_NAME,
+ AUTOSCALING_POLICY_NAME,
+ APP_ID,
+ MEMBER_ID,
+ CLUSTER_INSTANCE_ID,
+ NETWORK_PARTITION_ID,
+ PARTITION_ID,
+ ServiceType.SingleTenant);
+
CompleteTopologyEvent completeTopologyEvent = new CompleteTopologyEvent(topology);
publishEvent(completeTopologyEvent);
log.info("Complete topology event published");
@@ -245,30 +256,5 @@ public class MessageBrokerHATestCase extends PythonAgentIntegrationTest {
log.info("PCA activation assertion passed.");
}
- /**
- * Create test topology
- *
- * @return
- */
- private Topology createTestTopology() {
- Topology topology = new Topology();
- Service service = new Service(SERVICE_NAME, ServiceType.SingleTenant);
- topology.addService(service);
-
- Cluster cluster = new Cluster(service.getServiceName(), CLUSTER_ID, DEPLOYMENT_POLICY_NAME,
- AUTOSCALING_POLICY_NAME, APP_ID);
- service.addCluster(cluster);
- Member member = new Member(service.getServiceName(), cluster.getClusterId(), MEMBER_ID, CLUSTER_INSTANCE_ID,
- NETWORK_PARTITION_ID, PARTITION_ID, LoadBalancingIPType.Private, System.currentTimeMillis());
-
- member.setDefaultPrivateIP("10.0.0.1");
- member.setDefaultPublicIP("20.0.0.1");
- Properties properties = new Properties();
- properties.setProperty("prop1", "value1");
- member.setProperties(properties);
- member.setStatus(MemberStatus.Created);
- cluster.addMember(member);
- return topology;
- }
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/d333ff45/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/PythonAgentIntegrationTest.java
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/PythonAgentIntegrationTest.java b/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/PythonAgentIntegrationTest.java
index 7f436f6..649430f 100644
--- a/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/PythonAgentIntegrationTest.java
+++ b/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/PythonAgentIntegrationTest.java
@@ -28,9 +28,11 @@ import org.apache.commons.io.IOUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.apache.stratos.common.domain.LoadBalancingIPType;
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.domain.topology.*;
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;
@@ -549,8 +551,8 @@ public abstract class PythonAgentIntegrationTest {
if (StringUtils.isNotBlank(output)) {
List<String> lines = Arrays.asList(output.split(NEW_LINE));
if (lines.size() > 0) {
- int readStartIndex = (currentOutputLines.size() > 0) ? currentOutputLines.size() - 1 : 0;
- for (String line : lines.subList(readStartIndex , lines.size() - 1)) {
+ int readStartIndex = (currentOutputLines.size() > 0) ? (currentOutputLines.size() - 1) : 0;
+ for (String line : lines.subList(readStartIndex , lines.size())) {
currentOutputLines.add(line);
newLines.add(line);
}
@@ -586,4 +588,59 @@ public abstract class PythonAgentIntegrationTest {
return closed;
}
}
+
+ /**
+ * Create a test topology object
+ *
+ * @param serviceName
+ * @param clusterId
+ * @param depPolicyName
+ * @param autoscalingPolicyName
+ * @param appId
+ * @param memberId
+ * @param clusterInstanceId
+ * @param networkPartitionId
+ * @param partitionId
+ * @param serviceType
+ * @return
+ */
+ protected static Topology createTestTopology(
+ String serviceName,
+ String clusterId,
+ String depPolicyName,
+ String autoscalingPolicyName,
+ String appId,
+ String memberId,
+ String clusterInstanceId,
+ String networkPartitionId,
+ String partitionId,
+ ServiceType serviceType) {
+
+
+ Topology topology = new Topology();
+ Service service = new Service(serviceName, serviceType);
+ topology.addService(service);
+
+ Cluster cluster = new Cluster(service.getServiceName(), clusterId, depPolicyName, autoscalingPolicyName, appId);
+ service.addCluster(cluster);
+
+ Member member = new Member(
+ service.getServiceName(),
+ cluster.getClusterId(),
+ memberId,
+ clusterInstanceId,
+ networkPartitionId,
+ partitionId,
+ LoadBalancingIPType.Private,
+ System.currentTimeMillis());
+
+ member.setDefaultPrivateIP("10.0.0.1");
+ member.setDefaultPublicIP("20.0.0.1");
+ Properties properties = new Properties();
+ properties.setProperty("prop1", "value1");
+ member.setProperties(properties);
+ member.setStatus(MemberStatus.Created);
+ cluster.addMember(member);
+ return topology;
+ }
}
[46/50] [abbrv] stratos git commit: Updating and formatting cep and
das README files
Posted by ga...@apache.org.
Updating and formatting cep and das README files
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/bd7d2464
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/bd7d2464
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/bd7d2464
Branch: refs/heads/release-4.1.5
Commit: bd7d2464464c21762b8d71df0af9d01f4649f94d
Parents: 65142d8
Author: Thanuja <th...@wso2.com>
Authored: Sun Dec 6 15:05:17 2015 +0530
Committer: gayangunarathne <ga...@wso2.com>
Committed: Mon Dec 7 10:16:30 2015 +0000
----------------------------------------------------------------------
extensions/cep/modules/distribution/README.md | 34 +++++++++++++--
.../artifacts/metering-dashboard/README.md | 36 +++++++++++-----
.../metering-dashboard/ues-patch/README.md | 5 ++-
.../artifacts/monitoring-dashboard/README.md | 33 +++++++++-----
extensions/das/modules/distribution/README.md | 45 +++++++++++++++++++-
.../das/modules/stratos-das-extension/README.md | 10 +++--
6 files changed, 132 insertions(+), 31 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/bd7d2464/extensions/cep/modules/distribution/README.md
----------------------------------------------------------------------
diff --git a/extensions/cep/modules/distribution/README.md b/extensions/cep/modules/distribution/README.md
index ebf6bf2..03358a4 100755
--- a/extensions/cep/modules/distribution/README.md
+++ b/extensions/cep/modules/distribution/README.md
@@ -1,8 +1,36 @@
# Apache Stratos CEP Extensions
-Apache Stratos Complex Event Processor (CEP) extensions include Window Processors for processing
-health statistic events. These extensions are available in Stratos binary distribution, in a
-distributed deployment where CEP is run externally, these extensions need to be deployed manually.
+Apache Stratos Complex Event Processor (CEP) extensions include Window Processors for processing health statistic
+events. These extensions are available in Stratos binary distribution, in a distributed deployment where CEP is run
+externally, these extensions need to be deployed manually.
+
+You can setup stratos with either WSO2 CEP 3.0.0 or WSO2 CEP 3.1.0. Please note that only WSO2 CEP 3.1.0 supports
+highly available clustered deployment.
+
+1. Copy jar files in apache-stratos-cep-extension-4.1.5/lib folder to <CEP_HOME>/repository/components/lib. These jar
+files are common to both WSO2 CEP 3.0.0 and WSO2 CEP 3.1.0
+
+2. Copy files in apache-stratos-cep-extension-4.1.5/wso2cep-<version>/eventbuilders to
+<CEP_HOME>/repository/deployment/server/eventbuilders
+
+3. Copy files in apache-stratos-cep-extension-4.1.5/wso2cep-<version>/eventformatters to
+<CEP_HOME>/repository/deployment/server/eventformatters
+
+4. Copy files in apache-stratos-cep-extension-4.1.5/wso2cep-<version>/executionplans to
+<CEP_HOME>/repository/deployment/server/executionplans
+
+5. Copy files in apache-stratos-cep-extension-4.1.5/wso2cep-<version>/inputeventadaptors to
+<CEP_HOME>/repository/deployment/server/inputeventadaptors
+
+6. Copy files in apache-stratos-cep-extension-4.1.5/wso2cep-<version>/outputeventadaptors to
+<CEP_HOME>/repository/deployment/server/outputeventadaptors
+
+7. Copy files in apache-stratos-cep-extension-4.1.5/wso2cep-<version>/streamdefinitions to
+<CEP_HOME>/repository/deployment/server/streamdefinitions
+
+8. Update message broker endpoint in <CEP_HOME>/repository/deployment/server/outputeventadaptors/JMSOutputAdaptor.xml
+
+9. Copy files in apache-stratos-cep-extension-4.1.5/wso2cep-<version>/lib to <CEP_HOME>/repository/components/lib
Please refer below link for more information on WSO2 CEP.
http://wso2.com/products/complex-event-processor/
http://git-wip-us.apache.org/repos/asf/stratos/blob/bd7d2464/extensions/das/modules/artifacts/metering-dashboard/README.md
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/README.md b/extensions/das/modules/artifacts/metering-dashboard/README.md
index 21ea33f..c0df3d5 100644
--- a/extensions/das/modules/artifacts/metering-dashboard/README.md
+++ b/extensions/das/modules/artifacts/metering-dashboard/README.md
@@ -1,13 +1,27 @@
# Apache Stratos Metering Dashboard
-This directory contains following artifacts: <br/>
-(1) capps - Includes stratos-metering-service car file which bundles all Event Stream, Event receiver, Even Store, Gadgets, SparkScripts and Dashboard artifacts. <br/>
-(2) jaggery-files <br/>
-(3) ues-patch <br/>
-
-Follow the below steps to generate the metering dashboard: <br/>
-1. Follow instruction given in <Stratos-SOURCE-HOME>/extensions/das/stratos-das-extension/README.md file to add stratos-das-extension jar to DAS. <br/>
-2. Add jaggery files which can be found in <Stratos-DAS-Distribution>/metering-dashboard/jaggery-files/ to DAS server path <DAS_HOME/repository/deployment/server/jaggeryapps/portal/controllers/apis/ <br/>
-3. Create MySQL database and tables using queries in <Stratos-DAS-Distribution>/metering-dashboard/metering-mysqlscript.sql manually. <br/>
-4. Apply ues-patch files in <Stratos-DAS-Distribution>/metering-dashboard/ues-patch/ to DAS as mentioned in its README file. <br/>
-5. Add stratos-metering-service car file in <Stratos-DAS-Distribution>/metering-dashboard/ to <DAS-HOME>/repository/deployment/server/carbonapps/ to generate the metering dashboard. <br/>
\ No newline at end of file
+## This directory contains following artifacts:
+
+(1) capps - Includes stratos-metering-service car file which bundles all Event Stream, Event receiver, Even Store,
+ Gadgets, SparkScripts and Dashboard artifacts.
+
+(2) jaggery-files
+
+(3) ues-patch
+
+## Follow the below steps to generate the metering dashboard:
+
+1. Follow instruction given in <Stratos-SOURCE-HOME>/extensions/das/stratos-das-extension/README.md file to add
+stratos-das-extension jar to DAS.
+
+2. Add jaggery files which can be found in <Stratos-DAS-Distribution>/metering-dashboard/jaggery-files/ to DAS server
+ path <DAS_HOME/repository/deployment/server/jaggeryapps/portal/controllers/apis/
+
+3. Create MySQL database and tables using queries in
+<Stratos-DAS-Distribution>/metering-dashboard/metering-mysqlscript.sql manually.
+
+4. Apply ues-patch files in <Stratos-DAS-Distribution>/metering-dashboard/ues-patch/ to DAS as mentioned in its
+README file.
+
+5. Add stratos-metering-service car file in <Stratos-DAS-Distribution>/metering-dashboard/ to
+<DAS-HOME>/repository/deployment/server/carbonapps/ to generate the metering dashboard.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/bd7d2464/extensions/das/modules/artifacts/metering-dashboard/ues-patch/README.md
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/ues-patch/README.md b/extensions/das/modules/artifacts/metering-dashboard/ues-patch/README.md
index 2bafefa..0d85e02 100644
--- a/extensions/das/modules/artifacts/metering-dashboard/ues-patch/README.md
+++ b/extensions/das/modules/artifacts/metering-dashboard/ues-patch/README.md
@@ -2,7 +2,10 @@ This folder (ues-patch) contains fix for DAS-3.0.0 analytics dashboard to suppo
dashboard url and publish the values to gadgets.
You can find the related UES product jira here: https://wso2.org/jira/browse/UES-582
+
Please follow below steps to apply the patch locally:
-1. Copy 'ues-gadgets.js' and 'ues-pubsub.js' files to <DAS-HOME>/repository/deployment/server/jaggeryapps/portal/js/ folder.
+1. Copy 'ues-gadgets.js' and 'ues-pubsub.js' files to <DAS-HOME>/repository/deployment/server/jaggeryapps/portal/js/
+folder.
+
2. Copy 'dashboard.jag' file to <DAS-HOME>/repository/deployment/server/jaggeryapps/portal/theme/templates/ folder.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/bd7d2464/extensions/das/modules/artifacts/monitoring-dashboard/README.md
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/monitoring-dashboard/README.md b/extensions/das/modules/artifacts/monitoring-dashboard/README.md
index d80ff14..968b8cc 100644
--- a/extensions/das/modules/artifacts/monitoring-dashboard/README.md
+++ b/extensions/das/modules/artifacts/monitoring-dashboard/README.md
@@ -1,12 +1,25 @@
# Apache Stratos Monitoring Dashboard
-This directory contains following artifacts: <br />
-(1) capps - Includes stratos-monitoring-service car file which bundles all Event Stream, Event receiver, Even Store, Gadgets, SparkScripts and Dashboard artifacts. <br />
-(2) jaggery-files <br />
-
-Follow the below steps to generate the monitoring dashboard: <br />
-1. Add jaggery files which can be found in <Stratos-DAS-Distribution>/monitoring-dashboard/jaggery-files/ to DAS path '<DAS_HOME/repository/deployment/server/jaggeryapps/portal/controllers/apis/' <br/>
-2. Create MySQL database and tables using queries in <Stratos-DAS-Distribution>/monitoring-dashboard/monitoring-mysqlscript.sql manually. <br />
-3. Copy CEP EventFormatter artifacts in <Stratos-DAS-Distribution>/wso2cep-<version>/eventformatters/ to <CEP-HOME>/repository/deployment/server/eventformatters/. <br />
-4. Copy CEP OutputEventAdapter artifact in <Stratos-DAS-Distribution>/wso2cep-<version>/outputeventadaptors/ to <CEP-HOME>/repository/deployment/server/outputeventadaptors and update the tcp and ssl ports according to DAS server port offset. <br />
-5. Add stratos-monitoring-service car file in <Stratos-DAS-Distribution>/monitoring-dashboard/ to <DAS-HOME>/repository/deployment/server/carbonapps/ to generate the monitoring dashboard. <br />
\ No newline at end of file
+## This directory contains following artifacts:
+(1) capps - Includes stratos-monitoring-service car file which bundles all Event Stream, Event receiver, Even Store,
+Gadgets, SparkScripts and Dashboard artifacts.
+
+(2) jaggery-files
+
+## Follow the below steps to generate the monitoring dashboard:
+
+1. Add jaggery files which can be found in <Stratos-DAS-Distribution>/monitoring-dashboard/jaggery-files/ to DAS path
+ <DAS_HOME/repository/deployment/server/jaggeryapps/portal/controllers/apis/.
+
+2. Create MySQL database and tables using queries in
+<Stratos-DAS-Distribution>/monitoring-dashboard/monitoring-mysqlscript.sql manually.
+
+3. Copy CEP EventFormatter artifacts in <Stratos-DAS-Distribution>/wso2cep-<version>/eventformatters/ to
+<CEP-HOME>/repository/deployment/server/eventformatters/.
+
+4. Copy CEP OutputEventAdapter artifact in <Stratos-DAS-Distribution>/wso2cep-<version>/outputeventadaptors/ to
+<CEP-HOME>/repository/deployment/server/outputeventadaptors and update the tcp and ssl ports according to DAS server
+ port offset.
+
+5. Add stratos-monitoring-service car file in <Stratos-DAS-Distribution>/monitoring-dashboard/ to
+<DAS-HOME>/repository/deployment/server/carbonapps/ to generate the monitoring dashboard.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/bd7d2464/extensions/das/modules/distribution/README.md
----------------------------------------------------------------------
diff --git a/extensions/das/modules/distribution/README.md b/extensions/das/modules/distribution/README.md
index 1354716..0ae46c9 100644
--- a/extensions/das/modules/distribution/README.md
+++ b/extensions/das/modules/distribution/README.md
@@ -1,7 +1,48 @@
# Apache Stratos DAS Extensions
-Apache Stratos Data Analytics Server (DAS) extensions include DAS artifacts and spark udf to run spark script.
-These extensions need to be deployed manually when running DAS externally.
+Apache Stratos Data Analytics Server (DAS) extensions include DAS artifacts and stratos-das-extension jar which has
+spark UDF (User Defined Funtion) used in spark script. You can configure an external DAS for stratos metering and
+monitoring feature as below:
+
+## Follow the below steps to configure DAS for metering dashboard:
+
+1. Add org.apache.stratos.das.extension-<stratos-version>.jar file to <DAS-HOME>/repository/components/lib/.
+
+2. Add UDF class '<class-name>org.apache.stratos.das.extension.TimeUDF</class-name>' to 'spark-udf-config.xml' file
+in <DAS-HOME>/repository/conf/analytics/spark/' folder.
+
+3. Add jaggery files which can be found in <Stratos-DAS-Distribution>/metering-dashboard/jaggery-files/ to DAS server
+ path <DAS_HOME/repository/deployment/server/jaggeryapps/portal/controllers/apis/.
+
+4. Create MySQL database and tables using queries in
+<Stratos-DAS-Distribution>/metering-dashboard/metering-mysqlscript.sql manually.
+
+5. Apply ues-patch files in <Stratos-DAS-Distribution>/metering-dashboard/ues-patch/ to DAS below:
+ - Copy 'ues-gadgets.js' and 'ues-pubsub.js' files to
+ <DAS-HOME>/repository/deployment/server/jaggeryapps/portal/js/ folder.
+ - Copy 'dashboard.jag' file to <DAS-HOME>/repository/deployment/server/jaggeryapps/portal/theme/templates/ folder.
+
+6. Add stratos-metering-service car file in <Stratos-DAS-Distribution>/metering-dashboard/ to
+<DAS-HOME>/repository/deployment/server/carbonapps/ to generate the metering dashboard.
+
+## Follow the below steps to configure DAS for monitoring dashboard:
+
+1. Add jaggery files which can be found in <Stratos-DAS-Distribution>/monitoring-dashboard/jaggery-files/ to DAS path
+'<DAS_HOME/repository/deployment/server/jaggeryapps/portal/controllers/apis/'.
+
+2. Create MySQL database and tables using queries in
+<Stratos-DAS-Distribution>/monitoring-dashboard/monitoring-mysqlscript.sql manually.
+
+3. Copy CEP EventFormatter artifacts in <Stratos-DAS-Distribution>/wso2cep-<version>/eventformatters/ to
+<CEP-HOME>/repository/deployment/server/eventformatters/.
+
+4. Copy CEP OutputEventAdapter artifact in <Stratos-DAS-Distribution>/wso2cep-<version>/outputeventadaptors/ to
+<CEP-HOME>/repository/deployment/server/outputeventadaptors and update the tcp and ssl ports according to DAS server
+port offset.
+
+5. Add stratos-monitoring-service car file in <Stratos-DAS-Distribution>/monitoring-dashboard/ to
+<DAS-HOME>/repository/deployment/server/carbonapps/ to generate the monitoring dashboard.
+
Please refer below link for more information on WSO2 DAS.
https://docs.wso2.com/display/DAS300/WSO2+Data+Analytics+Server+Documentation
http://git-wip-us.apache.org/repos/asf/stratos/blob/bd7d2464/extensions/das/modules/stratos-das-extension/README.md
----------------------------------------------------------------------
diff --git a/extensions/das/modules/stratos-das-extension/README.md b/extensions/das/modules/stratos-das-extension/README.md
index 58bdd5b..59fe665 100644
--- a/extensions/das/modules/stratos-das-extension/README.md
+++ b/extensions/das/modules/stratos-das-extension/README.md
@@ -1,6 +1,8 @@
# Apache Stratos DAS Extension
-This directory contains DAS Extensions needed for Stratos. <br />
-1. Add org.apache.stratos.das.extension-<stratos-version>.jar file to '<DAS-HOME>/repository/components/lib/'. <br />
-2. Add below UDF class path to 'spark-udf-config.xml' file in '<DAS-HOME>/repository/conf/analytics/spark/' folder. <br />
- <class-name>org.apache.stratos.das.extension.TimeUDF</class-name> <br />
\ No newline at end of file
+This directory contains DAS Extensions needed for Stratos.
+
+1. Add org.apache.stratos.das.extension-<stratos-version>.jar file to <DAS-HOME>/repository/components/lib/.
+
+2. Add UDF class '<class-name>org.apache.stratos.das.extension.TimeUDF</class-name>' to 'spark-udf-config.xml'
+file in <DAS-HOME>/repository/conf/analytics/spark/ folder.
\ No newline at end of file
[25/50] [abbrv] stratos git commit: Refactor GitHookTestCase: Use
restClient deployEntity. Make artifactUpdateEventCount AtomicInteger.
Terminate event receiver and shutdown executor service at the end of test
case.
Posted by ga...@apache.org.
Refactor GitHookTestCase: Use restClient deployEntity. Make artifactUpdateEventCount AtomicInteger. Terminate event receiver and shutdown executor service at the end of test case.
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/cff8f0b9
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/cff8f0b9
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/cff8f0b9
Branch: refs/heads/release-4.1.5
Commit: cff8f0b9334bedf99958ad90466cd1457dc94239
Parents: 8c615ac
Author: Akila Perera <ra...@gmail.com>
Authored: Mon Nov 30 00:24:46 2015 +0530
Committer: gayangunarathne <ga...@wso2.com>
Committed: Mon Dec 7 10:16:26 2015 +0000
----------------------------------------------------------------------
.../integration/tests/adc/GitHookTestCase.java | 108 +++++++++----------
1 file changed, 49 insertions(+), 59 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/cff8f0b9/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/adc/GitHookTestCase.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/adc/GitHookTestCase.java b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/adc/GitHookTestCase.java
index 5e3ff70..3f708db 100644
--- a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/adc/GitHookTestCase.java
+++ b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/adc/GitHookTestCase.java
@@ -26,14 +26,14 @@ import org.apache.stratos.common.threading.StratosThreadPool;
import org.apache.stratos.integration.common.RestConstants;
import org.apache.stratos.integration.common.TopologyHandler;
import org.apache.stratos.integration.tests.StratosIntegrationTest;
-import org.apache.stratos.messaging.domain.application.ApplicationStatus;
import org.apache.stratos.messaging.event.Event;
import org.apache.stratos.messaging.listener.instance.notifier.ArtifactUpdateEventListener;
import org.apache.stratos.messaging.message.receiver.instance.notifier.InstanceNotifierEventReceiver;
import org.testng.annotations.Test;
-import java.net.URI;
+import java.io.File;
import java.util.concurrent.ExecutorService;
+import java.util.concurrent.atomic.AtomicInteger;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertNull;
@@ -42,24 +42,26 @@ import static org.testng.AssertJUnit.assertTrue;
/**
* Test case to test the /repo/notify endpoint
*/
+@Test(groups = { "adc" })
public class GitHookTestCase extends StratosIntegrationTest {
private static Log log = LogFactory.getLog(GitHookTestCase.class);
- private static final String RESOURCES_PATH = "/git-hook-test";
- private int artifactUpdateEvents = 0;
+ private static final String RESOURCES_PATH = File.separator + "git-hook-test";
+ private AtomicInteger artifactUpdateEventCount = new AtomicInteger(0);
private static final String autoscalePolicyId = "autoscaling-policy-git-hook-test";
private static final String cartridgeId = "c1-git-hook-test";
private static final String networkPartitionId = "network-partition-git-hook-test";
private static final String depPolicyId = "deployment-policy-git-hook-test";
private static final String applicationId = "git-hook-test";
private static final String appPolicyId = "application-policy-git-hook-test";
+ private static final String GIT_HOOK_ARTIFACT_FILENAME = "hook-req.json";
+ private static final int ARTIFACT_UPDATED_EXPECTED_COUNT = 2;
+ private ExecutorService eventListenerExecutorService = StratosThreadPool
+ .getExecutorService("stratos.integration.test.git.thread.pool", 5);
- @Test(timeOut = GLOBAL_TEST_TIMEOUT, groups = {"adc", "smoke"})
+ @Test(timeOut = DEFAULT_TEST_TIMEOUT)
public void sendRepoNotify() throws Exception {
deployArtifacts();
- ExecutorService eventListenerExecutorService = StratosThreadPool.getExecutorService(
- "stratos.integration.test.git.thread.pool",
- 5);
final InstanceNotifierEventReceiver instanceNotifierEventReceiver = new InstanceNotifierEventReceiver();
eventListenerExecutorService.submit(new Runnable() {
@Override
@@ -71,57 +73,48 @@ public class GitHookTestCase extends StratosIntegrationTest {
ArtifactUpdateEventListener artifactUpdateEventListener = new ArtifactUpdateEventListener() {
@Override
protected void onEvent(Event event) {
- artifactUpdateEvents++;
+ artifactUpdateEventCount.addAndGet(1);
}
};
instanceNotifierEventReceiver.addEventListener(artifactUpdateEventListener);
+ restClient.addEntity(RESOURCES_PATH + File.separator + GIT_HOOK_ARTIFACT_FILENAME, RestConstants.REPO_NOTIFY,
+ RestConstants.REPO_NOTIFY_NAME);
- String gitHookFile = "hook-req.json";
- restClient.doPost(
- new URI(stratosBackendURL + RestConstants.REPO_NOTIFY),
- restClient.getJsonStringFromFile(RESOURCES_PATH + "/" + gitHookFile));
-
- while (artifactUpdateEvents < 2) {
- log.info("Waiting till artifact updated comes in... ");
+ while (artifactUpdateEventCount.get() < ARTIFACT_UPDATED_EXPECTED_COUNT) {
+ log.info("Waiting until artifact updated event is received...");
Thread.sleep(1000);
}
-
- log.info("Waiting for application status to become ACTIVE...");
- TopologyHandler.getInstance().assertApplicationStatus(applicationId, ApplicationStatus.Active);
-
+ TopologyHandler.getInstance().assertApplicationActiveStatus(applicationId);
+ instanceNotifierEventReceiver.terminate();
+ eventListenerExecutorService.shutdownNow();
undeployArtifacts();
}
private void deployArtifacts() throws Exception {
- boolean autoscalePolicyAdded = restClient.addEntity(
- RESOURCES_PATH + RestConstants.AUTOSCALING_POLICIES_PATH + "/" + autoscalePolicyId + ".json",
- RestConstants.AUTOSCALING_POLICIES,
- RestConstants.AUTOSCALING_POLICIES_NAME);
+ boolean autoscalePolicyAdded = restClient
+ .addEntity(RESOURCES_PATH + RestConstants.AUTOSCALING_POLICIES_PATH + "/" + autoscalePolicyId + ".json",
+ RestConstants.AUTOSCALING_POLICIES, RestConstants.AUTOSCALING_POLICIES_NAME);
assertTrue(autoscalePolicyAdded);
- boolean cartridgeAdded = restClient.addEntity(
- RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + cartridgeId + ".json",
- RestConstants.CARTRIDGES,
- RestConstants.CARTRIDGES_NAME);
+ boolean cartridgeAdded = restClient
+ .addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + cartridgeId + ".json",
+ RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
assertTrue(cartridgeAdded);
- boolean networkPartitionAdded = restClient.addEntity(
- RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" + networkPartitionId + ".json",
- RestConstants.NETWORK_PARTITIONS,
- RestConstants.NETWORK_PARTITIONS_NAME);
+ boolean networkPartitionAdded = restClient
+ .addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" + networkPartitionId + ".json",
+ RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
assertTrue(networkPartitionAdded);
- boolean deploymentPolicyAdded = restClient.addEntity(
- RESOURCES_PATH + RestConstants.DEPLOYMENT_POLICIES_PATH + "/" + depPolicyId + ".json",
- RestConstants.DEPLOYMENT_POLICIES,
- RestConstants.DEPLOYMENT_POLICIES_NAME);
+ boolean deploymentPolicyAdded = restClient
+ .addEntity(RESOURCES_PATH + RestConstants.DEPLOYMENT_POLICIES_PATH + "/" + depPolicyId + ".json",
+ RestConstants.DEPLOYMENT_POLICIES, RestConstants.DEPLOYMENT_POLICIES_NAME);
assertTrue(deploymentPolicyAdded);
- boolean applicationAdded = restClient.addEntity(
- RESOURCES_PATH + RestConstants.APPLICATIONS_PATH + "/" + applicationId + ".json",
- RestConstants.APPLICATIONS,
- RestConstants.APPLICATIONS_NAME);
+ boolean applicationAdded = restClient
+ .addEntity(RESOURCES_PATH + RestConstants.APPLICATIONS_PATH + "/" + applicationId + ".json",
+ RestConstants.APPLICATIONS, RestConstants.APPLICATIONS_NAME);
assertTrue(applicationAdded);
ApplicationBean bean = (ApplicationBean) restClient
@@ -129,19 +122,18 @@ public class GitHookTestCase extends StratosIntegrationTest {
RestConstants.APPLICATIONS_NAME);
assertEquals(bean.getApplicationId(), applicationId);
- boolean appPolicyAdded = restClient.addEntity(
- RESOURCES_PATH + RestConstants.APPLICATION_POLICIES_PATH + "/" + appPolicyId + ".json",
- RestConstants.APPLICATION_POLICIES,
- RestConstants.APPLICATION_POLICIES_NAME);
+ boolean appPolicyAdded = restClient
+ .addEntity(RESOURCES_PATH + RestConstants.APPLICATION_POLICIES_PATH + "/" + appPolicyId + ".json",
+ RestConstants.APPLICATION_POLICIES, RestConstants.APPLICATION_POLICIES_NAME);
assertTrue(appPolicyAdded);
boolean appDeployed = restClient.deployEntity(
- RestConstants.APPLICATIONS + "/" + applicationId + RestConstants.APPLICATIONS_DEPLOY + "/" + appPolicyId,
- RestConstants.APPLICATIONS_NAME);
+ RestConstants.APPLICATIONS + "/" + applicationId + RestConstants.APPLICATIONS_DEPLOY + "/"
+ + appPolicyId, RestConstants.APPLICATIONS_NAME);
assertTrue(appDeployed);
}
- private void undeployArtifacts() throws Exception{
+ private void undeployArtifacts() throws Exception {
log.info(String.format("Un-deploying the application [application id] %s", applicationId));
String resourcePathUndeploy = RestConstants.APPLICATIONS + "/" + applicationId +
RestConstants.APPLICATIONS_UNDEPLOY;
@@ -158,12 +150,13 @@ public class GitHookTestCase extends StratosIntegrationTest {
RestConstants.APPLICATIONS_UNDEPLOY + "?force=true", RestConstants.APPLICATIONS);
boolean forceUndeployed = TopologyHandler.getInstance().assertApplicationUndeploy(applicationId);
- assertTrue(String.format("Forceful undeployment failed for the application %s", applicationId), forceUndeployed);
+ assertTrue(String.format("Forceful undeployment failed for the application %s", applicationId),
+ forceUndeployed);
}
log.info("Removing the application [application id] sample-application-startup-test");
- boolean removedApp = restClient.removeEntity(RestConstants.APPLICATIONS, applicationId,
- RestConstants.APPLICATIONS_NAME);
+ boolean removedApp = restClient
+ .removeEntity(RestConstants.APPLICATIONS, applicationId, RestConstants.APPLICATIONS_NAME);
assertTrue(removedApp);
ApplicationBean beanRemoved = (ApplicationBean) restClient
@@ -173,13 +166,12 @@ public class GitHookTestCase extends StratosIntegrationTest {
log.info(String.format("Removing the application policy [application policy id] %s", appPolicyId));
boolean removeAppPolicy = restClient
- .removeEntity(RestConstants.APPLICATION_POLICIES, appPolicyId,
- RestConstants.APPLICATION_POLICIES_NAME);
+ .removeEntity(RestConstants.APPLICATION_POLICIES, appPolicyId, RestConstants.APPLICATION_POLICIES_NAME);
assertTrue(removeAppPolicy);
log.info(String.format("Removing the cartridge [cartridge type] %s", cartridgeId));
- boolean removedC1 = restClient.removeEntity(RestConstants.CARTRIDGES, cartridgeId,
- RestConstants.CARTRIDGES_NAME);
+ boolean removedC1 = restClient
+ .removeEntity(RestConstants.CARTRIDGES, cartridgeId, RestConstants.CARTRIDGES_NAME);
assertTrue(removedC1);
log.info(String.format("Removing the autoscaling policy [autoscaling policy id] %s", autoscalePolicyId));
@@ -189,14 +181,12 @@ public class GitHookTestCase extends StratosIntegrationTest {
log.info(String.format("Removing the deployment policy [deployment policy id] %s", depPolicyId));
boolean removedDep = restClient
- .removeEntity(RestConstants.DEPLOYMENT_POLICIES, depPolicyId,
- RestConstants.DEPLOYMENT_POLICIES_NAME);
+ .removeEntity(RestConstants.DEPLOYMENT_POLICIES, depPolicyId, RestConstants.DEPLOYMENT_POLICIES_NAME);
assertTrue(removedDep);
log.info(String.format("Removing the network partition [network partition id] %s", networkPartitionId));
- boolean removedNet = restClient
- .removeEntity(RestConstants.NETWORK_PARTITIONS, networkPartitionId,
- RestConstants.NETWORK_PARTITIONS_NAME);
+ boolean removedNet = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS, networkPartitionId,
+ RestConstants.NETWORK_PARTITIONS_NAME);
assertTrue(removedNet);
}
}
[37/50] [abbrv] stratos git commit: Remove init() call in setEnaled
method in ThriftStatisticsPublisher since it is invoked from the constructor.
Remove setEnabled(true) call in MockHealthStatisticsNotifier since it is read
from thrift-client-config.xml
Posted by ga...@apache.org.
Remove init() call in setEnaled method in ThriftStatisticsPublisher since it is invoked from the constructor. Remove setEnabled(true) call in MockHealthStatisticsNotifier since it is read from thrift-client-config.xml
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/642bd6ce
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/642bd6ce
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/642bd6ce
Branch: refs/heads/release-4.1.5
Commit: 642bd6cec07b455a99cb800a2dceefde60e0278d
Parents: 5ca33ac
Author: Akila Perera <ra...@gmail.com>
Authored: Tue Dec 1 18:07:28 2015 +0530
Committer: gayangunarathne <ga...@wso2.com>
Committed: Mon Dec 7 10:16:29 2015 +0000
----------------------------------------------------------------------
.../publisher/ThriftStatisticsPublisher.java | 13 +++++--------
.../publisher/MockHealthStatisticsNotifier.java | 2 --
2 files changed, 5 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/642bd6ce/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/statistics/publisher/ThriftStatisticsPublisher.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/statistics/publisher/ThriftStatisticsPublisher.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/statistics/publisher/ThriftStatisticsPublisher.java
index bf0db61..7af804b 100644
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/statistics/publisher/ThriftStatisticsPublisher.java
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/statistics/publisher/ThriftStatisticsPublisher.java
@@ -88,8 +88,9 @@ public class ThriftStatisticsPublisher implements StatisticsPublisher {
for (ThriftClientInfo thriftClientInfo : thriftClientInfoList) {
if (thriftClientInfo.isStatsPublisherEnabled()) {
- dataPublisherHolders.add(new DataPublisherHolder(null, buildUrl(thriftClientInfo), thriftClientInfo.getUsername(),
- thriftClientInfo.getPassword()));
+ dataPublisherHolders
+ .add(new DataPublisherHolder(null, buildUrl(thriftClientInfo), thriftClientInfo.getUsername(),
+ thriftClientInfo.getPassword()));
if (log.isDebugEnabled()) {
log.debug(String.format("Thrift client [id] %s [ip] %s [port] %s is added to data publisher holder",
thriftClientInfo.getId(), thriftClientInfo.getIp(), thriftClientInfo.getPort()));
@@ -112,9 +113,6 @@ public class ThriftStatisticsPublisher implements StatisticsPublisher {
@Override
public void setEnabled(boolean enabled) {
this.enabled = enabled;
- if (this.enabled) {
- init();
- }
}
@Override
@@ -134,8 +132,8 @@ public class ThriftStatisticsPublisher implements StatisticsPublisher {
try {
if (log.isDebugEnabled()) {
- log.debug(String.format("Publishing thrift event: [stream] %s [version] %s",
- streamDefinition.getName(), streamDefinition.getVersion()));
+ log.debug(String.format("Publishing thrift event: [stream] %s [version] %s", streamDefinition.getName(),
+ streamDefinition.getVersion()));
}
loadBalancingDataPublisher.publish(streamDefinition.getName(), streamDefinition.getVersion(), event);
if (log.isDebugEnabled()) {
@@ -143,7 +141,6 @@ public class ThriftStatisticsPublisher implements StatisticsPublisher {
streamDefinition.getName(), streamDefinition.getVersion()));
}
-
} catch (AgentException e) {
if (log.isErrorEnabled()) {
log.error(String.format("Could not publish thrift event: [stream] %s [version] %s",
http://git-wip-us.apache.org/repos/asf/stratos/blob/642bd6ce/components/org.apache.stratos.mock.iaas/src/main/java/org/apache/stratos/mock/iaas/statistics/publisher/MockHealthStatisticsNotifier.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.mock.iaas/src/main/java/org/apache/stratos/mock/iaas/statistics/publisher/MockHealthStatisticsNotifier.java b/components/org.apache.stratos.mock.iaas/src/main/java/org/apache/stratos/mock/iaas/statistics/publisher/MockHealthStatisticsNotifier.java
index 4f3de51..637e4bf 100644
--- a/components/org.apache.stratos.mock.iaas/src/main/java/org/apache/stratos/mock/iaas/statistics/publisher/MockHealthStatisticsNotifier.java
+++ b/components/org.apache.stratos.mock.iaas/src/main/java/org/apache/stratos/mock/iaas/statistics/publisher/MockHealthStatisticsNotifier.java
@@ -44,11 +44,9 @@ public class MockHealthStatisticsNotifier implements Runnable {
this.mockMemberContext = mockMemberContext;
this.healthStatisticsPublisher = HealthStatisticsPublisherFactory
.createHealthStatisticsPublisher(StatisticsPublisherType.WSO2CEP);
- this.healthStatisticsPublisher.setEnabled(true);
this.inFlightRequestPublisher = InFlightRequestPublisherFactory
.createInFlightRequestPublisher(StatisticsPublisherType.WSO2CEP);
- this.inFlightRequestPublisher.setEnabled(true);
}
@Override
[45/50] [abbrv] stratos git commit: Update the docker and installer
files with version
Posted by ga...@apache.org.
Update the docker and installer files with version
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/98732fc3
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/98732fc3
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/98732fc3
Branch: refs/heads/release-4.1.5
Commit: 98732fc352eb4f11420b6c334466077e30e927d7
Parents: b56891c
Author: gayangunarathne <ga...@wso2.com>
Authored: Mon Dec 7 10:11:28 2015 +0000
Committer: gayangunarathne <ga...@wso2.com>
Committed: Mon Dec 7 10:16:30 2015 +0000
----------------------------------------------------------------------
tools/docker-images/cartridge-docker-images/base-image/Dockerfile | 2 +-
tools/docker-images/cartridge-docker-images/base-image/files/run | 2 +-
tools/stratos-installer/conf/setup.conf | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/98732fc3/tools/docker-images/cartridge-docker-images/base-image/Dockerfile
----------------------------------------------------------------------
diff --git a/tools/docker-images/cartridge-docker-images/base-image/Dockerfile b/tools/docker-images/cartridge-docker-images/base-image/Dockerfile
index 95b3ca2..d55234a 100644
--- a/tools/docker-images/cartridge-docker-images/base-image/Dockerfile
+++ b/tools/docker-images/cartridge-docker-images/base-image/Dockerfile
@@ -22,7 +22,7 @@
FROM debian:7.8
MAINTAINER dev@stratos.apache.org
-ENV PCA_DISTRIBUTION_NAME apache-stratos-python-cartridge-agent-4.1.5-SNAPSHOT
+ENV PCA_DISTRIBUTION_NAME apache-stratos-python-cartridge-agent-4.1.5
# ------------------
# Setup ssh server
# ------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/98732fc3/tools/docker-images/cartridge-docker-images/base-image/files/run
----------------------------------------------------------------------
diff --git a/tools/docker-images/cartridge-docker-images/base-image/files/run b/tools/docker-images/cartridge-docker-images/base-image/files/run
index ebbd34f..34c7be0 100755
--- a/tools/docker-images/cartridge-docker-images/base-image/files/run
+++ b/tools/docker-images/cartridge-docker-images/base-image/files/run
@@ -26,7 +26,7 @@
source /root/.bashrc
-export STRATOS_VERSION="4.1.5-SNAPSHOT"
+export STRATOS_VERSION="4.1.5"
export PCA_HOME="/mnt/apache-stratos-python-cartridge-agent-${STRATOS_VERSION}"
set -o posix ; set | sed -e ':a;N;$!ba;s/\n/,/g' > ${PCA_HOME}/payload/launch-params
http://git-wip-us.apache.org/repos/asf/stratos/blob/98732fc3/tools/stratos-installer/conf/setup.conf
----------------------------------------------------------------------
diff --git a/tools/stratos-installer/conf/setup.conf b/tools/stratos-installer/conf/setup.conf
index 740a8f4..c7bf70c 100644
--- a/tools/stratos-installer/conf/setup.conf
+++ b/tools/stratos-installer/conf/setup.conf
@@ -55,7 +55,7 @@ export mb_ip="127.0.0.1" # Machine ip on which mb run
export mb_port=61616 #default port which the message broker service runs
export stratos_extract_path=$stratos_path/"apache-stratos"
-export stratos_pack_zip_name="apache-stratos-4.1.5-SNAPSHOT.zip"
+export stratos_pack_zip_name="apache-stratos-4.1.5.zip"
export stratos_pack_zip=$stratos_packs/$stratos_pack_zip_name
export activemq_pack=$stratos_packs/"apache-activemq-5.9.1-bin.tar.gz"
[28/50] [abbrv] stratos git commit: PCA Live Test - Minor test change
Posted by ga...@apache.org.
PCA Live Test - Minor test change
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/24ce6896
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/24ce6896
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/24ce6896
Branch: refs/heads/release-4.1.5
Commit: 24ce68969b962123f32d0a413a8563fecfb7dd43
Parents: 93a3f67
Author: Chamila de Alwis <ch...@apache.org>
Authored: Mon Nov 30 12:53:10 2015 +0530
Committer: gayangunarathne <ga...@wso2.com>
Committed: Mon Dec 7 10:16:27 2015 +0000
----------------------------------------------------------------------
.../agent/integration/tests/ADCValidationTestCase.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/24ce6896/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/ADCValidationTestCase.java
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/ADCValidationTestCase.java b/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/ADCValidationTestCase.java
index 5148992..45834e5 100644
--- a/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/ADCValidationTestCase.java
+++ b/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/ADCValidationTestCase.java
@@ -59,6 +59,11 @@ public class ADCValidationTestCase extends PythonAgentIntegrationTest {
public ADCValidationTestCase() throws IOException {
}
+ @Override
+ protected String getClassName() {
+ return this.getClass().getSimpleName();
+ }
+
@BeforeMethod(alwaysRun = true)
public void setUp() throws Exception {
log.info("Setting up ADCTestCase");
@@ -75,7 +80,7 @@ public class ADCValidationTestCase extends PythonAgentIntegrationTest {
tearDown();
}
- @Test(timeOut = ADC_TEST_TIMEOUT, groups = {"adddddd"})
+ @Test(timeOut = ADC_TEST_TIMEOUT, groups = {"smoke"})
public void testAppPathValidation(){
log.info("Testing app path validation for ADC");
startCommunicatorThread();
[42/50] [abbrv] stratos git commit: Update the AS registry manager
Posted by ga...@apache.org.
Update the AS registry manager
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/c1bafecd
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/c1bafecd
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/c1bafecd
Branch: refs/heads/release-4.1.5
Commit: c1bafecd28682601b652f31f80286d23a690a664
Parents: 8bb91b7
Author: gayangunarathne <ga...@wso2.com>
Authored: Sun Dec 6 10:30:37 2015 +0530
Committer: gayangunarathne <ga...@wso2.com>
Committed: Mon Dec 7 10:16:30 2015 +0000
----------------------------------------------------------------------
.../apache/stratos/autoscaler/registry/RegistryManager.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/c1bafecd/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java
index 925c4ff..343b76a 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java
@@ -85,7 +85,7 @@ public class RegistryManager {
return instance;
}
- private Object retrieve(String resourcePath) {
+ private synchronized Object retrieve(String resourcePath) {
try {
Resource resource = registryService.get(resourcePath);
return resource.getContent();
@@ -99,7 +99,7 @@ public class RegistryManager {
}
}
- private void delete(String resourcePath) {
+ private synchronized void delete(String resourcePath) {
try {
registryService.beginTransaction();
registryService.delete(resourcePath);
@@ -138,7 +138,7 @@ public class RegistryManager {
* @param dataObj object to be persisted.
* @param resourcePath resource path to be persisted.
*/
- private void persist(Object dataObj, String resourcePath) throws AutoScalerException {
+ private synchronized void persist(Object dataObj, String resourcePath) throws AutoScalerException {
try {
registryService.beginTransaction();
[50/50] [abbrv] stratos git commit: UPdate the readme file with
currect links
Posted by ga...@apache.org.
UPdate the readme file with currect links
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/456c6e20
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/456c6e20
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/456c6e20
Branch: refs/heads/release-4.1.5
Commit: 456c6e206b0ac75a7e1b982225594f0dc38f820d
Parents: c1bafec
Author: gayangunarathne <ga...@wso2.com>
Authored: Sun Dec 6 13:20:05 2015 +0530
Committer: gayangunarathne <ga...@wso2.com>
Committed: Mon Dec 7 10:16:30 2015 +0000
----------------------------------------------------------------------
README.md | 22 +++++++++++-----------
tools/stratos-installer/README.md | 2 +-
2 files changed, 12 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/456c6e20/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index d6c6f93..a98eaa6 100644
--- a/README.md
+++ b/README.md
@@ -46,14 +46,14 @@ auto-scaling policies with multiple factors,i.e., requests in flight, memory con
considered when scaling up or down. The Auto-scaler also supports scaling for non-HTTP transport.
<br />
For detailed information on how multi-factored auto-scaling takes place in Stratos,
-see [Autoscaler](https://cwiki.apache.org/confluence/display/STRATOS/4.1.5+Autoscaler).
+see [Autoscaler](https://cwiki.apache.org/confluence/display/STRATOS/4.1.x+Autoscaler).
* Smart policies <br />
The Auto-scaler in Stratos uses two smart policies when making auto-scaling decisions: auto-scaling policy and deployment policy.
The instances will be automatically spawned based on the smart policies that are applied to the application.
<br />
For more information on auto-scaling and deployment policy scaling policies, see [Smart Policies]
-(https://cwiki.apache.org/confluence/display/STRATOS/4.1.5+Smart+Policies).
+(https://cwiki.apache.org/confluence/display/STRATOS/4.1.x+Smart+Policies).
* Multiple IaaS support <br />
Apache Stratos is tested on the following IaaS providers: AWS EC2 and OpenStack. However, it is very easy to extend
@@ -68,7 +68,7 @@ be off-loaded to another cloud.
It is possible for DevOps to define partitions in a network partition, to control IaaS resources. Thereby,
Apache Stratos can control resources per cloud, region, and zone. Controlling of IaaS resources provide a high
availability and solves disaster recovery concerns. For more information, see [Cloud Partitioning]
-(https://cwiki.apache.org/confluence/display/STRATOS/4.1.5+Cloud+Partitioning).
+(https://cwiki.apache.org/confluence/display/STRATOS/4.1.x+Cloud+Partitioning).
* Loosely coupled communication <br />
Stratos uses the Advanced Message Queuing Protocol (AMQP) messaging technology for communication among all its components.
@@ -87,7 +87,7 @@ A cartridge is a package of code that includes a Virtual Machine (VM) image plus
be plugged into Stratos to offer a new PaaS service. Stratos supports single tenant and multi-tenant cartridges.
If needed, tenants can easily add their own cartridges to Stratos.
<br />
-For more information on how Stratos uses cartridges, see [Cartridge](https://cwiki.apache.org/confluence/display/STRATOS/4.1.5+Cartridge).
+For more information on how Stratos uses cartridges, see [Cartridge](https://cwiki.apache.org/confluence/display/STRATOS/4.1.x+Cartridge).
* Cartridge automation using Puppet <br />
Cartridges can be easily configured with the use of an orchestration layer such as Puppet.
@@ -96,7 +96,7 @@ Cartridges can be easily configured with the use of an orchestration layer such
Stratos supports third-party load balancers (LBs), i.e, HAProxy, NGINX. Thereby, if required, users can use their own
LB with Stratos.
<br />
-For more information, see [Load Balancers](https://cwiki.apache.org/confluence/display/STRATOS/4.1.5+Load+Balancers).
+For more information, see [Load Balancers](https://cwiki.apache.org/confluence/display/STRATOS/4.1.x+Load+Balancers).
* Artifact distribution coordination <br />
The Artifact Distribution Coordinator is responsible for the distribution of artifacts. Artifacts can be uploaded
@@ -106,25 +106,25 @@ repositories based deployment synchronization. Users are able to use their own G
a service instance.
<br />
For more information, see [Artifact Distribution Coordinator]
-(https://cwiki.apache.org/confluence/display/STRATOS/4.1.5+Artifact+Distribution+Coordinator).
+(https://cwiki.apache.org/confluence/display/STRATOS/4.1.x+Artifact+Distribution+Coordinator).
* Stratos Manager Console <br />
Administrators and tenants can use the Stratos Manager console, which is a web-based UI management console in Stratos,
to interact with Stratos.
<br />
-For more information, see [Stratos Manager](https://cwiki.apache.org/confluence/display/STRATOS/4.1.5+Stratos+Manager).
+For more information, see [Stratos Manager](https://cwiki.apache.org/confluence/display/STRATOS/4.1.x+Stratos+Manager).
* Stratos REST API <br />
DevOps can use REST APIs to carry out various administering functions (e.g., adding a tenant, adding a cartridge, etc.).
<br />
For more information, see the [Stratos API Reference Guide]
-(https://cwiki.apache.org/confluence/display/STRATOS/4.1.5+Stratos+API+Reference).
+(https://cwiki.apache.org/confluence/display/STRATOS/4.1.x+Stratos+API+Reference).
* Interactive CLI Tool <br />
Command Line Interface (CLI) tool provides users an interface to interact with Stratos and manage your applications.
<br />
-For more information, see the [CLI Tool](https://cwiki.apache.org/confluence/display/STRATOS/4.1.5+CLI+Tool) and the
-[CLI Guide](https://cwiki.apache.org/confluence/display/STRATOS/4.1.5+CLI+Guide).
+For more information, see the [CLI Tool](https://cwiki.apache.org/confluence/display/STRATOS/4.1.x+CLI+Tool) and the
+[CLI Guide](https://cwiki.apache.org/confluence/display/STRATOS/4.1.x+CLI+Guide).
* Monitoring and metering <br />
Apache Stratos provides centralized monitoring and metering. The level of resource utilization in Stratos is measured using metering.
@@ -134,7 +134,7 @@ If required, the DevOps can enable a persistent volume for cartridges. If persis
automatically attaches a volume when a new cartridge instance is created.
<br />
For more information, see [Persistence Volume Mapping]
-(https://cwiki.apache.org/confluence/display/STRATOS/4.1.5+Persistence+Volume+Mapping).
+(https://cwiki.apache.org/confluence/display/STRATOS/4.1.x+Persistence+Volume+Mapping).
* Gracefully shutdown instances <br />
Before terminating an instance, when scaling down, the Auto-scaler will allow all the existing requests to the instance
http://git-wip-us.apache.org/repos/asf/stratos/blob/456c6e20/tools/stratos-installer/README.md
----------------------------------------------------------------------
diff --git a/tools/stratos-installer/README.md b/tools/stratos-installer/README.md
index 38fb229..d1392ea 100644
--- a/tools/stratos-installer/README.md
+++ b/tools/stratos-installer/README.md
@@ -5,4 +5,4 @@ Apache Stratos Installer
Stratos-Installer is a tool to install Stratos in Single JVM as well as in distributed setup.
Please refer the following Stratos Wiki page for detailed installation guide:
-https://cwiki.apache.org/confluence/display/STRATOS/4.1.5+Installation+Guide
+https://cwiki.apache.org/confluence/display/STRATOS/4.1.x+Installation+Guide
[24/50] [abbrv] stratos git commit: Cleaning up test cases. Remove
duplicate assertions. Fix formatting.
Posted by ga...@apache.org.
Cleaning up test cases. Remove duplicate assertions. Fix formatting.
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/a22f27a6
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/a22f27a6
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/a22f27a6
Branch: refs/heads/release-4.1.5
Commit: a22f27a6f6ca84cc39574735a6f483f361eda755
Parents: cff8f0b
Author: Akila Perera <ra...@gmail.com>
Authored: Mon Nov 30 00:26:16 2015 +0530
Committer: gayangunarathne <ga...@wso2.com>
Committed: Mon Dec 7 10:16:26 2015 +0000
----------------------------------------------------------------------
pom.xml | 2 +-
.../ApplicationBurstingTestCase.java | 145 +++----
.../ApplicationStartupOrderTestCase.java | 165 ++++----
.../application/ApplicationUpdateTestCase.java | 131 +++---
.../application/GroupStartupOrderTestCase.java | 229 +++++------
.../GroupTerminationBehaviorTestCase.java | 196 ++++-----
.../application/MetadataServiceTestCase.java | 32 +-
...PartitionOneAfterAnotherClusterTestCase.java | 148 ++++---
.../PartitionRoundRobinClusterTestCase.java | 129 +++---
.../SampleApplicationStartupTestCase.java | 46 ++-
.../application/SampleApplicationsTestCase.java | 401 ++++++++++---------
.../SingleClusterScalingTestCase.java | 131 +++---
.../tests/cartridge/CartridgeGroupTestCase.java | 241 +++++++++++
.../tests/cartridge/CartridgeTestCase.java | 183 +++++++++
.../tests/group/CartridgeGroupTestCase.java | 251 ------------
.../tests/group/CartridgeTestCase.java | 183 ---------
.../tests/iaas/IaaSProviderTestCase.java | 28 +-
.../iaas/IaasProviderAttributeTestCase.java | 61 +--
.../policies/ApplicationPolicyTestCase.java | 111 ++---
.../policies/AutoscalingPolicyTestCase.java | 5 +-
.../policies/DeploymentPolicyTestCase.java | 7 +-
.../policies/NetworkPartitionTestCase.java | 7 +-
.../integration/tests/users/TenantTestCase.java | 8 +-
.../integration/tests/users/UserTestCase.java | 5 +-
24 files changed, 1364 insertions(+), 1481 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/a22f27a6/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 7a63325..7686da2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1795,7 +1795,7 @@
<maven.compiler.plugin.version>2.3.1</maven.compiler.plugin.version>
<maven.wagon.ssh.extension.version>2.1</maven.wagon.ssh.extension.version>
<maven.project.info.reports.plugin.version>2.4</maven.project.info.reports.plugin.version>
- <maven.surefire.plugin.version>2.18</maven.surefire.plugin.version>
+ <maven.surefire.plugin.version>2.19</maven.surefire.plugin.version>
<maven.resources.plugin.verison>2.7</maven.resources.plugin.verison>
<maven.dependency.plugin.version>2.10</maven.dependency.plugin.version>
<maven.incremental.build.plugin.version>1.3</maven.incremental.build.plugin.version>
http://git-wip-us.apache.org/repos/asf/stratos/blob/a22f27a6/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/ApplicationBurstingTestCase.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/ApplicationBurstingTestCase.java b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/ApplicationBurstingTestCase.java
index ce1e0c4..b63525c 100644
--- a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/ApplicationBurstingTestCase.java
+++ b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/ApplicationBurstingTestCase.java
@@ -22,24 +22,23 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.stratos.common.beans.application.ApplicationBean;
import org.apache.stratos.common.beans.cartridge.CartridgeGroupBean;
-import org.apache.stratos.common.beans.policy.deployment.ApplicationPolicyBean;
import org.apache.stratos.integration.common.RestConstants;
import org.apache.stratos.integration.common.TopologyHandler;
import org.apache.stratos.integration.tests.StratosIntegrationTest;
-import org.apache.stratos.messaging.domain.application.ApplicationStatus;
import org.testng.Assert;
import org.testng.annotations.Test;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertNull;
-import static org.testng.AssertJUnit.assertFalse;
import static org.testng.AssertJUnit.assertTrue;
/**
* This will handle the application bursting test cases
*/
+@Test(groups = { "application", "app-burst" })
public class ApplicationBurstingTestCase extends StratosIntegrationTest {
private static final Log log = LogFactory.getLog(ApplicationBurstingTestCase.class);
+ private TopologyHandler topologyHandler = TopologyHandler.getInstance();
private static final String RESOURCES_PATH = "/application-bursting-test";
private static final String autoscalingPolicyId = "autoscaling-policy-application-bursting-test";
private static final String cartridgeId1 = "esb-application-bursting-test";
@@ -52,62 +51,60 @@ public class ApplicationBurstingTestCase extends StratosIntegrationTest {
private static final String applicationId = "application-bursting-test";
private static final String applicationPolicyId = "application-policy-application-bursting-test";
- @Test(timeOut = APPLICATION_TEST_TIMEOUT, groups = {"stratos.application.deployment"})
+ @Test(timeOut = DEFAULT_APPLICATION_TEST_TIMEOUT)
public void testApplicationBusting() throws Exception {
- TopologyHandler topologyHandler = TopologyHandler.getInstance();
+ log.info("Running ApplicationBurstingTestCase.testApplicationBusting test method...");
+ long startTime = System.currentTimeMillis();
- boolean addedScalingPolicy = restClient.addEntity(RESOURCES_PATH + RestConstants.AUTOSCALING_POLICIES_PATH
- + "/" + autoscalingPolicyId + ".json",
+ boolean addedScalingPolicy = restClient.addEntity(
+ RESOURCES_PATH + RestConstants.AUTOSCALING_POLICIES_PATH + "/" + autoscalingPolicyId + ".json",
RestConstants.AUTOSCALING_POLICIES, RestConstants.AUTOSCALING_POLICIES_NAME);
assertTrue(addedScalingPolicy);
- boolean addedC1 = restClient.addEntity(
- RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + cartridgeId1 + ".json",
- RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+ boolean addedC1 = restClient
+ .addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + cartridgeId1 + ".json",
+ RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
assertTrue(addedC1);
- boolean addedC2 = restClient.addEntity(
- RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + cartridgeId2 + ".json",
- RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+ boolean addedC2 = restClient
+ .addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + cartridgeId2 + ".json",
+ RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
assertTrue(addedC2);
- boolean addedC3 = restClient.addEntity(
- RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + cartridgeId3 + ".json",
- RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+ boolean addedC3 = restClient
+ .addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + cartridgeId3 + ".json",
+ RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
assertTrue(addedC3);
boolean addedG1 = restClient.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGE_GROUPS_PATH +
- "/" + cartridgeGroupId + ".json", RestConstants.CARTRIDGE_GROUPS,
- RestConstants.CARTRIDGE_GROUPS_NAME);
+ "/" + cartridgeGroupId + ".json", RestConstants.CARTRIDGE_GROUPS, RestConstants.CARTRIDGE_GROUPS_NAME);
assertTrue(addedG1);
CartridgeGroupBean beanG1 = (CartridgeGroupBean) restClient.
- getEntity(RestConstants.CARTRIDGE_GROUPS, cartridgeGroupId,
- CartridgeGroupBean.class, RestConstants.CARTRIDGE_GROUPS_NAME);
+ getEntity(RestConstants.CARTRIDGE_GROUPS, cartridgeGroupId, CartridgeGroupBean.class,
+ RestConstants.CARTRIDGE_GROUPS_NAME);
assertEquals(beanG1.getName(), cartridgeGroupId);
boolean addedN1 = restClient.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
- networkPartition1 + ".json",
- RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
+ networkPartition1 + ".json", RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
assertTrue(addedN1);
boolean addedN2 = restClient.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
- networkPartition2 + ".json",
- RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
+ networkPartition2 + ".json", RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
assertTrue(addedN2);
boolean addedDep = restClient.addEntity(RESOURCES_PATH + RestConstants.DEPLOYMENT_POLICIES_PATH + "/" +
- deploymentPolicyId + ".json",
- RestConstants.DEPLOYMENT_POLICIES, RestConstants.DEPLOYMENT_POLICIES_NAME);
+ deploymentPolicyId + ".json", RestConstants.DEPLOYMENT_POLICIES,
+ RestConstants.DEPLOYMENT_POLICIES_NAME);
assertTrue(addedDep);
boolean added = restClient.addEntity(RESOURCES_PATH + RestConstants.APPLICATIONS_PATH + "/" +
- applicationId + ".json", RestConstants.APPLICATIONS,
- RestConstants.APPLICATIONS_NAME);
+ applicationId + ".json", RestConstants.APPLICATIONS, RestConstants.APPLICATIONS_NAME);
assertTrue(added);
- ApplicationBean bean = (ApplicationBean) restClient.getEntity(RestConstants.APPLICATIONS,
- applicationId, ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
+ ApplicationBean bean = (ApplicationBean) restClient
+ .getEntity(RestConstants.APPLICATIONS, applicationId, ApplicationBean.class,
+ RestConstants.APPLICATIONS_NAME);
assertEquals(bean.getApplicationId(), applicationId);
boolean addAppPolicy = restClient.addEntity(RESOURCES_PATH + RestConstants.APPLICATION_POLICIES_PATH + "/" +
@@ -118,13 +115,11 @@ public class ApplicationBurstingTestCase extends StratosIntegrationTest {
//deploy the application
String resourcePath = RestConstants.APPLICATIONS + "/" + applicationId +
RestConstants.APPLICATIONS_DEPLOY + "/" + applicationPolicyId;
- boolean deployed = restClient.deployEntity(resourcePath,
- RestConstants.APPLICATIONS_NAME);
+ boolean deployed = restClient.deployEntity(resourcePath, RestConstants.APPLICATIONS_NAME);
assertTrue(deployed);
//Application active handling
- topologyHandler.assertApplicationStatus(bean.getApplicationId(),
- ApplicationStatus.Active);
+ TopologyHandler.getInstance().assertApplicationActiveStatus(applicationId);
//Group active handling
topologyHandler.assertGroupActivation(bean.getApplicationId());
@@ -132,29 +127,11 @@ public class ApplicationBurstingTestCase extends StratosIntegrationTest {
//Cluster active handling
topologyHandler.assertClusterActivation(bean.getApplicationId());
- boolean removedGroup =
- restClient.removeEntity(RestConstants.CARTRIDGE_GROUPS, cartridgeGroupId,
- RestConstants.CARTRIDGE_GROUPS_NAME);
- assertFalse(removedGroup);
-
- boolean removedAuto = restClient.removeEntity(RestConstants.AUTOSCALING_POLICIES,
- autoscalingPolicyId, RestConstants.AUTOSCALING_POLICIES_NAME);
- assertFalse(removedAuto);
-
- boolean removedNet = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS,
- networkPartition1, RestConstants.NETWORK_PARTITIONS_NAME);
- assertFalse(removedNet);
-
- boolean removedDep = restClient.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
- deploymentPolicyId, RestConstants.DEPLOYMENT_POLICIES_NAME);
- assertFalse(removedDep);
-
//Un-deploying the application
String resourcePathUndeploy = RestConstants.APPLICATIONS + "/" + applicationId +
RestConstants.APPLICATIONS_UNDEPLOY;
- boolean unDeployed = restClient.undeployEntity(resourcePathUndeploy,
- RestConstants.APPLICATIONS_NAME);
+ boolean unDeployed = restClient.undeployEntity(resourcePathUndeploy, RestConstants.APPLICATIONS_NAME);
assertTrue(unDeployed);
boolean undeploy = topologyHandler.assertApplicationUndeploy(applicationId);
@@ -166,62 +143,56 @@ public class ApplicationBurstingTestCase extends StratosIntegrationTest {
RestConstants.APPLICATIONS_UNDEPLOY + "?force=true", RestConstants.APPLICATIONS);
boolean forceUndeployed = topologyHandler.assertApplicationUndeploy(applicationId);
- assertTrue(String.format("Forceful undeployment failed for the application %s",
- applicationId), forceUndeployed);
+ assertTrue(String.format("Forceful undeployment failed for the application %s", applicationId),
+ forceUndeployed);
}
- boolean removed = restClient.removeEntity(RestConstants.APPLICATIONS, applicationId,
- RestConstants.APPLICATIONS_NAME);
+ boolean removed = restClient
+ .removeEntity(RestConstants.APPLICATIONS, applicationId, RestConstants.APPLICATIONS_NAME);
assertTrue(removed);
- ApplicationBean beanRemoved = (ApplicationBean) restClient.getEntity(RestConstants.APPLICATIONS,
- applicationId, ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
+ ApplicationBean beanRemoved = (ApplicationBean) restClient
+ .getEntity(RestConstants.APPLICATIONS, applicationId, ApplicationBean.class,
+ RestConstants.APPLICATIONS_NAME);
assertNull(beanRemoved);
- removedGroup =
- restClient.removeEntity(RestConstants.CARTRIDGE_GROUPS, cartridgeGroupId,
- RestConstants.CARTRIDGE_GROUPS_NAME);
+ boolean removedGroup = restClient
+ .removeEntity(RestConstants.CARTRIDGE_GROUPS, cartridgeGroupId, RestConstants.CARTRIDGE_GROUPS_NAME);
assertTrue(removedGroup);
- boolean removedC1 = restClient.removeEntity(RestConstants.CARTRIDGES, cartridgeId1,
- RestConstants.CARTRIDGES_NAME);
+ boolean removedC1 = restClient
+ .removeEntity(RestConstants.CARTRIDGES, cartridgeId1, RestConstants.CARTRIDGES_NAME);
assertTrue(removedC1);
- boolean removedC2 = restClient.removeEntity(RestConstants.CARTRIDGES, cartridgeId2,
- RestConstants.CARTRIDGES_NAME);
+ boolean removedC2 = restClient
+ .removeEntity(RestConstants.CARTRIDGES, cartridgeId2, RestConstants.CARTRIDGES_NAME);
assertTrue(removedC2);
- boolean removedC3 = restClient.removeEntity(RestConstants.CARTRIDGES, cartridgeId3,
- RestConstants.CARTRIDGES_NAME);
+ boolean removedC3 = restClient
+ .removeEntity(RestConstants.CARTRIDGES, cartridgeId3, RestConstants.CARTRIDGES_NAME);
assertTrue(removedC3);
- removedAuto = restClient.removeEntity(RestConstants.AUTOSCALING_POLICIES,
- autoscalingPolicyId, RestConstants.AUTOSCALING_POLICIES_NAME);
+ boolean removedAuto = restClient.removeEntity(RestConstants.AUTOSCALING_POLICIES, autoscalingPolicyId,
+ RestConstants.AUTOSCALING_POLICIES_NAME);
assertTrue(removedAuto);
- removedDep = restClient.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
- deploymentPolicyId, RestConstants.DEPLOYMENT_POLICIES_NAME);
+ boolean removedDep = restClient.removeEntity(RestConstants.DEPLOYMENT_POLICIES, deploymentPolicyId,
+ RestConstants.DEPLOYMENT_POLICIES_NAME);
assertTrue(removedDep);
- removedNet = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS,
- networkPartition1, RestConstants.NETWORK_PARTITIONS_NAME);
- assertFalse(removedNet);
-
- boolean removedN2 = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS,
- networkPartition2, RestConstants.NETWORK_PARTITIONS_NAME);
- assertFalse(removedN2);
-
- boolean removeAppPolicy = restClient.removeEntity(RestConstants.APPLICATION_POLICIES,
- applicationPolicyId, RestConstants.APPLICATION_POLICIES_NAME);
+ boolean removeAppPolicy = restClient.removeEntity(RestConstants.APPLICATION_POLICIES, applicationPolicyId,
+ RestConstants.APPLICATION_POLICIES_NAME);
assertTrue(removeAppPolicy);
- removedNet = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS,
- networkPartition1, RestConstants.NETWORK_PARTITIONS_NAME);
+ boolean removedNet = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS, networkPartition1,
+ RestConstants.NETWORK_PARTITIONS_NAME);
Assert.assertTrue(removedNet);
- removedN2 = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS,
- networkPartition2, RestConstants.NETWORK_PARTITIONS_NAME);
+ boolean removedN2 = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS, networkPartition2,
+ RestConstants.NETWORK_PARTITIONS_NAME);
Assert.assertTrue(removedN2);
+ long duration = System.currentTimeMillis() - startTime;
+ log.info(String.format("ApplicationBurstingTestCase completed in [duration] %s ms", duration));
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/stratos/blob/a22f27a6/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/ApplicationStartupOrderTestCase.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/ApplicationStartupOrderTestCase.java b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/ApplicationStartupOrderTestCase.java
index bde6b04..cbb222b 100644
--- a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/ApplicationStartupOrderTestCase.java
+++ b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/ApplicationStartupOrderTestCase.java
@@ -18,21 +18,25 @@
*/
package org.apache.stratos.integration.tests.application;
-import static org.junit.Assert.assertThat;
-import static org.junit.Assert.fail;
-import static org.junit.matchers.JUnitMatchers.containsString;
-import static org.testng.AssertJUnit.assertTrue;
-
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.apache.stratos.integration.common.RestConstants;
import org.apache.stratos.integration.tests.StratosIntegrationTest;
import org.junit.Rule;
import org.junit.rules.ExpectedException;
import org.testng.annotations.Test;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.fail;
+import static org.junit.matchers.JUnitMatchers.containsString;
+import static org.testng.AssertJUnit.assertTrue;
+
/**
* Handling the startup order of the application
*/
+@Test(groups = { "application" })
public class ApplicationStartupOrderTestCase extends StratosIntegrationTest {
+ private static final Log log = LogFactory.getLog(ApplicationStartupOrderTestCase.class);
private static final String RESOURCES_PATH = "/application-startup-order-test";
private static final String autoscalingPolicyId = "autoscaling-policy-application-startup-order-test";
private static final String cartridgeId1 = "esb-application-startup-order-test";
@@ -51,133 +55,130 @@ public class ApplicationStartupOrderTestCase extends StratosIntegrationTest {
@Rule
public ExpectedException thrown = ExpectedException.none();
- @Test(timeOut = APPLICATION_TEST_TIMEOUT, groups = {"stratos.application.deployment"})
+ @Test(timeOut = DEFAULT_APPLICATION_TEST_TIMEOUT)
public void testApplicationStartupOrder() throws Exception {
-
- thrown.expect(RuntimeException.class);
- thrown.expectMessage(
- "{\"status\":\"error\",\"message\":\"The startup-order defined in the [application] application-startup-order-test is not correct. [startup-order-alias] group.my-dbgroup3333 is not there in the application.\"}");
+ log.info("Running ApplicationStartupOrderTestCase.testApplicationStartupOrder test method...");
+ long startTime = System.currentTimeMillis();
+
+ thrown.expect(RuntimeException.class);
+ thrown.expectMessage("{\"status\":\"error\",\"message\":\"The startup-order defined in the [application] "
+ + "application-startup-order-test is not correct. [startup-order-alias] group.my-dbgroup3333 "
+ + "is not there in the application.\"}");
- boolean addedScalingPolicy = restClient.addEntity(RESOURCES_PATH + RestConstants.AUTOSCALING_POLICIES_PATH
- + "/" + autoscalingPolicyId + ".json",
+ boolean addedScalingPolicy = restClient.addEntity(
+ RESOURCES_PATH + RestConstants.AUTOSCALING_POLICIES_PATH + "/" + autoscalingPolicyId + ".json",
RestConstants.AUTOSCALING_POLICIES, RestConstants.AUTOSCALING_POLICIES_NAME);
assertTrue(addedScalingPolicy);
- boolean addedC1 = restClient.addEntity(
- RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + cartridgeId1 + ".json",
- RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+ boolean addedC1 = restClient
+ .addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + cartridgeId1 + ".json",
+ RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
assertTrue(addedC1);
- boolean addedC2 = restClient.addEntity(
- RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + cartridgeId2 + ".json",
- RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+ boolean addedC2 = restClient
+ .addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + cartridgeId2 + ".json",
+ RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
assertTrue(addedC2);
- boolean addedC3 = restClient.addEntity(
- RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + cartridgeId3 + ".json",
- RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+ boolean addedC3 = restClient
+ .addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + cartridgeId3 + ".json",
+ RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
assertTrue(addedC3);
- boolean addedC4 = restClient.addEntity(
- RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + cartridgeId4 + ".json",
- RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+ boolean addedC4 = restClient
+ .addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + cartridgeId4 + ".json",
+ RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
assertTrue(addedC4);
- boolean addedC5 = restClient.addEntity(
- RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + cartridgeId5 + ".json",
- RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+ boolean addedC5 = restClient
+ .addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + cartridgeId5 + ".json",
+ RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
assertTrue(addedC5);
boolean addedG1 = restClient.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGE_GROUPS_PATH +
- "/" + cartridgeGroupId1 + ".json", RestConstants.CARTRIDGE_GROUPS,
- RestConstants.CARTRIDGE_GROUPS_NAME);
+ "/" + cartridgeGroupId1 + ".json", RestConstants.CARTRIDGE_GROUPS, RestConstants.CARTRIDGE_GROUPS_NAME);
assertTrue(addedG1);
boolean addedG2 = restClient.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGE_GROUPS_PATH +
- "/" + cartridgeGroupId2 + ".json", RestConstants.CARTRIDGE_GROUPS,
- RestConstants.CARTRIDGE_GROUPS_NAME);
+ "/" + cartridgeGroupId2 + ".json", RestConstants.CARTRIDGE_GROUPS, RestConstants.CARTRIDGE_GROUPS_NAME);
assertTrue(addedG2);
boolean addedN1 = restClient.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
- networkPartitionId1 + ".json",
- RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
+ networkPartitionId1 + ".json", RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
assertTrue(addedN1);
boolean addedN2 = restClient.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
- networkPartitionId2 + ".json",
- RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
+ networkPartitionId2 + ".json", RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
assertTrue(addedN2);
boolean addedDep1 = restClient.addEntity(RESOURCES_PATH + RestConstants.DEPLOYMENT_POLICIES_PATH + "/" +
- deploymentPolicyId1 + ".json",
- RestConstants.DEPLOYMENT_POLICIES, RestConstants.DEPLOYMENT_POLICIES_NAME);
+ deploymentPolicyId1 + ".json", RestConstants.DEPLOYMENT_POLICIES,
+ RestConstants.DEPLOYMENT_POLICIES_NAME);
assertTrue(addedDep1);
boolean addedDep2 = restClient.addEntity(RESOURCES_PATH + RestConstants.DEPLOYMENT_POLICIES_PATH + "/" +
- deploymentPolicyId2 + ".json",
- RestConstants.DEPLOYMENT_POLICIES, RestConstants.DEPLOYMENT_POLICIES_NAME);
+ deploymentPolicyId2 + ".json", RestConstants.DEPLOYMENT_POLICIES,
+ RestConstants.DEPLOYMENT_POLICIES_NAME);
assertTrue(addedDep2);
-
- try {
+
+ try {
restClient.addEntity(RESOURCES_PATH + RestConstants.APPLICATIONS_PATH + "/" +
- applicationId + ".json", RestConstants.APPLICATIONS,
- RestConstants.APPLICATIONS_NAME);
- fail("Should throw an exception if the aliases mentioned in dependency order section are not defined");
- } catch (Exception e) {
- assertThat(
- e.getMessage(),containsString("The startup-order defined in the [application] application-startup-order-test is not correct. [startup-order-alias] group.my-dbgroup3333 is not there in the application."));
- }
- // Clean up
- boolean removedGroup = restClient.removeEntity(RestConstants.CARTRIDGE_GROUPS,
- cartridgeGroupId1,
- RestConstants.CARTRIDGE_GROUPS_NAME);
+ applicationId + ".json", RestConstants.APPLICATIONS, RestConstants.APPLICATIONS_NAME);
+ fail("Should throw an exception if the aliases mentioned in dependency order section are not defined");
+ } catch (Exception e) {
+ assertThat(e.getMessage(), containsString(
+ "The startup-order defined in the [application] application-startup-order-test is not correct. "
+ + "[startup-order-alias] group.my-dbgroup3333 is not there in the application."));
+ }
+ // Clean up
+ boolean removedGroup = restClient
+ .removeEntity(RestConstants.CARTRIDGE_GROUPS, cartridgeGroupId1, RestConstants.CARTRIDGE_GROUPS_NAME);
assertTrue(removedGroup);
- removedGroup = restClient.removeEntity(RestConstants.CARTRIDGE_GROUPS,
- cartridgeGroupId2,
- RestConstants.CARTRIDGE_GROUPS_NAME);
+ removedGroup = restClient
+ .removeEntity(RestConstants.CARTRIDGE_GROUPS, cartridgeGroupId2, RestConstants.CARTRIDGE_GROUPS_NAME);
assertTrue(removedGroup);
- boolean removedAuto = restClient.removeEntity(RestConstants.AUTOSCALING_POLICIES,
- autoscalingPolicyId, RestConstants.AUTOSCALING_POLICIES_NAME);
- assertTrue(removedAuto);
-
- boolean removedDep = restClient.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
- deploymentPolicyId1, RestConstants.DEPLOYMENT_POLICIES_NAME);
+ boolean removedAuto = restClient.removeEntity(RestConstants.AUTOSCALING_POLICIES, autoscalingPolicyId,
+ RestConstants.AUTOSCALING_POLICIES_NAME);
+ assertTrue(removedAuto);
+
+ boolean removedDep = restClient.removeEntity(RestConstants.DEPLOYMENT_POLICIES, deploymentPolicyId1,
+ RestConstants.DEPLOYMENT_POLICIES_NAME);
assertTrue(removedDep);
-
- removedDep = restClient.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
- deploymentPolicyId2, RestConstants.DEPLOYMENT_POLICIES_NAME);
+
+ removedDep = restClient.removeEntity(RestConstants.DEPLOYMENT_POLICIES, deploymentPolicyId2,
+ RestConstants.DEPLOYMENT_POLICIES_NAME);
assertTrue(removedDep);
-
- boolean removedNet = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS,
- networkPartitionId1,
+
+ boolean removedNet = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS, networkPartitionId1,
RestConstants.NETWORK_PARTITIONS_NAME);
assertTrue(removedNet);
-
- removedNet = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS,
- networkPartitionId2,
+
+ removedNet = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS, networkPartitionId2,
RestConstants.NETWORK_PARTITIONS_NAME);
assertTrue(removedNet);
- boolean removedC1 = restClient.removeEntity(RestConstants.CARTRIDGES, cartridgeId1,
- RestConstants.CARTRIDGES_NAME);
+ boolean removedC1 = restClient
+ .removeEntity(RestConstants.CARTRIDGES, cartridgeId1, RestConstants.CARTRIDGES_NAME);
assertTrue(removedC1);
-
- boolean removedC2 = restClient.removeEntity(RestConstants.CARTRIDGES, cartridgeId2,
- RestConstants.CARTRIDGES_NAME);
+
+ boolean removedC2 = restClient
+ .removeEntity(RestConstants.CARTRIDGES, cartridgeId2, RestConstants.CARTRIDGES_NAME);
assertTrue(removedC2);
- boolean removedC3 = restClient.removeEntity(RestConstants.CARTRIDGES, cartridgeId3,
- RestConstants.CARTRIDGES_NAME);
+ boolean removedC3 = restClient
+ .removeEntity(RestConstants.CARTRIDGES, cartridgeId3, RestConstants.CARTRIDGES_NAME);
assertTrue(removedC3);
- boolean removedC4 = restClient.removeEntity(RestConstants.CARTRIDGES, cartridgeId4,
- RestConstants.CARTRIDGES_NAME);
+ boolean removedC4 = restClient
+ .removeEntity(RestConstants.CARTRIDGES, cartridgeId4, RestConstants.CARTRIDGES_NAME);
assertTrue(removedC4);
- boolean removedC5 = restClient.removeEntity(RestConstants.CARTRIDGES, cartridgeId5,
- RestConstants.CARTRIDGES_NAME);
+ boolean removedC5 = restClient
+ .removeEntity(RestConstants.CARTRIDGES, cartridgeId5, RestConstants.CARTRIDGES_NAME);
assertTrue(removedC5);
+ long duration = System.currentTimeMillis() - startTime;
+ log.info(String.format("ApplicationStartupOrderTestCase completed in [duration] %s ms", duration));
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/stratos/blob/a22f27a6/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/ApplicationUpdateTestCase.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/ApplicationUpdateTestCase.java b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/ApplicationUpdateTestCase.java
index 0d2c5f7..fcf2573 100644
--- a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/ApplicationUpdateTestCase.java
+++ b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/ApplicationUpdateTestCase.java
@@ -23,12 +23,10 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.stratos.common.beans.application.ApplicationBean;
import org.apache.stratos.common.beans.cartridge.CartridgeGroupBean;
-import org.apache.stratos.common.beans.policy.deployment.ApplicationPolicyBean;
import org.apache.stratos.integration.common.RestConstants;
import org.apache.stratos.integration.common.TopologyHandler;
import org.apache.stratos.integration.tests.StratosIntegrationTest;
import org.apache.stratos.messaging.domain.application.Application;
-import org.apache.stratos.messaging.domain.application.ApplicationStatus;
import org.apache.stratos.messaging.domain.application.ClusterDataHolder;
import org.apache.stratos.messaging.domain.application.Group;
import org.apache.stratos.messaging.message.receiver.application.ApplicationManager;
@@ -40,7 +38,9 @@ import static junit.framework.Assert.assertTrue;
/**
* Sample application tests with application add, .
*/
+@Test(groups = { "application", "app-update" })
public class ApplicationUpdateTestCase extends StratosIntegrationTest {
+ private TopologyHandler topologyHandler = TopologyHandler.getInstance();
private static final Log log = LogFactory.getLog(ApplicationUpdateTestCase.class);
private static final String RESOURCES_PATH = "/application-update-test";
private static final String autoscalingPolicyId = "autoscaling-policy-application-update-test";
@@ -55,12 +55,13 @@ public class ApplicationUpdateTestCase extends StratosIntegrationTest {
private static final String applicationPolicyId = "application-policy-application-update-test";
private static final String applicationId2 = "g-sc-G123-1-application-update-test-v1";
- @Test(timeOut = APPLICATION_TEST_TIMEOUT, groups = {"stratos.application.deployment"})
+ @Test(timeOut = DEFAULT_APPLICATION_TEST_TIMEOUT)
public void testDeployApplication() throws Exception {
- TopologyHandler topologyHandler = TopologyHandler.getInstance();
+ log.info("Running ApplicationUpdateTestCase.testDeployApplication test method...");
+ long startTime = System.currentTimeMillis();
- boolean addedScalingPolicy = restClient.addEntity(RESOURCES_PATH + RestConstants.AUTOSCALING_POLICIES_PATH
- + "/" + autoscalingPolicyId + ".json",
+ boolean addedScalingPolicy = restClient.addEntity(
+ RESOURCES_PATH + RestConstants.AUTOSCALING_POLICIES_PATH + "/" + autoscalingPolicyId + ".json",
RestConstants.AUTOSCALING_POLICIES, RestConstants.AUTOSCALING_POLICIES_NAME);
assertEquals(addedScalingPolicy, true);
@@ -80,37 +81,34 @@ public class ApplicationUpdateTestCase extends StratosIntegrationTest {
assertEquals(addedC3, true);
boolean addedG1 = restClient.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGE_GROUPS_PATH +
- "/" + cartridgeGroupId + ".json", RestConstants.CARTRIDGE_GROUPS,
- RestConstants.CARTRIDGE_GROUPS_NAME);
+ "/" + cartridgeGroupId + ".json", RestConstants.CARTRIDGE_GROUPS, RestConstants.CARTRIDGE_GROUPS_NAME);
assertEquals(addedG1, true);
CartridgeGroupBean beanG1 = (CartridgeGroupBean) restClient.
- getEntity(RestConstants.CARTRIDGE_GROUPS, cartridgeGroupId,
- CartridgeGroupBean.class, RestConstants.CARTRIDGE_GROUPS_NAME);
+ getEntity(RestConstants.CARTRIDGE_GROUPS, cartridgeGroupId, CartridgeGroupBean.class,
+ RestConstants.CARTRIDGE_GROUPS_NAME);
assertEquals(beanG1.getName(), cartridgeGroupId);
boolean addedN1 = restClient.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
- networkPartitionId1 + ".json",
- RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
+ networkPartitionId1 + ".json", RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
assertEquals(addedN1, true);
boolean addedN2 = restClient.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
- networkPartitionId2 + ".json",
- RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
+ networkPartitionId2 + ".json", RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
assertEquals(addedN2, true);
boolean addedDep = restClient.addEntity(RESOURCES_PATH + RestConstants.DEPLOYMENT_POLICIES_PATH + "/" +
- deploymentPolicyId + ".json",
- RestConstants.DEPLOYMENT_POLICIES, RestConstants.DEPLOYMENT_POLICIES_NAME);
+ deploymentPolicyId + ".json", RestConstants.DEPLOYMENT_POLICIES,
+ RestConstants.DEPLOYMENT_POLICIES_NAME);
assertEquals(addedDep, true);
boolean added = restClient.addEntity(RESOURCES_PATH + RestConstants.APPLICATIONS_PATH + "/" +
- applicationId1 + ".json", RestConstants.APPLICATIONS,
- RestConstants.APPLICATIONS_NAME);
+ applicationId1 + ".json", RestConstants.APPLICATIONS, RestConstants.APPLICATIONS_NAME);
assertEquals(added, true);
- ApplicationBean bean = (ApplicationBean) restClient.getEntity(RestConstants.APPLICATIONS,
- applicationId1, ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
+ ApplicationBean bean = (ApplicationBean) restClient
+ .getEntity(RestConstants.APPLICATIONS, applicationId1, ApplicationBean.class,
+ RestConstants.APPLICATIONS_NAME);
assertEquals(bean.getApplicationId(), applicationId1);
boolean addAppPolicy = restClient.addEntity(RESOURCES_PATH + RestConstants.APPLICATION_POLICIES_PATH + "/" +
@@ -121,12 +119,11 @@ public class ApplicationUpdateTestCase extends StratosIntegrationTest {
//deploy the application
String resourcePath = RestConstants.APPLICATIONS + "/" + applicationId1 +
RestConstants.APPLICATIONS_DEPLOY + "/" + applicationPolicyId;
- boolean deployed = restClient.deployEntity(resourcePath,
- RestConstants.APPLICATIONS_NAME);
+ boolean deployed = restClient.deployEntity(resourcePath, RestConstants.APPLICATIONS_NAME);
assertEquals(deployed, true);
//Application active handling
- topologyHandler.assertApplicationStatus(applicationId1, ApplicationStatus.Active);
+ TopologyHandler.getInstance().assertApplicationActiveStatus(applicationId1);
//Group active handling
topologyHandler.assertGroupActivation(applicationId1);
@@ -136,12 +133,12 @@ public class ApplicationUpdateTestCase extends StratosIntegrationTest {
//Updating application
boolean updated = restClient.updateEntity(RESOURCES_PATH + RestConstants.APPLICATIONS_PATH + "/" +
- applicationId2 + ".json", RestConstants.APPLICATIONS,
- RestConstants.APPLICATIONS_NAME);
+ applicationId2 + ".json", RestConstants.APPLICATIONS, RestConstants.APPLICATIONS_NAME);
assertEquals(updated, true);
- ApplicationBean updatedBean = (ApplicationBean) restClient.getEntity(RestConstants.APPLICATIONS,
- applicationId1, ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
+ ApplicationBean updatedBean = (ApplicationBean) restClient
+ .getEntity(RestConstants.APPLICATIONS, applicationId1, ApplicationBean.class,
+ RestConstants.APPLICATIONS_NAME);
assertEquals(updatedBean.getApplicationId(), applicationId1);
//Need to validate whether the updated taken into the applications Topology
@@ -165,29 +162,27 @@ public class ApplicationUpdateTestCase extends StratosIntegrationTest {
topologyHandler.assertClusterMinMemberCount(bean.getApplicationId(), 2);
- boolean removedGroup = restClient.removeEntity(RestConstants.CARTRIDGE_GROUPS, cartridgeGroupId,
- RestConstants.CARTRIDGE_GROUPS_NAME);
+ boolean removedGroup = restClient
+ .removeEntity(RestConstants.CARTRIDGE_GROUPS, cartridgeGroupId, RestConstants.CARTRIDGE_GROUPS_NAME);
assertEquals(removedGroup, false);
- boolean removedAuto = restClient.removeEntity(RestConstants.AUTOSCALING_POLICIES,
- autoscalingPolicyId, RestConstants.AUTOSCALING_POLICIES_NAME);
+ boolean removedAuto = restClient.removeEntity(RestConstants.AUTOSCALING_POLICIES, autoscalingPolicyId,
+ RestConstants.AUTOSCALING_POLICIES_NAME);
assertEquals(removedAuto, false);
- boolean removedNet = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS,
- networkPartitionId1,
+ boolean removedNet = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS, networkPartitionId1,
RestConstants.NETWORK_PARTITIONS_NAME);
assertEquals(removedNet, false);
- boolean removedDep = restClient.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
- deploymentPolicyId, RestConstants.DEPLOYMENT_POLICIES_NAME);
+ boolean removedDep = restClient.removeEntity(RestConstants.DEPLOYMENT_POLICIES, deploymentPolicyId,
+ RestConstants.DEPLOYMENT_POLICIES_NAME);
assertEquals(removedDep, false);
//Un-deploying the application
String resourcePathUndeploy = RestConstants.APPLICATIONS + "/" + applicationId1 +
RestConstants.APPLICATIONS_UNDEPLOY;
- boolean unDeployed = restClient.undeployEntity(resourcePathUndeploy,
- RestConstants.APPLICATIONS_NAME);
+ boolean unDeployed = restClient.undeployEntity(resourcePathUndeploy, RestConstants.APPLICATIONS_NAME);
assertEquals(unDeployed, true);
boolean undeploy = topologyHandler.assertApplicationUndeploy(applicationId1);
@@ -198,63 +193,65 @@ public class ApplicationUpdateTestCase extends StratosIntegrationTest {
restClient.undeployEntity(RestConstants.APPLICATIONS + "/" + applicationId1 +
RestConstants.APPLICATIONS_UNDEPLOY + "?force=true", RestConstants.APPLICATIONS);
- boolean forceUndeployed =
- topologyHandler.assertApplicationUndeploy(applicationId1);
- assertTrue(String.format("Forceful undeployment failed for the application %s",
- applicationId1), forceUndeployed);
+ boolean forceUndeployed = topologyHandler.assertApplicationUndeploy(applicationId1);
+ assertTrue(String.format("Forceful undeployment failed for the application %s", applicationId1),
+ forceUndeployed);
}
- boolean removed = restClient.removeEntity(RestConstants.APPLICATIONS, applicationId1,
- RestConstants.APPLICATIONS_NAME);
+ boolean removed = restClient
+ .removeEntity(RestConstants.APPLICATIONS, applicationId1, RestConstants.APPLICATIONS_NAME);
assertEquals(removed, true);
- ApplicationBean beanRemoved = (ApplicationBean) restClient.getEntity(RestConstants.APPLICATIONS,
- applicationId1, ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
+ ApplicationBean beanRemoved = (ApplicationBean) restClient
+ .getEntity(RestConstants.APPLICATIONS, applicationId1, ApplicationBean.class,
+ RestConstants.APPLICATIONS_NAME);
assertEquals(beanRemoved, null);
- removedGroup = restClient.removeEntity(RestConstants.CARTRIDGE_GROUPS, cartridgeGroupId,
- RestConstants.CARTRIDGE_GROUPS_NAME);
+ removedGroup = restClient
+ .removeEntity(RestConstants.CARTRIDGE_GROUPS, cartridgeGroupId, RestConstants.CARTRIDGE_GROUPS_NAME);
assertEquals(removedGroup, true);
- boolean removedC1 = restClient.removeEntity(RestConstants.CARTRIDGES, cartridgeId1,
- RestConstants.CARTRIDGES_NAME);
+ boolean removedC1 = restClient
+ .removeEntity(RestConstants.CARTRIDGES, cartridgeId1, RestConstants.CARTRIDGES_NAME);
assertEquals(removedC1, true);
- boolean removedC2 = restClient.removeEntity(RestConstants.CARTRIDGES, cartridgeId2,
- RestConstants.CARTRIDGES_NAME);
+ boolean removedC2 = restClient
+ .removeEntity(RestConstants.CARTRIDGES, cartridgeId2, RestConstants.CARTRIDGES_NAME);
assertEquals(removedC2, true);
- boolean removedC3 = restClient.removeEntity(RestConstants.CARTRIDGES, cartridgeId3,
- RestConstants.CARTRIDGES_NAME);
+ boolean removedC3 = restClient
+ .removeEntity(RestConstants.CARTRIDGES, cartridgeId3, RestConstants.CARTRIDGES_NAME);
assertEquals(removedC3, true);
- removedAuto = restClient.removeEntity(RestConstants.AUTOSCALING_POLICIES,
- autoscalingPolicyId, RestConstants.AUTOSCALING_POLICIES_NAME);
+ removedAuto = restClient.removeEntity(RestConstants.AUTOSCALING_POLICIES, autoscalingPolicyId,
+ RestConstants.AUTOSCALING_POLICIES_NAME);
assertEquals(removedAuto, true);
- removedDep = restClient.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
- deploymentPolicyId, RestConstants.DEPLOYMENT_POLICIES_NAME);
+ removedDep = restClient.removeEntity(RestConstants.DEPLOYMENT_POLICIES, deploymentPolicyId,
+ RestConstants.DEPLOYMENT_POLICIES_NAME);
assertEquals(removedDep, true);
- removedNet = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS,
- networkPartitionId1, RestConstants.NETWORK_PARTITIONS_NAME);
+ removedNet = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS, networkPartitionId1,
+ RestConstants.NETWORK_PARTITIONS_NAME);
assertEquals(removedNet, false);
- boolean removedN2 = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS,
- networkPartitionId2, RestConstants.NETWORK_PARTITIONS_NAME);
+ boolean removedN2 = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS, networkPartitionId2,
+ RestConstants.NETWORK_PARTITIONS_NAME);
assertEquals(removedN2, false);
- boolean removeAppPolicy = restClient.removeEntity(RestConstants.APPLICATION_POLICIES,
- applicationPolicyId, RestConstants.APPLICATION_POLICIES_NAME);
+ boolean removeAppPolicy = restClient.removeEntity(RestConstants.APPLICATION_POLICIES, applicationPolicyId,
+ RestConstants.APPLICATION_POLICIES_NAME);
assertEquals(removeAppPolicy, true);
- removedNet = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS,
- networkPartitionId1, RestConstants.NETWORK_PARTITIONS_NAME);
+ removedNet = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS, networkPartitionId1,
+ RestConstants.NETWORK_PARTITIONS_NAME);
assertEquals(removedNet, true);
- removedN2 = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS,
- networkPartitionId2, RestConstants.NETWORK_PARTITIONS_NAME);
+ removedN2 = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS, networkPartitionId2,
+ RestConstants.NETWORK_PARTITIONS_NAME);
assertEquals(removedN2, true);
+ long duration = System.currentTimeMillis() - startTime;
+ log.info(String.format("ApplicationBurstingTestCase completed in [duration] %s ms", duration));
}
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/a22f27a6/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/GroupStartupOrderTestCase.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/GroupStartupOrderTestCase.java b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/GroupStartupOrderTestCase.java
index 4c7384c..5425339 100644
--- a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/GroupStartupOrderTestCase.java
+++ b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/application/GroupStartupOrderTestCase.java
@@ -24,21 +24,21 @@ import org.apache.stratos.common.beans.application.ApplicationBean;
import org.apache.stratos.integration.common.RestConstants;
import org.apache.stratos.integration.common.TopologyHandler;
import org.apache.stratos.integration.tests.StratosIntegrationTest;
-import org.apache.stratos.messaging.domain.application.ApplicationStatus;
import org.testng.annotations.Test;
import java.util.Map;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertNull;
-import static org.testng.AssertJUnit.assertFalse;
import static org.testng.AssertJUnit.assertTrue;
/**
* Handling the startup order of the group
*/
+@Test(groups = { "application" })
public class GroupStartupOrderTestCase extends StratosIntegrationTest {
private static final Log log = LogFactory.getLog(GroupStartupOrderTestCase.class);
+ private TopologyHandler topologyHandler = TopologyHandler.getInstance();
private static final String RESOURCES_PATH = "/group-startup-order-test";
private static final String autoscalingPolicyId = "autoscaling-policy-group-startup-order-test";
private static final String esbCartridgeId = "esb-group-startup-order-test";
@@ -54,81 +54,78 @@ public class GroupStartupOrderTestCase extends StratosIntegrationTest {
private static final String deploymentPolicyId = "deployment-policy-group-startup-order-test";
private static final String applicationPolicyId = "application-policy-group-startup-order-test";
private static final String applicationId = "group-startup-order-test";
- private static final int GROUP_ACTIVE_TIMEOUT = 300000;
- private static final int NODES_START_PARALLEL_TIMEOUT = 30000;
+ private static final int GROUP_ACTIVE_TIMEOUT = 500000;
+ private static final int NODES_START_PARALLEL_TIMEOUT = 500000;
-
- @Test(timeOut = APPLICATION_TEST_TIMEOUT, groups = {"stratos.application.deployment"})
+ @Test(timeOut = DEFAULT_APPLICATION_TEST_TIMEOUT)
public void testTerminationBehavior() throws Exception {
+ log.info("Running GroupStartupOrderTestCase.testTerminationBehavior test method...");
+ long startTime = System.currentTimeMillis();
- TopologyHandler topologyHandler = TopologyHandler.getInstance();
- boolean addedScalingPolicy = restClient.addEntity(RESOURCES_PATH + RestConstants.AUTOSCALING_POLICIES_PATH
- + "/" + autoscalingPolicyId + ".json",
+ boolean addedScalingPolicy = restClient.addEntity(
+ RESOURCES_PATH + RestConstants.AUTOSCALING_POLICIES_PATH + "/" + autoscalingPolicyId + ".json",
RestConstants.AUTOSCALING_POLICIES, RestConstants.AUTOSCALING_POLICIES_NAME);
assertTrue(addedScalingPolicy);
- boolean addedC1 = restClient.addEntity(
- RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + esbCartridgeId + ".json",
- RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+ boolean addedC1 = restClient
+ .addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + esbCartridgeId + ".json",
+ RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
assertTrue(addedC1);
- boolean addedC2 = restClient.addEntity(
- RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + phpCartridgeId + ".json",
- RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+ boolean addedC2 = restClient
+ .addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + phpCartridgeId + ".json",
+ RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
assertTrue(addedC2);
- boolean addedC3 = restClient.addEntity(
- RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + stratosLbCartridgeId + ".json",
- RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+ boolean addedC3 = restClient
+ .addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + stratosLbCartridgeId + ".json",
+ RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
assertTrue(addedC3);
- boolean addedC5 = restClient.addEntity(
- RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + tomcat1CartridgeId + ".json",
- RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+ boolean addedC5 = restClient
+ .addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + tomcat1CartridgeId + ".json",
+ RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
assertTrue(addedC5);
- boolean addedC6 = restClient.addEntity(
- RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + tomcat2CartridgeId + ".json",
- RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+ boolean addedC6 = restClient
+ .addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + tomcat2CartridgeId + ".json",
+ RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
assertTrue(addedC6);
- boolean addedC7 = restClient.addEntity(
- RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + tomcat3CartridgeId + ".json",
- RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+ boolean addedC7 = restClient
+ .addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + tomcat3CartridgeId + ".json",
+ RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
assertTrue(addedC7);
- boolean addedC8 = restClient.addEntity(
- RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + tomcatCartridgeId + ".json",
- RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+ boolean addedC8 = restClient
+ .addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + tomcatCartridgeId + ".json",
+ RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
assertTrue(addedC8);
boolean addedG2 = restClient.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGE_GROUPS_PATH +
- "/" + cartridgeGroupId1 + ".json", RestConstants.CARTRIDGE_GROUPS,
- RestConstants.CARTRIDGE_GROUPS_NAME);
+ "/" + cartridgeGroupId1 + ".json", RestConstants.CARTRIDGE_GROUPS, RestConstants.CARTRIDGE_GROUPS_NAME);
assertTrue(addedG2);
boolean addedG3 = restClient.addEntity(RESOURCES_PATH + RestConstants.CARTRIDGE_GROUPS_PATH +
- "/" + cartridgeGroupId2 + ".json", RestConstants.CARTRIDGE_GROUPS,
- RestConstants.CARTRIDGE_GROUPS_NAME);
+ "/" + cartridgeGroupId2 + ".json", RestConstants.CARTRIDGE_GROUPS, RestConstants.CARTRIDGE_GROUPS_NAME);
assertTrue(addedG3);
boolean addedN1 = restClient.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
- networkPartitionId1 + ".json",
- RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
+ networkPartitionId1 + ".json", RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
assertTrue(addedN1);
boolean addedDep = restClient.addEntity(RESOURCES_PATH + RestConstants.DEPLOYMENT_POLICIES_PATH + "/" +
- deploymentPolicyId + ".json",
- RestConstants.DEPLOYMENT_POLICIES, RestConstants.DEPLOYMENT_POLICIES_NAME);
+ deploymentPolicyId + ".json", RestConstants.DEPLOYMENT_POLICIES,
+ RestConstants.DEPLOYMENT_POLICIES_NAME);
assertTrue(addedDep);
boolean added = restClient.addEntity(RESOURCES_PATH + RestConstants.APPLICATIONS_PATH + "/" +
- applicationId + ".json", RestConstants.APPLICATIONS,
- RestConstants.APPLICATIONS_NAME);
+ applicationId + ".json", RestConstants.APPLICATIONS, RestConstants.APPLICATIONS_NAME);
assertTrue(added);
- ApplicationBean bean = (ApplicationBean) restClient.getEntity(RestConstants.APPLICATIONS,
- applicationId, ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
+ ApplicationBean bean = (ApplicationBean) restClient
+ .getEntity(RestConstants.APPLICATIONS, applicationId, ApplicationBean.class,
+ RestConstants.APPLICATIONS_NAME);
assertEquals(bean.getApplicationId(), applicationId);
boolean addAppPolicy = restClient.addEntity(RESOURCES_PATH + RestConstants.APPLICATION_POLICIES_PATH + "/" +
@@ -139,23 +136,20 @@ public class GroupStartupOrderTestCase extends StratosIntegrationTest {
//deploy the application
String resourcePath = RestConstants.APPLICATIONS + "/" + applicationId +
RestConstants.APPLICATIONS_DEPLOY + "/" + applicationPolicyId;
- boolean deployed = restClient.deployEntity(resourcePath,
- RestConstants.APPLICATIONS_NAME);
+ boolean deployed = restClient.deployEntity(resourcePath, RestConstants.APPLICATIONS_NAME);
assertTrue(deployed);
- String group6 = topologyHandler.generateId(bean.getApplicationId(),
- "my-group6-group-startup-order-test", bean.getApplicationId() + "-1");
+ String group6 = topologyHandler.generateId(bean.getApplicationId(), "my-group6-group-startup-order-test",
+ bean.getApplicationId() + "-1");
- String group8 = topologyHandler.generateId(bean.getApplicationId(),
- "my-group8-group-startup-order-test", bean.getApplicationId() + "-1");
+ String group8 = topologyHandler.generateId(bean.getApplicationId(), "my-group8-group-startup-order-test",
+ bean.getApplicationId() + "-1");
String lb = topologyHandler.
- getClusterIdFromAlias(bean.getApplicationId(),
- "my-stratos-lb-group-startup-order-test");
+ getClusterIdFromAlias(bean.getApplicationId(), "my-stratos-lb-group-startup-order-test");
String tomcat = topologyHandler.
- getClusterIdFromAlias(bean.getApplicationId(),
- "my-tomcat-group-startup-order-test");
+ getClusterIdFromAlias(bean.getApplicationId(), "my-tomcat-group-startup-order-test");
assertCreationOfNodes(lb, tomcat);
@@ -165,47 +159,41 @@ public class GroupStartupOrderTestCase extends StratosIntegrationTest {
assertCreationOfNodes(tomcat, group8);
- String group7 = topologyHandler.generateId(bean.getApplicationId(),
- "my-group7-group-startup-order-test", bean.getApplicationId() + "-1");
+ String group7 = topologyHandler.generateId(bean.getApplicationId(), "my-group7-group-startup-order-test",
+ bean.getApplicationId() + "-1");
- String groupTom2 = topologyHandler.generateId(bean.getApplicationId(),
- "my-group6-group-tom2-group-startup-order-test", bean.getApplicationId() + "-1");
+ String groupTom2 = topologyHandler
+ .generateId(bean.getApplicationId(), "my-group6-group-tom2-group-startup-order-test",
+ bean.getApplicationId() + "-1");
assertCreationOfNodesInParallel(group7, groupTom2);
String group7Tomcat = topologyHandler.
- getClusterIdFromAlias(bean.getApplicationId(),
- "my-group7-tomcat-group-startup-order-test");
+ getClusterIdFromAlias(bean.getApplicationId(), "my-group7-tomcat-group-startup-order-test");
String group7Tomcat1 = topologyHandler.
- getClusterIdFromAlias(bean.getApplicationId(),
- "my-group7-tomcat1-group-startup-order-test");
+ getClusterIdFromAlias(bean.getApplicationId(), "my-group7-tomcat1-group-startup-order-test");
assertCreationOfNodes(group7Tomcat, group7Tomcat1);
String groupTom2Tomcat2 = topologyHandler.
- getClusterIdFromAlias(bean.getApplicationId(),
- "my-group-tom2-tomcat2-group-startup-order-test");
+ getClusterIdFromAlias(bean.getApplicationId(), "my-group-tom2-tomcat2-group-startup-order-test");
String groupTom2Tomcat3 = topologyHandler.
- getClusterIdFromAlias(bean.getApplicationId(),
- "my-group-tom2-tomcat3-group-startup-order-test");
+ getClusterIdFromAlias(bean.getApplicationId(), "my-group-tom2-tomcat3-group-startup-order-test");
assertCreationOfNodes(groupTom2Tomcat2, groupTom2Tomcat3);
String group8Tomcat2 = topologyHandler.
- getClusterIdFromAlias(bean.getApplicationId(),
- "my-tomcat2-group8-group-startup-order-test");
+ getClusterIdFromAlias(bean.getApplicationId(), "my-tomcat2-group8-group-startup-order-test");
String group8Tomcat = topologyHandler.
- getClusterIdFromAlias(bean.getApplicationId(),
- "my-tomcat-group8-group-startup-order-test");
+ getClusterIdFromAlias(bean.getApplicationId(), "my-tomcat-group8-group-startup-order-test");
assertCreationOfNodesInParallel(group8Tomcat2, group8Tomcat);
//Application active handling
- topologyHandler.assertApplicationStatus(bean.getApplicationId(),
- ApplicationStatus.Active);
+ TopologyHandler.getInstance().assertApplicationActiveStatus(bean.getApplicationId());
//Group active handling
topologyHandler.assertGroupActivation(bean.getApplicationId());
@@ -213,36 +201,11 @@ public class GroupStartupOrderTestCase extends StratosIntegrationTest {
//Cluster active handling
topologyHandler.assertClusterActivation(bean.getApplicationId());
- boolean removedGroup = restClient.removeEntity(RestConstants.CARTRIDGE_GROUPS,
- cartridgeGroupId1,
- RestConstants.CARTRIDGE_GROUPS_NAME);
- assertFalse(removedGroup);
-
- removedGroup = restClient.removeEntity(RestConstants.CARTRIDGE_GROUPS,
- cartridgeGroupId2,
- RestConstants.CARTRIDGE_GROUPS_NAME);
- assertFalse(removedGroup);
-
- boolean removedAuto = restClient.removeEntity(RestConstants.AUTOSCALING_POLICIES,
- autoscalingPolicyId, RestConstants.AUTOSCALING_POLICIES_NAME);
- assertFalse(removedAuto);
-
- boolean removedNet = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS,
- networkPartitionId1,
- RestConstants.NETWORK_PARTITIONS_NAME);
- //Trying to remove the used network partition
- assertFalse(removedNet);
-
- boolean removedDep = restClient.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
- deploymentPolicyId, RestConstants.DEPLOYMENT_POLICIES_NAME);
- assertFalse(removedDep);
-
//Un-deploying the application
String resourcePathUndeploy = RestConstants.APPLICATIONS + "/" + applicationId +
RestConstants.APPLICATIONS_UNDEPLOY;
- boolean unDeployed = restClient.undeployEntity(resourcePathUndeploy,
- RestConstants.APPLICATIONS_NAME);
+ boolean unDeployed = restClient.undeployEntity(resourcePathUndeploy, RestConstants.APPLICATIONS_NAME);
assertTrue(unDeployed);
boolean undeploy = topologyHandler.assertApplicationUndeploy(applicationId);
@@ -254,66 +217,65 @@ public class GroupStartupOrderTestCase extends StratosIntegrationTest {
RestConstants.APPLICATIONS_UNDEPLOY + "?force=true", RestConstants.APPLICATIONS);
boolean forceUndeployed = topologyHandler.assertApplicationUndeploy(applicationId);
- assertTrue(String.format("Forceful undeployment failed for the application %s",
- applicationId), forceUndeployed);
+ assertTrue(String.format("Forceful undeployment failed for the application %s", applicationId),
+ forceUndeployed);
}
- boolean removed = restClient.removeEntity(RestConstants.APPLICATIONS, applicationId,
- RestConstants.APPLICATIONS_NAME);
+ boolean removed = restClient
+ .removeEntity(RestConstants.APPLICATIONS, applicationId, RestConstants.APPLICATIONS_NAME);
assertTrue(removed);
- ApplicationBean beanRemoved = (ApplicationBean) restClient.getEntity(RestConstants.APPLICATIONS,
- applicationId, ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
+ ApplicationBean beanRemoved = (ApplicationBean) restClient
+ .getEntity(RestConstants.APPLICATIONS, applicationId, ApplicationBean.class,
+ RestConstants.APPLICATIONS_NAME);
assertNull(beanRemoved);
- removedGroup = restClient.removeEntity(RestConstants.CARTRIDGE_GROUPS,
- cartridgeGroupId1, RestConstants.CARTRIDGE_GROUPS_NAME);
+ boolean removedGroup = restClient
+ .removeEntity(RestConstants.CARTRIDGE_GROUPS, cartridgeGroupId1, RestConstants.CARTRIDGE_GROUPS_NAME);
assertTrue(removedGroup);
- removedGroup = restClient.removeEntity(RestConstants.CARTRIDGE_GROUPS,
- cartridgeGroupId2, RestConstants.CARTRIDGE_GROUPS_NAME);
+ removedGroup = restClient
+ .removeEntity(RestConstants.CARTRIDGE_GROUPS, cartridgeGroupId2, RestConstants.CARTRIDGE_GROUPS_NAME);
assertTrue(removedGroup);
- boolean removedC1 = restClient.removeEntity(RestConstants.CARTRIDGES, stratosLbCartridgeId,
- RestConstants.CARTRIDGES_NAME);
+ boolean removedC1 = restClient
+ .removeEntity(RestConstants.CARTRIDGES, stratosLbCartridgeId, RestConstants.CARTRIDGES_NAME);
assertTrue(removedC1);
- boolean removedC2 = restClient.removeEntity(RestConstants.CARTRIDGES,tomcatCartridgeId,
- RestConstants.CARTRIDGES_NAME);
+ boolean removedC2 = restClient
+ .removeEntity(RestConstants.CARTRIDGES, tomcatCartridgeId, RestConstants.CARTRIDGES_NAME);
assertTrue(removedC2);
- boolean removedC3 = restClient.removeEntity(RestConstants.CARTRIDGES, tomcat1CartridgeId,
- RestConstants.CARTRIDGES_NAME);
+ boolean removedC3 = restClient
+ .removeEntity(RestConstants.CARTRIDGES, tomcat1CartridgeId, RestConstants.CARTRIDGES_NAME);
assertTrue(removedC3);
- boolean removedC4 = restClient.removeEntity(RestConstants.CARTRIDGES, tomcat2CartridgeId,
- RestConstants.CARTRIDGES_NAME);
+ boolean removedC4 = restClient
+ .removeEntity(RestConstants.CARTRIDGES, tomcat2CartridgeId, RestConstants.CARTRIDGES_NAME);
assertTrue(removedC4);
- boolean removedC5 = restClient.removeEntity(RestConstants.CARTRIDGES, tomcat3CartridgeId,
- RestConstants.CARTRIDGES_NAME);
+ boolean removedC5 = restClient
+ .removeEntity(RestConstants.CARTRIDGES, tomcat3CartridgeId, RestConstants.CARTRIDGES_NAME);
assertTrue(removedC5);
- removedAuto = restClient.removeEntity(RestConstants.AUTOSCALING_POLICIES,
- autoscalingPolicyId, RestConstants.AUTOSCALING_POLICIES_NAME);
+ boolean removedAuto = restClient.removeEntity(RestConstants.AUTOSCALING_POLICIES, autoscalingPolicyId,
+ RestConstants.AUTOSCALING_POLICIES_NAME);
assertTrue(removedAuto);
- removedDep = restClient.removeEntity(RestConstants.DEPLOYMENT_POLICIES,
- deploymentPolicyId, RestConstants.DEPLOYMENT_POLICIES_NAME);
+ boolean removedDep = restClient.removeEntity(RestConstants.DEPLOYMENT_POLICIES, deploymentPolicyId,
+ RestConstants.DEPLOYMENT_POLICIES_NAME);
assertTrue(removedDep);
- removedNet = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS,
- networkPartitionId1, RestConstants.NETWORK_PARTITIONS_NAME);
- assertFalse(removedNet);
-
- boolean removeAppPolicy = restClient.removeEntity(RestConstants.APPLICATION_POLICIES,
- applicationPolicyId, RestConstants.APPLICATION_POLICIES_NAME);
+ boolean removeAppPolicy = restClient.removeEntity(RestConstants.APPLICATION_POLICIES, applicationPolicyId,
+ RestConstants.APPLICATION_POLICIES_NAME);
assertTrue(removeAppPolicy);
- removedNet = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS,
- networkPartitionId1, RestConstants.NETWORK_PARTITIONS_NAME);
+ boolean removedNet = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS, networkPartitionId1,
+ RestConstants.NETWORK_PARTITIONS_NAME);
assertTrue(removedNet);
+ long duration = System.currentTimeMillis() - startTime;
+ log.info(String.format("GroupStartupOrderTestCase completed in [duration] %s ms", duration));
}
private void assertCreationOfNodes(String firstNodeId, String secondNodeId) {
@@ -325,8 +287,7 @@ public class GroupStartupOrderTestCase extends StratosIntegrationTest {
while (!activeMembers.containsKey(firstNodeId)) {
try {
Thread.sleep(1000);
- }
- catch (InterruptedException ignored) {
+ } catch (InterruptedException ignored) {
}
activeMembers = TopologyHandler.getInstance().getActivateddMembers();
if ((System.currentTimeMillis() - startTime) > GROUP_ACTIVE_TIMEOUT) {
@@ -338,8 +299,7 @@ public class GroupStartupOrderTestCase extends StratosIntegrationTest {
while (!createdMembers.containsKey(secondNodeId)) {
try {
Thread.sleep(1000);
- }
- catch (InterruptedException ignore) {
+ } catch (InterruptedException ignore) {
}
createdMembers = TopologyHandler.getInstance().getCreatedMembers();
if ((System.currentTimeMillis() - startTime) > GROUP_ACTIVE_TIMEOUT) {
@@ -361,8 +321,7 @@ public class GroupStartupOrderTestCase extends StratosIntegrationTest {
while (!(createdMembers.containsKey(firstNodeId) && createdMembers.containsKey(firstNodeId))) {
try {
Thread.sleep(1000);
- }
- catch (InterruptedException ignored) {
+ } catch (InterruptedException ignored) {
}
createdMembers = TopologyHandler.getInstance().getCreatedMembers();
if ((System.currentTimeMillis() - startTime) > NODES_START_PARALLEL_TIMEOUT) {
@@ -372,4 +331,4 @@ public class GroupStartupOrderTestCase extends StratosIntegrationTest {
assertTrue(createdMembers.containsKey(firstNodeId));
assertTrue(createdMembers.containsKey(firstNodeId));
}
-}
\ No newline at end of file
+}
[34/50] [abbrv] stratos git commit: Adding
ThriftStatisticsPublisherTest and updating ThriftStatisticsPublisher and
ThiriftClientConfigParserTest
Posted by ga...@apache.org.
Adding ThriftStatisticsPublisherTest and updating ThriftStatisticsPublisher and ThiriftClientConfigParserTest
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/649b5b81
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/649b5b81
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/649b5b81
Branch: refs/heads/release-4.1.5
Commit: 649b5b81b52d8dc64adc00c922fbed6b18462df9
Parents: a3ed54b
Author: Thanuja <th...@wso2.com>
Authored: Mon Nov 30 16:12:45 2015 +0530
Committer: gayangunarathne <ga...@wso2.com>
Committed: Mon Dec 7 10:16:28 2015 +0000
----------------------------------------------------------------------
.../publisher/ThriftStatisticsPublisher.java | 20 +++---
.../test/ThriftClientConfigParserTest.java | 73 +++++++++++---------
.../test/ThriftStatisticsPublisherTest.java | 60 ++++++++++++++++
.../src/test/resources/thrift-client-config.xml | 53 ++++++++------
4 files changed, 142 insertions(+), 64 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/649b5b81/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/statistics/publisher/ThriftStatisticsPublisher.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/statistics/publisher/ThriftStatisticsPublisher.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/statistics/publisher/ThriftStatisticsPublisher.java
index c26c6d3..bf0db61 100644
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/statistics/publisher/ThriftStatisticsPublisher.java
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/statistics/publisher/ThriftStatisticsPublisher.java
@@ -43,6 +43,8 @@ public class ThriftStatisticsPublisher implements StatisticsPublisher {
private LoadBalancingDataPublisher loadBalancingDataPublisher;
private List<ThriftClientInfo> thriftClientInfoList;
private boolean enabled = false;
+ private ArrayList<ReceiverGroup> receiverGroups;
+ private ArrayList<DataPublisherHolder> dataPublisherHolders;
/**
* Credential information stored inside thrift-client-config.xml file
@@ -58,6 +60,8 @@ public class ThriftStatisticsPublisher implements StatisticsPublisher {
if (isPublisherEnabled()) {
this.enabled = true;
+ receiverGroups = new ArrayList<ReceiverGroup>();
+ dataPublisherHolders = new ArrayList<DataPublisherHolder>();
init();
}
}
@@ -82,23 +86,17 @@ public class ThriftStatisticsPublisher implements StatisticsPublisher {
private ArrayList<ReceiverGroup> getReceiverGroups() {
- ArrayList<ReceiverGroup> receiverGroups = new ArrayList<ReceiverGroup>();
- ArrayList<DataPublisherHolder> dataPublisherHolders = new ArrayList<DataPublisherHolder>();
- DataPublisherHolder aNode;
-
for (ThriftClientInfo thriftClientInfo : thriftClientInfoList) {
if (thriftClientInfo.isStatsPublisherEnabled()) {
- aNode = new DataPublisherHolder(null, buildUrl(thriftClientInfo), thriftClientInfo.getUsername(),
- thriftClientInfo.getPassword());
- dataPublisherHolders.add(aNode);
+ dataPublisherHolders.add(new DataPublisherHolder(null, buildUrl(thriftClientInfo), thriftClientInfo.getUsername(),
+ thriftClientInfo.getPassword()));
if (log.isDebugEnabled()) {
log.debug(String.format("Thrift client [id] %s [ip] %s [port] %s is added to data publisher holder",
thriftClientInfo.getId(), thriftClientInfo.getIp(), thriftClientInfo.getPort()));
}
}
}
- ReceiverGroup group = new ReceiverGroup(dataPublisherHolders);
- receiverGroups.add(group);
+ receiverGroups.add(new ReceiverGroup(dataPublisherHolders));
return receiverGroups;
}
@@ -107,6 +105,10 @@ public class ThriftStatisticsPublisher implements StatisticsPublisher {
return String.format("tcp://%s:%s", thriftClientInfo.getIp(), thriftClientInfo.getPort());
}
+ public ArrayList<DataPublisherHolder> getDataPublisherHolders() {
+ return dataPublisherHolders;
+ }
+
@Override
public void setEnabled(boolean enabled) {
this.enabled = enabled;
http://git-wip-us.apache.org/repos/asf/stratos/blob/649b5b81/components/org.apache.stratos.common/src/test/java/org/apache/stratos/common/test/ThriftClientConfigParserTest.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/test/java/org/apache/stratos/common/test/ThriftClientConfigParserTest.java b/components/org.apache.stratos.common/src/test/java/org/apache/stratos/common/test/ThriftClientConfigParserTest.java
index ae7e059..26cba9f 100644
--- a/components/org.apache.stratos.common/src/test/java/org/apache/stratos/common/test/ThriftClientConfigParserTest.java
+++ b/components/org.apache.stratos.common/src/test/java/org/apache/stratos/common/test/ThriftClientConfigParserTest.java
@@ -20,7 +20,6 @@
package org.apache.stratos.common.test;
import junit.framework.TestCase;
-
import org.apache.stratos.common.statistics.publisher.ThriftClientConfig;
import org.apache.stratos.common.statistics.publisher.ThriftClientInfo;
import org.junit.Test;
@@ -44,48 +43,58 @@ public class ThriftClientConfigParserTest extends TestCase {
URL configFileUrl = ThriftClientConfigParserTest.class.getResource("/thrift-client-config.xml");
System.setProperty(ThriftClientConfig.THRIFT_CLIENT_CONFIG_FILE_PATH, configFileUrl.getPath());
ThriftClientConfig thriftClientConfig = ThriftClientConfig.getInstance();
- List <ThriftClientInfo> cepList = thriftClientConfig.getThriftClientInfo(
+ List<ThriftClientInfo> cepList = thriftClientConfig.getThriftClientInfo(
ThriftClientConfig.CEP_THRIFT_CLIENT_NAME);
- List <ThriftClientInfo> dasList = thriftClientConfig.getThriftClientInfo(
+ List<ThriftClientInfo> dasList = thriftClientConfig.getThriftClientInfo(
ThriftClientConfig.DAS_THRIFT_CLIENT_NAME);
ThriftClientInfo cepNode1 = null;
ThriftClientInfo cepNode2 = null;
ThriftClientInfo dasNode1 = null;
-
+ ThriftClientInfo dasNode2 = null;
+
for (ThriftClientInfo cepNodeInfo : cepList) {
- if(cepNodeInfo.getId().equals("node-01")) {
- cepNode1 = cepNodeInfo;
- }else if(cepNodeInfo.getId().equals("node-02")) {
- cepNode2 = cepNodeInfo;
- }
- }
-
+ if (cepNodeInfo.getId().equals("node-01")) {
+ cepNode1 = cepNodeInfo;
+ } else if (cepNodeInfo.getId().equals("node-02")) {
+ cepNode2 = cepNodeInfo;
+ }
+ }
+
for (ThriftClientInfo dasNodeInfo : dasList) {
- if(dasNodeInfo.getId().equals("node-01")) {
- dasNode1 = dasNodeInfo;
- }
- }
+ if (dasNodeInfo.getId().equals("node-01")) {
+ dasNode1 = dasNodeInfo;
+ } else if (dasNodeInfo.getId().equals("node-02")) {
+ dasNode2 = dasNodeInfo;
+ }
+ }
// CEP-node1
- assertEquals("CEP Stats Publisher not enabled",true,cepNode1.isStatsPublisherEnabled());
- assertEquals("Incorrect Username", "admincep1", cepNode1.getUsername());
- assertEquals("Incorrect Password", "1234cep1", cepNode1.getPassword());
- assertEquals("Incorrect IP", "192.168.10.10", cepNode1.getIp());
- assertEquals("Incorrect Port", "9300", cepNode1.getPort());
-
+ assertEquals("CEP stats publisher is not enabled", true, cepNode1.isStatsPublisherEnabled());
+ assertEquals("Incorrect username", "admincep1", cepNode1.getUsername());
+ assertEquals("Incorrect password", "1234cep1", cepNode1.getPassword());
+ assertEquals("Incorrect ip", "192.168.10.10", cepNode1.getIp());
+ assertEquals("Incorrect port", "9300", cepNode1.getPort());
+
// CEP-node2
- assertEquals("CEP Stats Publisher not enabled",true,cepNode2.isStatsPublisherEnabled());
- assertEquals("Incorrect Username", "admincep2", cepNode2.getUsername());
- assertEquals("Incorrect Password", "1234cep2", cepNode2.getPassword());
- assertEquals("Incorrect IP", "192.168.10.20", cepNode2.getIp());
- assertEquals("Incorrect Port", "9300", cepNode2.getPort());
+ assertEquals("CEP stats publisher is not enabled", true, cepNode2.isStatsPublisherEnabled());
+ assertEquals("Incorrect username", "admincep2", cepNode2.getUsername());
+ assertEquals("Incorrect password", "1234cep2", cepNode2.getPassword());
+ assertEquals("Incorrect ip", "192.168.10.20", cepNode2.getIp());
+ assertEquals("Incorrect port", "9300", cepNode2.getPort());
// DAS node 1
- assertEquals("DAS Stats Publisher not enabled",true, dasNode1.isStatsPublisherEnabled());
- assertEquals("Incorrect Username", "admindas1", dasNode1.getUsername());
- assertEquals("Incorrect Password", "1234das1", dasNode1.getPassword());
- assertEquals("Incorrect IP", "192.168.10.11", dasNode1.getIp());
- assertEquals("Incorrect Port", "9301", dasNode1.getPort());
-
+ assertEquals("DAS stats publisher is not enabled", true, dasNode1.isStatsPublisherEnabled());
+ assertEquals("Incorrect username", "admindas1", dasNode1.getUsername());
+ assertEquals("Incorrect password", "1234das1", dasNode1.getPassword());
+ assertEquals("Incorrect ip", "192.168.10.11", dasNode1.getIp());
+ assertEquals("Incorrect port", "9301", dasNode1.getPort());
+
+ // DAS node 2
+ assertEquals("DAS stats publisher is enabled", false, dasNode2.isStatsPublisherEnabled());
+ assertEquals("Incorrect username", "admindas2", dasNode2.getUsername());
+ assertEquals("Incorrect password", "1234das2", dasNode2.getPassword());
+ assertEquals("Incorrect ip", "192.168.10.21", dasNode2.getIp());
+ assertEquals("Incorrect port", "9301", dasNode2.getPort());
+
}
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/649b5b81/components/org.apache.stratos.common/src/test/java/org/apache/stratos/common/test/ThriftStatisticsPublisherTest.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/test/java/org/apache/stratos/common/test/ThriftStatisticsPublisherTest.java b/components/org.apache.stratos.common/src/test/java/org/apache/stratos/common/test/ThriftStatisticsPublisherTest.java
new file mode 100644
index 0000000..43cd4c1
--- /dev/null
+++ b/components/org.apache.stratos.common/src/test/java/org/apache/stratos/common/test/ThriftStatisticsPublisherTest.java
@@ -0,0 +1,60 @@
+/*
+* 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.common.test;
+
+import org.apache.stratos.common.statistics.publisher.ThriftClientConfig;
+import org.apache.stratos.common.statistics.publisher.ThriftStatisticsPublisher;
+import org.junit.Test;
+import org.wso2.carbon.databridge.commons.StreamDefinition;
+
+import java.net.URL;
+
+import static org.junit.Assert.assertEquals;
+
+/**
+ * ThriftStatisticsPublisherTest
+ */
+public class ThriftStatisticsPublisherTest {
+ /**
+ * Checking whether LoadBalancingDataPublisher is created for cep and das according to thrift-client-config.xml
+ *
+ * @throws Exception
+ */
+ @Test
+ public void createLoadBalancingDataPublisher() throws Exception {
+ URL configFileUrl = ThriftClientConfigParserTest.class.getResource("/thrift-client-config.xml");
+ System.setProperty(ThriftClientConfig.THRIFT_CLIENT_CONFIG_FILE_PATH, configFileUrl.getPath());
+
+ StreamDefinition streamDefinition = new StreamDefinition("Test", "1.0.0");
+
+ ThriftStatisticsPublisher thriftStatisticsPublisher = new ThriftStatisticsPublisher(streamDefinition,
+ ThriftClientConfig.CEP_THRIFT_CLIENT_NAME);
+ assertEquals("CEP stats publisher is not enabled", true, thriftStatisticsPublisher.isEnabled());
+ assertEquals("No of CEP nodes enabled for stats publishing is not equal to two", 2,
+ thriftStatisticsPublisher.getDataPublisherHolders().size());
+
+ thriftStatisticsPublisher = new ThriftStatisticsPublisher(streamDefinition,
+ ThriftClientConfig.DAS_THRIFT_CLIENT_NAME);
+ assertEquals("DAS stats publisher is not enabled", true, thriftStatisticsPublisher.isEnabled());
+ assertEquals("More than one DAS node is enabled for stats publishing", 1,
+ thriftStatisticsPublisher.getDataPublisherHolders().size());
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/stratos/blob/649b5b81/components/org.apache.stratos.common/src/test/resources/thrift-client-config.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/test/resources/thrift-client-config.xml b/components/org.apache.stratos.common/src/test/resources/thrift-client-config.xml
index f828e0d..0d46ae6 100644
--- a/components/org.apache.stratos.common/src/test/resources/thrift-client-config.xml
+++ b/components/org.apache.stratos.common/src/test/resources/thrift-client-config.xml
@@ -20,31 +20,38 @@
<!-- Apache thrift client configuration for publishing statistics to WSO2 CEP and WSO2 DAS -->
<thriftClientConfiguration>
- <config>
+ <config>
<cep>
- <node id="node-01">
- <statsPublisherEnabled>true</statsPublisherEnabled>
- <username>admincep1</username>
- <password>1234cep1</password>
- <ip>192.168.10.10</ip>
- <port>9300</port>
- </node>
- <node id="node-02">
- <statsPublisherEnabled>true</statsPublisherEnabled>
- <username>admincep2</username>
- <password>1234cep2</password>
- <ip>192.168.10.20</ip>
- <port>9300</port>
- </node>
+ <node id="node-01">
+ <statsPublisherEnabled>true</statsPublisherEnabled>
+ <username>admincep1</username>
+ <password>1234cep1</password>
+ <ip>192.168.10.10</ip>
+ <port>9300</port>
+ </node>
+ <node id="node-02">
+ <statsPublisherEnabled>true</statsPublisherEnabled>
+ <username>admincep2</username>
+ <password>1234cep2</password>
+ <ip>192.168.10.20</ip>
+ <port>9300</port>
+ </node>
</cep>
<das>
- <node id="node-01">
- <statsPublisherEnabled>true</statsPublisherEnabled>
- <username>admindas1</username>
- <password>1234das1</password>
- <ip>192.168.10.11</ip>
- <port>9301</port>
- </node>
+ <node id="node-01">
+ <statsPublisherEnabled>true</statsPublisherEnabled>
+ <username>admindas1</username>
+ <password>1234das1</password>
+ <ip>192.168.10.11</ip>
+ <port>9301</port>
+ </node>
+ <node id="node-02">
+ <statsPublisherEnabled>false</statsPublisherEnabled>
+ <username>admindas2</username>
+ <password>1234das2</password>
+ <ip>192.168.10.21</ip>
+ <port>9301</port>
+ </node>
</das>
- </config>
+ </config>
</thriftClientConfiguration>
\ No newline at end of file
[33/50] [abbrv] stratos git commit: Adding setUp() and having
individual test methods for cep and das in ThriftStatisticsPublisherTest
Posted by ga...@apache.org.
Adding setUp() and having individual test methods for cep and das in ThriftStatisticsPublisherTest
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/a6393442
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/a6393442
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/a6393442
Branch: refs/heads/release-4.1.5
Commit: a6393442745f22ede36a44cf2306117eda1f7659
Parents: 649b5b8
Author: Thanuja <th...@wso2.com>
Authored: Mon Nov 30 17:06:50 2015 +0530
Committer: gayangunarathne <ga...@wso2.com>
Committed: Mon Dec 7 10:16:28 2015 +0000
----------------------------------------------------------------------
.../test/ThriftStatisticsPublisherTest.java | 32 +++++++++++++-------
1 file changed, 21 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/a6393442/components/org.apache.stratos.common/src/test/java/org/apache/stratos/common/test/ThriftStatisticsPublisherTest.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/test/java/org/apache/stratos/common/test/ThriftStatisticsPublisherTest.java b/components/org.apache.stratos.common/src/test/java/org/apache/stratos/common/test/ThriftStatisticsPublisherTest.java
index 43cd4c1..c553b1c 100644
--- a/components/org.apache.stratos.common/src/test/java/org/apache/stratos/common/test/ThriftStatisticsPublisherTest.java
+++ b/components/org.apache.stratos.common/src/test/java/org/apache/stratos/common/test/ThriftStatisticsPublisherTest.java
@@ -21,8 +21,10 @@ package org.apache.stratos.common.test;
import org.apache.stratos.common.statistics.publisher.ThriftClientConfig;
import org.apache.stratos.common.statistics.publisher.ThriftStatisticsPublisher;
+import org.junit.Before;
import org.junit.Test;
import org.wso2.carbon.databridge.commons.StreamDefinition;
+import org.wso2.carbon.databridge.commons.exception.MalformedStreamDefinitionException;
import java.net.URL;
@@ -32,29 +34,37 @@ import static org.junit.Assert.assertEquals;
* ThriftStatisticsPublisherTest
*/
public class ThriftStatisticsPublisherTest {
- /**
- * Checking whether LoadBalancingDataPublisher is created for cep and das according to thrift-client-config.xml
- *
- * @throws Exception
- */
- @Test
- public void createLoadBalancingDataPublisher() throws Exception {
+ private StreamDefinition streamDefinition;
+ private ThriftStatisticsPublisher thriftStatisticsPublisher;
+
+ @Before
+ public void setUp() throws MalformedStreamDefinitionException {
URL configFileUrl = ThriftClientConfigParserTest.class.getResource("/thrift-client-config.xml");
System.setProperty(ThriftClientConfig.THRIFT_CLIENT_CONFIG_FILE_PATH, configFileUrl.getPath());
+ streamDefinition = new StreamDefinition("Test", "1.0.0");
+ }
- StreamDefinition streamDefinition = new StreamDefinition("Test", "1.0.0");
-
- ThriftStatisticsPublisher thriftStatisticsPublisher = new ThriftStatisticsPublisher(streamDefinition,
+ /**
+ * Checking whether LoadBalancingDataPublisher is created for cep according to thrift-client-config.xml
+ */
+ @Test
+ public void createCEPLoadBalancingDataPublisher() {
+ thriftStatisticsPublisher = new ThriftStatisticsPublisher(streamDefinition,
ThriftClientConfig.CEP_THRIFT_CLIENT_NAME);
assertEquals("CEP stats publisher is not enabled", true, thriftStatisticsPublisher.isEnabled());
assertEquals("No of CEP nodes enabled for stats publishing is not equal to two", 2,
thriftStatisticsPublisher.getDataPublisherHolders().size());
+ }
+ /**
+ * Checking whether LoadBalancingDataPublisher is created for das according to thrift-client-config.xml
+ */
+ @Test
+ public void createDASLoadBalancingDataPublisher() {
thriftStatisticsPublisher = new ThriftStatisticsPublisher(streamDefinition,
ThriftClientConfig.DAS_THRIFT_CLIENT_NAME);
assertEquals("DAS stats publisher is not enabled", true, thriftStatisticsPublisher.isEnabled());
assertEquals("More than one DAS node is enabled for stats publishing", 1,
thriftStatisticsPublisher.getDataPublisherHolders().size());
-
}
}
[06/50] [abbrv] stratos git commit: Add instance id to log messages
in autoscaler ClusterStatusActiveProcessor
Posted by ga...@apache.org.
Add instance id to log messages in autoscaler ClusterStatusActiveProcessor
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/9540eae4
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/9540eae4
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/9540eae4
Branch: refs/heads/release-4.1.5
Commit: 9540eae4ed82f1a354317b19e902da967b00079e
Parents: 706887a
Author: Akila Perera <ra...@gmail.com>
Authored: Mon Nov 30 00:16:32 2015 +0530
Committer: gayangunarathne <ga...@wso2.com>
Committed: Mon Dec 7 10:16:25 2015 +0000
----------------------------------------------------------------------
.../cluster/ClusterStatusActiveProcessor.java | 22 ++++++++++----------
1 file changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/9540eae4/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/status/processor/cluster/ClusterStatusActiveProcessor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/status/processor/cluster/ClusterStatusActiveProcessor.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/status/processor/cluster/ClusterStatusActiveProcessor.java
index a8521d5..8dd9a8e 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/status/processor/cluster/ClusterStatusActiveProcessor.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/status/processor/cluster/ClusterStatusActiveProcessor.java
@@ -53,8 +53,9 @@ public class ClusterStatusActiveProcessor extends ClusterStatusProcessor {
// ask the next processor to take care of the message.
return nextProcessor.process(type, clusterId, instanceId);
} else {
- log.warn(String.format("No possible state change found for [type] %s [cluster] %s " +
- "[instance] %s", type, clusterId, instanceId));
+ log.warn(
+ String.format("No possible state change found for [type] %s, [cluster] %s, [instance] %s", type,
+ clusterId, instanceId));
}
}
return false;
@@ -64,12 +65,10 @@ public class ClusterStatusActiveProcessor extends ClusterStatusProcessor {
ClusterMonitor monitor = AutoscalerContext.getInstance().
getClusterMonitor(clusterId);
boolean clusterActive = false;
- for (NetworkPartitionContext clusterLevelNetworkPartitionContext :
- monitor.getNetworkPartitionCtxts()) {
+ for (NetworkPartitionContext clusterLevelNetworkPartitionContext : monitor.getNetworkPartitionCtxts()) {
//minimum check per partition
- ClusterInstanceContext instanceContext =
- (ClusterInstanceContext) clusterLevelNetworkPartitionContext.
- getInstanceContext(instanceId);
+ ClusterInstanceContext instanceContext = (ClusterInstanceContext) clusterLevelNetworkPartitionContext.
+ getInstanceContext(instanceId);
if (instanceContext != null) {
if (instanceContext.getActiveMembers() >= instanceContext.getMinInstanceCount()) {
clusterActive = true;
@@ -79,12 +78,13 @@ public class ClusterStatusActiveProcessor extends ClusterStatusProcessor {
}
if (clusterActive) {
if (log.isInfoEnabled()) {
- log.info("Publishing cluster activated event for [application]: "
- + monitor.getAppId() + " [cluster]: " + clusterId);
+ log.info(String.format("Publishing cluster activated event for [application-id] %s, [cluster-id] %s, "
+ + "[cluster-instance-id] %s", monitor.getAppId(), clusterId, instanceId));
}
//TODO service call
- ClusterStatusEventPublisher.sendClusterActivatedEvent(monitor.getAppId(),
- monitor.getServiceId(), monitor.getClusterId(), instanceId);
+ ClusterStatusEventPublisher
+ .sendClusterActivatedEvent(monitor.getAppId(), monitor.getServiceId(), monitor.getClusterId(),
+ instanceId);
}
return clusterActive;
}
[27/50] [abbrv] stratos git commit: Updating scaling_decision
nickname and description
Posted by ga...@apache.org.
Updating scaling_decision nickname and description
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/beae56f7
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/beae56f7
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/beae56f7
Branch: refs/heads/release-4.1.5
Commit: beae56f7c05e394ee04d1bfe098d21970ff43fc7
Parents: 06332ee
Author: Thanuja <th...@wso2.com>
Authored: Mon Nov 30 13:25:13 2015 +0530
Committer: gayangunarathne <ga...@wso2.com>
Committed: Mon Dec 7 10:16:27 2015 +0000
----------------------------------------------------------------------
.../EventstreamScalingDecision/scaling_decision_1.0.0.json | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/beae56f7/extensions/das/modules/artifacts/monitoring-dashboard/capps/stratos-monitoring-service/EventstreamScalingDecision/scaling_decision_1.0.0.json
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/monitoring-dashboard/capps/stratos-monitoring-service/EventstreamScalingDecision/scaling_decision_1.0.0.json b/extensions/das/modules/artifacts/monitoring-dashboard/capps/stratos-monitoring-service/EventstreamScalingDecision/scaling_decision_1.0.0.json
index fbda1ef..457fa06 100644
--- a/extensions/das/modules/artifacts/monitoring-dashboard/capps/stratos-monitoring-service/EventstreamScalingDecision/scaling_decision_1.0.0.json
+++ b/extensions/das/modules/artifacts/monitoring-dashboard/capps/stratos-monitoring-service/EventstreamScalingDecision/scaling_decision_1.0.0.json
@@ -1,8 +1,8 @@
{
"name": "scaling_decision",
"version": "1.0.0",
- "nickName": "Member Information",
- "description": "Member Information",
+ "nickName": "Scaling Decision",
+ "description": "Scaling Decision",
"payloadData": [
{
"name": "timestamp",
[31/50] [abbrv] stratos git commit: Formatting
ThriftStatisticsPublisher class
Posted by ga...@apache.org.
Formatting ThriftStatisticsPublisher class
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/0dce72ef
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/0dce72ef
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/0dce72ef
Branch: refs/heads/release-4.1.5
Commit: 0dce72ef84e36a90d77d47d51b23b8069842a97c
Parents: 3bb3484
Author: Thanuja <th...@wso2.com>
Authored: Mon Nov 30 13:28:54 2015 +0530
Committer: gayangunarathne <ga...@wso2.com>
Committed: Mon Dec 7 10:16:28 2015 +0000
----------------------------------------------------------------------
.../publisher/ThriftStatisticsPublisher.java | 21 ++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/0dce72ef/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/statistics/publisher/ThriftStatisticsPublisher.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/statistics/publisher/ThriftStatisticsPublisher.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/statistics/publisher/ThriftStatisticsPublisher.java
index f86293a..c26c6d3 100644
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/statistics/publisher/ThriftStatisticsPublisher.java
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/statistics/publisher/ThriftStatisticsPublisher.java
@@ -83,27 +83,28 @@ public class ThriftStatisticsPublisher implements StatisticsPublisher {
private ArrayList<ReceiverGroup> getReceiverGroups() {
ArrayList<ReceiverGroup> receiverGroups = new ArrayList<ReceiverGroup>();
+ ArrayList<DataPublisherHolder> dataPublisherHolders = new ArrayList<DataPublisherHolder>();
+ DataPublisherHolder aNode;
for (ThriftClientInfo thriftClientInfo : thriftClientInfoList) {
if (thriftClientInfo.isStatsPublisherEnabled()) {
- ArrayList<DataPublisherHolder> dataPublisherHolders = new ArrayList<DataPublisherHolder>();
- DataPublisherHolder aNode = new DataPublisherHolder(null, buildUrl(thriftClientInfo), thriftClientInfo.getUsername(), thriftClientInfo.getPassword());
+ aNode = new DataPublisherHolder(null, buildUrl(thriftClientInfo), thriftClientInfo.getUsername(),
+ thriftClientInfo.getPassword());
dataPublisherHolders.add(aNode);
- ReceiverGroup group = new ReceiverGroup(dataPublisherHolders);
- receiverGroups.add(group);
+ if (log.isDebugEnabled()) {
+ log.debug(String.format("Thrift client [id] %s [ip] %s [port] %s is added to data publisher holder",
+ thriftClientInfo.getId(), thriftClientInfo.getIp(), thriftClientInfo.getPort()));
+ }
}
}
+ ReceiverGroup group = new ReceiverGroup(dataPublisherHolders);
+ receiverGroups.add(group);
return receiverGroups;
}
private String buildUrl(ThriftClientInfo thriftClientInfo) {
- String url = new StringBuilder()
- .append("tcp://")
- .append(thriftClientInfo.getIp())
- .append(":")
- .append(thriftClientInfo.getPort()).toString();
- return url;
+ return String.format("tcp://%s:%s", thriftClientInfo.getIp(), thriftClientInfo.getPort());
}
@Override
[38/50] [abbrv] stratos git commit: fixing STRATOS-1638
Posted by ga...@apache.org.
fixing STRATOS-1638
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/33831f54
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/33831f54
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/33831f54
Branch: refs/heads/release-4.1.5
Commit: 33831f5460b1ecf5dcaef9d992cacf9150875a20
Parents: 33c79f4
Author: rajkumar <rr...@gmail.com>
Authored: Wed Dec 2 19:17:21 2015 +0530
Committer: gayangunarathne <ga...@wso2.com>
Committed: Mon Dec 7 10:16:29 2015 +0000
----------------------------------------------------------------------
.../cep/modules/distribution/src/assembly/bin.xml | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/33831f54/extensions/cep/modules/distribution/src/assembly/bin.xml
----------------------------------------------------------------------
diff --git a/extensions/cep/modules/distribution/src/assembly/bin.xml b/extensions/cep/modules/distribution/src/assembly/bin.xml
index ee6c14b..28d912e 100755
--- a/extensions/cep/modules/distribution/src/assembly/bin.xml
+++ b/extensions/cep/modules/distribution/src/assembly/bin.xml
@@ -60,7 +60,23 @@
<dependencySet>
<outputDirectory>${project.artifactId}-${project.version}/lib</outputDirectory>
<includes>
+ <include>org.apache.activemq:activemq-client:jar</include>
+ <include>org.apache.geronimo.specs:geronimo-j2ee-management_1.1_spec:jar</include>
+ <include>org.fusesource.hawtbuf:hawtbuf:jar</include>
+ <include>org.apache.commons:commons-lang3:jar</include>
+ <include>org.apache.stratos:org.apache.stratos.messaging:jar</include>
+ <include>org.apache.stratos:org.apache.stratos.common:jar</include>
+ </includes>
+ </dependencySet>
+ <dependencySet>
+ <outputDirectory>${project.artifactId}-${project.version}/wso2cep-3.0.0/lib</outputDirectory>
+ <includes>
<include>org.apache.stratos:org.apache.stratos.cep300.extension:jar</include>
+ </includes>
+ </dependencySet>
+ <dependencySet>
+ <outputDirectory>${project.artifactId}-${project.version}/wso2cep-3.1.0/lib</outputDirectory>
+ <includes>
<include>org.apache.stratos:org.apache.stratos.cep310.extension:jar</include>
</includes>
</dependencySet>
[18/50] [abbrv] stratos git commit: Assert monitors are re-created
after restarting Stratos in StratosServerRestartTestCase
Posted by ga...@apache.org.
Assert monitors are re-created after restarting Stratos in StratosServerRestartTestCase
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/34cc042f
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/34cc042f
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/34cc042f
Branch: refs/heads/release-4.1.5
Commit: 34cc042f9c266a74e381dd0efa66149aa18a0827
Parents: a22f27a
Author: Akila Perera <ra...@gmail.com>
Authored: Mon Nov 30 00:27:33 2015 +0530
Committer: gayangunarathne <ga...@wso2.com>
Committed: Mon Dec 7 10:16:26 2015 +0000
----------------------------------------------------------------------
.../server/StratosServerRestartTestCase.java | 90 ++++++++++----------
1 file changed, 45 insertions(+), 45 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/34cc042f/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/server/StratosServerRestartTestCase.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/server/StratosServerRestartTestCase.java b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/server/StratosServerRestartTestCase.java
index 569152a..66c67e7 100644
--- a/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/server/StratosServerRestartTestCase.java
+++ b/products/stratos/modules/integration/test-integration/src/test/java/org/apache/stratos/integration/tests/server/StratosServerRestartTestCase.java
@@ -27,7 +27,6 @@ import org.apache.stratos.integration.common.RestConstants;
import org.apache.stratos.integration.common.TopologyHandler;
import org.apache.stratos.integration.common.extensions.StratosServerExtension;
import org.apache.stratos.integration.tests.StratosIntegrationTest;
-import org.apache.stratos.messaging.domain.application.ApplicationStatus;
import org.apache.stratos.messaging.domain.topology.Member;
import org.testng.Assert;
import org.testng.annotations.Test;
@@ -43,6 +42,9 @@ import static org.testng.AssertJUnit.assertTrue;
* Deploy a sample application on mock IaaS and assert whether application instance, cluster instance, member instances
* are getting activated. Restart the Stratos and check all again.
*/
+@Test(groups = { "server" },
+ dependsOnGroups = { "adc", "application", "cartridge", "iaas", "policies", "users" },
+ alwaysRun = true)
public class StratosServerRestartTestCase extends StratosIntegrationTest {
private static final Log log = LogFactory.getLog(StratosServerRestartTestCase.class);
private static final String RESOURCES_PATH = "/stratos-server-restart-test";
@@ -52,30 +54,27 @@ public class StratosServerRestartTestCase extends StratosIntegrationTest {
private static final String deploymentPolicyId = "deployment-policy-stratos-server-restart-test";
private static final String applicationId = "stratos-server-restart-test";
private static final String applicationPolicyId = "application-policy-stratos-server-restart-test";
+ private TopologyHandler topologyHandler = TopologyHandler.getInstance();
- @Test(timeOut = APPLICATION_TEST_TIMEOUT,
- groups = { "stratos.server.restart"},
- dependsOnGroups = { "stratos.application.deployment","stratos.cartridge.iaas", "stratos.policy.management","adc","all","smoke","metadata"})
+ @Test(timeOut = DEFAULT_APPLICATION_TEST_TIMEOUT)
public void stratosServerRestartTest() throws Exception {
+ log.info("Running StratosServerRestartTestCase.stratosServerRestartTest test method...");
+ long startTime = System.currentTimeMillis();
- TopologyHandler topologyHandler = TopologyHandler.getInstance();
-
- log.info("Adding autoscaling policy [autoscale policy id] " + autoscalingPolicyId);
boolean addedScalingPolicy = restClient.addEntity(
RESOURCES_PATH + RestConstants.AUTOSCALING_POLICIES_PATH + "/" + autoscalingPolicyId + ".json",
RestConstants.AUTOSCALING_POLICIES, RestConstants.AUTOSCALING_POLICIES_NAME);
assertTrue(addedScalingPolicy);
log.info(String.format("Adding cartridge [cartridge type] %s", cartridgeId));
- boolean addedC1 = restClient.addEntity(
- RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + cartridgeId + ".json",
- RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
+ boolean addedC1 = restClient
+ .addEntity(RESOURCES_PATH + RestConstants.CARTRIDGES_PATH + "/" + cartridgeId + ".json",
+ RestConstants.CARTRIDGES, RestConstants.CARTRIDGES_NAME);
assertTrue(addedC1);
log.info(String.format("Adding network partition [network partition id] %s", networkPartitionId));
boolean addedN1 = restClient.addEntity(RESOURCES_PATH + RestConstants.NETWORK_PARTITIONS_PATH + "/" +
- networkPartitionId + ".json", RestConstants.NETWORK_PARTITIONS,
- RestConstants.NETWORK_PARTITIONS_NAME);
+ networkPartitionId + ".json", RestConstants.NETWORK_PARTITIONS, RestConstants.NETWORK_PARTITIONS_NAME);
assertTrue(addedN1);
log.info(String.format("Adding deployment policy [deployment policy id] %s", deploymentPolicyId));
@@ -101,18 +100,19 @@ public class StratosServerRestartTestCase extends StratosIntegrationTest {
assertTrue(addAppPolicy);
ApplicationPolicyBean policyBean = (ApplicationPolicyBean) restClient
- .getEntity(RestConstants.APPLICATION_POLICIES, applicationPolicyId,
- ApplicationPolicyBean.class, RestConstants.APPLICATION_POLICIES_NAME);
+ .getEntity(RestConstants.APPLICATION_POLICIES, applicationPolicyId, ApplicationPolicyBean.class,
+ RestConstants.APPLICATION_POLICIES_NAME);
assertEquals(policyBean.getId(), applicationPolicyId);
- log.info(String.format("Deploying application [application id] %s using [application policy id] %s", applicationId, applicationPolicyId));
+ log.info(String.format("Deploying application [application id] %s using [application policy id] %s",
+ applicationId, applicationPolicyId));
String resourcePath = RestConstants.APPLICATIONS + "/" + applicationId +
RestConstants.APPLICATIONS_DEPLOY + "/" + applicationPolicyId;
boolean deployed = restClient.deployEntity(resourcePath, RestConstants.APPLICATIONS_NAME);
assertTrue(deployed);
log.info("Waiting for application status to become ACTIVE...");
- topologyHandler.assertApplicationStatus(applicationId, ApplicationStatus.Active);
+ TopologyHandler.getInstance().assertApplicationActiveStatus(applicationId);
log.info("Waiting for cluster status to become ACTIVE...");
topologyHandler.assertClusterActivation(applicationId);
@@ -121,6 +121,15 @@ public class StratosServerRestartTestCase extends StratosIntegrationTest {
Assert.assertTrue(memberList.size() == 1,
String.format("Active member list for application %s is empty", applicationId));
+ /*
+ * Restarting Stratos server
+ */
+ StratosServerExtension.restartStratosServer();
+
+ /*
+ * Assert whether cluster monitors were re-created by terminating mock instances. Application status should
+ * become inactive
+ */
log.info("Terminating members in [cluster id] c1-stratos-server-restart-test in mock IaaS directly to "
+ "simulate faulty members...");
Map<String, Member> memberMap = TopologyHandler.getInstance()
@@ -132,30 +141,21 @@ public class StratosServerRestartTestCase extends StratosIntegrationTest {
}
// application status should be marked as inactive since some members are faulty
log.info("Waiting for application status to become INACTIVE");
- topologyHandler.assertApplicationStatus(bean.getApplicationId(), ApplicationStatus.Inactive);
-
- // application should recover itself and become active after spinning more instances
- log.info("Waiting for application status to become ACTIVE...");
- topologyHandler.assertApplicationStatus(bean.getApplicationId(), ApplicationStatus.Active);
+ TopologyHandler.getInstance().assertApplicationInActiveStatus(bean.getApplicationId());
log.info("Waiting for cluster status to become ACTIVE...");
topologyHandler.assertClusterActivation(bean.getApplicationId());
- // restart stratos server
- StratosServerExtension.restartStratosServer();
-
+ // application should recover itself and become active after spinning more instances
log.info("Waiting for application status to become ACTIVE...");
- topologyHandler.assertApplicationStatus(bean.getApplicationId(), ApplicationStatus.Active);
-
- log.info("Waiting for cluster status to become ACTIVE...");
- topologyHandler.assertClusterActivation(bean.getApplicationId());
+ TopologyHandler.getInstance().assertApplicationActiveStatus(bean.getApplicationId());
memberList = topologyHandler.getMembersForApplication(bean.getApplicationId());
Assert.assertTrue(memberList.size() == 1,
String.format("Active member list for application %s is empty", bean.getApplicationId()));
log.info(String.format("Un-deploying the application [application id] %s", applicationId));
- String resourcePathUndeploy = RestConstants.APPLICATIONS + "/" + applicationId+
+ String resourcePathUndeploy = RestConstants.APPLICATIONS + "/" + applicationId +
RestConstants.APPLICATIONS_UNDEPLOY;
boolean unDeployed = restClient.undeployEntity(resourcePathUndeploy, RestConstants.APPLICATIONS_NAME);
@@ -165,17 +165,17 @@ public class StratosServerRestartTestCase extends StratosIntegrationTest {
if (!undeploy) {
//Need to forcefully undeploy the application
log.info(String.format("Force undeployment is going to start for the [application] %s", applicationId));
- restClient.undeployEntity(RestConstants.APPLICATIONS + "/" + applicationId+
+ restClient.undeployEntity(RestConstants.APPLICATIONS + "/" + applicationId +
RestConstants.APPLICATIONS_UNDEPLOY + "?force=true", RestConstants.APPLICATIONS);
boolean forceUndeployed = topologyHandler.assertApplicationUndeploy(applicationId);
- assertTrue(String.format("Forceful undeployment failed for the application %s",
- applicationId), forceUndeployed);
+ assertTrue(String.format("Forceful undeployment failed for the application %s", applicationId),
+ forceUndeployed);
}
log.info(String.format("Removing the application [application id] %s", applicationId));
- boolean removedApp = restClient.removeEntity(RestConstants.APPLICATIONS, applicationId,
- RestConstants.APPLICATIONS_NAME);
+ boolean removedApp = restClient
+ .removeEntity(RestConstants.APPLICATIONS, applicationId, RestConstants.APPLICATIONS_NAME);
assertTrue(removedApp);
ApplicationBean beanRemoved = (ApplicationBean) restClient
@@ -184,14 +184,13 @@ public class StratosServerRestartTestCase extends StratosIntegrationTest {
assertNull(beanRemoved);
log.info(String.format("Removing the application policy [application policy id] %s", applicationPolicyId));
- boolean removeAppPolicy = restClient
- .removeEntity(RestConstants.APPLICATION_POLICIES, applicationPolicyId,
- RestConstants.APPLICATION_POLICIES_NAME);
+ boolean removeAppPolicy = restClient.removeEntity(RestConstants.APPLICATION_POLICIES, applicationPolicyId,
+ RestConstants.APPLICATION_POLICIES_NAME);
assertTrue(removeAppPolicy);
log.info(String.format("Removing the cartridge [cartridge type] %s", cartridgeId));
- boolean removedC1 = restClient.removeEntity(RestConstants.CARTRIDGES, cartridgeId,
- RestConstants.CARTRIDGES_NAME);
+ boolean removedC1 = restClient
+ .removeEntity(RestConstants.CARTRIDGES, cartridgeId, RestConstants.CARTRIDGES_NAME);
assertTrue(removedC1);
log.info(String.format("Removing the autoscaling policy [autoscaling policy id] %s", autoscalingPolicyId));
@@ -200,15 +199,16 @@ public class StratosServerRestartTestCase extends StratosIntegrationTest {
assertTrue(removedAuto);
log.info(String.format("Removing the deployment policy [deployment policy id] %s", deploymentPolicyId));
- boolean removedDep = restClient
- .removeEntity(RestConstants.DEPLOYMENT_POLICIES, deploymentPolicyId,
- RestConstants.DEPLOYMENT_POLICIES_NAME);
+ boolean removedDep = restClient.removeEntity(RestConstants.DEPLOYMENT_POLICIES, deploymentPolicyId,
+ RestConstants.DEPLOYMENT_POLICIES_NAME);
assertTrue(removedDep);
log.info(String.format("Removing the network partition [network partition id] %s", networkPartitionId));
- boolean removedNet = restClient
- .removeEntity(RestConstants.NETWORK_PARTITIONS, networkPartitionId,
- RestConstants.NETWORK_PARTITIONS_NAME);
+ boolean removedNet = restClient.removeEntity(RestConstants.NETWORK_PARTITIONS, networkPartitionId,
+ RestConstants.NETWORK_PARTITIONS_NAME);
assertTrue(removedNet);
+
+ long duration = System.currentTimeMillis() - startTime;
+ log.info(String.format("StratosServerRestartTestCase completed in [duration] %s ms", duration));
}
}
[05/50] [abbrv] stratos git commit: Add debug log to print status of
each group instance in GroupStatusActiveProcessor
Posted by ga...@apache.org.
Add debug log to print status of each group instance in GroupStatusActiveProcessor
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/0706e45a
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/0706e45a
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/0706e45a
Branch: refs/heads/release-4.1.5
Commit: 0706e45aef76722f79bf123c9791ae43caa928f9
Parents: 9540eae
Author: Akila Perera <ra...@gmail.com>
Authored: Mon Nov 30 00:17:33 2015 +0530
Committer: gayangunarathne <ga...@wso2.com>
Committed: Mon Dec 7 10:16:25 2015 +0000
----------------------------------------------------------------------
.../group/GroupStatusActiveProcessor.java | 84 +++++++++++++++-----
1 file changed, 63 insertions(+), 21 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/0706e45a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/status/processor/group/GroupStatusActiveProcessor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/status/processor/group/GroupStatusActiveProcessor.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/status/processor/group/GroupStatusActiveProcessor.java
index b6b0a97..260c78e 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/status/processor/group/GroupStatusActiveProcessor.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/status/processor/group/GroupStatusActiveProcessor.java
@@ -24,8 +24,14 @@ import org.apache.stratos.autoscaler.applications.ApplicationHolder;
import org.apache.stratos.autoscaler.applications.topic.ApplicationBuilder;
import org.apache.stratos.autoscaler.status.processor.StatusProcessor;
import org.apache.stratos.messaging.domain.application.*;
+import org.apache.stratos.messaging.domain.instance.ClusterInstance;
+import org.apache.stratos.messaging.domain.instance.GroupInstance;
+import org.apache.stratos.messaging.domain.topology.Cluster;
import org.apache.stratos.messaging.domain.topology.ClusterStatus;
+import org.apache.stratos.messaging.domain.topology.Service;
+import org.apache.stratos.messaging.message.receiver.topology.TopologyManager;
+import java.util.Collection;
import java.util.Map;
/**
@@ -41,8 +47,7 @@ public class GroupStatusActiveProcessor extends GroupStatusProcessor {
}
@Override
- public boolean process(String idOfComponent, String appId,
- String instanceId) {
+ public boolean process(String idOfComponent, String appId, String instanceId) {
boolean statusChanged;
statusChanged = doProcess(idOfComponent, appId, instanceId);
if (statusChanged) {
@@ -54,8 +59,8 @@ public class GroupStatusActiveProcessor extends GroupStatusProcessor {
return nextProcessor.process(idOfComponent, appId, instanceId);
} else {
- log.warn(String.format("No possible state change found for [component] %s [instance] %s",
- idOfComponent, instanceId));
+ log.warn(String.format("No possible state change found for [component] %s, [instance] %s", idOfComponent,
+ instanceId));
}
return false;
}
@@ -67,8 +72,9 @@ public class GroupStatusActiveProcessor extends GroupStatusProcessor {
Map<String, ClusterDataHolder> clusterData;
if (log.isDebugEnabled()) {
- log.debug("StatusChecker calculating the active status for the group " +
- "[ " + idOfComponent + " ] " + " for the instance " + " [ " + instanceId + " ]");
+ log.debug(String.format(
+ "GroupStatusActiveProcessor is checking the status of [application-id] %s, [group-id] %s, "
+ + "[group-instance-id] %s", appId, idOfComponent, instanceId));
}
try {
ApplicationHolder.acquireWriteLock();
@@ -84,35 +90,71 @@ public class GroupStatusActiveProcessor extends GroupStatusProcessor {
groups = component.getAliasToGroupMap();
clusterData = component.getClusterDataMap();
- if (groups.isEmpty() &&
- getAllClusterInSameState(clusterData, ClusterStatus.Active, instanceId) ||
- clusterData.isEmpty() &&
- getAllGroupInSameState(groups, GroupStatus.Active, instanceId) ||
- getAllClusterInSameState(clusterData, ClusterStatus.Active, instanceId) &&
- getAllGroupInSameState(groups, GroupStatus.Active, instanceId)) {
+ if (groups.isEmpty() && getAllClusterInSameState(clusterData, ClusterStatus.Active, instanceId) ||
+ clusterData.isEmpty() && getAllGroupInSameState(groups, GroupStatus.Active, instanceId) ||
+ getAllClusterInSameState(clusterData, ClusterStatus.Active, instanceId) && getAllGroupInSameState(
+ groups, GroupStatus.Active, instanceId)) {
if (component instanceof Application) {
//send application activated event
- log.info("Sending application instance active for [application] " + appId +
- " [instance] " + instanceId);
+ log.info(String.format(
+ "Sending application instance active event for [application-id] %s, [instance-id] %s",
+ appId, instanceId));
ApplicationBuilder.handleApplicationInstanceActivatedEvent(appId, instanceId);
return true;
} else {
//send activation to the parent
- log.info("Sending group instance active for [group] " +
- component.getUniqueIdentifier() + " [instance] " + instanceId);
- ApplicationBuilder.handleGroupInstanceActivatedEvent(appId,
- component.getUniqueIdentifier(), instanceId);
+ log.info(String.format(
+ "Sending group instance active event for [application-id] %s, [group-id] %s, "
+ + "[instance-id] %s", appId, component.getUniqueIdentifier(), instanceId));
+ ApplicationBuilder
+ .handleGroupInstanceActivatedEvent(appId, component.getUniqueIdentifier(), instanceId);
return true;
}
-
+ } else {
+ if (log.isDebugEnabled()) {
+ log.debug(String.format(
+ "GroupStatusActiveProcessor did not detect any status change for [application-id] %s, "
+ + "[group-id] %s, [instance-id] %s", appId, idOfComponent, instanceId));
+ for (Map.Entry<String, Group> entry : groups.entrySet()) {
+ Collection<Group> groupCollection = entry.getValue().getGroups();
+ for (Group group : groupCollection) {
+ for (GroupInstance groupInstance : group.getInstanceIdToInstanceContextMap().values()) {
+ log.debug(String.format("Groups: [group-id] %s, [group-instance-id] %s, [status] %s",
+ group.getUniqueIdentifier(), groupInstance.getInstanceId(), entry.getKey(),
+ groupInstance.getStatus()));
+ }
+
+ }
+
+ }
+ for (Map.Entry<String, ClusterDataHolder> entry : clusterData.entrySet()) {
+ String serviceName = entry.getValue().getServiceType();
+ String clusterId = entry.getValue().getClusterId();
+ TopologyManager.acquireReadLockForCluster(serviceName, clusterId);
+ try {
+ Service service = TopologyManager.getTopology().getService(serviceName);
+ Cluster cluster = service.getCluster(clusterId);
+ ClusterInstance context = cluster.getInstanceContexts(instanceId);
+ if (context != null) {
+ log.debug(String.format(
+ "ClusterData: [cluster-id] %s, [cluster-instance-id] %s, [status] %s",
+ entry.getKey(), instanceId, context.getStatus()));
+ } else {
+ log.debug(String.format(
+ "ClusterData: cluster instance context is null: [cluster-instance-id] %s",
+ instanceId));
+ }
+ } finally {
+ TopologyManager.releaseReadLockForCluster(serviceName, clusterId);
+ }
+ }
+ }
}
} finally {
ApplicationHolder.releaseWriteLock();
-
}
return false;
}
-
}
[04/50] [abbrv] stratos git commit: Fix logs formatting
Posted by ga...@apache.org.
Fix logs formatting
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/b5f4f74d
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/b5f4f74d
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/b5f4f74d
Branch: refs/heads/release-4.1.5
Commit: b5f4f74d9e3d8c341e8663055056b25d62ca994b
Parents: 0706e45
Author: Akila Perera <ra...@gmail.com>
Authored: Mon Nov 30 00:18:19 2015 +0530
Committer: gayangunarathne <ga...@wso2.com>
Committed: Mon Dec 7 10:16:25 2015 +0000
----------------------------------------------------------------------
.../processor/group/GroupStatusProcessor.java | 10 ++---
.../group/GroupStatusTerminatedProcessor.java | 42 +++++++++-----------
2 files changed, 22 insertions(+), 30 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/b5f4f74d/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/status/processor/group/GroupStatusProcessor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/status/processor/group/GroupStatusProcessor.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/status/processor/group/GroupStatusProcessor.java
index e4ae474..77b98c7 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/status/processor/group/GroupStatusProcessor.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/status/processor/group/GroupStatusProcessor.java
@@ -41,7 +41,6 @@ import java.util.Map;
public abstract class GroupStatusProcessor extends StatusProcessor {
private static final Log log = LogFactory.getLog(GroupStatusProcessor.class);
-
/**
* Message processing and delegating logic.
*
@@ -95,8 +94,8 @@ public abstract class GroupStatusProcessor extends StatusProcessor {
* @param status the status to check of the group
* @return whether all groups in the same state or not
*/
- protected boolean getAllClusterInSameState(Map<String, ClusterDataHolder> clusterData,
- ClusterStatus status, String instanceId) {
+ protected boolean getAllClusterInSameState(Map<String, ClusterDataHolder> clusterData, ClusterStatus status,
+ String instanceId) {
boolean clusterStat = false;
for (Map.Entry<String, ClusterDataHolder> clusterDataHolderEntry : clusterData.entrySet()) {
String serviceName = clusterDataHolderEntry.getValue().getServiceType();
@@ -108,8 +107,8 @@ public abstract class GroupStatusProcessor extends StatusProcessor {
ClusterInstance context = cluster.getInstanceContexts(instanceId);
if (context != null) {
if (log.isDebugEnabled()) {
- log.debug("Checking the status of cluster " + clusterId + " instance status is: " +
- context.getStatus().toString());
+ log.debug(String.format("Cluster instance: [cluster-id] %s, [instance-id] %s, [status] %s",
+ clusterId, instanceId, context.getStatus().toString()));
}
if (context.getStatus() == status) {
clusterStat = true;
@@ -131,5 +130,4 @@ public abstract class GroupStatusProcessor extends StatusProcessor {
}
return clusterStat;
}
-
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/b5f4f74d/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/status/processor/group/GroupStatusTerminatedProcessor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/status/processor/group/GroupStatusTerminatedProcessor.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/status/processor/group/GroupStatusTerminatedProcessor.java
index fc1a736..4382d8b 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/status/processor/group/GroupStatusTerminatedProcessor.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/status/processor/group/GroupStatusTerminatedProcessor.java
@@ -42,8 +42,7 @@ public class GroupStatusTerminatedProcessor extends GroupStatusProcessor {
}
@Override
- public boolean process(String idOfComponent, String appId,
- String instanceId) {
+ public boolean process(String idOfComponent, String appId, String instanceId) {
boolean statusChanged;
statusChanged = doProcess(idOfComponent, appId, instanceId);
if (statusChanged) {
@@ -55,8 +54,8 @@ public class GroupStatusTerminatedProcessor extends GroupStatusProcessor {
return nextProcessor.process(idOfComponent, appId, instanceId);
} else {
- log.warn(String.format("No possible state change found for [component] %s [instance] %s",
- idOfComponent, instanceId));
+ log.warn(String.format("No possible state change found for [component] %s [instance] %s", idOfComponent,
+ instanceId));
}
return false;
}
@@ -68,13 +67,12 @@ public class GroupStatusTerminatedProcessor extends GroupStatusProcessor {
Map<String, ClusterDataHolder> clusterData;
if (log.isDebugEnabled()) {
- log.debug("StatusChecker calculating the terminated status for the group " +
- "[ " + idOfComponent + " ] " + " for the instance " + " [ " + instanceId + " ]");
+ log.debug(String.format(
+ "GroupStatusTerminatedProcessor is calculating the terminated status for [group-id] %s "
+ + "[instance-id] %s", idOfComponent, instanceId));
}
-
+ ApplicationHolder.acquireWriteLock();
try {
- ApplicationHolder.acquireWriteLock();
-
Application application = ApplicationHolder.getApplications().
getApplication(appId);
component = application;
@@ -88,32 +86,28 @@ public class GroupStatusTerminatedProcessor extends GroupStatusProcessor {
groups = component.getAliasToGroupMap();
clusterData = component.getClusterDataMap();
- if (groups.isEmpty() &&
- getAllClusterInSameState(clusterData, ClusterStatus.Terminated, instanceId) ||
- clusterData.isEmpty() &&
- getAllGroupInSameState(groups, GroupStatus.Terminated, instanceId) ||
- getAllClusterInSameState(clusterData, ClusterStatus.Terminated, instanceId) &&
- getAllGroupInSameState(groups, GroupStatus.Terminated, instanceId)) {
+ if (groups.isEmpty() && getAllClusterInSameState(clusterData, ClusterStatus.Terminated, instanceId) ||
+ clusterData.isEmpty() && getAllGroupInSameState(groups, GroupStatus.Terminated, instanceId) ||
+ getAllClusterInSameState(clusterData, ClusterStatus.Terminated, instanceId)
+ && getAllGroupInSameState(groups, GroupStatus.Terminated, instanceId)) {
//send the terminated event
if (component instanceof Application) {
- log.info("Sending application instance terminated for [application] " + appId
- + " [instance] " + instanceId);
+ log.info(String.format(
+ "Sending application instance terminated for [application-id] %s, [instance-id] %s", appId,
+ instanceId));
ApplicationBuilder.handleApplicationInstanceTerminatedEvent(appId, instanceId);
return true;
} else {
- log.info("Sending group instance terminated for [group] " +
- component.getUniqueIdentifier() + " [instance] " + instanceId);
- ApplicationBuilder.handleGroupInstanceTerminatedEvent(appId,
- component.getUniqueIdentifier(), instanceId);
+ log.info(String.format("Sending group instance terminated for [group-id] %s, [instance-id] %s",
+ component.getUniqueIdentifier(), instanceId));
+ ApplicationBuilder
+ .handleGroupInstanceTerminatedEvent(appId, component.getUniqueIdentifier(), instanceId);
return true;
}
}
} finally {
ApplicationHolder.releaseWriteLock();
-
}
return false;
}
-
-
}