mfesiem / msiempy

McAfee SIEM API Python wrapper
https://mfesiem.github.io/docs/msiempy/msiempy.html
MIT License
23 stars 9 forks source link

Refactoring Datasource and DevTree code #86

Open tristanlatr opened 3 years ago

tristanlatr commented 3 years ago

Describe The Datasource and DevTree codebase have to be rewritten to:

SIEM and msiempy versions:

Additional context Add any other context about the problem here.

tristanlatr commented 3 years ago

Unify the search() method across list-like objects of the library as described in the 0.3.4 release notes

In order not to change the public API of the DevTree object, the search() method could return a Datasource object if there is only one result and a list of Datasources if there are more results.

It will still be confusing because the other objects will always return a list tho...

tristanlatr commented 3 years ago

The thing we should do here is to completely deprecate the use of DevTree object and create DataSourceManager, object with same interface BUT it should not overwrite the behaviour of the method search(). Of course the DevTree must stay around a couple of years with a deprecation notice.