<br><font size=2 face="sans-serif">Hi Weyl Alexey,</font>
<br>
<br><font size=2 face="sans-serif">Another question:</font>
<br><font size=2 face="sans-serif">If we received the alarm.creation notification
with the 'ok' state, we filter it and don't create vertex in the Graph.</font>
<br><font size=2 face="sans-serif">The next received the alarm state_change
notification, all the other alarm details are missing in the vertex.</font>
<br><font size=2 face="sans-serif">How can I handle this? Thanks~</font>
<br>
<br>
<br><font size=2 face="sans-serif">BR,</font>
<br><font size=2 face="sans-serif">dwj<br>
</font><font size=3><br>
<br>
</font>
<br>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=36%><font size=1 face="sans-serif"><b>"Weyl, Alexey (Nokia
- IL)" <alexey.weyl@nokia.com></b> </font>
<p><font size=1 face="sans-serif">2016-11-24 16:25</font>
<td width=63%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">收件人</font></div>
<td><font size=1 face="sans-serif">"dong.wenjuan@zte.com.cn"
<dong.wenjuan@zte.com.cn>, "Afek, Ifat (Nokia - IL)" <ifat.afek@nokia.com>,
"Hefetz, Idan (Nokia - IL)" <idan.hefetz@nokia.com>, "zhang.yujunz@zte.com.cn"
<zhang.yujunz@zte.com.cn></font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">抄送</font></div>
<td><font size=1 face="sans-serif">"openstack-dev@lists.openstack.org"
<openstack-dev@lists.openstack.org></font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">主题</font></div>
<td><font size=1 face="sans-serif">RE: [openstack-dev] [vitrage] about
aodh alarm notification</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><font size=2><tt>Hi Dong,<br>
<br>
Good question, I will explain how you can handle this problem in Vitrage.<br>
<br>
You don't need the cache mechanism here, it is much more simplier.<br>
<br>
When you get a new alarm with get_all or by notification of 'alarm.creation'
you will create the alarm with its correct data \ properties.<br>
Then when you receive a notification of 'alarm.rule_change', 'alarm.state_transition',
'alarm.deletion' all you need to do is only to update the correct property
that has changed in the aodh vertex.<br>
Thus, When you create the Vertex in the transformer, you know the aodh
uuid so you know the vitrage_id, and you can pass only the properties that
you have received and want to update (and not all the properties that there
in the aodh vertex). All the other properties that you haven't received
that haven't changed you can pass them as None and they won't be changed
in the graph.<br>
<br>
Hope this explains everything.<br>
If you have other questions, you are more than welcome to ask.<br>
<br>
Best Regrads,<br>
Alexey<br>
<br>
<br>
From: dong.wenjuan@zte.com.cn [mailto:dong.wenjuan@zte.com.cn] <br>
Sent: Thursday, November 24, 2016 9:39 AM<br>
To: Afek, Ifat (Nokia - IL); Weyl, Alexey (Nokia - IL); Hefetz, Idan (Nokia
- IL); zhang.yujunz@zte.com.cn<br>
Cc: openstack-dev@lists.openstack.org<br>
Subject: [openstack-dev] [vitrage] about aodh alarm notification<br>
<br>
<br>
Hi Vitrages, <br>
<br>
Currently there are four aodh alarm notifications we need to handle: <br>
'alarm.creation', 'alarm.rule_change', 'alarm.state_transition', 'alarm.deletion'
<br>
<br>
Only the alarm.creation notification carries the alarm detail info. <br>
So we need to cache the alarm info. <br>
When we receive other notifications, we can fill all fields from the cache.
<br>
<br>
But if the alarm creates before vitrage servies startup, we can't get the
alarm.creation notification. <br>
So we need to get_all when vitrage services startup. <br>
As `SnapshotsService` will get all alarms info when it startup. <br>
But `SnapshotsService` and `ListenerService` are two services, <br>
they can't share the cache data unless they communicate with each other.
<br>
This wil be a big change. <br>
<br>
Are there any other better solutions? I need some help, thanks :) <br>
<br>
BR, <br>
dwj<br>
</tt></font>
<br>