Skip to content

Issue/21-22 add support for namespace-less interface and lacp bound

Dariush Mohandes requested to merge issue/22-add-support-for-lacp-bound into master

Created by: edvgui

In this PR

A lot of things have been added, nothing has been removed. If the new addition are considered stable and convenient enough, the long term goal would be to remove all the legacy part of the api.

The new api is prefixed /api/v2. Here is how it is defined: openapi.json.txt

The new features of this api are:

  • The generated swagger
  • Improved typing through the api and in the code
  • Interfaces can now be managed outside of namespaces
  • Interfaces of type bond can be built directly with slave interfaces attached

The api v2 structure is the following:

  • Everything is organized in three packages:
    1. Data, contains all the type definitions that come and go through the api
    2. Services, contains some classes that allow to create, edit, delete and get the network elements we manage
    3. Controllers, the api, does the validation of the incoming types, and call the relevant service to complete the requests
  • There are four namespaces/slices in the api, one for each resource type: interface, route, namespace. And one for some actions (currently only ping).
  • The doc can be accessed at any time at the url: /api/v2/docs

Limitations of the new api:

  • The simulate mode doesn't modify its behavior.
  • This has no automated tests, still looking for ideas about that (do we start a container and run the test against it? do we only run tests in a network namespace? --> We would still need to be root for that)

Closes #21 (closed) and #22 (closed)

This is still missing test cases.

Merge request reports

Loading