DMTF / libredfish

libRedfish is a C client library that allows for Creation of Entities (POST), Read of Entities (GET), Update of Entities (PATCH), Deletion of Entities (DELETE), running Actions (POST), receiving events, and providing some basic query abilities.
Other
48 stars 22 forks source link

Fix-Cmake: installation of entities public headers #151

Closed matsKNY closed 3 years ago

matsKNY commented 3 years ago

(Hereinbelow comment associated with tests on RHEL8.3 OS)

The installation of libredfish did not copy two headers required/included by redfish.h, namely entities/chassis.h and entities/resource.h. As a result, it was impossible to compile C code with a dependency on libredfish.

The proposed fix is quick and simple, not to say quick and dirty. A list of public headers to install was created specifically for the entities subfolder (named REDFISH_HDR_PUBLIC_ENTITIES). For consistency, the initial list of public header, namely REDFISH_HDR_PUBLIC, was renamed REDFISH_HDR_PUBLIC_RED (since the names of all the header belonging to it are prefixed by "red").

matsKNY commented 3 years ago

A suggestion regarding the installation of the headers: maybe create an intermediate folder to contain all the installed headers, named for instance "redfish". Indeed, "entities" is a pretty generic name, just as "resource.h" and "chassis.h" are. The intermediate folder would make it possible to avoid naming collisions/conflicts: #include <redfish/entities/chassis.h> instead of #include <entities/chassis.h>. In the same way, I would say that #include <redfish/redpath.h> is more meaningful than #include <redpath.h>.

mraineri commented 3 years ago

I had @pboyd04 review this and it looked good to him; we'll have others review this during our normal review meetings, but I expect this to be formally approved shortly.

matsKNY commented 3 years ago

Thank you very much for you swiftness.

mraineri commented 3 years ago

Approved 8/20