Method to refresh the ems is not synchronous


#1

Hi guys!
I found that method to refresh the ems is not synchronous (OpenStack for my case). I need to wait some time before I get the updated data. This is true for built-in method:
/System/event_handlers/event_action_refresh?target=ems

as well as for the method of the corresponding object (ems.refresh). Now I use the following snippet to resolve this issue:

ems = $evm.root[‘event_stream’].ext_management_system
ems.refresh
sleep(20)

but as you know it is not correct. Maybe there’s some way of pulling for this task ?


#2

@gmccullough can you review this question from @igortiunov and forward to a SME if necessary.


#3

There is ems.last_refresh_date that gives you a hint of when the latest refresh finished. But it is not reliable because it could be a result of a refresh issued by someone else.