Skip to content
This repository has been archived by the owner on Nov 29, 2021. It is now read-only.

Refactor ospd #120

Merged
merged 19 commits into from
Jul 30, 2019
Merged

Refactor ospd #120

merged 19 commits into from
Jul 30, 2019

Conversation

bjoernricks
Copy link
Contributor

  • add type hints
  • cleanup OSPDaemon class
  • Improve OSPDaemon initalization (add init method)

Debug the osp command which is going to be processed.
Extract initalizing the logging into an own function. Initialize logging
before the daemon is started. Create server class depending on the
parsed arguments. Don't convert common args. Instead use Namespace
object from argparser directly.
* Use print function again to add newlines automatically
* Reformat version outputs
* Move copyright info into a module variable
Display version switch info as second item if help is displayed.
The init method will be called before the check and run methods.

So the new call flow is

-> constructor (__init__)
-> init
-> check
-> run

The init method can be used to move expensive intialization code (like
loading nvts) out of the constructor.
Imho wrapper is a bad name for a specific OSPDaemon instance.
The OSPDaemon, arguments parsing and main function have changed a lot.
Therefore indicate the changes with an incremented version number.
Add ca cert validation function to server module and check passed ca
cert file.
The files need to validated at the code where they are used too.
* don't log errors to stderr
* update to new parser behavior
@bjoernricks bjoernricks merged commit 5d4c622 into greenbone:master Jul 30, 2019
@bjoernricks bjoernricks deleted the refactor-ospd branch July 30, 2019 10:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants