<div dir="ltr">Hi Akihiro, thanks for reply.<br><br>The thing is that description and other standard attributes don't work only with trunks. I can add descriptions, tags to neutron "core" objects such as networks, subnets, ports etc.<br>Inheriting class StandardAttrDescriptionMixin didn't help, unfortunately.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, May 11, 2022 at 4:16 PM Akihiro Motoki <<a href="mailto:amotoki@gmail.com">amotoki@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Gleb,<br>
<br>
The standard attributes are populated by StandardAttrDescriptionMixin [1].<br>
At a quick glance, the OpenContrail core plugin (both<br>
NeutronPluginContrailCoreV3 or NeutronPluginContrailCoreV2) inherits<br>
NeutronPluginContrailCoreBase [2] which inherits NeutronPluginBaseV2<br>
rather than NeutronDbPluginV2.<br>
Thus, what StandardAttrDescriptionMixin does is not available in your case.<br>
For best case, inheriting StandardAttrDescriptionMixin in the core<br>
plugin addresses your issue, but I am not sure.<br>
<br>
>From the initial implementation of Contrail plugin, Contrail plugin<br>
inherits NeutronPluginBaseV2 instead of NeutronDbPluginV2.<br>
Most logics behind the neutron API are implemented by<br>
NeutronDbPluginV2 and perhaps the OpenStack documentation<br>
assumes how NeutronDbPluginV2 behaves. However, Contrail plugin did<br>
not choose this way and implemented all behaviors<br>
behind the neutron API by its plugin, so Contrail plugin needs to<br>
implement almost all logics in NeutronDbPluginV2 by itself.<br>
I wonder if the issue you hit comes from this situation. I don't know<br>
why this way was chosen but this is the real situation.<br>
<br>
Hope it may help you a bit.<br>
<br>
[1] <a href="https://opendev.org/openstack/neutron/src/branch/master/neutron/db/standardattrdescription_db.py" rel="noreferrer" target="_blank">https://opendev.org/openstack/neutron/src/branch/master/neutron/db/standardattrdescription_db.py</a><br>
[2] <a href="https://gerrit.tungsten.io/r/gitweb?p=tungstenfabric/tf-neutron-plugin.git;a=blob;f=neutron_plugin_contrail/plugins/opencontrail/contrail_plugin_base.py;h=7bb7b54ab7bb35ec2193f2637f622fac8f39aed5;hb=refs/heads/master" rel="noreferrer" target="_blank">https://gerrit.tungsten.io/r/gitweb?p=tungstenfabric/tf-neutron-plugin.git;a=blob;f=neutron_plugin_contrail/plugins/opencontrail/contrail_plugin_base.py;h=7bb7b54ab7bb35ec2193f2637f622fac8f39aed5;hb=refs/heads/master</a><br>
<br>
Thanks,<br>
Akihiro Motoki (amotoki)<br>
<br>
On Fri, May 6, 2022 at 11:34 PM Gleb Zimin <<a href="mailto:gzimin@mirantis.com" target="_blank">gzimin@mirantis.com</a>> wrote:<br>
><br>
> Environment: Openstack Victoria, OpenContrail (TungstenFabric) R2011.<br>
> Problem: Trunk ports doesn't have standard attributes such as description, timestamp.<br>
> I have an environment where core plugin is OpenContrail. OpenContrail has tf-neutron-plugin for proper work with neutron. There is TrunkPlugin, that proxies all trunk-related request to the OpenContrail backend. Here is the link for this plugin. <a href="https://gerrit.tungsten.io/r/gitweb?p=tungstenfabric/tf-neutron-plugin.git;a=blob;f=neutron_plugin_contrail/plugins/opencontrail/services/trunk/plugin.py;h=35fc3310911143fd3b4cf8997c23d0358d652dba;hb=refs/heads/master" rel="noreferrer" target="_blank">https://gerrit.tungsten.io/r/gitweb?p=tungstenfabric/tf-neutron-plugin.git;a=blob;f=neutron_plugin_contrail/plugins/opencontrail/services/trunk/plugin.py;h=35fc3310911143fd3b4cf8997c23d0358d652dba;hb=refs/heads/master</a><br>
> According to the openstack documentation: Resources that inherit from the HasStandardAttributes DB class can automatically have the extensions written for standard attributes (e.g. timestamps, revision number, etc) extend their resources by defining the ‘api_collections’ on their model. These are used by extensions for standard attr resources to generate the extended resources map.<br>
> As I understood, it works only for plugins, which using Openstack database. For example, openstack native trunk plugin has models.py file where we can see this inheritance. <a href="https://github.com/openstack/neutron/blob/master/neutron/services/trunk/models.py#L26" rel="noreferrer" target="_blank">https://github.com/openstack/neutron/blob/master/neutron/services/trunk/models.py#L26</a><br>
> In case of OpenContrail+OpenStack Trunk plugin only redirect requests.<br>
> What can I do to make Contrail Trunk plugin works in the same way?<br>
> I'll appreciate any help. Thanks in advance.<br>
</blockquote></div>