When a show/delete operation is executed using OpenStack Client, the OpenStack SDK will try first to retrieve the object.
If the identification given is the ID, Neutron server will call plugin.NeutronDBPluginV2.get_port(id) and will return the object or the exception NotFound.
If the identification given is the name, the Neutron server will return always the exception NotFound. Then the SDK will retrieve all ports (long query and subsequent process) and then will select those ones with the requested name. The process of retrieving the whole port list is inefficient and takes a lot of time if the port list is too big. In my case, 1K ports --> 40 secs.
I'll propose a list of patches to solve this problem.
Hello:
When a show/delete operation is executed using OpenStack Client, the OpenStack SDK will try first to retrieve the object.
If the identification given is the ID, Neutron server will call plugin. NeutronDBPlugin V2.get_ port(id) and will return the object or the exception NotFound.
If the identification given is the name, the Neutron server will return always the exception NotFound. Then the SDK will retrieve all ports (long query and subsequent process) and then will select those ones with the requested name. The process of retrieving the whole port list is inefficient and takes a lot of time if the port list is too big. In my case, 1K ports --> 40 secs.
I'll propose a list of patches to solve this problem.