For the first question, since api-paste.ini is a configuration file, you can just add your new filter to the configuration file so your filter can take effect. As Joe suggests, you can add embed the information in the oslo.context object so plugin can get it from context which is passed to plugin. On Fri, 3 Nov 2017 at 12:29 joehuang <joehuang at huawei.com> wrote: > Hello, > > 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 > > This field has not been extracted neither in oslo.context, nor neutron-lib > context: > > > https://github.com/openstack/oslo.context/blob/master/oslo_context/context.py > https://github.com/openstack/neutron-lib/blob/master/neutron_lib/context.py > > > May be we can add it in oslo.context? > > Best Regards > Chaoyi Huang (joehuang) > ------------------------------ > *From:* XuZhuang [xu_lyman at 163.com] > *Sent:* 01 November 2017 19:49 > *To:* openstack-dev at lists.openstack.org > *Subject:* [openstack-dev] [tricircle]Distinguish the direction of > requests > > Hello, > > I have some questions in how to distinguish the direction of requests > between local neutron and central neutron. > > > There is the preliminary plan > > > 1. For how to distinguish the requests in central neutron > > we can add a filter in neutron/…./etc/api-paste.ini. Using this filter we > can get some values about the source. > > 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? > > > 2. For how to add a signal in the requests > > 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. > > > Best Regards > > Zhuangzhuang Xu (Lyman Xu) > > > > __________________________________________________________________________ > OpenStack Development Mailing List (not for usage questions) > Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev > -- BR Zhiyuan -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20171105/3aa7d32c/attachment.html>