On Friday, 23 November 2018 11:54:40 CET Fabiano Fidêncio wrote: > +static void > +test_filter(void) > +{ > + OsinfoImageList *list1 = osinfo_imagelist_new(); > + OsinfoImageList *list2; > + OsinfoFilter *filter = osinfo_filter_new(); > + OsinfoImage *ent1 = osinfo_image_new("foo1", "x86_64", "qcow2"); > + OsinfoImage *ent2 = osinfo_image_new("foo2", "x86_64", "raw"); > + OsinfoImage *ent3 = osinfo_image_new("foo3", "i686", "raw"); > + OsinfoImage *ent4 = osinfo_image_new("foo4", "i686", "qcow2"); > + > + osinfo_entity_add_param(OSINFO_ENTITY(ent1), "class", "network"); > + osinfo_entity_add_param(OSINFO_ENTITY(ent1), "class", "wilma"); > + osinfo_entity_add_param(OSINFO_ENTITY(ent2), "class", "network"); > + osinfo_entity_add_param(OSINFO_ENTITY(ent3), "class", "network"); > + osinfo_entity_add_param(OSINFO_ENTITY(ent3), "class", "audio"); > + osinfo_entity_add_param(OSINFO_ENTITY(ent4), "class", "audio"); > + > + osinfo_filter_add_constraint(filter, "class", "network"); Even if this is just a test, would not it better to use the actual properties of the images, i.e. architecture, and format? -- Pino Toscano
Attachment:
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Libosinfo mailing list Libosinfo@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libosinfo