#2 Initial Project - Oraculum MOTD Client
Opened 4 years ago by frantisekz. Modified 4 years ago

There is motd-client.py file in this repo with function headers.

For some git basics and overview, you can check out https://pagure.io/fedora-qa/oraculum-client/issue/1 . (all the glory and cookies for that overview go to @lbrabec )

The goal of the client is to provide an easier way to manage motd messages shown on the Fedora Packager Dashboard. These messages are handled by oraculum, the backend of the Dashboard. Relevant endpoints are:

The first one returns list of all current messages (I'll add some examples soon).
The other two are listening only for POST requests. Both require MOTD_PASSWORD to be passed along with the other data in the POST so it can authenticate the request as valid.

insert_message accepts severity, text and days (optional). Severity can be "info", "warning", or "danger".

pop_message accepts just an id of message to be removed.

The body of the functions needs to be added. Some commentary is given in the respective docstrings. Use requests, try and except whenever dealing with something that can fail (network, IO, passwords,...).

Whenever there is something done, please make a pull request against the master branch. It is okay (and probably better) to go step by step instead of trying to do everything at once.

I'll gladly answer any question here, in the PR or Telegram.


Log in to comment on this ticket.

Metadata