Thanks for reply, Rodolfo.
When I want to show exact trunk, there is none of standard params.
$ openstack network trunk show trunk1
+----------------+--------------------------------------+
| Field | Value |
+----------------+--------------------------------------+
| admin_state_up | UP |
| id | 96babd03-8d5c-4b80-9118-b5e0a0e8d98d |
| name | trunk1 |
| port_id | b61ac310-35a6-41b6-9af1-8c25f73dec06 |
| project_id | 2923ed63b7934e4b89ce60bfe78dfd87 |
| status | DOWN |
| sub_ports | |
| tenant_id | 2923ed63b7934e4b89ce60bfe78dfd87 |
+----------------+--------------------------------------+
Also, if I want to set description to the trunk, I get this:
$ openstack network trunk set trunk1 --description test
Failed to set trunk 'trunk1': Unrecognized attribute(s) 'description'
Neutron server returns request_ids: ['req-1aca1b69-fa75-466d-aef9-eb0786463555']
This request fails on neutron side, it appears before request proceeded on the contrail-neutron-plugin side.
https://github.com/openstack/neutron-lib/blob/master/neutron_lib/api/attributes.py#L284On Fri, May 6, 2022 at 7:13 PM Rodolfo Alonso Hernandez <ralonsoh@redhat.com> wrote:Hello Gleb: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.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.Regards.On Fri, May 6, 2022 at 4:35 PM Gleb Zimin <gzimin@mirantis.com> wrote:Environment: Openstack Victoria, OpenContrail (TungstenFabric) R2011.
Problem: Trunk ports doesn't have standard attributes such as description, timestamp.
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. 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
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.
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. https://github.com/openstack/neutron/blob/master/neutron/services/trunk/models.py#L26
In case of OpenContrail+OpenStack Trunk plugin only redirect requests.
What can I do to make Contrail Trunk plugin works in the same way?
I'll appreciate any help. Thanks in advance.