govpp icon indicating copy to clipboard operation
govpp copied to clipboard

Move plugins to own package & improve apigen CLI

Open sknat opened this issue 3 years ago • 0 comments

This patch moves the binapigenerator plugins to their own package.

  • It capitalizes the methods they leverage.
  • It changes the way plugins are called, passing the whole generator at once and letting the plugin themselves loop on the files. This allow for more variety in filtering, aggregation, etc...

This patch also proposes an evolution to the binapigen CLI in order to make it more user-friendly for newcomers as well as build pipelines based on go:generate

For now two usecases are in the picture:

  • Building from a directory containing .json files e.g. 'binapigen --api /usr/share/vpp/api --output ./myapp/bindings --filter interface,ip'
  • Building from a cloned local VPP e.g. 'binapigen --vpp ~/vpp --output ./myapp/binding'

Signed-off-by: Nathan Skrzypczak [email protected] Change-Id: I5b0b2ade40ab80c9e91c2a422f8c193b232d9830

sknat avatar Aug 11 '22 13:08 sknat