Generate sdbusplus bindings for Associations.

- Generate sdbusplus server bindings for the org.openbmc.Associations
  interface in makefile.
- Add YAML file that describes the org.openbmc.Associations interface.

Change-Id: Ibb83e4828280f0a5383e901b914e40257eb4a7ff
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
diff --git a/Makefile.am b/Makefile.am
index 0af1b6d..87c5ad3 100755
--- a/Makefile.am
+++ b/Makefile.am
@@ -21,11 +21,14 @@
 	image_manager.cpp
 
 nobase_nodist_include_HEADERS = \
-	xyz/openbmc_project/Software/Version/error.hpp
+	xyz/openbmc_project/Software/Version/error.hpp \
+	org/openbmc/Associations/server.hpp
 
 BUILT_SOURCES = \
 	xyz/openbmc_project/Software/Version/error.cpp \
-	xyz/openbmc_project/Software/Version/error.hpp
+	xyz/openbmc_project/Software/Version/error.hpp \
+	org/openbmc/Associations/server.cpp \
+	org/openbmc/Associations/server.hpp
 
 CLEANFILES = ${BUILT_SOURCES}
 
@@ -38,7 +41,8 @@
 	version.cpp \
 	serialize.cpp \
 	item_updater.cpp \
-	item_updater_main.cpp
+	item_updater_main.cpp \
+	org/openbmc/Associations/server.cpp
 
 generic_cxxflags = \
 	$(SYSTEMD_CFLAGS) \
@@ -60,6 +64,14 @@
 	@mkdir -p `dirname $@`
 	$(SDBUSPLUSPLUS) -r $(srcdir) error exception-cpp xyz.openbmc_project.Software.Version > $@
 
+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 > $@
+
 phosphor_version_software_manager_CXXFLAGS = $(generic_cxxflags)
 phosphor_version_software_manager_LDFLAGS = $(generic_ldflags)
 phosphor_download_manager_CXXFLAGS = $(generic_cxxflags)
diff --git a/activation.hpp b/activation.hpp
index 69f52b7..89269bd 100644
--- a/activation.hpp
+++ b/activation.hpp
@@ -5,6 +5,7 @@
 #include <xyz/openbmc_project/Software/ActivationBlocksTransition/server.hpp>
 #include "xyz/openbmc_project/Software/RedundancyPriority/server.hpp"
 #include "xyz/openbmc_project/Software/ActivationProgress/server.hpp"
+#include "org/openbmc/Associations/server.hpp"
 
 namespace phosphor
 {
@@ -14,7 +15,8 @@
 {
 
 using ActivationInherit = sdbusplus::server::object::object<
-    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/org/openbmc/Associations.interface.yaml b/org/openbmc/Associations.interface.yaml
new file mode 100644
index 0000000..3259123
--- /dev/null
+++ b/org/openbmc/Associations.interface.yaml
@@ -0,0 +1,12 @@
+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.
+