Page MenuHomeVyOS Platform

Support operator mode commands via REST API
Not ApplicablePublicFEATURE REQUEST

Description

Hello all,

currently the old operator mode user types are not recommended and will be removed in the future.
But there is a need for such users to implement functionality like Looking Glass.

So it would be nice if the following could be called via Rest API:

  • ping <ip address>
  • traceroute <ip address>
  • show ip bgp <ip address>
  • show ip bgp summary

Details

Version
-
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Feature (new functionality)

Event Timeline

syncer changed the task status from Open to In progress.Aug 24 2019, 2:46 AM
syncer assigned this task to dmbaturin.
syncer triaged this task as Normal priority.
erkin set Is it a breaking change? to Unspecified (possibly destroys the router).Aug 31 2021, 6:57 PM
erkin set Issue type to Feature (new functionality).

When there is an example for operator rest api commands I could add some functionality.
But the architecture for such operations should be provided by someone who is deeper involved in the vyos roadmap.

Who can help with the architecture of this webservice?

@adestis there were discussions on this in the past week --- I will be helping @dmbaturin with the task

Great. As soon as there is an example available I think I can also help provide additional commands.

@adestis there were discussions on this in the past week --- I will be helping @dmbaturin with the task

Any updates @jestabro ?

op-mode endpoints for 'show', 'generate', 'image' have been a part of the REST API for a while, as I'm sure you are aware (just to be clear):

https://docs.vyos.io/en/latest/automation/vyos-api.html#vyosapi

The general question of refining the API access to op-mode is in active development this month for the GraphQL extension to the HTTPS API. We should consider how best to backport the new approach to the REST API, once the design decisions are clear. I would be very interested to hear details of the requirements in your use case, other than the current lack of, say, ping/traceroute.

My understanding of the requirement would be, say, T3758 in the case of op-mode. I consider this to require the refinement of op-mode firstly, as one wants per-command authorization.

The GraphQL API supports op mode in a much nicer way.

@dmbaturin I understand that show commands are already implemented via the API.
But what about commands like ping and traceroute?
Would this require much more effort?