Hi,

The current extension setup is as follows. A set of bash scripts are
available in the <PCA_HOME>/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 as new shell commands when the respective events are received.

We can introduce a layer between the bash scripts and the python code that
calls them. The names of the python scripts corresponding to each event can
be defined as before.

Additionally we can extend this behavior to the Git artifact management
component of the PCA. The contract that the artifact management component
should adhere to is "checkout" and "push". We can separate the current
python code relating to these two operations in to two extension scripts.
This will also address the platform dependence issue we are experiencing
now with the git binary. I will start working on this.

What do you think?


Regards,
Chamila de Alwis
Software Engineer | WSO2 | +94772207163
Blog: code.chamiladealwis.com



On Thu, Feb 5, 2015 at 6:57 PM, Gayan Gunarathne <gay...@wso2.com> wrote:

> 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 <gay...@wso2.com> wrote:
>
>> +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 <im...@apache.org> wrote:
>>
>>> 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 layer in between that would make it much
>>> easier to implement extension logic.
>>>
>>> IMO we could wrap existing extension bashscripts with a set of python
>>> scripts and invoke those by the agent. If a cartridge would like to write
>>> extensions in python it could use those. If some other cartridge would
>>> prefer to use bash that's also possible. We should be able to do this with
>>> less effort. WDYT?
>>>
>>> Thanks
>>>
>>> --
>>> Imesh Gunaratne
>>>
>>> Technical Lead, WSO2
>>> Committer & PMC Member, Apache Stratos
>>>
>>
>>
>>
>> --
>>
>> Gayan Gunarathne
>> Technical Lead
>> WSO2 Inc. (http://wso2.com)
>> email  : gay...@wso2.com  | mobile : +94 766819985
>>
>>
>
>
>
> --
>
> Gayan Gunarathne
> Technical Lead
> WSO2 Inc. (http://wso2.com)
> email  : gay...@wso2.com  | mobile : +94 766819985
>
>

Reply via email to