Run custom script after executing specified API call

asked 2018-07-16 16:43:16 -0600

Damian Dąbrowski gravatar image

Hello,

I'm looking for the simplest way to run custom script after executing specified API call.

For example: when anybody create new project, system will run my custom script.

It would be great if my script will be only executed if project creation completed successfully. (but i think it could be hard due to asynchrony in openstack API).

I would be grateful for any help.

edit retag flag offensive close merge delete

Comments

1

AFAIK OpenStack offers no hooks into the API, but most services (including Keystone) nowadays run as UWSGI applications behind a web server, and it should be possible to interpose your own code between the web server and the OpenStack service.

Bernd Bausch gravatar imageBernd Bausch ( 2018-07-17 00:12:38 -0600 )edit
1

Found this by chance: http://blog.oddbit.com/2014/09/27/int.... Nova seems to have hooks (caveat: This was four years ago).

Bernd Bausch gravatar imageBernd Bausch ( 2018-07-20 19:49:37 -0600 )edit

Bernd, thanks for reply.

Finally, I've decided to use solution based on rabbitmq notifications described here: http://alesnosek.com/blog/2015/05/25/...

Damian Dąbrowski gravatar imageDamian Dąbrowski ( 2018-07-25 09:57:02 -0600 )edit