<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" id="owaParaStyle"></style>
</head>
<body fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Courier New;color: #000000;font-size: 12pt;">
Hello,
<div><br>
</div>
<div>As you are talking about how to distinguish the request to local Neutron and central Neutron, do you mean how to set the "USER_AGENT" in the request header, and how to extract the "USER_AGENT" and stored it in the context? Though it's mentioned in https://developer.openstack.org/sdks/python/openstacksdk/users/connection.html</div>
<div><br>
</div>
<div>This field has not been extracted neither in oslo.context, nor neutron-lib context:</div>
<div><br>
</div>
<div><a href="https://github.com/openstack/oslo.context/blob/master/oslo_context/context.py" target="_blank">https://github.com/openstack/oslo.context/blob/master/oslo_context/context.py</a></div>
<div><a href="https://github.com/openstack/neutron-lib/blob/master/neutron_lib/context.py" target="_blank" style="font-size: 12pt;">https://github.com/openstack/neutron-lib/blob/master/neutron_lib/context.py</a> </div>
<div>
<div><br>
</div>
<div>May be we can add it in oslo.context?</div>
<div><br>
<div style="font-family:Tahoma; font-size:13px">
<div>
<div><font size="3" face="Courier New">Best Regards</font></div>
<font size="3" face="Courier New">Chaoyi Huang (joehuang)</font></div>
</div>
</div>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div id="divRpF188906" style="direction: ltr;"><font face="Tahoma" size="2" color="#000000"><b>From:</b> XuZhuang [xu_lyman@163.com]<br>
<b>Sent:</b> 01 November 2017 19:49<br>
<b>To:</b> openstack-dev@lists.openstack.org<br>
<b>Subject:</b> [openstack-dev] [tricircle]Distinguish the direction of requests<br>
</font><br>
</div>
<div></div>
<div>
<div style="line-height:1.7; color:#000000; font-size:14px; font-family:Arial">
<div>Hello,</div>
<div><br>
</div>
<div><style type="text/css">
<!--
@page
        {margin:2cm}
p
        {margin-bottom:0.25cm;
        line-height:120%}
-->
</style>
<p style="margin-bottom:0cm; line-height:100%"><font face="Liberation Serif, serif"><font style="font-size:12pt"><span lang="en-US">I have some questions in how to distinguish the direction of requests between local neutron and central neutron.</span></font></font></p>
<p style="margin-bottom:0cm; line-height:100%"><br>
</p>
<p style="margin-bottom:0cm; line-height:100%"><font face="Liberation Serif, serif"><font style="font-size:12pt"><span lang="en-US">There is the preliminary plan</span></font></font></p>
<p style="margin-bottom:0cm; line-height:100%"><br>
</p>
<p style="margin-bottom:0cm; line-height:100%"><font face="Liberation Serif, serif"><font style="font-size:12pt"><span lang="en-US">1. For how to distinguish the requests in central neutron</span></font></font></p>
<p style="margin-bottom:0cm; line-height:100%"><font face="Liberation Serif, serif"><font style="font-size:12pt"><span lang="en-US">we can add a filter in neutron/…./etc/api-paste.ini. Using this filter we can get some values about the source.</span></font></font></p>
<p style="margin-bottom:0cm; line-height:100%"><font face="Liberation Serif, serif"><font style="font-size:12pt"><span lang="en-US">But the question is that the process of loading filter is in Neutron. Without changing Neutron how could we add a filter? Could
 we change Neutron?</span></font></font></p>
<p style="margin-bottom:0cm; line-height:100%"><br>
</p>
<p style="margin-bottom:0cm; line-height:100%"><font face="Liberation Serif, serif"><font style="font-size:12pt"><span lang="en-US">2. For how to add a signal in the requests</span></font></font></p>
<p style="margin-bottom:0cm; line-height:100%"><font face="Liberation Serif, serif"><font style="font-size:12pt"><span lang="en-US">The module of common.client in Tricircle is responsible for sending requests. So we can add a signal in the header of requests.
 And central plugin will get this signal using the filter.</span></font></font></p>
<p style="margin-bottom:0cm; line-height:100%"><font face="Liberation Serif, serif"><font style="font-size:12pt"><span lang="en-US"><br>
</span></font></font></p>
<div style="font-family:Tahoma; font-size:13px"><font size="3" face="Courier New">Best Regards</font></div>
<p style="margin-bottom:0cm; line-height:100%"><font size="3" face="Courier New">Zhuangzhuang Xu (Lyman Xu)</font></p>
</div>
</div>
<br>
<br>
<span title="neteasefooter">
<p> </p>
</span></div>
</div>
</div>
</div>
</body>
</html>