[openstack-dev] [tricircle]Distinguish the direction of requests

joehuang joehuang at huawei.com
Fri Nov 3 04:29:22 UTC 2017


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:


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


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)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20171103/eaf13560/attachment.html>

More information about the OpenStack-dev mailing list