Generate sdbusplus bindings for Associations.
- Generate sdbusplus server bindings for the org.openbmc.Associations
interface in the makefile.
- Add YAML file that describes the org.openbmc.Associations interface.
Change-Id: I496ef17433aeda520d3f2611d8582c5e9759601f
Signed-off-by: Saqib Khan <khansa@us.ibm.com>
diff --git a/Makefile.am b/Makefile.am
index e8a7056..47c2d36 100755
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,6 +2,9 @@
ACLOCAL_AMFLAGS = -Im4
+nobase_nodist_include_HEADERS = \
+ org/openbmc/Associations/server.hpp
+
sbin_PROGRAMS = \
openpower-update-manager
@@ -10,7 +13,16 @@
version.cpp \
serialize.cpp \
item_updater.cpp \
- item_updater_main.cpp
+ item_updater_main.cpp \
+ org/openbmc/Associations/server.cpp
+
+CLEANFILES = \
+ org/openbmc/Associations/server.cpp \
+ org/openbmc/Associations/server.hpp
+
+BUILT_SOURCES = \
+ org/openbmc/Associations/server.cpp \
+ org/openbmc/Associations/server.hpp
generic_cxxflags = \
$(SYSTEMD_CFLAGS) \
@@ -24,6 +36,14 @@
$(PHOSPHOR_LOGGING_LIBS) \
-lstdc++fs
+org/openbmc/Associations/server.cpp: org/openbmc/Associations.interface.yaml
+ @mkdir -p `dirname $@`
+ $(SDBUSPLUSPLUS) -r $(srcdir) interface server-cpp org.openbmc.Associations > $@
+
+org/openbmc/Associations/server.hpp: org/openbmc/Associations.interface.yaml
+ @mkdir -p `dirname $@`
+ $(SDBUSPLUSPLUS) -r $(srcdir) interface server-header org.openbmc.Associations > $@
+
openpower_update_manager_CXXFLAGS = $(generic_cxxflags)
openpower_update_manager_LDFLAGS = $(generic_ldflags)
diff --git a/activation.hpp b/activation.hpp
index 8908337..7ab4e14 100755
--- a/activation.hpp
+++ b/activation.hpp
@@ -7,6 +7,7 @@
#include "xyz/openbmc_project/Software/RedundancyPriority/server.hpp"
#include "xyz/openbmc_project/Software/ActivationProgress/server.hpp"
#include "xyz/openbmc_project/Object/Delete/server.hpp"
+#include "org/openbmc/Associations/server.hpp"
namespace openpower
{
@@ -18,7 +19,8 @@
using ActivationInherit = sdbusplus::server::object::object<
sdbusplus::xyz::openbmc_project::Object::server::Delete,
sdbusplus::xyz::openbmc_project::Software::server::ExtendedVersion,
- sdbusplus::xyz::openbmc_project::Software::server::Activation>;
+ sdbusplus::xyz::openbmc_project::Software::server::Activation,
+ sdbusplus::org::openbmc::server::Associations>;
using ActivationBlocksTransitionInherit = sdbusplus::server::object::object<
sdbusplus::xyz::openbmc_project::Software::server::ActivationBlocksTransition>;
using RedundancyPriorityInherit = sdbusplus::server::object::object<
diff --git a/configure.ac b/configure.ac
index 8abd1b5..33c941d 100755
--- a/configure.ac
+++ b/configure.ac
@@ -20,6 +20,8 @@
PKG_CHECK_MODULES([PHOSPHOR_LOGGING], [phosphor-logging],,
[AC_MSG_ERROR([The openbmc/phosphor-logging package is required])])
+AC_PATH_PROG([SDBUSPLUSPLUS], [sdbus++])
+
# Checks for library functions
LT_INIT # Required for systemd linking
diff --git a/org/openbmc/Associations.interface.yaml b/org/openbmc/Associations.interface.yaml
new file mode 100644
index 0000000..9be60ce
--- /dev/null
+++ b/org/openbmc/Associations.interface.yaml
@@ -0,0 +1,13 @@
+description: >
+ Implement to delegate org.openbmc.Association interface management
+ responsibilities to another application.
+properties:
+ - name: associations
+ type: array[struct[string,string,string]]
+ description: >
+ An array of forward, reverse, endpoint tuples where:
+ forward - The type of the association.
+ reverse - The type of the association to create for the endpoint.
+ endpoint - The association endpoint.
+
+# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4