Skip to content

python: domain: various model fixes and OrganizationalUnit model

Fixes a bug in as_dict when many=True is used an empty list should be excluded when calling as_dict().

Wrote a regression test for as_dict() to test the various different cases as_dict() should handle.

Also the computer model test didn't clean up, fixed that as well.

Also adds the OrganizationalUnit container model, this is a very simple model but it is important. There are many fields on this model but they can be added as needed. So long the "ou" field is there, the "description" field comes from the base Model.

Checklist

  • Commits have Signed-off-by: with name/author being identical to the commit author
  • (optional) This MR is just one part towards a larger feature.
  • (optional, if backport required) Bugzilla bug filed and BUG: tag added
  • Test suite updated with functionality tests
  • Test suite updated with negative tests
  • Documentation updated
  • CI timeout is 3h or higher (see Settings/CICD/General pipelines/ Timeout)

Reviewer's checklist:

  • There is a test suite reasonably covering new functionality or modifications
  • Function naming, parameters, return values, types, etc., are consistent and according to README.Coding.md
  • This feature/change has adequate documentation added
  • No obvious mistakes in the code

Merge request reports