<div dir="ltr">Another question, how do we describe an entity from <b>another</b> datasource in static datasource config?<div><br></div><div>In the test resources of static_physical datasource, it seems to be referred as following. Does it means that it will be `nova.host` to find the matched resource? If so, how will `nova.host` identify the resource, by name or by id?</div><div><pre style="background-color:rgb(43,43,43);color:rgb(169,183,198);font-family:menlo;font-size:9pt"><span style="color:rgb(204,120,50);font-weight:bold">relationships:<br></span><span style="color:rgb(204,120,50);font-weight:bold">  </span>- <span style="color:rgb(204,120,50);font-weight:bold">type: </span>nova.host<br>    <span style="color:rgb(204,120,50);font-weight:bold">name: </span>host-2<br>    <span style="color:rgb(204,120,50);font-weight:bold">id: </span>2<br>    <span style="color:rgb(204,120,50);font-weight:bold">relation_type: </span>attached</pre></div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Dec 1, 2016 at 9:50 PM Weyl, Alexey (Nokia - IL) <<a href="mailto:alexey.weyl@nokia.com">alexey.weyl@nokia.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-US" link="blue" vlink="purple" class="gmail_msg">
<div class="m_5415129501144670168WordSection1 gmail_msg">
<p class="MsoNormal gmail_msg"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" class="gmail_msg">Hi Yujun,<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" class="gmail_msg"><u class="gmail_msg"></u> <u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" class="gmail_msg">Get_all does returns a list of entities to be sent.<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" class="gmail_msg"><u class="gmail_msg"></u> <u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" class="gmail_msg">Each event that is sent from the driver to the processor contains also all the details of the neighbors that it connects to.<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" class="gmail_msg">For example, the event and data that we receive from nova about an instance also contains the host (compute) that it sits on, and that is how we decide to connect
 it to the correct host.<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" class="gmail_msg"><u class="gmail_msg"></u> <u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" class="gmail_msg">I think it is ok that the event of static (from driver to the processor) will contain for each entity it neighbors that it is supposed to be connected to.<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" class="gmail_msg"><u class="gmail_msg"></u> <u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" class="gmail_msg">BR,<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" class="gmail_msg">Alexey<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" class="gmail_msg"><u class="gmail_msg"></u> <u class="gmail_msg"></u></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt" class="gmail_msg">
<div class="gmail_msg">
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in" class="gmail_msg">
<p class="MsoNormal gmail_msg"><b class="gmail_msg"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"" class="gmail_msg">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"" class="gmail_msg"> Yujun Zhang [mailto:<a href="mailto:zhangyujun%2Bzte@gmail.com" class="gmail_msg" target="_blank">zhangyujun+zte@gmail.com</a>]
<br class="gmail_msg">
<b class="gmail_msg">Sent:</b> Thursday, December 01, 2016 3:20 PM<br class="gmail_msg">
<b class="gmail_msg">To:</b> OpenStack Development Mailing List (not for usage questions)<br class="gmail_msg">
<b class="gmail_msg">Subject:</b> [ALU] [openstack-dev] [vitrage] datasource driver returns entities only?<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
</div>
</div></div></div></div><div lang="EN-US" link="blue" vlink="purple" class="gmail_msg"><div class="m_5415129501144670168WordSection1 gmail_msg"><div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt" class="gmail_msg">
<p class="MsoNormal gmail_msg"><u class="gmail_msg"></u> <u class="gmail_msg"></u></p>
<div class="gmail_msg">
<p class="MsoNormal gmail_msg">During the implementation of static datasource driver[1], I got a question on the return format of `get_all` method.<u class="gmail_msg"></u><u class="gmail_msg"></u></p>
<div class="gmail_msg">
<p class="MsoNormal gmail_msg"><u class="gmail_msg"></u> <u class="gmail_msg"></u></p>
</div>
<div class="gmail_msg">
<p class="MsoNormal gmail_msg">If I understand correctly, it should return a list of entities to be sent to the queue. Does it infer that the relationship should be embedded in entity, just like the legacy static_physical datasource?<u class="gmail_msg"></u><u class="gmail_msg"></u></p>
</div>
<div class="gmail_msg">
<p class="MsoNormal gmail_msg"><u class="gmail_msg"></u> <u class="gmail_msg"></u></p>
</div>
<div class="gmail_msg">
<p class="MsoNormal gmail_msg">Suppose a link between two switches are created, how should we emit this change in `get_all` or `get_changes`?<u class="gmail_msg"></u><u class="gmail_msg"></u></p>
</div>
<div class="gmail_msg">
<p class="MsoNormal gmail_msg"><u class="gmail_msg"></u> <u class="gmail_msg"></u></p>
</div>
<div class="gmail_msg">
<p class="MsoNormal gmail_msg">Currently I made a compromise by emitting the relationship as an update of the connected entity. This is not very elegant and it seems we are going back to the legacy static_physical datasource.<u class="gmail_msg"></u><u class="gmail_msg"></u></p>
</div>
<div class="gmail_msg">
<p class="MsoNormal gmail_msg"><u class="gmail_msg"></u> <u class="gmail_msg"></u></p>
</div>
<div class="gmail_msg">
<p class="MsoNormal gmail_msg">[1] <a href="https://review.openstack.org/#/c/405354/" class="gmail_msg" target="_blank">https://review.openstack.org/#/c/405354/</a> <u class="gmail_msg"></u><u class="gmail_msg"></u></p>
</div>
<div class="gmail_msg">
<p class="MsoNormal gmail_msg">--<u class="gmail_msg"></u><u class="gmail_msg"></u></p>
</div>
<div class="gmail_msg">
<p class="MsoNormal gmail_msg">Yujun<u class="gmail_msg"></u><u class="gmail_msg"></u></p>
</div>
</div>
</div></div></div><div lang="EN-US" link="blue" vlink="purple" class="gmail_msg"><div class="m_5415129501144670168WordSection1 gmail_msg"><div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt" class="gmail_msg"></div>
</div>
</div>

__________________________________________________________________________<br class="gmail_msg">
OpenStack Development Mailing List (not for usage questions)<br class="gmail_msg">
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" class="gmail_msg" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br class="gmail_msg">
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" class="gmail_msg" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br class="gmail_msg">
</blockquote></div>