booth icon indicating copy to clipboard operation
booth copied to clipboard

Crmv1

Open dmuhamedagic opened this issue 1 year ago • 2 comments

Please don't merge, not tested yet.

dmuhamedagic avatar Oct 20 '23 21:10 dmuhamedagic

@dmuhamedagic Hi, I was thinking about this PR whole yesterday and was asking myself if same couldn't be achieved by having generic option for ticket called (for example) "notify-script" which would contain path to executable file (most probably shell script, but for this crmv1 it may make sense to have it written in python) which would be executed on ticket acquire/loss? This would allow us to simplify code a lot, and specially get rid of bigger changes in C, give us generic functionality and solve (or at least partly solve) #99. Also such functionality would be probably really used even with pcmk and crmv1 could be great example how to use such notify functionality.

But I don't want to stop you from having fun with the code, it's great you found time to write some booth code again ;) so take my comment just as my opinion/idea which you may like and maybe not.

jfriesse avatar Oct 24 '23 07:10 jfriesse

Hi Jan,

On Tue, Oct 24, 2023 at 12:08:41AM -0700, Jan Friesse wrote:

@dmuhamedagic Hi, I was thinking about this PR whole yesterday and was asking myself if same couldn't be achieved by having generic option for ticket called (for example) "notify-script" which would contain path to executable file (most probably shell script, but for this crmv1 it may make sense to have it written in python) which would be executed on ticket acquire/loss? This would allow us to simplify code a lot, and specially get rid of bigger changes in C, give us generic functionality and solve (or at least partly solve) #99. Also such functionality would be probably really used even with pcmk and crmv1 could be great example how to use such notify functionality.

This actually includes some refactoring which improves the C code.

But, if you find a better solution, I'm all for it! My only need is the need for the functionality :)

Cheers,

Dejan

dmuhamedagic avatar Oct 24 '23 11:10 dmuhamedagic