RedHatInsights / insights-host-inventory

GNU General Public License v2.0
30 stars 77 forks source link

Extract host (de)serialization #323

Open Glutexo opened 5 years ago

Glutexo commented 5 years ago

We need to refactor exporting the hosts from the application. Currently the exported data go into a HTTP response, in the near future it’s going to be put on a message queue. The big goal is to have a separate module that handles the serialization. This can be split into rather atomic subtasks:

All this can be done without touching the logic inside of the methods. Further steps would then be:

The Host class is a DB model. Decoupling the database model from the logic is subject of another task #309.

Glutexo commented 5 years ago

Removed the subtask of using nameduple to internally represent canonical facts. That is currently not possible as the Host model properties are direct database field values. That can be solved as a part of #309.