| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
The behavior of std::filesystem::path::append changed on its journey
from experimental:: to std::
Add a testcase and adapt to the behavior change.
Fixes: e6b21c74581c30ea635aabbbc08d0a56f8e27063
Change-Id: I4bdb43ea9b85933ec12ae0f4b609ec3a33d77d01
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
|
| |
Add cereal/types/tuple.hpp to our pimgen generated serialization code so
we can serialize xyz.openbmc_project.Association.Definitions
Change-Id: I0fff8eb7c07cbc427aeb6dd65c557b773a9592c2
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When generating code sdbus++ uses python inflection to normalize names.
Use the sdbus++ module that does this when we generate the code that
calls methods in code generated by sdbus++. This avoids build failures
like:
gen_serialization.hpp:22:68: error: ‘const class
sdbusplus::xyz::openbmc_project::Example::server::Iface2’ has no member
named ‘example_Property4’; did you mean ‘exampleProperty4’?
Change-Id: I4b6dbb1f977465ea176f27d021ed2633ae40c37b
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
|
| |
With Thud(Yocto 2.6) bumping gcc version, std::filesystem
is available.
Change-Id: I1837df14e52be3e2007b941c3f9c0d3efc687027
Signed-off-by: Kun Yi <kunyi731@gmail.com>
|
|
|
|
|
|
|
| |
Installs into bin instead of sbin per guidelines.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I6477001b736d2ca6a137591ae05e83b6aaab5ee4
|
|
|
|
|
|
|
|
| |
Use the defaults in the pkg check where the default error message is
sufficient to identify which package is missing.
Change-Id: Ie8279e319c33bdbb9425c2d1a3d0e50b6a5150c1
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
|
| |
This was attempted previously but didn't get the logic quite right.
Include pthread unconditionally since it is needed by the 'all' target.
Change-Id: I9db7fb15280357b53a748f1c385a5523e37e34a4
Fixes: 35aba2347fd0ffbbaf704d4cc067304881348182
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
|
| |
Add a basic compile time test that ensures manager.hpp can build on
its own.
Change-Id: Id10cdd8135fd4a41ebf2a76bc1e0da2d1916c6fa
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
|
|
| |
Switch the manager over to the new serialization concept API
implementation and the new interface operations API - introduced
previously.
Change-Id: I756021e4c42c0f61d269dccfd9ff0c489d91c0c7
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Many of the templates in manager.hpp are _almost_ testable. Enable
testing by porting to a new header - interface_ops.hpp - to be activated
later.
Enhancements include:
Dropped 'PropertiesVariant' wrapper template for reduced comprehensional
complexity.
More intuitive HasProperties implementation. HasProperties is a type
traits template that simply checks for the presence of a nested
PropertiesVariant typename. These are provided by sdbusplus generated
server bindings for dbus interfaces that have properties.
Standalone templates for make, assign, serialize and deserialize
interface. There was no good reason to couple these, and the
resulting types and method names are more intuitive.
Templated serialize/deserialize operations so the dependency on
cereal can be abstracted away.
Change-Id: Ia449628eeaa9732bbbc51b0609bd449f43ebcb7c
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
|
| |
Add a basic compile time test that ensures serialize.hpp can build on
its own.
Change-Id: Ib83e9fa73fd44c00884299b48b896f1fe53752c7
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
|
| |
Wrap serialization methods in a struct to match a yet to be consumed
serialization template concept API.
Change-Id: I4be1749f693ea5fe116bbac581428972e7670791
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
| |
Introduce --enable-tests so that packagers don't need gtest installed
to produce a package.
Change-Id: Ic17f46f2535d0426d05f05d4ff32711d0a2847d1
|
|
|
|
|
|
|
| |
Ensure utils.hpp can build on its own, and add some unit tests.
Change-Id: Ia147b699105ff4497d9226630ef19e57d91de3c3
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
| |
Add a few missing headers from utils.hpp.
Change-Id: I6efbceac3f583349e1db5b9135bd05da0270878e
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
|
| |
Add a basic compile time test that ensures types.hpp can build on its
own.
Change-Id: Idbf8a68feb1bf30b4fb573d254edf3a2f0a6f0cc
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We don't need all of message.hpp to be included from types.hpp since
all we need is the variant definition. Instead, just get
sdbusplus/message/types.hpp, which has the variant definition.
message.hpp picks up <memory> so add that where it is now missing
(events.hpp).
Add a missing cstdint include.
Change-Id: Ic033ceafcd982dba3e39592a4d8f64e5b4e65f2e
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Add the test driver so we can run unit tests with the check target.
Drop GTEST_CPPFLAGS - gtest has proper pkg-config support now.
Default not-found messages are sufficient - use those.
Change-Id: I887f6bc46a029b6b23254da7508745952f865869
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
| |
This is possible and preferrable now with the switch to c++17.
Change-Id: I0c314ae9a85c8c34274cc971e63b17988db31a2b
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
|
| |
This change makes it possible to use std::variant as a drop in
replacement for mapbox::variant.
Change-Id: Ia729c3a7832eec4dd6cddadba9bc160b6ba9ad90
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Given the dbus member class for an interface and property hosted by
inventory manager, generate the getProperty functor for retrieving that
property from inventory. This ability is only supported when using the
`PropertyIs` functor to compare a property within inventory to a given
value before triggering an action.
Example yaml:
filters:
- name: propertyIs
service: xyz.openbmc_project.Inventory.Manager
path: /system/chassis
interface: xyz.openbmc_project.Inventory.Decorator.CoolingType
property: WaterCooled
value:
value: true
type: boolean
dbusMember: "sdbusplus::xyz::openbmc_project::Inventory::\
Decorator::server::CoolingType"
Generates:
make_filter(functor::propertyIs(
"/system/chassis",
"xyz.openbmc_project.Inventory.Decorator.CoolingType",
"WaterCooled",
true,
"xyz.openbmc_project.Inventory.Manager",
make_get_property<>
(
functor::getProperty<sdbusplus::xyz::openbmc_project::
Inventory::Decorator::server::CoolingType>
(
"/system/chassis",
"xyz.openbmc_project.Inventory.Decorator.CoolingType",
&sdbusplus::xyz::openbmc_project::Inventory::
Decorator::server::CoolingType::getPropertyByName,
"WaterCooled"
)
)
))
Tested:
Code generated as expected with service name given
Code generated as expected without service name given
Resolves: openbmc/phosphor-inventory-manager#1
Change-Id: I5600854a1b0b9ce3e1511d3bcd9a452d6b1107ba
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds support for inventory manager to retrieve a property's value that
it hosts as input to condition tests. Utilizing a provided sdbusplus
server binding member function to get a property from the inventory
hosted interface, a property can be read from that interface within
inventory manager. After the property is read, the condition test is
performed and the resulting action(s) occur.
The only currently supported condition test for using a property from
within inventory manager is the `propertyIs` condition.
This is an example of the expected generated source to get a property
from within inventory manager:
make_filter(functor::propertyIs(
"/system/chassis",
"xyz.openbmc_project.Inventory.Decorator.CoolingType",
"WaterCooled",
true,
"xyz.openbmc_project.Inventory.Manager",
make_get_property<sdbusplus::xyz::openbmc_project::Inventory::
Decorator::server::CoolingType::PropertiesVariant>
(
functor::getProperty<sdbusplus::xyz::openbmc_project::
Inventory::Decorator::server::CoolingType>
(
"/system/chassis",
"xyz.openbmc_project.Inventory.Decorator.CoolingType",
&sdbusplus::xyz::openbmc_project::Inventory::
Decorator::server::CoolingType::getPropertyByName,
"WaterCooled"
)
)
))
Tested:
Manually edited generated code to use property within inventory
and actions occurred when condition passed
Manually edited generated code to use property within inventory
and actions did not run when condition failed
Actions not run when get property function omitted
Change-Id: I094bbacbcdeb239d33cac343b2daeb5f86e0a58a
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
| |
Change-Id: I116aaf2ccc4ce6a68cff19ee5ed785bcfacccad5
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
| |
Update configure.ac to choose the c++17 standard
Change-Id: Ib2437abc26c9e1a0b177e3f95c73dd61ceb468b8
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
| |
clang-format-6.0 introduced new changes, also then updates to
.clang-format introduce more new changes.
Change-Id: Iec9f84e3a7a5bf254d66eee46cdc9b3070e06687
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
|
| |
Per openbmc/openbmc#3364, adding -flto to CXX flags
in order to reduce overall library and binary sizes.
Ref: https://gcc.gnu.org/wiki/LinkTimeOptimization
Change-Id: I80b68276039636a0e59f3ffad0ec59b73973a18c
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
|
|
|
|
|
| |
Change-Id: I8b401cc6b24be93fb30ac2962e64a26cbf80cdde
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
|
|
|
|
|
|
|
|
| |
Resolves openbmc/openbmc#2905
Tested: static_assert only
Change-Id: Ib39ca78a6edd415263c75175190da3b3ee7ab183
Signed-off-by: Joseph Reynolds <jrey@us.ibm.com>
|
|
|
|
|
|
|
| |
Fix up problems and enable clang-format during CI builds.
Change-Id: Ia5c88281f7090c0aa09ba586d968f1fcd8aba4f1
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
React to a GCC7.2 behavioral differences where
assert(sdbusplus::message::message) no longer compiles.
sdbusplus::message::message implements operator bool which
prior to GCC7.2 was emitted implicitly. Add an explicit
cast to bool where required.
Tested: Built repository using GCC 7.2
Change-Id: I49fb05d616ba1f790ef68365983b1f85aa91e46a
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
|
|
| |
Spelling errors found using github.com/lucasdemarchi/codespell
A tool to fix common misspellings.
This tool is licensed under GNU General Public License, version 2.
Change-Id: Ib95e14205fe5fa72c27f35305c822234052420ef
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
|
|
|
| |
Change-Id: I0cb5a444fdd65138503d4360f03e66c5032f9870
Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
| |
Modify Maker template for type-only interfaces that do not
have properties.
Resolves openbmc/openbmc#1786
Change-Id: I2c48b37cf273943a0c696f6b92db0bc901a1c9b4
Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
|
|
|
|
|
|
|
|
|
| |
This commit provides a fix for an issue in which the cereal
deserialize() would crash the phosphor-inventory, incase
persistence file is empty in restore path.
Change-Id: Id1d40a0e401af8acea92775d1f3337c8a897a7ec
Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
pimgen.py processes all d-bus interfaces defined by
phosphor-dbus-interfaces, not just the ones under the Inventory/
namespace, because the inventory objects can implement any d-bus
interface.
The interface xyz.openbmc_project.Association has a property of type
sdbusplus::object_path (a wrapper around std::string), which Cereal
can't understand (and asserts at compile time). As a temporary solution,
ignore this property type. It's safe to do that because
xyz.openbmc_project.Association is un-implemented interface.
Resolves openbmc/openbmc#957.
Change-Id: I85dcd7a5d0885b29718c60b5062c8b5c7770a1ec
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
|
|
|
|
|
|
|
|
|
| |
Use Cereal to deserialize inventory information persisted in the
filesystem and restore that to create inventory d-bus objects. Perform
the restore when the app starts.
Change-Id: I0f36a9cbdde223e4bfd9e178e33f5677217ba881
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use Cereal to serialize and persist inventory items to the filesystem.
Serialize inventory objects as and when they're created/updated via the
notify() API.
Create a template API to perform serialization on the sdbusplus
inventory interface type.
An inventory item path /foo/bar/baz implementing interfaces iface1 and
iface2 would be stored in paths /foo/bar/baz/iface1 and
/foo/bar/baz/iface2.
Change-Id: I9a175185eac1740d6f2ca86a3ee13457edfc8ea9
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
|
|
|
|
|
|
|
|
| |
Subsequent commits will introduce serialization of inventory properties.
Generate the save()/load() functions required by Cereal.
Change-Id: I2ce16d205cad9684711c49c32ddae9f69cd8632d
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
|
|
|
|
|
|
|
|
|
|
| |
Capture inventory interfaces' properties in an InterfaceComposite
object. This object maps an interface name to its properties. This will
be utilized by subsequent commits that will enable persistence of
inventory properties.
Change-Id: Ifeedc0e5d939347eb5e390b483deb250abb87fb1
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
|
|
|
|
|
|
|
| |
Resolves openbmc/openbmc#2054
Change-Id: I183e9cbc034c9c14114301abf93318aba6fff22e
Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
At present the common shared folder path has files from
phosphor-dbus-interfaces, openpower-dbus-interfaces and other
applications.
As Inventory manager is linked to only phosphor-dbus library
getting linker error for other interface files.
Change-Id: I66870f97aeaf4c8b5528187b2bfebdc9e8954106
Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
|
|
|
|
|
|
|
| |
Resolves openbmc/openbmc#1710
Change-Id: Ibbda0fa52de6a569418db939f6527ff985e869e9
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
|
|
|
|
|
| |
sdbusplus::server::match::match moved to the sdbusplus::bus namespace.
Change-Id: Ib1599f7efbf63570685a7029811f2eeb69ef6ace
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
|
|
|
|
|
|
|
| |
Partial fix for openbmc/openbmc#1112.
Change-Id: I628bdf7847f0eeb852fe12ec8d0fbadc8fd3eb68
Signed-off-by: Leonel Gonzalez <lgonzalez@us.ibm.com>
|
|
|
|
|
| |
Change-Id: If21765193d26a6908c4a85cbbc23da7d54acb222
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
|
|
|
|
|
| |
Change-Id: Id78b31e981e2e483789d6186848e21db20689f1a
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
|
|
|
| |
Define CXXFLAGS rather than CFLAGS.
Add libraries via LIBADD rather than LDFLAGS. This allows
--as-needed to drop unnecessary libs if present.
Don't bother with PIC objects for convenience library.
Change-Id: I8e09a79a69b35be702811b594fed506332a23c43
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
| |
Whitespace changes only.
Change-Id: I0ff90593850c4f79b56587a315caa0ca51df8936
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
| |
This ends up being more portable.
Change-Id: I9e4e0414329878316a110a5234aeea4677b877e8
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
| |
An astyle error in functor.hpp slipped through.
Change-Id: Id347b45dd0a6bc8ed1d4a27f59b4ba0709433376
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|