On Mon, 2018-11-12 at 09:31 +0000, Daniel P. Berrangé wrote: > On Thu, Nov 08, 2018 at 07:55:19AM +0100, Fabiano Fidêncio wrote: > > This patchseries aim to have OSes properly dealing with deprecated > > and > > removed devices. The path I've taken is: > > The notion of "removed" devices makes sense as a break to stop the > inheritance from earlier OS version. > > I'm more interested in the notion of deprecated devices though. Can > you give a clear example of where that would be used. To me this > feels > like an overly crude/coarse concept and so not convinced we should > have > that. I have to admit that I don't have a concret example that could be used right now. However, what I had in mind while working on those patches was the case of a, for instance, cpu. Let me try to explain ... *if* we have the "pc" type as part of osinfo- db, we could just mark it as "deprecated" and apps would have a quite easy way to check that instead of having to check different devices in order to decide what to use (as done right now with q35). As this is *not* something that we'd have a practical use soon, I'm more than fine on just dropping the patches related to the "deprecated" notion. Do you want a v2 with the patches dropped? > > > - Use OsinfoDeviceLink to store whether the device is > > deprecated/removed > > - Add a new API in OsinfoOs that says whether a device is > > deprecated or > > not > > - Filter out the removed devices from _get_devices(), > > _get_device_links(), _get_all_devices() and > > _get_all_device_links() > > - A bunch of tests to ensure I'm not breaking anything, neither > > that > > something will end up broken in the future; > > > > Now, questions ... > > - Shall we do the same for platform and deployment? > > - I've introduced and exposed osinfo_os_get_all_device_links(), and > > the > > rationale for exposing it is basically for coherence with the > > osinfo_os_get_all_devices() .... However, it could totally be a > > private method. What's the preference here? > > > > *osinfo-db: > > Fabiano Fidêncio (2): > > schema: Add "deprecated" attribute to device element > > schema: Add "removed" attribute to devices element > > > > data/schema/osinfo.rng.in | 10 ++++++++++ > > 1 file changed, 10 insertions(+) > > > > *libosinfo: > > Fabiano Fidêncio (16): > > devicelinklist: Fix _get_devices() > > tests: Add basic tests for devicelinklist > > test-devicelinklist: Add _get_devices() test > > tests-os: Add test_devices_inheritance_basic() > > loader: Deal with "deprecated" devices for an OS > > os: Add osinfo_os_get_all_device_links() > > test-os: Add test_devices_inheritance_deprecation() > > loader: Deal with "removed" devices for an OS > > os: Add osinfo_os_get_devices_internal() > > os: Add osinfo_os_get_device_links_internal() > > os: Add osinfo_os_get_all_device_links_internal() > > os: Use get_devices_internal in _get_all callback > > os: Use get_device_links_internal in _get_all callback > > os: Add add_entity_to_list_check() > > os: Deal with "removed" devices > > test-os: Add test_devices_inheritance_removal() > > > > osinfo/libosinfo.syms | 4 + > > osinfo/osinfo_devicelink.h | 2 + > > osinfo/osinfo_devicelinklist.c | 6 +- > > osinfo/osinfo_loader.c | 18 + > > osinfo/osinfo_os.c | 265 > > +++++++++++++-- > > osinfo/osinfo_os.h | 2 + > > tests/Makefile.am | 5 + > > .../device/libosinfo.org/test-device-one.xml | 7 + > > .../libosinfo.org/test-os-devices-basic-1.xml | 13 + > > .../test-os-devices-basic-2-clone.xml | 10 + > > .../libosinfo.org/test-os-devices-basic-2.xml | 10 + > > .../test-os-devices-deprecated-1.xml | 14 + > > .../test-os-devices-deprecated-2-clone.xml | 10 + > > .../test-os-devices-deprecated-2.xml | 10 + > > .../test-os-devices-deprecated-3.xml | 14 + > > .../test-os-devices-deprecated-4-clone.xml | 10 + > > .../test-os-devices-deprecated-4.xml | 10 + > > .../test-os-devices-removed-1.xml | 14 + > > .../test-os-devices-removed-2-clone.xml | 10 + > > .../test-os-devices-removed-2.xml | 10 + > > .../test-os-devices-removed-3.xml | 14 + > > .../test-os-devices-removed-4-clone.xml | 10 + > > .../test-os-devices-removed-4.xml | 10 + > > tests/test-devicelinklist.c | 313 > > ++++++++++++++++++ > > tests/test-os.c | 268 > > +++++++++++++++ > > 25 files changed, 1032 insertions(+), 27 deletions(-) > > create mode 100644 tests/dbdata/device/libosinfo.org/test- > > device-one.xml > > create mode 100644 tests/dbdata/os/libosinfo.org/test-os- > > devices-basic-1.xml > > create mode 100644 tests/dbdata/os/libosinfo.org/test-os- > > devices-basic-2-clone.xml > > create mode 100644 tests/dbdata/os/libosinfo.org/test-os- > > devices-basic-2.xml > > create mode 100644 tests/dbdata/os/libosinfo.org/test-os- > > devices-deprecated-1.xml > > create mode 100644 tests/dbdata/os/libosinfo.org/test-os- > > devices-deprecated-2-clone.xml > > create mode 100644 tests/dbdata/os/libosinfo.org/test-os- > > devices-deprecated-2.xml > > create mode 100644 tests/dbdata/os/libosinfo.org/test-os- > > devices-deprecated-3.xml > > create mode 100644 tests/dbdata/os/libosinfo.org/test-os- > > devices-deprecated-4-clone.xml > > create mode 100644 tests/dbdata/os/libosinfo.org/test-os- > > devices-deprecated-4.xml > > create mode 100644 tests/dbdata/os/libosinfo.org/test-os- > > devices-removed-1.xml > > create mode 100644 tests/dbdata/os/libosinfo.org/test-os- > > devices-removed-2-clone.xml > > create mode 100644 tests/dbdata/os/libosinfo.org/test-os- > > devices-removed-2.xml > > create mode 100644 tests/dbdata/os/libosinfo.org/test-os- > > devices-removed-3.xml > > create mode 100644 tests/dbdata/os/libosinfo.org/test-os- > > devices-removed-4-clone.xml > > create mode 100644 tests/dbdata/os/libosinfo.org/test-os- > > devices-removed-4.xml > > create mode 100644 tests/test-devicelinklist.c > > > > -- > > 2.19.1 > > > > _______________________________________________ > > Libosinfo mailing list > > Libosinfo@xxxxxxxxxx > > https://www.redhat.com/mailman/listinfo/libosinfo > > Regards, > Daniel _______________________________________________ Libosinfo mailing list Libosinfo@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libosinfo