Skip to content

[Feature Request] Change API Endpoint Generation #276

@palexster

Description

@palexster

Polycube Extension Proposals

Abstract

Current approach to API generation and management is complex. In particular, it is complex to:

  • Have discoverable APIs (i.e. HATEOS)
  • Introduce endpoints to scrape metrics (e.g. /metrics) by querying existing cubes on specific methods (e.g. metrics scraping)

The objective of this PEP is to make API generation mechanism, flexible enough to support those scenarios.

Current Solution

The Polycube Daemon does not keep track of information about cubes endpoints and cubes methods references. This prevents the possibility to use the these informations in future operations.

Limitations

The Polycube Daemon does not keep track of information about cubes and endpoints. This prevents the possibility to use the discovered endpoints in future operations.

Proposal

First step:

  1. Generate a API tree, with nodes defined with the following information:
    • Node Name
    • Node Type
    • Pointers to implemented methods
    • Metadata
      This API Tree should be kept update upon update-removal of existing services
      This will enable the following features:
  • Instrumentation-Metrics Exposition
  • Hateoas API Support

Second step:

  1. Split the discovery of APIs and their binding. This will have the following benefit:
  • Simplify the API Server code
  • Decouple the logic of endpoint binding from the YANG parser

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions