Skip to content

initial checkin of experimental Bareos REST API#587

Merged
franku merged 1 commit intomasterfrom
dev/maik/master/rest_api_clean
Dec 3, 2020
Merged

initial checkin of experimental Bareos REST API#587
franku merged 1 commit intomasterfrom
dev/maik/master/rest_api_clean

Conversation

@aussendorf
Copy link
Contributor

based on fastapi / uvicorn and python-bareos
include systemtest with dependency on python3 modules fastapi and uvicorn

@aussendorf aussendorf force-pushed the dev/maik/master/rest_api_clean branch from a7c10e9 to f0aa3a5 Compare September 14, 2020 09:54
Copy link
Member

@arogge arogge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • the rest-api/main.py is very large, maybe the model classes could be moved elsewhere or the functionality could be split up into separate files based on the subject
  • there is a lot of unused configuration files in the system test. Usually we try to reduce the configuration to what is really required.
  • if I counted correctly there are 65 routes and the systemtest tests only two of them, that's about 3% test coverage
  • you're using curl in a shell-script for the test. As you're safe to assume that python is available, you might consider testing the API with a python program which will allow much more in-depth analysis of the results provided by the API
  • some of the REST routes don't "feel" right, but maybe that's just me

@aussendorf aussendorf force-pushed the dev/maik/master/rest_api_clean branch from e5b7842 to 2ead174 Compare September 21, 2020 15:06
@aussendorf aussendorf force-pushed the dev/maik/master/rest_api_clean branch from 3fe5035 to e72005a Compare October 8, 2020 16:12
@aussendorf aussendorf force-pushed the dev/maik/master/rest_api_clean branch 2 times, most recently from 34a2fe5 to e7308a2 Compare November 5, 2020 15:38
@aussendorf aussendorf force-pushed the dev/maik/master/rest_api_clean branch from e7308a2 to 1d67b13 Compare November 20, 2020 12:17
@frb121 frb121 self-requested a review November 30, 2020 12:54
@frb121
Copy link
Contributor

frb121 commented Nov 30, 2020

The README of this tech preview should be adapted to also address end users who want to try it out.

  • Python module requirements
  • DIRD User/Console/Profile resource requirements

A link to the specific section in our developers guide where those informations are given might be sufficient.

@frb121 frb121 self-requested a review November 30, 2020 14:11
@frb121 frb121 self-requested a review November 30, 2020 15:04
@frb121 frb121 self-requested a review December 1, 2020 10:17
@aussendorf aussendorf force-pushed the dev/maik/master/rest_api_clean branch 2 times, most recently from 71a6863 to 594543e Compare December 1, 2020 14:52
@frb121 frb121 self-requested a review December 1, 2020 14:55
Copy link
Contributor

@frb121 frb121 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me so far as a tech preview.

Copy link
Contributor

@franku franku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huge amount of work! However I have some smaller issues:

  • Please update the hyperlinks to documentation as suggested (some have errors)
  • the build environment is currently located in the source tree but should be located in the build area

@aussendorf aussendorf force-pushed the dev/maik/master/rest_api_clean branch 3 times, most recently from 3bfb277 to 36b9dda Compare December 3, 2020 15:36
  This is an experimental and preliminary backend for development purposes.
  The endpoints are subject for review and maybe changed in the future.

  It provides a REST API using fastapi, uvicorn and python-bareos to connect to
  a Bareos director. It supports the `configure add` commands to
  create configuration for clients, jobs, filesets and some more resources.

  It also provides endpoints to query job information and job control
  (i.e. start / restart jobs, trigger restores).

  Python3 is required to run the REST API.
@aussendorf aussendorf force-pushed the dev/maik/master/rest_api_clean branch from 36b9dda to 9a95f84 Compare December 3, 2020 15:38
@franku franku merged commit 819bba6 into master Dec 3, 2020
@franku franku deleted the dev/maik/master/rest_api_clean branch December 3, 2020 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants