<div dir="ltr">Patch work in progress [1] but local test fails [2].<div><br></div><div>It seems to be caused by the mock_sync.</div><div><br></div><div>I'm still looking into it. Any help would be appreciated.<div><br></div><div>[1] <a href="https://review.openstack.org/#/c/362525">https://review.openstack.org/#/c/362525</a> </div><div>[2] <a href="http://pastebin.com/iepqxUAP">http://pastebin.com/iepqxUAP</a></div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Aug 29, 2016 at 4:59 PM Yujun Zhang <<a href="mailto:zhangyujun%2Bzte@gmail.com">zhangyujun+zte@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks, Alexey. <span style="line-height:1.5">Point 1 and 3 are pretty clear.</span><div><br><div><span style="line-height:1.5">As for point 2, if I understand it correctly, you are suggesting to modify the </span><span style="color:rgb(31,73,125);font-family:calibri,sans-serif;font-size:14.6667px;line-height:22px">static_physical.yaml </span><span style="line-height:1.5">as following</span></div><pre style="font-family:menlo;font-size:9pt"><span style="background-color:rgb(237,252,237)">entities:<br></span><span style="background-color:rgb(237,252,237)"> - type: switch<br></span><span style="background-color:rgb(237,252,237)">   name: switch-1<br></span><span style="background-color:rgb(237,252,237)">   id: switch-1 # should be same as name<br></span><span style="background-color:rgb(237,252,237)">   state: available<br></span><span style="background-color:rgb(237,252,237)">   relationships:<br></span><span style="background-color:rgb(237,252,237)">     - type: nova.host<br></span><span style="background-color:rgb(237,252,237)">       name: host-1<br></span><span style="background-color:rgb(237,252,237)">       id: host-1 # should be same as name
</span><span style="font-size:9pt;line-height:1.5;background-color:rgb(237,252,237)"><b>       is_source: true # entity is `source` in this relationship
</b></span><span style="font-size:9pt;line-height:1.5;background-color:rgb(237,252,237)">       relation_type: attached
</span><span style="font-size:9pt;line-height:1.5;background-color:rgb(237,252,237)">     - type: switch
</span><span style="font-size:9pt;line-height:1.5;background-color:rgb(237,252,237)">       name: switch-2
</span><span style="font-size:9pt;line-height:1.5;background-color:rgb(237,252,237)">       id: switch-2 # should be same as name
</span><b><span style="font-size:9pt;line-height:1.5;background-color:rgb(237,252,237)">       is_source: false # </span><span style="font-size:9pt;line-height:1.5;background-color:rgb(237,252,237)">entity is `target` in this relationship</span><span style="font-size:9pt;line-height:1.5;background-color:rgb(237,252,237)"><br></span></b><span style="font-size:9pt;line-height:1.5;background-color:rgb(237,252,237)">       relation_type: backup</span></pre>But I wonder why the static physical configuration file use a different format from vitrage template definitions[1]<div><br></div><div>[1] <a href="https://github.com/openstack/vitrage/blob/master/doc/source/vitrage-template-format.rst" target="_blank">https://github.com/openstack/vitrage/blob/master/doc/source/vitrage-template-format.rst</a></div></div></div><div dir="ltr"><div><div><div><br><div class="gmail_quote"><div dir="ltr">On Sun, Aug 28, 2016 at 4:14 PM Weyl, Alexey (Nokia - IL) <<a href="mailto:alexey.weyl@nokia.com" target="_blank">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">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Hi Yujun,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">In order for the static_physical to work for different datasources without the restrictions, you need to do the following changes:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Go to the static_physical transformer:<u></u><u></u></span></p>
<p><u></u><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><span>1.<span style="font:7.0pt "Times New Roman"">      
</span></span></span><u></u><span dir="LTR"></span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Remove the methods: _register_relations_direction, _find_relation_direction_source.<u></u><u></u></span></p>
<p><u></u><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><span>2.<span style="font:7.0pt "Times New Roman"">      
</span></span></span><u></u><span dir="LTR"></span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Add to the static_physical.yaml for each definition also a field for direction which will indicate the source and the destination
 between the datasources.<u></u><u></u></span></p>
<p><u></u><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><span>3.<span style="font:7.0pt "Times New Roman"">      
</span></span></span><u></u><span dir="LTR"></span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">In method: _create_neighbor, remove the usage of method _find_relation_direction_source, and use the new definition from the
 yaml file here to decide the edge direction.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Is it ok?<u></u><u></u></span></p>
<p><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Yujun Zhang [mailto:<a href="mailto:zhangyujun%2Bzte@gmail.com" target="_blank">zhangyujun+zte@gmail.com</a>]
<br>
<b>Sent:</b> Friday, August 26, 2016 4:22 AM</span></p></div></div></div></div></div><div lang="EN-US" link="blue" vlink="purple"><div><div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt"><div><div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in"><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""><br>
<b>To:</b> OpenStack Development Mailing List (not for usage questions)<br>
<b>Subject:</b> Re: [openstack-dev] [vitrage] relationship_type in static_datasources<u></u><u></u></span></p></div></div></div></div></div><div lang="EN-US" link="blue" vlink="purple"><div><div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">Lost in the code...It seems the datasource just construct the entities and send them over event bus to entity graph processor. I need to dig further to find out the exact point the "backup" relationship is filtered.<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I think we should some how keep the validation of relationship type. It is so easy to make typo when creating the template manually (I did this quite often...).<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">My idea is to delegate the validation to datasource instead of enumerating all constants it in evaluator. I think this will introduce better extensibility. Any comments?<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">On Thu, Aug 25, 2016 at 1:32 PM Weyl, Alexey (Nokia - IL) <<a href="mailto:alexey.weyl@nokia.com" target="_blank">alexey.weyl@nokia.com</a>> wrote:<u></u><u></u></p>
</div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Hi Yujun,</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">You can find the names of the lables in the constants.py file.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">In addition, the restriction on the physical_static datasource is done in it’s driver.py.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Alexey</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Yujun Zhang [mailto:<a href="mailto:zhangyujun%2Bzte@gmail.com" target="_blank">zhangyujun+zte@gmail.com</a>]
<br>
<b>Sent:</b> Thursday, August 25, 2016 4:50 AM<br>
<b>To:</b> OpenStack Development Mailing List (not for usage questions)<br>
<b>Subject:</b> Re: [openstack-dev] [vitrage] relationship_type in static_datasources</span><u></u><u></u></p>
</div>
</div>
</div>
</div>
</div>
<div>
<div>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<p class="MsoNormal"> <u></u><u></u></p>
<div>
<p class="MsoNormal">Hi, Ifat,<u></u><u></u></p>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
<div>
<p class="MsoNormal">I searched for edge_labels in the project. It seems it is validated only in `vitrage/evaluator/template_validation/template_syntax_validator.py`. Where is such restriction applied
 in static_datasources?<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">--<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Yujun<u></u><u></u></p>
</div>
</div>
</div>
<p class="MsoNormal"> <u></u><u></u></p>
<div>
<div>
<p class="MsoNormal">On Wed, Aug 24, 2016 at 3:19 PM Afek, Ifat (Nokia - IL) <<a href="mailto:ifat.afek@nokia.com" target="_blank">ifat.afek@nokia.com</a>> wrote:<u></u><u></u></p>
</div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt">
<div>
<div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:black">Hi Yujun,</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:black"> </span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:black">Indeed, we have some restrictions on the relationship types that can be used in the static datasources.
 I think we should remove these restrictions, and allow any kind of relationship type.</span><u></u><u></u></p>
</div>
</div>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:black"> </span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:black">Best regards,</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:black">Ifat.</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:black"> </span><u></u><u></u></p>
</div>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-family:"Calibri","sans-serif";color:black">From:
</span></b><span style="font-family:"Calibri","sans-serif";color:black">Yujun Zhang<br>
<b>Date: </b>Monday, 22 August 2016 at 08:37</span><u></u><u></u></p>
</div>
</div>
<div>
<blockquote style="border:none;border-left:solid #b5c4df 4.5pt;padding:0in 0in 0in 4.0pt;margin-left:3.75pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt">
<div>
<div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:black">I'm following the sample configuration in docs [1] to verify how static datasources works.</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:black"> </span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:black">It seems `backup` relationship is not displayed in the entity graph view and neither is it included
 in topology show.</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:black"> </span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:black">There is an enumeration for edge labels [2]. Should relationship in static datasource be limited to
 it?</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:black"> </span><u></u><u></u></p>
</div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:black">[1]
<a href="https://github.com/openstack/vitrage/blob/master/doc/source/static-physical-config.rst" target="_blank">
https://github.com/openstack/vitrage/blob/master/doc/source/static-physical-config.rst</a></span><u></u><u></u></p>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:black">[2] <a href="https://github.com/openstack/vitrage/blob/master/vitrage/common/constants.py#L49" target="_blank">https://github.com/openstack/vitrage/blob/master/vitrage/common/constants.py#L49</a></span><u></u><u></u></p>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal">__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" target="_blank">
OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><u></u><u></u></p>
</blockquote>
</div>
</div>
</div>
</div>
<p class="MsoNormal">__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" target="_blank">
OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><u></u><u></u></p>
</blockquote>
</div>
</div></div></div>

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