Ask Your Question
0

When doing a long running operation in Horizon, how do I notify the user of the result

asked 2015-03-18 05:05:55 -0500

Remko Duppen gravatar image

In our inhouse stack (running Icehouse) I've added logic to automatically register new instances in dns using Designate
This works quite nice, but the designate operations take a few seconds to complete, therefore I added the option to run this in a separate thread (like glance create image). This all works quite nice, but what I would like to do is notify the user that the operation has been competed successfully or more important notify the end user of any problems. I've added a call to messages.info() at the end of the method and that obviously works when not spawning a new thread, but when using a thread the notfication never pops up. Is there a way to handle this in Horizon ?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2015-03-25 12:12:53 -0500

david-lyle gravatar image

There is not a push notification mechanism in Horizon, only pull. I'm not sure adding the message on a separate thread will work because it's being added to a request that is not longer the active request.

The only way to accomplish that now is the poll for results from the API. Much like the instances tables does, https://github.com/openstack/horizon/...

It's an area of improvement in Horizon we're trying to address.

edit flag offensive delete link more

Comments

ok, clear, thanks for the info, I switched from using bind9 to powerdns and now registering ip addresses in designate takes almost no time at all, I suspect the bind9 backend needs to generate new zone files, while in powerdns it's just a database action.

Remko Duppen gravatar imageRemko Duppen ( 2015-03-30 17:51:20 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2015-03-18 05:05:55 -0500

Seen: 268 times

Last updated: Mar 25 '15