<div dir="ltr"><div>Hi Gleb:</div><div><br></div><div>Please check the OSC version you are using. The OSC extension for Trunks is in the neutron-pythonclient project. And in particular, the support for the "description" parameter was added in [1]. This is the output in a system using master branches: [2].<br></div><div><br></div><div>In any case, what you need in "contrail-neutron-plugin" is what the API is returning. Don't mix the OSC output and the API. If you execute [3] (as commented in my previous mail), you'll see the "description" parameter (and others). This is what the plugin is retrieving and the information you'll handle. Again, please check the "fields" parameter in order not to select a limited set of fields, discarding what you are looking for. Place a debug line after the API call to check what you are receiving.</div><div><br></div><div>Regards.<br></div><div><br></div><div>[1]<a href="https://review.opendev.org/c/openstack/python-neutronclient/+/362614">https://review.opendev.org/c/openstack/python-neutronclient/+/362614</a></div><div>[2]<a href="https://paste.opendev.org/show/bZbnOaKSvGDR6vbR4ITM/">https://paste.opendev.org/show/bZbnOaKSvGDR6vbR4ITM/</a></div><div>[3]<a href="https://paste.opendev.org/show/bh1QD8VqLz4OKMKYBXUa/">https://paste.opendev.org/show/bh1QD8VqLz4OKMKYBXUa/</a></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, May 11, 2022 at 6:55 AM Gleb Zimin <<a href="mailto:gzimin@mirantis.com">gzimin@mirantis.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"><div dir="ltr">Thanks for reply, Rodolfo.<br><br>When I want to show exact trunk, there is none of standard params.<br>$ openstack network trunk show trunk1<br>+----------------+--------------------------------------+<br>| Field          | Value                                |<br>+----------------+--------------------------------------+<br>| admin_state_up | UP                                   |<br>| id             | 96babd03-8d5c-4b80-9118-b5e0a0e8d98d |<br>| name           | trunk1                               |<br>| port_id        | b61ac310-35a6-41b6-9af1-8c25f73dec06 |<br>| project_id     | 2923ed63b7934e4b89ce60bfe78dfd87     |<br>| status         | DOWN                                 |<br>| sub_ports      |                                      |<br>| tenant_id      | 2923ed63b7934e4b89ce60bfe78dfd87     |<br>+----------------+--------------------------------------+<br><br>Also, if I want to set description to the trunk, I get this:<br>$ openstack network trunk set trunk1 --description test<br>Failed to set trunk 'trunk1': Unrecognized attribute(s) 'description'<br>Neutron server returns request_ids: ['req-1aca1b69-fa75-466d-aef9-eb0786463555']<br><br>This request fails on neutron side, it appears before request proceeded on the contrail-neutron-plugin side.<br><a href="https://github.com/openstack/neutron-lib/blob/master/neutron_lib/api/attributes.py#L284" target="_blank">https://github.com/openstack/neutron-lib/blob/master/neutron_lib/api/attributes.py#L284</a><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, May 6, 2022 at 7:13 PM Rodolfo Alonso Hernandez <<a href="mailto:ralonsoh@redhat.com" target="_blank">ralonsoh@redhat.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"><div dir="ltr"><div>Hello Gleb:</div><div><br></div><div>The OC plugin is using the Neutron API to execute operations on the server. The "get_trunk" method calls "_get_resource" [1]. I've tested the Neutron API and this is what you get from the API: [2]. All standard attributes are returned.<br></div><div><br></div><div>Maybe this could be related to the "fields" parameter you are passing in the method [3]. Check if you are filtering the API call and only retrieving a certain subset of fields.</div><div><br></div><div>Regards.<br></div><div><br></div><div>[1]<a href="https://gerrit.tungsten.io/r/gitweb?p=tungstenfabric/tf-neutron-plugin.git;a=blob;f=neutron_plugin_contrail/plugins/opencontrail/contrail_plugin.py;h=80104f1e673eb4583f7a15707c3590c510fd7667;hb=refs/heads/master#l326" target="_blank">https://gerrit.tungsten.io/r/gitweb?p=tungstenfabric/tf-neutron-plugin.git;a=blob;f=neutron_plugin_contrail/plugins/opencontrail/contrail_plugin.py;h=80104f1e673eb4583f7a15707c3590c510fd7667;hb=refs/heads/master#l326</a></div><div>[2]<a href="https://paste.opendev.org/show/bh1QD8VqLz4OKMKYBXUa/" target="_blank">https://paste.opendev.org/show/bh1QD8VqLz4OKMKYBXUa/</a></div><div>[3]<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#l50" 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#l50</a></div><div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, May 6, 2022 at 4:35 PM Gleb Zimin <<a href="mailto:gzimin@mirantis.com" target="_blank">gzimin@mirantis.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"><div dir="ltr">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" 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" 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></div>
</blockquote></div>
</blockquote></div>
</blockquote></div>