You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by "Martin Eppel (meppel)" <me...@cisco.com> on 2015/02/17 22:36:10 UTC
QUESTION: onApplicationSignUpRemovedEvent in python cartridge agent
compares serivceName with application Id
In extensionhandler.py we compare in "on_application_signup_removal_event" method service_name with applicationId, is this a bug or intentional ?
See snippet:
def on_application_signup_removal_event(self, application_signup_removal_event):
self.log.info(
"Tenant unsubscribed event received: [tenant] " + application_signup_removal_event.tenantId +
" [application ID] " + application_signup_removal_event.applicationId
)
if self.cartridge_agent_config.service_name == application_signup_removal_event.applicationId:
agentgithandler.AgentGitHandler.remove_repo(application_signup_removal_event.tenant_id)
extensionutils.execute_application_signup_removal_extension({})
Re: QUESTION: onApplicationSignUpRemovedEvent in python cartridge
agent compares serivceName with application Id
Posted by Imesh Gunaratne <im...@apache.org>.
Hi Martin,
Great! Thanks for fixing it! I reviewed the diff and it looks good.
Thanks
On Fri, Feb 20, 2015 at 6:00 AM, Martin Eppel (meppel) <me...@cisco.com>
wrote:
> forgot to attach the diff
>
>
>
> *From:* Martin Eppel (meppel)
> *Sent:* Thursday, February 19, 2015 2:23 PM
> *To:* dev@stratos.apache.org
> *Subject:* RE: QUESTION: onApplicationSignUpRemovedEvent in python
> cartridge agent compares serivceName with application Id
>
>
>
> Thanks Imesh,
>
>
>
> I still see an issue in the respective
> ApplicationSignUpMessageProcessorChain.java which, IMHO doesn’t handle the
> ApplicationSignUpRemovedEvent because of the missing
> ApplicationSignUp<…>EventListener.
>
>
>
> I fixed the issue and checked it in (commit
> ddd6a1bd6d875d55bf8ca7a98b45160b6185bd6e), please see attached diff file
> and review,
>
>
>
> Thanks
>
>
>
> Martin
>
>
>
> *From:* Imesh Gunaratne [mailto:imesh@apache.org <im...@apache.org>]
> *Sent:* Wednesday, February 18, 2015 7:46 PM
> *To:* dev
> *Subject:* Re: QUESTION: onApplicationSignUpRemovedEvent in python
> cartridge agent compares serivceName with application Id
>
>
>
> Hi Martin,
>
>
>
> Application signups has a dedicated event receiver:
>
>
>
>
>
> They are not handled by Application event receiver, let us know if you
> need further clarifications.
>
>
>
> Thanks
>
>
>
>
> On Thu, Feb 19, 2015 at 4:52 AM, Martin Eppel (meppel) <me...@cisco.com>
> wrote:
>
> Hi,
>
>
>
> I have another question regarding this implementation:
>
>
>
> The PCA (py cartridge agent) handles the “ApplicationSignUpRemovedEvent”
> (in agent.py), which subsequently I added as well to the JCA. However, it
> seems support for this event is missing in the “ApplicationsEventReceiver”
> (respectively in the “ApplicationsMessageProcessorChain”), see also the
> runtime exception below. I did a search and couldn’t find this event
> anywhere being used in the system, so either the PCA is handling the wrong
> event or support for this event is entirely missing.
>
>
>
> Thanks
>
>
>
> Martin
>
>
>
> *Exception in thread "Thread-1" java.lang.RuntimeException: Unknown event
> listener
> org.apache.stratos.cartridge.agent.CartridgeAgentEventListeners$18@466155e3
> <or...@466155e3>*
>
> * at
> org.apache.stratos.messaging.message.processor.application.ApplicationsMessageProcessorChain.addEventListener(ApplicationsMessageProcessorChain.java:124)
> at
> org.apache.stratos.messaging.message.receiver.application.ApplicationsEventMessageDelegator.addEventListener(ApplicationsEventMessageDelegator.java:41)
> at
> org.apache.stratos.messaging.message.receiver.application.ApplicationsEventReceiver.addEventListener(ApplicationsEventReceiver.java:45)
> at
> org.apache.stratos.cartridge.agent.CartridgeAgentEventListeners.addApplicationsEventListeners(CartridgeAgentEventListeners.java:455)
> at
> org.apache.stratos.cartridge.agent.CartridgeAgentEventListeners.<init>(CartridgeAgentEventListeners.java:70)
> at
> org.apache.stratos.cartridge.agent.CartridgeAgent.run(CartridgeAgent.java:84)
> at java.lang.Thread.run(Thread.java:745)*
>
>
>
>
>
>
>
> *From:* Gayan Gunarathne [mailto:gayang@wso2.com]
> *Sent:* Tuesday, February 17, 2015 8:53 PM
> *To:* dev@stratos.apache.org
> *Subject:* Re: QUESTION: onApplicationSignUpRemovedEvent in python
> cartridge agent compares serivceName with application Id
>
>
>
> Hi Martin,
>
>
>
> Thanks for identify that.It needs to be compare application ID. I have
> fixed that now.
>
>
>
> Hi Imesh,
>
>
>
> That part is didn't test since we have some issue with PCA git repo
> cloning at that time. But I guess now we can do the end to end testing on
> this.
>
>
>
> Thanks,
>
> Gayan
>
>
>
>
>
> On Wed, Feb 18, 2015 at 9:19 AM, Imesh Gunaratne <im...@apache.org> wrote:
>
> Hi Martin,
>
>
>
> Thanks for identifying this, yes it seems like a bug. Gayan did we test
> this?
>
>
>
> IMO we need to compare the Application ID sent in the Application SignUp
> Removal event against the Application ID in the payload, then if the
> tenant's Git repository is already cloned we need to remove it.
>
>
>
> Thanks
>
>
>
> On Wed, Feb 18, 2015 at 3:06 AM, Martin Eppel (meppel) <me...@cisco.com>
> wrote:
>
> In extensionhandler.py we compare in “
> *on_application_signup_removal_event*” method service_name with
> applicationId, is this a bug or intentional ?
>
>
>
> See snippet:
>
>
>
>
>
> def on_application_signup_removal_event(self,
> application_signup_removal_event):
>
> self.log.info(
>
> "Tenant unsubscribed event received: [tenant] " +
> application_signup_removal_event.tenantId +
>
> " [application ID] " +
> application_signup_removal_event.applicationId
>
> )
>
>
>
> *if self.cartridge_agent_config.service_name ==
> application_signup_removal_event.applicationId:*
>
>
> agentgithandler.AgentGitHandler.remove_repo(application_signup_removal_event.tenant_id)
>
>
>
> extensionutils.execute_application_signup_removal_extension({})
>
>
>
>
>
>
> --
>
> Imesh Gunaratne
>
>
>
> Technical Lead, WSO2
>
> Committer & PMC Member, Apache Stratos
>
>
>
>
>
> --
>
>
>
> Gayan Gunarathne
>
> Technical Lead
>
> WSO2 Inc. (http://wso2.com)
>
> email : gayang@wso2.com | mobile : +94 766819985
>
>
>
>
>
>
>
> --
>
> Imesh Gunaratne
>
>
>
> Technical Lead, WSO2
>
> Committer & PMC Member, Apache Stratos
>
--
Imesh Gunaratne
Technical Lead, WSO2
Committer & PMC Member, Apache Stratos
RE: QUESTION: onApplicationSignUpRemovedEvent in python cartridge
agent compares serivceName with application Id
Posted by "Martin Eppel (meppel)" <me...@cisco.com>.
forgot to attach the diff
From: Martin Eppel (meppel)
Sent: Thursday, February 19, 2015 2:23 PM
To: dev@stratos.apache.org
Subject: RE: QUESTION: onApplicationSignUpRemovedEvent in python cartridge agent compares serivceName with application Id
Thanks Imesh,
I still see an issue in the respective ApplicationSignUpMessageProcessorChain.java which, IMHO doesn’t handle the ApplicationSignUpRemovedEvent because of the missing ApplicationSignUp<…>EventListener.
I fixed the issue and checked it in (commit ddd6a1bd6d875d55bf8ca7a98b45160b6185bd6e), please see attached diff file and review,
Thanks
Martin
From: Imesh Gunaratne [mailto:imesh@apache.org]
Sent: Wednesday, February 18, 2015 7:46 PM
To: dev
Subject: Re: QUESTION: onApplicationSignUpRemovedEvent in python cartridge agent compares serivceName with application Id
Hi Martin,
Application signups has a dedicated event receiver:
[cid:image001.png@01D04C61.65AB53D0]
They are not handled by Application event receiver, let us know if you need further clarifications.
Thanks
On Thu, Feb 19, 2015 at 4:52 AM, Martin Eppel (meppel) <me...@cisco.com>> wrote:
Hi,
I have another question regarding this implementation:
The PCA (py cartridge agent) handles the “ApplicationSignUpRemovedEvent” (in agent.py), which subsequently I added as well to the JCA. However, it seems support for this event is missing in the “ApplicationsEventReceiver” (respectively in the “ApplicationsMessageProcessorChain”), see also the runtime exception below. I did a search and couldn’t find this event anywhere being used in the system, so either the PCA is handling the wrong event or support for this event is entirely missing.
Thanks
Martin
Exception in thread "Thread-1" java.lang.RuntimeException: Unknown event listener org.apache.stratos.cartridge.agent.CartridgeAgentEventListeners$18@466155e3<ma...@466155e3>
at org.apache.stratos.messaging.message.processor.application.ApplicationsMessageProcessorChain.addEventListener(ApplicationsMessageProcessorChain.java:124) at org.apache.stratos.messaging.message.receiver.application.ApplicationsEventMessageDelegator.addEventListener(ApplicationsEventMessageDelegator.java:41) at org.apache.stratos.messaging.message.receiver.application.ApplicationsEventReceiver.addEventListener(ApplicationsEventReceiver.java:45) at org.apache.stratos.cartridge.agent.CartridgeAgentEventListeners.addApplicationsEventListeners(CartridgeAgentEventListeners.java:455) at org.apache.stratos.cartridge.agent.CartridgeAgentEventListeners.<init>(CartridgeAgentEventListeners.java:70) at org.apache.stratos.cartridge.agent.CartridgeAgent.run(CartridgeAgent.java:84) at java.lang.Thread.run(Thread.java:745)
From: Gayan Gunarathne [mailto:gayang@wso2.com<ma...@wso2.com>]
Sent: Tuesday, February 17, 2015 8:53 PM
To: dev@stratos.apache.org<ma...@stratos.apache.org>
Subject: Re: QUESTION: onApplicationSignUpRemovedEvent in python cartridge agent compares serivceName with application Id
Hi Martin,
Thanks for identify that.It needs to be compare application ID. I have fixed that now.
Hi Imesh,
That part is didn't test since we have some issue with PCA git repo cloning at that time. But I guess now we can do the end to end testing on this.
Thanks,
Gayan
On Wed, Feb 18, 2015 at 9:19 AM, Imesh Gunaratne <im...@apache.org>> wrote:
Hi Martin,
Thanks for identifying this, yes it seems like a bug. Gayan did we test this?
IMO we need to compare the Application ID sent in the Application SignUp Removal event against the Application ID in the payload, then if the tenant's Git repository is already cloned we need to remove it.
Thanks
On Wed, Feb 18, 2015 at 3:06 AM, Martin Eppel (meppel) <me...@cisco.com>> wrote:
In extensionhandler.py we compare in “on_application_signup_removal_event” method service_name with applicationId, is this a bug or intentional ?
See snippet:
def on_application_signup_removal_event(self, application_signup_removal_event):
self.log.info<http://self.log.info>(
"Tenant unsubscribed event received: [tenant] " + application_signup_removal_event.tenantId +
" [application ID] " + application_signup_removal_event.applicationId
)
if self.cartridge_agent_config.service_name == application_signup_removal_event.applicationId:
agentgithandler.AgentGitHandler.remove_repo(application_signup_removal_event.tenant_id)
extensionutils.execute_application_signup_removal_extension({})
--
Imesh Gunaratne
Technical Lead, WSO2
Committer & PMC Member, Apache Stratos
--
Gayan Gunarathne
Technical Lead
WSO2 Inc. (http://wso2.com<http://wso2.com/>)
email : gayang@wso2.com<ma...@wso2.com> | mobile : +94 766819985<tel:%2B94%20766819985>
--
Imesh Gunaratne
Technical Lead, WSO2
Committer & PMC Member, Apache Stratos
RE: QUESTION: onApplicationSignUpRemovedEvent in python cartridge
agent compares serivceName with application Id
Posted by "Martin Eppel (meppel)" <me...@cisco.com>.
Thanks Imesh,
I still see an issue in the respective ApplicationSignUpMessageProcessorChain.java which, IMHO doesn’t handle the ApplicationSignUpRemovedEvent because of the missing ApplicationSignUp<…>EventListener.
I fixed the issue and checked it in (commit ddd6a1bd6d875d55bf8ca7a98b45160b6185bd6e), please see attached diff file and review,
Thanks
Martin
From: Imesh Gunaratne [mailto:imesh@apache.org]
Sent: Wednesday, February 18, 2015 7:46 PM
To: dev
Subject: Re: QUESTION: onApplicationSignUpRemovedEvent in python cartridge agent compares serivceName with application Id
Hi Martin,
Application signups has a dedicated event receiver:
[cid:image002.png@01D04C2D.E6F99520]
They are not handled by Application event receiver, let us know if you need further clarifications.
Thanks
On Thu, Feb 19, 2015 at 4:52 AM, Martin Eppel (meppel) <me...@cisco.com>> wrote:
Hi,
I have another question regarding this implementation:
The PCA (py cartridge agent) handles the “ApplicationSignUpRemovedEvent” (in agent.py), which subsequently I added as well to the JCA. However, it seems support for this event is missing in the “ApplicationsEventReceiver” (respectively in the “ApplicationsMessageProcessorChain”), see also the runtime exception below. I did a search and couldn’t find this event anywhere being used in the system, so either the PCA is handling the wrong event or support for this event is entirely missing.
Thanks
Martin
Exception in thread "Thread-1" java.lang.RuntimeException: Unknown event listener org.apache.stratos.cartridge.agent.CartridgeAgentEventListeners$18@466155e3<ma...@466155e3>
at org.apache.stratos.messaging.message.processor.application.ApplicationsMessageProcessorChain.addEventListener(ApplicationsMessageProcessorChain.java:124) at org.apache.stratos.messaging.message.receiver.application.ApplicationsEventMessageDelegator.addEventListener(ApplicationsEventMessageDelegator.java:41) at org.apache.stratos.messaging.message.receiver.application.ApplicationsEventReceiver.addEventListener(ApplicationsEventReceiver.java:45) at org.apache.stratos.cartridge.agent.CartridgeAgentEventListeners.addApplicationsEventListeners(CartridgeAgentEventListeners.java:455) at org.apache.stratos.cartridge.agent.CartridgeAgentEventListeners.<init>(CartridgeAgentEventListeners.java:70) at org.apache.stratos.cartridge.agent.CartridgeAgent.run(CartridgeAgent.java:84) at java.lang.Thread.run(Thread.java:745)
From: Gayan Gunarathne [mailto:gayang@wso2.com<ma...@wso2.com>]
Sent: Tuesday, February 17, 2015 8:53 PM
To: dev@stratos.apache.org<ma...@stratos.apache.org>
Subject: Re: QUESTION: onApplicationSignUpRemovedEvent in python cartridge agent compares serivceName with application Id
Hi Martin,
Thanks for identify that.It needs to be compare application ID. I have fixed that now.
Hi Imesh,
That part is didn't test since we have some issue with PCA git repo cloning at that time. But I guess now we can do the end to end testing on this.
Thanks,
Gayan
On Wed, Feb 18, 2015 at 9:19 AM, Imesh Gunaratne <im...@apache.org>> wrote:
Hi Martin,
Thanks for identifying this, yes it seems like a bug. Gayan did we test this?
IMO we need to compare the Application ID sent in the Application SignUp Removal event against the Application ID in the payload, then if the tenant's Git repository is already cloned we need to remove it.
Thanks
On Wed, Feb 18, 2015 at 3:06 AM, Martin Eppel (meppel) <me...@cisco.com>> wrote:
In extensionhandler.py we compare in “on_application_signup_removal_event” method service_name with applicationId, is this a bug or intentional ?
See snippet:
def on_application_signup_removal_event(self, application_signup_removal_event):
self.log.info<http://self.log.info>(
"Tenant unsubscribed event received: [tenant] " + application_signup_removal_event.tenantId +
" [application ID] " + application_signup_removal_event.applicationId
)
if self.cartridge_agent_config.service_name == application_signup_removal_event.applicationId:
agentgithandler.AgentGitHandler.remove_repo(application_signup_removal_event.tenant_id)
extensionutils.execute_application_signup_removal_extension({})
--
Imesh Gunaratne
Technical Lead, WSO2
Committer & PMC Member, Apache Stratos
--
Gayan Gunarathne
Technical Lead
WSO2 Inc. (http://wso2.com<http://wso2.com/>)
email : gayang@wso2.com<ma...@wso2.com> | mobile : +94 766819985<tel:%2B94%20766819985>
--
Imesh Gunaratne
Technical Lead, WSO2
Committer & PMC Member, Apache Stratos
Re: QUESTION: onApplicationSignUpRemovedEvent in python cartridge
agent compares serivceName with application Id
Posted by Imesh Gunaratne <im...@apache.org>.
Hi Martin,
Application signups has a dedicated event receiver:
They are not handled by Application event receiver, let us know if you need
further clarifications.
Thanks
On Thu, Feb 19, 2015 at 4:52 AM, Martin Eppel (meppel) <me...@cisco.com>
wrote:
> Hi,
>
>
>
> I have another question regarding this implementation:
>
>
>
> The PCA (py cartridge agent) handles the “ApplicationSignUpRemovedEvent”
> (in agent.py), which subsequently I added as well to the JCA. However, it
> seems support for this event is missing in the “ApplicationsEventReceiver”
> (respectively in the “ApplicationsMessageProcessorChain”), see also the
> runtime exception below. I did a search and couldn’t find this event
> anywhere being used in the system, so either the PCA is handling the wrong
> event or support for this event is entirely missing.
>
>
>
> Thanks
>
>
>
> Martin
>
>
>
> *Exception in thread "Thread-1" java.lang.RuntimeException: Unknown event
> listener
> org.apache.stratos.cartridge.agent.CartridgeAgentEventListeners$18@466155e3*
>
> * at
> org.apache.stratos.messaging.message.processor.application.ApplicationsMessageProcessorChain.addEventListener(ApplicationsMessageProcessorChain.java:124)
> at
> org.apache.stratos.messaging.message.receiver.application.ApplicationsEventMessageDelegator.addEventListener(ApplicationsEventMessageDelegator.java:41)
> at
> org.apache.stratos.messaging.message.receiver.application.ApplicationsEventReceiver.addEventListener(ApplicationsEventReceiver.java:45)
> at
> org.apache.stratos.cartridge.agent.CartridgeAgentEventListeners.addApplicationsEventListeners(CartridgeAgentEventListeners.java:455)
> at
> org.apache.stratos.cartridge.agent.CartridgeAgentEventListeners.<init>(CartridgeAgentEventListeners.java:70)
> at
> org.apache.stratos.cartridge.agent.CartridgeAgent.run(CartridgeAgent.java:84)
> at java.lang.Thread.run(Thread.java:745)*
>
>
>
>
>
>
>
> *From:* Gayan Gunarathne [mailto:gayang@wso2.com]
> *Sent:* Tuesday, February 17, 2015 8:53 PM
> *To:* dev@stratos.apache.org
> *Subject:* Re: QUESTION: onApplicationSignUpRemovedEvent in python
> cartridge agent compares serivceName with application Id
>
>
>
> Hi Martin,
>
>
>
> Thanks for identify that.It needs to be compare application ID. I have
> fixed that now.
>
>
>
> Hi Imesh,
>
>
>
> That part is didn't test since we have some issue with PCA git repo
> cloning at that time. But I guess now we can do the end to end testing on
> this.
>
>
>
> Thanks,
>
> Gayan
>
>
>
>
>
> On Wed, Feb 18, 2015 at 9:19 AM, Imesh Gunaratne <im...@apache.org> wrote:
>
> Hi Martin,
>
>
>
> Thanks for identifying this, yes it seems like a bug. Gayan did we test
> this?
>
>
>
> IMO we need to compare the Application ID sent in the Application SignUp
> Removal event against the Application ID in the payload, then if the
> tenant's Git repository is already cloned we need to remove it.
>
>
>
> Thanks
>
>
>
> On Wed, Feb 18, 2015 at 3:06 AM, Martin Eppel (meppel) <me...@cisco.com>
> wrote:
>
> In extensionhandler.py we compare in “
> *on_application_signup_removal_event*” method service_name with
> applicationId, is this a bug or intentional ?
>
>
>
> See snippet:
>
>
>
>
>
> def on_application_signup_removal_event(self,
> application_signup_removal_event):
>
> self.log.info(
>
> "Tenant unsubscribed event received: [tenant] " +
> application_signup_removal_event.tenantId +
>
> " [application ID] " +
> application_signup_removal_event.applicationId
>
> )
>
>
>
> *if self.cartridge_agent_config.service_name ==
> application_signup_removal_event.applicationId:*
>
>
> agentgithandler.AgentGitHandler.remove_repo(application_signup_removal_event.tenant_id)
>
>
>
> extensionutils.execute_application_signup_removal_extension({})
>
>
>
>
>
>
> --
>
> Imesh Gunaratne
>
>
>
> Technical Lead, WSO2
>
> Committer & PMC Member, Apache Stratos
>
>
>
>
>
> --
>
>
>
> Gayan Gunarathne
>
> Technical Lead
>
> WSO2 Inc. (http://wso2.com)
>
> email : gayang@wso2.com | mobile : +94 766819985
>
>
--
Imesh Gunaratne
Technical Lead, WSO2
Committer & PMC Member, Apache Stratos
RE: QUESTION: onApplicationSignUpRemovedEvent in python cartridge
agent compares serivceName with application Id
Posted by "Martin Eppel (meppel)" <me...@cisco.com>.
Hi,
I have another question regarding this implementation:
The PCA (py cartridge agent) handles the “ApplicationSignUpRemovedEvent” (in agent.py), which subsequently I added as well to the JCA. However, it seems support for this event is missing in the “ApplicationsEventReceiver” (respectively in the “ApplicationsMessageProcessorChain”), see also the runtime exception below. I did a search and couldn’t find this event anywhere being used in the system, so either the PCA is handling the wrong event or support for this event is entirely missing.
Thanks
Martin
Exception in thread "Thread-1" java.lang.RuntimeException: Unknown event listener org.apache.stratos.cartridge.agent.CartridgeAgentEventListeners$18@466155e3
at org.apache.stratos.messaging.message.processor.application.ApplicationsMessageProcessorChain.addEventListener(ApplicationsMessageProcessorChain.java:124) at org.apache.stratos.messaging.message.receiver.application.ApplicationsEventMessageDelegator.addEventListener(ApplicationsEventMessageDelegator.java:41) at org.apache.stratos.messaging.message.receiver.application.ApplicationsEventReceiver.addEventListener(ApplicationsEventReceiver.java:45) at org.apache.stratos.cartridge.agent.CartridgeAgentEventListeners.addApplicationsEventListeners(CartridgeAgentEventListeners.java:455) at org.apache.stratos.cartridge.agent.CartridgeAgentEventListeners.<init>(CartridgeAgentEventListeners.java:70) at org.apache.stratos.cartridge.agent.CartridgeAgent.run(CartridgeAgent.java:84) at java.lang.Thread.run(Thread.java:745)
From: Gayan Gunarathne [mailto:gayang@wso2.com]
Sent: Tuesday, February 17, 2015 8:53 PM
To: dev@stratos.apache.org
Subject: Re: QUESTION: onApplicationSignUpRemovedEvent in python cartridge agent compares serivceName with application Id
Hi Martin,
Thanks for identify that.It needs to be compare application ID. I have fixed that now.
Hi Imesh,
That part is didn't test since we have some issue with PCA git repo cloning at that time. But I guess now we can do the end to end testing on this.
Thanks,
Gayan
On Wed, Feb 18, 2015 at 9:19 AM, Imesh Gunaratne <im...@apache.org>> wrote:
Hi Martin,
Thanks for identifying this, yes it seems like a bug. Gayan did we test this?
IMO we need to compare the Application ID sent in the Application SignUp Removal event against the Application ID in the payload, then if the tenant's Git repository is already cloned we need to remove it.
Thanks
On Wed, Feb 18, 2015 at 3:06 AM, Martin Eppel (meppel) <me...@cisco.com>> wrote:
In extensionhandler.py we compare in “on_application_signup_removal_event” method service_name with applicationId, is this a bug or intentional ?
See snippet:
def on_application_signup_removal_event(self, application_signup_removal_event):
self.log.info<http://self.log.info>(
"Tenant unsubscribed event received: [tenant] " + application_signup_removal_event.tenantId +
" [application ID] " + application_signup_removal_event.applicationId
)
if self.cartridge_agent_config.service_name == application_signup_removal_event.applicationId:
agentgithandler.AgentGitHandler.remove_repo(application_signup_removal_event.tenant_id)
extensionutils.execute_application_signup_removal_extension({})
--
Imesh Gunaratne
Technical Lead, WSO2
Committer & PMC Member, Apache Stratos
--
Gayan Gunarathne
Technical Lead
WSO2 Inc. (http://wso2.com<http://wso2.com/>)
email : gayang@wso2.com<ma...@wso2.com> | mobile : +94 766819985<tel:%2B94%20766819985>
Re: QUESTION: onApplicationSignUpRemovedEvent in python cartridge
agent compares serivceName with application Id
Posted by Gayan Gunarathne <ga...@wso2.com>.
Hi Martin,
Thanks for identify that.It needs to be compare application ID. I have
fixed that now.
Hi Imesh,
That part is didn't test since we have some issue with PCA git repo cloning
at that time. But I guess now we can do the end to end testing on this.
Thanks,
Gayan
On Wed, Feb 18, 2015 at 9:19 AM, Imesh Gunaratne <im...@apache.org> wrote:
> Hi Martin,
>
> Thanks for identifying this, yes it seems like a bug. Gayan did we test
> this?
>
> IMO we need to compare the Application ID sent in the Application SignUp
> Removal event against the Application ID in the payload, then if the
> tenant's Git repository is already cloned we need to remove it.
>
> Thanks
>
> On Wed, Feb 18, 2015 at 3:06 AM, Martin Eppel (meppel) <me...@cisco.com>
> wrote:
>
>> In extensionhandler.py we compare in “
>> *on_application_signup_removal_event*” method service_name with
>> applicationId, is this a bug or intentional ?
>>
>>
>>
>> See snippet:
>>
>>
>>
>>
>>
>> def on_application_signup_removal_event(self,
>> application_signup_removal_event):
>>
>> self.log.info(
>>
>> "Tenant unsubscribed event received: [tenant] " +
>> application_signup_removal_event.tenantId +
>>
>> " [application ID] " +
>> application_signup_removal_event.applicationId
>>
>> )
>>
>>
>>
>> *if self.cartridge_agent_config.service_name ==
>> application_signup_removal_event.applicationId:*
>>
>>
>> agentgithandler.AgentGitHandler.remove_repo(application_signup_removal_event.tenant_id)
>>
>>
>>
>> extensionutils.execute_application_signup_removal_extension({})
>>
>
>
>
> --
> Imesh Gunaratne
>
> Technical Lead, WSO2
> Committer & PMC Member, Apache Stratos
>
--
Gayan Gunarathne
Technical Lead
WSO2 Inc. (http://wso2.com)
email : gayang@wso2.com | mobile : +94 766819985
RE: QUESTION: onApplicationSignUpRemovedEvent in python cartridge
agent compares serivceName with application Id
Posted by "Martin Eppel (meppel)" <me...@cisco.com>.
Thanks Imesh,
Will implement the same for the JCA
Martin
From: Imesh Gunaratne [mailto:imesh@apache.org]
Sent: Tuesday, February 17, 2015 7:50 PM
To: dev; Gayan Gunarathne
Subject: Re: QUESTION: onApplicationSignUpRemovedEvent in python cartridge agent compares serivceName with application Id
Hi Martin,
Thanks for identifying this, yes it seems like a bug. Gayan did we test this?
IMO we need to compare the Application ID sent in the Application SignUp Removal event against the Application ID in the payload, then if the tenant's Git repository is already cloned we need to remove it.
Thanks
On Wed, Feb 18, 2015 at 3:06 AM, Martin Eppel (meppel) <me...@cisco.com>> wrote:
In extensionhandler.py we compare in “on_application_signup_removal_event” method service_name with applicationId, is this a bug or intentional ?
See snippet:
def on_application_signup_removal_event(self, application_signup_removal_event):
self.log.info<http://self.log.info>(
"Tenant unsubscribed event received: [tenant] " + application_signup_removal_event.tenantId +
" [application ID] " + application_signup_removal_event.applicationId
)
if self.cartridge_agent_config.service_name == application_signup_removal_event.applicationId:
agentgithandler.AgentGitHandler.remove_repo(application_signup_removal_event.tenant_id)
extensionutils.execute_application_signup_removal_extension({})
--
Imesh Gunaratne
Technical Lead, WSO2
Committer & PMC Member, Apache Stratos
Re: QUESTION: onApplicationSignUpRemovedEvent in python cartridge
agent compares serivceName with application Id
Posted by Imesh Gunaratne <im...@apache.org>.
Hi Martin,
Thanks for identifying this, yes it seems like a bug. Gayan did we test
this?
IMO we need to compare the Application ID sent in the Application SignUp
Removal event against the Application ID in the payload, then if the
tenant's Git repository is already cloned we need to remove it.
Thanks
On Wed, Feb 18, 2015 at 3:06 AM, Martin Eppel (meppel) <me...@cisco.com>
wrote:
> In extensionhandler.py we compare in “
> *on_application_signup_removal_event*” method service_name with
> applicationId, is this a bug or intentional ?
>
>
>
> See snippet:
>
>
>
>
>
> def on_application_signup_removal_event(self,
> application_signup_removal_event):
>
> self.log.info(
>
> "Tenant unsubscribed event received: [tenant] " +
> application_signup_removal_event.tenantId +
>
> " [application ID] " +
> application_signup_removal_event.applicationId
>
> )
>
>
>
> *if self.cartridge_agent_config.service_name ==
> application_signup_removal_event.applicationId:*
>
>
> agentgithandler.AgentGitHandler.remove_repo(application_signup_removal_event.tenant_id)
>
>
>
> extensionutils.execute_application_signup_removal_extension({})
>
--
Imesh Gunaratne
Technical Lead, WSO2
Committer & PMC Member, Apache Stratos