Re: [Discuss] Writing Cartridge Agent Extensions in Python

2015-02-19 Thread Chamila De Alwis
Hi Imesh, On Thu, Feb 19, 2015 at 2:47 PM, Imesh Gunaratne wrote: > I think we can introduce a packaging model for plugins using zip. PCA can > provide a folder to copy plugin zip files (a deploy folder: plugins/deploy) > and at the startup those can be extracted to a different folder > (plugins

Re: [Discuss] Writing Cartridge Agent Extensions in Python

2015-02-19 Thread Imesh Gunaratne
Hi Chamila, It looks good! I have now merged this pull request to master branch. I think we can introduce a packaging model for plugins using zip. PCA can provide a folder to copy plugin zip files (a deploy folder: plugins/deploy) and at the startup those can be extracted to a different folder (p

Re: [Discuss] Writing Cartridge Agent Extensions in Python

2015-02-18 Thread Chamila De Alwis
Hi Imesh, I've opened a PR for this feature at [1]. Please review and merge. [1] - https://github.com/apache/stratos/pull/234 Regards, Chamila de Alwis Software Engineer | WSO2 | +94772207163 Blog: code.chamiladealwis.com On Sat, Feb 14, 2015 at 10:02 PM, Chamila De Alwis wrote: > Hi Imesh

Re: [Discuss] Writing Cartridge Agent Extensions in Python

2015-02-14 Thread Chamila De Alwis
Hi Imesh, On Sat, Feb 14, 2015 at 9:37 PM, Imesh Gunaratne wrote: > Will it be possible to design the plugin contract to be able to listen to > multiple events? > Yes, it is possible to modify the plugin description to define several events for a single plugin. For an example, the list of event

Re: [Discuss] Writing Cartridge Agent Extensions in Python

2015-02-14 Thread Imesh Gunaratne
Great work Chamila! Will it be possible to design the plugin contract to be able to listen to multiple events? If so plugins can implement features in PCA rather than being restricting to single event actions. For an example if a cartridge needs to support a certain clustering technology, we could

Re: [Discuss] Writing Cartridge Agent Extensions in Python

2015-02-14 Thread Chamila De Alwis
Hi, I have now implemented a basic plugin system where */plugins* folder can be used to drop plugins to be picked up by the PCA. For this I've used Yapsy[1] plugin framework. As Akila mentioned in a previous thread, Yapsy is both simple and effective in enabling a plugin structure in Python. It is

Re: [Discuss] Writing Cartridge Agent Extensions in Python

2015-02-05 Thread Chamila De Alwis
Hi, The current extension setup is as follows. A set of bash scripts are available in the /extensions. The file name of the extension that should be executed for each event is defined in the agent configuration (agent.conf in PCA, stratos.sh in JCA). The event handler executes these bash scripts a

Re: [Discuss] Writing Cartridge Agent Extensions in Python

2015-02-05 Thread Gayan Gunarathne
Also I guess we can ship the default set of extensions for both python and bash with python cartridge agent. With the user requirement, user can introduce own set of extensions as their choice. Thanks, Gayan On Thu, Feb 5, 2015 at 6:51 PM, Gayan Gunarathne wrote: > +1 to have to both python ext

Re: [Discuss] Writing Cartridge Agent Extensions in Python

2015-02-05 Thread Gayan Gunarathne
+1 to have to both python extensions and bash extensions .If we can introduce the python extension layer ,it will give more options for the user. Thanks, Gayan On Thu, Feb 5, 2015 at 6:25 PM, Imesh Gunaratne wrote: > Hi Devs, > > Sometime back we had a discussion on introducing a python plugi

[Discuss] Writing Cartridge Agent Extensions in Python

2015-02-05 Thread Imesh Gunaratne
Hi Devs, Sometime back we had a discussion on introducing a python plugin framework for implementing extensions for Python Cartridge Agent (PCA) in python. However we could not take any actions on it. Currently we have bash scripts as extensions however if we could introduce a python extension la