PAPI: Cache connected client instances 79/30179/48
authorVratko Polak <vrpolak@cisco.com>
Tue, 15 Dec 2020 12:39:56 +0000 (13:39 +0100)
committerVratko Polak <vrpolak@cisco.com>
Thu, 17 Dec 2020 12:28:57 +0000 (12:28 +0000)
Disconnect+connect cycle is expensive and slow.
This change tracks connected client instances
so later "connect" to the same target uses it.

Explicit disconnects are allowed (and executed before VPP ends),
but once again disconnected instances are cached and reused,
as creating a new instance is more expensive than just connect.

+ Add missing checks on interfaces being up to appropriate keyword.
 + Use appropriate keywords.
 + Add a comment explaining why a simpler keyword is not appropriate.
+ Improve VPP checks in containers.
 + Fix the vppctl check to actually work.
 + Add PAPI check to ensure VPP is really ready.
 + Delay/reorder checks to make them faster with multiple containers.
 + Leave some TODOs to improve various lifecycles later.
+ As we do not stop VPP in test/suite teardown:
 + One final disconnect is needed, added to __init__.robot teardowns.
 - Import of the final disconnect keyword is ugly, but it works.
- We could use a hashable class for distinguishing node+socket pairs.
- Are we connecting to VPP inside VMs?

Change-Id: I49cd726740c3e8cae1591c7c84b85a447241228f
Signed-off-by: Vratko Polak <vrpolak@cisco.com>

No differences found