python API: work towards python/vpp api separation 70/5570/4
authorKlement Sekera <ksekera@cisco.com>
Wed, 1 Mar 2017 08:53:19 +0000 (09:53 +0100)
committerOle Trøan <otroan@employees.org>
Fri, 3 Mar 2017 07:58:23 +0000 (07:58 +0000)
commit7112c542eac53d28861062b13b602a2817dc4052
tree103512272737c2088c8603645c96555fe1c4a594
parenta80ab84531fb1abd1e896d1adfa7e50fed80db39
python API: work towards python/vpp api separation

This change improves vpp_papi behaviour by introducing alternate way of
calling vpp APIs.

The common code is the same:

vpp = VPP(...)
vpp.connect(...)

Calling VPP API is different, instead of deprecated:

vpp.show_version() # deprecated

one should write

vpp.api.show_version()

this allows VPP messages like "connect" and "disconnect" to be used,
once the old API is dropped (in 17.07). Also part of this patch is a
check for name conflict, to prevent VPP object overwriting its own
functionality with generated code based on json files.

Change-Id: I22e573b6a45f8b2a1f0340c5c2597c194fe42ca4
Signed-off-by: Klement Sekera <ksekera@cisco.com>
src/vpp-api/python/vpp_papi/vpp_papi.py
test/vpp_papi_provider.py