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

stratos git commit: PCA - Fixed InstanceCleanupClusterEvent event serialization issue [STRATOS-1222]

Repository: stratos
Updated Branches:
  refs/heads/master bb61ab0d4 -> 871d813e8


PCA - Fixed InstanceCleanupClusterEvent event serialization issue [STRATOS-1222]


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

Branch: refs/heads/master
Commit: 871d813e8a7df8c1ea9596ff95771a1f61bee779
Parents: bb61ab0
Author: Chamila de Alwis <ch...@wso2.com>
Authored: Mon Mar 2 14:54:23 2015 +0530
Committer: Chamila de Alwis <ch...@wso2.com>
Committed: Mon Mar 2 14:55:42 2015 +0530

----------------------------------------------------------------------
 .../modules/event/application/signup/events.py    | 18 +++++++++---------
 .../modules/event/instance/notifier/events.py     |  4 ++--
 .../modules/event/topology/events.py              |  6 +++---
 3 files changed, 14 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/871d813e/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 ad38227..f44dd04 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
@@ -31,13 +31,13 @@ class ApplicationSignUpAddedEvent:
     @staticmethod
     def create_from_json(json_str):
         json_obj = json.loads(json_str)
-        applicationSignUp = ApplicationSignUpAddedEvent()
+        app_signup_added = ApplicationSignUpAddedEvent()
 
-        applicationSignUp.applicationId = json_obj["applicationId"] if "applicationId" in json_obj else None
-        applicationSignUp.tenantId = json_obj["tenantId"] if "tenantId" in json_obj else None
-        applicationSignUp.clusterIds = json_obj["clusterIds"] if "clusterIds" in json_obj else None
+        app_signup_added.applicationId = json_obj["applicationId"] if "applicationId" in json_obj else None
+        app_signup_added.tenantId = json_obj["tenantId"] if "tenantId" in json_obj else None
+        app_signup_added.clusterIds = json_obj["clusterIds"] if "clusterIds" in json_obj else None
 
-        return applicationSignUp
+        return app_signup_added
 
 
 class ApplicationSignUpRemovedEvent:
@@ -53,10 +53,10 @@ class ApplicationSignUpRemovedEvent:
     @staticmethod
     def create_from_json(json_str):
         json_obj = json.loads(json_str)
-        applicationSignUp = ApplicationSignUpRemovedEvent()
+        app_signup_removed = ApplicationSignUpRemovedEvent()
 
-        applicationSignUp.applicationId = json_obj["applicationId"] if "applicationId" in json_obj else None
-        applicationSignUp.tenantId = json_obj["tenantId"] if "tenantId" in json_obj else None
+        app_signup_removed.applicationId = json_obj["applicationId"] if "applicationId" in json_obj else None
+        app_signup_removed.tenantId = json_obj["tenantId"] if "tenantId" in json_obj else None
 
-        return applicationSignUp
+        return app_signup_removed
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/871d813e/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 8456854..800db98 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
@@ -34,7 +34,7 @@ class ArtifactUpdatedEvent:
         """ :type : int  """
         self.commit_enabled = None
         """ :type : bool  """
-        self.instance_id=None
+        self.instance_id = None
         """ :type : str  """
 
     @staticmethod
@@ -64,7 +64,7 @@ class InstanceCleanupClusterEvent:
     def create_from_json(json_str):
         json_obj = json.loads(json_str)
         cluster_id = json_obj["clusterId"] if "clusterId" in json_obj else None
-        instance_cluster_id = json_obj["instanceClusterId"] if "clusterId" in json_obj else None
+        instance_cluster_id = json_obj["instanceClusterId"] if "instanceClusterId" in json_obj else None
 
         return InstanceCleanupClusterEvent(cluster_id, instance_cluster_id)
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/871d813e/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/event/topology/events.py
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/event/topology/events.py b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/event/topology/events.py
index ecc9739..07151c2 100644
--- a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/event/topology/events.py
+++ b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/event/topology/events.py
@@ -66,7 +66,7 @@ class MemberActivatedEvent:
         instance.instance_id = json_obj["instanceId"] if "instanceId" in json_obj else None
         instance.network_partition_id = json_obj["networkPartitionId"] if "networkPartitionId" in json_obj else None
         instance.partition_id = json_obj["partitionId"] if "partitionId" in json_obj else None
-        #instance.port_map = json_obj["portMap"] if "portMap" in json_obj else {}
+        # instance.port_map = json_obj["portMap"] if "portMap" in json_obj else {}
         instance.member_private_ips = json_obj["memberPrivateIPs"] if "memberPrivateIPs" in json_obj else None
         instance.member_public_ips = json_obj["memberPublicIPs"] if "memberPublicIPs" in json_obj else None
         instance.member_default_public_ip = json_obj["defaultPublicIP"] if "defaultPublicIP" in json_obj else None
@@ -168,7 +168,7 @@ class CompleteTopologyEvent:
             topology_obj.initialized = True if str(topology_str["initialized"]).lower == "true" else False
             topology_obj.json_str = topology_str
 
-            #add service map
+            # add service map
             for service_name in topology_str["serviceMap"]:
                 service_str = topology_str["serviceMap"][service_name]
 
@@ -180,7 +180,7 @@ class CompleteTopologyEvent:
                     port_obj = Port(port_str["protocol"], port_str["value"], port_proxy)
                     service_obj.add_port(port_obj)
 
-                #add cluster map
+                # add cluster map
                 for cluster_id in service_str["clusterIdClusterMap"]:
                     cluster_str = service_str["clusterIdClusterMap"][cluster_id]
                     cl_service_name = cluster_str["serviceName"]